Ask HN: What are some books where the reader learns by building one project?
813 pointsI'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?
Comments (229) 107 threads
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.
Any recommendations in this area?
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).
Can't recommend it enough.
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.
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...
It goes through making an app in Django, but is heavier on TDD than Hartl's book.
http://django-unleashed.com/
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.
http://chimera.labs.oreilly.com/books/1234000000754/index.ht...
Two Scoops of Django (not a guide) is great to have after that.
https://www.twoscoopspress.com/products/two-scoops-of-django...
Hope that helps!
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 :)
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.
In this book you build a (virtualized) computer. It is one of the best books I ever read.
http://www.nand2tetris.org/
http://www.craftinginterpreters.com/
I really liked "Build Your Own Lisp" too. Fun book. :)
Edit: here is the (WIP) intepreter: https://github.com/HarveyHunt/loxr
I'm trying to learn Rust with this project. It's still far from idiomatic but I plan to keep implementing following the book and then refactor later.
https://github.com/mariosangiorgio/rulox
[1] http://shop.oreilly.com/product/0636920031116.do
[2] https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial...
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.
But yes, definitely grab a third party extension for auth :)
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...
My flask also book does this http://a.co/gwGvY3o
Does the book have a lot of advantage over the tutorial?
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
All comments shown.
Couldn't load more comments. Check your connection and try again.