Stanford’s CS106a Programming Methodology Courses

I’ve been studying the free Standford CS106a lectures for some time now on YouTube – Playlist Here – and have been following along with the assignments. The first assignments revolve around manipulating a java-based robot application named Karel. Karel can only perform a limited amount of movements like move, turn left, pick beeper, and put beeper. The assignment I’ve been working on involves moving Karel around a number of different worlds and place beepers in a checker pattern. However, if trying to move through a wall, Karel can be blocked. Other errors like these pop up and make my life suck. During the programming of the checkerboard application, I utilized and became familiar with the following:

  1. Program structure
  2. Top-down programming/decomposition/subproblems
  3. Conditional statements (if) (if/else)
  4. Iterative Statements (for/while)
  5. Method definition – private void name () { … }
  6. Recursion – having a method call itself
  7. Using import to include definitions from libraries

Programming with Java is all about primitives, camelcase, fence posts, and calling methods on objects! Programming is quite methodical and step-by-step in the first stages of an application. Thinking about what are my most simple, primitive moves and actions first, and then building on those is the start. Then once the most simple steps have been defined, I start to create methods that are more universal, and writing statements that are sub-methods of the top level methods. When programming top-down it’s fun because I am beginning to rely on the skills I’ve learned to trust that I can write later what I’d defined as a method.

Anyway, getting to where Karel ends in the video linked below has been a pretty mind-wracking endeavor. I’ve pretty much started over with the code three times but I can finally see the light at the end of the tunnel. One of the most difficult obstacles is writing the code so that it will run the same in all of the different “worlds” (8×8) (8×1) (1×8) etc. Also another thing about programming I’ve found is that by relying on my own skills and knowledge I have found I can arrive at a solution faster than searching online and there are many different ways of accomplishing the same task.

2013-07-13 16.09.29


Hits: 101