There is a meme in the programming world that goes something like this:

What are the two shortcuts that programmers are most familiar with, skilled at, and use?

CTRL + C and CTRL + V, with the generic name: Copy and Paste.


1. For many programmers, copy and paste is their right and left arm in creating great products.

Programmers also often ridicule themselves: the world code but a “copy” word, our job is to copy and paste.

Of course, to the uninitiated, copy-pasting might not sound technical at all; But for programmers, copy-pasting also falls into the following categories:

(basic) copy program from the Internet =¥1

(Getting started) Know which part of the program can be copied =¥100

Know how to adjust before and after copying =¥1000

(elite) know how to make others not know you copied =¥10000

(entrepreneurship) Know how to copy the situation and still let everyone recognize your unique value =¥100,000

In fact, programmer’s copy paste is not layman think so simple. For them, it’s important to know what code to copy, which code to copy, and how to fit in once you’ve copied it, and still solve the problem.

But today we’re not talking about copy-paste technology, but the habit of copy-paste.

2. Copy and paste properly will make your code faster, save time, effort, and brainpower.

So you think: it’s too hard to get over copy-pasting, let me just keep copying and pasting!

This is what happens when you’re a copy-paste addict: everyone else is a tech genius, and you’re still a copy-paste programmer.

When browsing the forum, xiaobian often sees such questions:

“As a programmer, how do you get beyond just copying and pasting?”

“How do I learn to write my own program? I just paste and copy.”

“What if I can’t write code because OF copy-paste?”

As you can see, not all programmers blindly pursue copy and paste.

So how do programmers get out of the habit of just copying and pasting?


In fact, for programmers who rely too much on copy-paste, you can try to make a breakthrough on the basis of copy-paste at the beginning.

Here are some effective ways to learn:

1. Read a piece of code

2. Know all the features of the language this code is using

3. Know all the features of the library or framework this code uses

4. Learn the basics of libraries and frameworks

5. Within the scope of this code, understand what each line of code is doing and the purpose of the library and framework

As a programmer, when we type code, we can practice with repetition and cross-comparison, not just copy and paste.

When we copy and paste a piece of code, we’re just looking at it (or not even bothering to look at it), and maybe even digesting some of it because it’s so abstract.

By contrast, you can learn more by typing in this piece of code manually, which forces your brain to think about the differences in this type of code pattern, and learning will be more efficient.

Naming is one of the most difficult aspects of programming, and when we copy code without understanding it, we run a risk of breaking the integrity of something by overwriting variable and function names or class names.

If we can understand the code first and then write it into our own code, we can rename it and make it suitable for our application without naming conflicts, even though the end result might be basically the same as if we had just pasted it on.


In a word, practice is the best teacher. From copying and pasting to independent development, you can start from basic exercises, implement simple functions without referring to other people’s code, and then slowly move forward to complex programs. I believe that before long, we can gradually get rid of the habit of copying and pasting.

The process of recruitment, tens of millions of programmers to find a new choice! This article was written by De Cheng.