aosabook/500lines

 aosabook / 500lines

aosabook / 500lines

500 Lines or Less

500lines14690146901470014700147101471014720147201473014730147401474014750147501476014760147701477014780147801479014790148001480014810148101482014820148301483014840148402017-05-132017-05-142017-05-152017-05-162017-05-172017-05-182017-05-192017-05-202017-05-212017-05-222017-05-232017-05-242017-05-252017-05-262017-05-27500lines146888.23112389909199.565737722017-05-131469337.6279949673193.4515913432017-05-141469967.0248660355186.1146156922017-05-151471596.4217371037166.5493472882017-05-1614732125.818608172145.7612496092017-05-1714743155.21547924132.3101275812017-05-1814757184.612350308115.1905177282017-05-1914762214.009221376109.0763713522017-05-2014771243.40609244598.07090787452017-05-2114786272.80296351379.72846874592017-05-2214799302.19983458163.83168816772017-05-2314809331.59670564951.60339541532017-05-2414819360.99357671739.37510266282017-05-2514835390.39044778619.80983425892017-05-2614848419.7873188543.913053680782017-05-27star

 README

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

NameAffiliationProjectOnlineGitHub
Mike DiBernardoWaveeditorialMichaelDiBernardo
Amy Brownindieeditorialamyrbrown
Allison KapturDropboxbyterunakaptur
Audrey Tangg0v.tw, Socialtext, Applespreadsheetaudreyt
Brandon RhodesDropboxcontingentbrandon-rhodes
Carl Friedrich BolzKing's College Londonobject modelcfbolz
Cate Huston Image Filter appcatehstn
Christian MuiseUniversity of Melbourneflow-shophaz
Daniel Jackson same-origin-policy  
Daniel RoccoBrightLink Technologycontingentdrocco007
Dann ToliverBento Boxdagobadxnn
Dessy DaskalovNudge RewardsPedometerdessy
Dethe Elza blockcode dethe
Dustin MitchellMozillacluster djmitche
Erick Dransch ModellerEkkiD
Eunsuk Kang same-origin-policy  
Greg Wilson web-servergvwilson
Guido van RossumDropboxcrawlergvanrossum
A. Jesse Jiryu DavisMongoDBcrawlerajdavis
Jessica HamrickUniversity of California, Berkeleysamplerjhamrick
Leah HansonGooglestatic analysisastrieanna
Leo Zovic event-web-framework  
Malini DasTwitchcimalini
Marina SamuelMozillaocremtwo
Ned BatchelderedXtemplating enginenedbat
Santiago Perez De Rosso same-origin-policy  
Taavi BurnsPreviously at Points, now at PagerDutydata-storetaavi
Yoav RubinMicrosoftIn-memory functional databaseyoavrubin

Technical Reviewers

Amber YustAndrew GwozdziewyczAndrew Kuchling
Andrew SvetlovAndy ShenAnton Beloglazov
Ben TrofatterBorys PierovCarise Fernandez
Charles StanhopeChris AtleeChris Seaton
Cyryl Płotnicki-ChudykDan LangerDan Shapiro
David PokornyEric BouwersFrederic De Groef
Graham LeeGregory Eric SandersonJames O'Beirne
Jan de BaatJana BeckJessica McKellar
Jo Van EyckJoel CrockerJohan Thelin
Johannes FürmannJohn MorrisseyJoseph Kaptur
Josh CromptonJoshua T. CorbinKevin Huang
Maggie ZhouMarc TowlerMarcin Milewski
Marco LanciniMark ReidMatthias Bussonnier
Max MautnerMeggin KearneyMike Aquino
Natalie BlackNick PrestaNikhil Almeida
Nolan PrescottPaul MartinPiotr Banaszkiewicz
Preston HolmesPulkit SethiRail Aliiev
Ronen NarkisRose AmesSina Jahan
Stefan TuralskiWilliam Lachance