The Simple Joy of Programming
I'm usually all for readable instead of "clever" code but I can't help to find this Ruby* one-liner pretty sexy:
Hash[*text.scan(/^([^:]+):(.*)$/).flatten.map(&:strip)]
This cute piece parses the given text and extract all "Key: Value" pairs into an associative array.
This is the kind of simple joy that Ruby brings. Right in the middle of the implementation of some larger feature, you figure out you need to parse some text, you just write a single line of code and it just works.
This is worth mentioning because It does not happen that often, to say the least. :)
* this code requires Rails for the &:symbol shorthand to work.

