SpaceSoft Reconstruction

zhaozj2021-02-16  85

1, never use globally replacement to handle content to be modified.

Be careful to check each modified place, think about these modifications, there is no new side effects in this place, especially those that are not completely written, or the last revised time is not short. Those who look like exactly the same, in the face of a correction, implied implicit meaning may be completely different. Don't handle it, you will hate yourself to do these modifications.

2, in any case, before modification, you must first determine the test code of this module. The more the path coverage is, the better, it is not good, it is better than not good.

The most important difference between reconstruction and chaos code is that each improvement is controllable. In the case of no unit testing, it is like building a high platform on the sand, in addition to labor injury, the only use is to improve the status of the configuration administrator in your mind.

3, small steps run, modify a little, test, don't think about all the modifications of your code, then test again.

The only way to turn a person into a fat man in 20 minutes is to put him into a fat man, you are also buddy, so don't believe in the myth of those who eat fat. I believe me, modifying that most of the code is tested to you. It is absolutely unsatisfactory to develop this module, because such modifications are already uncontrollable.

4, with a good version control tool.

At least, even if you change the focus, you can pick the precailed work when you don't pick it up. Although those guys are not good enough, those guys can run up to run?

5, don't believe that your brain is always awake, especially in the case of continuous overtime. Remember the things you want to do, not only you have to check it yourself, but also to run a test program.

The programmer does not have to work with the Middle East as a myth, the programmer is not fatigued, just like the Chinese team is just a dream. So don't be difficult to get your own brain, use the tools around you, gentlemen, ^ 0 ^

6. Don't wait until you want to understand and repeat it, because there is no difference between and rewrite again.

Starting from the easiest way, a little bit of your code, then test it, then continue moving. You will find a little reduction in the degree of chaos, clear logical structures slowly, and then you will find places that can be improved. So, gradually, a delicate code will appear. To be honest, software development is a craftsmanship, and good crafts are polished.

7. I think of it right away, if I don't want to interrupt your current ideas, I will write it down.

No, it is likely that you will forget it in a few days. "I have had a good idea in the first two days, what is it? Unfortunately I forgot."

Welcome to the author's personal homepage: http://www.mrspace.net/

转载请注明原文地址:https://www.9cbs.com/read-11620.html

New Post(0)