5 ms·
Ask HN: Most enjoyable source code to read?
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 / source code did you find most pleasant to read?
For example I recall someone mentioning some code written by Terry Tao and that it was very easy to understand and enjoyable to read.
- misiti3780 8y agoI like to look and Django + Sentry source code for (if you like python)
- MasterIdiot 8y agoalso flask, pretty simple and very lean.
- badrabbit 8y agoSuricata's C code probably.
- hackepeter 8y agoGolang‘s standard library code.
- navyad 8y agopython library called requests.
- pootsbook 8y agoMichel 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
- beliu 8y agoThe Caddy webserver is a very nice (and practically useful) codebase: https://sourcegraph.com/github.com/mholt/caddy@master/-/blob/caddy/caddymain/run.go#L74:6 https://sourcegraph.com/github.com/mholt/caddy@master/-/blob...
- snazz 8y agocpervica’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
- deleted 8y ago[deleted]
- cperciva 8y agoThanks! 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 8y agoI just realized I typo-ed your name and am past the editing period. Whoops!