Thursday, March 4, 2010

Com-poo-ter lab.

I love computer programming.

As a course, i find it extremely interesting, rather relevant, and quite intuitive. If ever something doesn't work out, it's usually my own fault for failing at the logical aspects. In other courses, i find that i just happened to skim over a certain section which happens to be on the midterm in large quantities. Over the trying months of this term, computers has been the one course that i've been able to keep up with. As long as you learn what each function does and how to use it properly, the rest of the course basically comes from your own head.

For these reasons, I don't usually stress out if i have a computer lab to do. I am usually in and out in half an hour, solving the given problem easily shy of the two hour limit we have.

Today was a different story. The question that we got was quite straight forward; you're given an equation, write a function that will repeat itself until its result acquires a certain percentage of accuracy. It sounds a lot more difficult than it is. Once you start going at it, everything kinda just falls into place.

So i started writing out my code, including all of the basic additions that the program needs to work, then adding in the more intricate details. I finally come to the end, and give a quick re-edit. Confident, i run the program.

"Result: -0"

Negative zero? What the dill? I learned in grade 9 that zero is a positive number, what could this mean? Annoyed, i look through each and every one of my functions once more. I re-evaluate every constant, re-arrange the whole equation, and stick in a test value. Everything looks fine. Cool, let's try this again.

"Result: -0.00"

I'm really really annoyed by now, it's now an hour into the lab, double the time that i usually take for this kind of question, and my result is even more effed up than before. Okay, i'm going to delete my program and start anew. Once again, begin with basic functions, input variables, don't forget the little intricacies of syntax. Finally, 15 minutes later, i finish my code once more. Time to cross my fingers and run it.

"Go screw yourself, i'm not going to work for you"

I had pretty much given up by this time when a friend of mine comes up behind me and gives a seemingly unimportant suggestion.

Friend: Did you try converting your km to m?
Justin: Are you joking? of course I... shit. T.T

Once again, my ego is now in check.

No comments:

Post a Comment