Welcome to CSC148, where the data is abstract and the types don't matter. With the introduction of classes, we're also introduced to object oriented programming, and working with abstract data types. Classes are typically new to the students of Danny Heap, but not for me. So normally, I would complain about learning stuff I have already, but I'm incredibly glad we are. I learned C++, another object oriented programming language a couple years and dipped softly into the field of classes and abstract data types. You'd think that'd make me better with classes, but precisely the opposite. I learned how to code classes, the completely incorrect way and didn't understand their purpose or function at all and why we use them. Now that we're learning it, I'm trying to erase all previous knowledge of classes, and relearn it the proper way. To be fair, learning about classes did give me a slight advantage as I understood basic concepts. Learning C# this summer also lent itself to teaching me about classes.
While learning classes, we also discuss the many of subtopics used to manipulate them, such as superclasses. Superclasses are classes that 'inherit' from base classes so that we can save precious, precious data. Inheriting is done by importing other classes we've written and editing or adding to them so that it does the more specific functions we require of it.
Furthermore, we discussed other types of classes, like exception classes, and how to raise them. I had various trouble with this, understanding the different types of exceptions, but during the second lab, I got to venture into this and raise my own exception. This also lead to learning about trying and excepting, which I used with my lab partner to try converting a string to an integer, but raising a value error if the string was unable to. Trying and excepting seem like they will become incredibly useful further on in the semester, as well as my programming career.
In the end, I've had little trouble with the problems and topics we discussed so far. Without trying to suck up, I would argue the reason for this is how in depth Danny Heap went into the topics, and going over exactly how something works, and answering any type of question the students have to offer. Next week, we're discussing recursion, another topic I ventured into previously and had trouble with. But alas, I'm quite excited for it, and will look forward to the day we get to program some recursive functions, especially trees. Until then, I suppose I'll get back to procrastinating.