Hacker News new | ask | show | jobs
by whatismybrowser 3226 days ago
This is more of a technique for learning than for practice... but one thing that I make a habit of when learning a new programming framework is deliberately typing out sample code that I've found in books or online instead of just copying and pasting it.

It's the equivalent of writing out notes by hand from a school textbook instead of just photocopying the pages... some how the process of actually re-typing it out causes it to stick in my mind better. And then later, when you're really "in the zone", you don't break your focus by needing to keep referring back to the book, it's already embedded in your muscle memory and you just keep plowing away.

3 comments

Great technique recommendation. I make it a practice to never copy-paste an answer from StackOverflow. I always type it out by hand to grasp the meaning of each line of code properly. It's anecdotal, but I strongly feel it helps me absorb new languages and frameworks faster (and deeper).
Yep. This works even better for me when hand writing something as opposed to typing. Obviously useless for programming though :)
Not useless. I type out code from books but resort to pencil when the snippets I find difficult; that way, I can annotate and manipulate the code more intensely.
I try to understand each line as I type it. If I don't, I go stare at the documentation until I do.