It's been a year since I've taken CSC108, so as I expected, my computer science skills were very, very rusty. What I didn't expect was being completely unable to follow the lecture on the first day of class. Naturally, this set off a whole set of alarm bells in my head, so I was relieved to hear that the course had scheduled ramp-up sessions for those who needed a python refresher. I went into the second ramp-up session feeling incompetent, but left enthusiastic and itching to write some code. It was truly surprising how effective the session was, and how quickly I was able to pick up programming again. I guess it's kind of like riding a bike?
Object oriented programming is new to me. I took a little bit of basic programming in high school, so CSC108 wasn't entirely new, but I never got far enough to start dealing with objects. And admittedly, I never really understood objects, nor what they were useful for. Classes were covered briefly in CSC108 towards the tail end of the course, but up until then I hadn't yet encountered a problem for which I felt that I should be using objects and classes. Everything seemed to be doable without them. However, after covering abstract data types such as stacks and queues, I'm starting to see how they can be useful (and I'm sure I'll see much more as the course goes on). I found the idea of creating a specific data type really interesting, so I decided to play around with it a bit. Last semester I took linear algebra, so I decided to create a Matrix class, which would store integer values in a matrix. So far I've managed to create the class, including random generation, addition, subtraction and matrix multiplication methods. I'm hoping I'll be able to figure out how to implement row reduction and determinant methods as well. This little exercise has been really helpful in getting more acquainted with classes and objects, and understanding their purpose and what they're useful for.
Why do you want to create a Matrix class instead of just a list of lists?
ReplyDelete