In this excellent blog-post, Karalus lists seven useful habits for programming, all of which I use. I like drawing life-lessons from craft and I will springboard from his list...
1. "Uncontrolled auto save." This is related to a lesson I got from Getting Things Done (GTD) - write everything down. Writing things down is usually not about journaling, it's about getting everything out of your short-term memory as quickly as possible. I instinctively hit "Ctl+S" to save the current document virtually every time I even pause while typing. This habit was ingrained by painful losses of hours of work resulting from crashes, whether software, hardware, power-loss or otherwise. But an interruption can be, to the mind, much like a glitch is to a programming editor. If I don't write down what I was thinking about, it is quite likely that I will forget it if I get interrupted and no one can control all interruptions.
2. "Take regular stops." This is related to a lesson I learned from piano practice. If I'm not loving what I'm doing at the moment, I will experience constant internal interruptions from my internal dialogue; this is also known as "day-dreaming", "distraction" or "boredom". This can happen during piano practice and results in wasted time at the keyboard because you are neither enjoying the music for its own sake nor making any progress in performance or technique. But scolding oneself is useless; it cannot change anything and is itself just another distraction. Instead, when I find myself engaging in unwanted day-dreaming, distracted or bored, I just get up and walk away. Walking away is a kind of "corrective action" taken against the attention for its failure to concentrate on the task at hand - "if you will not pay attention, then we will stop doing this activity altogether." This can't always be done (as, for example, during work meetings, and so on), but the real payoff comes after several repetitions. Training the attention in this way is amazingly effective.
3. "Kill all the sources of disturbance." This is challenging in a world filled with an unlimited number of ways to be distracted. Hard-switches are the key, here - phone off, computer off, out-of-office, out-of-house (hiding in a library or a coffee shop, if that's better for your concentration), and so on.
4. "Always try to start with an end in your mind." This is one of the life-lessons that has come at the highest cost to me, personally. You must know your goal before you set out to attain it. Otherwise, shipwreck is assured because you will be sailing aimlessly in a raging ocean filled with sea-monsters, blown about by the gods. This is also something more elemental than just making a plan or writing down "goals", it's about always knowing your final destination.
5. "Regular training." I could - and just might - write a whole blog post just on this topic. Training is tricky because it's really about hacking yourself. In order to get the most out of any kind of training, you have to first know your end (see last point) and you must know how your mind, emotions and body play tricks on you to frustrate your ends. You must know why they do this and how to get them playing on your side, pulling for you rather than against you. The power of habit, for example, cuts both directions, it can be a massive aid or a massive hindrance. Training yourself is about "hacking" your habits to work for you.
6. "Writing code from test cases." Applied to general life skills, this is about setting up measurables before setting about achieving a new goal. For example, if you plan to run X miles per day for the next three months, it's a good idea to figure out how you're going to measure this and then either buy the required equipment or otherwise or plan accordingly. You've set up the "test case" - the measurement - before implementing your plan.
7. "Avoid future programming." Applied to general life skills, this is about avoiding making elaborate, long-range plans and, instead, focusing on making dead-simple plans - plans too simple to fail - in order to accomplish short-range goals - goals which are unlikely to change or be interrupted by unexpected changes. This approach apparently creates the problem of being unable to accomplish long-range goals but this is not true. In fact, it's exactly the opposite. But in order for this to work, you must incorporate a "planning loop" as one of your recurrent short-range goals, so that you are periodically breaking down long-range goals into a series of short-range goals. The key is that this planning loop needs to be the central core of your schedule so that you are continuously chipping away at those long-range goals. If we were honest with ourselves, most of us have never really achieved any long-range goal that was not already mostly planned out for us (e.g. college). The key to breaking down those long-range goals into short-range goals and actually achieving them is to avoid building castles in the air, what programmers call "future programming".
No comments:
Post a Comment