Hiding the hard work in a magic number:
(1..100).map {|i| srand(1781773465) if (i%15)==1; [i, "Fizz", "Buzz", "FizzBuzz"][rand(4)]}
Some people, when confronted with a problem think "I know, I'll make it distributed!" Now they have 2 million problems.
So I decided to take the abstraction up another notch and make the core of my interpreter be an ASCII diagram of logic gates.
HAI
CAN HAS STDIO?
PLZ OPEN FILE "LOLCATS.TXT"?
AWSUM THX
VISIBLE FILE
O NOES
INVISIBLE "ERROR!"
KTHXBYE
There's nothing like a programming challenge to make you realize just how stupid you are!
I think that the biggest mistake people make is latching onto the first idea that comes to them and trying to do that. It really comes to a thing that my folks taught me about money. Don't buy something unless you've wanted it three times. Similarly, don't throw in a feature when you first think of it. Think if there's a way to generalize it, think if it should be generalized. Sometimes you can generalize things too much. I think like the things in Scheme were generalized too much. There is a level of abstraction beyond which people don't want to go. Take a good look at what you want to do, and try to come up with the long-term lazy way, not the short-term lazy way.
The Whole World Burns is the rephrase miniblog, containing links and other miscellaneous trifles.