Tag Archives: programming

Priority

I’m a fifth year computing student.

No, wait.

I’m five years into my three-year degree.

Still wrong.

My degree usually takes three years, but this is my fifth.

You don’t really realise how bad it sounds until you say out it loud. Say it out loud to a friend you haven’t seen in a few years, and you might as well wish for the earth to swallow you up right there and then.

I guess whichever way I put it, there’s no getting around the fact that saying that “I’m a fifth-year computing student that isn’t doing honours” is awkward as all hell. And really, as awkward as it might be, it’s fair enough — it is a pretty awkward situation to be in, if I’m honest.

If you’ve bought stuff online from the US before, you might have had the option of shipping your goods via USPS. The United States Postal Service is kind of weird in that their basic service is called “first class”, and a faster service is called priority1. On the surface, this makes very little sense: if you want something shipped fast and have the choice between “first class” and “priority”, which one do you choose? You might lean towards first class, as that usually represents the best out of all the possible choices (it certainly does in terms of airline tickets, anyway), but then you realise that priority is more expensive. This is totally weird the first time you come across it, and if you’re not careful, can lead to a package arriving later than you expected. Depending on how impatient you are, this may be the worst thing in the world, or you might not care.

For the longest time, I’ve put “student” as my occupation in forms and surveys. But it was only the other day that I realised what this actually meant: for me, it means the only priority in my life should be to finish my degree and graduate. Not to be proficient at Mass Effect 3 multiplayer on the platinum difficultly level. Not to capture the flag in Battlefield 3’s End Game. Not to operate like an operator in ARMA 2’s Wasteland. Because when it comes down to it, I should have no other priority than to graduate this semester. Actually, I could have graduated last semester too, but I got lazy.

Now that I think about it, I get lazy a lot.

It just gets to a certain point in the semester where there’s just too much work to do and too little time to do it in, so I just… don’t do any of it. And as stupid as that sounds, I usually write it off with excuses like “it’s just a Benny thing” or “I couldn’t have passed that unit internally anyway” and skive off the exam.

I’ve long considered the possibility that I have an issue with how University-level assessment works, in that it encourages cramming and rote-learning (memorising stuff, then forgetting it over the summer break), and to a certain extent, that’s true. I don’t like how it works. Java? I did that in first year, and I’ll be damned if I can remember even a fraction of it.

I’ve also considered the fact that, for the most part, I just don’t get programming. Everyone tells the joke about “to understand recursion, you must first understand recursion”, but recursion still makes very little sense. Looking at my code these days, it’s just really basic-level stuff; methods/functions that might do complex things, but it still consists of basic if-else statements at the core. There’s heaps of technical stuff I still don’t understand, either. I would have thought that computing students would be able to regex their way out of any given problem. I would have thought that computing students would be able to code fluently in several different programming languages, instead of constantly having to refer to documentation to figure out what any given function does. Maybe I need to re-adjust my view on programming as a whole (as in, how it “works”), but I would have thought that by now, programming would be easier than it is2.

All this makes me wonder: at the end of my degree, what will I have actually learned? I mean, anyone can copy and paste code from Stack Overflow. It might take a few more skills to work out what any given code does or why it doesn’t work, but what are those skills worth? A few years of your life? Tens of thousands of dollars in HECS fees?

Education or no, what you get out of it will depend on what your expectations are going in. I’ve wondered what life without a degree might be like — I see successful people all the time doing things that are completely unrelated to the degree they attained in university — and as much as I might have wanted to quit and drop out, they’ve all said it’s a good thing to get under my belt.

So I guess there’s nothing else to do but grin and bear it. As much as it sucks now, it probably won’t suck as much after, right?

Right?


  1. USPS also has an actual express service available, too. In order of fastest to slowest: express, priority, and first class. Go figure. 
  2. Maybe I needed to lower my expectations of what a computing degree would do for me, as if I would magically become some gung-ho programmer overnight. Tangentially related: maybe we expect too much of geeks

Bookmarks Clearout, Part I

Few of my bookmarks I had long since forgotten about (warning: most of these are pretty old). I’ll assume these were for blogging, so here you are, in no particular order:

Here ends the bookmarks.

The Programming Antihero

I was fresh out of college, still wet behind the ears, and about to enter the beta phase of my first professional game project — a late-90s PC title. It had been an exciting rollercoaster ride, as projects often are. All the content was in and the game was looking good. There was one problem though: We were way over our memory budget.

Since most memory was taken up by models and textures, we worked with the artists to reduce the memory footprint of the game as much as possible. We scaled down images, decimated models, and compressed textures. Sometimes we did this with the support of the artists, and sometimes over their dead bodies.

We cut megabyte after megabyte, and after a few days of frantic activity, we reached a point where we felt there was nothing else we could do. Unless we cut some major content, there was no way we could free up any more memory. Exhausted, we evaluated our current memory usage. We were still 1.5 MB over the memory limit!

At this point one of the most experienced programmers in the team, one who had survived many years of development in the “good old days,” decided to take matters into his own hands. He called me into his office, and we set out upon what I imagined would be another exhausting session of freeing up memory.

via Gamasutra – Features – Dirty Coding Tricks.

You’ll have to scroll to the bottom of the article to read The Programming Antihero, but it’s totally worth it (as are all the other reads)!

Just. Plain. Awesome.

I sure as hell don’t think I’ll ever be in such a situation, but if I am – far out, that’d be an awesome way to do it.

Like whichever person I follow on Twitter who posted this, I could read these sorts of things forever.

The ‘X Character Finder’ Crapfest

So, Java, huh?

It’s not so bad, actually.

As a first language, Java is okay – especially when it is taught right (inside joke there).

Anyway, hot on the heels (somewhat cold, actually), of the Windows Shutdown Crapfest, comes the X Character Finder crapfest, courtesy of yours truly.

First, a little background to this – at Uni I’m doing a subject called programming and problem solving. It involves Java.

Our first assignment was to calculate some variable. Or something. Anyway – one of the things we had to do was find out if the user’s name had the ‘x’ character in it – in either upper or lower case.

This is what I managed to come up with – I’ve commented the code so you understand what it does. I’ve also used Pastie to embed the code, because this is the one time WordPress has failed me. Right, everything seems to be failing hard on me tonight, so I’ve just linked the Pastie… 🙁

If you don’t really get what’s going on, I wouldn’t worry. Here’s the english explanation: Get a username. Count the letters in that username. Look at the first character – if it’s an X or an x, then we have an x in the username. If it’s not an X or an x, then we look at the next character in the username, and perform the same “Is it an X or and x check” again. We keep doing this until we either find an X, or we’ve run out of characters in the username. If you just want to know why this is the X Character Finder crapfest, well, it’s just because I’m re-inventing the wheel here, man – there’s a heaps easier way to find if a particular word/string has a particular character in it, and that’s via use of methods.

The real code that I submitted looks like this. Thanks again to Pastie. 🙂

See? Much easier.

This was the X Character Finder Crapfest, brought to you by Benny Ling.

Comments below.

#349916 – Pastie

Zune Source Code FAIL

via #349916 – Pastie.

The offending function from the source code of Zune’s that caused the huge, epic Zune failure.

For those of you that don’t know how it managed to fail (myself included), see this Digg explanation for more:

Ouch.

For anyone who is wondering or just doesn’t want to figure it out, Dec. 31 qualified as being greater than day 365 (obviously, because it was day 366) but it got caught where the program says to look at (days > 365). The problem is that there was no code for what to do if the day *equals* 366, only if days is *greater* than 366. So, there was no way to break out of the (days > 365) loop until today (day 367) when the program would reset days to 1, thereby breaking the loop.

Whoops. It’s amazing what one bad “if” statement can do.

Heh. Amateur mistake, I know…