Hacker News new | past | comments | ask | show | jobs | submit login

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.

Worth a read.




One of the first tech talks I remember was Bryan Cantrill at Google, and I vaguely remembered that he mentioned at the beginning of that talk that he had contributed to a book called Beautiful Code, so I double-checked and it seems to be the same book.

Looking back up the talk, it points to his review of the book here: http://dtrace.org/blogs/bmc/2007/07/28/on-the-beauty-in-beau...

> More specifically: read [two specific chapters with very different attitudes on what makes code beautiful]. It seems unlikely to me that one person will come away saying that both are beautiful to them. (And I’m not talking new-agey “beautiful to someone” kind of beautiful — I’m talking the ”I want to write code like that” kind of beautiful.) This is not meant to be a value judgement on either of these chapters — just the observation that their definitions of beauty are (in my opinion, anyway) so wildly divergent as to be nearly mutually exclusive. And that’s why the title is perfect: both of these chapters are beautiful to their authors, and we can come away saying ”Hey, if it’s beautiful to you, then great.”




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: