500 Lines or LessAmy Brown, Michael Dibernardo
500 Lines or Less
by Amy Brown, Michael Dibernardo · first published 2016
28mentions
15recommended by
24HN commenters
2014–2026first – last mentioned
63% recommend38% neutral
Why HN recommends it
Walks through small, complete open-source projects, such as an incremental build system and a Python interpreter in Python, with design reasoning. Suits programmers who want to learn design by reading compact real code.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








You might like the book 500 Lines or Less, Experienced Programmers solve interesting problems https://www.amazon.com/500-Lines-Less-Amy-Brown/dp/132987127...
on “Writing a C compiler in 500 lines of Python” ↗Check out 500 Lines or less https://github.com/aosabook/500lines I just can't recommend it enough. All the projects are open source, so you can review the source code and still be walked through the code by book. You'd learn why…
on “Ask HN: What code samples should programmers read?” ↗For those thinking of writing a ssg as a challenge, I recommend reading Rhodes and Rocco's _500 Lines or Less_ [1] chapter about an incremental build system. It describes the general strategy behind tup. [1] http://aosabook.org/en/500L/contingent-a-fully-dynamic-build...
on “Static Website Generators” ↗Take a look at 500 lines or less[1] and in fact the entire aosa collection[2] is worth reading. [1] http://aosabook.org/en/buy.html#fh [2] http://aosabook.org/en/index.html
on “Ask HN: Online book of accomplished software engineers writing short programs?” ↗…http://journal.stuffwithstuff.com/2013/12/08/babys-first-gar... ----- A much bigger commitment, but with correspondingly bigger benefits: I found helpful was to reimplement like 10 different things I use in maybe 500 - 1000 lines of Python. I like the new "500 lines or less" book [1] -- I was doing this 10 years ago! Once you implement some class of program, you have a very good idea of how the "real" libraries you use are implemented. That helps you build better systems…
on “How I Became a Better Programmer” ↗There are some really cool projects in the "500 Lines or Less"[0] book which is a part of the "The Architecture of Open Source Applications" series. [0]: http://aosabook.org/en/index.html
on “Ask HN: What are some books where the reader learns by building projects?” ↗Thanks, definitely a good resource Though I do think it's illumating to see the smallest, slowest code that implements the spec Similar to the "500 lines or less" book, or say a TCP/IP implementation in Python I cloned it, and it's ~3600 lines, which is very interesting. I didn't think you could implement anything that passes 95% of an sqlite test suite in that…
on “Goal: Pass all 4259065 tests in sqllogictest in 1 week” ↗The Early Preview of '500 Lines or Less' by AOSA: https://github.com/aosabook/500lines
on “Ask HN: What's the best technical eBook you have read?” ↗Stand on the shoulders of giants: "The Architecture of Open Source Applications" http://aosabook.org/en/index.html You can start by checking Volume I. There's also "500 Lines or Less" which is a part of the effort: https://github.com/aosabook/500lines Enjoy yourself :)
on “Ask HN: As a junior developer, how do I learn to better architect software?” ↗…series of books are brilliant imho: http://aosabook.org/en/index.html Titles : * The Architecture of Open Source Applications (volumes I and II) * The Performance of Open Source Applications * 500 lines or less
on “Ask HN: What language-agnostic programming books should I read?” ↗You might want to read '500 lines or less'[1]. Here you not only read the code but also see it in the context of the 'bigger picture' of the design / architecture / problem being solved. [1] https://www.aosabook.org/en/index.html
on “Become a Better Developer by Reading Source Code” ↗Same, I really like the book 500 Lines or Less for this as well: https://github.com/aosabook/500lines I’ve personally been getting in to writing minimal code because I’ve grown frustrated with how simple tasks can result in complex code that’s difficult…
on “Linux containers in a few lines of code” ↗500 Lines or Less is a great book in that genre. https://github.com/aosabook/500lines/
on “Gocker: Docker implemented in 1.3k lines of Go” ↗If you are looking for inspiration try '500 Lines or Less' [0]. It includes in-depth analysis of projects at hand and implementation. These are manageable project with a clear goal so you will complete them for sure. [0] https://aosabook.org/en/index.html https://github.com/aosabook/500lines
on “Ask HN: Projects for learning a language?” ↗Check out the book "500 Lines or Less: Experienced programmers solve interesting problems" I especially like the chapter "A Python Interpreter Written in Python": https://aosabook.org/en/500L/a-python-interpreter-written-in...
on “Introducing "Implement DNS in a Weekend"” ↗