Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How many programming novices have been harmed by the "write more code" pit?


Jun 01, 2021 Article blog



If you ask a programmer how to learn programming well, the answer is mostly yes

Write more code and read more code

You believe it and do it, so congratulations, there's a good chance you'll fall into the ditch. B ecause this sentence only tells you how to do it, not how to do it well. It's like you want to fry a dish, the top chef tells you, to put octagonal, five incense, but did not tell you when to put, put how much, you fried out, is still a rotten dish.

People who are just beginning to learn programming, it is easy to understand this sentence from the surface, that is, think that "write more code", just like the "oil seller" in the good shot Chen Qi and the oil seller, hand familiar.

Then, start writing the code over and over again:

html hyperlinks are not very good to remember, write a few more times, skilled on the line

< > of the text </a" > the a href-link

< > of the text </a" > the a href-link

< > of the text </a" > the a href-link

As a result, this knowledge point you remember, but also just remember this knowledge point, change the topic, you still won't. R epetition is the least efficient way to learn. Telling you who wants to "write more code" isn't about letting you keep writing code over and over again.

What they want to tell you is:

Learn programming and write more thought-out code

Constant thinking, continuous optimization, change the way to achieve

That's what people tell you to learn programming to write more code.

So is "writing more code" with thinking an efficient way of learning?

According to research by the Maine National Training Laboratory, practices like writing code are indeed an efficient way to learn, but they are not the most efficient.

The Maine National Training Laboratory divides learning into passive learning and active learning.

Listening, reading, audio-visual, presentation for passive learning.

Discuss, practice, and teach others to take the initiative to learn.

Passive learning efficiency is very poor, the average retention of learning content is not more than 30, and active learning methods, efficiency is relatively high.

The results showed that through "practical" learning, the average retention rate of learning content was 75%, while that of "professor to others", the average retention rate of learning content reached 90%.

 How many programming novices have been harmed by the "write more code" pit?1

This research coincides with Feynman's skill.

Feynman's technique, a four-step learning method centered on "teaching what others know", was proposed by physicist Feynman.

  1. Learn what you want to learn
  2. Imagine that you are about to teach this point of knowledge to someone
  3. If you find a shell, review it and continue to try to teach it to others
  4. If you succeed, try to express it in more understandable and concise language

This technique is very suitable for you to learn programming, when you open W3Cschool micro-class or other tutorials, learn a knowledge point, do not rush to "write", you should first close your eyes, imagine, can you teach to a small white, where the shell, it means that where not master, it is time to review. and then write the code with "thinking",

"Teaching knowledge to others" is not only suitable for you who have just learned to program, but also suitable for future debugging of the program

In "The Way Programmers Practice," there was a story.

Legend has it that the program master carries a duckling with him, and when debugging the code, he puts it on the table and explains each line of code in detail to the duck.

This story, deeply affecting a large part of the programmers, their table, usually put a lovely duckling.

 How many programming novices have been harmed by the "write more code" pit?2

Finally, to summarize, this article focuses on only two core points:

1. Write code with thought, not over and over again

2. After learning knowledge, don't be in a hurry to do it, try teaching to others first