Friday, March 9, 2007
I caved in, despite my instincts, and coded an implementation of FizzBuzz.
It's kind of sarcastic. Here's the code as a text file.
I hate to admit it, but coding this was kind of fun. I got the idea from a comment I made. I was kidding in the comment, but then I thought, it'd be so easy, why not.
It's kind of intended as a joke, the implementation being worthy of the problem in an ironic sense. I think it'd probably be entertaining to have a contest to cook up the least advisable, most foolish, most overblown, most heinously wrong implementation of FizzBuzz possible. This would be a good entry, although not necessarily a winning entry. Altering Fixnum can mess with your maintainability in scary ways, but it could probably be even worse if it were done in Java by executing Unix processes and capturing the output. Especially if the Unix processes used python -e as a calculator, and used Python's explicit relative pathname on a particular box.