Text editors and electric kettles

A few weeks ago I was asked to meet with a company that is selling a software product for doing hospital management. On first glance the product seemed nice, truckloads of features and modules in a fairly clean layout. But there was something wrong with it, something I couldn't quite put my finger on. A few weeks and this blog article later, I figured it out - the application is too close to the text editor side of the user interface spectrum.

The text editor is the most powerful computer application that exists. With it you can write a novel that starts a revolution, create a system to organize recipes, write code that can create a different text editor or a new operating system - the possibilities are truly limitless. On the other end of the user interface spectrum would be something like an electric kettle. You pour water in it, you press a button and it brings water to a boil before turning itself off. If you were really creative you might manage to cook soup in it, but you wouldn't do this because it would probably ruin all subsequent attempts to boil water. The electric kettle does one thing only, it requires very little training and it performs it's task to perfection.

User Interface Spectrum

I think all user interfaces land somewhere on the spectrum between text editors and kettles, and the goals of an application should dictate where on the that spectrum the application should land. Problems occur when an application lands on the wrong part of the spectrum.

I think this is the problem with the application I saw yesterday. Lets call it "boxware", because it had a lot of boxes. In fact boxware had boxes everywhere, and each box more or less represented a new feature, even if it was just a box. Let me explain. After clicking on the patient registration icon a screen pops up with a lot of little boxes, one for last name, first name, address, city, phone number, and so on. There is also a box with three tabs in it, patient history, family history, other history. Almost any kind of data you would want to capture has a box for it, and if you don't see it, then the required box is probably behind a tab or another icon.

Interfaces like this are common, and for good reason. This kind of user interface is the path of least resistance for software developers. Any new feature simply requires a new box, which is created by drawing a new box into the software development tool. The new box gets labeled "surgery management", which is usually enough for the decision maker to tick off "surgery module" from their required feature list. When this happens, the software developer wins and the decision maker is pleased at having found a system that matches their requirements. Unfortunately the users and in this case, the patients are the losers. Just because a bunch of labels on boxes happen to correspond to some important activities, there is absolutely no guarantee the boxes will be used for the intended purpose. I can count a dozen different repurposed boxes and containers on my desk alone. If only I knew what was in them!

I have seen many boxwares, and they often have a common origin: a single person uses MS Access (or Foxpro, or whatever) to computerize a process. Often the end user and the developer are one and the same. Adding features is easy (just add a box, or a database column or a tab) and before long the system is fully featured and easy for the user/developer to use.

If the system is useful, then other people want to use the system. This is a nice problem that gets solved with...training! But soon, the developer notices that users keep using the system in a way that was totally unexpected. Time for another training session...

But there is another approach that doesn't rely on training. They are called constraints.

Let's think about the constraints of kettles and text editors. An electric kettle is constrained to heat liquids and is either off or on - not much training required. A text editor requires dozens of keys and key combinations just to do it's primary function of editing text. It doesn't constrain the user at all, and if you have ever taught an absolute novice how to use Microsoft Word (think grandma, or a nurse in a rural health clinic in Africa) then you know that training is not easy. Lack of constraints are even more apparent when people use text editors to model the more complex human processes of organization or collaboration.

The amount of training required is usually inversely proportional to the number of constraints in the system.

Training Spectrum

Constraints do two things, they filter garbage and they guide processes.

For example, an application may allow you to enter a weight value for a patient. A simple box will do just fine. But a user could type in No ("Why would I want to wait?"). Or they could type in 2 (is that pounds or kilograms?). Or they could simply not click on the box at all (whether a user knows how to use mice or keyboards is beyond the scope of this article).

Constraints can put ranges on what is allowed in the box - anything outside of that range will get rejected. So we could say that all patients must weigh between 2 and 300 (and make it explicit that we are talking about kilograms). But constraints can be even more clever. If we know what the patient's age is, we can narrow that band or even better, if we know what they weighed a month ago, then we can assume that their weight is plus or minus 10% of their last weight. If the user entered something that is outside of that range they will immediately be warned or perhaps even stopped. Maybe they typed in an extra 2, or they were entering data for the wrong patient, or they were reading pounds instead of kgs. Range constraints can catch that, they filter garbage.

Besides data validation (garbage filtration), constraints can also guide processes. Process guidance is a powerful way to move your application towards the appliance end of the spectrum. Instead of having a bunch of boxes that can be clicked on in any random order, an application can hold the hand (or mouse) of a user and guide them step by step through the process. One question gets asked at a time, in a specific order that matches how the user thinks or acts. This is the wizard approach that Microsoft has successfully used to help people navigate complex processes like setting up networks. And like data validation constraints, with a little bit of logic, the step by step wizard approach can add extra cleverness as well. For example, if you have a question that asks if the patient is pregnant, you could first make sure that their sex and age are asked. If the patient is a 60 year old man, you can then automatically skip the pregnancy question - this makes filling in the form easier and faster. But wait! We can do even better! Since sex is a critical piece of data to know, you can make sure that the user can enter no other data until the patient's sex is known.

If you are creating an application that will be used by a lot of different people to do very specific things, then range contraints and process constraints are important tools to make users happy. They empower them without needing training and usually speed processes up. If we are talking about first time computer users capturing life or death information in Africa, then constraints are critical.

So next time you are evaluating software pay attention to the user interface - not just how pretty it is - but what it actually does. How does it guide the user? How does it ensure quality data? Who will it make happy? Is it a text editor or an electric kettle?

Zomba Plateau Map

Claudia and I will be spending Christmas on the Zomba Plateau, at the high commission cottage. We really like it there, but have always struggled finding a decent map for hiking around the plateau. Here is one - it's not the greatest, but it will help. Enjoy!

Zomba <br/>Mountain Hiking Map (click for a full large version)

Ant hill phone booth

A couple of months ago there was a great article in the local paper that Soyapi saved for me. It was about an anthill in Chiduli - which is a village somewhere in Malawi. Chiduli lies in a flat wide valley, which unfortunately places it out of reach for cell phone signals. Out of reach except for one particular place - an anthill!

calling-from-anthill.jpg

I wish that I would've saved the full article because it was full of interesting bits of information, but I think you can tell how the story goes from here. Basically, if you needed to make a call, you just go up on the anthill. But what do you do when you are expecting a call?

cell-phones-in-tree.jpg

Apparently you just find a branch that fits your phone and leave it there. I love that someone put an entire purse up there - I guess that makes it easier to hang.

Cellphone coverage in Malawi is actually quite good even in rural areas. There is so much potential waiting to happen. The other day as I was going to work, I heard a Nokia startup tone coming from the garage. Sure enough, George our gardener has his own phone. I got his number, and asked him if he could show Alice our somewhat grandmotherly housekeeper how to use the new phone we just purchased for the house. He laughed and informed me that Alice already has her own phone - no training sessions required!

I am really excited to see the potential of mobile phones take hold in Malawi. Surrounding countries are already beginning to move towards a cashless society thanks to cellphone banking...let the leapfrogging begin!

Windmill William's TED presentation on online

William's presentation from the TED conference has just been published:

William Kamkwamba's TED talk

William has also started working with my team at Baobab this week. Everyone is excited to see where William's future leads him.

Witchcraft planes

Imagine a witch. A good old fashioned Halloween night witch. Go on - I am serious. Okay, you probably thought of an old woman in black and a broom to fly around on - right? Well, I find it fascinating that Malawi has its own brand of witch - and that she is totally Malawian but totally pure witch at the same time.

The stereotypical witch in Malawi is also a woman. I am not sure what color clothes she wears or how old she is - can one of my Malawian readers chime in? She also flies around, not on a broom, but rather on a witchcraft plane which is really just a nsima basket - a butt-sized basket that is used to sift maize flour. It is the basket that I find most interesting. In my witch tradition as well as Malawi's, the physical item that characterizes her as a witch is also an item of household work. Women's work to be specific and sexist. It is almost like the culture needs to add mystique or fear to the female. I am not sure exactly what to make of it, but there must be some fascinating stuff in the anthropological comparisons of witches and witching around the world. (Evil eye is another good one)

There are definitely a few witches in the states - one in particular who used to come for Cheesecake at Deuz Gros Nez (ironic, oui?) in Reno. But American witches, at least in my experience seem to keep to themselves. Not so in Malawi. The newspapers regularly report of withcraft planes, especially withcraft plane crashes. Thanks to my colleague Oliver I can explain how a witchcraft plane works:

Witches have meetings that they go to. They are almost always in other countries, often Mozambique, but sometimes in London too. To get there, the witch takes her nsima basket to the local graveyard at night, where she takes off and flies to her destination. The problem is people build firewalls, sometimes just by accident. (Oliver - please remind me what they are made of again.) If a witch flies over a firewall, she crashes instantly - and the next morning she will be found naked and asleep at the crash site.

(my mostly ignorant guess is that this is probably how villagers exlain a widow who has had everything stolen from her and been beaten by her inlaws - a very very common and largely accepted practice in Malawi)

Just in case you think I am making all of this up, here is an article from last month in the Daily Times of Malawi (quoted in full since it will probably disappear soon).

http://www.dailytimes.bppmw.com/article.asp?ArticleID=5150



Three convicted for practising witchcraft
BY FRANCIS TAYANJAH-PHIRI
09:09:46 - 15 June 2007

A COURT in Karonga on Wednesday convicted three elderly people for teaching two children, aged eleven and ten, the art of witchcraft.

Uliwa First Grade Magistrate Chikanje Harawa sitting in Chilumba, Karonga, ordered the three, Thaizan Mhango (75), Gerald Kumwenda (79), and Gatry Mkandawire (70), to pay K30, 000 (blogger note: about $200 USD) each, or in default serve five months’ imprisonment with hard labour.

According to Karonga police spokesperson Enock Livason, the three had not paid the fine by close of business on the day of their conviction and were shipped off to prison.

“Harawa convicted the three on the count of practicing witchcraft, contrary to Section 6 of the Witchcraft Act. He then ordered the three to pay K30,000 each or serve 5 months in jail. They all failed to pay the fine and are in prison,” said Livason.

Mhango is from Muzang’unya Village, Chief Wasambo in Karonga, while Kumwenda and Mkandawire are from Mugowera Village, Chief Wasambo, in the same district.

The court was told that the two children (names withheld) all grandchildren of Mhango, complained to their mother that the three were forcing them to source human fresh to eat at night.

“The children alleged in their testimony that the three used to take them each night from the house they were sleeping in to practice witchcraft. They testified that they used to get out through the corner of the house and used to fly with the elders in witchcraft plane but sometimes they used what they termed a magic Mercedez Benz,” Livason said.

The witchcraft trainers are later said to have started forcing the children to kill their relatives and refund the human flesh they had been eating.

Police Prosecutor, Constable Pleasant Sichali submitted in court that the evidence of seven witnesses he had paraded had clearly proved that the three were indeed teaching the children witchcraft.

He also submitted that though the three had pleaded not guilty, the evidence tendered was beyond reasonable doubt and had proved they were guilty of the offence.

Change scrollbar sizes in firefox

I needed to change the size of all of the scrollbars in firefox to make touchscreen scrolling work nicely. I wanted nice big, fat, finger-sized scrollbars. I eventually figured it out, but the directions were sparse, so i thought I would paste my approach here.

Find the firefox profile. Mine was here:

/home/crazy/.mozilla/firefox/9ipm15p4.touchscreen

Go into the chrome directory and create userContent.css:


scrollbar[orient="vertical"] scrollbarbutton,
scrollbar[orient="vertical"] slider,
scrollbar[orient="horizontal"] scrollbarbutton,
scrollbar[orient="horizontal"] slider{
height: 40px !important;
width: 40px !important;
}


Phat scrollbars!

Manage cron from rails

I needed to setup some caching and database updating that will run once a day on our ruby on rails application.

I found this link, which gave three different approaches - all of which I didn't like.

A quick and dirty yet tried and true method is to use cron to call wget on a controller script/runner (thanks David) that does everything we need. All I needed to do was write the crontab entries - but that means later deployments will require someone to do that. My approach was to use environment.rb to programmatically edit the crontab. I just added the following to the end of environment.rb:

current_cron = `crontab -l`
rails_cron_jobs =< # m h dom mon dow command
0 18 * * mon-fri /var/www/bart/script/runner -e production 'Report.cache'
0 22 * * mon-fri /var/www/bart/script/runner -e production 'Patient.update_defaulters'
EOF
unless current_cron.match(/Report\.cache/)
puts "Adding #{rails_cron_jobs} to current cron: #{current_cron}"
puts `echo "#{current_cron}\n#{rails_cron_jobs}" | crontab -`
end


It is a total hack, but I like it. We read in the current crontab - see if we have already edited it - if not we edit it. Plain and simple stuff. Now, as we say in Malawi - somebody school me as to why this is evil bad and wrong.