|
|
|
|
|
by firasd
3049 days ago
|
|
I think a good learning trick that's an intermediate point between the two approaches he discusses (copying the sample code vs. closing the book and write the code yourself) is to write a different program based on what you can see in the sample code. That's how I learn tech myself--I already have some other project in mind, so I rarely sit down to build 'sample' apps with any sincerity. I try sample code to the extent needed to run it without errors, then integrate patterns from it into some other code I was meaning to write in the first place. To use the Benjamin Franklin analogy, it would be like Franklin having the articles he was seeking to understand open before him, but adding new paragraphs in between the original text, or re-purposing the article into a speech. This is a very common pedagogical approach of course--hence the cliche phrase 'left as an exercise for the reader.' The subtlety is that this is usually a hypothetical exercise on top of an already hypothetical problem, whereas if I have my own project in mind, I am far more motivated to figure things out. |
|
I feel that project is easy enough to not get terribly frustrating, but not entirely trivial, forcing you to think a bit about how you are going to structure it.