Thursday, 18 February 2016

Week 6

This week is reading week so it's a nice little break from the responsibility to drag our sleep-deprived bodies across this chilly campus in the mornings. Nevertheless, there's still lots to do in this course. Our first assignment is due in one week today and since every one of my other classes decided to take advantage of our reading week "spare time" and make something due this coming week, I've had to make sure to get my assignment nearly complete before Monday. So far so good. I know professor Danny was warning us that we will accomplish less than we set out to this week, and I know that's true, but I had nowhere to be and I was quite confident I would get this assignment done or almost done before school returns.
The assignment was pretty frustrating at first. I made the mistake of thinking that reading the assignment handout would be enough knowledge to go into it with. That is, I didn't look through each of the python files and try to read the code and see what was going on and what was expected. That cost me a lot of time because I ended up writing a bunch of functions that didn't do what was expected of them by code that implements them later on, but rather what I thought they should do. I also realized I went into the assignment with a pretty fuzzy understanding of how the simulation actually worked. I understood what we were simulating and the basics about it but I didn't really see how the computer was going to implement all of this nor did I quite understand how all of the modules would work together. I got through about 4 and a half modules and learned my lesson. Things starting breaking down in a hurry. I had messed with too much and figured I would cut my losses, devote a few hours to understanding how the program is supposed to work, draw out some pictures, run through the simulation by hand on a piece of paper and ask myself 'Okay, now how would a computer do this?'. I did that and returned to the assignment, and started from scratch since I figured my newly improved understanding could write better code now and in a quicker time than it would have taken me to fix everything step by step. I think that decision paid off. I went through the first 5 modules pretty quickly and noticed a lot of places I went wrong, and in one instance found much more elegant code to implement a function I had done before.
The assignment was also getting on my nerves because it seemed so much less focused than in CSC108. In 108 we were told step by step what we had to do. This assignment kind of just gave us a rough idea and a batch of code and told us to get started. At first I thought this was a fault on behalf of the instructors until I realized this is exactly the kind of situation I'm going to face in a workplace. No one is going to have the time to write out a detailed step-by-step instruction manual for a program we are working on. Instead, I'm going to get half-written code, docstrings, comments and a rough description of what the program is supposed to do. Just like this assignment. And I'll have to take it from there. So actually I'm quite pleased with how this assignment went. I think it was a really valuable learning experience and definitely taught me that taking a few hours before coding to sit down and really understand what needs to be done is indispensable. If I had done that from the start I would have saved myself about 3-4 hours of work. Lesson learned.

No comments:

Post a Comment