Beginning with an end
The last day of September was also my last day at Orange, after 5 years and 9 months working there as a sysadmin/sysdev. Because I was "the Perl guy" other there, my last message couldn't be a standard "it's been a pleasure working with you blah blah". Obviously, I had to send a Perl obfuscation.
Unfortunately, I didn't have the time to work more than one or two hours on it, so I ended with something simple:
use 5.010;$:=v126.96.36.199;eval"use encoding $:=>STDOUT=>'$:'";$c=
(I know, it barely deserve the title "obfuscation", but I don't have BooK's or cognominal's experience in this domain. At least, it's correctly justified.)
The aim of this code is to print, in a funny way, 5 important characters. The first 4 are the Japanese characters さよなら (sayonara). The last character is ASCII 0x04, EOT (End of Transmission). I'll assume I need not explain the meaning and references.
Now, if I began writing about this code, it's to explain the mistake I did in it. Can you see it?
It's not very apparent because the code basically works. In fact, it works faster than I expected. This is the problem. On my PowerBook G4, it takes a bit more than 5 sec to execute. On a more recent computer, usually less than a second.
The reason? I stupidly used loops to simulate sleeps. This is surely lesson one when making a demo or a game: fix your timestep so the program performs consistently on different platforms. That's not something we're used to think of in sysdev, but that's the basis when making a game.