Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
500 Lines or Less
JavaScript TeX Python HTML Ruby Clojure Other
Failed to load latest commit information.
_build Minimal HTML build; styles not working yet.
_includes Initializing repository for '500 Lines or Less'.
_layouts Initializing repository for '500 Lines or Less'.
blockcode address issues raised by debo in review
catechism Remove describe from Object in favor of eval-ing describes inside of …
ci Done
cluster Done.
contingent Re-render chapter, and use Arial for diagrams
crawler Mention PEP 492 native coroutines in crawler chapter.
css/bootstrap Initializing repository for '500 Lines or Less'.
dagoba copyedits
data-store Well, that was easy.
flow-shop One tiny change to make pronoun agree
functionalDB Updates based on the second review
graph-layout Add README for graph layout engine
html Add early access blurb.
image-filters adds setup.md file.
interpreter acknowledgements
minutiae Minimal HTML build; styles not working yet.
modeller HTML everything except the matrices.
objmodel PDF
ocr Adding neural_network_design.py.
pedometer Fixes to figures.
rasterizer For didactic purposes, define a base class SceneObject from which Sce…
resource Update readme with logo.
same-origin-policy Added threat model section
sample Sample formatting reference chapter.
sampler Typeset.
spreadsheet Tweaks.
static-analysis Update StaticAnalysisChapter.md
template-engine Feedback from https://twitter.com/nadrimajstor/status/638826590734970880
tex Tweaks to make rolling release easier.
torrent_client Some initial text
web-server Merge branch 'master' of github.com:aosabook/500lines
.classpath changing from node app tp clojure
.gitignore First pass.
LICENSE.md Initializing repository for '500 Lines or Less'.
Makefile Initializing repository for '500 Lines or Less'.
README.md Update readme.
_config.yml Initializing repository for '500 Lines or Less'.
build.py Tweaks to make rolling release easier.
requirements.txt Minimal HTML build; styles not working yet.

README.md

500 Lines or Less

"What I cannot create, I do not understand."

-- Richard Feynman

This is the source for the book 500 Lines or Less, the fourth in the Architecture of Open Source Applications series. As with other books in the series, all written material will be covered by the Creative Commons - Attribution license, and all code by the MIT License: please see the license description for details. In addition, all royalties from paid-for versions will all go to Amnesty International.

The production of this book has been made possible by the financial support of PagerDuty.

PagerDuty Logo

Mission

Every architect studies family homes, apartments, schools, and other common types of buildings during her training. Equally, every programmer ought to know how a compiler turns text into instructions, how a spreadsheet updates cells, and how a database efficiently persists data.

Previous books in the AOSA series have done this by describing the high-level architecture of several mature open-source projects. While the lessons learned from those stories are valuable, they are sometimes difficult to absorb for programmers who have not yet had to build anything at that scale.

"500 Lines or Less" focuses on the design decisions and tradeoffs that experienced programmers make when they are writing code:

  • Why divide the application into these particular modules with these particular interfaces?
  • Why use inheritance here and composition there?
  • How do we predict where our program might need to be extended, and how can we make that easy for other programmers?

Each chapter consists of a walkthrough of a program that solves a canonical problem in software engineering in at most 500 source lines of code. We hope that the material in this book will help readers understand the varied approaches that engineers take when solving problems in different domains, and will serve as a basis for projects that extend or modify the contributions here.

Contributors

Name Affiliation Project Online GitHub Email (if you choose)
Mike DiBernardo freelance editorial MichaelDiBernardo mikedebo@gmail.com
Amy Brown indie editorial amyrbrown amy@amyrbrown.ca
Dustin Mitchell Mozilla cluster   djmitche dustin@mozila.com
Audrey Tang g0v.tw, Socialtext, Apple spreadsheet audreyt audreyt@audreyt.org
Greg Wilson Mozilla web-server gvwilson gvwilson@third-bit.com
Taavi Burns Previously at Points, now at PagerDuty data-store taavi taavi.burns@gmail.com
Guido van Rossum Dropbox crawler gvanrossum guido@python.org
A. Jesse Jiryu Davis MongoDB crawler ajdavis jesse@emptysquare.net
Erick Dransch Upverter Modeller EkkiD erick.dransch@upverter.com
Ned Batchelder edX templating engine nedbat ned@nedbatchelder.com
Leah Hanson Google static analysis astrieanna leah.a.hanson@gmail.com
Christian Muise University of Melbourne flow-shop haz christian.muise@gmail.com
Marina Samuel Mozilla ocr emtwo msamuel@mozilla.com
Cate Huston Image Filter app catehstn catehuston@gmail.com
Yoav Rubin Microsoft In-memory functional database yoavrubin
Dessy Daskalov Nudge Rewards Pedometer dessy dessy.daskalov@gmail.com
Carl Friedrich Bolz King's College London object model cfbolz cfbolz@gmx.de
Jessica Hamrick University of California, Berkeley sampler jhamrick jhamrick@berkeley.edu
Allison Kaptur Hacker School byterun @akaptur @akaptur allison.kaptur@gmail.com
Daniel Rocco BrightLink Technology contingent @drocco007 drocco007 drocco@gmail.com
Brandon Rhodes Dropbox contingent @brandon_rhodes brandon-rhodes brandon@rhodesmill.org
Dann Toliver Bento Box dagoba dxnn aosa@mrmuster.com
Something went wrong with that request. Please try again.