Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What are some books where the reader learns by building one project?
813 points by kyoob on Feb 16, 2017 | hide | past | favorite | 229 comments
I'm about halfway through 'Build You Own Lisp' and I'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'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?

Michael Hartl's Rails tutorial (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.

Not only that, but for me what was super helpful was the "this is how real developers would approach this" in terms of covering lots of workflow things, design patterns, Git, unit tests, setting up your dev environment, sprucing it up with some gems, etc.

Can't recommend it enough.

This is the inspiration behind the book I am working on - Web Development with Go (see https://www.usegolang.com).

Michael's book is fantastic and I really wanted something similar for people getting into go. My book doesn't cover git or testing but that is because rails is a framework with tons done for you, and in my book you basically build all of that from scratch. You learn a ton, but it is long and adding git or testing would have made the book like 600 pages (instead of ~400ish).

If you are interested in Go I'd love to get your feedback :)

I subscribed to your blog and your newsletter some months ago, and I must say I like what you do. Although I'm focused on C++ now for some courses I'm taking, I still hope to catch up on Go later, and I think your book will be helpful. Personally, I wouldn't mind a hands-on exploration of a programming language having some pages, and links to good resources, on version control. Learning 'git' in such practical way (as part of a project) seems better to me (Harvard's CS50 now takes that approach too: https://github.com/blog/2322-how-cs50-at-harvard-uses-github...).

Feel free to email me if you want to discuss this in more detail. I'm not opposed to something like this but I suspect a video format may work better. jon@calhoun.io

I've been planning to get into Go so the book looks interesting. One question though: How far into the book do you introduce tools for automated testing?

This book doesn't cover testing at all. I wanted to, but there just wasn't room for it and it would have lead to information overload.

What I am thinking about doing is writing a companion book that covers git, testing, etc. Eg after every chapter the companion book then walks you through writing tests, committing to git, merging it into master, etc. That way someone could optionally choose to do those things along the way. I might also experiment with other formats, but time will tell.

I love that book and recommend it to anyone. The only thing I don't really like is its focus on MiniTest when practically everyone in the Ruby ecosystem has moved to RSpec. If I had to find a reason for this choice I'd say, one less gem to install and configure, and again convention over configuration.

I think MiniTest is a good starting point even if you end up going with Rspec, as MiniTest/jUnit style testing feels a little bit lower level. In the same sense, the book implements authentication from scratch, whereas many apps will end up using a library like Devise.

> I don't really like is its focus on MiniTest when practically everyone in the Ruby ecosystem has moved to RSpec

Is this true? I know RSpec is the popular one in open source, but last I checked the two were still pretty even as far as big name recommendations. I used to believe RSpec was the default when I first started Rails development, but as a professional dev I had seen plenty of Minitest implementation.

It's been a while since I went through it, but did the tutorial not originally use RSpec, then switch it out at about version 4 (along with a few other tools) so that everything in the book made use of the most basic, out-of-the-box tools (as much as possible)?

I am interested in the heroku part, but I would like that for different services. Like Amazon, Digital Ocean (I used it for single VPS but I'd like to see how to set up different vps, connect with each other, do vertical and horizontal scaling, etc).

Any recommendations in this area?

Packer + Docker + custom cloud elastic stuff.

You can use docker compose and swarm but at some point you need to interface with how the cloud offering does elastic scaling (for example google has instance groups and deploy templates).

I haven't seen a good resource on this last part other than PaaS/IaaS doc itself. So I am curious as well.

There sort of needs to be a packer of deployment + composition but I suppose that is what chef and puppet are sort of for (I despise those tools).

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

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...

Django Unleashed is written as a step-by-step guide to building a single Django project. The link below has links to Amazon or to Pearson's own site (DRM-Free!).


Full Disclosure: I'm the author.

If you're looking to go nuts, I recommend reading the first twelve chapters of Django Unleashed, following it up with Harry Percival's Test Driven Development with Python book (also written as a step-by-step guide), and then finishing Unleashed.


Two Scoops of Django (not a guide) is great to have after that.


Hope that helps!

The closest thing I know of is Test-Driven Development in Python. http://chimera.labs.oreilly.com/books/1234000000754

It goes through making an app in Django, but is heavier on TDD than Hartl's book.

For what it's worth, it's fairly agnostic when it comes to languages or frameworks. Yes, you'll learn Rails, and some Ruby on the way, but the intent is to learn web development from the ground up. You'll learn concepts that will apply to anything else you might be using. It's invaluable, and a great place to start with web development.

This is also the first thing that came to mind for me. One of the finest web dev tutorials ever written.

I loved it so much that I bought the movies just to make sure he earned something from me for such an extraordinary piece of work.

TECS: "The Elements Of 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.

+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

First half of the book is available here for free.


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:


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

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

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.


Cool, added yours to the README too. :)

Awesome, I added a link to it on the book's README so other people can find it. I hope that's OK.

That's great, thanks for doing so.

Thank you for the tutorial. I've scoured the Internet for lighter introductions to interpreter development, and yours is the only one that's worthwhile. Great job!

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

[2] https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial...

Tooting my own horn here:

My flask also book does this http://a.co/gwGvY3o

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.

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...

I think they don't include it not because you should roll your own (you really shouldn't) but because they don't make the assumption that you'll need it. Once they start adding that stuff by default they'll no longer be a 'microframework'.

But yes, definitely grab a third party extension for auth :)

Should I go for the book or the tutorial?

Does the book have a lot of advantage over the tutorial?

Try the tutorial and see if you like it.

The book is much more polished. You follow along with this repo [1]. Every chapter you simply `$ git checkout chapter-n` and you're ready to go. It's amazing.

[1] https://github.com/miguelgrinberg/flasky

Linux From Scratch: 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.

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?

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

I did this a couple years ago. It was pretty enjoyable and I learned quite a bit about Linux that I still apply almost every day.

"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.


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.

I've read Realistic Ray Tracing by Shirley, before reading the first edition of PBRT. RRT definitely has a more "incremental" approach, and is a lot more approachable than PBRT.

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

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

I think these are the short books herbstein was referring to: http://in1weekend.blogspot.com/

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

Thanks! I'll check them out.

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.


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 ;)

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

Is it possible to read the first chapter for free so that I can decide if I want to buy the book or not. There almost no reviews of your book.

Yes. You can download a sample chapter from the aforementioned link

Thanks, I didnt see that button on the site.

On a similar topic but a bit less project oriented:

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


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.

This looks awesome. Might be a fun way to help my kids learn CS once they're old enough.

You're fooling no-one, Shimon... ;)

Just a joke: the course is by Noam Nisan & Shimon Schocken

The accompanying book is "The Elements of Computing Systems" and Part 1 is available as a course on Coursera. I highly recommend it; just finishing the Coursera course myself and I'll definitely be doing Part 2.

I'll second this. I worked through the book and downloadable exercises a few years ago. It's a great way to learn about the multiple layers of abstraction that a modern program sits upon.

Ha! This is one of the few times in my life I can honestly say no, that's a different Shimon.

Eloquent Javascript - 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.

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.

Added bonus: beautiful typography.

Aaron Reed has a terrific book, "Creating Interactive Fiction with Inform 7" (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.

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.

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.


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.

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?

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.

The book assumes a base level of knowledge about programming in general, and some knowledge of how web applications work. However it does cover a lot of the basics - I've got a decade or so of experience in the field and probably skimmed over 75% of the book while it discussed concepts that are familiar to me.

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.


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...

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/...

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.

I came here to recommend Assembly Language for the PC(https://www.amazon.com/Assembly-Language-Brady-programming-l...) which I believe is actually the same book, possibly with some updates. I was probably 14 years old and bought a boxed copy of Borland Turbo Assembler for $100 at the software store at the mall. Totally worth it.

I've never actually written assembly professionally, but the understanding of what's going on at the CPU level has been invaluable. You could probably run FreeDOS(http://www.freedos.org/) in a VM, looks like it comes with a couple different assemblers.

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

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.

A Retargetable C Compiler: Design and Implementation


A most excellent grimoire.

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


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.

Using a UI or ncurses?

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

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

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.

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!

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.

Yeah, it's a ton of work. I never got past the metal casting.

Is there something similar for woodworking?

Damn! Bookmarking that for once I get a house with enough space.

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...

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.


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

I bet this is what you are looking for:


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.

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/

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

Hacking the Xbox by Andrew 'bunnie' Huang. (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.

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.

I've been looking for something to help with F#, but I have no current use for web development.

Ray Tracing in One Weekend

Ray Tracing: The Next Week

Ray Tracing: The Rest of Your Life


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/

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

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

Pretty good book. I was a bit skeptical when I bought, but it was totally worth the price.

Strongly recommend it.

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.

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

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

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

There needs to be more books like this, but I imagine the lack of such material is due to the effort needed to break a framework down into its smallest pieces.

I loved this book. I only read parts of it, but the section on $scope and the digest cycle gave me such an awesome lightbulb moment.

That's a really cool idea, to build a clone of the framework you're trying to learn. Thanks for the link.

Web Development with Go (see 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.

Practical Common Lisp 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.

"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/

For 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...

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

Thank you!

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

I guess I have: 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.


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

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-...

I bought this a year or two ago: https://www.amazon.com/Tricks-Programming-Gurus-Advanced-Gra...

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.

My book "Learning Swift" does this.

Swift 2 version: http://shop.oreilly.com/product/0636920045946.do

Swift 3 version: http://shop.oreilly.com/product/0636920053989.do

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

Not exactly a book but gitlet.js: http://gitlet.maryrosecook.com/docs/gitlet.html

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

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

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

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

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.


Modern Compiler Implementation in ML by Andrew Appel

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.

Why not just work with SML and focus on the compiler building part? Any particular reason to want to use OCaml?

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


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

Bill Hails implements Scheme in Perl, maybe interesting to compare the two books: http://www.billhails.net/Book/

That sounds fascinating thanks!

Michael Hartl's Rails Tutorial (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.


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.

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 [1] http://minikanren.org/

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.

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_...

I read your first chapter and loved it!

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.

Richard Stevens' UNIX Network Programming books: 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.

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


It seems he assumes you know some level of haskell.

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)

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

Big Nerd Ranch books - at least the Android one


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.

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:


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... 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.

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

Thankyou so much.

For learning JavaScript and Ember.js: http://yoember.com

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

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


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:


"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.

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?

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.

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.

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


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:


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.

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.

Are there such books for algorithms?

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...

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


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.

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/

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

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

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

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

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

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


django's tutorial has you creating a polling website: https://docs.djangoproject.com/en/1.10/intro/tutorial01/


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

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


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.

1)- Sudoku Programming with C : http://www.apress.com/gp/book/9781484209967 2)- Programming Sudoku : 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"

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!)

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.

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

They occasionally send out email notices. Check their website for more information: https://www.manning.com/manuscript-reviews

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

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.

Implementing Lisp in Python - http://fogus.me/fun/lithp/

3D Game Engine Architecture by David H. Eberly:


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!

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.

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.

Not a book, but I loved this series about building a Pascal interpreter (currently 12 parts): 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.

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

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


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

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

1 - https://www.finseth.com/craft/

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.

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


Any such book for distributed systems?

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 )

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

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

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

I remember liking 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.

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.

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...

Anything for mobile app development?

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

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

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

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

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

I agree based off of what I've read so far. It's not bad, just not great.

Any recommended book in this category about Postgres or Elasticsearch?

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.

i love this topic, i hope to learn much soon


Linux Application Development e.g

Two decent ones for game development:


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


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.

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

Lua and RPGs? Bookmarked!

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.

There was a reference to this book earlier: https://www.amazon.com/Build-Metal-Working-Scrap-Complete/dp...

I was hoping someone would ask this. The question made me think of 'Rebuilding the Indian' by Fred Haefele. In an autobiographical work, the author gets respite from and perspective on his emotional issues by focussing on rebuilding an antique motorcycle.

I think there was a wood or metal working one above.

Seems reasonable. I was hoping to see a few more, too! Only mention of the scrap metal project so far.

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

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.

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...

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact