Thursday, January 30, 2014

Week 4, Jan 30th

Seeing Professor Heap use an Orca doll to represent artistic turtles was something I appreciated this week in class. I also really appreciate Professor Heap in general.

After glancing at classes I will be taking in the future, I set a goal for myself: between now and the beginning of our 2014-2015 year, I will start learning Java on my own. I hope that writing (typing) this out and having at least one other person read it will be some motivation for me to act on my words. One of my greatest worries in life is that I am not good enough at anything to succeed in life. In regards to computer science, I worry that I will slowly fall behind those that remain.

Something reassuring, however, is doing the labs in tutorial with my partner. We faced the same struggles but overcame our problems by just sitting and thinking hard for a bit. Even though I know I'm not the only one with these worries, it's nice to come face-to-face with the others.

I also learned super().__init__() in tutorial this week. Even though it isn't life changing, it's always good to know little tricks to shorten code and reduce hassle. A little effort can go a long way.

Wednesday, January 22, 2014

Week 3: Object Oriented Programming

      Walking into class not knowing what to expect on Day 1, I prepared myself to embrace the barrage of new information I was about to face. I clearly did not pay enough attention in CSC108, because I had no idea what object-oriented programming (OOP) was.
      Now it's Week 3 and I understand that OOP is a way of programming using mainly objects/ideas represented as classes. The best analogy for a class and its attributes is a phone and its functions, the phone being a class and its functions being the attributes. OOP gives computer scientists a way to define and organize what they want in a blueprint while utilizing the built-ins of programming languages. This "blueprint" is helpful because it allows computer scientists to modify data structures more easily to accommodate the rapid progression of technology. Compared to procedural programming, OOP is advantageous because it allows us to manipulate data and its behavior at the same time.
      We also got a glimpse of recursion in one of the lessons, which is something new to me. Recursion is generally when a function is called within itself. For example, in the sum_list example in class, the sum of a list was the sum of all the nested lists; sum_list was called on the smaller lists before being called on the list as a whole. After writing so many horrendous-looking for-loops in CSC108, I was thankful for this new information.
      I did not finish the first lab assignment, but I still found it helpful because seeing someone do it and having to type the code out with my own fingers are two completely different lessons. I did not finish the efficiency section of the second lab either, although I am confident I understood the idea behind it. If I did not have to pop anything from the stack/queue, I could just move the head of the list to the next index for each iteration. That way, every object does not have to be shifted over one index. I don't feel entirely confident in my OOP abilities, but I am excited to see what sorts of problems I can solve just by writing some code.