Friday, July 11, 2008

Wisdom of the locals

me: I want to drive around and see the temples
riju: In order to drive in India you need three things: good horn, good breaks, good luck
____

me: I have just received my water bill. It is written entirely in Malayalam. How do I pay it?
venkatesh: It is a complicated procedure
____

kitty: I wanted to be a psychologist, but mom said no
me: You should've said lawyer
kitty: I did, but mom said no
me: Or something else rich and glamorous, like hotel management
kitty: Mom said no
me: What did she agree to?
kitty: Accounting
____

me: The bad pop music of the 80s and early 90s made waves here, but it was not nearly the traumatic event that it was in America. Yesterday I asked the restaurant to stop playing the Michael Jackson and C&C Music Factory mixtape whenever I came for dinner. They couldn't see how much it was tickling my PTSD. Bad pop music was such a powerful cultural phenomena in America, it wiped off entire sentences from the English language.
colleague: Interesting
me: By the way, the network is down
colleague: If there was a problem I'll solve it

Sunday, July 6, 2008

Doctor, it hurts when I do this

March 1, 2004 was a sunny winter day in Providence. I was hard at work at home, crouched over my laptop. Earlier, my advisor and I had made a decision. I would abandon my current project and develop an unrelated idea, one that I had just sketched out on his office white board. The idea was good. It would become my master's thesis and an award-winning paper in a respected academic journal. It was also small and self-contained, which made the switch possible at all, this late in the program, a mere three months before the deadline for submission. It was a daring, almost reckless switch. It set me up in a race against the train to the crossing. I agreed with the new plan because, frankly, I love trainrunning.

The week prior to the sunny winter day in question, my wrists had been bothering me more than usual, though I took only passing notice of it. Mostly, I spent my time two miles deep into focus, coding, oblivious to the real world. But that afternoon, the pain finally grew beyond my ability to ignore it. I stood up, tried to make step but I was overwhelmed by the pain -- it sapped my balance and I kneeled on the floor, holding my injured arm with my merely-bad one.

That was the last time I programmed with my own hands. In the intervening four years, I have designed three large programs and directed the teams set up to construct them, but any lines of code I wrote I wrote as the copilot of a coding pair. My hands refuse any contact with a keyboard with the virulence of an immune system response. If I try to type, the pain creeps up and stops me before I have accomplished much. So long as I keep away from keyboards, I am mostly fine, and my condition has improved with time. I enjoy the occasional day without symptoms, and I rarely need to fetch my electrotherapy machine anymore. In comparison, there was a time when I spent entire days under ice, begging for forgiveness. I'm glad that's over.

I saw a doctor within a week of my injury. He gave me injections of cortisone and sent me home without two crucial pieces of advice (1. Don't type through the pain. 2. So long as the medicine is active, your tendons are as weak as al dente pasta.) The doctor I saw before him, in 2003, gave me a brace and sent me back to work. In 2002, I tried to consult with the company's ergonomist, but the waiting list turned out to be longer than my internship. In fact, the onset of my tendinitis can be traced back as early as January 2001, when I complained to my family doctor about occasional wrist pain. He reassured me that I was not showing the symptoms of carpal tunnel syndrome, and wished me luck for my new life in the United States.

My story is shockingly common. In the period between 2002 and 2006, each year one of my colleagues would develop a serious disability due to keyboard usage. Behind them, there was a long tail of programmers with various amount of wrist pain. Recently, I had the chance to stand on stage and ask a room of programmers for a show of hands, who had wrist pain? Nearly everyone did. This is not okay. It makes computer science by far the most dangerous department to work for. Physicists in rapid explosion labs do not injure themselves nearly as often as we do. Biologists in level 5 labs working with revived strains of dangerous viruses do not injure themselves as often as we do. They are careful. Why can't we?

Something about RSI makes it fall through the cracks of the Western system of medicine. The efforts necessary to prevent RSI do not seem to fit in the 15 minute window that compose an appointment with a generalist doctor. To compensate, sometime in 2005 my colleagues Jenine, Liz and myself coalesced into an ad hoc RSI prevention team. Together, we taught the physiology of the wrist and the rules of ergonomy as a compulsory lecture to the incoming students. Throughout the year, we continued the teaching, one-on-one. We invited ergonomy experts, made ice packs available, and put together a lending library of ergonomic keyboards. It made a difference, and I have hope that the habits the community learned during that time will persist, since we also taught the students to teach each other.

I have gathered these lessons into a single article. Then I translated it so I had a French and English version.
If your wrists hurt and you want to prevent them from creeping further after you, read ahead. If your wrists are fine, read as well, so you can help the programmer in your life whose wrists are probably hurting in silence.

Playing for the crowd


Yesterday I met Vincent, the gym teacher of a local high school. The school is built as two floors of mezzanines surrounding a central badminton court. We entered the school grounds during recess. Here, like in any schools, whenever a stranger intrudes in the daily routine, it is an event. There I was, a stranger, strange and a foreigner no less. Within seconds, I had two floors worth of high schoolers around me, their eyes following my steps. I have never felt such power over a crowd. At that moment and I could have yelled «cricket sucks!» and generated a riot. I choose instead to wave enthusiastically, and the whole crowd waved back ecstatically. Trust high schoolers amplify emotions; you can't beat that kind of energy.

Vincent and I set up a badminton game on the outside court, and I proceeded to attempt to beat the entire school. This was my first badminton game since my injury forced me to stop playing. My goodness, this sport is as much fun as ever. But more importantly, this match means that I am healing, bit by bit, year by year. And perhaps one day day I will be able to play at coding again.

Sunday, June 29, 2008

Look to the right

This, is a tuk-tuk.

It is a three wheeled contraption that fits three persons conformably (counting the driver), four if they squeeze, and 10 if they are Indian. Tuk-tuks are made of single layers of sheet metal, yellow fabric, and Krishna stickers. Also known as autorickshaws, they are the modern art of transportation: minimal and effective. In comparison, Western cars look like a government payout to the steel industry. They are all so big on the outside and yet so small on the inside. In that sense, mainstream cars are reverse-TARDISes. I prefer the simple three-layered construction of the rickshaws: humans on seats on wheels (The frame is only there to hold the stickers.) There is so little space dedicated to non-human-body elements, they depend on the unfortunate miracle of the two-stroke engine to make them go.

Which means, of course, that they pollute like the farting of a sacred cow confined to a small bedroom. Bangalore is a parade of out-of-tune 2-strokers running off of salvaged lubricant. There is a real business opportunity in opening a shop that would pacify the exhaust of tuk-tuks for free, then sell the resulting carbon offsets on the market.

Until someone figures out how to build a small electric engine out of the recycled parts of a 2-strokes engine, India is stuck with this ugly, evil, insidious device hatched by misbegotten Communists.

Rather, the future rests with hip, cool, great ideas, such as the Topia HUVO.


Wish us luck.

Tuesday, June 24, 2008

Monsoon failure

It hasn't rained for more than a week. The rain in the two weeks before that was tentative. If you roll back yet another week, we were celebrating the arrival of the monsoon, in the newspapers and in the weather forecast. Well, it's not here. Where is it?

Before I left, and while I was traveling in the North, the advice on everyone's lips was to brace myself for the monsoon. So I came with a large umbrella, a trenchcoat, and dependable boots. I was prepared to open my mind and absorb the true structure of Kerala's culture, as it expressed itself under the torrential waters. I looked for a copy of Chasing the Monsoon by Frater, and when I found one in the library across town, whose policy is to not lend to foreigners, I imagined myself walking daily to their reading room where I would read about the meteorological phenomena that had drenched me on the way. But I remain dry. The only water on my shoulders is my perspiration.

Because without the monsoon, the humidity hangs in the air. The mercury may be still stuck to 31°C -- you truly do not need a thermometer in Trivandrum -- but the humidity-weighted temperature has taken off. The mathematicians say we feel the equivalent of 40°C in this 85% water/air mix. When I walk into the yuppie coffee shop, which is one rare building with full-on AC, my glasses fog like it's winter in Montréal. I stopped ordering sundaes at the ice cream parlor. I ask for family buckets now, chocolate flavored, with a spoon.

So, three weeks after opening the subject, the newspaper are talking about the monsoon again. If the rain doesn't come now, the crops will fail. People are getting worried.

Monday, June 23, 2008

This type system is a joke

In the rigid composition style of academic papers, there are little tiny cracks where one can insert bits of humor and editorial opinion, as exemplified by the following sentence from a paper on Java's type system.

Unlike the GJ compiler, which rejects an expression containing stupid casts as ill-typed, FGJ indicate the special nature of stupid casts by including the hypothesis "stupid warning" into typing rules for stupid casts. See [10] for detailed discussions on the rules for typecasts.

-- Atsushi Agarashi, Benjamin C. Pierce, Philip Wadler, in "A Recipe for Raw Types" (which, as it happens, also defines "cooked" types.)

Tuesday, June 17, 2008

Profits are bad?

Is there a legal or economic basis for saying that companies must be unethical to profit?

Economically speaking, the contrary is true. The belief that profits are unethical created 50 years of economic misery in India. Before the reform of 1991, the draconian system of regulation meant you effectively needed license to profit, which the government gave but rarely.

The profit-is-ripoff interpretation -- which is still widespread in India -- comes from thinking of the market as a zero-sum game, which it is not. The power of the free market is contained in the moment where the seller and the buyer say to each other "Thank you - Thank you." Both gain from the trade. More importantly, the advantage to the buyer exists regardless of the profit margin of the seller.

Back in Montréal, there was a restaurant around the corner from work that used to serve me launch for 8$. I ate there every day because no other 8$ expense brought me as much joy. Perhaps if they had refused to make a profit lunch would be 6$. It would have been 4$ if the restaurant that refused to pay its employees -- to give them their part of the profit. It would be 2$ if the farmers were farming for fun. And so on. But that's neither here nor there. The transaction was advantageous to me at its stated price, otherwise I would not have entered into it.

Even though the restaurant was clearly profitable, I don't think anyone would call it a rip off (the food was excellent). To define ripoff, you have to look elsewhere.

There are companies that maximize their profit by amplifying market failures. Stadiums refuse outside food so visitor are locked-in to the concessions. Music producers organized an oligopoly so they could go price-fixing. Users of DRM aim to undermine libraries and secondhand bookstores. By doing this, they deny society of the advantages of a free market. It is unethical, and often illegal. The market distortions observed in these cases are the real ripoff.

India's confusion between profits and market failures had grave consequences. Interestingly, the United States has the same confusion, but backward. By celebrating profit as a force of good, and refusing to regulate, they are giving free rein to market failures. It caused Enron, the subprime collapse, of the sorry state of its cell phone market when compared to Europe or Japan.

It's illegal for a corporation to behave in a socially responsible way -- unless that socially responsible behavior happens to be identical to the behavior that maximizes profit?

It is certainly legal for a company to declare in their charter that their objective is not profit maximization, so long as the stockholders know what they are getting into. In practice this hardly matters. Most companies' charter promises to maximize profit, and so they are required act accordingly. Corporate Social Responsibility policies are common because they coincide with profits. Badly behaved companies lose their market share once their behavior is uncovered to the public. In the imaginary ideal market, with perfect information, the backlash is immediate. (Thus one strategy is to regulate towards more information.)

I believe that on the whole humans are a constructive force, and would rather not oppress each other when given the chance. I would rather pay more for coffee than have it processed by children. The arrival of the Fair Trade label, despite all its shortcomings, gave me a way to express that intent. Unfortunately, the finance world has no such mechanism. I own stocks through my investments in mutual funds. I may be unhappy with their profit maximization objective, but I am voiceless.

So, yes, the original criticism of corporations stands. While some company are founded by dangerous individuals, and do not need external help to misbehave, the legal structure of the stock market divides us, and will at time oblige respectable people to behave against their ethics.

Thursday, June 12, 2008

Under the shadow of my umbrella

I had decided to spend my first Saturday in Trivandrum walking around the city. It was a hot day, but every day had been hot, and every day to come was going to be. I always refused to let Montréal's freezing winter storms to lock me inside. If coldness is a state of mind, as Montréal taught me, surely hotness was too. Besides, it was only 33° under the tropical sun, the sea's humidity, and the rickshaws' cloud of pollution. How bad could it be?

Trivandrum didn't agree with my plan and struck me down with a heatstroke. During this moment of weakness an opportunistic virus took over and sent me to bed for four days, feverish. I woke up to find myself afflicted by a stomach bug that let me feed on nothing but rice and curd. While that was going on, a lymph node that continued the battle against the remnants of the virus accidentally pinched a nerve in my neck, which paralyzed my right arm with pain.

Overcoming these afflictions occupied me for week #2, #3 and #4 of my stay in South India.

It's amazing what you can achieve with a smile and a merry disposition. For during these three weeks I had none, and so there was no occurrences any of the wonders that had been the hallmark of my previous month in India. There was no chance encounter with the locals, no magnificent food discovery, no fascination with tiny details, and so on.

There was, however,
  • an apartment with no fridge, no stove, no water filter, no curtains
  • which did have ants, mosquito, cockroaches, and geckos
  • which was surrounded by a city with no coffee, no beer, no wine, and nothing but melted chocolate
  • which hosted a library whose administration couldn't choose between refusing me membership or refusing me access outright, because I was a foreigner with a laptop
For the most part, I forgot the content of this list of annoyances now that the illnesses are gone. Either I found a solution or came to see the situation in a different light. Sometime it was a simple matter, such as realizing that geckos are just great. They really are.

This week (week #5) is going to be spent reading about Trigger Point Therapy in an attempt to make the remainder of the right arm pain go away. I will also get some work done, and go rest on the beach, under the sun. Wish me luck.