CodeThe bad taste section describes common bad code and is basically popular with variousProgramming Language.
6th ~ Chapter 11 summarizes some refactoring techniques in Java, which are based on the Reconstruction notes in the actual operation process.ProgramYou can choose to read it.
Refactoring involves many opposite operations such as refining and inline functions, which may confuse people. What exactly do they follow? Congratulations, you have noticed this, which means we are not
Nerd. All you have to do is go further and find out why the function is refined? Why inline functions? In practice, you may go back and forth in the two opposite operations. You cannot determine which one is good. In fact
Fowler also tells you that things are evolving, the Code environment is constantly changing, and the code has to be changed from time to time. You only need to read these refactoring techniques, and then you can think of code with bad taste.
It seems like there is something in this book.
What is refactoring? What
-- Chapter 2
Why rebuild? Why
-- Chapter 2
Where can we reconstruct it? Where
-- Chapter 3
When to refactor? When
-- Chapter 2
How to refactor? How
-- 4 ~ Chapter 14
Who will refactor it? Who
-- You
Bold reconstruction, nowhere to do without reconstruction
Code needs to be restructured, just like people need to exercise
Code needs to be restructured, just as people need to exercise. Do not exercise, of course, you can still live, but if you want to live well, live for a long time, live with passion, exercise is essential.
What else can refactoring do in addition to code activity? Maybe one of your refactoring has given birth to a new great feature. Maybe you may not be aware of refactoring fashion, but restructuring or restructuring
However, this feature is quite good, and has even gradually become a major feature. It is not necessarily necessary to change the competition rules of similar software even when the software moves forward. How does Firefox introduce extended functions?
I do not know, but now there is no extension function, it is not called a browser.