DEV Community

Discussion on: Embrace the Copy/Paste

Collapse
 
ld00d profile image
Brian Lampe

I would suggest typing it out in lieu of straight copy/paste. This exercises your muscle memory with the new stuff you're learning, and makes you pay attention to the details when it's not new stuff.

Collapse
 
qm3ster profile image
Mihail Malo

I find that "thoughtfully typing" it is the ideal solution.
In other words, using your own function/variable names, refactoring to use functional methods like .map instead of for loops, etc.
By the time you reach the end, you almost always understand how it works.

Collapse
 
cookavich profile image
Paul Cook

Just wanted to say this is good advice, and basically the approach of Zed Shaw in his book Learn Python the Hard Way.

If you want to take the muscle memory to the next level, delete the code after you've typed it out, and then try to write it out from memory. It's kind of an ad hoc test of yourself, and that is one of the absolute best ways to learn.

psychologytoday.com/us/blog/ulteri...