Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1.73 KB

intro.md

File metadata and controls

46 lines (34 loc) · 1.73 KB

The only valid measurement of code quality: WTFs / minute.

Bad code

As Uncle Bob wrote:

It was the bad code that brought the company down.

LeBlanc's law:

Later equals never.

The total cost of owning a mess:

As the mess builds, the productivity of the team continues to decrease,
asymptotically approaching to zero.

The grand redesign in the sky:

As the productivity becomes zero, the team wants a redesign.

Attitude

It is the programmer's job to defend the code with equal passion as
managers obsess about the schedule.

What is Clean code?

Grady Booch:

Clean code is simple and direct. Clean code reads like a well-written prose. Clean code never obscures the designer's intent but rather is full of crisp abstractions and straightforward lines of control.

Dave Thomas:

Clean code can be read, and enhanced by a developer other than its original author.

Michael Feathers:

Clean code is code left by someone who cares deeply about the craft.

Ron Jeffries:

  1. Runs all the tests
  2. Contains no duplication
  3. Expresses all the design ideas that are in the system
  4. Minimizes the number of entities such as classes, methods, functions..

Ward Cunningham:

You know you are working on clean code when each routine you read turns out to be pretty much what you expected.
You can call it beautiful code when the code also makes it look like the language was made for the problem.

It is not the language that makes programs appear simple. It is the programmer that make the language appear simple!

The ratio of time spent reading vs. writing is well over 10:1. We are constantly reading old code as part of the effort to write new code, so making it easy to read makes it easier to write.