…And Everything Went Click

On Sunday night I was in a fairly bad mood. I’d just spent the entire weekend thinking about my programming assignment, reading the textbook and desperately trying to figure out what to do and I still didn’t have a clue. But then on Monday, everything went click and suddenly it all made a whole lot of sense. So, last night I worked through all the hairy stuff and now all I need to do is finalize the user interface and it should all be more or less done by the time I go to bed. Isn’t life great when you know what’s going on?

Anyway the semester is drawing to a close. By this time next week I’ll have finished my first exam and things are looking pretty good at the moment. I feel more prepared for exams than I’ve ever been and I’m hoping to clean up with straight distinctions. Can’t guarantee it but it’s certainly looking like a possibility. Still no word from IBL but Peter got a message last night which he needs to chase up. Hopefully I’ll hear something this week. Otherwise I’ll start to get worried.

Inheritance Makes My Brain Hurt

The second programming assignment of the year has rolled around and this time inheritance is the name of the game. Inheritance is one of those things that’s lovely in theory but really hard to implement properly particularly when you get a 2 hr lecture and you’re then expected to write a program involving inheritance, polymorphism and singleton classes without any satisfactory explanation of what it is in the first place. In any case I’m finally starting to get my head around it and once I confer with Peter the resident programming genius at uni I’ll get stuck into it and start doing some proper coding.

In other news I reinstalled windows yesterday so now my computer is lovely and fast and ready for Office 2007 Ultimate, which I purchased for the very reasonable price of $25 for a 1 year subscription. The idea there is that if I have the same puter a year from now I’ll spend the $50 to upgrade to perpetual and if I haven’t I’m $50 better off. I know there has been some Office 2007 bashing going on recently but I have a really very slow computer and I haven’t really noticed any major problems. So, to all of you geeks with your newfandangled 1GB RAM, STOP WHINEGING!!! I’m stuck with 512MB and you don’t hear me complaining about the amount of time things take to load. Besides it’s pretty… Surely you can forgive a little bit of lag for the prettiness?!?

Exams will be rolling by in just over a week; but fortunately I seem to be getting more, rather then less confidant about the exams as they approach. Every time I do tute questions these days I realize that I know way more about the subjects than I thought I did. I guess that whilst the exams are a lot closer to the semester this year than normal due to Swinburne abolishing SWOT VAC, I am also far more prepared than I might normally be at this stage. I’ve made a huge effort to try and force myself to pay attention this semester and clearly my new rather antisocial habit of sitting right up the front of the lectures away from my friends is starting to pay off.

I still haven’t had word about IBL, but neither has anyone else so I’m not worried yet.

The joy of bug killing

I am very happy to inform everyone that I have finally killed a really particularly annoying bug that was killing my programming assignment.

It was one of those bugs that turns up and bothers you just when you’re starting to feel really pleased with yourself, and the stellar job you’ve done on the program so far. This particular bug decided to jump out at me and ruin my day just as I added the finishing touch to the assignment. The problem was the deceptively simple requirement that the program should have a nice little ‘Would you like to enter another route (Y/N)’ at the end. Yes ladies and gentlemen, all this particular part of the program had to do was ask for an input and start over if you indicated Y.

The problem lay in the fact that whilst the program ran through fine the first time it would skip the first input the second time around if you selected ‘Y’ (it exited fine if ‘N’). I was, of course, programming in C++ and I fixed the problem by replacing cin.getline(restart, 2) with cin.getline(restart, 2, ‘n’) which (correct me if I’m wrong) is strictly speaking THE SAME THING!!! Anyway, problem solved, no suddenly empty inputs, program no longer chucking a skitz and crashing. Hooray!

To those who don’t program I can’t express to you how annoying it is to get to the end of a project and then have something really stupidly simple screw you up. Its sort of like winning a marathon only to be disqualified because you forgot how to walk when it came to the receiving your accolades bit. So having proven that walking is the same as running only slower I have fixed my problem and vastly improved my mood.

More importantly I have discovered that ‘Mark Leung’s Crazy Computer Bug’ makes a surprisingly accurate reenactment of those bugs that sneak up on you when you least expect it… Only its never made me want to throw my computer out the window or cry.