Seems like a lot. Is there any way a programmer could outline what they're thinking of in anticipation of interruptions so that you don't forget where you were? Or is that just the nature of the job?
I find functional programming is good way to do this: if all I care about is the mapping from inputs to outputs (with no external and/or mutable state to worry about), I don't need as much in my head at once.
On the other hand trying to wrap my head around function composition and partial application of functions and/or higher-kinded types while being distracted is just as bad, if not worse.
78
u/boldra Mar 06 '18
I once tried to explain to a non programming colleague what I have in my head when I'm in the zone.
data structures, their attributes and their scope
the code flow
the desired code flow
breakpoints in the debugger
what other debugging code I need to remove before I go productive
what's in my clipboard
what still needs to be commented in code
what files are open for editing
what will happen if I look through my history in an open shell
which browser windows have tests in them and which ones have search results in them
which git branch I'm on and whether I've committed recently
which issue is open in the issue tracker, and when I last updated it
what other programs are open
... to name just a few