Monday, 17 February 2014

Assignment 1 thoughts

So it has been awhile since my first post.   As I am much older than most if not all the students in my class, I did not grow up with social media being in the forefront of everything.  So please forgive in the delay of posting.  When I was in high school Facebook and twitter were not even ideas. ICQ IMing was the big thing (for anyone who knows what that is they will be able to figure out my age, for those that have never heard of it, you will definitely realize I am much older).   It wasn’t until part way through my first University degree that Facebook even became relevant.  So the idea of sharing my ideas on a public place is not the norm nor that welcoming for me to do.  I have a Facebook account, but don’t post my random thoughts, as I feel this is not appropriate, and use it to only to stay in contact with older friends (which is the premise of what Facebook was designed for).  

Many things have happened during since my first post.   The main thing was the submission of our first assignment.   It was designing a program to run by both user input and computer simulation.    The basis of the program was to model the problems in the Tower of Hanoi. For more background on this here is a wiki article: http://en.wikipedia.org/wiki/Tower_of_Hanoi).  The premise of the game is to move ‘cheeses’, disks, or rings from one platform to another.   You are not allowed to put a larger on top of a smaller object, and have to get all objects to the last platform, using a total of 3 platforms.

The difference in this assignment is we had to incorporate the use 4 stools, and designed a method for moving n-i cheeses using all 4 stools to an intermediate stool then moving the remaining i cheeses to the final stool, and once again moving the n-i cheeses to the final stool.    “i” is chosen as an arbitrary number.   Although each function design was not entirely long in terms of amount of code, the integration of these functions was interesting.   When first reading the assignment it seems overwhelming and a daunting task, but I found that once I started writing the starting code it became clearer on the overall task for the first 4 parts of the assignment.    Once the starter code functions were written, implementing the user input portion of the assignment was fairly simple and actually fun to do, as you got to be a little more creative on the look of the output of the program.

However the last portion in determining the optimal i cheeses to move was much more difficult.   As I sat staring at my screen late at night before the assignment was due with nothing useful working in solving the problem.   I decided to go to sleep.   As I was nervous about doing this and then not having the time to finish it the next day, I went to sleep.    However, this was the best idea.   After reading some useful Q&A on the Piazza discussion board, it just came to me.  This was the biggest relief after testing and making some minor adjustments to the code, and seeing that it worked.

This assignment was a great emotional ride.   At certain points it kind of makes you dislike computer science, but then you complete something on your own and it works, and makes you absolutely love computer science.   This is all for now, and hope to post some more in a shorter time then my previous post.    Look for some thoughts on recursion next week.