Turn Hotspot Methods into Brain-Friendly Chunks
The advantage of a refactoring like the splinter pattern is that it puts a name on a specific concept. Naming our programming constructs is a powerful yet simple technique that ties in to the most limiting factor we have in programming—our working memory.
Working memory is a cognitive construct that serves as the mental workbench of your brain. It lets you integrate and manipulate information in your head. Working memory is also a strictly limited resource and programming tasks stretch it to the maximum.
We saw back in Your Mental Models of Code, that optimizing code for programmer understanding is one of the most important choices we can make. This implies that when we’re writing code our ...
Get Software Design X-Rays now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.