My Profile Photo

Trevor Jones

My musings - interesting to me, hopefully will be for you

Stop Copy/Pasting

As mentioned in a previous post, I’ve been gaining lots of experience when it comes to training new developers. I’ve been doing one thing or another with new developers for almost 3 years now.

My recommendation in this post? STOP copy/pasting. I know, I know. It’s hard to remember the specific commands. Sometimes when you type it yourself you leave an important letter out and it doesn’t work. Then 5 minutes later you end up copy/pasting anyway. Despite that, here are reasons why you should stop copy/pasting, as well as times when it would be appropriate. There are certain times to do it, I’m not as unreasonable as all that.

2 Reasons to stop

  1. It cripples your learning. You are not training your fingers. This is a craft and like any other craft, you must deliberately practice. Train your fingers and learn the right commands/code.
  2. When you copy/paste you don’t think about what you’re doing. You don’t stop and read each line to figure out what’s going on. Then when errors happen, you have no idea where to debug because you have no idea what is going on.

Do these two reason increase the amount of time it takes to complete a project? Good chance that’s a no. You learn way more by not copy/pasting and your fingers can start to go and go fast! It doesn’t take hours upon hours and hours to start training your fingers.

So when should you copy/paste?

  1. When you’re going to use whole blocks of code and it’s a ton to write yourself. But – copy/paste, then retype it in your editor. You do this because it’s too inconvenient to switch from your browser and back. But if it’s in your editor, then you can easily write it on your own. This will (if you’re paying any attention at all) force you to look at what is going on and increase your understanding of the code.
  2. If you are very positive that this particular command is a one-off thing. Meaning, there is little chance you will ever do something like it again. If you will never do something like it again, there’s no chance you’ll learn it by typing it out once anyway. But if it’s basic stuff and you can see value in learning it, don’t copy/paste. If you’re unsure, then don’t copy/paste. When in doubt, learn.
comments powered by Disqus