Hacker News new | ask | show | jobs
by barelysapient 1778 days ago
I follow this pattern as well along with one caveat: I refuse to cut and paste code while learning.

I require myself to retype any examples, stack overflows, and so on in the process of learning. Along the way, I get a handle on the patterns of the language. And if I'm learning in an IDE, the autocomplete suggestions start to hint at the other functions within libraries, etc.

2 comments

Definitely. I feel like I force myself to ask the more fundamental questions relevant I am writing (i.e. why is it this way, alternatives, etc.) than if I were to cut-and-paste. Saw significant differences in learning new languages by forcing myself to do this.

And, my mentality in going through examples has changed. Larger blocks of code shouldn't seen as more of a pain to write, but larger sources of information (usually) for learning.

Yes, I love this suggestion. Building the literal muscle memory of how to write, I dunno, a for loop, is so critical -- it means you don't have to think for even a second about how to use that tool in the future.