Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin Series)
Rate it:
Open Preview
3%
Flag icon
Seiri, or organization (think “sort” in English).
3%
Flag icon
Seiton, or tidiness (think “systematize” in English).
4%
Flag icon
Seiso, or cleaning (think “shine” in English):
4%
Flag icon
Seiketsu, or standardization:
4%
Flag icon
Shutsuke, or discipline
4%
Flag icon
neatness “as a remedy for every degree of evil.”
4%
Flag icon
He who is faithful in little is faithful in much.
4%
Flag icon
You should name a variable using the same care with which you name a first-born child.
4%
Flag icon
Quality is the result of a million selfless acts of care—
5%
Flag icon
I know of one company that, in the late 80s, wrote a killer app. It was very popular, and lots of professionals bought and used it. But then the release cycles began to stretch. Bugs were not repaired from one release to the next. Load times grew and crashes increased. I remember the day I shut the product down in frustration and never used it again. The company went out of business a short time after that.
5%
Flag icon
The answer confirmed my fears. They had rushed the product to market and had made a huge mess in the code. As they added more and more features, the code got worse and worse until they simply could not manage it any longer. It was the bad code that brought the company down.
5%
Flag icon
Perhaps you felt that you didn’t have time to do a good job; that your boss would be angry with you if you took the time to clean up your code. Perhaps you were just tired of working on this program and wanted it to be over.
5%
Flag icon
Every change they make to the code breaks two or three other parts of the code. No change is trivial. Every addition or modification to the system requires that the tangles, twists, and knots be “understood” so that more tangles, twists, and knots can be added. Over time the mess becomes so big and so deep and so tall, they can not clean it up. There is no way at all.
5%
Flag icon
does the only thing they can; they add more staff to the project in hopes of increasing productivity.
5%
Flag icon
The Grand Redesign in the Sky Eventually the team rebels. They inform management that they cannot continue to develop in this odious code base. They demand a redesign. Management does not want to expend the resources on a whole new redesign of the project, but they cannot deny that productivity is terrible. Eventually they bend to the demands of the developers and authorize the grand redesign in the sky.
6%
Flag icon
they have to keep up with the changes that are continuously being made to the old system.
6%
Flag icon
Have you ever waded through a mess so grave that it took weeks to do what should have taken hours? Have you seen what should have been a one-line change, made instead in hundreds of different modules?
6%
Flag icon
We complain that the requirements changed in ways that thwart the original design. We bemoan the schedules that were too tight to do things right. We blather about stupid managers and intolerant customers and useless marketing types and telephone sanitizers. But the fault, dear Dilbert, is not in our stars, but in ourselves.
6%
Flag icon
The Primal Conundrum Programmers face a conundrum of basic values. All developers with more than a few years experience know that previous messes slow them down. And yet all developers feel the pressure to make messes in order to meet deadlines. In short, they don’t take the time to go fast! True professionals know that the second part of the conundrum is wrong. You will not make the deadline by making the mess. Indeed, the mess will slow you down instantly, and will force you to miss the deadline. The only way to make the deadline—the only way to go fast—is to keep the code as clean as ...more
6%
Flag icon
The “code-sense” will help that programmer choose the best variation and guide him or her to plot a sequence of behavior preserving transformations to get from here to there.
6%
Flag icon
The logic should be straightforward to make it hard for bugs to hide,
6%
Flag icon
the dependencies minimal to ease maintenance,
6%
Flag icon
performance close to optimal so as not to tempt people to make the code messy with un...
This highlight has been truncated due to consecutive passage length restrictions.
6%
Flag icon
Bad code tries to do too much,
6%
Flag icon
Clean code is focused. Each function, each class, each module exposes a single-minded attitude that remains entirely undistracted, and unpolluted, by the surrounding details.
6%
Flag icon
Clean code always looks like it was written by someone who cares.
7%
Flag icon
When the same thing is done over and over, it’s a sign that there is an idea in our mind that is not well represented in the code.
7%
Flag icon
If it’s a method, I will always use the Extract Method refactoring on it, resulting in one method that says more clearly what it does, and some submethods saying how it is done.
7%
Flag icon
The next time you write a line of code, remember you are an author, writing for readers who will judge your effort.
7%
Flag icon
Because this ratio is so high, we want the reading of code to be easy, even if it makes the writing harder.
7%
Flag icon
So if you want to go fast, if you want to get done quickly, if you want your code to be easy to write, make it easy to read.
7%
Flag icon
Leave the campground cleaner than you found it.
7%
Flag icon
The cleanup doesn’t have to be something big.
8%
Flag icon
Agile Software Development: Principles, Patterns, and Practices (PPP).
8%
Flag icon
Choosing good names takes time but saves more than it takes.