Algorithm Song

From Mathsreach

Jump to: navigation, search

Still too slow for me: Danzer Braganza won the NZIMA Programme in Algorithmics competition to produce a song about algorithms.

Still too slow for me

(To the tune of It’s Still Rock and Roll to Me, by Billy Joel)

Lyrics © Danver Braganza,  2009

What’s the matter with the sort I’m using?
Can’t you tell that it takes too long?
Maybe Bubble Sort’s the wrong way to go
Wanna finish by the end of this song...
Maybe I should not be trying to sort it in place?
Would it be better if it ran in ex-pon-en-ti-al space?!
All right, rewrite, one more try to get it right. It still runs too slow for me!

What’s the matter with the code I’m writing?
Can’t you tell that it’s out of style?
Do you think that I should write in Java?
Only if you really like to compile!
Scripting languages are winning these days, newbie
Perhaps you should be programming in python, perl or ruby?
Boo hiss! Cache miss! Excuse me while I page to disk, it still runs too slow for me!

Oooh, You oughta read the stuff they say in the textbook.
You just gotta optimise, Dividing and Conquering, but you fail at recurring.
So your stack goes off and silently cries I’m sorry for your code’s demise...

How about I port the code to C and
See if that makes it fast enough.
What the hell, now I’ve corrupted the heap, man, writing C is way too tough!
Don’t waste your time, just use the language you like.
You’re likely to do better if your algorithm is right!
New thought: Merge Sort, written just as it ought,
It still runs too slow for me.

Maybe I should go and talk to the smart kids,
Look at what they are handing in.
I’ve no clue what they are talking about,
And besides, plagiarism’s a sin. Now there’s a message from the lecturer on Cecil*
It turns out that the time requirements were too excessive, New run, what fun!
Looks like the assignment’s** done -
It’s now fast enough for me!

* Cecil - the University of Auckland course information system.
** Automatically-marked programming assignments for algorithms classes.

Mark Wilson presents the prize of $200 in book vouchers to Danver.

The well-known parody of Billy Joel’s For the Longest Time had reached 20 years old (, and programme directors were sure New Zealand could produce lyrics just as good. Entry was open in late 2008 to anyone resident in New Zealand and advertised on the programme website (, to the New Zealand Algorithmics Google Group and to students.