Rule #0 of any checklist

The Checklist Manifesto.jpg

A while back I mentioned Atul Gawande‘s book The Checklist Manifesto. Today, I got another example of how to improve my checklists.

The book talks about how checklists reduce major errors in surgery. Hospitals that use checklists are drastically less likely to amputate the wrong leg.

So, the takeaway for me is this: any checklist should start off verifying that what you “know” to be true is true. (Thankfully, my errors can be backed out with very little long term consequences, but I shouldn’t use this as an excuse to forego checklists.)

Before starting, ask the “Is it plugged in?” question first. What happened today was an example of when asking “Is it plugged in?” would have helped.

Today I was testing the thumbnailing of some MediaWiki code and trying to understand the $wgLocalFileRepo variable. I copied part of an /images/ directory over from another wiki to my test wiki. I verified that it thumbnailed correctly.

So far so good.

Then I changed the directory parameter and tested. No thumbnail. Later, I realized this is to be expected because I didn’t copy over the original images. So that is one issue.

I erased (what I thought was) the thumbnail image and tried again on the main repo. It worked again–I got a thumbnail.

I tried copying over the images directory to the new directory, but it the new thumbnailing directory structure didn’t produce a thumbnail.

I tried over and over with the same thumbnail and was confused because it kept telling me the same thing.

I added debugging statements and still got no where.

Finally, I just did an ls on the directory to verify it was there. It was. And it had files in it.

But not the file I was trying to produce a thumbnail of.

The system that “worked” had the thumbnail, but not the original file.

So, moral of the story: Make sure that your understanding of the current state is correct. If you’re a developer trying to fix a problem, make sure that you are actually able to understand the problem first.

Maybe your perception of reality is wrong. Mine was. I was sure that the thumbnails were being generated each time until I discovered that I hadn’t deleted the thumbnails, I had deleted the original.

(Photo CC-BY 2.0 David Pursehouse: Earthquake survival kit checklist from Japan.

– 1.5 liter bottle of water
– Canned bread
– Rice
– Pack of disposable toilet bags
– Foil sheet (to keep body dry/warm))

Late night hacking and Italian Hospitality

Today is the second day at Wikimania in Esino Lario, a small town several kilometers up a narrow road full of switchbacks in northern Italy.

During the first day, I met some Kiwix developers.  CScott, especially, was talking about a use case that Kiwix doesn’t address well right now — offline editing.  We talked a bit about that, the International Space Station, WikiEM and I mentioned the mediawiki remote for git.

I had never actually tried it out, though.  I found several bugs and got caught up in fixing those rather than the other work I had planned.  More about this later in a separate blog post.

I worked on it too late.

When I finally decided to go to bed at 1:00 in the morning, I couldn’t find the house where I all my luggage was and where I was supposed to sleep.

I walked up and down the roads around the hills here, but finally had to give up at 2:00.  I walked back to the polizia station and asked for help.  I was hoping they had shared a list of the places that the registered attendees.

They had not shared the list.

It was 2:00 in the morning and a man I later found out was the vice mayor of Esino Lario was driving me around while I talked to his niece on his cell phone — the only person he could find that could find at that time that could translate.

Because of the absurd comedy involved — a stupid American didn’t know where he was supposed to sleep at 2:00 in the morning — his niece, Amelia, and his 80 year old mother quickly made up a bed for me and gave me her apartment while she went to stay with her uncle.

As I told them, it was a great privilege to experience Italian hospitality.  I could tell that Amelia’s grandmother (who reminded me of my own grandmother) was really pleased by this — even through translation.  She jokingly told me I should let everyone know about her bed and breakfast.

Brilliant twist on the advance fee fraud

I got the following in my email today.  This a brilliant twist on the scam:

From: "IMF Agent" <>
Reply-To: "IMF Agent" <>


 I am IMF agent attached to the World Bank office . I am very much aware of your ordeal towards actualizing the release of your long delayed payment.

 Not very long after the World Bank completed the acquisition process of all pending payments, I discovered that my boss connived with some top officials of the World Bank to divert funds already approved to settle inheritances, email lottery winners and international contractors.

 The World Bank has already given approval for the payment of your fund while they deliberately delay your payment and continue to demand fees from different departments mostly from Africa, the UK , Europe and Asia all in an attempt to enrich their private accounts. I wonder why you haven’t notice all these while. I am Christian and my religion does not permit such.

 Your fund was authorized to be paid to you through the World Bank accredited affiliate with a Key Tested Reference/Claim Code Number, which was supposed to have been issued to you before now.

 Upon your response to this message, I shall guide you and provide you with all you needed to contact the World Bank affiliate who will facilitate the release of your payment.

Truly Yours,

Kelly David
IMF/World Bank Agent 
This e-mail and any attachments may contain information which is confidential, privileged, proprietary or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee).  If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.

This email has been checked for viruses by Avast antivirus software.

A freetard apologizes for Google

(For those not familiar with the term “freetard“, it is a derogatory term that Fake Steve Jobs coined for free software fanatics like myself.  I’m reappropriating it here.)

A friend of mine posted a question on facebook about backing up his Mac, asking what would happen if he decided to switch to Windows later.  Instead of answering his question, I picked up on the bit about photos and failed to respond to his question with the following bit:

Give your life to Google. My phone is my camera and it syncs all photos automatically to “the cloud”. Everything is on the web, of course, and sometimes Google will surprise me with bits of scrap-booking that its bots send me.

For example, here is a movie made out of one of the breakfasts we had in London a few weeks ago.

And here is the “story” Google’s bots made of our whole trip to London.

So, yeah, Google is a multi-billion dollar corporation, but so are Apple and Microsoft. The difference is that Google’s doesn’t care if you are on a Mac or a PC.

But they would prefer you to use an Android phone, I’m sure, instead of an iPhone. Even there, you have more options because, like Microsoft, Google isn’t focused on controlling the delivery of their software to the same degree that Apple is.

This means you can have a crappy Android device, just the same way you can have a crappy PC. So, yes, there is a higher chance you will be dissatisfied, but it also means that you are less limited than you are on an IOS device and that, as a result, more people will be able to contribute to providing you with a better experience via software or cloud services because Google (like Microsoft on Windows) doesn’t exert the same control over the Android ecosystem that Apple does on the IOS ecosystem.

Is coddling really what is needed?

I’m just getting caught up on the latest sexist insensitivity happening in the tech world, but as I was reading @nrrrdcore’s postt There is No Emoji for Martyrdom (update: context) I came across this year old story about Adria Richards being fired for publishing pictures of men who made rude and inappropriate comments, I’m struck by this quote that is attributed to her:

There is something about crushing a little kid’s dream that gets me really angry. Women in technology need consistent messaging from birth through retirement they are welcome, competent and valued in the industry.

Am I reading that wrong, or is she saying that she thinks women need to be told they’re competent when they are clearly not competent?

Does anyone go “from birth through retirement” being told they are welcome — regardless of their gender? Especially when they aren’t helping the people they’re working with to accomplish the goal they’re striving for? How do you say “We welcome you, even though it seems like you’re just getting in the way?”

I was mostly with Adria up until this quote in the story. I’m not going to say she should be able to publish people’s pictures on Twitter without any consequences, but she felt threatened, or at least angry, and she reacted. What she did is understandable in that context. From reading this tiny slice of the story, I can only assume that she felt making a statement was more valuable to her than continued employment. And I can respect that. It takes some real self-assurance to decide to tke that sort of stand.

But this quote of hers seems wrong to me. Maybe as I look at the story, I’ll see get some context that is missing right now — something that would frame the statement better. But the statement by itself seems insidious — that we should tell women they are valued in the field simply for being women?

Now, I’m very aware that there is a real gender imbalance in the tech community — especially in the free software world where I make my home. And I’m keen to make sure my three daughters will be able to succeed in whatever they decide to do — I’ll be especially interested in they really take an interest in my chosen profession.

But the reality is that the world crushes people’s dreams all the time. Anyone who goes from birth to retirement and gets the consistent message that they are welcome and competent is being fooled. I don’t want that for any of my children. If they need to be told to improve or that they just aren’t doing what is needed, then that’s fine. I’ve been told that more than once and I’ve managed to survive and I certainly want my children to be tough enough to survive and thrive as well.

An eight-year-old rants to Peter Jackson

IMG_20140201_153340_952I took my family to see The Desolation of Smaug along with some friends today.  I found it entertaining even though I did notice that Peter Jackson did seem to take even more liberties with this than he did with Lord of the Rings.

I sat beside my eight-year-old daughter, Lily, during most of the film, though.  Her mother started reading the book to her a couple of times, but Lily ended up finishing the whole book herself.  Several times during the film she pulled my head towards her and would whisper fiercely comments like “This is WRONG! They didn’t do that!

Once we got home after the movie, she decided to write a letter to Peter Jackson.  I’ve reproduced it below with some minor changes in punctuation and spelling, but the words are hers.  We’ll be mailing the letter Monday, but I’ve gotten her permission to share it here.

Dear Peter Jackson,

I thought your movie was horrible. I thought this because you didn’t include things like Gandolf introducing the dwarfs to Beorn. All of the things you added are unnecessary like how you put Legolas in when he was only in Lord of the Rings.

Second, I think that you shouldn’t have put the elf-lady Tarvial in for love interest and because “there aren’t enough females.” Another thing you put in is that you made Smaug a Wyvren instead of a giant worm-like creature with wings. Also, you made Bard younger. Another think you put in was the dwarfs covering Smaug with gold.

Multiple times you had Bilbo take off the ring or it fell when it really didn’t. Another thing that was wrong is that you didn’t make the eagles TALK!! Also Kili was never shot. He also didn’t have a love interest. Next, the dwarfs never split up. Lastly, the barrels didn’t free float — they were on a raft.

A furious 3rd grader

P.S. The orcs never chased them on the river.

P.S.S. No one knew they were in the barrels.

How should we treat others?

Jesus and the Samaritan woman1A year or so ago, I came across the following quote: “other people’s real lives were more important than my mere beliefs.

I copied this to my twitter feed and someone responded with a comparison to adultery and a story Philip Yancy told in a book he wrote about a person who excused his adultery with God’s grace saying, in essence, “God will forgive me.”

The story about Yancy’s friend raises a good point. Sin can hurt other people.  The person who sent me the story said “sexual sins hurt so many people”.

Yes, it is obvious that some sins have the power to really hurt other people. But I’m not sure that adultery is the same as homosexuality in this sense at all.

Adultery is not a sexual sin so much as a breaking of vows, and as a result, destroying trust and confidence — causing real and lasting harm. I’m not sure how adultery can really compare to a mutually exclusive homosexual relationship.

Adultery as a sin is not even about sex. Someone could have a non-sexual relationship with a co-worker and cause jealousy in and harm to his life-long partner (for example, his wife) if it began to compete with his relationship with his partner.

Sex is definitely a powerful urge and we can easily fool ourselves into doing things that are painful to a lot of people if we are not careful with our sexual desire, but I don’t see anywhere in the Bible that God picks “sexual sin” out as a special category deserving of careful consideration.

Jesus summed up the Law and prophets with two commands: “Love the Lord … Love your neighbor”. I can see making an argument from the perspective of purity that homosexuality violates the first commandment, but I don’t think homosexuality itself violates the second. Adultery, on the other hand, definitely violates the “Love your neighbor” bit.

Still, the first commandment (and the purity argument) is ignored every day. A couple of examples are in order:

First, America has an obesity epidemic. (I’m a “victim” of this epidemic if you use BMI to measure it.)  Obesity can be evidence of gluttony — a misplaced desire for food, and one of the deadliest sins — definitely a violation of the purity argument.

And, while times are changing, we still treat people who take God’s name in vain — one of the ten commandments, arguably more important than anything the Bible says about homosexuality, and another argument from purity — with more humanity than homosexuals.

This brings me to this bit from St Issac:

If zeal had been appropriate for putting humanity right, why did God the Word clothe himself in the body, using gentleness and humility in order to bring the world back to his Father?

Too often we confuse zeal for purity.  Even if we are pure as the driven snow, pride — another one of the deadliest sins — can creep up on us and we’ll become zealous in our pursuit of purity and start ignoring the admonition to “Judge not”.

Don’t mistake what I’m saying as an “excuse” for sin. I’m no more excusing my friend’s sins than I am my own lust, gluttony, greed, sloth, wrath, envy, or pride.  But just as I pray for God’s mercy and hope in it, I hope for God’s mercy for others.

It is true that there are prophets in the Bible who pointed out other people’s sin.  And maybe you are like John the Baptist who zealously pointed out Herod’s sin, but I prefer to follow St. Issac here and emulate Christ’s gentler example.

Christ sat down with the woman at the well even though he knew she wasn’t pure and said “I do not condemn you” to the woman caught in the act of adultery. He said “I did not come to judge the world, but to save the world.

I suppose it is just a sign of my lukewarm ways that I’m more comfortable trying to be like Jesus here than John.

“Follower of Christ”?

santaSome people in the Church avoid the label of “Christian”. Instead, the tell people they are a “follower of Christ”. I don’t like this sort of marketing and re-branding and definitely think it is the wrong place for us to concentrate our energy.

The “meme” photo here (“Put the ‘Christ’ back in Christmas?  How about putting the ‘Christ’ back in Christians?”) prompted a discussion on Facebook which included the comment that one person “no longer [identfied himself] as a Christian but rather as a follower of Christ.”  Following is my response:

When you change the wording, you’re attempting to address people’s first impressions of you as an individual.

This is understandable. No one likes to start off “in the red”, no matter the circumstances.

Still, community and co-suffering (as well as co-celebration!) are integral parts of what the Church is about. It should also be noted here that Christ said “Blessed are you when they revile and persecute you, and say all kinds of evil against you.”

Followers of Christ should recognize that Christ didn’t duck away from labels or identification with those who he shared community with. He knew what Judas was doing, but didn’t shun him and didn’t take the label of “disciple” away from him.

And when Christ was asked if the label “Messiah” applied to him, he didn’t say “I don’t like to use that word. I prefer ‘Son of God.'” He acknowledged it (“It is you who says it”), even though that would result in suffering.

For what its worth, all my friends (many who are atheists) know that I’m a Christian. And lets admit it, they would know that I was even if I said “No, no. I identify myself as a follower of Christ, not a Christian.”

So, yes. The Church is full of broken people. There are many people (myself included) who claim the title of “Christian” who are gigantic hypocrites. It is surely annoying to have to deal with all that cultural baggage.

But changing the label doesn’t change much about this.

Pasting text into the wiki

A client asked me if I knew of a way to remove the spurious line feeds in a text that you copy from, say, a PDF into the textarea editing box for the wiki. The problem, which you may have seen, is that highlighting a couple of paragraphs of text in the source document and then pasting them into a textarea in your browser will end up with funny, unintended line breaks.

For example, copy the first paragraph of the second section of this paper and then pasting it into a textarea using Firefox gives this result:

The text should be divided into sections, each with a
separate heading and consecutive numbering. Note, how-
ever, that single secondary, tertiary, and quaternary sec-
tions remain unnumbered. Each section heading should be
placed on a separate line using the appropriate L
X com-
mands. For more detailed information on different sections
and their formatting see the Authors’ Guide.

After looking around a bit, I found lots of people talking about pasting problems, but no one offering a solution that would work in the browser instead of just on one particular web page.

After reading about JavaScript and pasting, poking around in the Firefox addons, I figured I knew enough to address the problem with GreaseMonkey.

jsfiddle provided a nice REPL for testing my code and it wasn’t too hard after that to put this together in GreaseMonkey and upload the result to (after I recovered the password to my long-dormant account).

So, after all that, here is the result of the previous paste:

The text should be divided into sections, each with a separate heading and consecutive numbering. Note, however, that single secondary, tertiary, and quaternary sections remain unnumbered. Each section heading should be placed on a separate line using the appropriate L A T E X commands. For more detailed information on different sections and their formatting see the Authors’ Guide.

Hopefully this will be useful to others.

In which I sound like a cranky ingrate

Scenes from Matanda, Malawi
This girl is going to have to walk 1km home. Photo from kym54 on Flickr.

This week, if you’ve seen any of my action on Twitter or Facebook, you probably know that I was admitted to the hospital on Monday for blood clots in my lungs. Three years ago I had a pulmonary embolism while I was in the hospital. To avoid the out on my third strike, I’m going to have to live the rest of my life regularizing my leafy green intake and taking Coumadin.

So, fine. I had a blood clot (again!) and I could have been one of the 100,000 Americans that die every year (one every 5 minutes) from a blood clot.

But I’m not. I survived. I’m very happy to be alive. I don’t really know how I would feel if I hadn’t survived this, but I know that my wife and children were quite upset when they came to see me in the hospital — their lives would be completely different had I not survived. And so, I’m happy for them that I’m sitting here in my back yard listening to the cicadas while my daughters play with the bugs they’ve caught today.

If the blood clot didn’t result in brain damage (i.e. a stroke), then the inconvenience of Coumadin is probably the most debilitating long term effect that most people suffer. There are even (very expensive) drugs available that take care of thinning the blood without being affected by diet. I’m on one now because the Heparin I was in the hospital for wasn’t getting my INR up quickly enough. But it costs $40 per dose. Paying $280 per week for preventative medicine doesn’t really work for my budget when there is a cheaper alternative (Coumadin) that has been working for 60 years.

But now when I tell people I’ve had two blood clots, they tend to freak out. “That sounds scary!” Or “I‘m praying for you.”

I understand this. When a friend of mine showed me a clot that he had in his leg, I was pretty surprised that he was up and about and not falling over in front of me. “Shouldn’t he be more worried?” I thought.

But now I think I understand his point of view a little better. People die from blood clots. Like I said, an American dies once every five minutes from one.

Maybe it is just that those of us who have had one (or two!) of them and survived realize that we are past the deadly part — we’re alive and life keeps happening.

I appreciate that the possibility of death looms every second that I’m alive. I appreciate the prayers of others for my health and my family’s well-being. Really, I’m grateful!

But I’m also grateful for drinkable running water. Water is essential for living, but most Westerner’s don’t spend time thinking about how blessed they are that they don’t have to walk to a communal well every day to get their water. And I don’t spend time telling them how lucky they are to have running water.

Death looms, but I’m alive.

It takes a lot of infrastructure and work that we don’t usually see to get plenty of fresh water, but I can take a nice long shower.

I’m lucky to be alive. There, I’ve acknowledged it. Can I just get on with living?