Quantcast
Channel: Hacker News
Viewing all articles
Browse latest Browse all 25817

Ask HN: What are some books where the reader learns by building one project?

$
0
0

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.


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?


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

http://www.craftinginterpreters.com/

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

Amazon link:

https://www.amazon.com/Unix-Programming-Environment-Prentice...


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


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


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.


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

https://handmadehero.org/


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.


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.


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


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.


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

Think Stats: Probability and Statistics for Programmershttp://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.


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.


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.


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.


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


Viewing all articles
Browse latest Browse all 25817

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>