Hacker News new | ask | show | jobs
by mattnewport 2667 days ago
Beautiful Code is a book that actually exists but I found disappointing in that the title describes a book that I'd like to see but I found most of the examples disappointing and not very beautiful. I'd love to see a book that lived up to the title better.

I'd like to see a good book on error handling. I feel this is still one of the great unsolved problems of software engineering (alongside naming) and most programming books just don't do it and say something like "obviously this is not production code but error handling would clutter up the examples too much". That to me is indicative of the problem.

I like the project based book idea. Physically Based Rendering is a rather nice example of this but I don't know of too many other similar books in other domains.

1 comments

Maybe Programming Pearls achieves what Beautiful Code did not? Or Hackers Delight?

I think it's hard for code to be beautiful when it's mostly glue (calling libraries) rather than implementing a basic task (like sorting). As such, most modern (glue) languages are less likely to evoke aesthetic wonder in the reader than might a simpler, low level language like C or Pascal.

Programming Pearls is great (I haven't read Hacker's Delight) but it's mostly "programming in the small". I think it would be interesting to see a book that took real world projects and looked at some core piece of them that is particularly elegant or clever. The core of how git manages its data structure for example, or the Quake BSP. In practice most such real code is probably too tangled up with the rest of the project to be very suitable for this approach unfortunately.