A few weeks ago, I spent some time in reading O'Reilly's Beautiful Code (http://shop.oreilly.com/product/9780596510046.do). The book is essentially a collection of essays from various programmers describing what they think of as beautiful code.
I particularly liked Brian Kernighan's description and implementation of a regex matcher, and Travis Oliphant's discourse about multidimensional iterators in NumPy.
I particularly liked Brian Kernighan's description and implementation of a regex matcher, and Travis Oliphant's discourse about multidimensional iterators in NumPy.
Worth a read.