Next:
5S principles
clean code notes
bj
August 2019
5S principles
Clean Code
Meaningful Names
Functions
Function arguments
Comments
Formatting
Objects and Data Structures
Error Handling
Using Third Party Code/Libraries
Tests
Classes
Systems
Emergence
Concurrency
Successive Refinement
JUnit Internals
Refactoring SerialDate
Smells and Heuristics
Comments
Inappropriate Information
Obsolete Comment
Redundant Comment
Poorly written comment
Commented Out Code
Environment
Build Requires more than One Step
Tests Require More Than One Step
Functions
Too Many Arguments
Output Arguments
Flag Arguments
Dead Function
General
Obvious Behavior Is Unimplemented
Overridden Safeties
Duplication
Code at Wrong Level of Abstraction
Base Classes Depending on Their Derivatives
Too Much Information
Vertical Separation
Inconsistency
Artificial Coupling
Feature Envy
Obscured Intent
Inappropriate Static
Lack of Explanatory Variables
Function Names Should Say What They Do
Understand the Algorithm
Make Logical Dependencies Physical
Follow Standard Specifications
Replace Magic Numbers with Named Constants
Encapsulate Conditionals
Hidden Temporal Couplings
Encapsulate Boundary Conditions
Functions Descending More Than One Level of Abstraction
Keep Configurable Data at High Levels
Avoid Transitive Navigation
Names
Choose Names at the Appropriate Level of Abstraction
Use Standard Nomenclature Where Possible
Use Long Names for Long Scopes
Avoid Encodings
Names Should Describe Side Effects
Tests
An Ignored Test Is a Question About an Ambiguity
Exhaustively Test Near Bugs
Notice Patterns in Multiple Failed Tests
About this document ...
bj 2019-09-22