<<Clean Code>> Quotes: 17. Smells and Heuristics


C1: Inappropriate Information

C2: Obsolete comment

C3: Redundant Comment

C4: Poorly Written Comment

C5: Commented-Out Code


E1: Build Requires More Than One Step

E2: Tests Require More Than One Step


F1: Too Many Arguments

F2: Output Arguments

F3: Flag Arguments

F4: Dead Function


G1: Multiple Languages in One Source File

G2: Obvious behavior Is Unimplemented

G3: Incorrect Behavior at the Boundaries

G4: Overridden Safeties

G5: Duplication

G6: Code at Wrong Level of Abstraction

G7: Base Classes Depending on Their Derivatives

G8: Too Much Information

G9: Dead Code

G10: Vertical Separation

G11: Inconsistency

G12: Clutter

G 13: Artificial Coupling

G14: Feature Envy

G15: Selector Arguments

G16: Obscured Intent

G17: Misplaced Responsibility

G18: Inappropriate Static

G19: Use Explanatory Variables

G20: Function Names Should Say What They Do

G21: Understand the Algorithm

G22: Make Logical Dependencies Physical

G23: Prefer Polymorphism to If/Else or Switch/Case

G24: Follow Standard Conventions

G25: replace magic Numbers with Named Constants

G26: Be Precise

G27: Structure over Convention

G28: Encapsulate Conditionals

G29: Avoid Negative Conditionals

G30: Functions Should Do One Things

G31: Hidden Temporal Couplings

G32: Don’t Be Arbitrary

G33: Encapsulate Boundary Conditions

G34: Functions Should Descend Only One Level of Abstraction

G35: Keep Configurable Data at Hight Levels

G36: Avoid Transitive Navigation


J1: Avoid Long Import Lists by Using Wildcards

J2: Don’t Inherit Constants

J3: Constants versus Enums


N1: Choose Descriptive Names

N2: Choose Names at the Appropriate Level of Abstraction

N3: Use Standard Nomenclature Where Possible

N4: Unambiguous Names

N5: Use Long Names for Long Scopes

N6: Avoid Encodings

N7: Names Should Describe Side-Effects


T1: Insufficient Tests

T2: Use a Coverage Tool!

T3: Don’t Skip Trivial Tests

T4: An Ignored Test Is a Question about an Ambiguity

T5: Test Boundary Conditions

T6: Exhaustively Test Near Bugs

T7: Patterns of Failure Are Revealing

T8: Test Coverage Patterns can Be Revealing

T9: Tests Should Be Fast


A climber who enjoys skiing and scuba diving, and writes iOS code during the day. Made in China, evolving in the USA.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Coding Module 1 Review- 1st Post

Interactive password validation UX in Flutter using Flare (2Dimensions)

Ludum Dare 50 Post Mortem

A screenshot of my game for Ludum Dare 50 — International Shipping Simulator. You can see continents and a big ocean between them. The ports are connected with routes and you can see a lot of small ships traveling along the routes.

Init In Python

Up And To The Right

Magnet Weekly CTF — Week 7

3 Rules for Automating Complexity

Samples of my custom CSS

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Wenzhi Lin

Wenzhi Lin

A climber who enjoys skiing and scuba diving, and writes iOS code during the day. Made in China, evolving in the USA.

More from Medium

Summary of What I learned in Design Pattern: Composite

SOLID in Software Designing

Solid Principles:

Guide To Code Calligraphy: Introduction