Ask HN: How do you overcome the problems of task switching?
Hello! I am a software developer and over the years I found that I am extremely unproductive when it comes to finishing one task and then starting another right away. It is best noticeable when I complete something that took me more than one day and then I am guaranteed to not do anything productive for the rest of the last day(doing something for 3.5 days - unproductive for the half of the last day). Same applies to working on side projects. I am focused when I research one problem, implement it, but I have no willpower to continue to the next problem. This affects my career in a bad way and I am sure I am not unique and there are ways to fight it.
61 comments
[ 1609 ms ] story [ 1843 ms ] threadNobody, not even the most vocal proponents of maximizing productivity can be productive all the time.
While the break does it for me, the important part is that you reward yourself in some way immediately after to engage the "work-reward" cycle.
That said, task switching is a practical reality, so coping strategies are important, too.
For help with that, check out Cal Newport's "Deep Work: Rules for Focused Success in a Distracted World" (https://www.amazon.com/Deep-Work-Focused-Success-Distracted/...). Full disclosure: He and I share a literary agent.
If you're interested in improving your productivity by simplifying your work, it is a good book.
But like all self-help books its effect wears off over time.
Keep in mind that Cal Newport is an academic at MIT. He has autonomy, he works in a field he loves etc. For other people his point of view is valuable, but his advice IMHO is not that easy to follow. You may need to improvise and find your own way.
For longer, 2-3 day tasks, I completely log off and don't connect to the world until it's done. This means avoiding any network tool through the evenings and mornings until the stretch is over. Easier said than done. Some of my family and friends think I'm weird or get frustrated by my inaccessibility. But they get over it.
After a 2-3 day deep binge like the OP I also face challenges moving from one discipline (say programming) to another (a marketing video). One tool I use is yoga. For a while I had a daily meditation habit going but it's been replaced with 2-3x / week hot yoga. I find it has a way of cleansing my mind and energizing me for the next thing. I also go on fat bike rides to unlock the power nature's constant stimuli has on your mind as Cal talks about in the book.
I use a kitchen timer, too, which has minutes and seconds (e.g., digital).
Some tasks with too much inertia/resistence I ask: "Can I work on this for 5 minutes? 2 minutes? 15 seconds?"
That will build momentum and show that it's often not as hard as it seems when you're on the other side of history.
When I finish a large task, I take a few minutes to think about how I should spend the rest of the day, grab a coffee or snack, use the restroom, check the news, then jump back in.
I even find that, when I forget to take breaks, I'm more easily fatigued and discouraged by what can otherwise feel like an endless amount of work.
Can you enumerate this further? Are you getting measurable and actionable feedback from a superior, or do you just feel like you should have accomplished something with the additional half of a day?
I'm going to reaching a little as I don't know you're specifics, but I've found myself in this situation before and as a manager I've had to help my reports with the same issues. Typically when I hear this from my reports, their behavior falls into one of three categories:
1. They're still working on things, but they don't contribute to what they see as their primary goal. I.e. I ask them to rework something, they have to dig through documentation/emails/etc to answer someone's question, or they have some HR function they have to complete. In the first example it's often times expressed as "This took me all month!"
My suggestion in these situations is to realize you're being "alternatively productive." My ask that someone rework something or performing duties for another team is still part of being productive. Not all managers manage that way so if you're running into trouble here, I'd bring it up and discuss it further.
2. They're not being productive and legitimately are just taking some downtime and feel bad about it.
Assuming I've gotten 3.5 days of good productivity out of someone, I ask them to embrace their downtime. Take a walk, chat with folks, read some blogs, or just simply go home early. I'd rather someone come back refreshed the next day than waste four hours feeling bad at their desks and contribute to a future episode of burn out.
Some managers are driven to make sure butts are in seat coding 40+ hours per week. Thankfully my company doesn't work that way.
3. There is a performance issue. Sometimes that's on me (poor direction giving, unclear instruction or goals, being too busy doing my other duties, etc) and sometimes it's on them. For example their 3.5 days of productivity and I need to help mentor or drive them. That's where immediate, specific, actionable, and measurable feedback comes into play.
That's something a lot of managers are bad at. I'm aware that feedback itself has a quality component that should be met and still do a bad job at times.
I hope something here is helpful for your situation.
As someone who is usually mostly "alternatively" productive, I have a hard time training my manager to understand this. I let features take a backseat to bug fixing, documentation, mentoring others, and eliminating technical debt. My manager is relatively new to management.
How do I reconcile my desire to focus on alternative work which, while beneficial to the team/company, is not my assigned "feature" work? How do I communicate this clearly? It seems you have experience here.
Usually when people are new to management they don't quite see the forest for the trees. I certainly was. Usually it's easy to communicate business needs because above all else, managers typically have those thrown at them from day one. If you can highlight the ones ones that match up with your company's goals then you may have an in.
For example
Eliminating Technical Debt Company Goal: Decreasing time to Marketplace Supporting Evidence: Feature X was delayed by weeks because the $WIDGET1 was written in an old framework that is no longer supported and no one here knows. Our next project involves modifying $WIDGET2 which is in the same framework and will surely delays us similarly if we don't apply the changes we made to $WIDGET1.
Contrived example, but you get the point.
If you can't formulate that argument, perhaps the technical debt shouldn't be resolved yet and your manager has a point (even if he doesn't know it)
It's like you need to repeatedly and unintentionally expose your mind to information that pertains to the project before you get into the flow of working on it. Just staring at it with no other outlets for activity or inlets of information forces the issue and speeds up how your brain is loaded with necessary information so that solving the problem becomes easy.
So another way to say it is remapping your working memory has a high cost until the previous information naturally falls out and your motivation and desires depend on that. So make it easy to move information into your working memory by making it the only information available. Instead of hackernews/reddit, put up the issue and reqs.
Also, for everyone else saying that you're not a robot, screw that. With the right techniques you can be a robot like the rest of us.
Having the issue to be the only information available is a great advice! Thank you sir
Staring my personal backlog, my mind starts to imagine the possible solutions, alternatives, and after some time depending on the complexity of the task at hand, I start working autonomously, fully motivated. If I even take a half minute break from staring for HN/Reddit/Email before I begin working, I need to restart the cycle. Knowing the weaknesses of my mind really helps.
Maybe take a 2 min walk or go to the restroom instead of switching to a mind-distraction task.
2. Reward yourself for a job well done (buy a coffee or a chocolate)
3. Force yourself to think of some other aspect of your life for a few minutes
4. As soon as you're able to let go of the emotions associated with the project, you'll be able to get back to work, but not a moment before
Planning and revisiting a project plan regularly to weak it that has work laid out in small enough steps is really important. It helps create good stopping points, and easy starting points.
I'm not sure if you use a simple kanban like Trello but it's important. In the beginning using a smartphone to curate the list constantly helps you build a habit of knowing what's currently on stage, up next, etc.
If the goals are too big or too vague it's hard to conceptualize them. A good rule of thumb is to try to get major tasks down to 4-8 hours each, and let them be a larger part of the really big solution you're after.
There's other legitimate issues too like dealing with interruptions, or emergency issues.
Days when I can just work on one thing without interruptions are extremely appreciated but so rare. When I do have the luxury of finishing a big task that took several days and not being immediately pulled away by someone else to another task I take advantage of the downtime and maybe try to go home early, do some reading, or have a longer "fika" with a coworker.
Tell your boss that this is you. You need that time to recover, so you can focus on the new project. It's like with sporting - a professional sporter plans his recovery time. What you do is professional sport as well. Take care of yourself. It's long term vision.
- Don't do large tasks. Spending more time up-front breaking down a large task into smaller, more-manageable tasks might help. This is something that many engineers struggle with, but there are huge advantages to this kind of discipline that go beyond taming your concentration issues, so this could be valuable in more ways than one.
- As others have said, go for a walk. There's something about activating our peripheral vision and looking from side to side that activates different parts of our brains and makes us more creative. It's even used as a therapeutic technique (EMDR) for dealing with PTSD.
- Find non-project tasks that you can do to fill less productive gaps. Do code reviews, go back to old projects and fill-in additional test coverage, play with some new technology/tool...a lot of teams neglect hygiene tasks anyways, so you may benefit from acknowledging your weaknesses and trying to make the best of it.
- Offer to pair with engineers for the rest of the day. If you know you can't be productive for that time period on your own, perhaps you can add value as an extra set of eyes.
- Don't fight it, embrace it. There's a mantra in startups to embrace your limitations. As engineers, we're not nearly as good at problem solving when we have no constraints. But when there's some real-world concern that points us in a particular direction, it's often easier to find the right solution. So look at this the same way. Don't beat yourself up about it. Be kind to yourself and accept that it's just a reality. Once you do that, put on your engineering hat and think of how best to deal with an unideal situation. Because situations are never ideal in the real world.
- Learn to meditate, particularly anapana meditation where you train yourself to concentrate on nothing but the breath. Concentration is a skill that can be practiced. It may be that you're not able to concentrate on something new because you're still concentrating on your previous task. Learning to clear your mind may help you move on to something new after a short break.
Best of luck!
E.g. rather than "Research using Foobar in the next mobile project", the first task is "Write a Foobar Hello World". Rather than "Write proposal for project X", the first task is "Draw logical architecture diagram for X".
I find the inertia against getting started is a lot less when the task is a five-minute, self-contained unit. It also helps task switch because you don't treat them like links in an unbroken chain of tasks, but individual units.
Only downside: you have to spend some work up front slicing your projects into smaller units. It's kind of analogous to story slicing...
I find that a 10 minute break followed by a clearly defined action item is usually enough to get me going.
Trick 1: Improve your cardio health.
Generally a balanced meal gives you a lot of willpower. Cardio exercise specifically seems to improve recover rate a lot, not just physical but mental.
Trick 2: Develop a trigger.
Find a routine, a kind of trigger that puts you in the mood to work. There's a trigger already built into all of us, a moment of serenity that we see as taking a break.
This is the kind of productive thing that makes you work late at night, or weekends, or continue nonstop for 20 hours straight. It might not even be work - it could be a game, book, or some tedious hobby like woodworking.
I use Linkin Park songs because my productive moments were making games in school. I also saw Chester Bennington as a role model, because of his emotional drive and his success as a VC. Some of his songs also resonate with me on a spiritual level. His suicide got to me, and I find his songs as a sudden reminder of why I do what I do.
It doesn't have to be a song. It can be something like flipping a coin between your fingers, taking a deep breath, pumping your fist, a 5 minute meditation. The more portable the better - you don't want it to be something like eating a can of spinach.
You also need to associate the trigger with positive things. One of my mistakes was poisoning an old trigger with death marches.
Whenever you hit a moment of pure joy, try to associate that with your trigger. It could be the completion of a tough patch of work, playing with kids, breathing fresh morning air.
There's a lot of principles that go into this, but I would recommend the books The Power of Habit and The Art of Learning if you want more details.
If you find yourself fighting doing what you think you like doing, and get distracted easily then maybe you're not really doing what you should be doing.
That doesn't mean you should stop being a software developer, but you should be aware of that.
Maybe it's different for everyone but back in the day I was really into gaming. I don't mean casual gaming either.
I mean playing 12 hours a day, and min / maxing the shit out of every game I played. Basically playing for maximum efficiency, constantly improving and focusing 100% of my attention to it, for literally 10 hours straight without moving -- but then doing that with various games for like 4 years straight. Needless to say I got very little sleep in HS and my early 20s haha.
Think about that tho. While you may think "oh it's gaming", it was really high intensity thinking and unlike programming, it also required very good reaction times (at least in the games I played, such as Diablo II, Quake 3, etc.).
When I lapse into inactivity periods in software development I always think back to those gaming days. Why didn't I burn out gaming, when mentally it was even more draining than programming?
The only conclusion I can think of is, if I reach to check email, reddit, HN or youtube instead of working on software developer related tasks, then I must not enjoy it as much as I think I do (which I've accepted). Deep down I do enjoy it, but I don't enjoy it enough to sit there for 5 years straight working on things 12 hours a day.
Can this trope die already? I spent a while doing email archival, and let me tell you: anyone who says hats exciting is either on heavy sedatives or lying. Most software isn’t sexy. Most problems aren’t fun. More importantly, your employer is not entitled to excited employees, and you owe your job nothing more than what is in your employment contract.
> If you find yourself fighting doing what you think you like doing, and get distracted easily then maybe you're not really doing what you should be doing.
Or maybe you’re depressed or have attention problems. Or maybe you need a new job, or a way to motivate yourself at your current one. But let’s not insinuate that the only good software developers are the gung-ho excited ones who have a “passion” for archiving emails/administrating databases/fixing DNS errors/etc.
> Why didn't I burn out gaming, when mentally it was even more draining than programming?
Could be because you are intrinsically motivated to game. You do it for its own sake because it’s fun. Psychology says, though, that once you extrinsically motivate people to do something they used to intrinsically enjoy, their enjoyment of that activity goes down. This is just one possibility, though, and I don’t think it’s fair to jump to the conclusion that if you don’t find something as fun as a video game then clearly you shouldn’t be doing it.
I’ll conclude with this. A job is a job. Nobody asks the Kmart cashier if she’s passionate about ringing up items. Nobody asks the dentist if they’re a rockstar tooth ninja. Nobody asks the lawyer if they’re “on fire” for litigating.
OP, if you’re drained after work tasks, I understand; I get that way too. Complex thought is mentally taxing, and frankly, if it’s 3:00 PM and I just spent several days dealing with something complicated, I’d probably scroll through Reddit and take a break too. If your work environment let’s you get away with that, I don’t see anything wrong with it. Otherwise at least start a new task somewhat (new git branch, grab the ticket, etc.) to get something going.