Sorrow for young programmers

Source: Internet
Author: User
: This article mainly introduces the grief of young programmers. if you are interested in the PHP Tutorial, you can refer to it. This is not the first job experience as a young programmer. However, his first project proved to be faulty. At that time, he thought that the function would not need to be changed. But he is wrong, so every function change needs to be completely reconstructed, resulting in a huge waste of time and bug. He even tried some benign methods, such as writing tests. However, his test needs to be maintained, and the preparation time and more time are required to be executed.

Like every young developer, his growth path is the voice of experienced developers. "premature optimization is the root of evil !", And "write test! Test! Test !". Maybe he is only refactoring a small practical method, but at this time, experienced developers came over and solemnly warned him, "didn't you tell me that you can't optimize it too early? ", Or "Are you writing a test ?".

However, young developers often go straight to the left ear to the right ear. Because they don't understand why early optimization should be the root of evil and why they should write a test. From his limited experience, he believes that the following technical indicators cannot work for a long time (because they often change), and writing tests is a waste of time.

"Why do I need to rewrite the code every time? Why does it need to be reconstructed after I write the code? Why do I have to spend so much time writing useless tests? "The young developers are roaring.

Finally, one day, the young developers started a new project. This time, he decided to ignore the warning of experienced developers: he believed that every piece of code he wrote would be fast, configurable, and powerful, each time the parameter specification is changed. After he racked his brains to solve the core of the project, the young developers couldn't help but get up: "Haha, I am wrong to say the 'old geold !" As if it was a triumph, the light of victory appeared in the eyes of young developers.

However, after a period of release ......

One day, the customer told them that the program found a bug. Experienced developers read the bug and find the problem. They asked the young developers to fix the bug.

When I heard that my code was deprecated, the young developers first felt angry. But after reading the project ...... But he found that he could not understand the code he wrote! He can't fully understand the meaning of the code! Oh, my God!

But there is no way. this is his problem. he can only stick to his head. well, he finally fixed the bug-but a new bug appeared in a few days. Bug-patch, bug-patch, and so on.

The young developers are about to crash. "Maybe I am not suitable for this kind of work. Otherwise, how can I always write my code ?" Young developers are skeptical about opening up projects of experienced developers. He was shocked! The code is so easy to understand-with comments and tests. This is completely different from the code he wrote. The obvious difference is that there is no additional configuration, every line of code is tested, and every method has a meaningful name, and the method is very short (the longest is only dozens of lines of code), the code only does what the customer requires to do.

At that moment, the young developers were very frustrated, but experienced developers came and walked to the young developers, while taking the lead, he is already thinking about how to refactor the wrong code.

During the cooperation to solve the problem, the young developers witnessed the step-by-step troubleshooting process by experienced developers; sometimes experienced developers also supervise young developers to write code.

Several days later, another release marked that the bug had been fixed. The code snippet that caused the bug has now been tested, which is not only easy to read, but also very stable. Experienced developers look at young developers and ask, "Do you understand now ?"

The young developer nodded. Now he does understand. To be perfect, the key is not to be able to predict the future, but to write code that is easy to change and tested (so that it will not cause bugs if you want to change the code ), in addition, you only need to meet the current needs. When he realized this, he had become an "almost" experienced developer.

"Do we need to reconstruct the entire project now ?" Ask a young developer.

"Of course not! There is no budget ." Experienced developers can answer this question with a piece of cake.

"But what if there are other bugs ?" Ask a young developer.

"We can allow freelancers to solve those problems ." Experienced developers reply.

Then, "almost" experienced developers began to write excellent code, gradually approaching a higher level. Of course, this is another story.

Suggestions for young developers: Please go back and look at the code you have written. if your code does not seem as beautiful as it was before, it means you are making progress.

Suggestions for experienced developers: when a young developer appears around you, you may need to clean up the mess for them from time to time. If you want to get rid of this situation, let them learn to write proper code as soon as possible.

Suggestions for freelancers: you may have to raise your reward.

Get free LAMP Brothers original PHP video tutorial CD/the elaborate PHP Essentials edition, details consulting official website Customer Service: http://www.lampbrother.net

PHPCMS secondary development http://yun.itxdl.cn/online/phpcms/index.php? U = 5

Develop http://yun.itxdl.cn/online/weixin/index.php? U = 5

Mobile internet server development http://yun.itxdl.cn/online/server/index.php? U = 5

Javascript http://yun.itxdl.cn/online/js/index.php course? U = 5

CTO training camp http://yun.itxdl.cn/online/cto/index.php? U = 5

The above introduces the sorrow of young programmers, including some content, and hopes to help those who are interested in PHP tutorials.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.