Hello, and welcome to another episode of The Bike Shed, a weekly podcast from your friends at ThoughtBot about developing great software. I'm Joelle Kenville. And I'm Stephanie Min, and together we're here to share a bit of what we've learned along the way. So Stephanie, what's new in your world? So it's officially December. And that means I can finally get into the holiday season. I woke up this morning to the outside being covered in a beautiful blanket of snow. And yeah, now I'm officially in that kind of wintery winter holiday spirit. I'm a real stickler about when holiday decorations are supposed to go up. And I am very much in the after Thanksgiving camp. I don't know. I just get confused when people start to put up holiday decorations very early. I want to kind of enjoy each holiday as a discreet experience.
I feel like among my friends, there's sort of two camps. There's the put up the Christmas tree the day after Thanksgiving, which for our non-US listeners happens. It's a floating holiday, the fourth Thursday of November. So late in November, people might put Christmas tree up. And some are sticklers for saying you can't do it until it's December 1st. Listen, I think there's even a group that does it even earlier than that, like after Halloween or something. If you're a business, I understand. I think that's blasphemous.
Only because I consider Thanksgiving a very fall holiday. And even though, you know, it is at the end of November, so just a few days before December, it's like, I just want those things to be separate vibes, if you will. Right, right. You don't want your sort of winter solstice holiday interfering with your fall harvest festival. Exactly. But now I do think it's properly that time of year. And I'm excited to go on a little snowy winter walk after work today. Are you a hardcore decorator? I was in recent years. I feel like when I grew up, my household wasn't really into it. And so since I've become an adult, I'm like, I'm going to do it the way I want to now. But since we have just moved, we're not quite in an environment to go all out yet. But hopefully...
in the future. I am very much looking forward to just getting our tree up. We always get a real tree. That was another thing that I was denied in my childhood, that now as an adult, I'm like, I get to have a real tree. What would you say is a must-have for Christmas decorations for you? I love a theme for the tree. Oh, okay. Do you do a different one every year? We haven't gone that far, but not every year, but in the past couple of years, even if it's just a color theme, we did a red and gold situation last year.
One of the favorite ones that we've done is forest animals. We have these very cute forest animal ornaments and we kind of make it so that the tree is almost like a little kind of nature scape with the little critters. I love that. Yeah. So Joelle, what's new in your world? So in the last episode, I talked about some of my troubles with time zones and particularly when using a date value rather than a date time. But that sent me off on a few different rabbit trails around time zones. And here's a fun fact about time zones. We cover around the planet more than 24 hours with time zones.
Because you can get, I think it's UTC plus 14 on one side, and then I think minus 12 on the other. 26 hours of time covered by time zones from one extreme to another. So if you're on different sides of the international dateline, you might not be one day apart. You might be two days apart if you're like 11 p.m. on the night of like one day and the other place is 26 hours away from you. And so they're like, oh, at most you're going to be off by one day assumption that I have. Actually not true. You can be off by two days in the right parts of the world. That blows my mind yet again. I think I maybe have heard this about the international dateline before.
But just hearing it again, I just, I don't know. That freaks me out a little bit. It kind of breaks the whole system. I'm more comfortable with like, oh, you know, we don't have exactly 24 time zones. You know, countries do them a little bit differently. And some people will do like 30 minute time zone or 45 minute time zone. So there's, I don't know, 100 time zones or something around the world that I'm OK with. The fact that the span of it, though, the range goes from plus 14 to negative 12. That's the part that's really breaking my mind a little bit. Yeah, I mean, I don't know. Maybe this is just something that I do. But sometimes when I think about time zones, I'm like visualizing going one direction around the globe. And then eventually I was like, well, how do you get back to where you started?
And so that kind of helps answer that a little bit more. But did you end up finding this out because you saw that there were dates that were off by two in the issue that you were looking into? No, just because I was discussing how this might go catastrophically wrong and trying to come up with sort of extreme scenarios. And I was like, well, what if we had people on the edge of the dateline? And they could be as much as, you know, we would like almost always be off by one for the date. I was like, actually, wait a minute. How far is this? Technically, we can be off by two at certain moments. Well, that's a real thing I learned. So thank you for that. That was a sort of a fun tangent to go on. Although.
Time sounds going to be a little bit of a distraction from the real work I was trying to do. I have been curious to explore with you today the topic of maintaining focus. And I think the thing that we hear developers complain a lot about is context switching and how that can be a really expensive thing. How would you define context switching? I would define it as having to shift from one task to another that has kind of a totally different...
context or it just requires unloading and reloading information into your brain i suppose maybe we're saying it's like an onboarding cost for a task in terms of like once you when you like start working on it there's a little bit of onboarding time it might take you five ten minutes to get back into things and so if you're having to like always pay that frequently becomes very inefficient yeah i think that's actually just one way that it manifests though there are other times when it's like i just can't even switch to this other thing you know maybe the thing i was working on before just took up so much mental energy that the idea of taking on that cost becomes like not even worth it necessarily. Is it like a task is still like not quite done or there's that bug that's not quite fixed and it just, you can't flush that from your mind. It's just taking up all those background brain cycles. Yeah. Yeah. Which is tough, especially when maybe there is another task that I need to be doing. So yeah, it's definitely something I think I've been struggling with a lot more in this past year as the scope of my responsibility has grown where I might be juggling like a couple of different things or maybe things at different levels. Right. So maybe I was really in the weeds in a coding task, but then I need to switch to.
thinking about the planning of a project. And sometimes I found that context switching to be quite hard. I think something I often hear people complain about when they talk about context switching is sort of having meetings sprinkled throughout their day. I think people tend to think of like, oh, I've got like coding tasks, which are like really high focus. And then there's other things that break up my focus for coding. So every time I try to be productive on coding, I just kind of get into the zone and then I have to break out of it again. Do you find that for you, meetings are the most common form of context switching that you have to do? No, I feel very strongly about this one. It's Slack.
Not people asking me questions, but responding to things that require that reloading of like, oh, what are they asking about? Like sometimes they might not have included all the information that I really need. So then I might have to go seek that out. Sometimes it just takes a moment to like have to remember. And I am sure that I'm not alone in this. Yeah, I definitely probably shift tab to Slack more than I would benefit from. But other than that, meetings, I think are also a big part of it. I would say those two are my top two. What are some strategies that you like to use to minimize the amount of context switching that you do in a day?
And I assume this is to give you sort of more uninterrupted coding time. Is that correct? That's your goal? Sometimes. I think I wouldn't even necessarily say that focus time is just for coding time. I've kind of learned that it is necessary for all types of work, even if I'm not at the point where I'm like hands-on code, even if it's just thinking about what are the risks of a project or something. That is something that I have learned really benefits from being on uninterrupted work. Otherwise, I don't think that you really...
get to the amount of intention and thoughtfulness that's required for some of those kinds of tasks. Would you agree with that? That's interesting. So you find that you try to disentangle coding time from thinking time? Yeah, I guess I do. Both require focus time, but they are still separate, I think. Because the coding time, even though it's focused, would be a context switch away from the thinking time and vice versa. Yeah, I mean, even with development, I mean, ideally, I will have like...
a clear task at that point. But then there are other types of work where it isn't clear what that next step is. And oftentimes that is not future development stuff. So that's kind of how I think about those two things separately. But like I said, all of it requires focus time. So how do we create space for that when we have so many meetings and Slack things? The first thing that comes to mind is the metaphor of back in the day, you would defrag your disk. Windows would show you sort of a sense of like how your disk was broken up.
by basically a bar with a bunch of little bars of color on there. And when you had a bunch of little thin bars of different colors alternating everywhere, that was bad. And you wanted to get them sort of more in contiguous blocks. I'm thinking a little bit that approach to my calendar. I think a classic one that people will do is try to cluster their meetings and then have sometimes even blocking out on the calendar focus time.
So it might be, I do meetings in the afternoon and mornings are coding focus time or something like that. Is that a practice that you do? It depends. I will reach for that when I'm starting to feel like extra kind of all over the place, but I've fallen off kind of recently. What did really help me was trying to make that time kind of at the beginning and the ends of my days. That was really helpful. It's just kind of like, okay, bookending my days, like that's time for me to be able to make sure that I like have done what needed to get done today. And I think that also then kind of helps me feel a little bit more.
like able to kind of transition in and out of work as well. So it has kind of that side benefit. It's been interesting for me because I've most recently been on a couple of clients where the team has been mostly West Coast based. And so a little bit of that dynamic happens naturally for me where I get online in the morning, I'm in the US East Coast and no one else is there. So I automatically have focused time to work on things. And then my afternoons can be more like meetings and things like that. Nice, that's great. I'm curious, you mentioned that like meetings and interactions with other people are just sort of one form of focused time and that sometimes you need to disentangle your coding and your thinking work.
How do you sort of intentionally make time for thinking versus just getting in there and coding until it's done? Because I know that's the temptation for me is like, oh, I'm just going to type code until something works. Yeah. Usually I start with that approach and then realize like, oh, this isn't working for me. But that's the thing. It's like, it doesn't always not work. Sometimes you just have, you happen to have a clear path forward, right? And so that becomes less of an issue. But sometimes you think you can get started. You realize, oh, actually, like I don't have the full.
clarity on what this requirement is, or I don't know where to look to change the code where I need to change it. And I'm starting to get better at knowing when to back out of that when I kind of feel that way. And then it becomes like, okay, now I have to make sure I spend a little bit of time doing that. So I can have more of that flow state later when I do get another kind of block of focus time. I'm curious, like once you, let's say you've scheduled a block of focus time.
and you've made sure there's no meetings and you know this is going to be time to actually get things done. How do you ensure that it's actually focused? Are there any techniques that you use to avoid maybe outside distractions? So I think this is where I really like to use. tests to bound the work that I'm trying to focus on. Sometimes that means doing TD, but I think I will almost always like start with finding a test I want to run or like use as the measure of like, okay, this is the one thing that I need to do is like get this to pass now. And I think that's especially helpful when like maybe I've reached the end of my scheduled focus time and I might not have finished what I intended to, but it's like I've kind of left a bookmark for myself the next time that I'm able to come back to it.
Also, you will leave a failing test for yourself at the end of a focused time period so that you have something to come back into next time. Yeah. Otherwise, I think there's always that onboarding cost that you mentioned earlier, but that way it's less about like, what do I, like, what am I supposed to do? At least I know what it is that has to me. It's like, hey, you need to fix this. Yeah, I love that. It's sort of lessening that onboarding curve for getting back into the task. You can come in much more cheaply.
I'll even sometimes commit or just stash those things with a bunch of notes for myself. And that's kind of the way that I reload some of that context into my brain. There are, I think, some people who are, I guess, a little more skeptical of work in progress, but I've actually found that to be useful, especially if I'm trying to keep myself also accountable to the scheduled time that I have put on there. Yeah, I sometimes just am not able to finish something in the amount of time. And I think that's true even when you have tried really hard to make that work as...
small as possible. And you mentioned making work as small as possible. I think that's something that has really been helpful for me in terms of having to pick up context and get into things. If I've scoped work such that it is independently shippable, it's not just a piece of code that doesn't do anything on its own, but it's propping up something else. If it's independently shippable, then when I'm done, I can just release all that context from my mind. And that's really powerful. And then I can either jump on to the next small task or I can...
context shift to a different type of task, and it doesn't feel quite as expensive for me. So maybe I've done a small piece independently shippable code, open a PR for it, and now I'm going to spend the next 30 minutes reviewing other people's PRs to make sure that the rest of the team is unblocked. And I had this very natural stopping point because I completed my task, and I was already on GitHub because I'm opening my own PR, and so it's a very natural flow for me. As opposed to if I'm just like in the code all day and I'm like never getting to a completion point and then someone keeps pinging me on Slack saying, hey, can I get a review for this? I'm blocked. And now I've got to like decide, do I pause this work and look at their PR? Do I tell myself, oh no, I got another 30 minutes and I'm really done and then go look at their work. But then it's not actually 30 minutes because it never is. It becomes more challenging. I really like that flow between like, okay, I've pushed something up. I'm looking at GitHub and now I can review other people's PRs while I'm here. I think I do something similar.
where I put up a lot of draft BRs and those become my natural stopping point, even if it's not quite shippable, but it's still, I don't know. I think I'm like, okay, like I am. putting this out there because at least I've kind of gotten to the point where I can just trust that I'll be able to kind of figure it out later and have left enough notes for myself and even maybe like share that with others. I found that being able to share the work in progress is still useful for me. And then in the times where I'm not doing that focus work, hopefully getting feedback from others. And that's something that I can address in my next chunk of time where I am revisiting it. When you put up a work in progress PR, are you typically seeking feedback on it or is it more of a sort of stopping point for yourself?
I think it's both. It's mostly a stopping point for myself. I almost think like not thinking about it and then coming back to it gives me a fresh perspective on it. And so I almost suspect that that synergizes well with how I'm sorting out my focus time too, because, you know, just knowing that like, okay, it's fine if I'm not able to finish all this today, because maybe tomorrow I will be able to see something I didn't see before. And it has the side effect of being able to share it for feedback if I do feel like a little bit stuck. Even when you have that, you know, scheduled time, sometimes you just aren't able to make the brain work.
So that's usually what I'll also kind of ask someone else to take a look. Yeah, are there some things that you do when you have that focus time to try to maybe help your brain along? Put the odds in your favor of it working? Sometimes I'll just go take a little rest. I'll take a little mini nap. I don't actually sleep, but I feel like even just closing my eyes a little bit helps a lot. Yeah, that's something. Getting a little snack, I think, has also worked well for me. And then also...
giving up when it's really just not happening. I think if I've just like shown up to this focus session and tried, then that's good enough for me. I think then putting additional pressure on myself that like, just because I put it on my calendar doesn't mean that I will magically be focused during that time. And it's hopefully setting myself up to be more so than if I didn't have that time on my calendar. But yeah, sometimes life is just, it's just not happening. And that's okay too. How do you feel about environmental things like music?
lighting. Do you do anything around that to get yourself in the zone? Let's talk about music. I find it distracting. I think I've tried maybe like listening to music without words or in a different language, but it just isn't something that I reach for when I'm needing to be in the zone. I think I'm able to do so without it. Do you code while you listen to anything? I've gone back and forth. I do like it as a little bit of like a almost like a white noise kind of thing. And I think that especially back when I worked in an office, initially I started doing it to create a little bubble around me when I wanted to focus.
But I think I actually trained myself that when my earbuds were in, that was focus time. Even when you weren't listening to anything? Yes, I would come back from lunch, put my earbuds in, forget to turn the music on, and then go right into focus mode. And it was this weirdest thing that I trained myself that earbuds mean focus. I like that. That's really impressive. Video game music was another example of music without words that I think is actually designed for focus, you know, when you're trying to do an epic boss battle or something. So that may be something that people might want to try. And then I also have heard about other types of noise, not white noise, but...
There's a pink noise and brown noise even that helps facilitate. I don't know anything about this, but there's just like a spectrum of colors that kind of have different uses for helping tune things out and help your brain focus. How do you feel about the practice of like micro breaks within focus time? Because I'm thinking for me, often it's good in the middle of focus time to just get up for 30 seconds and go. refresh my coffee or something like that. That's better than just sort of sitting at my computer and getting like frustrated with the problem or like sort of never getting up. And I feel like that micro break doesn't break my focus or take me out of the zone. Has that been your experience? I think I do that less. I much more just kind of get up when I intuitively want to get up. I'm sure how well that works for me. But leaning into just like the natural cycles that my mind and body are kind of going just to do, I think that has.
at least made me feel less bad about not kind of being more focused or productive than I wish to be. And sometimes I'll just say it. I'm like, oh, today's I'm like not able to focus today. And there's not always like a reason why, you know, I can't always say like, oh, there's construction happening outside, even though that has also been the case before. But then that is a good cue that I can like at least spend my time doing something more effective that is also valuable, but maybe not deep focus work. It's like sometimes I just need to go like, I don't know, manually click around and test, you know, do some things like that. Just it's mostly mindless, but still.
It's part of our day-to-day work occasionally. I know some people use sort of explicit systems that have these micro-breaks built in. I'm thinking of things like Pomodoro, which I think, is that like 25 minutes of focus work and then five minutes of break repeated on a cycle within like a longer break every like two or three or something like that? Have you ever experimented with any systems like that? I think I might have tried using a Pomodoro timer before and even ones that like kind of lock you out of your computer to go take a break, but then I would just ignore.
or kind of find a workaround. So my lizard brain has not let me use that effectively, unfortunately. But I bet it works for others. So you find that when you are focused, you just sort of ignore, or when you want to be focused, you just tend to ignore all needs for a break. Yeah. Do you find that that is sort of the best thing for you? Instead of saying, hey, maybe take a break every 30 minutes, as in Pomodoro, I'm going to focus for two hours and then get up and do something longer. Yeah, I think that's true. Because when it does come, it's great. And it can be that long, like two hours or so.
I just haven't found a need to interrupt that necessarily. I don't know. Maybe my back will protest at some point in the theater. That's fair. So we've talked about a lot of different sort of techniques, things that I've tried, some things that you've tried. And I think I'm sort of seeing two broad buckets emerge. One is different techniques that can help create those sort of contiguous amounts of focus time on our calendars. But then there's also another bucket of saying, well, now that you have that focus time, how do you actually be focused within that bucket? And that's where things like TDD can help, having a smaller task to work on. We talked about some environmental things. And I think having that framework then sort of helps me be a little bit more intentional about.
what I'm trying to do or sort of realizing where do I need to improve things for myself? And then which bucket do I need to pull from? Yeah. And I also think it's actually a great thing to know about your coworkers as well, like what they need to do that, because just like you do, it's also really nice when other people can support the ways that you like to do that. So, you know, making sure that you aren't scheduling time when they are trying to focus. And I think that is a very focus oftentimes is such a source of blocking kind of work that happens. So I'm glad that we got to talk about it today because it is just more and more important in terms of making progress and making sure we're doing things that need to be done.
So you bring up co-workers, and we've mostly been talking more in a solo context. And that made me just think of another technique that I sometimes use for focus, and that's pair programming. When there's two of you working on a thing, sometimes that can really help generate a lot of focus. And it's a way to bring in someone else if you don't want to break into their focus time or something like that. How do you feel about pair programming as a technique for focus? I think that's a really great one. Even mostly just to be accountable to someone else and give them your attention because you're in a call with them. And that's the polite thing to do.
I think helps me avoid the distraction that I was kind of mentioning earlier and keeps me focused on that, the person I'm talking to. And that naturally kind of, I think, leads into what you were saying with being able to collaborate and stay, keep each other on track. On that note, shall we wrap up? Let's wrap up.