More editing on the feelings we have
[themediocreprogrammer.git] / chapter05.md
index 283297dbaba31e8d0c401e46c1aae44a6c280730..79acd97dfb726d1c53d259a1fb5a44fcd0b594d9 100644 (file)
@@ -1,28 +1,30 @@
 # A day's journey
 
-Discuss productivity for developers and how programming can be exhausting. Discuss the myth of always being on as a developer and the need for downtime and rest.
-
 ## Riding until dawn
 
-Programmers are always trying to find new ways to be productive. Different editors, scripts, compilation tweaks, automation; the list goes on and on for how  programmers want to maximize their time coding. We also tend to add that to the rest of our lives, thinking that we should always be on, coding. Any moment not coding is a moment that our projects get behind. And that can lead to other problems: missed deadlines, others getting to market before us, collisions with others work because they made a breaking change before we could smooth it out. We're constantly worrying that we're not doing enough. We've heard the stories: developers waking up at their computers to the strange sound of beeping because the keyboard auto repeat can't handle anymore input with their face resting on the keys.
+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.
+
+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?
 
-I think there's this tendency that because we work with machines that are tireless and ready for more work that we need to be the same way; we need to constantly utilize these resources. We become like the machine, and the better we get the better we'd better get (because our boss or colleagues will notice that we've completed something and more work will come our way).
+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. 
 
-The problem is that if we feel we always need to be "on" we don't allow ourselves the opportunity to be "off". We create a pattern where we don't allow ourselves the moments to sit and reflect on what it is we're doing. We don't allow our brains to recharge. We don't allow for our minds to sit with what we've learned and sweep that into our long-term storage.
+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.
 
-Instead we create a feeling of constant panic where we spend most of our time worrying that we're not doing enough while at the same time pushing our minds to exhaustion.  It's a vicious feedback loop, and one that can lead to 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.
 
-So 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 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 acknowledging that you need to have a period where you are not programming, not thinking about programming, and not being a programmer is vital to your well-being. You need to have moments where you can turn off the programmer part of your being.
+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.
+
+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 you constantly feel like you're falling behind in your learning. When are you supposed to learn all of the new things happening daily? When are you supposed to catch up on all of that technical debt you've been accruing over the years? When are you going to have time to learn the ins-and-outs of whatever technology that is no longer part of your day-to-day work but is still interesting to you?
+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.
 
-This constant feeling that there's more to do and we need to spend every waking moment doing it or we're somehow less of a developer isn't helped by folks who look super-productive; the folks whom you can suggest something in the morning and they have a working prototype in the afternoon while still figuring out their normal work routine.
+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 this feeling; that we feel the constant need to somehow push ourselves to keep learning and doing. We can see ourselves in the moment with the thoughts of "just one more line of code before bed" or "I  can read a few more articles or blog posts or [insert favorite way to consume more information here]". We need to see our feelings and understand where they come from.
+### FIXME
 
 These feelings usually stem from a sense of inadequacy. We feel like we're not measuring up to whatever ideals we have, whether that's an ideal that is externally driven or one that we made ourselves. This comes from us comparing ourselves to other programmers and seeing their work. It also comes from us comparing ourselves to our own mythical idea of what the perfect programmer is.
 
@@ -54,8 +56,20 @@ We make attachments on completion and hitting deadlines. Some of these are exter
 
 It's better for us to get rid of deadlines wherever possible. We won't be able to get rid of the external ones where folks are waiting on our contributions (though we may want to renegotiate those if they're not hard deadlines) but we can let go of the desires to release this project on an arbitrary deadline.
 
-# FIXME
+## Containers
+
+We should replace soft deadlines with the commitment to work on a particular project for a given length of time. One trick that I have found useful is the idea of a timed container where one chooses what they are working on and then focuses on that project with their full attention for the period of time. I've used 10 minutes but something as small as 5 minutes or as large as 25 minutes can be useful. The work we selected at the beginning of the container is the only thing we work on, and we do our best to make sure there are no interruptions, whether internal or external, until the container is complete. When the work is done we wrap up wherever we landed and then take a quick break before starting the next container (with the same or some other task before us).
+
+When we start the container we see where the session takes us. There is no judgment of the quality of the work in the container, just the expectation that we will work  for the duration of the container. There's also no expectation about what we will have accomplished when the container is finished. If we complete the task before the container ends then that's awesome! We can then figure out what out next task will be.  If the container ends and we're still in the middle of debugging a problem perhaps we write down where we left off and what steps we took in order to get there and then work on something else. Or we get up for a bit and come back to the session in progress.
+
+The underlying concept for the container is just to agree to work in the container without judgment for the work done and for the progress made. When the work is done in the container we take a step back and reflect on what we did and where we need to go. We give ourselves permission to not have to worry about it in the moment, but also allow ourselves the freedom to look back in short increments and see how we're doing. We allow ourselves to just work in the moment without fear of judgment, reprisal, or self-recrimination. We give ourselves the gift of uninterrupted work (or at least as much as we can possibly give). And we give it our full attention by turning off notifications, closing other programs, and focusing on the work in front of us.
+
+## Distractions
+
+Life is often full of distractions that are beyond 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 and needs our attention. Something happens at home and now our minds are split between work and home. Whatever the cause may be there are times when our attention isn't where we feel it should be and we feel pulled in every direction at once.
+
+This is where the containers can be most helpful. If someone interrupts the container we can determine if it's something that is more important than the work we're doing. If it is more important than what we're currently doing we can stop the container with the understanding that we'll get back to it once we've handled the interruption. If it's not more important then we can agree (both with whomever is interrupting, or 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 and not try to split our attention between the two.
 
-We should replace soft deadlines with the commitment to work on a particular project for a given length of time. Those periods of time should be uninterrupted containers of time where we can dedicate our full attention to the project. And the containers should be self-contained.
+This may seem like a simple delineation but putting it into practice can be challenging, especially if the culture you're in is about immediate results.
 
-We start the container and see where the session takes us. We don't allow ourselves to get caught up in results-based focus; instead we allow ourselves to be curious and let the coding take us where it wants to go. If the container ends and we're still debugging a problem perhaps we write down where we left off and what steps we took in order to get there. Or we get up for a bit and come back to the session in progress.  
+I don't have good answers if your culture demands your attention at all times. The best I can offer is that the containerized approach at least gives you some periods of concentration. But if you feel constantly on-guard because something might happen at any moment you're going to be less effective than if you have the ability to shut the world off for a bit. I'd also challenge you to see if that perception is really true: are you constantly being ambushed by interruptions? Testing that theory may be in order. Keep a sheet of paper (or put it into a text file, spreadsheet or database) with when you did a focus container and if it was interrupted or not. If you find that you are getting interrupted more often than not then you need to reassess what is causing the interruption and if it's something that you can control. There are many ways to handle workplace distractions that I won't go into here but being mindful of the distractions and where they are coming from will be key to figuring out how to mitigate them in the future.