Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 307 Bytes

no_mental_mapping.md

File metadata and controls

19 lines (14 loc) · 307 Bytes

Avoid Mental Mapping

Explicit is better than implicit. Clarity is king.

Bad:

const u = getUser();
const s = getSubscription();
const t = charge(u, s);

Good:

const user = getUser();
const subscription = getSubscription();
const transaction = charge(user, subscription);