logo

Quotes from Robert C. Martin

On the other hand, a system being developed by five different teams, each of which includes seven developers, cannot make progress unless the system is divided into well-defined components with reliably stable interfaces. If no other factors are considered, the architecture of that system will likely evolve into five components—one for each team.
~ Robert C. Martin
The primary cost of maintenance is in spelunking and risk. Spelunking is the cost of digging through the existing software, trying to determine the best place and the best strategy to add a new feature or to repair a defect.
~ Robert C. Martin
Software has two types of value: the value of its behavior and the value of its structure. The second of these is the greater of the two because it is this value that makes software soft.
~ Robert C. Martin
The way you keep software soft is to leave as many options open as possible, for as long as possible. What are the options that we need to leave open? They are the details that don't matter.
~ Robert C. Martin
If you can develop the high-level policy without committing to the details that surround it, you can delay and defer decisions about those details for a long time. And the longer you wait to make those decisions, the more information you have with which to make them properly.
~ Robert C. Martin
What makes a clean test? Three things. Readability, readability, and readability.
~ Robert C. Martin
If a test in the same package needs to call a function or access a variable, we'll make it protected or package scope.
~ Robert C. Martin
What if the decisions have already been made by someone else? What if your company has made a commitment to a certain database, or a certain web server, or a certain framework? A good architect pretends that the decision has not been made, and shapes the system such that those decisions can still be deferred or changed for as long as possible. A good architect maximizes the number of decisions not made.
~ Robert C. Martin
Providing too much detail can be an invitation for micro-management.
~ Robert C. Martin
The fact that we did not have a database running for 18 months of development meant that, for 18 months, we did not have schema issues, query issues, database server issues, password issues, connection time issues, and all the other nasty issues that raise their ugly heads when you fire up a database. It also meant that all our tests ran fast, because there was no database to slow them down.
~ Robert C. Martin
Programmers can practice in a similar fashion using a game known as ping-pong.8 The two partners choose a kata, or a simple problem. One programmer writes a unit test, and then the other must make it pass. Then they reverse roles.
~ Robert C. Martin
A use case is a description of the way that an automated system is used. It specifies the input to be provided by the user, the output to be returned to the user, and the processing steps involved in producing that output. A use case describes application-specific business rules as opposed to the Critical Business Rules within the Entities.
~ Robert C. Martin
For example, class names including weasel words like Processor or Manager or Super often hint at unfortunate aggregation of responsibilities.
~ Robert C. Martin
The goal of software architecture is to minimize the human resources required to build and maintain the required system.
~ Robert C. Martin
Dijkstra realized that these "good" uses of goto corresponded to simple selection and iteration control structures such as if/then/else and do/while. Modules that used only those kinds of control structures could be recursively subdivided into provable units.
~ Robert C. Martin
Good software systems begin with clean code. On the one hand, if the bricks aren't well made, the architecture of the building doesn't matter much. On the other hand, you can make a substantial mess with well-made bricks. This is where the SOLID principles come in.
~ Robert C. Martin
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
~ Robert C. Martin
Flag arguments are ugly. Passing a boolean into a function is a truly terrible practice.
~ Robert C. Martin
The problem that Dijkstra recognized, early on, was that programming is hard, and that programmers don't do it very well.
~ Robert C. Martin
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.
~ Robert C. Martin
The folks who think that code will one day disappear are like mathematicians who hope one day to discover a mathematics that does not have to be formal. They are hoping that one day we will discover a way to create machines that can do what we want rather than what we say. These machines will have to be able to understand us so well that they can translate vaguely specified needs into perfectly executing programs that precisely meet those needs. This will never happen.
~ Robert C. Martin
This is the philosophy of YAGNI: "You aren't going to need it." There is wisdom in this message, since over-engineering is often much worse than under-engineering. On the other hand, when you discover that you truly do need an architectural boundary where none exists, the costs and risks can be very high to add such a boundary.
~ Robert C. Martin
Consider, for example, the truly hideous practice of creating a variable named klass just because the name class was used for something else.
~ Robert C. Martin
Who can justify the expense of a six-lane highway through the middle of a small town that anticipates growth? Who would want such a road through their town?
~ Robert C. Martin