Proverbs in code

Journal entry
October 27, 2004

English proverbs represented as code. If you can guess what they are, I must have made them at least somewhat correct:

if (book.page != book.cover) {
  judge(book);
}
if chickens.state == "hatched" {
  return chickens.count;
}
if (bodyPart.isClass(Hand)) {
  if (bodyPart != self.feeder) {
    self.bite(bodyPart)
  }
}
while true {
};
echo("die");
def understandRecursion():
  understandRecursion()
while (self.proficiency(skill) < masterLevel) {
  self.practice(skill);
}
if count = 2 then
  result := "company"
else if count = 3
  result := "crowd";
Categories
Selling out
Did you know?
Jakob is an independent web application developer who builds awesome stuff for the web. You can hire him to build awesome stuff for you.

Comments and Trackbacks

Mohammad October 29, 2004

I don't get all of them. :-) But then again, I'm no hardcore programmer.

BlindFish October 29, 2004

There's only two I don't get. The "while true{" and the "def understandRecursion()" statements. Any hints?

Rasmus October 30, 2004

"In order to understand recursion, one must first understand recursion".

I have no clue on the "while true{" one, though.

Derek J October 31, 2004

"Old programmers never die, they just GOSUB without RETURN." ? :P

BlindFish November 2, 2004

"In order to understand recursion, one must first understand recursion" - is this an English proverb? I don't remember reading this is any great books of literature! Maybe I shoud read an O'Reilly book!

Rasmus November 3, 2004

Wikipedia says it is.

Morten Wittrock November 3, 2004

Well, without an exit criteria the recursion goes on forever and you will, as a consequence, never understand recursion :-)

Jakob S November 5, 2004

Rasmus and Blindfish: The while true one should be proverb "never say die" (which I had no clue existed until I found it on some websites).

Morten: Hah, true that.

Commenting on this entry has been closed.