Setting up your environment to be the same all the time, everywhere, can make it easier to focus on the task at hand.
From the age of about 14 I’ve been sitting in front of a computer with a guitar in my lap. It’s been a cheap steel-string guitar, a cheap classical guitar, a cheap electric guitar, an expensive electric guitar, an expensive classical guitar, and several other variations in between, but it’s always there. My home office is full of guitars and amps and wires and microphones, but I keep my classical guitar right by my computer table where I can pick it up and noodle on it while I think.
The tag line of this site is “Pedagogy for the autodidactic programmer.” A goofy play on words, yes, but I firmly believe that if you’re self-taught you must be a much more demanding teacher and a much more dedicated student if you’re to be successful. I’m constantly looking for lessons to apply to the craft of software development, and I find many of them in the field of music, where I am also self-taught.
Just now I watched a video of Billy Sheehan giving a bass clinic at Guitar Center, just to get my mind off of a tough problem for a bit (the topic of a future post). As so often happens, there were a few software lessons hidden even in there (which may be the topics of other future posts). I’ll just talk about one of them, which reminded me of the fanatical way in which I set up my development environments. Go watch it here, starting at the 3 minute, 11 second mark:
Sheehan talks about how he’s been playing the same bass for over 20 years. He sets it up so that he doesn’t have to think about where each note is or where the controls are located. He uses a heavy-duty cotton strap, cut to a length that lets him position the guitar in the same spot whether he’s standing up or sitting down. The strap is made of cotton so that it won’t stretch as he sweats on stage. Finally, the strap has no adjustment slider on it — it’s literally bolted directly to the guitar body.
Because he never has to think about the position of the guitar or where everything is located on the guitar, he can focus completely on his playing (and, oh my GOSH, the man can play).
In my own job, when I’m solving problems, I want to think about a few things as possible. In other words, I don’t want to have to waste effort thinking about my environment or the applications I use or where the delete key is on my keyboard. I want to let my hands move around the keyboard, let my eyes dart from spot to spot on the screen, and let my mind focus totally on the problem at hand without distractions.
A practice that helps me with this is setting up EVERY SINGLE COMPUTER I USE to be exactly the same, or as close as I can get them within the constraints of what each computer needs to do. This usually begins with the keyboard. I’ve been using some form of the Microsoft Natural keyboard since 1994, and I settled on the Microsoft Natural Elite when it arrived in 1998. It’s the only keyboard I use. It’s the only keyboard I will use. I have a stack of unopened keyboards in a cabinet here at my house, because you never know, that fly-by-night Microsoft outfit might go out of business one day, and then where will I be?
Because I never have to think about the keyboard or stop to remember where this or that key is located, my fingers can dance across the keys of their own accord and I can focus entirely on what I’m trying to say, in prose or in code. I have one keyboard in my home office that I plug into my laptop when I’m here, and three more at the remote office: one to plug into the laptop when it’s docked, one for another desktop machine that I use regularly, and a “floater” that I move around to lab machines or other PCs that I might have to use temporarily. When I travel, I stuff one into my backpack so that I don’t have to suffer with the laptop keyboard any longer than necessary.
I’m a little more flexible with mice, but I do have the exact same model at home and at the office to dock to my laptop. It’s always on the left so that I can operate the cut, copy, and paste key combinations with my right hand while pointing & marking with my left hand. I taught myself to use a right-handed mouse with my left hand so that I can take any mouse, move it to the left side, and use it in this manner.
The operating system environment is just as important. I’m not always able to use the same OS across computers, but it’s almost always some version of Microsoft Windows, ranging from XP on work machines to Windows 8.1 Update on my laptop. Ever since Windows NT 4.0 I’ve been setting up my computer environment the same way.
First of all, there are no icons on my desktop. I never want to minimize a window or move it around to double-click an icon. For the applications I use often I’ll copy the shortcut into a bin
directory that’s in the PATH
and give it a short, easy-to-type name. For example, the various versions of Visual Studio will be named “2008”, “2010”, “2013”, etc. Microsoft Word and Microsoft Excel get shortcuts named (of course) “word” and “excel”. Likewise with other tools I use (“audacity”, “finale”, “visio”), documents and folders that I open frequently (“hours”, “spec”, “source”), and shortcuts to remote desktop sessions (“ukpost”, “desk”, “server”). When I want to start one of these shortcuts I just press WinKey-R
to bring up the Run box, type the shortcut I need, and press Enter
. This lets me keep both hands on the keyboard and minimize the duration of context switches as I move from tool to tool or document to document.
I do still have desktop icons; I just hide them to keep the desktop clean. There are a few desktop shortcuts that I’ve kept around, but I dock the desktop toolbar to the taskbar and size it so that I can click on the chevrons and pop up a menu containing the desktop icons. Since Vista I’ve started pinning more things to the taskbar, but the Desktop toolbar still comes in handy on XP or POSReady 2009 so I’ve kept it in all my environments.
(Because of this OS setup, I was completely unaffected by the lack of a Start button in Windows 8. I already never used the Start menu, so I didn’t notice when it disappeared. There’s talk that it might come back in an upcoming version of Windows, but I doubt I’ll use it even then.)
Even within tools that I use often, I make the setups the same, and they’re generally very sparse. In Visual Studio, for example, I remove all of the toolbars since I know all the commands I use frequently by their keyboard shortcuts, or I assign shortcuts to the commands that don’t have them by default. For the few controls that are easier to click than manipulate through keys, or that give me a visual indicator of the state of the environment, I’ll place those directly on the menu bar. This frees up more space for code.
My debugging environment is exactly the same from computer to computer and from one IDE version to the next. Register window here, memory windows there, call stack over there… just like controls on a race car as I’m speeding through a debugging session.
Though Visual Studio makes it fairly easy to export and import settings, I’ve stripped down the setup so much and made the same changes so often that I can usually get a new installation exactly how I want it in a matter of minutes, so that I can get on to the task at hand with a minimum of hassle. This is usually just as fast as digging my thumb drive out of my backpack and loading the file.
The environment I describe here may not suit you at all. Maybe you use Linux or Mac environments; maybe you program in Java or Python; maybe you prefer a trackball and an IBM PS/2 keyboard. No matter what you prefer, if you find it difficult to get into a flow, or if you have to move among several different machines and be productive on all of them, try to find a setup that is comfortable for you and that you can quickly and easily create. You’ll find it easier to focus on the problems you need to solve as the distractions of your environment melt away.