Why your javascript on Wikipedia will break

This week we did our first roll out of MediaWiki 1.19 on some of the smaller project sites. This staged roll out is a great way to find out how you are using the software in ways we didn’t expect and to give you a warning: “Beware! This thing you are doing is going to break!” Of course, I would prefer to avoid that wherever possible, but there are things I can’t control.

So now, I get to say “Beware!”:


If are using document.write() in some javascript, whether in a gadget, in your common.js, vector.js, monobook.js or even global.js, you need to change it. In the cases that I saw, people had used a code fragment like the following:

function importAnyScript(lang,family,script) {
document.write('<script type="text/javascript" src="' + 'http://'
        + lang + '.'
        + family + '.org/w/index.php?title='
        + script + '&action=raw&ctype=text/javascript"></script>');

This has to be changed to something like the following:

function importAnyScript(lang,family,script) {
mw.loader.load('//' + lang + '.' + family
        + '.org/w/index.php?title='
        + script + '&action=raw&ctype=text/javascript');

Thoughts from The Checklist Manifesto

Just over a month ago, I read The Checklist Manifesto and I’ve been meaning to write up my thoughts on it ever since. Since I’ve waited so long to write this, I’m going to rely on the notes I typed up one night when I was thinking about this book as well as a another related article that I read along the way.

I first heard about this book a couple of years ago from a review I read in Powell’s now discontinued review-a-day. Based only on the reviews I read and my initial experience developing MediaWiki, I started MediaWiki’s Pre-commit checklist. Last month, when Guillaume Paumier told me he had started reading the book after looking over the checklist, I decided I really should read the book myself.

Atul Gawande wrote the book to write about how worked with the WHO to introduce checklists into the surgery room. He talks about the history of checklists, starting with the pre-flight checklists that were developed after a tragic accident involving an experienced test pilot and a new, more complex, B-17 in 1935.

In each of these situations, you’re dealing with complexity and helping a person with superior domain knowledge avoid silly mistakes.

In the surgery room, this involves empowering nurses and anesthesiologists to call the surgeon out if they see something amiss. Everyone agrees, and even gets the patient to agree to what procedure will actually be performed. Getting surgeons to use these checklists wasn’t easy, but when they did, errors were caught.

The past century (even the past 30 years) has seen great strides in what we can do. Our ability has jumped exponentially. At the same time, the amount of complexity that we have to deal with has grown exponentially. We are only starting to develop are ways to manage the complexity but those who have managed to master some of the it are treated like rock stars. It isn’t uncommon to hear someone use the term “rock star” to refer to a really proficient person. Even they can make mistakes, though, and so we have things like code review where all code written is examined and critiqued by others.

I’m no where close to a rock star programmer, so those code reviews would turn up some of the same things every time. As a result, the checklist was born and has been adopted and maintained by the community since then.

But back to the book. The Checklist Manifesto outlines the successful use of checklists to enable communication between the expert and people around him. This is one the real benefit of checklists. Recognizing that everyone makes mistakes and needs to be open to correction from others that they are working with is one thing that checklists are really good at whether they are used in the cockpit or the surgery room.

Other activities still benefit from cooperation and communication, but as Susan Cain says in her editorial “The Rise of the New Groupthink”, it is dangerous to fetishise cooperation and team work. Her piece ends with this great bit of insight, though:

Before Mr. Wozniak started Apple, he designed calculators at Hewlett-Packard, a job he loved partly because HP made it easy to chat with his colleagues. Every day at 10 a.m. and 2 p.m., management wheeled in doughnuts and coffee, and people could socialize and swap ideas. What distinguished these interactions was how low-key they were. For Mr. Wozniak, collaboration meant the ability to share a doughnut and a brainwave with his laid-back, poorly dressed colleagues — who minded not a whit when he disappeared into his cubicle to get the real work done.

Collaboration is important, but the surgeon still needs to be the one holding the scalpel.

How to handle prejudice — kid’s edition

When I showed my kids my last post they said I should write about some of their experiences.

I should post a picture here of my kids. I know they don’t look like your typical Mennonites, but neither do they look very asian. But, yes, I’m biased and I see them every day, so I could easily be missing something.

First there is the silly, thoughtless racism. Kids are still saying “Ching Chang Chong” to anyone they think of as Chinese. The first time a kid said this to my wife I was surprised. She gave them quite a tongue-lashing, though. I’m surprised that my son reports kids’ say this to him. This is, as he said, just ignorance.

Some people are simply curious. My 7-year-old daughter says a boy asked his brother to ask her if she was Chinese. This isn’t really prejudice, just kind of cute curiosity.

One guy really annoys Ginger with his stupid, racist comments like bugging her about Miss May, a Chinese substitute teacher as if Ginger knows this person’s personal details. Even though the school offers Chinese as a spoken language (what one of her friends called “chink” accidentally before correcting herself) for students to learn, some still ask her if she can speak “Asian” — as if it were one language. They also think that my children all go to the same church with the other Asian children.

Which is weird because even though we have a Mennonite background and name, we attend a Greek church.

I think a lot of this comes down to tribalism. Just by getting married, Alexis and I haven’t stuck with the tribe. And when we started going to a Greek church, that was yet another non-tribal activity. In a small town like ours, People aren’t used to those who don’t stick to their tribe’s customs, and they’re curious and (sometimes) rude as a result.

How to handle prejudice

Moving to Lancaster County has been interesting.

First, “Hershberger” isn’t such an unusual name. It is a Amish/Mennonite name, after all, and this is Lancaster County. There are a few of them here.

Since we came here 8 years ago, my wife has had to deal with people who were not expecting a Vietnamese woman when she introduced herself as “Alexis Hershberger” over the phone to them.

But even better has been this encounter that she related to me recently.

woman: Do you go to the Vietnamese church?

Alexis: No, we go to the Greek Orthodox church.

woman (surprised): Oh, when did you and your husband come to the States?

Alexis: We moved here from New Orleans 8 years ago.


Question: When is a person sure of having arrived at purity?

Answer: When that person considers all human beings are good, and no created thing appears impure or defiled. Then a person is truly pure in heart.

The person who is genuinely charitable not only gives charity out of his own possessions, but gladly tolerates injustice from others and forgives them. Whoever lays down his soul for his brother acts generously, rather than the person who demonstrates his generosity by his gifts.

Rebuke no one, revile no one, not even those who live very wickedly.

Let yourself be persecuted, but do not persecute others.

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?

St Isaac the Syrian

Another hit for North Korean junkies

Nothing to Envy book coverI am somewhat ashamed to admit it, but I’m a junkie for anything about one of the last great communist countries: North Korea.

The shame comes because this curiosity is at the expense of people suffering (still) because food is so scarce. I’m fascinated that the father and son have held on to power so tightly for so long and control so much of the information in and out of the country. While walls crumble, and others march backwards, the Democratic People’s Republic of Korea (DPRK) still manages to keep its people at home and dependent upon their government for, well, everything.

Two recent books have provided a veritable bonanza of information for people curious about the country. The first, Nothing to Envy is the result of Barbara Demick‘s interviews and meetings with North Korean refugees. She turns their memories of life in the hermit kingdom and the accounts of their escape into a compelling narrative. It was the first time I’ve read anything from the point of view of someone who actually lived in the country and I’m glad I found it.

The second book, Pyongyang is a graphic novel written by a cartoonist who actually worked in the country. Before my kids checked this book out (I was ignorant of it till then), I wasn’t even aware that the country was trying to selling its people’s labor to foreign companies. The idea that they would do that seems to undermine the purity of their Juche ideal. Not that I really expect intellectual purity from them or anyone else.

Still, I just looked at the “Business in DPRK” page and their presentation seems straight out of 1984. Especially this part:

As opposed to other Asian countries, worker’s will not abandon their positions for higher salaries once they are trained.

Right. Because they are no higher salaries.

Shampoo Conspiracy

[photocommons file=”Shampoo_Aisle.jpg” width=”300″] Did you know there is a Shampoo conspiracy?

I didn’t until last week when Brandon Harris, a designer at Wikimedia, shared his hair care tips during a Reddit AMA.

This led someone to quote a bit of the Wikipedia article on Shampoo:

Shampoo has only been used with fervor since the 1970s[citation needed]. Before then, either regular soap was used a few times a month or, just after the early 20th century, shampoo was used only a few times a year. It was in the 1970s that shampoo use became prevalent. Ads featuring Farrah Fawcett and Christie Brinkley asserted that it was unhealthy not to shampoo several times a week.

I mentioned this to my dad, a long-time Prell user. He was surprised. This didn’t fit with his memory. He said that in 1963, when he was first married, he used Prell and Head and Shoulders. It looks like this is one of those times my father was setting trends. Fourteen years later, in 1977, the New York Times reported that those two shampoos were the most popular (according to a footnote in the Wikipedia article).

I think its impressive how little it takes to generates a controversy. The No poo wiki page is (like the first linked article in this blog post) filled with assertions with nothing to back them up. I would expect to see a controversy around articles like Creationism (and, indeed, Creationism’s talk page is filled with warnings about the proper place to debate the validity of the topic) but there is quite a lot of discussion on Shampoo’s talk page. I guess I shouldn’t be surprised that people become so impassioned about (what I consider to be) a prosaic topic.