Thursday, 10 October 2013

Object Oriented Programming and Recursion - Week 2

    I have found object oriented program to be a lot more enjoyable than non object oriented as I first learned programming in Java, the instant feedback of what I have programmed is very gratifying and helps me as I learn better when I see things happen. The goal is to become a human python visualizer. Creating classes feels at home as in java I always had to make classes.
    Recursion has proven to be a very useful programming technique that shortens the length of code drastically. In general the compact form of recursion is very nice to be able to write, however it can sometimes be very confusing and take a while to think through step by step. The best way to judge it is by just going through a case.
    For example, with the lab this week the binary notation function we had to create was quite difficult to understand until I went through a case with it, realizing that a base algorithm would work when the binary expression is put back in shorter and shorter.

2 comments:

  1. Thinking about the base case first really helps for me. Then I think about what operation is being repeated over and over again.

    ReplyDelete
  2. Yep! As Danny said in one of his last slides we as humans have that advantage when compared to computers, really would've helped to come to that realization more quickly in the Anne's Stools project when I spent hours trying to figure out the recursion for that,

    ReplyDelete