Welcome, this is Dr. Cu.

Lonely in the Dessert.

Clean Code

What is clean code?

Here are some words quoted from famous guys.

    "I like my code to be elegant and efficient. The logic should be straightforward to make it hard for bugs to hide, the dependencies minimal to ease maintenance, error handling complete according to an articulated strategy and performance close to optimal so as not to tempt people to make the code messy with unprincipled optimizations. Clean code does one thing well."

—Bjarne Stroustrup

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

—Grady Booch

    "Clean code can be read, and enhanced by a developer other than its original author. It has unit and acceptance tests. It has meaningful names. It provides one way rather than many ways for doing one thing. It has minimal dependencies, which are explicitly defined, and provides a clear and minimal API. Code should be literate since depending on the language, not all necessary information can be expressed clearly in code alone."

—Dave Thomas

    "In recent years I begin, and nearly end, with Beck's rules of simple code. In priority order, simple code: (a) Runs all the tests (b) Contains no duplication (c) Expresses all the design ideas that are in the system (d) Minimizes the number of entities such as classes, methods, functions, and the like."

—Ron Jeffries