📎 Webclip
Cognition-oriented Programming
The article argues that programming paradigms are useful, but they come after the way each person thinks. Because developers have different cognitive limits, the best code structure is the one that fits how they reason, remember, and move through a codebase.
It frames this as “cognition-oriented programming,” both for individuals and for teams. In teams, leaders should set objectives and boundaries, while developers shape maintainable interfaces and then optimize for their own cognition within those limits.
Reading notes#
- Programming gives developers great power, but they are still limited by their bodies and minds.
- Paradigms such as functional-oriented, object-oriented, and data-oriented programming are described as loose rulesets that help direct effort.
- The choice of paradigm depends partly on the system’s demands, such as response time and readability.
- The article says the main guide should be each person’s own cognition, since different people think about code differently.
- It gives a personal example of preferring files of no more than 150 lines and one class per file.
- The author argues that team leadership should define objectives and standards, not detailed methods.
- Within team constraints, developers can still optimize their code for their own cognitive style.
- Working memory is compared to L1 cache, with code comprehension depending on keeping only a small set of concepts active at once.
- The article presents flow as closely related to this optimized mental model.
- It recommends trying patterns, reading widely, and observing which structures make code feel easier to understand and modify.
- It advises not forcing one’s own patterns on others and not assuming others’ patterns will work the same way.
