ylioo

Core Programming Principles

Modules Should Be Deep

Information Hiding

General-Purpose Modules are Deeper

Different Layer, Different Abstraction

Bring together if information is shared

Bring together if it will simplify the interface

Bring together to eliminate duplication

Separate general-purpose and special-purpose code

Define Errors Out Of Existence

Design it Twice

Good code is self-documenting

Comments get out of date and become misleading

Comments Should Describe Things that Aren’t Obvious from the Code

Implementation comments: what and why, not how

Cross-module design decisions

Choosing Names

Write The Comments First

Comments are a design tool

Modifying Existing Code

Stay strategic

Maintaining comments: keep the comments near the code

Comments belong in the code, not the commit log

Consistency

Code Should be Obvious

Designing for Performance

Measure before modifying