Let's turn to a very interesting article. laruence should be very touched.
From: http://www.lupaworld.com/article-226245-1.html
An older boss asked me to have lunch yesterday. While waiting for food, we recalled the scenes of his company's start-up period. His sentence made me feel uncomfortable:
Oh, JP. I remember the time when you read the code written by Dan (the company's first developer and chief programmer), you said, "This code is not very well written and needs to be rewritten !"
Unfortunately, I didn't have the courage to tell him that I made a mistake. The Code does not need to be rewritten. Although I did think that the code was not very well written at that time, after years of experience, I found that most developers would think that the code written by others is not very good. Even the code they wrote many years ago does not seem to me very well. These people are probably right, because the Code (the code they think is not very good) is really not very good.
However, if you have to rewrite the code, I think it is a low-level error.
There were business assumptions made that you can't possibly know now. Plenty of unordered ented business assumptions that the Code will handle just fine. You can't possibly account for all of them. Some businesses
Suppose you may not know it all the time. Many business assumptions that are not documented, but the code can be properly processed. However, you cannot explain all business assumptions.
I like Joel Spolsky's article "what you never do:
We are programmers. What are programmers? In their hearts, they think they are architects. When they first went somewhere, the first thing they did was to flatten the land and build something magnificent from the ground up. We are not very excited about the repairs and supplements, optimization and improvement, and cultivation of flower beds. A straightforward saying is that programmers like to get involved from the very beginning of the project, rather than taking over half of the projects that others get)
There is a more subtle reason that programmers tend to like to leave the old Code and start from scratch, that is, they think the previous code is a mess. So there is an interesting phenomenon: they may be wrong. The reason is that this idea of "Previous Code mess" is actually based on a basic programming rule:
Writing code is often much easier than reading code.
This is why code reuse is so difficult. This is also why everyone in your team prefers to use different functions to break a long string into a string array. Since writing their own functions is both easy and interesting, they are reluctant to figure out how the previous functions are actually implemented.
According to this theory, you can ask any programmer today about the code they are writing. They will tell you, "Nothing is better than throwing them away from the beginning ."
When you hire a developer and want to rewrite the code that works normally, please resist this behavior. He may say that Java is slow and outdated. Ruby on Rails is the coolest choice. He may even give you a bunch of trendy words to persuade you. In any case, consider it carefully.