More about breaks
[themediocreprogrammer.git] / chapter05.md
index 7781a49ecd163844ccec8055780a33335d49c8a1..24b2d2dcc43c572d0c5649c3c13a60ed9b86ac01 100644 (file)
@@ -23,3 +23,23 @@ This can be tricky if you constantly feel like you're falling behind in your lea
 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 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.
+
+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.
+
+What we need to realize is that those ideas of what a perfect programmer is and is doing right now are fantasies. They don't exist in the real world. True, there are programmers out there who seem to wake up with a keyboard in their hands, spend the day coding, and go to sleep only to dream in more code. But those folks are not us, and we need to understand where our bodies and minds can take us and when they need rest.
+
+Our bodies require down-time in order to be most effective. We need to step away from the keyboard and allow ourselves to come down and relax. Our minds are not designed for constant work, especially at the levels that computer programming requires. We need to step back and realize that we need breaks throughout the day in order to recharge ourselves.
+
+## Taking a break
+
+Taking a break is more than just flipping to another application. I know my tendency for taking a break is to start checking email or head to one of the various chat programs I have in order to catch up on what's happened since I last took a break. Taking a break can be as simple as standing up and walking from your workspace into another room or area. It gives your mind the ability to completely switch out the context of the area you're in and allows it to focus on the new context and new input.
+
+This can be tricky in an office situation where the expectation is that one must be at their desks in order to be productive. And there are only so many "bio-breaks" someone can take in such situations. How can you give yourself the context switch your mind needs in such situations?
+
+You might be able to achieve the same sort of context-switch by looking away from the computer display for a few moments. It's a good idea to look away from the screen every now-and-again to give your eyes a rest. Giving your mind a rest while you give your eyes a rest can give you the incentive to do both.
+
+Standing up can also be a good context switch where you give yourself more of a context-switch from the physical location of the computer. Telling yourself that there's two contexts around your desk: the context of sitting at the desk, and the context of standing at the desk you might be able to use that as the context switch and rest that your mind needs.
+
+If you have a culture in your workplace that allows you to step away from your desk and walk around that would be a great context switch. Adding a physical component (as much as you can) 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 cool down between coding sessions so it can flush it out of "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.