Tuesday, January 15, 2013

Week 2 - CS106A

The goal of week 2 was to Watch lecture 3 and complete problems 3 and 4 of Assignment 1.

Lecture:
Common Errors in Karel:
 1. Infinite loops - nothing allowing the program to stop.
     I keep finding my self in an infinite loop and I'm beginning to find if entertaining.  Basically, I need to make sure I always have a method or a command to confirm a program will end.
2. Off By One Bug (OBOB)
    I actually had this problem in the Column problem.  I was able to notice my error and debug the code properly.

I learn it is extremely important to make sure I place comments at the beginning of a program and at the beginning of any method.  This must be done to not only remind me of the pre-conditions and post conditions of a code but to better explain my thought process to another programmer working on the program.

The lecture did go over decomposition and Order of Operations
Top Down Design
Bottom up Design

My brain seems to be programmed for Bottom Up Design.  I seem to like to find the smallest pieces of the puzzle and think; how can I use these pieces to achieve my goal.  In all actuality  I HAVE to retrain my brain to use Top Down Design. That way, I start with the goal and then break it down to everything I will need to complete it.  So, I'm working on my thought process and I'm sure I'll get it here soon



No comments:

Post a Comment