Saturday, February 14, 2015

Object Oriented Concepts

Before I start I would just like to say sorry for missing a post last week, I will try my best to continue keeping you guys up to date on my experiences with CSC148.

This weeks topic is object oriented concepts. So the few concepts we have covered so far are stacks, queues, and trees. Personally my favorite concept has been trees. Stacks and queues are pretty conventional and you see them everywhere, however, a tree is slightly more abstract. It is used to represent a hierarchy of importance and it is really interesting to see how that sort of data structure is formed. While a stack and queue can only point to one object at a time, a tree can point to as many as you set its maximum children to. I find the visualization of this object to be very interesting since you get a tree looking representation when you draw all the nodes and pointers the object has.

However, that being said, I have actually learned all of these data structures in the past. The only difference is that I learned how to create a binary tree as opposed to a general tree. This actually made it surprisingly difficult to initially understand the structure that was expected from the tree class. I was taught to use nodes as numbers and that you would organize smaller and equal numbers on the left child and greater numbers on the right child. Anyway, it ended up confusing me until I realized that there was none of that kind of sorting done in our implementation. I felt kind of silly but was glad to see we are doing something slightly different from what I know so far. I'm excited to see what is in store. Rock on!

Sunday, February 1, 2015

My First Few Weeks

My first few weeks of CSC148 have been some what stale. I have a decent background in programming due to my experience with it during high school, and I haven't learned any new information so far. I have really have just been learning syntax for things I already know. The only new thing I have learned so far is the eq/str/rep methods that we now have to implement. Now while all the material has been smooth sailing so far, these methods gave me quite the headache on the first assignment.

So I've never coded methods like these in my life and like any bad student I didn't pay attention in class when talking about it. While these methods are super easy, I completely forgot about them until just a few hours before the submission time. So I spent the next hour and a half or so trying to figure out how to write these mystical methods with every source telling me to do something different. Sure enough, I figured there must be a proper example somewhere on the csc148 webpage. Just like I thought there was a few and they gave me a good idea of what to do. I wasted almost two hours before I finally understood it and fully implemented everything with just an hour remaining on the submission. Need less to say, I'm gonna be on top of understanding the new material from now on.

That's my interesting experience with csc148 so far, join me next week and hit me up in the comments. Rock on!