Working Effectively with Legacy Code Quotes

Rate this book
Clear rating
Working Effectively with Legacy Code Working Effectively with Legacy Code by Michael C. Feathers
3,423 ratings, 4.12 average rating, 185 reviews
Open Preview
Working Effectively with Legacy Code Quotes Showing 1-20 of 20
“Code without tests is bad code. It doesn't matter how well written it is; it doesn't matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behavior of our code quickly and verifiably. Without them, we really don't know if our code is getting better or worse.”
Michael Feathers, Working Effectively with Legacy Code
“Programming is the art of doing one thing at a time”
Michael Feathers, Working Effectively with Legacy Code
“Legacy code. The phrase strikes disgust in the hearts of programmers. It conjures images of slogging through a murky swamp of tangled undergrowth with leaches beneath and stinging flies above. It conjures odors of murk, slime, stagnancy, and offal. Although our first joy of programming may have been intense, the misery of dealing with legacy code is often sufficient to extinguish that flame.”
Michael Feathers, Working Effectively with Legacy Code
“Encapsulation is important, but the reason why it is important is more important. Encapsulation helps us reason about our code.”
Michael C. Feathers, Working Effectively with Legacy Code
“Remember, code is your house, and you have to live in it.”
Michael C. Feathers, Working Effectively with Legacy Code
“To me, legacy code is simply code without tests.”
Michael C. Feathers, Working Effectively with Legacy Code
“Tests that take too long to run end up not being run.”
Michael Feathers, Working Effectively with Legacy Code
“In a well-maintained system, it might take a while to figure out how to make a change, but once you do, the change is usually easy and you feel much more comfortable with the system. In a legacy system, it can take a long time to figure out what to do, and the change is difficult also.”
Michael C. Feathers, Working Effectively with Legacy Code
“Encapsulation is a good thing, right? Well, don’t ask testers about that; they are liable to bite your head off. Classes that are too big often hide too much. Encapsulation is great when it helps us reason about our code and when we know that certain things can be changed only under certain circumstances. However, when we encapsulate too much, the stuff inside rots and festers. There isn’t any easy way to sense the effects of change, so people fall back on Edit and Pray (9) programming. At that point, either changes take far too long or the bug count increases. You have to pay for the lack of clarity somehow.”
Michael C. Feathers, Working Effectively with Legacy Code
“How do I test private methods?” Many people spend a lot of time trying to figure out how to get around this problem, but, as I mentioned in an earlier chapter, the real answer is that if you have the urge to test a private method, the method shouldn’t be private; if making the method public bothers you, chances are, it is because it is part of a separate responsibility. It should be on another class.”
Michael C. Feathers, Working Effectively with Legacy Code
“Big classes can hide too much. This question comes up over and over again from people new to unit testing: “How do I test private methods?” Many people spend a lot of time trying to figure out how to get around this problem, but, as I mentioned in an earlier chapter, the real answer is that if you have the urge to test a private method, the method shouldn’t be private; if making the method public bothers you, chances are, it is because it is part of a separate responsibility. It should be on another class.”
Michael C. Feathers, Working Effectively with Legacy Code
“The most subtle bugs that we can inject are bugs related to inheritance.”
Michael C. Feathers, Working Effectively with Legacy Code
“Over time, the system will get better as long as people aren’t introducing duplication behind your back. If they are, you can take steps with them short of physical violence, but that is another issue.”
Michael C. Feathers, Working Effectively with Legacy Code
“Effective software change, like effective surgery, really involves deeper skills. Working with care doesn’t do much for you if you don’t use the right tools and techniques. Cover”
Michael C. Feathers, Working Effectively with Legacy Code
“The fact remains: Good design is testable, and design that isn’t testable is bad.”
Michael C. Feathers, Working Effectively with Legacy Code
“we can’t let “best” be the enemy of “better.”
Michael C. Feathers, Working Effectively with Legacy Code
“Teams take serious chances when they try to make large changes without tests. It is like doing aerial gymnastics without a net.”
Michael C. Feathers, Working Effectively with Legacy Code
“system will get better as long as people aren’t introducing duplication behind your back. If they are, you can take steps with them short of physical violence,”
Michael C. Feathers, Working Effectively with Legacy Code
“*brush, Pattern *backdrop)     {      ”
Michael C. Feathers, Working Effectively with Legacy Code
“Superficially, Edit and Pray seems like “working with care,” a very professional thing to do. The “care” that you take is right there at the forefront, and you expend extra care when the changes are very invasive because much more can go wrong. But safety isn’t solely a function of care.”
Michael C. Feathers, Working Effectively with Legacy Code