Additional editing on taking a break
[themediocreprogrammer.git] / chapter05.md
index b1eefbbd17c12c47f2f409d7317a7ccd744da8b7..937d750e8a2d01f7841b78270db291d86e37710e 100644 (file)
@@ -2,37 +2,37 @@
 
 ## Riding until dawn
 
-Programmers are always trying to find new ways to be productive. Tweaks to text editors, compilation tweaks, scripts and automation; the list goes on for how programmers want to maximize their productive time coding. We also spend time tweaking the rest of our lives with the belief that we should always be doing something related to coding. Any moment we're not coding is a moment where our projects get behind. And getting behind with our coding can lead to other problems: missed deadlines, other companies getting their program to market before us, or other instances where we miss an opportunity. We're constantly worrying that we're not doing enough to succeed.
+As programmers we are always trying to find new ways to be productive. Tweaks to text editors, compilation tweaks, scripts and automation; the list goes on for how programmers want to maximize their productive coding time. We also spend time tweaking the rest of our lives with the belief that we should always be doing something related to coding. Any moment we're not coding is a moment where our projects get behind. And getting behind with our coding can lead to other problems: missed deadlines, other companies getting their program to market before us, or other instances where we miss an opportunity. We're constantly worrying that we're not doing enough to succeed.
 
-We've heard the stories of developers waking up at their computers to the strange sound of beeping because they fell asleep at the keyboard and the keyboard auto repeat can't handle any more input with their face resting on the keys. Isn't that how developers should work?
+We've heard stories of developers waking up at their computers to the strange sound of beeping because they fell asleep at the keyboard and the keyboard's auto repeat can't handle any more input with their face resting on the keys. Isn't that how developers should work?
 
-There's a tendency to think that because we work with machines that are tireless and ready for more work that we need to behave in the same way; we need to constantly utilize these resources. We try become like the machine; tireless and always ready for more work. 
+There's a tendency to believe that because we work with machines that are tireless and ready for more work that we nee to adapt ourselves to these machines. We feel the urge to always be "on" and ready to give the machine more things to work on. Idleness is regarded as a waste. We try to become like the machine; tireless and always ready for more work.
 
-There's a problem with always being "on". When we feel like we always have to be "on" we never let ourselves feel like we can be "off" again. We don't allow ourselves the time to be off. This creates a pattern where we deny ourselves the moments to sit and reflect on what we're doing.  We force ourselves to keep moving; keep programming no matter the personal cost. Our brains don't get the ability to rest, relax, and recharge. Our minds are too busy and exhausted to process what we've learned and sweep that knowledge into long-term storage. When we get exhausted we start to worry that we're not doing enough. This doesn't motivate us; instead we create a vicious feedback loop of fear and panic. We spend our day worrying that we're not doing enough while our minds cry out "enough!" from exhaustion. This feedback loop of fear and exhaustion can spiral us into a vortex of burnout, depression, and a desire to leave programming for good.
+There's a problem with always being "on". When we feel like we always have to be "on" we never let ourselves feel like we can be "off". We don't allow ourselves any periods of idleness and rest. This creates a pattern where we deny ourselves the moments to sit and reflect on what we're doing.  We force ourselves to keep moving; keep programming no matter the personal cost. Our brains don't get the ability to rest, relax, and recharge. Our minds are too busy and exhausted to process what we've learned and sweep that knowledge into long-term storage. When we get exhausted we start to worry that we're not doing enough. This doesn't motivate us; instead it creates a vicious feedback loop of fear and panic. We spend our day worrying that we're not doing enough while our minds cry out "enough!" from exhaustion. This feedback loop of fear and exhaustion can spiral us into a vortex of burnout, depression, and a desire to leave programming for good.
 
-There's a delicate balance that we need to strike between our desires of being on all the time and our needs for relaxation and reflection. Our desires for invincible and indefatigable development need to be tempered with the reality that our bodies and minds have finite resources per day and must be allocated appropriately. Think of this as power-management for a complex machine that the manufacturer (currently) won't let you swap the battery out for a new one. Being aware what processes are running, how much energy is being used, and how much energy is left would be vital to ensuring you could still be running that machine later on in the day. That's the level of awareness that we'll need to have about ourselves.
+There's a delicate balance that we need to strike between our desires of being on all the time and our needs for relaxation and reflection. Our desire for invincible and indefatigable development need to be tempered with the reality that our bodies and minds have finite resources per day that must be allocated appropriately. Think of this as power-management for a complex machine that the manufacturer (currently) doesn't allow you to swap out the battery when it is spent. Being aware of what processes are running, how much energy is being used, and how much energy is left is vital for ensuring you can still be functional later on in the day. That's the level of awareness we need to have about ourselves.
 
-How do we balance these feelings of wanting to be on all the time while allowing ourselves to relax and reflect on what we're doing? How do we pay attention to the needs of this programming machine?
+How do we balance these feelings of wanting to be on all the time while allowing ourselves to relax and reflect on what we're doing? How do we pay attention to the needs of this "programming machine"?
 
 ## Lights out
 
-First we need to acknowledge that we can't be on all the time. You may know this intuitively and think "yes, of course" but knowing is not the same as doing. We need to have a periods where we are not programming and not thinking about programming. We need to have moments where we can turn off the programmer part of our being. These periods of not-programming are vital to our well-being and give us chances to explore the wider world and let our minds rest in-between programming sessions.
+First, we need to acknowledge that we can't be on all the time. We may know this intuitively and think "yes, of course" but knowing is not the same as doing. We need to have a periods where we are not programming and not thinking about programming. We should have moments where we can turn off the programmer part of our being. These periods of not-programming are vital to our well-being and give us chances to explore the wider world and let our minds rest in-between programming sessions.
 
-This can be tricky if we feel like we're falling behind in our learning. When are we supposed to learn all of the new things happening daily? When are we supposed to catch up on all of that technical debt you've been accruing over the years? When will we have time to learn the ins-and-outs of technologies that aren't part of our day-to-day work but are still interesting to us?
+This can be tricky if we feel like we're falling behind in our learning. When are we supposed to learn all of the new things happening daily? When are we supposed to catch up on all of that technical debt we've been accruing over the years? When will we have time to learn the ins-and-outs of technologies that aren't part of our day-to-day work but are still interesting to us?
 
-These feelings that we have (that there's more to do and that we need to spend every waking moment doing it lest we fall behind) isn't helped by programmers who look super productive. These are the programmers that think of a clever idea in the morning and have a working prototype in the afternoon (while still handling normal work routine). When we compare ourselves against these programmers we wonder if they ever take time away from the computer.
+These feelings that we have (that there's more to do and that we need to spend every waking moment doing it lest we fall behind) aren't helped when we compare ourselves to other programmers who appear super productive. These are the programmers who think of a clever idea in the morning and have a working prototype in the afternoon (while still handling normal work routine). When we compare ourselves against these programmers we wonder if they ever take time away from the computer.
 
-We can acknowledge that we have feelings of wanting to push ourselves to keep learning and doing. We can see ourselves when we think "just one more line of code before bed" or convince ourselves "I  can read a few more articles or pages or [insert favorite way to consume more information here]". We can pause and see where these feelings and thoughts come from and understand why we're still pushing ourselves beyond exhaustion.
+We can acknowledge that we have feelings of wanting to push ourselves to keep learning and doing. We can notice our feelings when we think "just one more line of code before bed" or convince ourselves "I can read a few more articles or pages or [insert favorite way to consume more information here]". We can pause and notice where these feelings and thoughts come from and understand why we're still pushing ourselves beyond exhaustion.
 
 These feelings usually stem from a sense of inadequacy. We feel like we're not measuring up to the ideals we have; whether these ideals are ones we've created or ones that are externally driven. These ideals come from analyzing other programmers (colleagues or folks we admire), and measuring our progress against their work. They also come from our own mythical idea of what the perfect programmer is.
 
-What we need to realize is that those ideas of what makes good and perfect programmers are fantasies. They're a composite of what we think a good and perfect programmer should be. They don't exist in the real world. True, we may see programmers out there that seem to wake up with a keyboard attached to their hands, spend the entire day coding, and go to sleep with dreams of more code formulating in their heads. But we need to realize that we're only seeing one side of their lives. We're not seeing the whole picture of who they are. We need to focus on our own bodies and minds and realize when they're tired and need rest. We can't make ourselves into other people, we need to work with who and what we are. 
+What we need to realize is that those ideas of what makes good and perfect programmers are fantasies. They're a composite of what we think a good and perfect programmer should be. They don't exist in the real world. True, we may see programmers out there that seem to wake up with a keyboard attached to their hands, spend the entire day coding, and go to sleep with dreams of more code formulating in their heads. But we need to realize that we're only seeing one side of their lives. We're not seeing the whole picture of who they are. We need to focus on our own bodies and minds and realize when we are tired and need rest. We can't make ourselves into other people; we need to work with who and what we are. 
 
 Our bodies require down-time in order to be most effective. We need moments where we can step away from the keyboard and allow ourselves to wind down and relax. Our minds are not designed for constant work, especially at the levels that computer programming requires. The sooner we realize we should step back and take breaks throughout the day to recharge ourselves the happier (and more productive) we will be.
 
 ## Taking a break
 
-Taking a break is more than just flipping over to another application on our computer. My tendency while taking a break is to start checking my email or open up one of my various chat programs to catch up on what happened since I last opened it (usually since the last time I took a break). But this really isn't taking a break as it is trying to multi-task at my desk. Real breaks involve getting up from the computer. It doesn't have to be a large break; taking a break can be as simple as standing up and walking away from your work-space into another room or area. But you you need to stand up from your computer to get a "context switch", where your mind can feel like it isn't in the same place as it was earlier. Context Switching lets your mind completely switch out and flush out the context of the area you're in. It allows your mind to focus on new context and new input.
+Taking a break is more than just flipping over to another application on our computer. My tendency while taking a break is to start checking my email or open up one of my various chat programs to catch up on what happened since I last opened it (usually since the last time I took a break). But this really isn't taking a break as it is trying to multi-task at my desk. Real breaks involve getting up from the computer. It doesn't have to be a large break; taking a break can be as simple as moving away from your work-space into another room or area. But you you need to move away from your computer to get a "context switch", where your mind can feel like it isn't in the same place as it was earlier. Context Switching lets your mind completely switch out and flush out the context of the area you're in. It allows your mind to focus on new context and new input.
 
 This can be tricky in an office where the underlying expectation is that one must be at their work space in order to be productive. And there are only so many "bio breaks" (breaks that are related to matters of human biology, also known as using the restroom) someone can take in such situations. How can you give yourself the context switch your mind needs in such situations?
 
@@ -40,11 +40,11 @@ You might be able to achieve the same sort of context-switch by looking away fro
 
 Changing your sitting / standing arrangement can also be a good context switch where you give yourself a context-switch around your physical workspace. It can be as simple as just standing up and stretching from time to time, or as complex as raising or lowering your standing desk. Telling yourself that there are two contexts around your desk: sitting and standing at the desk, may be enough to give yourself the context switch and rest that your mind needs.
 
-If your workplace has a culture that allows you to step away from your desk and walk around then that would be a great context switch. Adding a physical component (as much as you are able) to your context switch can help your mind to relax and recharge.
+If your workplace has a culture that allows you to step away from your desk and move around then that would be a great context switch. Adding a physical component (as much as you are able) to your context switch can help your mind to relax and recharge.
 
-You'll have to experiment with a few of these and see what works. At the bare minimum you'll want your mind to feel as though it doesn't have to be on all the time. You want your mind to have cool-down periods between coding sessions so it can flush the remnants of that session from your mental "cache" and into longer-term storage. Then when you get back to your coding session you'll be more likely to remember what was going on.
+You'll have to experiment with a few of these to determine what works. At the bare minimum you'll want your mind to feel as though it doesn't have to be on all the time. You want your mind to have cool-down periods between coding sessions so it can flush the remnants of that session from your mental "cache" and into longer-term storage. Then when you get back to your coding session you'll be more likely to remember what was going on.
 
-You may also find that when you step away from the computer that you forget a lot of what you were previously doing. That's OK too. What I would recommend is keeping a journal or log of what you were thinking in as much detail as you need. Either write them on a physical piece of paper or use a text file to keep these notes so you'll have enough clues to allow you to pick up where you left off.
+You may also find when you go away from the computer for a while that you'll forget what you were previously doing. That's OK too. What I would recommend is keeping a journal or log of what you were thinking in as much detail as you need. Either write them on a physical piece of paper or use a text file to keep these notes so you'll have enough clues to allow you to pick up where you left off.
 
 ## Productive thinking
 
@@ -74,7 +74,7 @@ This whole book was created and edited using focus containers. I took about 10 m
 
 ## Distractions
 
-Life is full of distractions. So many things want our attention, and many of these distractions are outside of our control. Someone walks up to our work-space and needs our attention at that moment. An email thread that we thought was settled becomes a heated discussion our attention is drawn to it. Something happens at home and now our mind is split between our work tasks and worrying about what's happening at home. Whatever the cause may be there are times when our attention isn't where we want it to be and we feel pulled in every direction at once.
+Life is full of distractions. So many things want our attention, and many of these distractions are outside of our control. Someone enters our work-space and needs our attention at that moment. An email thread that we thought was settled becomes a heated discussion our attention is drawn to it. Something happens at home and now our mind is split between our work tasks and worrying about what's happening at home. Whatever the cause may be there are times when our attention isn't where we want it to be and we feel pulled in every direction at once.
 
 This is where the containers are most helpful. If something interrupts the container we can determine if it's more important than the work we're doing. If we determine that it is more important than what we're currently doing we can stop the container with the understanding that we'll return to the work once we've handled the interruption. If the interruption is not more important then we can agree (both with whomever is interrupting us, or with ourselves) that our focus needs to be here with the work until the container ends. We'll be able to give that other thing our full attention once the container ends. We'll also try to split our attention between the work and the interruption, and will give each of them our full attention at the appropriate time.
 
@@ -82,4 +82,12 @@ This creates a simple delineation between our work and the rest of the world. Bu
 
 I don't have good answers if the culture you're in demands your attention at all times. The best I can offer is that a containerized approach gives you at least some periods of undisturbed concentration. But if you feel on-guard all the time because something might happen at any moment then you're going to remain less effective than if you can shut the world off for a bit. I'd also challenge you to examine if that perception is really true; are you constantly being ambushed by interruptions? Testing that theory may be in order. Keep a log (whether it's a sheet of paper, text file, spreadsheet, or database is up to you) of when you did a focus container and if that container was interrupted or not. If you find that you are getting interrupted more often than not then you need to examine what is causing the interruption and assess if it's something that you can control. There are many ways to handle and minimize workplace distractions that I won't go into here but being aware of the distractions and determining where they are coming from will be key to figuring out how to mitigate them in the future.
 
-Also be aware of the self-imposed distractions you've added to your life. Do you need immediate notifications about incoming messages? Is your thought important enough to warrant you switching out of your current context so you can post it to your friends and colleagues? Often we think that we need to return messages the moment we receive them. I'd argue that most of the messages you might receive in the day don't warrant the attention you're giving them, and certainly not the sort of attention that warrants stopping what you're doing in order to view them. You may be served better by batching the periods where you check your messages as infrequently as you can. Some folks recommend two or three times a day, but you'll need to judge for yourself based on your needs. Even if it's once an hour that could make a vast improvement compared with the number of times you're already checking your messages. I'd also recommend turning notifications off for the applications that aren't critical to your work. That may be as simple as closing out an application when you're done with it, or may be as complex as changing the settings so an application doesn't notify you when new messages arrive. You'll need to play with this and see what works best for your needs and concentration. A good rule of thumb is "what is important enough that it would warrant me dropping my important work in order to change my focus to this thing?". If you can scale your notifications back to where only the most time-critical things send you notifications you'll be better able to relax and focus into your work.
+Also be aware of the self-imposed distractions you've added to your life. Do you need immediate notification that someone liked something you shared? Is the funny anecdote you just remembered important enough to warrant switching out of your current context so you can post it to your friends and colleagues? Do you really need something to pop up in your field of view to let you know that your music player changed a track? Are you willing to sacrifice your attention and flow throughout the day because a program detected a change in your environment, regardless of the importance of that change?
+
+We add these distractions into our lives because we worry that we might miss something important. Programs also come configured with most of their notifications turned on so a user can be reminded of status of the program at all times. Perhaps it's useful but for me they are very distracting. In my career I've sat at the desks of many other folks and have cringed at the number of notifications they receive in the short period was there (usually the span of ten minutes or less). And I've seen folks interrupt their current line of thinking because a notification for a message unrelated to the current task distracted them. What happened to the original thought? They had to mentally switch back to it and remember where they left off (usually at great mental effort). 
+
+I challenge you to turn off as many notifications as you can and get a taste of what your experience is like without them. That may be as simple as closing out an application when you're done with it, or may be as complex as changing the settings so an application doesn't notify you when new messages arrive. You'll need to play with this and see what works best for your needs and concentration. A good rule of thumb is "what is important enough to warrant me dropping my important work and focusing on this thing?". If you can scale your notifications back to where only the most time-critical things send you notifications you'll be better able to relax and focus into your work. You won't have to parse the notifications to determine if what you're seeing is important or not.
+
+One of the reasons I've heard for folks keeping their notifications on is that they might receive something that requires an immediate response. We've created cultures where we feel a need to respond to messages the moment we receive them. I'd argue that most of the messages you receive during the day don't require the attention you're giving them, and certainly not the level of attention that warrants interrupting what you're doing to view and respond to them. You may be better served by scheduling several periods of the day where you do nothing but check and respond to your messages. Schedule these as infrequently as you can. Some folks recommend two or three times a day, but even setting a limit where you check your messages once an hour can make a vast improvement compared with how many times you're already checking your messages. You'll need to judge how often you check your messages based on your needs and your work culture. Also consider the person you're responding to. Does it make sense to give this person a quick, semi-thought-out response or does this message require more time to simmer in your mind before you respond? Giving yourself time to think about a your response may give you additional insights into a problem that aren't readily apparent in the moment. This could mean the difference between one well thought out response versus a deluge of half-thought-out back-and-forth brainstorming via your messaging application. Responding to everything as it's received is very stressful and requires huge amounts of attention that could be better placed on your programming work. 
+
+It may seem challenging and foreign to live without notifications and without the need to respond to every message and notification. But our attention is limited. Maintaining our focus throughout the day can be challenging and stressful. If we can limit the number of distractions we receive throughout the day then we give ourselves the freedom to not have to work as hard to keep our attention attuned to our programming tasks. We get to say "not right now" to our distractions and handle them at a more appropriate time.