Friday, February 22, 2008

Do Programmers have a sense of humour?

Why yes they do! Is it too arcane for anyone else to be able to determine? Maybe. Here are some funny puzzles from a great post and a long list of comments. Can you guess what the idiom, song or movie is?

// idiom 3
injury += insult;
// idiom 6
a = getThickness('blood');
b = getThickness('water');
assert(a > b);
// idiom 9
prey = 'worm';
time = getCurrentTime();
if (time >= 4 && time <= 8) {
bird.catch(prey);
}

// idiom 19
return way.my || way.high;

// idiom from comments

if (!fire) {
smoke = null;
}

// song 1
sleep = false;
gogo();

// song 3;
var tiger[i];

// song 5
var it = now || never;

// song 10
compare(null, u);

// song 14
person.name = 'jude';
person.greet();

// song 16
var s1 = 'tutti';
var s2 = s1.replace('tu', 'fru');
print(s1 + ' ' + s2);

// song 20
var country = new Array('UK', 'Italy', 'USA', 'Spain');
giveBirth(country[2]);

// movie 1
while (i < infinity) {
tomorrow = dies;
i++;
}

// movie 2
int numerator = 1;
int denominator = 0;
int mission = numerator / denominator;

2 comments:

Anonymous said...

Great puzzlers Ross.

I did try to comment on your blog in the past here, but I had to login. I think that was before I got a gmail account. Maybe that's why your external numbers don't match your blogsite. I think your stuff rocks!!!! (Will that help?)

Anonymous said...

Thanks Barbara. There is an option to leave an anonymous comment. I have had to delete a few spam comments even.