
Ask HN: What are some books where the reader learns by building one project? - kyoob
I&#x27;m about halfway through &#x27;Build You Own Lisp&#x27; and I&#x27;m really enjoying it. Each chapter builds on the last by adding something new to the same project (and thereby explaining some new concept). I find that the books I&#x27;m least likely to bail on are the ones that lead me through the building of one big project like this. What are some of the best titles in this little subgenre?
======
rickr
Michael Hartl's Rails tutorial
([https://www.railstutorial.org/](https://www.railstutorial.org/)) is a great
example of this.

It'll run you through building a twitter clone and introduce you to git,
heroku, a bit of CSS/HTML, and even goes into AJAX a bit.

I can't recommend it enough to people looking to get into rails.

~~~
sngz
is there something similar to this but for python based frameworks, or
javascript based? Seems like every great tutorial / books that I find are
using ruby

~~~
mod
Django has good tutorials, I don't know about building "one app" though. I'm
sure you can find some of lesser quality; Hartl's tutorial is one of the very
best.

If you don't mind drawing out your learning process, you could walk through
Hartl's tutorial and do the equivalent in Python (probably with much help from
google). So you couldn't use his code examples, but you could set up the same
DB structure, the same types of tests, etc, and hit all the important parts of
the web dev process.

Edit: found this in another comment below. Just thought I'd include it in case
you gloss over it! [https://blog.miguelgrinberg.com/post/the-flask-mega-
tutorial...](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-
part-i-hello-world)

------
zeptomu
TECS: "The Elements Of Computing Systems"
[https://mitpress.mit.edu/books/elements-computing-
systems](https://mitpress.mit.edu/books/elements-computing-systems)

In this book you build a (virtualized) computer. It is one of the best books I
ever read.

~~~
fauria
+1, along with the author's course "Build a Modern Computer from First
Principles: From Nand to Tetris" [https://www.coursera.org/learn/build-a-
computer](https://www.coursera.org/learn/build-a-computer)

------
munificent
What a delightful coincidence! I just posted the next chapter on my in-
progress book "Crafting Interpreters" which walks you through implementing an
interpreter (well, two actually) from scratch, a chapter at a time:

[http://www.craftinginterpreters.com/](http://www.craftinginterpreters.com/)

I really liked "Build Your Own Lisp" too. Fun book. :)

~~~
hunt
I can really recommend this book, I've worked through it and am implementing
the interpreter in Rust. I've just finished the latest chapter and am looking
forward to the future instalments.

Edit: here is the (WIP) intepreter:
[https://github.com/HarveyHunt/loxr](https://github.com/HarveyHunt/loxr)

~~~
msangi
I'm going through the book implementing the project in Rust too.

I'm trying to learn Rust with this project. It's still far from idiomatic but
I plan to keep implementing following the book and then refactor later.

[https://github.com/mariosangiorgio/rulox](https://github.com/mariosangiorgio/rulox)

~~~
munificent
Cool, added yours to the README too. :)

------
superquest
Miguel Grinberg's "Flask Web Development" [1] is an excellent introduction
Python-based web development. You build a Twitter-clone. The book is an
adaptation of the authors 18-part tutorial on the same topic [2].

[1]
[http://shop.oreilly.com/product/0636920031116.do](http://shop.oreilly.com/product/0636920031116.do)

[2] [https://blog.miguelgrinberg.com/post/the-flask-mega-
tutorial...](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-
part-i-hello-world)

~~~
zeptomu
Remark that the article is rather old (although revisited 2014, however that's
still an eternity in webdev world). Although I like flask (it was my first
library to do "web stuff") I miss especially the fact that authentication is
_not_ part of the core lib, but only available via third-party extensions.

That may not be a problem for an experienced dev, but for a starter in web-dev
I highly appreciate a library or framework that has built-in authentication
because you do not want to fuck that up. Granted - you can also fuck it up
with e.g. Django, but it is way harder.

~~~
superquest
This all depends what your goal is.

If your goal is to _understand web development_ then I would say that a micro-
framework like Flask is better because you actually have to assemble all the
pieces yourself. Moreover, if you're curious about how a given feature is
implemented, extension source code is often very accessible. For example, all
the business logic in Flask-Login is confined to one ~450 line Python file
[1]. Not bad!

But one the other hand, if you're trying to create a production-ready service,
then Django/Rails probably have fewer risks since they require fewer
decisions.

Lastly, the book had a very thorough treatment of authentication. I agree that
this is a huge pitfall, and I think Miguel introduced and explained the
problem extremely well.

[1] [https://github.com/maxcountryman/flask-
login/blob/master/fla...](https://github.com/maxcountryman/flask-
login/blob/master/flask_login/login_manager.py)

------
skykooler
Linux From Scratch:
[http://www.linuxfromscratch.org/lfs/](http://www.linuxfromscratch.org/lfs/)

Goes through building a Linux system from the ground up, and gives a pretty
thorough overview of why everything is working the way that it is.

~~~
captainlego
Any idea about how long this would take from start to finish for someone who
has a bit of experience using Linux and higher-level programming languages?

~~~
elorm
If you're just doing basic LFS packages and don't come up on any hitches, You
should be done in 24 - 48 hours

------
yannickt
"Physically Based Rendering" walks you through the theory behind, and the
implementation of, a photo-realistic rendering system (not real-time).

An extremely thorough guide to ray tracing.

[https://www.amazon.com/Physically-Based-Rendering-Third-
Impl...](https://www.amazon.com/Physically-Based-Rendering-Third-
Implementation/dp/0128006455/ref=la_B0034NX0WA_1_1?s=books&ie=UTF8&qid=1487268089&sr=1-1)

~~~
herbstein
I don't like that this book is posted. Sure, it shows you an actual renderer.
But it doesn't show you how to incrementally build said renderer. That is
probably what a lot of people are looking for. Peter Shirley has written three
short books about raytracing that I would recommend as an alternative.

~~~
snowcrshd
Could you provide links to Shirley's books, please? I'm interested in learning
about CG.

~~~
farresito
Here's the books he has written:
[https://www.cs.utah.edu/~shirley/books/index.html](https://www.cs.utah.edu/~shirley/books/index.html)

~~~
corysama
I think these are the short books herbstein was referring to:
[http://in1weekend.blogspot.com/](http://in1weekend.blogspot.com/)

~~~
farresito
Oh, you are right, thank you. Makes sense. The books I checked from him had
around 800 pages, which is anything but short :)

------
shrikrishna
Orchestrating Docker.

I don't know if it's one of the best, but it teaches Docker concepts with a
single project, and as you progress through chapters, you will find different
ways you can deploy applications using Docker containers.

[https://www.packtpub.com/virtualization-and-
cloud/orchestrat...](https://www.packtpub.com/virtualization-and-
cloud/orchestrating-docker)

~~~
hackerboos
I know India's a big place but it's a bit of a coincidence that you and the
author are from the same city ;)

~~~
shrikrishna
Oh! I'm sorry. I forgot to add the disclaimer, and can't edit the parent
comment anymore. I'm the author.

------
dzuc
[http://www.nand2tetris.org/](http://www.nand2tetris.org/)

~~~
yoodenvranx
On a similar topic but a bit less project oriented:

Charles Petzolds "CODE The Hidden Language of Computer Hardware and Software"

[http://www.charlespetzold.com/code/](http://www.charlespetzold.com/code/)

~~~
itsmemattchung
100% yes.

I started with Elements of Computing: creating a half-adder and then a full-
adder chip. But, I couldn't understand how I reached my solution—I was relying
on my intuition. Then, I started reading "Code", which takes the reader on a
journey from shining flash lights to communicate with your neighbor, all the
way to bridging the gap between boolean algebra and building a relay.

------
iainmerrick
Aaron Reed has a terrific book, "Creating Interactive Fiction with Inform 7"
([http://inform7.textories.com](http://inform7.textories.com)) that walks you
through building a complete (and fairly sophisticated) text adventure.

Inform 7 is very much a niche programming language, but it's really
interesting and unusual, well worth investigating if you want to broaden your
horizons. Vaguely Prolog-like, but written in natural language.

~~~
throwaway7645
I've played many games created with Inform7. All beautiful works of art. Emily
short has a few on her site. Just download something like Gargoyle to play the
image.

------
r_singh
Eloquent Javascript -
[http://eloquentjavascript.net/](http://eloquentjavascript.net/)

You build 5 projects through the book - a programming language, paint program,
a dom game and a skill sharing website using node js.

~~~
gingerbread-man
For anyone who hasn't read this book, it's great, but very much an intro-to-
programming book, at least for the first 6-or-so chapters.

------
nkassis
Not a book but Casey Muratori's Handmade Hero series is really interesting.
It's a from scratch tutorial on building game in C on windows but delves into
many interesting programming topic that would be useful outside game
development.

[https://handmadehero.org/](https://handmadehero.org/)

------
jetti
Programming Phoenix Productive |> Reliable |> Fast. It goes through building a
website that starts from the beginning and goes up to Phoenix Channels
(websockets) for a real-time video streaming application that lets users
comment on the video at specific times and it is broadcasted to all other
users.

~~~
shostack
How advanced is this? I'm a beginner Rubyist with some Rails experience and
have been interested in trying Phoenix out but I'm not an experienced web dev
by any means so the web socket stuff is a bit intimidating.

Does it walk through the basics will enough? Or will I have built something
with no idea how it actually works?

~~~
RobertKerans
Not that advanced. It does walk you through the basics; you should be able to
work through it and understand what you've built and how it works (it
emphasises and explains the lack of magic). + You should be able to build
something pretty easily without ever having touched Elixir before; the book
builds up your knowledge very steadily.

I would say maybe, from a language/syntax point of view pair it with
"Programming Elixir", which is a good introduction to the language, again
going through the concepts of it and building them up well - the Phoenix book
goes pretty quickly over the language constructs, just giving you them when
needed to understand how Phoenix is doing stuff.

------
jdc0589
so, this isn't exactly what you are after; but, I've always had a bunch of
little exercises and projects that I just kind of go through in a new
language/platform as a learning exercise.

Examples:

1\. given a large file, or set of files, write a program/routine to count the
number of times an arbitrary sequence of characters appears. No regular
expressions or other pattern matching helpers from a library/sdk, you have to
do it all yourself. This one is pretty small, but there's lots of opportunity
for optimization.

2\. build a link shortener service with some analytics/tracking.

3\. write a simple tokenizer for whatever syntax/language you feel like. JSON
is a super easy one.

4\. write a little website crawler. multithread it. implement rate limiting
(something more advanced than random sleeps; e.g. token bucket, etc...).

5\. make a couple easy data structures yourself. If the language/platform you
are working in has the same structure in an SDK (or there's a good open source
one), write yours to the same interface and then run it through their test
suite. e.g. linked lists, queues, etc...

------
DrPhish
If you are interested in assembly language concepts and don't mind something
slightly archaic, I thoroughly enjoyed this book:
[https://www.amazon.com/Peter-Nortons-Assembly-Language-
Book/...](https://www.amazon.com/Peter-Nortons-Assembly-Language-
Book/dp/0136619010)

It goes through lessons that build up to a pretty good interactive disk editor
(DSKPATCH) written entirely in x86 assembly.

Its the book that got 12 year old me out of the BASIC ghetto.

~~~
wittedhaddock
What are you working on today? Are you still using assembly?

~~~
flanbiscuit
Personally I'm interested in Assembly because I want to build NES and Atari
games. I think there are some C libraries people have created recently to help
with that but those systems were pure 6502 Assembly and I definitely want to
learn that.

------
plinkplonk
A Retargetable C Compiler: Design and Implementation

[https://www.amazon.com/Retargetable-Compiler-Design-
Implemen...](https://www.amazon.com/Retargetable-Compiler-Design-
Implementation/dp/0805316701)

A most excellent grimoire.

~~~
useanalias
Misread this as "A Regretable C Compiler" \-- likely what would happen to me
without a text like this!

------
thewhitetulip
[https://github.com/thewhitetulip/web-dev-golang-anti-
textboo...](https://github.com/thewhitetulip/web-dev-golang-anti-textbook)

You can learn how to build a todo list manager in Go.

This book is about building a webapp from scratch without using a framework.

~~~
JBReefer
Using a UI or ncurses?

~~~
kej
The book is about building web apps with just Go and no frameworks on top of
it.

------
chromaton
The Build Your Own Metal Working Shop from Scrap series by David J. Gingery.

~~~
HeyLaughingBoy
The series is certainly worth reading for the learning, but actually doing it?
Don't bother. The books were written when hobby-level machine tools were very
expensive. In these days of cheap Asian imports, it's not worth building your
own from DIY castings unless you're doing it for fun.

I will say that the first book (metal casting) _is_ very useful, because you
can learn to make aluminum castings easily and then machine them on your cheap
import/worn out old American Iron.

~~~
mod
Would anyone do it but for the fun? I thought that was the whole point.

It's on my todo list. Never enough time, but I've got a little forge already,
at least!

~~~
HeyLaughingBoy
No, when the series was written the point was the tools, not the process. Back
then a hobbyist metal lathe or shaper was pretty expensive, and this was a low
cost way to get one.

These days, not so much.

------
toss1941
I remember seeing a C++ (Borland) book that was entirely about building a
flight simulator. Google is betraying my attempts to find it though, and i'm
not sure who the actual publisher was. That was during the 90's when I was 14
or something so it was a bit above my head, but I remember almost buying it
anyway.

Edit: It may have been this: [https://www.amazon.com/Build-Your-Own-Flight-
Sim/dp/15716902...](https://www.amazon.com/Build-Your-Own-Flight-
Sim/dp/1571690220)

~~~
sigstoat
Flights of Fantasy

[https://www.amazon.com/Flights-Fantasy-Programming-Video-
Gam...](https://www.amazon.com/Flights-Fantasy-Programming-Video-
Games/dp/1878739182/)

------
PaulKeeble
The classical Design Patterns book has a first chapter which takes you through
the design of a text editor using the patterns provided in the book. If what
you do is read the chapter and then the patterns referenced as you go and
build the text editor based on their design you get exactly the sort of thing
you are looking for. Its a different way of doing it than the entire book but
arguably just in a different format for what is otherwise a reference book.

[https://www.amazon.com/Design-Patterns-Elements-Reusable-
Obj...](https://www.amazon.com/Design-Patterns-Elements-Reusable-Object-
Oriented/dp/0201633612/ref=mt_hardcover?_encoding=UTF8&me=)

------
e19293001
> Each chapter builds on the last by adding something new to the same project

I bet this is what you are looking for:

[https://www.amazon.com/Compiler-Construction-Using-Java-
Java...](https://www.amazon.com/Compiler-Construction-Using-Java-
JavaCC/dp/0470949597)

This book taught me how to write a compiler.

Here is its description from its website:

* Comprehensive treatment of compiler construction.

* JavaCC and Yacc coverage optional.

* Entire book is Java oriented.

* Powerful software package available to students that tests and evaluates their compilers.

* Fully defines many projects so students can learn how to put the theory into practice.

* Includes supplements on theory so that the book can be used in a course that combines compiler construction with formal languages, automata theory, and computability theory.

If you already know C or C++ or Java then this book is for you. In my opinion,
you can learn many computer science concepts and be able to apply to your
field. The book will teach you how to write a grammar then write a parser from
it then eventually be able to improve it as you go on reading and doing the
exercises. It was a great moment when I feel comfortable writing recursive
functions since grammars are composed of recursive functions. You'll also
learn a nice way on how you can get your compiler to generate assembly code.
Another feature of the book is the chapter on Finite Automata wherein you'll
learn how to convert between regular expressions, regular grammars and finite
automata and eventually write your own 'grep' which was for me is a mind-
blowing experience. There are lots of other stuffs in this book that you could
learn. Thank you Anthony J. Dos Reis for writing great books for people like
me.

------
saeranv
This is a slightly different response from others, but I think fits the intent
of the question: The Better Explained Guide to Calculus:
[https://betterexplained.com/calculus/](https://betterexplained.com/calculus/)

Kalid basically iterates the series around the concept of deriving the formula
for the area/perimeter of a circle, and then builds up to deriving the surface
area/volume of a sphere. The focus throughout is the building up of an
intuition of calculus before leaping into formulas. Even with uni-level
calculus, I did strengthen my intuition of what's going on by reading through
his book.

It's pretty fun, and I actually spent some time visualizing the calculus of
geometric solids afterward i.e [http://www.trinco.io/blog/derivative-
of-x3](http://www.trinco.io/blog/derivative-of-x3)

------
jimmies
Hacking the Xbox by Andrew 'bunnie' Huang.
([http://hackingthexbox.com/](http://hackingthexbox.com/)) The book is free
and can be downloaded online.

It goes from adding the LED to the XBox to tapping the security mechanism.
Plus, the original Xbox is cheap nowadays too, so you won't have to shell out
a lot of money doing it. Local craigslist should have plenty of them.

------
justanotheratom
F# Applied

[http://products.tamizhvendan.in/fsharp-
applied/](http://products.tamizhvendan.in/fsharp-applied/)

~~~
justanotheratom
Forgot to mention:

First chapter of the book takes you through creating your own "Suave"
functional web development library, which was a lot of fun and eye opening.

------
corysama
Ray Tracing in One Weekend

Ray Tracing: The Next Week

Ray Tracing: The Rest of Your Life

[http://in1weekend.blogspot.com/](http://in1weekend.blogspot.com/)

------
detaro
_Physically Based Rendering – From Theory to Implementation_ doesn't
necessarily have the reader build a project, but it explains its reference
implementation very well, and you could go ahead and write your own in
parallel based on it. [http://www.pbrt.org/](http://www.pbrt.org/)

------
crasm
I haven't bought or started this yet, but this book on interpreters is on my
todo list: [https://interpreterbook.com/](https://interpreterbook.com/)

~~~
TinyBig
This is an excellent book. It's a great follow-on to the book mentioned by OP,
"Build Your Own Lisp".

------
dbcurtis
Make: Analog Synthesizers

Build an old-school analog music synth. Very DIY friendly, and great for
electronics n00bs. The book is build around a project call the Noise Toaster,
but you learn all the analog synth basics along the way. Fun stuff. Old
school, and it isn't a wall-sized rack of Moog modules, but hey, good humor.

------
larc
Test Driven Development with Python
([http://www.obeythetestinggoat.com/](http://www.obeythetestinggoat.com/))
teaches you to use Django and TDD practices to create a basic list web app.

~~~
Slaul
I worked my way through this book about a year ago. I really enjoyed it!

------
Hernanpm
Build Your Own AngularJS [https://teropa.info/build-your-own-
angular/](https://teropa.info/build-your-own-angular/)

~~~
bdcravens
I think it might be a few years old, but [http://rebuilding-
rails.com/](http://rebuilding-rails.com/) does the same thing for Rails.

------
joncalhoun
Web Development with Go (see
[https://www.usegolang.com](https://www.usegolang.com)) is based on starting
with pretty minimal Go and web development experience and walking you through
the process of building a complete web application.

I find this approach works well because you don't have to ask "why did he make
that design decision" but instead I intentionally make common mistakes a
beginner would make, wait until they become an issue, and then I demonstrate
how we can fix that issue. As a result you really get to understand not only
how to create a web app in Go but also why developers tend to follow different
design patterns.

I said this in another comment, but it is based on Michael Hartl's Rails
Tutorial. I think showing someone how to go from nothing to a full app is a
great way to help them get into web development without the frustration that
comes from piecing together blog posts/docs/trial&error.

If you are interested in Go I'd love to get your feedback :) and if it isn't
obvious, I am the author of the book.

------
lugus35
Practical Common Lisp
[http://www.gigamonkeys.com/book/](http://www.gigamonkeys.com/book/)

Filter spam, Parse binary files, catalog MP3s, stream MP3s over a network, and
provide a Web interface for the MP3 catalog and server.

------
yati
"Let's Build a Compiler"[1] by Jack Crenshaw is fantastic. It uses Pascal as
the implementation language, but I used Rust, and while the book targets 68000
assembly, I compiled things to x86_64 assembly.

[1]:
[http://compilers.iecc.com/crenshaw/](http://compilers.iecc.com/crenshaw/)

------
dyukqu
For HTML & CSS: [http://learn.shayhowe.com/html-
css/](http://learn.shayhowe.com/html-css/) [0] This is the project you build
as you learn: [http://learn.shayhowe.com/practice/organizing-data-with-
tabl...](http://learn.shayhowe.com/practice/organizing-data-with-
tables/index.html)

[0] There's an e-book version too. Scroll the page down just a little bit.

~~~
kierkegaard7
Thank you!

Do you have more recommendations on the front-end part?

~~~
dyukqu
I guess I have: [https://www.freecodecamp.com/](https://www.freecodecamp.com/)

I tried FreeCodeCamp (html & css) ~2 years ago. It was OK. I recommend you to
finish the above one (Shay Howe) first, then try FreeCodeCamp. Actually, if
you have got your own _static_ web-page projects, you won't need the
FreeCodeCamp for CSS & HTML. The kick-start would be enough and "Google is
your friend" after that - learn more as you build your own projects.

Good luck.

------
jbernardo95
Elixir in Action by Saša Jurić

[https://www.amazon.com/Elixir-Action-scaron-Juri-
cacute/dp/1...](https://www.amazon.com/Elixir-Action-scaron-Juri-
cacute/dp/161729201X)

------
quantumhobbit
[http://www.nand2tetris.org](http://www.nand2tetris.org)

There is an associated book. Great intro to the fundamentals of computer
engineering.

------
cpcat
Ray Wenderlich's online tutorials on How to Make a Game Like Candy Crush
[https://www.raywenderlich.com/66877/how-to-make-a-game-
like-...](https://www.raywenderlich.com/66877/how-to-make-a-game-like-candy-
crush-part-1)

------
khedoros1
I bought this a year or two ago: [https://www.amazon.com/Tricks-Programming-
Gurus-Advanced-Gra...](https://www.amazon.com/Tricks-Programming-Gurus-
Advanced-Graphics-Rasterization/dp/0672318350)

It's basically a set of tutorials that lead you through the steps of building
a software 3D graphics rasterizer. It covers rasterizing, lighting, shading,
shadows, textures, etc, and the math behind each set of concepts. It's built
on late-90s C and DirectX, but the capabilities used are covered by just about
any game programming library. The author builds kind of an abstraction library
on top of the DirectX code, and that's pretty easy to rewrite in whichever
language and toolset you're comfortable with.

------
parisidau
My book "Learning Swift" does this.

Swift 2 version:
[http://shop.oreilly.com/product/0636920045946.do](http://shop.oreilly.com/product/0636920045946.do)

Swift 3 version:
[http://shop.oreilly.com/product/0636920053989.do](http://shop.oreilly.com/product/0636920053989.do)

We build a note-taking app for iOS, macOS, and watchOS.

------
arenaninja
Not exactly a book but gitlet.js:
[http://gitlet.maryrosecook.com/docs/gitlet.html](http://gitlet.maryrosecook.com/docs/gitlet.html)

About how to build a subset of git's functionality in NodeJS

~~~
woodrowbarlow
the side-by-side nature of that page strikes me as an innovative approach to
writing software tutorials for intermediate programmers. i like it!

~~~
vitorbaptistaa
Looks like an example of Literate Programming
([https://en.wikipedia.org/wiki/Literate_programming](https://en.wikipedia.org/wiki/Literate_programming))

------
sobinator
'The Art of Monitoring' by James Turnbull
([https://www.artofmonitoring.com/](https://www.artofmonitoring.com/))

------
innocentoldguy
I liked Take Off With Elixir, by Rob Conery. It walks you through writing a
program for a fictional aerospace start-up. It also comes with a 3-hour
companion video, which is good too.

[https://bigmachine.io/products/take-off-with-
elixir/](https://bigmachine.io/products/take-off-with-elixir/)

------
kevinclancy
Modern Compiler Implementation in ML by Andrew Appel

~~~
adwhit
I second this. Build a compiler from scratch. Main annoyance is that it uses
SML - most readers are likely to want to use OCaml, and it's a bit fiddly
translating between the two.

~~~
eatonphil
There are of course the C and Java implementation books as well.

~~~
ChristianGeek
Links?

~~~
eatonphil
[https://www.cs.princeton.edu/~appel/modern/java/](https://www.cs.princeton.edu/~appel/modern/java/)

[https://www.cs.princeton.edu/~appel/modern/c/](https://www.cs.princeton.edu/~appel/modern/c/)

------
eli_gottlieb
For learning Haskell:
[https://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_...](https://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours)

------
lanekelly
I used the older React+Webpack version of
[https://survivejs.com/](https://survivejs.com/) to learn React recently. You
build a small Kanban/Trello webapp.

------
wazoox
Bill Hails implements Scheme in Perl, maybe interesting to compare the two
books: [http://www.billhails.net/Book/](http://www.billhails.net/Book/)

~~~
throwaway7645
That sounds fascinating thanks!

------
blairbeckwith
Michael Hartl's Rails Tutorial
([https://www.railstutorial.org/](https://www.railstutorial.org/)) leads you
through Ruby, Rails, Git, and deployment to Heroku through two very small
projects and one related larger project that takes up the bulk of the book.

------
nickhalfasleep
[http://www.helios32.com/resources.htm](http://www.helios32.com/resources.htm)

Radiosity: A Programmer's Perspective by Ian Ashdown is a full numerically
accurate hemicube radiative transfer engine from start to finish. Now a free
pdf.

------
deletia
One of my favourites: [https://mitpress.mit.edu/books/little-
schemer](https://mitpress.mit.edu/books/little-schemer)

~~~
mekaj
The whole series is great! I especially enjoyed _The Reasoned Schemer_ [0]
which serves as an introduction to the *kanren languages [1].

[0] [https://mitpress.mit.edu/books/reasoned-
schemer](https://mitpress.mit.edu/books/reasoned-schemer) [1]
[http://minikanren.org/](http://minikanren.org/)

------
dugmartin
I always thought "Building X in Y" would be a great brand for a series of
books. There was a dBase III book in the mid 80's that I loved that took you
though building an invoicing system for a fictional company. It wasn't just
about learning the language/runtime but rather took you though the author's
thought process and outlined the pros and cons of different approaches and db
schemas.

------
dom96
My Nim book[1] is sort of like this. Instead of working on a single project,
most chapters have a little project (for example a chat CLI app or a Twitter-
like website) which teaches you different things about Nim.

1 - [https://manning.com/books/nim-in-
action?a_aid=niminaction&a_...](https://manning.com/books/nim-in-
action?a_aid=niminaction&a_bid=78a27e81)

~~~
throwaway7645
I read your first chapter and loved it!

------
drharby
C++ design Patterns and derivatives pricing by Mark Joshi

He kinda takes a "Defense of Duffers Drift" approach towards designing
iterative versions of the same project, slowly introducing concepts such as
factories and singleton.

------
sigmundritz
Richard Stevens' UNIX Network Programming books:
[http://amzn.to/2lmH8hy](http://amzn.to/2lmH8hy) The 1st volume at least is
going through a simple TCP/IP telnet server and enhancing it with features as
you go (single connection, multiple connection, forking, multi-threaded
server), etc.

------
mavelikara
Jekor's Haskell tutorial videos: Redo implementation in Haskell.

[https://github.com/jekor/redo](https://github.com/jekor/redo)

~~~
nafizh
It seems he assumes you know some level of haskell.

------
ChrisKingWebDev
A bit late to the party, but I've been making by way though "Developing Games
With Ruby" ([https://leanpub.com/developing-games-with-
ruby/read](https://leanpub.com/developing-games-with-ruby/read))

It's really good and the game is actually pretty fun.

------
dragthor
Big Nerd Ranch books - at least the Android one

[https://www.bignerdranch.com/books/](https://www.bignerdranch.com/books/)

~~~
pcsanwald
The big nerd ranch books often have you build applications across a collection
of chapters. I learned iOS development from their book; it's not a single
project for the whole book, but there are large chunks that use the same
example app that you add functionality to.

I love the the style of learning they advocate: reading the book and typing in
every single line of code yourself. It suits my learning style really well.

------
vivekd
Automate the boring stuff - Al Sweigart.

This book teaches you python through a series of example projects. You can get
it online or order a physical copy and help support the author here:

[https://automatetheboringstuff.com/](https://automatetheboringstuff.com/)

------
Corvus
One of the most memorable experiences of my life was building a small 2D RPG
named Dungeon Of Despair from the book "Game Scripting Mastery"
[https://books.google.ca/books/about/Game_Scripting_Mastery.h...](https://books.google.ca/books/about/Game_Scripting_Mastery.html?id=q5jdl_LLreMC)
by Alex Varanese.

The game teaches you to build a simple game for Win32 from scratch. The
graphics would be pretty dated now, but the scripting system for enemy AI and
quests is a Turing-complete programming language. I learned more from that
book than from my compiler course in university.

------
andrew2c
I have made a curated list for this post, feel free to contribute.
[https://github.com/AlgoryL/Projects-from-
Scratch](https://github.com/AlgoryL/Projects-from-Scratch)

~~~
PrakashBhatta
Thankyou so much.

------
vmware513
For learning JavaScript and Ember.js: [http://yoember.com](http://yoember.com)

------
yisheng
I really liked The Elements of Computing Systems (nand2tetris). The reader
gets to build a computer from nand gates up.

------
msangi
Crafting interpreters. It's still a work in progress, but the chapters
published so far are very good.

[http://www.craftinginterpreters.com](http://www.craftinginterpreters.com)

------
wyc
I remember The Unix Programming Environment by Kernighan and Pike as an
excellent introduction to Unix shells and general Unix programming. IIRC,
throughout the chapters, it has you build some kind of interactive command
line music organizer, which really demonstrates how much you can get done with
a few simple shell scripts.

Amazon link:

[https://www.amazon.com/Unix-Programming-Environment-
Prentice...](https://www.amazon.com/Unix-Programming-Environment-Prentice-
Hall-Software/dp/013937681X)

------
cestith
"The Art of the Metaobject Protocol" leads you from a very thin layer on top
of CLOS to a very rich layer of objects-oriented object implementations. It's
a classic.

~~~
throwaway7645
I love this. Ha lisp doesn't have a good OO system. Lisp 5 minutes later:
Implemented a powerful one out of macros...and u were saying?

~~~
lispm
You might want to read AMOP. It's not build out of macros, but a meta-object
system.

It also took a decade of research&development to develop CLOS + MOP. From
Flavors and LOOPS to AMOP.

~~~
throwaway7645
I've had it recommended to me before, but never read it. I also wasn't aware
of the extreme effort in getting it right. Thank you.

~~~
lispm
The communication of the standard subgroup which developed CLOS is here:

[http://ml.cddddr.org/cl-object-oriented-
programming/](http://ml.cddddr.org/cl-object-oriented-programming/)

The repository spans from 1984 to 1990.

The group also developed a portable CLOS implementation (PCL, Portable Common
Loops) to experiment and verify their design with feedback from the community:

[https://www.cs.cmu.edu/Groups/AI/lang/lisp/oop/clos/pcl/0.ht...](https://www.cs.cmu.edu/Groups/AI/lang/lisp/oop/clos/pcl/0.html)

Flavors and LOOPS were developed around 1980 and were the direct inspirations.
The AMOP book was then published 1991.

AMOP is a very good and extremely well written book about the CLOS Meta Object
Protocol.

It also is fortunately / unfortunately one of the books with the best Lisp
programming style. 'fortunately' because it is really great, 'unfortunately'
the great programming style is tied to a slightly esoteric topic - object-
oriented meta-object protocols. ;-)

Whatever motivation you have, a) reading a book with great Lisp style or b)
learning about the CLOS MOP, the book is highly recommended.

------
rokob
Erlang and OTP in Action [https://www.manning.com/books/erlang-and-otp-in-
action](https://www.manning.com/books/erlang-and-otp-in-action) You build an
application with increasing complexity. There are some other applications that
are built along the way to demonstrate some ideas in a smaller scope, but the
overall structure of the book is designed around making one application better
as you learn more about OTP.

------
algebraicgeo
Are there such books for algorithms?

------
jenkstom
Programming from the Ground Up teaches x86 assembler from first principles.
All on a free OS (Linux using asm). There is a free version available online,
but if you want to support the author you can buy it from amazon.
[https://www.amazon.com/Programming-Ground-Up-Jonathan-
Bartle...](https://www.amazon.com/Programming-Ground-Up-Jonathan-
Bartlett/dp/0975283847)

------
sitkack
All the compiler construction and Scheme books from Nils Holm [0]

[http://t3x.org/index.html](http://t3x.org/index.html)

------
pjungwir
_Code_ by Charles Petzold takes this approach to explaining how a computer
works. By the end he has a working system with CPU, RAM, inputs, and outputs.

------
grimoald
OK, you don't build a complete project, but it's a similar approach:

Think Stats: Probability and Statistics for Programmers
[http://greenteapress.com/thinkstats/](http://greenteapress.com/thinkstats/)

Here, you learn statistics by implementing statistics functions in Python
along the way and use them to solve the questions in the book.

------
nedwin
KLF's The Manual is a guide to producing a number one hit.

~~~
benjohnson
The Manual was good for my IT support business: It helped my get over my
hesitation on copying good ideas.

------
laser
This was on HN recently, but I really enjoyed Robin Wieruch's react tutorial
in which you build a HN like app: [https://github.com/rwieruch/the-road-to-
learn-react](https://github.com/rwieruch/the-road-to-learn-react)

------
evilc0
Wondering why no one mentioned, LFS :) It's not directly about building
something in a concrete programming language but it's about build your own
linux system.
[http://www.linuxfromscratch.org](http://www.linuxfromscratch.org)

------
drproktor
MEAN Web Development - great book, really nice to kick start with the MEAN
stack.

[https://www.amazon.de/MEAN-Web-Development-Amos-
Haviv/dp/178...](https://www.amazon.de/MEAN-Web-Development-Amos-
Haviv/dp/1783983280)

------
distantsounds
django's tutorial has you creating a polling website:
[https://docs.djangoproject.com/en/1.10/intro/tutorial01/](https://docs.djangoproject.com/en/1.10/intro/tutorial01/)

------
ryan-allen
[http://shop.oreilly.com/product/0636920028093.do](http://shop.oreilly.com/product/0636920028093.do)

Build your own legit Analog Synthesizer!!! Not software but it is an end to
end project. Good little book.

------
waterfowl
Discover Meteor is like this, involves building a reddit clone type thing
called Microscope(a reduced version of an actual product Telescope).

[https://www.discovermeteor.com/](https://www.discovermeteor.com/)

------
qz_
I loved the MINIX book: [https://www.amazon.com/Operating-Systems-Design-
Implementati...](https://www.amazon.com/Operating-Systems-Design-
Implementation-3rd/dp/0131429388)

------
matthiaswh
Coincidentally I'm about halfway through writing a long Vue.js tutorial series
where I build one project in this manner. Would love to hear more ideas about
what people look for with this type of book.

------
mynameisbahaa
1)- Sudoku Programming with C :
[http://www.apress.com/gp/book/9781484209967](http://www.apress.com/gp/book/9781484209967)
2)- Programming Sudoku :
[http://www.apress.com/gp/book/9781590596623](http://www.apress.com/gp/book/9781590596623)
I haven't read any of them though. They are on my list of "books to read in
the future"

------
jonaldomo
Anything by Manning that ends with "In Action". I volunteer to be a technical
reviewer if there is a new technology I want to learn (and get a free physical
book!)

~~~
sudshekhar
How did you get started as a technical reviewer?

I love reading technology books. It would be great to get early access and be
able to talk to the writers directly.

~~~
donnfelker
You can either ping existing authors or hit up the publishers. Squeaky wheel
gets the grease. They're always looking for folks.

------
rb808
Professional Java for Web Applications. If Java is your thing.

------
akashaggarwal7
I believe this is how education systems should be like. You learn about stuff
your subject while dealing with a project to do. Makes learning so much fun
and better.

------
myth_drannon
Implementing Lisp in Python -
[http://fogus.me/fun/lithp/](http://fogus.me/fun/lithp/)

------
jessedhillon
_3D Game Engine Architecture_ by David H. Eberly:

[https://www.amazon.com/Game-Engine-Architecture-
Engineering-...](https://www.amazon.com/Game-Engine-Architecture-Engineering-
Applications/dp/012229064X)

Not only is this a fantastic introduction to the math and the data structures
involved in computer graphics, the book also walks you through the
construction of an in-software renderer!

------
TeMPOraL
Maybe not best in the "build a project" genre, but about (Common) Lisp, you
have Land of Lisp - in which you build several small games and sort of reuse
some code between chapters, and Let Over Lambda, which does build its further
code on top of earlier code, although it's more of an exercise in bending Lisp
to your will than a well-defined project. I recommend both books; I found them
very good.

------
cestith
I already answered about "The Art of the Metaobject Protocol" but then two
more language-implementation-centric books came to mind today.

1\. "Writing Compilers and Interpreters" by Ronald Mak 2\. "Building an
Optimizing Compiler" by Bob Morgan

Morgan's book is well sought after and out of print. It's one of the few books
in the field for which the print edition prices keep climbing.

------
bcoughlan
Not a book, but I loved this series about building a Pascal interpreter
(currently 12 parts): [https://ruslanspivak.com/lsbasi-
part1/](https://ruslanspivak.com/lsbasi-part1/)

It was always on my bucket list to learn to write programming languages, but
it's very daunting - this made it easy to learn in bite-sized chunks.

~~~
rspivak
Thanks, @bcoughlan. I'm glad you liked it.

------
paullth
Ben Rady's Serverless Single Page Apps is one I've enjoyed recently, maybe not
something I'll use at work anytime soon though.

[https://pragprog.com/book/brapps/serverless-single-page-
apps](https://pragprog.com/book/brapps/serverless-single-page-apps)

------
sfifs
I learned C++ back in the 90s using a book called "Type and Learn C++" \- it
involved building a text editor.

~~~
AsyncAwait
Another good one on the topic of text editors is "The Craft of Text
Editing"[1]

1 - [https://www.finseth.com/craft/](https://www.finseth.com/craft/)

------
contingencies
More hardware oriented I would suggest some of the new Raspberry Pi or Arduino
based electronics kits, which are similar to books in that they provide a
prescriptive path in to comprehending new areas through the satisfying and
hand-on exploration of a defined project. Programming is involved too.

------
vvoyer
PHP and MySQL by example: you build an IMDB like website in a very progressive
and beginner manner.

[https://www.amazon.com/PHP-MySQL-Example-Ellie-
Quigley/dp/01...](https://www.amazon.com/PHP-MySQL-Example-Ellie-
Quigley/dp/0131875086)

------
dump121
Any such book for distributed systems?

~~~
mlashcorp
During my bachelor's we used this all-encompassing book by two of the teachers
called Distributed Systems for System Architects (DSSA for friends). It
followed a case study of a fictional company that wanted to implement a
distributed system, but the level of detail and technical complexity it covers
is just mind boggling (
[http://www.springer.com/us/book/9780792372660](http://www.springer.com/us/book/9780792372660)
)

To this day it's probably the best CS book I have ever read.

------
peterarmstrong
I wrote Flexible Rails back in 2007 that did this:
[https://www.manning.com/books/flexible-
rails](https://www.manning.com/books/flexible-rails)

I wouldn't read the book now though, since Flex, but the approach worked well.

------
__strisk
I remember liking
[http://www.tangowithdjango.com/](http://www.tangowithdjango.com/) .

It goes over building a link aggregating service using Django.

However, I also remember it being free. Doesn't seem to be an option with the
most recent release.

~~~
raintrees
I enjoyed Tango with Django, and was very positively surprised when they
emailed me an update for the PDF I bought. The first was inexpensive, and
worth it, hopefully helping support the authors.

Not only a good tutorial for Django, but the authors made it even better
offering the free improved/corrected version.

The final project is a Django webapp that allows visitors to add sites and
rank them. Many different aspects in Django are looked at, as well as beyond,
such as CSS, Bootstrap, search, Jquery, AJAX, etc.

~~~
raintrees
And I used some of the techniques from Tango in a car database app I sold to a
local repair shop, so I definitely consider it money _well_ spent. I am now
working on another app for yet another local business, leveraging some of the
same tricks...

------
hariis
Anything for mobile app development?

------
akaru
A mostly dead technology, but does teach some general programming in the way
you're asking:
[https://www.amazon.com/d/0596805632](https://www.amazon.com/d/0596805632)

------
tmaly
I had an interface electronics course back in the day that was like this.

Bandit Algorithms book is sort of like this. starts out simple and touches
different methods

------
analog31
I've just gotten started working my way through "build your own general
relativity." ;-)

------
kornakiewicz
Missing Clojure example here. "Clojure for the brave and true" was a little
disappointing.

~~~
mod
If one shows up, I'd love a ping. I'm also interested in a good Clojure
example!

------
almog
Any recommended book in this category about Postgres or Elasticsearch?

~~~
morenoh149
[https://www.amazon.com/AWK-Programming-Language-Alfred-
Aho/d...](https://www.amazon.com/AWK-Programming-Language-Alfred-
Aho/dp/020107981X) has you build a database from scratch

~~~
almog
Thanks but I'm looking for books whose main topic is Postgres/Elasticsearch.
The book you suggested has one chapter that touches database management as an
application of Awk. Interesting, but somewhat of a different subject.

------
shinta42
i love this topic, i hope to learn much soon

------
chris_st
Frankenstein?

------
FDominicus
Linux Application Development e.g

------
douche
Two decent ones for game development:

[https://howtomakeanrpg.com/](https://howtomakeanrpg.com/)

Walks through building a JRPG-style game with Lua. Pretty impressive for the
price, especially with all the royalty-free assets that are included.

[https://books.google.com/books/about/Programming_an_RTS_Game...](https://books.google.com/books/about/Programming_an_RTS_Game_with_Direct3D.html?id=jVkmAQAACAAJ)

A little dated now, (although DirectX 9 isn't quite dead yet), but this one
has some pretty interesting topics. Good chapter on procedural terrain
generation, some basic pathfinding, minimaps and fog-of-war.

~~~
makufiru
Thanks for sharing! I'm just getting into games and these look really helpful.

------
diminoten
I dunno why, but I was kind of hoping there would be non-CS answers for this
too, like how to woodwork, or like tying flies.

~~~
kyoob
There was a reference to this book earlier: [https://www.amazon.com/Build-
Metal-Working-Scrap-Complete/dp...](https://www.amazon.com/Build-Metal-
Working-Scrap-Complete/dp/1878087355)

------
nether
Accelerated C++ involves working on a program to analyze student grades. The
book itself is excellent, but the overarching project is very dry.

~~~
ehsankia
That's the main issue I have with any "prebuilt" project. They generally tend
to be quite dry and rarely relevant to my interests. Also, a big part of
programming for me is being able to piece together knowledge from various
places and putting it all together to make one thing. It's a bit like lego.
Having a single project tutorial that shows you everything from start to
finish misses the point a bit.

I do truly believe the best way of learning to code is by working on a decent
size project, but I also believe that said project should be something you're
fascinated and invested in, or else it feels more like a chore and is nowhere
as effective.

------
coleifer
I co-wrote a book on Flask that walks through the building and progressive
refinement of a blog: [https://www.packtpub.com/web-development/learning-
flask-fram...](https://www.packtpub.com/web-development/learning-flask-
framework)

