Refactoring: Improving the Design of Existing Code (Addison-Wesley Signature Series (Fowler))
Rate it:
Open Preview
8%
Flag icon
So, my overall advice on performance with refactoring is: Most of the time you should ignore it. If your refactoring introduces performance slow-downs, finish refactoring first and do performance tuning afterwards.
13%
Flag icon
we can go beyond taste and say that the true test of good code is how easy it is to change it.
13%
Flag icon
Refactoring (noun): a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior.
13%
Flag icon
If someone says their code was broken for a couple of days while they are refactoring, you can be pretty sure they were not refactoring.
14%
Flag icon
statement Kent Beck often makes about himself: “I’m not a great programmer; I’m just a good programmer with great habits.”
14%
Flag icon
Done well, my code base turns into a platform for building new features for its domain.
15%
Flag icon
The whole purpose of refactoring is to make us program faster, producing more value with less effort.
17%
Flag icon
My colleague Pramod Sadalage developed an approach to evolutionary database design [mf-evodb] and database refactoring [Ambler & Sadalage] that is now widely used.
18%
Flag icon
The third approach to performance improvement takes advantage of this 90-percent statistic. In this approach, I build my program in a well-factored manner without paying attention to performance until I begin a deliberate performance optimization exercise.
18%
Flag icon
I’ve found that refactoring helps me write fast software. It slows the software in the short term while I’m refactoring, but makes it easier to tune during optimization. I end up well ahead.
18%
Flag icon
A technology that’s currently gaining momentum is Language Servers [langserver]: software that will form a syntax tree and present an API to text editors.
18%
Flag icon
Bill Wake’s Refactoring Workbook [Wake] that contains many exercises to practice refactoring.
19%
Flag icon
Refactoring to Patterns [Kerievsky], which looks at the most valuable patterns from the hugely influential “Gang of Four” book [gof] and shows how to use refactoring to evolve towards them.
19%
Flag icon
Refactoring Databases [Ambler & Sadalage] (by Scott Ambler and Pramod Sadalage) and Refactoring HTML [Harold] (by Elliotte Rusty Harold).
19%
Flag icon
Michael Feathers’s Working Effectively with Legacy Code [Feathers], which is primarily a book about how to think about refactoring an older codebase with poor test coverage.
19%
Flag icon
“If it stinks, change it.” — Grandma Beck, discussing child-rearing philosophy
19%
Flag icon
Puzzling over some text to understand what’s going on is a great thing if you’re reading a detective novel, but not when you’re reading code.
19%
Flag icon
In our experience, the programs that live best and longest are those with short functions.
19%
Flag icon
A heuristic we follow is that whenever we feel the need to comment something, we write a function instead. Such a function contains the code that we wanted to comment but is named after the intention of the code rather than the way it works.
20%
Flag icon
We structure our software to make change easier; after all, software is meant to be soft.
20%
Flag icon
The fundamental rule of thumb is to put things together that change together.
21%
Flag icon
Some people consider any method chain to be a terrible thing. We are known for our calm, reasoned moderation. Well, at least in this case we are.
22%
Flag icon
As with a class with too many instance variables, a class with too much code is a prime breeding ground for duplicated code, chaos, and death.
22%
Flag icon
comments are often used as a deodorant.
22%
Flag icon
I’m a pretty lazy person and am prepared to work quite hard in order to avoid work.
23%
Flag icon
Writing the test also concentrates me on the interface rather than the implementation
25%
Flag icon
I’ve been even happier to see the change in attitudes to testing. Previously seen as the responsibility of a separate (and inferior) group, testing is now increasingly a first-class concern of any decent software developer. Architectures often are, rightly, judged on their testability.
25%
Flag icon
Some people advocate using test coverage [mf-tc] as a measure, but test coverage analysis is only good for identifying untested areas of the code, not for assessing the quality of a test suite.
25%
Flag icon
The best measure for a good enough test suite is subjective: How confident are you that if someone introduces a defect into the code, some test will fail?
84%
Flag icon
[Forsgren et al.] Nicole Forsgren, Jez Humble, and Gene Kim. Accelerate: The Science of Lean Software and DevOps: Building and Scaling High Performing Technology Organizations. IT Revolution Press, 2018. ISBN 1942788339.