There is something supremely satisfying about taking a terrible tangle of code and reducing it to something that is, all at once, more elegant, compact, clear, secure, robust, readable
I love whittling down an algorithm until it looks like just a fragment of code, it's one of the main reasons I like C and hate Java so much. Dynamic typing fucking rules.