Hello and welcome to my new blog! Here I'll be discussing all things CSC148 on a weekly basis. For this first post, I'll be going over everything up to week 4.
So far, we've focussed on a couple of core topics: classes and inheritance, raising exceptions, stacks, debugging, and last but not least - recursion. Although I've already had an introduction to these concepts through MIT's 6.00x course, in class we were able to spend a bit more time on each topic which not only exposed me to some new ideas but also helped gain a better understanding of certain of what I already knew.
The first change that I noticed was the course's adherence to proper style and convention for code. The PEP8 and PEP257 documents really gave me an idea of the style standards in the python community, and How to Code Like a Pythonista gave some useful tips that I had never heard about. The simplicity of the first few exercises and tutorials gave me a chance to think about and incorporate these new ideas into my code. On the other hand, I found that the PEP8 checker didn't allow for any exceptions that may allow for better readability of the code, which went against the very belief that "a foolish consistency is the hobgoblin of little minds."
Another thing I learned is the unittest and doctest methods for debugging/testing. I had skimmed over the code treating these subjects on Coursera, but the exercise and tutorial allowed me to get some practice in actually implementing test suites and understanding how they work.
Finally, the course gave me a better understanding of topics I had already been introduced to. I was able to gain some insight on inheritance and the relationship between classes (more specifically how that relates to methods and parent class constructors), as well as get some practice on trying to wrap my head around some recursive functions, going through each layer to see how the functions work.
A final highlight of the course so far that I'd like to mention is the first assignment, which involved solving and animating the Towers of Hanoi and Reve's Puzzle. The assignment was challenging, and in hindsight, wasn't frustrating or difficult. Through the assignment I was able to learn about tkinter, Reve's puzzle and the frame-stewart algorithm, and get some practice using many facets of python programming. However, I think the most value I got from the assignment was from taking the time to read and understand someone else's code and add to it, an aspect of programming that I haven't really been exposed to, and one that I tend to avoid if possible. Finally finishing the assignment and watching the animation of the solution was a great feeling!
So in short, it's been an exciting first couple of weeks. I'm really looking forward to the rest of the course!
No comments:
Post a Comment