What are some books where the reader learns by building one project? Ask HN (Summarized)
A HN user recently posted this question on HackerNews and it got more than 600 upvotes. Some of the books mentioned in the comments were already very popular and well known. But, a lot of them are rare but still worth their weight in Gold.
With so many links to different blogs/books covering a range of programming languages, I decided to sort them categorically and add a brief summary of each book with links to their free as well as paid version.
Computer Science
From NAND to Tetris Building a Modern Computer From First Principles
The site contains all the software tools and project materials necessary to build a general-purpose computer system from the ground up. They also provide a set of lectures designed to support a typical course on the subject.
The materials are aimed at students, instructors, and self-learners. Everything is free and open-source. There is an associated course on Coursera as well https://www.coursera.org/course/nand2tetris1
Why Bother? Because many CS students don’t understand how computers work; because fewer and fewer students take compilation courses; because many computer architecture courses are too detailed and too dry; because nothing beats the thrill of creating something from almost nothing; because Nand2Tetris engages students in implementing some of the coolest algorithms, data structures and techniques in applied computer science, and because the typical student feedback in Nand2Tetris courses is “the best course I ever took”.
Compiler Construction Using Java
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.
Modern Compiler Implementation in ML by Andrew Appel
This book is one of the most seminal books for Compiler Design. It’s one of the most common textbook used in Undergraduate Computer Science courses. It walks you through all the elements of a Compiler and teaches you how to build one in C.
Crafting Interpreters
This book contains everything you need to implement a full-featured, efficient scripting language. You’ll learn both high-level concepts around parsing and semantics and gritty details like bytecode representation and garbage collection. Your brain will light up with new ideas, and your hands will get dirty and calloused. It’s gonna be a blast.
Starting from
main()
, you’ll build a language that features rich syntax, dynamic typing, garbage collection, lexical scope, first-class functions, closures, classes, and inheritance. All packed into a few thousand lines of clean, fast code that you will thoroughly understand because you wrote each one yourself.You can read the whole book, for free online on the link given above.
Some of the remarks left by HN readers!
CODE The Hidden Language of Computer Hardware and Software
“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.
The Little Schemer
The Little Schemer introduces computing as an extension of arithmetic and algebra; things that everyone studies in grade school and high school. It introduces programs as recursive functions and briefly discusses the limits of what computers can do. The authors use the programming language Scheme, and interesting foods to illustrate these abstract ideas.
Linux
Linux From Scratch
LFS teaches people how a Linux system works internally
Building LFS teaches you about all that makes Linux tick, how things work together and depend on each other. And most importantly, how to customize it to your own tastes and needs.Building LFS produces a very compact Linux system
When you install a regular distribution, you often end up installing a lot of programs that you would probably never use. They’re just sitting there taking up (precious) disk space. It’s not hard to get an LFS system installed under 100 MB. Does that still sound like a lot? A few of us have been working on creating a very small embedded LFS system. We installed a system that was just enough to run the Apache web server; total disk space usage was approximately 8 MB. With further stripping, that can be brought down to 5 MB or less. Try that with a regular distribution.What can I do with my LFS system?
A by-the-book LFS system is fairly minimal, but is designed to provide a strong base on which you can add any packages you want. See the BLFS project for a selection of commonly used packages.
Programming from the Ground Up by Jonathan Bartlett
https://www.amazon.com/Programming-Ground-Up-Jonathan-Bartlett/dp/0975283847
This book teaches x86 assembler from first principles.
Most introductory books on programming frustrate me to no end. At the end of them you can still ask “how does the computer really work?” and not have a good answer. They tend to pass over topics that are difficult even though they are important. I will take you through the difficult issues because that is the only way to move on to masterful programming. My goal is to take you from knowing nothing about programming to understanding how to think, write, and learn like a programmer. You won’t know everything, but you will have a background for how everything fits together
Software Engineering
Design Patterns: Elements of Reusable Object-Oriented Software 1st Edition
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.
Docker
Orchestrating Docker by Shrikrishna Holla
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.
Distributed Systems for System Architects
It follows 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.
Nim in Action
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.
Nim in Action introduces the Nim programming language and teaches you to write native software applications and libraries, web applications, embedded device software, and programs that communicate over the internet. This book is full of hands-on examples that help you learn how to test, debug, document, and package your Nim applications. You?ll also discover how to interface with foreign languages such as C and C++ and how to use metaprogramming features to write domain specific languages. Throughout this book you will implement a fully-functioning chat server, a Twitter clone, and many other software projects. By the time you finish reading, you’ll have a solid knowledge of Nim and will be able to use it to write powerful, portable and efficient applications.
Ruby On Rails
RUBY ON RAILS TUTORIAL (RAILS 5) : Learn Web Development with Rails by Michael Hartl
Michael Hartl is one of the most prominent advocate for Ruby On Rails. His tutorials has been widely quoted as one of the best starting point for people learning to code or those new to web development.
There is a wide number of pricing options to choose from but the good part is that the book is still available for you to read for free online.
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.
Lisp
Practical Common Lisp
Filter spam, Parse binary files, catalog MP3s, stream MP3s over a network, and provide a Web interface for the MP3 catalog and server.
Erlang
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.
Python
Automate the Boring Stuff with Python by Al Sweigart
The title of the book is self-explanatory. I personally enjoyed reading this book and writing the cool scripts that Al wrote about in this awesome book.
In Automate the Boring Stuff with Python, you’ll learn how to use Python to write programs that do in minutes what would take you hours to do by hand-no prior programming experience required. Once you’ve mastered the basics of programming, you’ll create Python programs that effortlessly perform useful and impressive feats of automation to:
Search for text in a file or across multiple files
Create, update, move, and rename files and folders
Search the Web and download online content
Update and format data in Excel spreadsheets of any size
Split, merge, watermark, and encrypt PDFs
Send reminder emails and text notifications
Fill out online forms
Step-by-step instructions walk you through each program, and practice projects at the end of each chapter challenge you to improve those programs and use your newfound skills to automate similar tasks.
Django
Test-Driven Development in Python by Harry Percival
Available for free
Test-Driven Development with Python focuses on web development, with some coverage of JavaScript (inescapable for any web programmer). This book uses a concrete example — the development of a website, from scratch — to teach the TDD metholology, and how it applies to web programming, from the basics of database integration and javascript, going via browser-automation tools like Selenium, to advanced (and trendy) topics like NoSQL, websockets and Async programming.
Tango With Django
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.
The Official Django Tutorial
Walks you through creating a polling website.
Flask
Flask The Mega Tutorial
The application that is developed as part of this tutorial is a decently featured microblogging server similar to Twitter.
Some of the topics covered are:
User management, including managing logins, sessions, user roles, profiles and user avatars.
Database management, including migration handling.
Web form support, including field validation.
Pagination of long lists of items.
Full text search.
Email notifications to users.
HTML templates.
Support for multiple languages.
Caching and other performance optimizations.
Debugging techniques for development and production servers.
Installation on a production server.
JavaScript
Eloquent Javascript
A great book for an introduction to programming.
This is one of the most seminal book ever written for Javascript. As the title suggests, the author explains every topic eloquently and walk you through lots of code.
You build 5 projects through the book — a programming language, paint program, a dom game and a skill sharing website using node js.
React
This online tutorial walk you through React+Webpack and teaches you how to build a small Kanban/Trello webapp.
The Road To Learning React
A free guide on github by Robin Wieruch’s which teaches you how to build a HackerNews like app from scratch.
GO
Web Development with Go
From the author’s comment on HN:
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.
The Web Devlopment with Golang: The 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 any framework.
Miscellaneous
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.
Discover Meteor
Walks you through building a Reddit clone called Microscope(a reduced version of an actual product Telescope).
Creating Interactive Fiction with Inform 7
This book 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.
The Better Explained Guide To 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
Hand Made Hero by Casey Muratori
Not a book but i’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.
Hacking the Xbox by Andrew ‘bunnie’ Huang.
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.
How to make a game like Candy Crush
HTML/CSS
Hacker Noon is how hackers start their afternoons. We’re a part of the @AMI family. We are now accepting submissions and happy to discuss advertising & sponsorship opportunities.
If you enjoyed this story, we recommend reading our latest tech stories and trending tech stories. Until next time, don’t take the realities of the world for granted!