How you gonna holler without facebook?

On the 92 bus in Washington DC:



Getting on the bus, a young man is hitting on a woman:
Man: "Well how can I get at you, girl?"
Woman: "I dunno, hit me up on MySpace or Facebook or my email."
Man: "Girl, do I look like I'm made of money? How you think I'm gonna get on the internet? Where do YOU got internet?"
Woman: "I got internet at my job! But for you - shit, I dunno, go to the library or something."
Conversation continues for some minutes, then the man gets off the bus.

Older, homeless man who had been sitting near them the whole time, turns to the girl and asks incredulously: "How that young [man] gonna holler at you when he ain't got no internet?!"


Relationships are a huge driver of technology adoption. Don't underestimate them.

From Overheard in DC on the DCIST

Malaria and the US

Malaria is no fun. I caught it and it felt like my bones were melting through my skin. But when you take the right medicine it goes away very fast. Unfortunately many, many children don't have access to the medicine (or the test) and die.



This image shows malaria incidence in the US in 1870. With 100 years of democracy, and during a time when factories were being built on a scale never before imagined, the US was as endemic or more endemic to malaria than many of the worst places in Africa today. The maps shows that in many places (including Washington DC) more than 10% of the deaths were caused by malaria. The average lifespan was about 40.

Many people wonder what is wrong with Africa. Why is it so corrupt? Why is there so much disease? Why is it developing so slowly? Charts like this remind me that Africa is developing much faster than the West ever did (although perhaps not as fast as the East).

(I just heard today about a malaria vaccine today on trial in Malawi that sounds pretty effective. Let's hear it for technology and progress!!!)

Filipinos Facebook and Farmville


I've never played Farmville. Despite being an unabashed technophile, I haven't really played computer games for a long time. I remember a pre-teen family vacation to Yosemite where the undeniable highlight was neither waterfalls nor bears, but a visit to Sierra Online, a little office in the middle of nowhere from which sprang such amazing things as Space Quest, King's Quest, and (ahem) Leisure Suit Larry. I thought that the magic of computer games had captured my heart, but in retrospect it was simply the magic of computers. Years later I turned down a job building a snowboarding simulator for the x-box so that I could work with a bunch of Linux geeks on software for the British government. My 12 year old self still despises me.

But games are big, and I feel like I am missing out on something by not playing them. World of Warcraft, Counterstrike, Civilization - am I missing something? It wasn't until a recent trip to the Philippines that I realized just how huge Farmville is. I have friends on Facebook who play it, but I blocked all updates from it long ago, so it is out of sight and out of mind. Until I went to the Philippines. There I found Farmville a lot harder to block, because it kept invading real life.

Everywhere I went people were playing Farmville. The look on their faces implied that they were using the hotel reservation system, or catching up on email at the coffee shop, or writing a paper on impact assessment. But the moo of a cow or the snort of a pig gave them away. A subtle stroll behind their screen confirmed it.

I was doing an informal assessment of computer experience in health care workers at the rural health clinics where our project was going to be piloted. The answers were pretty consistent. "We don't have any experience with computers." Followed by contemplation, perhaps a giggle, and then, "except for playing games".

We continue to underestimate how rapidly people adopt technology. Remember when you first joined facebook? Back then did you ever imagine that your mom might friend you? Did you ever imagine it would take just a few months? A few years ago I showed my Malawian housekeeper how google worked. Now she's on facebook.

This isn't the first time we've underestimated ourselves. Remember cellphones? People who can't read and earn less than $1 a day tend to have phones in Malawi, especially if they live in the urban areas. Nobody expected Africa to become connected so quickly.

We need to stop underestimating people. Don't expect Africans to be content with boring old SMS and voice for long. Smartphones, droids and even iphones are much higher up Maslow's hierarchy of needs than we realize, especially if nobody around owns a computers, your schools suck, and the government controls the radio and newspaper. Africans have leapfrogged over landlines. They are now leaping over laptops.

(Desperate housewives, lonely on their isolated farms, also surprised the world by being the early adopters of the strange world of cranks and dials and operators that made up the original telephones of the 19th century)



Back to my Filipino friends who "don't know how to use computers", but do know how to play computer games (it was Farmville that they were playing). While Google is organizing the world's information, Facebook is organizing the world's relationships. It sounds like a silly mission statement at first. Yet consider the universal pursuit of friendship, love and community. If they can pull it off, then we will have taken another step forward in the evolution of our species. If Facebook can enable that which virtually defines us as humans then I think we are going to be seeing a lot more Farmville being played.

Some strange headlines are beginning to form themselves:

Web Farm Dot Oh - the Next Internet Bubble
Facebocracy: Filipinos Ratify World's First Facebook Based Constitution

One last thing about Facebook and the Philippines. The Philippines is the text messaging capital of the world. They send 1.6 billion SMSs every day and their population is just 80 million. No one sends more SMSs than the Filipinos. As in Africa, smartphones are being rapidly adopted. But people don't have a lot of money to spend on unlimited data plans like the ones forced upon us here in the US. So you might expect a blackberry like option - where you can get unlimited email access on your smartphone. Isn't that the logical upgrade for the SMS crazed Filipinos? SMS migrates to email? Nope, that wasn't an option that the cellphone providers were offering. But for 20 pesos a day (about 50 cents) you can get unlimited access to Facebook.

Ubuntu Web Appliance

I am working on a project here in the Philippines that uses computers to help rural health care workers capture and use data more effectively. I am really trying to figure out how to make the hardware configuration as easy and off the shelf as possible so we can quickly scale this up once we have the kinks worked out. Unfortunately off the shelf appears to mean a Windows XP netbook with Limewire and who knows what else pre-installed. For various reasons some of these virus magnets can't be wiped because they are owned by someone else.

I have written a script that creates an efficient, appliance-like, ubuntu client. It is customized to automatically connect to the right wireless access point, and it is bundled with a firefox profile that starts on boot and which has a full screen plugin pre-installed, the home page pre-configured, and a nice little plugin called 'try again' that automatically refreshes the page if the connection is lost. Of course, this lovely little piece of work is useless if I can't install Ubuntu.

That is until today, when I figured out how to use remastersys to create a custom bootable Ubuntu. Remastersys creates a bootable iso of your currently installed Ubuntu that you can put on a flash disk (with USB Startup Disk Creator) and boot from and use without making any changes to the hard drive. It's like the Ubuntu install disk but with all of my carefully crafted magic. So now I can convert the useless windows bricks into kick ass appliances without ruffling any feathers just by plugging in a USB stick. Removing the disk and rebooting will return them to their original spambot state. And if they ever decide that the Ubuntu setup is superior (and they will of course) the bootable disk has an option to install onto the hard drive. My USB bootable ubuntu appliance is here in case anybody wants it (but you might as well build your own). Oh, one last trick: use VirtualBox to create your ideal Ubuntu. It makes it really easy. VirtualBox snapshots are helpful in crafting the perfect, compact and clean image (but ideally you should use scripts so that you can repeat anything you do later).

A nice day's work if I do say so myself!

mysql replication

I am currently working on a script to automate the process of setting up mysql database replication. I followed various tutorials but I always got stuck here:

mysql> SHOW MASTER STATUS;
Empty set (0.00 sec)

Endless googling was no help (which is why I am blogging this). Eventually I realized that /etc/mysql/my.cnf was context sensitive, meaning that I couldn't just append the replication configuration to the end of the file. This meant I needed to insert the configuration into the appropriate place in the file. This meant inserting multiple lines of text into the middle of the file. Eventually I came up with the following:

(Update) I used to do this with ruby, but I switched to perl since ruby isn't installed by default:

MYSQL_CONF_ADDITIONS="
# ----------------------------------------
# Allow connections from all addresses
bind-address = 0.0.0.0
# ------------------------------
"

perl -i -p -e "print '${MYSQL_CONF_ADDITIONS}',$_='' if \$_ =~ /bind-address.*127.0.0.1/)" /etc/mysql/my.cnf

Hopefully this will be useful to somebody, someday, somewhere.

Healthcare protocols save lives


I highly recommend this excellent article in the NYTimes about how we can use data to create healthcare protocols that dramatically improve outcomes and reduce overall costs. (This is what we were trying to do in Malawi and what I am trying to introduce in the Philippines)

Here are the key points that I want to remember:

To enter mainstream use, any such treatment typically needs to clear a high bar. It will be subject to randomized trials, statistical-significance tests, the peer-review process of academic journals and the scrutiny of government regulators. Yet once a treatment enters the mainstream — once we know whether it works in certain situations — science is largely left behind. The next questions — when to use it and on which patients — become matters of judgment, not measurement. The decision is, once again, left to a doctor’s informed intuition.
...
“Guys, it’s more important that you do it the same way than what you think is the right way.”
...
Whenever possible, the guidelines are also embedded in the hospital’s computer system. Doctors and nurses are presented with a default choice — how much of a given drug to prescribe, for example — and have the option of overriding it. Most important, the electronic records system allows both committees and doctors to track patient outcomes.
...
He could not simply tell Intermountain’s doctors what to do, no matter how much research he brought to bear. Doctors have a degree of professional autonomy that is probably unmatched outside academia. And that is how we like it. We think of our doctors as wise men and women who can combine knowledge and instinct to land on just the right treatment.
...
Perhaps the clearest example is the Pronovost checklist. As many as 28,000 people in this country die each year from infections that come from intravenous lines. Several years ago, Peter Pronovost, a Johns Hopkins physician, developed a simple list of five steps that intensive-care doctors should take before inserting an IV line, in order to prevent the introduction of bacteria. The checklist reduced the infection rate to essentially zero at 108 hospitals in Michigan where it was adopted. Pronovost published the results in The New England Journal of Medicine
...
But in our current health care system, there is no virtuous cycle of innovation, success and expansion. When Intermountain standardized lung care for premature babies, it not only cut the number who went on a ventilator by more than 75 percent; it also reduced costs by hundreds of thousands of dollars a year. Perversely, Intermountain’s revenues were reduced by even more. Altogether, Intermountain lost $329,000. Thanks to the fee-for-service system, the hospital had been making money off substandard care. And by improving care — by reducing the number of babies on ventilators — it lost money. As James tartly said, “We got screwed pretty badly on that.”
...
As long as doctors and hospitals are paid for each extra test and treatment, they will err on the side of more care and not always better care. No doctor or no single hospital can change that. It requires action by the government.
...
Yet somehow, both doctors and patients have come to imagine that a physician can accomplish far more than any human being reasonably can. As a result, modern medicine is accomplishing far less than it reasonably should.

Childcare Amazon.com style




Noise blocking earmuffs...check
Music...check
Children locked away in kiddie jail...check

ssh all the time


Using autossh and reverse ssh tunneling to bust out of NAT'd networks and firewalls automatically.

In another lifetime I blogged about how to reverse an ssh connection. This was by far my most popular post ever. It earned enough in google ad money to cover my hosting costs. Those were the days. Those days are gone, and now lots of people have blogged about using reverse ssh tunnels. It's time to take it to the next level and make reverse ssh tunnels easy and ubiquitous.

I want all of my machines to be setup with an ssh tunnel whenever one of them finds an internet connection. That way I can always access all of my machines no matter where I, or they are the world. I want this even if they are in some high security firewalled corporate prison or if they are sharing the same IP address as the other million NAT'd users tethering internet through their phones. This should happen automatically and without fuss.

To do this you need to have ssh access to a machine that can be seen from the internet, and the ssh daemon machine needs to have the GatewayPorts option set to yes (this is not the default). See my old post for more information.

Here's the recipe.

(Update! I have made this much easier by scripting the whole process, see the bottom of the post!)

Create a file:

/etc/network/if-up.d/reverse_ssh_tunnel

(you are using Ubuntu, right?)

Put this in it:

#!/bin/sh
# ------------------------------
# autossh reverse tunnel on boot
# ------------------------------
# See autossh and google for reverse ssh tunnels to see how this works

# When this script runs it will allow you to ssh into this machine even if it is behind a firewall or has a NAT'd IP address.
# From any ssh capable machine you just type ssh -p $PORT_MIDDLEMAN_WILL_LISTEN_ON localusername@middleman

# This is the username on your local server who has public key authentication setup at the middleman
USER_TO_SSH_IN_AS=change_me

# This is the username and hostname/IP address for the middleman (internet accessible server)
MIDDLEMAN_SERVER_AND_USERNAME=luser@example.com

# The following two numbers can be whatever you want, but need to be unique if you have multiple reverse ssh tunnels
# Port that the middleman will listen on (use this value as the -p argument when sshing)
PORT_MIDDLEMAN_WILL_LISTEN_ON=11829

# Connection monitoring port, don't need to know this one
AUTOSSH_PORT=27554

# Ensures that autossh keeps trying to connect
AUTOSSH_GATETIME=0

export AUTOSSH_PORT AUTOSSH_GATETIME

su -c "autossh -f -N -R *:${PORT_MIDDLEMAN_WILL_LISTEN_ON}:localhost:22 ${MIDDLEMAN_SERVER_AND_USERNAME} -oLogLevel=error -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no" $USER_TO_SSH_IN_AS


Make sure that you fill in the values to match your own logins (send me a comment if you are confused about what to put in).

Now whenever the machine acquires an internet connection it will run the above script (that is why we put it in /etc/network/if-up.d). Then from any internet connection you can ssh -p 11829 USER_TO_SSH_IN_AS@MIDDLEMAN and you will get forwarded to your own machine.

You should put this on all of your machines. That is all.

Oh one more thing. For this to work you need to have passwordless public key authentication working between your machine and the middleman. Use this:


ssh-copy-id


It will take care of all of the gory details of copying and concatenating your keys so that you can ssh in without typing anything.

This blog post is a mess and needs some serious revision, but I needed to post it, if for no other reason so that I could find the info when I needed it!

Update

I put everything you need to set this up into a script on github. If you have a server out on the internet with the GatewayPorts option turned on, then all you need to do is the following:


wget http://github.com/mikeymckay/reverse_ssh_tunnel/raw/master/setup_reverse_tunnel.sh
chmod +x ./setup_reverse_tunnel.sh
sudo ./setup_reverse_tunnel.sh
:

Someone is doing something nasty


Someone is doing something nasty. That's the title of my favorite Linux error message. It's to stop another computer from emulating another computer in order to try and steal passwords. They call this a man in the middle attack.

Unfortunately, I am always caught doing something nasty. It's because I work with a lot of Linux machines, and I setup VirtualBox or VMWare servers, and each new server looks like an untrusted machine when I try and ssh to it. This always results in me getting this:


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
d7:63:c7:d5:65:55:33:fc:bf:b5:d6:f9:c1:a5:2e:d6.
Please contact your system administrator.
Add correct host key in /home/crazy/.ssh/known_hosts to get rid of this message.
Offending key in /home/crazy/.ssh/known_hosts:66
RSA host key for [localhost]:2222 has changed and you have requested strict checking.
Host key verification failed.


So then I have to open up the known_hosts file, find the line, delete it and then reconnect.

After years of doing the nasty like this, I finally figured out how to use the ssh config file to solve this problem (and do other cool stuff too):

From ~/.ssh/config:

Host chits
Port 2222
HostName localhost
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
LogLevel error
User chits


This combines a couple of nice things. Here is the stuff that protects you from the nasty:


UserKnownHostsFile /dev/null
StrictHostKeyChecking no
LogLevel error


It looks at the null file to check for a match on the new server's key. It eases off the strict-o-ness level, and it doesn't bore with warnings that you already know.

The other stuff just makes it require less typing to login to my virtual servers which listen on strange ports and require funny user names.

Simply deploy Sinatra permanently


Sinatra is an awesome tool for creating dynamic websites really really fast. But their deployment recommendations just don't match their overall KISS ethos. So here is my recommendation if you want to deploy a sinatra app really quickly:

If your sinatra app is in:

/var/www/sinatra/cool_app.rb

Just insert in /etc/rc.local (before the "exit 0" line)

nohup /usr/bin/ruby /var/www/sinatra/cool_app.rb&

And then run the same command. Now your application is running, and the next time your system reboots it will start up again.

---

Update. I probably wouldn't recommend doing this anymore. The world has come a long way since then. It's still a pain to do this right (using something like apache passenger), but you can do a lot better than the above by doing a few more things:

Install shotgun and thin:

sudo gem install shotgun thin

And then put this at the end of /etc/rc.local:

/usr/local/bin/shotgun /var/www/sinatra/cool_app.rb&


It should work the same as before, but also be able to handle more than one request at a time.

Open source software needs designers

A friend recently challenged me with the following hypothesis: Open source is something that is valuable to programmers but when programmers are writing open source software they have no incentive to build software that is useful for end users. Because of this, we we end up with overly complex software that may not even address the need of the end users and hence the original intent of the project.

After thinking about this for awhile I have decided that I agree that there is a serious disconnect between software developers and end users, but I don't think open source has much to do with it. Programmers are good at logical thinking (without emotion), understanding complex documentation (pages of text), and holding multiple concepts and equations in their heads at the same time. In fact they tend to thrive on this kind of stuff. Case in point, I was just looking at a product that allows you to remotely control someone else's PC. Let's have a look at two images on their site:


Whether you are a computer programmer or not, that is a terrible attempt to communicate something. The only thing it communicates to me is that this setup is complex. Perhaps that is how the programmer's mind visualizes what he is building, and that is fine, but let's keep our private parts (brain dumps included) to ourselves, eh?



I thought this second image (they are both on the same page) was pretty funny. Instead of explaining that the software can help your mom when she "loses the internet" by letting you control her computer from afar, the developer decides to show you how you can recursively connect to yourself and create an infinite number of desktops within desktops. "Whoa dude, isn't it crazy what I can do?? I feel like my brain is going to explode!" Sorry, elite hacker dude, it's not cool. It's lame and I am sorry that normal people will never use your software because most people don't like software that makes their brain explode, they like things that help mom. Most people, but not computer programmers. The more head-xplode-dacious the better for geeks!

This problem gets compounded when you have programmers in DC "solving" problems in Africa or the Philippines. Not only do we have the programmer/normal person gap, but we also have a cultural gap (take it from me, never use the word stupid in the Philippines) and a geographical gap (body language and timezones matter). The greater the gap, then the more useless the stuff we end up with is. The more time programmers spend in country the more we can reduce this gap. Or even better, find some programmers from the country itself. This can improve things a lot, but you still have the classic gap between programmers and end users.

The way to solve this is to have programmers never design anything that a user will see, ever. Instead you have designers design stuff and programmers implement it. Back in the dot com days I worked for a big technology consulting firm and every project had at least one business strategy person, a designer and a computer programmer. We created some world changing stuff, but we were expensive, spent a lot of money on flashy artsy offices and flamed out. But I worked with designers and learned to understand their value (and my own shortcomings in that area).

Macs and iphones aren't programmed in California - they are Designed (check the back of your iphone). I hear that Apple has heavily relied on their Silicon neighbor IDEO to do a lot of their design work, or more likely they probably just hired a bunch of IDEO people. IDEO is a pure design firm, they spend most of their time watching and talking with users, and the other part of their time is spent trying to think outside the box by crossing and combining design patterns from disparate genres and seeing if they can come up with something useful. I just installed an iphone app called Party Whistle designed by the IDEO guys. It is the antithesis of the above examples:



When you launch the app you see a party whistle on the screen, and a little icon recommending that you blow into one end of your phone. When you do his, the whistle expands and makes funny noises and all sorts of wacky stuff. Emphasis on wacky. Nothing useful. It doesn't help plan a party or coordinate party favors, it is just wackyness designed elegantly and simply. This is what you get without programmers.

What we really need is to take the brilliant visual ideas of designers and connect them with innovative plumbing that programmers do.

Usually we do this backwards, and we give the problem to the programmer and they plumb it, then they make it so that they can use it, then they try and make it look nice. With a single designer or artist or business plan you have nothing. But with a single programmer you can usually create something, even if that something is just a shadow of what it could be. It's this shadow world of foggy potential that the programmers tend to fester.

How does this relate to open source? It doesn't really. The best programmers hate to create boring stuff like menus and reminder windows because all of that stuff has been done before. They would rather reuse someone else's code so they could focus on doing the really challenging (brain exploding?) part. This is how programmers are wired, so if they aren't allowed to use open source they will be less happy and will be forced to waste their time on reinventing the wheel. Whether it is open or not will have no impact on usability.

Open source lets programmers stand on the shoulders of giants and build the stuff that they think is important and cool. As a result open source has little to do with cost (of any kind) and more to do with creating an easy way for programmers to share, communicate and collaborate. I prefer working with open source software because I can find other developers trying solve the same problems on IRC. I can google for documentation and wiki my own thoughts to it so that others benefit and see how cool I am. I can join mailing lists. It also means that open source programmers write their code so that others can read it and use it and modify it easily. All of this leads to high-productivity, innovation and personal fulfillment for open sourcers.

It doesn't lead to good user centric design.

Yet open source programmers are figuring out good ways to work together. Open source fosters that, and that is why the innovation is coming out of open source. Open source enables programmers to work on the innovative stuff. Tools like cucumber (story based testing) and github (facebook for geeks) and others are further helping programmers spend their time on innovation, and less on the debugging and already solved problems.

The challenge then is to figure out how to use the open source approach so that it can bridge the geeks with the artists. Imagine if designers could easily express their prototypes without having to waste a lot of time explaining it to programmers. When artists can hook into code as easily as they can doodle a design, then we will have a renaissance that spreads beyond just the geek elite.

William's ascent

[caption id="attachment_285" align="alignleft" width="324" caption="William Kamkwamba on Good Morning America"]William Kamkwamba on Good Morning America[/caption]
All things are possible when your dreams are powered from the heart. -William Kamkwamba


William Kamkwamba, whom I first blogged about three years ago continues his amazing ascent. Where there was nothing but a drought laden field he built a tower of scrap wood, climbed it and built a windmill out of flatten plastic pipe and wire he wound himself. He climbed the stage at TED and has inspired thousands. As an adult, he went back to school and climbed the learning curve of academia despite a rudimentary village education. This morning he was beamed around the world as he was interviewed on Good Morning America. His book, The Boy Who Harnessed the Wind comes out tomorrow, when he will begin to climb the best sellers lists. I can't wait to read it. I am even part of it! I am mentioned five times according to Amazon's Search Inside. How cool is this:

One of Soyapi's bosses, a tall American named Mike McKay, liked the article about my windmill so much that he wrote about me on his blog, Hacktivate.


Thanks for mentioning me William - and congratulations!!!

Computer Hardware for Electronic Medical Records in Developing Countries

Challenges



Bringing technology into health clinics can benefit healthcare workers, patients and public health workers with improved decision making support and better quality data. While there are many benefits offered by a successful system, there are many challenges in creating and sustaining a successful implementation. This document will discuss the problems of electricity, viruses, repurposing of equipment, theft and will also discuss solutions for these problems.



Electricity



Even in developed countries electricity is unreliable. Equipment wears out, the infrastructure is overburdened, lightning strikes, people forget to pay their electricity bill. In developing countries like the Philippines, particularly in rural environments, the problems are amplified. Instead of power outages occurring just a few times a year and lasting 5-10 minutes, developing countries experience monthly or weekly power cuts lasting for hours at a time. The approaches used by developed countries for handling their relatively short, infrequent power cuts work are optimized for their situation, and are hence a poor fit for developing countries. UPSs are the standard solution for desktop computers in developing countries. Their components are designed for infrequent use and are optimized for delivering 15-30 minutes worth of electricity at the power level a desktop computer requires. When these UPSs are deployed in developing countries they are unable to sustain equipment through the multi-hour power cuts and they tend to wear out very quickly due to the high frequency of use that they receive. Developing countries require a reliable power solution that is better aligned with their realities.



Viruses



Viruses are a major problem for Microsoft Windows users, which are the majority of computer users. While recent Microsoft products have improved their security models, all users of Windows are strongly recommended to use antivirus software. But for antivirus software to be effective it must be constantly updated in order to avoid being infected by the new viruses and attacks that appear daily. Because virus updates usually cost money, and require reliable internet connections, updates are often forgotten. This problem is particularly serious in developing countries. Even if money is available for updates, a reliable internet connection is often not available, so antivirus systems are often out of date.



Some virus infection techniques are also particularly effective in developing countries. Because few people have their own computer and even fewer have access to the internet, USB flash disks are used heavily. People carry their personal data on their flash disks, and then plug them into computers that are shared - either at work, an internet cafe or at friends' houses. As these disks move from computer to computer they become infected and end up attacking every computer that they are used on (which often have no or an old antivirus program). This combination of out of date virus software and heavy use of USB flash disks means that computer viruses are rampant in developing countries. Pirated movies and software which are also widely used and distributed in developing countries are another common virus spreading medium.



Repurposing



Computers are multi-functional devices. They can be used for writing reports, storing patient information, watching movies, looking up useful information and playing games. While it is great that a computer can do so much, it often means that a computer purchased for a specific project rarely stays dedicated to this project. In some cases, repurposing or multi-purposing a machine can improve the overall goals of a project. But when a machine that performs a critical function isn't available because it is being used for another purpose or is not functional due to a problem caused by another program that was installed then the project can be compromised. For a health clinic, if a computer is used for patient care and real-time recording of patient information then it is critical that the computer is always available and working reliably.



Theft



Finally, computers are easy targets for theft. They provide a lot of value in a small package. Whether an inside job or a simple break-in, a personal home or a workplace, the computers are often the first items to be stolen. Computers in rural, poverty stricken areas make for tempting targets.



Solutions



These four problems: electricity, viruses, repurposing and theft, must be carefully considered for any kind of computer based system to be successful in a developing country. Now that the problems have been described, this document is going to explore solutions to these four problems.



Electricity



Frequent multi hour power cuts require something other than UPSs. Developing countries often turn to diesel generators, which are poor choices because they require special maintenance and fuel. I saw a generator grind to a halt because no one changed the oil and I know that given the choice to keep fuel in the generator or to go rescue a sick patient with the ambulance, that the ambulance always wins. Even with a generator there will be a few second gap without electricity that will reboot all of the machines. How can we move beyond the generator paradigm?



The first and most important approach is to reduce the amount of electricity that is required for a computer to operate. Desktop computers tend to consume about 150-200 watts of electricity while they are being used. Laptop computers will consume only 10-30 watts of electricity. This means that for a laptop computer to operate it needs just a a fraction of the electricity that a desktop computer needs. Clearly laptops are a good choice when electricity is a scarce resource. The other reason that makes laptops a good choice for developing countries is that they come with an optimized battery back up system already built-in. Laptops are designed to handle frequent, multi-hour power interruptions and are hence a very good fit for the kind of situations found in developing countries. The combination of low power requirements and battery optimization means that modern laptops will run for 4-10 hours on battery power. Laptop cost has also dramatically fallen making them cost close to the same as a desktop computer. For roughly the same cost as a desktop and UPS a laptop can be purchased that will last more than 10 times longer. Electricity problem solved.



Viruses



The virus problem can be mitigated by using a non-Windows operating system and or eliminating the paths of typical infection. Ubuntu Linux is a good alternative to Windows because it is based on a very mature and proven security model that stops many of the viruses that affect Windows systems. Specifically, most activities take place within a secured sandbox that requires a password to be bypassed. Hence, viruses have a very difficult time infecting any core system processes.



Open source software is less prone to viruses than the closed source alternatives. Closed source software is distributed without access to the underlying source code (hence "closed source"). Without access to the underlying source code it is impossible for the person using it to know how the software works. This hidden layer of execution is where viruses operate. Open source software reveals everything, there is no hidden layer for viruses. While having the ability to audit software doesn't guarantee its reliability, the collaborative approach used to develop it means that malicious code rarely finds its way into open source software. Ubuntu Linux is an open source operating system and all of the additional software that most people use (like web browsers, email clients and word processors) is also open source. Practically, this means that Ubuntu Linux users have very little chance of being infected by a virus.



The other approach that can be useful is to disable flash disks, as these are the primary infection path for computers in developing countries. Of course being able to use USB disks to transfer information is an important feature, especially in developing countries, so the benefits must be weighed against the costs. There are currently no known viruses that infect Ubuntu Linux via USB disks.



Repurposing



For mission critical computer operations like the delivery of patient care, computers should be made single purpose. They should be configured so that the only function that they can perform is the function that they were purchased for. This "appliance model of computing" follows the same strategy behind household appliances like a toaster, which are dedicated to reliably performing a single task. When an appliance computer is turned on, it should immediately launch the software required for the application. The software should take up the entire screen, and the user should not be able to close the application or access a menu to launch a different application. This sort of approach will ensure that the computer is always available for the task it was purchased for. Because other programs can not be accessed or installed it means that there is no chance of the system becoming corrupted and usable because of some problem caused by another problem. This also greatly reduces the likelihood of virus infection.



Theft



Theft can be avoided by making the computers harder to physically steal, and also less desirable to steal. Physical security like strong doors/locks is obvious. Using cable locks is another important approach, although these can easily be cut by dedicated thieves. Alarmed cable locks are even better. Physically bolting machines (laptops/desktops) to desks is another good and simple strategy if you can find a good way to attach the bolt to the machine. Making a machine less desirable for theft is also a good approach. An appliance computer that is unable to play games, access the internet or a word processor is going to be less desirable for a thief who knows about the machine. Appliance computers can even be configured to operate without a hard drive, so that they will only turn on when they are in the clinic. This approach is called "net booting" and is a good strategy for reducing desirability (and also reducing system complexity as all systems will use the exact same software).

Taking it to the technology salon

UN Foundation
Last week I had the honor of facilitating a discussion about using technology to improve patient care at the United Nations Foundation. We had an interesting discussion, check out the writeup. Thanks to Wayan for inviting me, and to Gerry, Andrew and Gordon for coming to support me (Gerry, in particular was on fire).

Malawian Woman Delivers Stone Confirmed by Birthing Attendant

[caption id="attachment_263" align="alignleft" width="453" caption="Malawian Woman Delivers Stone"]Malawian Woman Delivers Stone[/caption]

From the Malawi Nation:

http://www.nationmw.net/newsdetail.asp?article_id=3389

Hopes of a 20-year-old Mulanje woman to have a baby turned into grief when she delivered a 300 gram stone at Mulanje District Hospital yesterday morning.
Mulanje District Health Office (DHO) and police confirmed yesterday that Agnes Msolo, in her sixth pregnancy, delivered a stone with a black string tied around it at the hospital.
Doleful looking Msolo said this is a third time she has delivered strange objects. She said last year she also delivered a stone and other strange objects.
Her voice barely audible and with a chitenje wrapped around her shoulders, the way women who deliver stillborn babies are covered, Agnes was at pains to explain her ordeal from her home in Kamoto Village, T/A Nkanda at the foot of Mulanje Mountain.
Msolo said she started feeling labour pains on Saturday and on Sunday she could not walk. She was taken to a traditional birth attendant.
“The birth attendant said she could not see the passage. She told us to go to Nkanda Health Centre [from] where we were referred to Mulanje District Hospital. I was tested, and they said the passage would soon be clear. I was given a bed, and when the doctor came to help me, out came the stone,” recalled Agnes.
In her five years of marriage, she said, she has been pregnant six times, but she has no child.
“During the first three pregnancies, I was giving stillborn babies. During the last pregnancy, I also delivered a stone and strange objects at a traditional birth attendant. We have visited traditional healers, but it has not helped. I suspect an in-law, who warned me that I was going to give birth to a stone,” said Agnes, saying she wants the case to be sorted out at Chief Kamoto’s court.
“I presented the case to the chief when my in-law told me that I was going to deliver a stone. The case was adjourned until I deliver and since I have delivered a stone, as she predicted, I want justice to be done,” said Agnes.
Her 25-year-old husband, Liston Msolo, who plies his trade as a sawyer in the mountain, said he was shocked that his wife delivered a stone again. He said he plans to divorce his wife through their marriage counsellors.
“My mother took her to the hospital on Sunday. It’s the second time this has happened. During her fifth pregnancy, she delivered a stone and some strange objects. Her relatives denied it. They blamed us, that is why we did not pursue the matter. Now, we have the evidence.
“People have always mocked me. I have visited many traditional healers, that at least I should see my child’s face but to no avail. I am afraid that if I maintain the marriage, I may die. I know there is sorcery involved,” said Liston, who dropped out of school in Standard Two.
Liston’s mother, Fanny Wilson, said they are shocked that Agnes’ relatives “do not act when we tell them of these incidences”. She said it is time her son looked for another wife.
District health officer (DHO) for Mulanje John Chikolombwe confirmed Agnes delivered at the district hospital. He said nurses at the hospital conducted manual tests on the woman since the hospital has no scanner. He said the nurses told her to go home and come back yesterday morning for a check up, only to be surprised the woman came in the night in serious labour pains.
“She was taken to labour ward where nurses were shocked when a stone weighing 300 grams with strings attached around it was being delivered instead of a baby,” said Chikolombwe.
He said he was recalled at the hospital where he conducted pregnancy tests on Msolo but no signs of pregnancy were observed.
Mulanje Police spokesman Ralphael Makondetsa said they are instituting investigations into the issue but will wait for the matter to be discussed at Chief Kamoto’s court.

Strange Perspectives on the Welfare State

Yesterday, the Cato Institute was hosting an event on the Welfare State, so Claudia and I thought it would be a good opportunity to hear some alternative viewpoints to what we have been learning in our "History of an Injustice" class.

James Bartholomew who wrote a book called, "The Welfare State We're In", was speaking. Michael Tanner from the Cato Institute (== Libertarian) was moderating and Dr. Wendell Primus, the Senior Policy Advisor on Budget and Health Issues to Speaker Nancy Pelosi (== Democrat) was there to provide an alternative view.
cato
In many ways this was my first exposure to DC politics (even though the author was British and the book is about the UK) and really my first exposure to non-liberal thinkers in person since I started caring about social justice.

It was pretty shocking and disappointing all around.

Bartholomew struck me as a too absurd for reality cartoon character. His talk was all disjointed anecdotes about how things were better 100 years ago, and his solution is to figure out how to go back to those times. This was the killer quote from his talk:

"At the lower class level, there used to be a large number of really decent, honorable, admirable, low paid people in Britain. I don't think you would stand up in England and say that was the case now, that would be absurd." (@9:25 in the talk)

Not only does he want to eliminate any kind of unemployment and housing assistance, but he also thinks publicly funded education needs to be eliminated. His main argument for eliminating public schools was a story about a poor Welsh boy from 100 years ago who was educated by a local church charity school, read classical literature and went on to become Prime Minister. He claimed that if this boy had been bussed off to the school of today he probably wouldn't have learned how to read.

As he was saying all of this stuff I was shocked. I was disappointed in myself for not being able to remember some key statistics from my class. Bartholomew spoke about welfare as a trap that lures in the poor and they can never emerge from it, yet I recently learned that 75% of all Americans will live below the poverty line during the course of their adult lives. In other words poverty is cyclical, it is often the result of a short term circumstance (health problem, recession, divorce, etc) and it will hit most of us at some point in our lives, but we will probably emerge from it. Unfortunately I could barely remember the 75% number, and I was sadly realizing that my grasp of the class's material was less than what I needed for it to be functionally useful.

Luckily, Dr. Primus (who also worked in Clinton's administration) was speaking. I expected someone like Josh Lyman from the West Wing to passionately tear Bartholomew to pieces with rational arguments and hard data.

I was greatly disappointed. He certainly didn't agree with Bartholomew, and he wanted to talk about health care companies, but beyond that I didn't really follow much. He also used anecdotes. His were mostly about how poor people "make mistakes" and need things like health insurance.

Certainly the most intelligent speaker was Michael Tanner from Cato. Intelligent but totally out of touch. He kept speaking about how much money was spent on welfare related activities. He used real numbers, which was good, but the crux of his argument seemed to be, golly gee those numbers are high, shouldn't we care that we are spending so much money on these government programs? He didn't mention caring about the poor.

One thing was mentioned that all speakers seemed to agree on. They all had a great appreciation for the challenge of getting things done in a democracy. With these sorts of old white men standing at the front of the room I also had a great appreciation of just how hard it must be.

The opportunity of SMS

A few weeks ago I attended a technology salon here in DC. "The Technology Salon is an intimate, informal, and in person, discussion between information and communication technology experts and international development professionals."

Sounds cool, right? And it was. A Vodafone Foundation board member was there to talk about what Vodafone is up to in developing countries. There were a lot of smart people working in international development in DC and we had some good discussions.
cell-phones-in-tree.jpg
The presentation from Vodafone was interesting, and it was great to see that they are aggressively building markets in developing countries. There were a few things from the presentation and discussion that I found strange, and suggested to me that service providers like Vodafone have a lot to gain from listening to international development and technology geeks. Indeed, the m-pesa idea (cellphone banking in Africa), one of Vodafone's big success stories, came from organizations working in finance in Africa.

The vast majority of projects that were discussed around the table leveraged SMS, which is not surprising since virtally all of the world's five billion cellphones can send SMS (and not MMS or email or internet). These five billion phones are an opportunity for service providers like Vodafone to grab tremendous amounts of market share. Many of the five billion phones owners have very little disposable income, but would quickly spend it on communication activities. Unfortunately, it sounds like the Vodafone strategy is to try and increase the amount of money spent by the average customer per month (currently about $5), which will translate into immediate profit, as opposed to reduce prices for SMS services which would lead to more demand, more customers, more communication and eventually more profit. Given that developing countries have by far the fastest economic growth rates, I would be establishing long term customer loyalty, so that five years from now my phone company is best positioned to take advantage of a more developed economy. Cheap SMS can do that.

Examining the cost of SMS pricing a little closer shows that it is probably the most expensive form of communication in the world, despite the cost to the service provider being almost nothing. SMS messages are attached to existing voice packets (this is where the 160 character limit comes from) and hence consume no additional bandwidth. In other words the bandwidth cost to the provider for sending SMS is zero (minus some capital costs). Why then does it cost 10 cents to send 160 characters? Sending $1 worth of data via your broadband internet connection would cost $61 million dollars to send over SMS.

Contrasting this SMS situation is Vodafone's problem with data services. They are struggling to figure out how to handle people that use their phones to download movies. Vodafone offers a fixed price for unlimited data, but a few users are spoiling the party by downloading gigabytes of data on their phones every month and squeezing the network capacity for the rest of the users.

Okay, so let's check the score. College kids are paying $50 a month for a firehose of wireless multimedia bandwidth which they use so much it is actually crippling the network. Poor farmers in Africa who need to know the price of tomatoes in the market are paying 10% of their daily earnings to send a 160 character message that costs the service provider nothing.

This is all very broken. But this is also a big opportunity for both Vodafone and people in developing countries.

The Vodafone Foundation's strategy for developed countries focuses on sports and music, while their strategy for developing countries is all about health. Setting aside the sports and music focus, I suggest that Vodafone should enable ultra low cost communication via SMS in developing countries. Maybe 1/2 a cent per SMS?

Not only would this build gigantic market share for the first cellphone provider to do it, but it would enable all sorts of value added services and projects to rise out of the villages that are in most need of new livelihoods that will lift them out of poverty and into the 21st century (and make them bigger consumers of cellphone services).

There are already a bunch of mediocre SMS based projects created and subsidized by people in places like Washington DC that are poised to do some good. What happens when we give people in developing countries the tools (and appropriate pricing) they need to solve their own problems? You get solutions. Solutions that are relevant, sustainable, innovative and worldchanging.

Distributing the future

Imagine the future. Supertunnels through the earth's core for quick travel. Subvocal communication. 1000 year lifespans.

I feel like it has been the future this week. Some people got sick and died in Mexico and the whole world is holding its breath in trepidation. It's like everyone forgot that we were mortal and will die. I know that flu isn't supposed to kill strapping youngsters, and that we are overdue for a pandemic. And don't get me wrong I am as addicted to disaster news as the next guy, so I'm not complaining.

I'm just saying that in the future somebody getting sick and dying probably will be a major news event.

(Image by Jösé@flickr)

Sundown towns


I am taking a course called "History of an Injustice" at the Servant Leadership School here in DC.

From the course overview:



The segregation and poverty of the American inner-city ghetto is no accident but the inevitable product of the racism of our history. From the Sundown Towns that forcibly evicted their black (and sometimes Chinese or even Jewish) residents in the late nineteenth and early twentieth century to the increasing apartheid of the twenty-first century American public school system, structural injustice has created the ghetto. In this class we'll study that history, look at some other kinds of poverty, and begin to develop a vision for a more inclusive community that might emerge from the current global economic crisis.




I have only been to one class, but so far it has been fascinating. I am really looking forward to learning about the untold stories of injustice in America.

The first assignment was to read selections from a book about Sundown Towns. Imagine Clint Eastwood telling a no good cattle rustler to get out by sundown...or else. In fact it wasn't criminals that were told to get out but minorities. And it wasn't in the gold rush days it was in the 20th century. It was shockingly common and is not particularly difficult to document, yet entirely left out of our history books.

Reno, Nevada where I grew is not listed on the author's site as a sundown town but many nearby towns are:

"A local resident who lived in Gardnerville in the 1950s describes [it]. He thought the same whistle or siren served both Minden and Gardnerville; it was probably near the border. Indians ... worked in Gardnerville, were maids, etc., but had to be out by sundown. He heard the 6PM whistle; everyone knew, white and Indian, what it was for. "Indians made themselves scarce" at 6PM. Nobody enforced it rigidly, doing anything to anyone still in town at 6:30PM. Still, "I never heard of anybody violating it." ... Gardnerville had a Chinese-run Joy Land Cafe. The Chinese didn't have to leave. No blacks in Gardnerville to his knowledge. The Chinese were friendly with the Indians, but the Indians had to eat in the back room."


(In other words in the 1950s a whistle blew every day in Minden/Gardnerville that told all of the Indians to get out of town)



"Truckee locals attempted to start a boycott against Chinese goods and laborers in their town. When many merchants continued to employ Chinese Americans, some locals turned to more direct means, such as cutting off Chinese men's braids and hanging the braids outside their houses. In June 1886, after many Chinese Americans had already left Truckee, the city fathers burned the Chinatown to the ground. Women were invited to witness the event, and fire wagons surrounded Chinatown to prevent the fire spreading to the rest of Truckee."




(Granola munching folks from Truckee of today inherit a town that was cleansed by force and fire of Chinese merchants)

I had never heard about the concept of sundown towns before reading this book. At first, I was a bit skeptical of some of his more extreme claims that so many towns across America were actually forced African Americans out. I thought perhaps he was stretching his own definition, indeed his own term, so that he could lump in more towns with the more radical ones.

My own experience told me that it was quite natural that some towns are more white that others, and it therefore followed that some towns might be entirely white. But this seeminly rational thought gets blown apart when the author shows data from 39 states showing how blacks routinely left county after county during the 20th century. In other words, the United States was more integrated in 1900 than in 2000 - the author was not stretching the truth - its my own history that is flawed.

Why isn't this commonly known? Why has history squelched this? Why are we raised to feel comfortable about the fact that our neighborhoods and schools are almost entirely monoracial (aka segregated)? Is there some kind of white person mythology that is being passed off as truth, as history?

I am reminded of a TED talk by Nate Silver that investigates racism and voting.

It seems obvious, but people who live in racial segregation are racist. Perhaps if we want to fight racism we need to take conscious steps to live in more diverse neighborhoods.

More information about Sundown towns can be found on the wikipedia page about Sundown Towns. Also don't miss this trailer for a video about ethnic cleansing in the US.

No mosquitoes, no malawi, no negroes

TED

So a week ago, I received an email from Tom Reilly, TEDmeister that went something like this:

This is Willa Wonka...your Golden Ticket awaits!!!

And just like that, I dropped everything and went to my first TED conference. It probably sort of goes like what these people are saying: TED bloggers.

The thing is - my being here is an anomaly. A gift bestowed by a benefactor, with my responsibility to enjoy, absorb, learn and share.

Let's call the day, the greatest show I have every encountered. My brain is expanded and my vision challenged.