4 ms·
Been following this book for a bit but I can't quite find a good way to learn from it. Should I first read each chapter and create my own language? implement hi
by imAsking9836 8y ago
Been following this book for a bit but I can't quite find a good way to learn from it. Should I first read each chapter and create my own language? implement his language using language other than Java? Type by hand his source code following along and trying to comprehend the details?
- eatonphil 8y agoPick one! :) But I'm curious (I write some similar posts) if this is because of the way the sections are written that inhibits following along?
- bibyte 8y ago> Type by hand his source code following along and trying to comprehend the details? Isn't that the only way to learn from any programming book ? At least that's what I have always done. I am curious as to what other way people learn.
- dahfizz 8y agoI've found that it's easy to zone out if I'm just typing exactly what's on the page in front of me. Following along but in a different language can keep you more engaged and think more about what's going on.
- imAsking9836 8y agoIt also becomes a bit of a battle against the desire of copying/pasting the code (It's even more tempting since it's an e-book with the code already formatted), not to mention that some parts are tedious to type like enumerators with many string elements
- bibyte 8y agoThat's a good point. I also have a problem with zoning out when reading technical books. I should give your technique a try.
- rhizome31 8y agoI tend to read a section carefully, then close the book and try to reproduce the example without looking at it again. Of course I'll allow myself to use online reference material, as I do in real-life programming. If I really get stuck I'll take a look at the book, but just enough to unstuck me. The goal is obviously not to reproduce the example line by line but to reproduce what it does with the same global structure.
- marmaduke 8y agoI unconsciously change variable names when typing code samples which later forces me to track data flow and dependencies
- _hardwaregeek 8y agoTyping by hand is an underrated option. Inevitably there's gonna be transcription errors, so you'll have to correct them and in the process understand the code. Also, just take a moment at the end of a chapter to review the code and make sure it follows. I thought that it wasn't doing much either until I realized I actually understood what was going on! After that, you could maybe port it to a different language. But doing that the first time around would be a little hard. Especially if you wanted to keep the code idiomatic to the language.