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?
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.
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).
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.
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!).
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.
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.
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 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.
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].
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.
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.
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 :)
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.
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?
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.
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 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.
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.
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.
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...
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.
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.
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.
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.
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.
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.
* 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.
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.
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/
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.
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.
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.
"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.
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.
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.
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.
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.
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.
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.
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.
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.
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 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.
"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.
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.
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...
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
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.
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!)
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.
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.
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.
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 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...
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.
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.
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.
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.
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.