Wednesday, 28 January 2015

The wonders of retracing your steps!

As I'm procrastinating on finishing up A1 right now, I've realized something very, very useful we haven't really touched upon in class. (Or, if we had, I was too busy nose in computer trying to fix A1 since I didn't know this, so.)

As we move on to more and more complicated assignments, we're forced to step back and look at the big picture. Suddenly, we have to think "are the parameters I'm sending to this function really correct? The function may be okay, but if the input is bad, the whole thing can appear wrong."

This is why tracing is important. I'm sure everyone has a word they use and definition they use to describe this, but in designing and test A1, I personally put in print statements at the end of every function. In doing this, I can follow the various lists, numbers, and strings being sent to and from my game state at all times. In doing that, I can follow where everything was going, and when I do spot a mistake, it takes only a few minutes to spot and fix.

Only issue?

I figured this out after 2 weeks of old school debugging.

Monday, 19 January 2015

Why Geeks Should Write:

Being well-rounded is pretty swell.


Since the dawn of man, humans have excelled at messing things up. This is not an insult, it's actually quite the opposite; To make a mistake, that would imply you would have had to do something, to create something to mess up. Given the astronomical amount of mistakes in human history, that speaks volumes to the amount of things we've achieved! We've messed millions of things up! Millions of things we built! Monument to our sins, indeed. 

It's in this dreadfully deterministic line of thinking that an individual blessed with a rather large amount of common sense came up with a novel, yet genius, way to prevent at least some of these mistakes.

Record keeping.

You see, every so often an individual comes along that prefers the company of books and his own mind rather than the outside world, and those sorts of individuals enjoy fixing problems. This is a geek. Geeks are pretty smart guys. However, geeks are still human, and are still prone to making the same mistakes as the rest of us. 

Wouldn't it be great if there existed a collection of the mistakes that others have made before? Perhaps, dare I say, with some commentary on it? On what the previous geek did wrong, and what their thoughts on the matter was? Perhaps to expedite the process of the new geek, allowing them to work further than anyone before them?


Writing, reading, and reflecting are the keys to learning better and faster, not only for the writer, but also for the one doing the reading and the one reflecting on all which has come before them. It's the key to accelerating all of us, and minimizing the gains to the gigantic pile of mistakes.

And that's why geeks should write.