| « Do not run this script, ever! | Status Report, Please » |
Last year, while watching coverage of the Tour de France, Stephan M noticed something a little strange. If he tilted his head by 90° and squinted just a bit, the profile maps showing the peaks and valleys of the mountain stage looked rather familiar. They were just like the monstrous routines written by his predecessor - the very same coder behind the Quadrasort.
"Following is a stripped down version of an almost 700 LoC method in Java," wrote Stephan," I removed anything except the control flow statements, so that you can grasp the full beauty of this masterpiece.
public boolean foo() {
try {
synchronized () {
if () {
} else {
}
for () {
if () {
if () {
if () {
if ()
{
if () {
for () {
}
}
}
} else {
if () {
for () {
if () {
} else {
}
if () {
} else {
if () {
}
}
if () {
if () {
if () {
for () {
}
}
}
} else {
}
}
} else {
}
}
}
}
}
if () {
}
if () {
for () {
if () {
if () {
if () {
if () {
if () {
for () {
}
}
} else {
if () {
for () {
if () {
} else {
if () {
}
}
}
if () {
if () {
if () {
for () {
}
}
}
} else {
}
}
}
} else {
if () {
for () {
if () {
} else {
if () {
}
}
}
if () {
if () {
if () {
if () {
for () {
}
}
} else {
if () {
if () {
for () {
}
}
} else {
if () {
for () {
}
}
}
}
}
} else {
}
} else {
}
}
}
}
}
}
if () {
for () {
for () {
if () {
} else {
if ()
else
}
}
if () {
try {
} catch () {
}
}
}
} else {
}
if () {
} else {
try {
if () {
for () {
if ()
else
}
}
if () {
for () {
}
}
if () {
for () {
}
}
if () {
for () {
}
}
if () {
for () {
}
}
} catch () {
}
if () {
for () {
try {
if ()
else
} catch () {
try {
} catch () {
}
}
}
}
}
try {
} catch () {
}
if () {
if () {
for () {
if () {
for () {
if () {
} else {
if ()
else
}
}
if () {
try {
} catch () {
}
}
}
}
}
}
if ()
try {
} catch () {
}
if () {
if () {
for () {
if () {
try {
} catch () {
}
}
}
}
}
if ()
return ();
}
} finally {
}
}
|
Did the writer (or should I say 'rider') win the white-and-red-dotted jersey that year?
|
|
It looks like he missed The Tour De Finesse!
|
Re: Coding Like the Tour de France
2008-01-28 09:00
•
by
Richard Pound
(unregistered)
|
|
The World Anti-Doping Agency hereby informs you that henceforth all coders will be subject to random drug tests. It is obvious that nobody could possibly have written code like this without using banned substances.
CAPTCHA-- testosterone |
Re: Coding Like the Tour de France
2008-01-28 09:10
•
by
German B.
(unregistered)
|
Perhaps a property getter. |
| « Do not run this script, ever! | Status Report, Please » |