Live data from Hacker News

Ask HN: Books that teach programming by building a series of small projects?

news.ycombinator.com

141–150 of 204 posts

Re: Ask HN: Books that teach programming by building a series of small projects?

#142
post #139

It's common approach because building something that you want is good motivation. I don't think that works as well when it is some random project from the book. Like, sure, better than dry code, but I'm far more motivated to learn when I also make something for me.

The challenge I, and I think many others, run into with this is that there's almost never anything I "want". I spend so much time racking my brain for what to build I never start.

Having a nice curated problem put in front of me sets me off and it's easy from there.

Re: Ask HN: Books that teach programming by building a series of small projects?

#143
post #50

While on the topic, how about any books or courses that teach building a 3D game engine from scratch? I'm language agnostic, so any language is fine.

I think pikuma.com has a course about implementing a 3D rasterizer from scratch in C.

Re: Ask HN: Books that teach programming by building a series of small projects?

#145

Earlier quoted context omitted.

One thing that helps me a lot when learning new languages is to NOT copy and paste but actually re-type the code. You will be forced to read more carefully and, more importantly, you will make typing mistakes. Hunting down your own mistake will teach you the subtleties of the syntax as well as further increase your understanding of the code. For more advanced programmers, there is also the challenge of translating th…

I re type it but I don’t necessarily learn how to come up with that code when I’m off the leash. It’s useful when learning new syntax for sure though.

You can try to retype it from memory too. Or write down a list of the crux functions (like a word bank) and then figure it out again.

Re: Ask HN: Books that teach programming by building a series of small projects?

#146
post #97

My biggest gripe with all the project tutorials I’ve seen is that really quickly you get into a “ok I get what we’re doing” and then just copy the code they provide. At the end of the day you did zero mental workout because you didn’t have to figure out the code. I hope to find one of these that guides you but doesn’t give you the code immediately, but has a code answer key at the end or something. I get it that it’s…

To force myself “to figure out the code,” I typically do the tutorial in a different language. I wanted to get familiar with Java last year, but all the books/tutorials were boring to me. What I ended up doing was going through a book that showed how to write a backend in Go (which was also unfamiliar to me at the time) while simultaneously porting it to Java (using Vert.x). Probably sounds inefficient tackling two l…

I was looking for golang in this thread and this is the only reference I found. Would you mind linking the Go book you reference? Thanks

Re: Ask HN: Books that teach programming by building a series of small projects?

#147
post #97

My biggest gripe with all the project tutorials I’ve seen is that really quickly you get into a “ok I get what we’re doing” and then just copy the code they provide. At the end of the day you did zero mental workout because you didn’t have to figure out the code. I hope to find one of these that guides you but doesn’t give you the code immediately, but has a code answer key at the end or something. I get it that it’s…

To force myself “to figure out the code,” I typically do the tutorial in a different language. I wanted to get familiar with Java last year, but all the books/tutorials were boring to me. What I ended up doing was going through a book that showed how to write a backend in Go (which was also unfamiliar to me at the time) while simultaneously porting it to Java (using Vert.x). Probably sounds inefficient tackling two l…

I have done the same thing! Read Crafting Interpreters but wrote the first half in Clojure instead of Java.

I think it's a good method for experienced programmers, who are self-taught (like me) or just want to brush up some skills and knowledge.

Yes, you stay engaged, but there is also something to be said about porting code between different languages. The differences, strengths, weaknesses etc. stand out more, similarities become more clear and things that seem different, but are analogous emerge.

Re: Ask HN: Books that teach programming by building a series of small projects?

#148
Same question, but not for beginners but for experienced programmers:

Which book would you recommend to improve architectural design decisions, developing complex systems, etc? But on actual examples, e.g. by building a series of projects, or parts of it?

Re: Ask HN: Books that teach programming by building a series of small projects?

#149
post #86

My biggest gripe with all the project tutorials I’ve seen is that really quickly you get into a “ok I get what we’re doing” and then just copy the code they provide. At the end of the day you did zero mental workout because you didn’t have to figure out the code. I hope to find one of these that guides you but doesn’t give you the code immediately, but has a code answer key at the end or something. I get it that it’s…

That’s why I like The Ray Tracer Challenge. He gives you test scenarios and a little bit of pseudo code (sometimes). The actual implementation has to be done by the reader. http://raytracerchallenge.com/

That's really cool, probably deserves its own submission for discussion!

Re: Ask HN: Books that teach programming by building a series of small projects?

#150
post #139

It's common approach because building something that you want is good motivation. I don't think that works as well when it is some random project from the book. Like, sure, better than dry code, but I'm far more motivated to learn when I also make something for me.

The challenge I, and I think many others, run into with this is that there's almost never anything I "want". I spend so much time racking my brain for what to build I never start. Having a nice curated problem put in front of me sets me off and it's easy from there.

I agree in regards to complete beginners.

But I think for more intermediate or advanced programmers it is very beneficial to go about a project in a more self-driven, free form way. Software design, exploration, research, reading specs and so on are half of the work (or more) in programming.

What I would have loved to realize when I was younger is that there's nothing you can't write. It might be a drastically simplified version compared of the real thing, but you can absolutely do it.

An operating system, a browser, a web server ("from scratch") a programming language, a video game (with a custom engine)... It's all possible with enough effort. And even if you don't want to do the up-front work yourself, it is easier to find cool, guided projects out there if you already know what you want.

Post reply on HN