Wikipedia Templates
Today I was reading my Wikipedia Offline about the Japanese bullet trains. I was doing this because I had read an article that asked if the US would ever get high-speed rail. And it seems like Japan has had it for an awfully long time, so it's not like it's all that high tech anymore. Anyway, it quickly became obvious that I wasn't getting the whole article. Here is what I read:
The , also known as the bullet train, is a network of high-speed railway lines in Japan operated by four Japan Railways Group companies. Starting with the Tōkaidō Shinkansen in 1964, the now long network has expanded to link most major cities on the islands of Honshū and Kyūshū at speeds up to . Test runs have reached for conventional rail in 1996, and up to a world record for maglev trainsets in 2003.
Here is the original article, which has a lot more facts in it, including the name of the train, the speed of the train, and the length of the rail lines:
The Shinkansen (新幹線?, new main line), also known as the bullet train, is a network of high-speed railway lines in Japan operated by four Japan Railways Group companies. Starting with the 210 km/h (130 mph) Tōkaidō Shinkansen in 1964, the now 2,459 km (1,528 mi) long network has expanded to link most major cities on the islands of Honshū and Kyūshū at speeds up to 300 km/h (186 mph). Test runs have reached 443 km/h (275 mph) for conventional rail in 1996, and up to a world record 581 km/h (361 mph) for maglev trainsets in 2003.
I wrote to the support e-mail address of the company (Avocado Hills Software) that makes Wikipedia Offline to let them know what was going on and ask that it be fixed. Much to my surprise, I got an answer back in six minutes. I figured it must be an auto-response. No, it was a detailed reply from the developer himself:
Hi Ted,Excellent observation. I can explain this.
Something in the curly braces, {{}}, is called a template. There are two templates in your example, "Nihongo" and "convert" template. Due to the lack of foresight of its creators, Wikipedia has thousands of templates. Each template has special rules. For instance, one of the convert templates means: convert 2459 km to miles and abbreviate. Every rule for every template would have to be programmed by me, by hand in order to display everything. This simply isn't feasible. I'm trying to get the most common templates done.
As a result, if the app doesn't know how to handle the template, it doesn't show it. More exactly, I didnt include it in the database that you download to a) save space, and b) prevent any unexpected behavior. I'm still pondering the ideal way to handle this as missing numbers is pretty obstructive to reading.
What do you think?
Wow. Well, at least he is working on it. I knew Wikipedia was doing something weird with their tags because I had taken a look at the article source text to see what was going on. Here is the source for that paragraph:
The {{Nihongo|'''''Shinkansen'''''|新幹線||''new main line''}}, also known as ''the bullet train'', is a network of [[high-speed rail]]way lines in Japan operated by four [[Japan Railways Group]] companies. Starting with the {{convert|210|km/h|mph|abbr=on}} [[Tōkaidō Shinkansen]] in 1964, the now {{convert|2459|km|mi|abbr=on}} long network has expanded to link most major cities on the islands of [[Honshū]] and [[Kyūshū]] at speeds up to {{convert|300|km/h|mph|0|abbr=on}}. Test runs have reached {{convert|443|km/h|mph|abbr=on}} for conventional rail in 1996, and up to a [[Land speed record for railed vehicles|world record]] {{convert|581|km/h|mph|abbr=on}} for [[maglev train|maglev]] trainsets in 2003.
I wrote back and said it looks like an easy fix for the units at least because if you find {{convert you can just take the value after the | character, add a space, and then take the value after the next | character to get the units and don't even worry about converting. Hopefully he will get this in the next update. Before I could even send my response, he had written another response:
I'd also like to add that as of the next version all other wiki markup, including tables and mathematical formulas, will be supported.Templates are a problem. If you go to this page: http://en.wikipedia.org/wiki/Wikipedia:List_of_templates_by_usage
you'll see a list of templates.It's a huge mess. Some of these templates are even nested -- templates use templates, which use other templates. I just can't feasible support all of them. What's worse is that my app is also used by people in Europe. Well, in the German version of wikipedia, the templates have different names (the names of the templates are in German!). This compounds the logistical nightmare.
So I hope that gives you an inside peak into why things are the way they are. I assure you it's not out of laziness or lack of desire!
Evan
Here is a description of Wikipedia's Convert Template.
Another weird thing that happened today that I wrote to him about in a separate e-mail was an article about the Gray Catbird because I was looking up why people say that you are "sitting in the catbird seat" if you are in a strong position. Here is what I read in that article:
This species is named for its cat-like call. Like many members of the Mimidae (most famously mockingbirds), it also mimics the songs of other birds, as well as those of Hylidae (tree frogs), and even mechanical sounds. Because of its well-developed songbird syrinx, it is able to make two sounds at the samoyed by fire in 1534 and rebuilt as a stables, keeping its former name when it acquired this new function. On old maps of Westminster, such as those by Ralph Agas (also known as Aggas), the Mews can be seen extending back onto the site of today's Leicester Square.
Somehow the article morphed into one about the Royal Mews (oddly, the Royal Mews article was unaffected). Evan writes back:
Now that is very interesting!!!I have a really good lead on what might cause the problem. I'll investigate.
BTW, I really appreciate your feedback. Users like yourself have really transformed the app and made it a lot better! Look for another update coming in a week or two.
Evan
Any software is going to have bugs, especially when you are converting a very large and complicated bunch of work that thousands of other people have written, but it's great that developers like this are trying to solve the problem and write back so quickly when a problem is pointed out.