Coping with context-switching madness
kreeben.tumblr.com
kreeben.tumblr.com
I can have several projects on the go at one time, and need to provide technical support to various customers "on-demand". My coping strategies are:
I context switch as little as possible and try to spend at least a solid day on each project. Of course the support calls scupper this when they come in.
I've persuaded my boss to either email, or save up all his attention-breaking calls into a single one each day.
I have a text file for each project into which I log what I'm doing and why. You probably know what it's like to be several levels down your stack, "in the zone", when a call comes in. By adding just a line or two, indented, I can quickly recover where I was. eg:
Starting to build routine XYZ
Need to add new table ABC to database
User will need maintenance for that. ToDo.
Ask Joe to add it to testing. done.
Table added.
Create AA class
Need a new SQL view for that
Created view
If this gets more complex in future, consider changing to an SP.
Added to deployment file
Would this class be better split?
That would make for better design, but time is limited now
Not convinced UserView belongs in here...
... RING... RING... aggghhhh... mental construct collapses in a heap.I also add comments in there about ideas, changes, problems. If I don't get to pick the project back up for a week or two, I can read the last few dozen lines and get back to where I was. It's also invaluable for recalling why something was done or not, and what else was considered. Using a simple text file allows a bunch of projects to be "grepped" for specific key words very quickly.
Unfortunately as you become more responsible for the management of your peers and projects, you will experience this problem more and more. Some people cope by having a context switching role during office hours and after hours get a good 1 or 2 hours of solid dev work in, others book their own time out, and close their door signaling they are unavailable. Unfortunately this isn't always possible, you'll always get colleagues / clients that still bash your door to get some time with you.
But being in this transition phase between the two worlds is definitely one of the biggest challenges every dev faces. Best of luck.
One thing though, having more personnel will not solve this problem, only make it worse, as you now will have even more people reporting to you and which you have to keep busy.
There was not exactly a ban on interrupting developers, but there was a culture against it (and there were things that were explicitly always okay to interrupt a developer for; e.g. a bug found by a customer).
For example, during brief idle times (e.g. while you're waiting for something to download/upload/compile), don't do stuff that requires you to concentrate hard.
If you do, you're effectively "unloading" the previous context from your brain and replacing it with something else (e.g. dealing with email). Then, when the thing finishes downloading/uploading/compiling, you have to "reload" the original context. That's two context-switches that you don't really need to do.
I used to be a trader, which requires a lot of high-pressure, high-focus context-switching, most of it interrupt-driven. During brief downtimes, we wouldn't try to get something else done - we'd let our brains relax by goofing off, talking about crap/sports/girls/whatever, shooting Airzooka or Nerf guns at one another, playing practical jokes, giving one another shit, etc.
That sort of stuff doesn't require a context switch in your brain because you don't have to concentrade - you just let your brain relax (like letting a CPU sleep while it's waiting for input). When a work-related interrupt arrives, you just drop the goofing off and concentrate on work stuff again.
It may sound like you're wasting time by not filling every minute of the day with productive work but, overall, you'll probably be more productive because, althought you're spending less time actually working, the quality of your work will be higher. Plus, you won't feel as exhausted at the end of the day/week.
http://faq.sealedabstract.com/uninterruptible_programming_su...
What I mean is that many people, inherently are more chaotic, and over-structuring their lives is counter productive. It could make productivity constant but overall worse.
Thinking about psychology of this, I believe this might be good to "right brained" types, but it would be such a burden for someone who solves problems mainly via extroverted intuition - random thoughts that are generated so quickly and without any structure - you would need to write down something every few seconds basically, forget about actually doing something.
Obviously it won't work for everyone, but it's boosted my productivity massively, and I'm the furthest thing from structured and awful at context switching (Well I'm great at switching, its the switching back that I'm bad at :) )
[ ] reply to comment
[x] mention screen
[x] what is that other one? -- tmux
[x] mention it? -- nope
[x] should I produce an example? -- yes, easy
[.] demonstrate '.' as current work item
[ ] hit replyThis guy sounds like an absolute delight to work for. I wonder how his "colleges" would feel if they read this!
Apart from medication, I've found that pair programming has been an absolute godsend. Having another engineer next to me helps me to keep coming back to the task. We can recreate context quickly through conversation and as one of us fades, the other can jump in.
It's also helping me to realise more often when I am launching into a tangent, because those tangents will involve me vocalising the fascinating shiny thing that just popped into my head.
That said, the linked post raises a different practice: one story at a time. Context switching should be within the boundaries of a story. If it's too big, break it down.
I'm lucky to work for a company (Pivotal Labs) where this is the accepted way of working.
I have ADHD to thank for my self-education and following career, where by I cannot resist spending hours on things that are highly stimulating, such as the next interesting thing to learn in computing, which is pretty much infinite.
The tragedy is that once something is learned or done so many times it becomes routine and boring. It doesn't provide the same mental stimulation. Unfortunately, in most businesses, the types of problems are almost always in the routine category. This I've found is where my attention faulters.
I'm not saying you are one but ADHD deniers tend to dismiss symptoms described in isolation off as "oh this is normal". Without the ability to describe in coherent way how deep the rabbit hole actually goes, many people with ADHD suffer needlessly when trying to seek help.
ADHD symptoms are often described as "everybody experiences the symptoms to at least some small degree, perhaps in combination or maybe one alone, but a sufferer is where they experience the majority of the symptoms to a massive degree on a daily basis". In a lot of ways, it DOES look normal. What isn't normal is how extensive the symptoms are and how much of impact they have on daily functioning.
I can only imagine that its frustrating to hear such comments over and over again from people who have no idea about your situation. However the problem is that partially this is the problem of rampant ADHD miss-diagnoses which creates natural tendency to first question it.
In the UK, at least, there is simply no rampant mis-diagnoses. My diagnosis has taken 2 years and this is average, perhaps quick, given the state of things.
It's easy to see why some would dismiss.
While it won't make you an expert, it will perhaps help you understand what it is people with ADHD suffer through.
There are bad doctors and bad policies out there which are being resolved. They don't diagnose young children anymore even if it seems likely since some children will "catch up" and stop exhibiting symptoms. This is the source of many teens and adults today that discover that once they stop taking medication they don't need it. As our understanding of the disorder grows so does our ability to accurately diagnose it.
That said, while I can't speak for the person you replied to that shit is incredibly frustrating. Your empathy is unusual and appreciated but regardless of the rate of misdiagnosis you are not a doctor and are admittedly entirely ignorant about it.
I can't emphasize enough to those reading this that no matter how much you might doubt it, the people who work in this field do in fact know more about it than you do and making an armchair diagnosis or questioning a doctor's diagnosis does nothing but make you look like the kind of know-it-all that really knows nothing while maligning someone who has to read ignorant comments like yours in every damn discussion on the internet where ADHD comes up.
I know it's easy to think you've got all of the answers when understanding complex problems comes naturally but these doctors don't spend nearly a decade or more in school sitting around with their thumbs up their asses. There are tremendous amounts of research going into ADHD by doctors and scientists who actually understand the problem domain more thoroughly than you ever could simply by reading a headline about a study that documents the rate of misdiagnosis for a disorder.
Please understand this disorder is not some cry for attention or an exaggeration of one or two symptoms you mildly share with those that suffer through it every single day. It's not "laziness" or a lack of discipline and determination. People with ADHD lose their jobs and destroy relationships with family and friends alike. It's humiliating and the cherry on top of the shit sundae is friends, family and every asshole on the internet accusing you of faking it. No one wants that. No one wants to learn that there's a genetic component and guess what, your kid's lives might suck too. Even with medication. Methamphetamine is not some magic cure-all. It only addresses a subset of symptoms. No one wants to struggle every day wondering why they should even bother getting out of bed because it's exhausting fighting yourself.
Sorry for the rant.
The diagnosis is sometimes unclear to people without ADHD.
This is why generally it requires a registered psychiatrist to make the diagnosis and prescribe treatment.
People with the "predominantly inattentive" subtype (previously called ADD) typically go undiagnosed for long periods, or indefinitely. I was diagnosed when I was 32.
All the school reports that say "James could do better if he stopped daydreaming|looking out the window and focused more". I was lucky I that I came out with absolutely decent GCSEs (mostly As and Bs) but unlucky in that I felt shame and now defeat that I could have done much, much better. College was a write-off, I attempted 3 times but gave in after 3 months each time because the stress caused my inastentiveness in lessons made horrendously boring stoked psychosis which landed me in hospital each time.
A lot of my life seems wasted having not known about ADHD-Pi (and of course my parents and educators), except for programming and computers which not only kept me in some degree sane (I could have been worse) but also led me into a job that seems matched to my traits and with a manager that is willing to overlook my big flaws because he thinks my skills with a computer far outweigh them.
What a journey. I say there's enough to write a book but I've just never got round to it...
EDIT: I've just walked head first into a pole just after pressing submit. Sums up my life entirely.
I'd just thought I was incurably lazy.
That is a good point, one I didn't know I was making while writing but one I agree upon having made, now that you mention it ;)
Unfortunately, it's extremely hard to stop the habits of a bunch of people unless you actually change things enough around them to encourage change.
Becoming a single point of failure as a human resource is no different of a problem to me than neglecting to design your systems for high availability, failover, and sufficient redundancy. Bus factor is something that does matter but people seem to only realize these things are so terrible in hindsight of a disaster. Unfortunately, I've found that most organizations being reactive by nature rather than proactive tend to require disasters in order to have a sufficient shock to their workflows and methodologies.
It sounds like most of the issues here come down to poor organization and management. If your company embraces the "yes man" culture of trying to keep every client happy all of the time and wouldn't dare tell them that it will be done tomorrow, you'll be in context-switching hell for the life of your job there.
It's interesting to me to see people martyr themselves over a poorly organized or nonexistent process.
To me it boils down to this: business men think money can be saved (and quality upheld) by having few or inexperienced developers, if only you manage them properly. I do not.
Unfortunately that's what this Startup Cowboy Culture seems to embrace. It's more about looking and feeling busy than actually producing any quality results.
Tracking time in-the-moment (as opposed to waiting until the end of the day) also helps.
And having a boss that's been a programmer and is aware of how context switching can hurt productivity.
Context switching bleeds time from the main tasks I'm assigned to. If I'm not tracking my time precisely, making a summary at the end of the day, I'll wonder how I was so unproductive in the span of the day for the given task.
If I measure it in the moment, I'll see all the little interactions that stopped me. This developer asking me a question. QA asking me to look in something that requires investigation. A little fire to put out over here. Things that are too short and resolved to remember.
How I can frame that as a positive in job applications? I feel like I am not learning much and becoming a 1 years experience 10 times (well for the last two or three). Everyone seems interested in silly hour and a half coding challenges.
Currently I manage a bunch of eLearning and eAssessment services, like a Moodle installation for 25k users, at one of the biggest universities in Switzerland. It's a very heterogenous environment with a shitload of different systems, different tasks and different objectives from all directions.
Context switches keep me awake and my day interesting.