I don't even know if this question makes sense ... but let me let you grok it...
imagine ... You're totally absorbed into some programming thought/idea/concept, your brain is in its most active state thinking up a solution to a problem, or as Joel Spolsky puts it -- you're deep into your "zone" -- AND, suddenly someone or some event breaks your engrossment -- something that you just can't avoid, something you have to attend to. ... imagination complete .. back to reality
Something that can break your concentration can be...
- you're summoned for an urgent meeting
- your code broke the daily build and your colleague is calling you
- you just recalled something you had to do but forgot doing it
- your teammate has some exciting news to break and insists you to listen
- your girlfriend (or boyfriend) has just come over
Now assume you've got only 5-10 minutes before you have to leave what you were deeply into, and entertain the interruption.
My question is -- how do you, quickly "save" the state of mind you were in, when the diversion came. Do you write it in "some form" on a paper or computer, or do you just "remember" it somehow. How do you salvage those exact thoughts within 5-10 minutes so that later on when you come back you can catch up right from the "point" you left.
It often so happens to me that i just can't recollect those exact thoughts I was thinking before the blow -- and i feel like I've lost a good idea or solutions to a problem. i try to think retroactively trying hard to get to that SAME cognitive state that had me excited about an idea -- but i get frustrated not being able to "get there".
Does something like this happen to you. how do you "recover" from this?
My main concern is not code -- it's those "abstract ideas" that haven't been yet converted into code that i need to "save" somehow.
-- update --
After these many years, I can confidently say, there's NO possible way to do this. No amount of scribbling your cognitive state onto a piece of paper will allow you to restore it exactly the way it was. Our brains are much more complex than a measly snippet's worth of scribble, when it comes to the information it holds actively at any point in time.
The best way is to avoid the distraction, no matter how important, unless, it's a life and death situation. Nothing is more important than being in the zone and finishing it.
If your workplace is naive enough to not appreciate someone's "being in the zone", then time to look for a new workplace. YMMV though. And with the personal relations, it's social skills and a pinch of articulateness that can do a world of good.