Wednesday, July 15, 2009

Swearing to Cope with Pain

Man, it has been a while since I last posted. I wanted to write about all sorts of things. Like successfully installing R for OpenSolaris using packages. Maybe about the uncertain future for OpenSolaris, now that Oracle pwns that. Maybe about coffee (see my byline, I actually haven't written one word about my addiction to the bean). Maybe about a candidate for a side project I've been mulling over, involving human speech parsing. But I've been busy, both professionally and in private life.

However, I found a wonderful article on Scientific American that is just so timely, that I feel compelled to post. Right here, right now.

Been quite busy at work, having been drafted to fight fires on a project that I now understand to be, simply put, a real death march project.

If you're in IT, then you know what I mean...

Crazed release schedules, dictated to us according to the customer's whims. Lack of basic, understandable documentation. Severe lack of a coherent, well-thought architecture. Largely apocryphal comments sprinkled in the code, probably mostly out-of-date and inaccurate. No unit tests, no automated builds. A test team working on a Frankenstein system comprising multiple web services and multiple db's, all the while claiming that a test sprint can be done in 1 hours' time. Argh, and don't even get me started on the misinformed decision to use Seasar2, which itself suffers from extremely poorly written documentation, even in its home language of Japanese.

So I've been suffering from recurring headaches, lately. The cause? Me banging my head on my desk, asking futilely, "Why, o dear lord, why?"

What is this global variable doing here? *wham*
Why is this method duplicated in several objects, but in different, unrelated packages? *wham*
Why are there 2 classes in separate packages but of the same class name that at a functional level are almost, but not quite, completely different from each other? *wham!*
Who the #$%! wrote this code??? *wham!!*
What the #$%! was he thinking??? *wham!!!*
What blockhead decided against unit-testing and automated builds?! *wham!!!!*

When I am coding, I often talk to myself. A lot. So much that the people that sit near me at my traditionally laid out Japanese office mention it. They mention it quite often, actually. And I find that if I am in fire-fighting mode, trying to fix code written (nay, slapped together??) by others, then I find that I begin to swear out loud. A lot.

Hallucinatory soliloquy? Generalized anxiety disorder? Just a tad schizophrenic? Tourette's?

No, none of the above. Not according to the Scientific American article Why the #$%! Do We Swear. No, I think the increase in my swearing out loud is in direct proportion to the amount of stress and frustration I am feeling at that time, and this outward vocalization is really helping me to relieve the pain I am feeling. It's a coping mechanism.

A brief excerpt:


The study, published today in the journal NeuroReport, measured how long college students could keep their hands immersed in cold water. During the chilly exercise, they could repeat an expletive of their choice or chant a neutral word. When swearing, the 67 student volunteers reported less pain and on average endured about 40 seconds longer.

...

How swearing achieves its physical effects is unclear, but the researchers speculate that brain circuitry linked to emotion is involved. Earlier studies have shown that unlike normal language, which relies on the outer few millimeters in the left hemisphere of the brain, expletives hinge on evolutionarily ancient structures buried deep inside the right half.

One such structure is the amygdala, an almond-shaped group of neurons that can trigger a fight-or-flight response in which our heart rate climbs and we become less sensitive to pain. Indeed, the students' heart rates rose when they swore, a fact the researchers say suggests that the amygdala was activated.


So you see, I am just trying to soothe my #$%! pain. I'm just trying to work it on out. Hell yeah, I can feel that dull ache receding...