Locus of Attention
As you work with your code today, consider how you have it organized.
Hi! I'm Jim, the author of Clean Ruby and Ruby DSL Handbok and you're receiving this message because you signed up to join my mailing list.
Hey there, John
I want to give you something to think about today as you work with your code.
Locus of Attention.
One of the problems that DCI can help us address is properly managing our Locus of Attention when we are reading and understanding our code. Human beings only have 1 Locus of Attention; we can only focus on one thing at a time (despite our attempts to do otherwise).
As you work with your code today, consider the way you have it organized.
- What design patterns are you following?.
- What conventions do you use from a framework or from within your own codebase?
- Are you building a framework for yourself within your own code?
- When you read your code, consider why conventions so important. Why do we care so much about Rails being convention over configuration?
It's all to simplify and focus our Locus of Attention.
The less thinking you need to do, the more productive and more effective you can be in every task you perform. Often people refer to "context switching" being a problem; that's because it is a change of your Locus of Attention, and that's an expensive mental task.
Take a few minutes to watch this presentation by Dr. Debra Davis about Locus of Attention.
Consider what perceptions you have as you write and review code and whether or not those perceptions are reinforced by memory. Are you working with code that guides your attention to the best place? Does your code cause you to jump from one thing to the next, piecing together your mental model?
Today, as you code your way around problems or refactor your existing code, consider your Locus of Attention.
How often does your Locus of Attention change?
Can you make it change less often?
Saturn Flyer LLC, 2321 S. Buchanan St., Arlington, VA 22206, United States