
Ask HN: Most enjoyable source code to read? - uptownfunk
I don’t mean the ones with jokes or puns in the comments, I mean from a code readability and overall code elegance standpoint.. which repos &#x2F; source code did you find most pleasant to read?<p>For example I recall someone mentioning some code written by Terry Tao and that it was very easy to understand and enjoyable to read.
======
beliu
The Caddy webserver is a very nice (and practically useful) codebase:
[https://sourcegraph.com/github.com/mholt/caddy@master/-/blob...](https://sourcegraph.com/github.com/mholt/caddy@master/-/blob/caddy/caddymain/run.go#L74:6)

------
pootsbook
Michel Marten’s code is some of the beautiful code I have ever had the
pleasure of reading. His “less code” philosophy is almost an art form—even
down to the naming of his libraries. They are all small, focused libraries
dedicated to solving one particular problem. The best bit is that they are all
tiny, sporting less than 500 SLOC. Browse his GitHub profile to get a taste.
[1]

He is probably best known for his Ruby libraries Ohm and Cuba, but I enjoy
using Syro and Mote.

[1] [https://github.com/soveran](https://github.com/soveran)

------
snazz
cpervica’s Tarsnap source code[0] is considered[1] to be worth reading as a
good example of how to structure, document, and organize portable C.

[0]: [https://github.com/Tarsnap/tarsnap](https://github.com/Tarsnap/tarsnap)

[1]:
[https://news.ycombinator.com/item?id=7602457](https://news.ycombinator.com/item?id=7602457)

~~~
cperciva
Thanks! I'd recommend the spiped source code
([https://github.com/Tarsnap/spiped](https://github.com/Tarsnap/spiped))
rather than the Tarsnap code though -- tarsnap is built around libarchive,
which (while it's still great code) is not organized the same way as the code
I personally write.

~~~
snazz
I just realized I typo-ed your name and am past the editing period. Whoops!

------
misiti3780
I like to look and Django + Sentry source code for (if you like python)

~~~
MasterIdiot
also flask, pretty simple and very lean.

------
hackepeter
Golang‘s standard library code.

------
badrabbit
Suricata's C code probably.

------
navyad
python library called requests.

