Thursday, March 31, 2011

Say No

Continuing the “fear” theme with another personal anecdote: I have a water phobia, caused (I think) by almost drowning as a child. I can trigger a panic attack in waist-deep water, simply by putting my head under. For that matter, I have issues putting my face directly into a shower's flow. Not good for someone who grew up less than a mile from the ocean.

So why is there a sea kayak hanging in my garage?

The answer, as you might have guessed from the title, is that I said “no” to my phobia. I took a guided kayak tour once on vacation, and decided that I liked it. I then took a paddling class before buying my own boat. And part of this class involved a “wet exit”: intentionally flipping the boat upside down, undoing the spray skirt, getting out, and surfacing — while still holding onto both boat and paddle. I dreaded the very idea.

As it turned out, I unintentionally flipped a few days before the class (tip: don't grab onto branches overhanging a moving river). And realized that panic takes a backseat to training: before I had a chance to think about what happened, I had pulled the “oh shit strap” on the skirt and pushed out of the boat. However, that didn't make the intentional flip any easier. Or the rolling class that I took a few months later. Phobias don't go away just because you tell them to.

To an outside observer, phobias often appear trivial. OK, perhaps not a fear of drowning, but heights? Open spaces? Small bubbles in pancakes? To the person in the grip of a phobia, however, they're very real and very immediate.

Which brings me back to fear and programming. To an outside observer, the fears that motivate programmers seem very trivial. Will you die if you miss a deadline? No. Will the company go out of business? Probably not. Will you get fired? Probably not, unless you have a history of missing deadlines. Will you get yelled at? Maybe.

Against that, what is the penalty for shipping software with a bug? Depending on the place that software is used, someone might actually die. Or a financial transaction could go wrong, meaning the company loses money. And if you ship sloppy software, even if it doesn't have bugs, you guarantee that the company will lose money when maintaining that software.

The trick to saying “no” is to mentally rehearse the alternatives, so that they take precedence over the fear. Whether you're in an upside-down kayak, an airplane that has just lost its engine, or in your boss' office after missing a deadline, there are always alternatives.

Wednesday, March 30, 2011

Fear

Rufus, my cockatiel, is sitting quietly on top of his cage, preening. Suddenly he lets out three short screeches and bolts down the hallway, flying low and fast. I look out the window and see a hawk circling. I find him in the bathroom, in full alert: feathers slicked down, neck fully extended, head turning quickly, looking for danger. I take him on my hand and quietly say “it's OK, it's a red-tail, they don't eat birds.” He doesn't understand my words, of course, but the tone calms him, and he returns to his cage. Hawks will continue to frighten him, and with good reason: there's also a family of sharpshins in the neighborhood, and they do eat birds.

This is the ur-fear: being torn apart and eaten by another creature. Humans, residing at the top of the food chain, usually only feel this fear after seeing a horror movie. But we still have an amygdala, which looks for reasons to initiate a fear response. So we react to a whole range of stimuli: violent death, injury, losing our job, or just the possibility that our manager and coworkers will be upset at us.

A little fear is perhaps healthy; it's what keeps us from doing stupid things. But there's a darker side to fear: it's focused on the self. All considerations of other people or long-term viability are ignored in the immediate pursuit whatever it takes to resolve the fear. Or, in the words of the late Warren Zevon:

You're a whole different person when you're scared

Programmers don't often face choices of self-preservation. But every day, on all types of projects, they make fear responses: working extraordinaty hours, sacrificing maintainability, adding more people to a late project. In this light, I'm not sure that the “software craftsmanship” movement can be successful. It depends on programmers aspiring to a higher ideal, but it has to contend with a visceral reaction.

Monday, March 28, 2011

Disability

There aren't a lot of disabilities that affect programmers. We occupy a “life of the mind,” with few physical constraints. Early on in my career, I realized that my only real concerns would be major head trauma, repetitive stress injuries, and blindness. For the first, I figured that I wouldn't know that it had happened, and for the others I could take precautions — there are a lot of pairs of safety glasses in my basement.

Then, a couple of weeks ago, I returned home from an extended business trip with a detached retina (for those who aren't squeamish, see the Wikipedia article). Thirty six hours later, I was in surgery. Two weeks after that, another surgery. Currently, I have a gas bubble in my right eye that requires me to keep my head in one of two positions: face down or sideways. Even though I have one good eye, and a laptop that folds flat, my ability to use a computer is limited: a half-hour at a time before I start feeling dizzy. And daytime TV — even with on-demand Mythbusters — is not something I'd wish on anyone.

But recovery is just a matter of time. Six to eight weeks of not doing what I want, of sleeping on the couch to ensure that my head is in the proper position, of wearing a green band to tell paramedics that my eye will explode if they put me on a medivac helicopter. There's a high risk that I will develop a catact as a result of the surgery, and a possibility that the same thing will happen again.

What's interesting (to me, at least), is that my attitude about disability hasn't changed, even after realizing that precautions might not be enough. I mention this because I've had a few half-written postings about fear and motivation. And this experience has taught me something about about how little fear has to do with reality. I think that now I have the ideas needed to complete those posts.