# 310. Short Attention Spans Hurt Software and Developers

## Метаданные

- **Канал:** IAmTimCorey
- **YouTube:** https://www.youtube.com/watch?v=eZfHcv4_tnE
- **Дата:** 21.05.2026
- **Длительность:** 33:47
- **Просмотры:** 417

## Описание

Distractions at work are getting worse. How do you avoid distractions? It is hard to maintain focus on one thing for a long time. How do I improve? How do I maintain better focus? These are the questions we will answer in today's episode of DevQuestions.

Full Training Courses: https://IAmTimCorey.com

## Содержание

### [0:00](https://www.youtube.com/watch?v=eZfHcv4_tnE) Segment 1 (00:00 - 05:00)

The average attention span has been getting shorter and attention is more and more divided. It used to be that 5 to 7 minutes was an ideal length of time for a YouTube video. Now the majority of videos are switching over to short form Tik Tok style videos. And even that format is no longer quick enough. creators are starting to putting the good parts of the video up front to hook and keep their audience for even that one minute time frame because otherwise they'll just skip off the video. While this trend is overall having a negative impact on society for software developers it's even worse. So let's talk about how shortened attention spans are hurting software development in today's episode of Dev Questions. Software development is more than just writing code. So, let's talk about the rest of it. Specifically, let's talk about how shortened attention spans hurt both software and software developers. And let's start with the harsh truth. You almost certainly aren't a victim. Your attention span is a learned habit, not a medical condition. Yes, there are medical conditions. Yes, there are things you can do for that, but for the most part, it's probably a learned habit. You've been doing the equivalent of sitting on a couch eating junk food for months and then wonder why you have a hard time carrying heavy boxes up the stairs. You definitely might struggle to focus on a task for any length of time, but that doesn't mean you're helpless. It just means you need to build up your strength in order to do the things you need to do. Okay? So, it's not just about I'm just have a short attention span. No, there's something you can do about that. It just takes work. But let's start with why attention span is needed, why focus is needed for a developer. Number one, and we're going to put this in the con in the um context of AI, even though this video has nothing to do with AI. Okay, so number one, context is important and it takes time to load. When you think about AI, you know, one of the things that's really important is that context window. You know, if it can take a million tokens in the context window, that's better than a 100,000 tokens in theory because it can know more and take more into account when it's creating its answers. So the idea behind this is let's say you have a an application that has I don't know a 100,000 lines of code. Well, that's that probably can't be loaded even into a uh a context window of a million tokens, but you can load a whole big chunk of it into the context window. And so the AI can know about more of the application than it otherwise would have if it had a smaller window like let's say 10,000 tokens. Well, at that point it knows about one meth or you know one method or one class or one little bit. it doesn't know about the rest of your application because it can't kind of keep that in its brain. Well, in the same way for you, context is important. So knowing what the application does, knowing how it interacts with the various pieces, knowing what methods are out there, how the formatting uh for the application is, what you need to you know what you're already using, how it works, like these are things that you need to understand in order to make a wise decision about any change. And that takes time to load. So when I open up an application, it's got a bug in it. I review what the application does, what dependencies it has. This is where dependency injection is helpful because you look at the top of the class and you go, okay, here's the things that are being injected. What do those things do? And you have a better understanding of how the application is going to flow and then where the affected parts might be. That context is important. If you just look at a specific method, you might not understand why it's failing because it might not be in that specific method. It might be that method that interacts with another method which interacts with a different service which interacts with across the web and so on. So number one, context is important. Number two, disruptions wipe out a lot of our short-term memory. Think of it like a workspace. So you get this table where you're laying out this context and you're saying okay I understand what this method is doing and this you know this class is doing how it

### [5:00](https://www.youtube.com/watch?v=eZfHcv4_tnE&t=300s) Segment 2 (05:00 - 10:00)

fits in with the rest of the application. You're laying out these papers on a workspace and then you have a disruption. Well, what are you doing really? It's kind of like you're just taking your hand and shoving aside a whole bunch of paperwork and say, "Okay, let's work on this new thing. " But then when you're done working on that new thing, you have to kind of reassemble your workspace and you might miss a document or two. And so what happens is when you miss a documentary too, you miss a bit of the context and all of a sudden you might miss a connection or might not understand why something is happening or you might fail to account for a certain specific situation. That's number two. Think of it kind of like you have RAM in your brain. um you have RAM and you have ROM, right? So the RAM is the memory that is short-term that you're kind of keeping in your head for a short amount of time and then when you go do something else, it kind of dribbles out. Um it, you know, when we used to take tests in school, this is one of the things that you would do is you would shove as much as possible in that short-term memory where you cram right before the exam to remember all these terms and all these formulas or whatever else and then as soon as the exam's over, it's gone. Like it just gone. Um this is what we're doing when we are looking at a problem. We're building up more and more in that short-term memory in order to have quicker and quicker connections and understand more about the problem. And disruption kind of cleans out spots of that. Not all of it. You'll remember some of it, but you might forget what you forgot, right? You might not remember everything. Number three, and this is really valuable for software developers, more background processing happens when you spend more time in the foreground. What am I saying here? If I spend all day, let's say eight hours, I spend eight hours on a problem or a project and I'm working on that project continuously or almost continuously, you know, lunch break or whatever. Um, but basically for eight hours most of the day, um, I'm spending working on one problem or one area, one thing, you know, one project. I'm gonna be spending a lot of time with that context in my brain, with the problems I'm working through in my brain as I work through it. When that happens, it's more likely that when I go for a walk or I take a shower or I lay down in bed to close my eyes, I'm going to have thoughts pop in my brain and go, "Oh, that's how it solved that problem. Oh, that's a feature I could add. Oh, I hadn't thought about that. That's your background processing, right? Your brain is still processing things even after you have stopped intentionally thinking about the problem. That can be some of the most valuable things that come out of that. You know, there are things that I have thought of in the shower um to the point where I keep my phone near the shower so I can write down. My phone is waterproof. So, I'll grab a phone and write a note in there and say, "Oh, got to remember that my phone is near my bed. It's my alarm clock. " Well, I'll grab you my phone and put a note in my phone because I'll realize, "Oh, I need to remember that. I that could be helpful. " That background processing is helping me solve problems. However, if I spend 15 minutes on a problem and then move to a different problem and I then I you keep go to meetings and I do this and I do that and I'm all over all day, less of that background processing happens where my brain doesn't have enough information continuing to think about. It's, you know, I instead of building up that engine where I'm putting more and more fuel into it and so it can go further, it's basically starter fuel because it's going from thing to thing and my brain is just overwhelmed and tired not really uh finding those valuable connections. And I can often tell when I've had distracted days or days where I've done a lot of different things. And this happens. It's a normal part of life. But when it happens, I'll I can tell by having less of those shower thoughts or thoughts when I'm laying down in bed or, you know, when I'm out for a walk, I often find that my brain doesn't come up with those new things because it's not really working on those problems. So, my back background processes aren't really happening or they're not really being effective. So, more background processing happens when you spend more time in the foreground. Number four, a lot of bugs and security vulnerabilities occur in the connection

### [10:00](https://www.youtube.com/watch?v=eZfHcv4_tnE&t=600s) Segment 3 (10:00 - 15:00)

points. What do we mean by this? Well, applications typically aren't one executable. That's it. Usually they are if you're running an executable it would be well it's talking to an API that's talking to a database caching service that's talking across the web that has user secrets in you know key vault or something else like there's a whole lot of connection points that's a very simple application um the those things are where the bugs often happen and security vulnerabilities it's not that the API is necessarily vulnerable. It's the API and the database that connection between the two causes a vulnerability more likely. Well, understanding those connection points and understanding what the bugs might be, the vulnerabilities means you have to have more of that context in your brain. You have to be thinking not just about how to make this one little thing, this one little query more efficient. You have to be thinking about the database talking to the API talking to the caching service etc. So you understand that whole flow. Now, not every time do you need to be thinking about everything, but when you have that time to focus, you're focusing on the bigger picture where you're maybe putting in a um a new form on a website where you're adding the website to the API to the caching service to the database. You know, when you're doing that whole process, you need to have all that in your brain. Think about all the different interactions. So you have a better idea of where the bugs might occur and the security vulnerabilities might occur because you are thinking about all the whole process as opposed to I just do this one, next one. Because if you just focus on each individual piece, then what happens is they all work well in isolation. But those connection points cause problems and because you were doing shorter things and not keeping that overall context in your brain then you miss those connection points as possible bugs and security vulnerabilities. Now, I'm not saying don't break up tasks. Definitely break up your tasks, but maybe do them together as in task one, then task two, then task three in order together. That way, you also keep that in mind. So, you're building that maybe a store procedure, you're building that query. You're thinking about the front end still. Again, your background processors are still working on that front end problem. So, you go, "Wait, um, that's a problem because of this. " and you start to see those things. Number five, a lot of bugs also live in the edge cases. When you are being quick and when you're being, you know, distracted by other things, you tend to focus on getting the happy path up and running. Meaning, you're thinking about, you know, the input form. You're thinking about making the input form work. But when you spend time and work on it and don't get distracted, you can focus on making sure that even the edge cases work because that's where you find a lot of the bugs. Um, SQL injection is a really popular one for this where it will work normally just fine, but because you didn't think of that whole process, there's an edge case here. Um, which is also the connection point issue. Um, but what happens is it works fine in the normal case, but you can also inject SQL in it and get back different data. That's a big problem. So, a lot of bugs live in edge cases, but when you are rushing, when you're not thinking about the problem as a whole, when you're getting distracted, you know, or maybe you get, this is a big one, when you get the feature implemented, but before you can continue on the process and test it, you get distracted. when you come back, you go, "Oh, I'm just wrapping this up. " Right? And you forget to do all those testing cases because it's working now and you forget that you hadn't done them all. That's where you have bugs. Uh, number six, additional speed comes from an already loaded context window. If I'm going to fix one bug in, let's say, the suggestion site, um, if I go to a suggestion site and I'm going to fix one bug, I'm going to try and fix a few bugs because I don't touch the suggestion site very often. It's it just works, right? So, when I go there to

### [15:00](https://www.youtube.com/watch?v=eZfHcv4_tnE&t=900s) Segment 4 (15:00 - 20:00)

make a modification, I'm going to have to rego over that context. Okay, it uses I believe it's been a while, uh, MongoDB. I think it uses Red S2. Um not positive on that one. I think it does. Um and then it um it uses C and it has this front end and this library and it you know here's all the code and understand all those processes and all the dependencies. It you know emails out um things as well and it has dependency on Azure and like there's all these things that I'm going have to put in my brain. But once I do and I fix one bug, it's a whole lot easier to fix a few more because I'm already there. I've already got the process down. I even have the process down of the CI/CD process. What steps do I need to take to get this into development? make sure my development machine is up and running the right way and so I can test out the the new features and make sure they're working correctly? And what steps we need to take to get this into production, right? So, I've done all those things once, and that first time takes a little extra time, but now my brain's already loaded with context. So, I can get additional speed in fixing the next five bugs or whatever I have because I don't have to do that over again. And it's super easy to go in there and go boom, boom, boom, fix a whole bunch more. Which is why, you know, if you ever look at my commits and my uh pull requests, you won't usually see one. You'll see a multiple right in a row because I got into a system and just made a whole bunch of changes. So, you know, I don't spend a whole lot of time working on any of my systems and sites because I first of all try to write really good code. Um, not that it always is at first, but um, when I write really good code, then it doesn't have to change as often, but then when I do, I'm gonna go in there and make sure I not only fix the problems, I also going to update all the dependencies, make sure they're all update and tested. Um, I'm going to add maybe a feature or two that I'm looking for that, you know, I've kind of cached out there for someday to add that feature. I'm gonna probably do that as well. couple of, you know, uh, you know, nice to have things as well. Um, but I'll do all those things all at once. That way, it's so much easier to make those changes and to, um, get things out more quickly. So, that's why attention is attention spans and focus is so important. Now, life is hard. Um, employers don't love to give you tons of focus time. It's just not necessarily a thing because you have, you know, um a meeting in the morning to talk about what you're going to do. You have a meeting in the afternoon to talk about what you did. You have a meeting in the middle of the day to talk about why you're not getting things done. You have a follow-up meeting after that to talk about why the meeting that you had in the morning wasn't, you know, as efficient as it could. And all of a sudden, you have like, you know, nothing but meetings. And then your boss goes, "Why aren't you getting things done? " You're like, "I never have time. " So, I understand this and I'm not saying that you can just wave a magic wand and have eight hours of focus a day. That's not necessarily going to happen. But there are things you can do to work on that. You can do, you know, establish some things to help your um ability to focus, but part of this is on practice. And so let's talk about the what things can you do to improve your attention span. Some of these things aren't out of you. are things you can do to help your employer help you. But number one, and it's really the answer to almost every question about how do you improve is practice. Too often people think, well, I I watch a video or I do this or I do that in order to improve. No, the most important thing you can do is practice. And this is from a guy who provides a whole lot of training videos. The answer to how to improve is almost always practice. Now, yes, watching videos to prepare, cool. Watching videos to help you understand what you're doing, sure. But at the end of the day, practice is the most important thing. Now, how do you practice improving your attention span? Uh, one of the ways I have found that been super helpful for me, um, I don't do it as often anymore because I have really worked at improving my attention span, um, to the point where it just kind of comes naturally. Um, still takes work sometimes, but it's easier. But the way I had started out was the Pomodoro technique. So the pomodoro technique um there's lots of different you know nuances to it you know depend you know which person is

### [20:00](https://www.youtube.com/watch?v=eZfHcv4_tnE&t=1200s) Segment 5 (20:00 - 25:00)

teaching it but essentially what it is you section off a time I think that you know again different places different times it's either 15 or 20 minutes usually um I tend to go for the longer times like 20 minutes um but where you say okay I'm going to work on this task for 20 minutes and it's not going to be I'm going to work on my task list for 20 minutes. No, that one task. You might say, "Well, I was done 15 minutes. " Okay. Then what you're going to do is you spend the next five minutes making it better, not going on the next task, making that better. Focus on that one thing for 20 minutes. You might say, "Well, you're going to waste time. " Well, first of all, no, because when you focus on making something better, then you have better long-term results. Okay? You're going to focus more on edge cases. those connection points and other issues that are going to improve your overall code. You're going to decrease number of bugs and security vulnerabilities etc. So you focus on that for 20 minutes. Then you take a five minute break um or a threem minute break depends. Again I usually do five. So a five minute break where you don't do work. um you kind of clear your brain or do something else and then you go back and do another 20 minutes then five off then 20 minutes then 15 off and you start that whole process over again. So what you will find is that it's really hard and that the pomodoro technique uh talks about the idea that when you get distracted when a phone rings when your um when your a text comes up in your phone you look at it uh when email pops up and you quickly answer it or a team's message or whatever else that you restart. You're like nope got to start over. And at first you will only get a few pomodoros done a day if that. But over time you will see that you get more and more done. Now I don't typically work the entire day that way. I typically say hey I love to get eight done today just eight. And I'll try and get eight done and see if we can't get that done. Um and maybe I get six done and go I feel good about six. So try and get, you know, that practice in by practicing just 20 minutes. Now you can improve that by saying, "Okay, I I've got that rhythm down, but I'm going to start, you know, tackling bigger problems or something else. I'm going to do one hour. " And that's outside of technique. It's something on your own, but I'm going to do one hour. I'm not going to, you know, have any distractions for one hour. So I'm going to focus on this task. Maybe I'm working on designing a system or I'm working on, you know, identifying a new feature and how to implement it. One hour focus on just that. And you will be amazed at once you get to the point where you can do that, how valuable that is. But it comes through practice. Number two, eliminate distractions. when you're working, try to turn your phone off, your personal phone especially. But if you can, your work phone, that too, that's great. Um, now that's hard in some organizations, they don't allow that. Understandable. But whenever possible, try to eliminate those distractions. What I do, even though we communicate over Teams, what I'll do is Teams is on my phone and on my computer, I'll turn it off my computer and I'll put my phone face down and on vibrate so I won't hear it or even on do not disturb. And then I will focus on what I'm working on for an hour and then I'll look at my phone and go, "Oh, I need to answer that. " And I'll get back to somebody. Almost never is it a critical thing where oh my goodness I have to respond right away. But too often we deal with the quick question or hey I got a you know question about this or hey can we talk five minutes about that as top of the heap important when the reality is it isn't. So try as much as possible to eliminate distractions. I love noiseancelling headphones overthe-ear noise cancelling headphones. They're awesome. I have worked in too many environments with other people. They're distracting. So, putting headphones on, I don't tend to listen to music because music distracts me. Even though, you know, you'd think, well, no, it's just music. You understand? And, you know, but no, what happens is I catch myself singing along, which means half my brain is thinking about that music. Even though, even if it is the, you know, that background process is thinking about music. I don't want that. I want it to be thinking about the thing I'm working on so that later it can tell me when it came up with a solution. So I'll tend to listen to, you know, cafe sounds or nature sound or

### [25:00](https://www.youtube.com/watch?v=eZfHcv4_tnE&t=1500s) Segment 6 (25:00 - 30:00)

something else where it's there's nothing in there except a repeating just background sound. And that way I can have that noise cancelling headphones and the sound coming from that continuous sound eliminates any other noise in the office. that can be really helpful. So, eliminate as many distractions as possible. Number three, and this goes with number two, batch your work. Too often, you have your unfortunately Outlook open and you get an email and you get distracted and answer that and go back to your work and then a team's message pops up and you go, you know, answer that and go back to work. And what happens is you're never really focusing on one thing at a time. Batch your work. Talk to your boss about this. This may require some buyin, but what you would tell your boss is, "Listen, when I come in for the, you know, I come in at 8:00 in the morning, I'm going to spend the first half hour of my workday answering emails, answering teams messages, and, you know, cleaning up the night before, whatever. And then from 8:30 to 10:00 a. m. I want to focus in on working on this project. And then at 10:00 a. m. I'll answer emails. I will answer teams messages. I'll, you know, use the restroom. I'll talk to co-workers, whatever. And then from, you know, 10:30 or, you know, 10 probably 10:30. Um, from 10:30 to 11:30, I'm going to work and focus in on work. And then the afternoon's going to be meetings. It's going to be, you know, after lunch game meetings, busy work, you know, those kind of things that just take time. So, if you do those batches though, where you're saying, I'm going to batch work in the morning and and, you know, the mid midm morning as well, then you have two chunks where sure it's only two and a half hours of your day, but you have focus work and you're going to see a market improvement in how much work you can do in a day. and your boss is going to like it a over time. Now, you have to work with your boss usually to make sure that they don't just, you know, schedule you for early meetings or uh require you to answer your phone during those that time or whatever the case may be. Try to as much as possible eliminate those distractions with help um and batch your work. That way you can spend more time with that context window open. Number four, it's be a hard one, especially in the era of AI. Do one thing at a time. You know, I've seen more and more people talking about AI agents and how they have agents and sub aents and they can spin off multiple tasks and they go from thing to thing where they're reviewing the work of one AI and then send it off to do more work and then they go to the next AI, review that work and send it off. That may feel efficient, but what's happening is you have no context window. You are destroying your context window and having a very tiny one open up for every new project. So what happens is you miss all those connections, those bugs, you know, that happen the edge cases and those connections and in general with the more complex code, you're more likely to miss those things because you're doing more at a surface level. you are not going deep anywhere. So try as much as possible to do one thing at a time. If you're using an AI agent, sure, give them the task and when they're doing it, don't just say, "Oh, I'm going to move on the next task. " No, no. Focus in on what they've already done. Review the plan. Review the code they've written. spend more time in code review for the last thing they did because they're going to mess something up and you need to make sure you modify that. So, spend as much time as possible working with that agent on one thing at a time. That's number four. Number five, intentionally focus on other areas. So, or in other areas. So when you're doing things other than software development, practice this idea of focus, one of the ones that's really easy to kind of see yourself distracted in is movies. If you're going to watch a movie on the couch or watch a sporting event or something else like that, what are you doing? I have caught myself on multiple devices at the same time while quote unquote watching a movie. The reality is sometimes there's time for that. You know, sometimes, you know, for example, at night, I will often uh watch a TV show or a movie on one screen while playing World of Warcraft. It's my downtime. It's relaxed time. I am doing two things at once, but I'm not really paying attention to the movie. I'm not

### [30:00](https://www.youtube.com/watch?v=eZfHcv4_tnE&t=1800s) Segment 7 (30:00 - 33:00)

watching anything new. I'm watching things I watch before that's just, you know, background noise or I'll listen to a book even um while I, you know, go and collect flowers and kill stuff like so there are there is time for that. But when you're going to, you know, watch a significant other or when you're going to sit down to hang out with your friends, don't get on your phone. Focus in on just talking to your friends or just watching the movie with your friends and focus on just that one task. It's going to be hard, but you can do it. When you go for a walk, go for a walk. Don't go for a walk while doing other things. Just go for a walk. I have found that, you know, one of my side hobbies is my primary side hobby is photography and I like to take photographs of especially animals and wildlife. Um, so I will go out and go to a park and because I am out in the woods and I am looking to take a picture of something, I don't have headphones in. I'm not listening to something else. I'm listening for those animals. I'm listening for the crunch of leaves, etc. So, I'm focused on one thing. And I'll tell you what, that really helps with practicing that focus because at first you kind of feel like, oh, I should, you know, listen to a book. I I'm always listening to a book, but not there. And so, it helps is it helps that singular focus because that builds up that skill so I can do it in my software development career because I'm practicing it in other areas as well. This is a scary one. Take five minutes and meditate. This might blow your brain at first because you're going to sit there and go, "Okay, I got to do this for school or I got to remember to put this in the grocery list or I got to try and clear your brain. " Now, part of the way you can clear your brain is by having a list for everything. I have lists on my phone for everything. Whenever I come across a new article I want to talk about or a new idea, for example, all these dev questions end up usually in my phone at one point or another as a note where I'll be out somewhere, the doctor's office, wherever else. I'll go, "Oh, I should talk about that. " I'll write it down my phone. That way, I don't have to keep it in my contact window. I don't have to remember something. Clear it out. We have a grocery list for our house because we don't want to remember, oh, I've got to remember milk and eggs and paper towels. Don't try to remember it. Put in a list and forget about it. Now you clear that context for something more important. So meditation will really help first of all clear out those things because you're going to find that those things pop up over and over again to clear my brain. But eventually get to the point where you can just sit for 5 minutes and be quiet. That will really help improve your focus. How well a developer can focus will have a direct impact on the quality of the code they write. It's important that you recognize that and practice building up your ability to focus since it will have a direct impact on your career. All right, thanks for listening and as always I am Tim Corey.

---
*Источник: https://ekstraktznaniy.ru/video/51640*