back to index

What Should I Do While Waiting for Code to Compile?


Chapters

0:0 Cal's intro
0:35 Cal reads a question about down time
1:1 Cal explains the two options you have
2:30 Do not check email

Whisper Transcript | Transcript Only Page

00:00:00.000 | [MUSIC]
00:00:06.000 | All right, we got a question here from Steven.
00:00:08.000 | Steven says, "Hi Cal, I'm a software engineer and I struggle to stay focused
00:00:14.000 | anytime I have to wait for something to happen.
00:00:17.200 | For example, I may be waiting on a test suite to run or PR checks to pass or a
00:00:21.700 | service to start up.
00:00:22.600 | And these can take anywhere from two to 10 minutes.
00:00:25.300 | Is it okay to context switch these scenarios?
00:00:28.300 | And if not, what should I do with my attention given my next action will be
00:00:31.300 | dependent on the outcome of whatever I'm waiting for?"
00:00:33.900 | Steven, I hear this a lot from developers.
00:00:36.500 | They have all these pauses.
00:00:38.300 | Yeah, when you're waiting for a compile or for your for your checks to complete.
00:00:42.100 | From a context switching perspective,
00:00:44.900 | there's two extremes that you should stick towards here.
00:00:48.900 | Very, very related activities are very, very unrelated activities.
00:00:53.800 | Don't go in the middle.
00:00:56.500 | So by very related activities, I'm working on this code.
00:01:00.100 | I'm running these checks on that.
00:01:02.100 | It's going to take four minutes.
00:01:03.700 | All right, during that four minutes,
00:01:05.500 | I'm looking at similar code.
00:01:08.100 | The next thing I'm going to test or I'm going back and trying to clean up some
00:01:12.600 | code I just wrote.
00:01:13.400 | So you stay, you're staying entirely within the context of the thing you're
00:01:16.600 | working on.
00:01:17.300 | That will minimize the context switching overhead because you're keeping most of
00:01:20.900 | the context the same.
00:01:22.000 | The other option is to go way far away from work altogether.
00:01:26.500 | So you say I need to go check Jesse Rogers Twitter account to see how the
00:01:32.200 | player union management MLB union discussions are going today.
00:01:37.600 | And are we getting closer to an agreement on the collective bargaining?
00:01:41.300 | Actually, their issue is with the competitive balance tax.
00:01:43.700 | Let's see what's going on there.
00:01:44.700 | That's so different from your work.
00:01:46.500 | But yes, it's a context shift, but it's not going to have nearly the same
00:01:50.300 | capture effect as something that's work related, but different than what you're
00:01:54.000 | doing.
00:01:54.500 | So what is this work related but different what you're doing?
00:01:56.600 | What's the middle of the spectrum that's going to kill you?
00:01:58.500 | That's going to be things like email.
00:02:00.900 | Let me go look at other work related stuff, expose myself to questions.
00:02:06.500 | I need to answer responsibilities being put on my plate stuff that people need
00:02:09.800 | for me, but I can't respond to all of them right now and then turn my attention
00:02:13.600 | back to what I'm doing.
00:02:14.600 | That gray zone is what's killer.
00:02:16.900 | That gray zone.
00:02:18.500 | If you look at an email inbox, I'm seeing work stuff, but not super related to
00:02:21.500 | exactly what I'm doing is what's going to give you 20 minutes of sluggishness
00:02:24.900 | until you get your mind locked back in.
00:02:26.400 | That's the gray zone that if you keep going to it again and again throughout
00:02:30.000 | the morning by 2 p.m.
00:02:31.000 | You're done because that's a that's a painful context shift.
00:02:34.000 | So either stick with what very close to what you're doing or go very far away
00:02:38.100 | from what you're doing.
00:02:38.900 | But don't go in somewhere in between so unrelated work stuff email is killer.
00:02:44.500 | Social media is killer.
00:02:47.300 | If it's emotionally arousing, that's also a problem.
00:02:49.600 | So I'll put that as a caveat.
00:02:51.800 | Don't look at information about the war the Ukraine during your five-minute
00:02:57.700 | check.
00:02:58.200 | That's also going to be quite diverting.
00:02:59.800 | So nothing emotionally arousing nothing is related but not exactly related to
00:03:03.300 | what you're doing and it's the best you can do.
00:03:06.200 | Thank you.
00:03:06.700 | [ Music ]