A function that “mostly works” is a liability.
Great functions:
have one clear purpose
predictable inputs
obvious outputs
When a function tries to be helpful,
it usually becomes confusing.
Boring functions compose well.
Clever ones don’t.
Small, obvious functions are how systems stay sane.
– Serguey Asael Shinder
Top comments (0)