Now on to object-oriented programming. While I believe myself to be a semi-competent pythonista, one specific part of python never quite clicked with me: classes. Anything to do with classes. The making of a new class, the writing __init__ or __str__ statements,
![]() |
| Programming on a ridiculously oriented object |
In addition, the idea of recursion, while not fully understood, has become a lot clearer to me since I first learned it. The idea that, while defining a function that you can call the function perplexed me. How is something like that possible? Wouldn't that be like just calling the function infinity times? It turns out most of my confusion was that I didn't understand what a recursive function was meant to replace; a for-loop. Once this became clear, the idea that a recursion could be infinite seemed preposterous to me; only a mistake in coding could possibly result in something like that because there would always be a definite end-point. The one example that I found on Youtube that convinced me of this was a simple program used to count down to zero where the function would call itself, with the input minus one each time until it reached zero. The example presented in class however, seemed much more confusing as it was just a return statement calling the function itself.
In conclusion, the end the introduction to the mind of this simple CSC 148 student, I pose the following idea :if something seems too complicated to comprehend, it is not because the thing itself is complicated, but rather because the complex idea had not been broken down into its simplest, fundamental parts.

No comments:
Post a Comment