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 ge...
Encapsulation is important, but the reason why it is important is more important. Encapsulation helps us reason about our code.
Remember, code is your house, and you have to live in it.
Brush, Pattern *backdrop) {
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 r...
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...
Teams take serious chances when they try to make large changes without tests. It is like doing aerial gymnastics without a net.
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 u...
To me, legacy code is simply code without tests.
We can’t let best be the enemy of better.
The fact remains: Good design is testable, and design that isn’t testable is bad.
The most subtle bugs that we can inject are bugs related to inheritance.
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,
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
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 syste...
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...