Ask HN: Beautiful Code
Architects, for example, can name their favorite structures and likely discuss them at length. Can software engineers do the same?
Provide examples your favorite pieces of code throughout history, any language.
Code can be aesthetic in many ways, I don’t intend to limit responses to any particular metric. Whatever floats your boat. Bonus points for explaining what you like about it.
4 comments
[ 3.5 ms ] story [ 37.9 ms ] threadPretty much any code or pseudocode written by Donald Knuth.
That code is beautiful because I never have to look at it or tinker with it.
(For those wondering about security, it is deployed in containers that are destroyed and rebuilt from patched images on a daily basis. It does not use any web-hosted libraries.)
Physically Based Rendering
Both books are outstanding examples of readable literate programs.