If you let the tests rot, then your code will rot too. Keep your tests clean.
Indeed, many of the recommendations in this book are controversial. You will probably not agree with all of them.
What this team did not realize was that having dirty tests is equivalent to, if not worse than, having no tests.
Good software designs accommodate change without huge investments and rework. When we use code that is out of our control, special care must be taken to protect our investment and make sure future change is not too costly.
We want our code to be a quick skim, not an intense study.
It is unit tests that keep our code flexible, maintainable, and reusable. The reason is simple. If you have tests, you do not fear making changes to the code! Without tests every change is a possible bug.
This is the monstrosity in love, lady, that the will is infinite, and the execution confined; that the desire is boundless, and the act a slave to limit. – William Shakespeare.
The goal of software architecture is to minimize the human resources required to build and maintain the required system.
The proper use of comments is to compensate for our failure to express ourself in code. Note that I used the word failure. I meant it. Comments are always failures.
Programming is an act of creation. When we write code we are creating something out of nothing. We are boldly imposing order upon chaos. We are confidently commanding, in precise detail, the behaviors of a machine that could otherwise do incalculable damage. And so, programming is an act of supreme arrogance. Professionals.
Adding manpower to a late project makes it later.
If a change to the requirements breaks your architecture, then your architecture sucks.
All race conditions, deadlock conditions, and concurrent update problems are due to mutable variables.
The true professional knows that delivering function at the expense of structure is a fool’s errand. It is the structure of your code that allows it to be flexible. If you compromise the structure, you compromise the future.
If you think good architecture is expensive, try bad architecture. – Brian Foote and Joseph Yoder.
Factories are a complexity that can often be avoided, especially in the early phases of an evolving design.
Without tests every change is a possible bug. No.
A good manager drives a project to be good enough, fast enough, cheap enough, and done as much as necessary. A good manager manages the coefficients on these attributes rather than demanding that all those coefficients are 100%. It is this kind of management that Agile strives to enable.
We programmers simply do not know how long things will take. This isn’t because we are incompetent or lazy; it’s because there is simply no way to know how complicated a task is going to be until that task is engaged and finished. But, as we’ll see, all is not lost.
One of the more common motivations for writing comments is bad code.