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";
I don't get all of them. :-) But then again, I'm no hardcore programmer.
There's only two I don't get. The "while true{" and the "def understandRecursion()" statements. Any hints?
"In order to understand recursion, one must first understand recursion".
I have no clue on the "while true{" one, though.
"Old programmers never die, they just GOSUB without RETURN." ? :P
"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!
Wikipedia says it is.
Well, without an exit criteria the recursion goes on forever and you will, as a consequence, never understand recursion :-)
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.