Afterword

ThimphuTech was the first technology blog in Bhutan. We started writing it in 2009, just as broadband and mobile internet started to take off. (Although internet in Bhutan was launched in 1999, it was either super-slow or super-expensive, and was only used by a selected few).

In the blog, we wrote about technology and food, but also about plenty of other stuff. The blog became popular and influential in Bhutan. A companion bi-weekly column -- Ask Boaz -- was published for many years in the Kuensel, Bhutan's national newspaper. (The complete Kuensel columns are available as an ebook, Blogging with Dragons).

We stopped updating the blog when we left Bhutan in 2014, but the information within the posts can still prove useful, and thus we decided to keep it online.

We thank all our readers.
Tashi Delek,
Boaz & Galit.

Saturday, May 4, 2013

The Proliferation of a Poor Error

A few weeks ago The Bhutanese mis-calculated the 5-year 2008–2012 inflation rate.

In today's Kuensel, the error was repeated again ("How valid is the claim to have halved poverty?") . The anonymous writer — Layman on kuenselonline.com — quoted the wrongly calculated number, 39.6%. The correct figure is 46.1%, more than 6% higher.

While knowledge can proliferate quickly, so can errors. The media should take extra care when reporting numbers that can have great implications on policy, especially when copying articles from online forums that are written by anonymous contributors (a questionable practice by itself).

Wednesday, May 1, 2013

How The Bhutanese miscalculated inflation

Every year prices increase in Bhutan. This is inflation. Here are the inflation figures from the last 5 years, as taken from an article on Bhutan's inflation in The Bhutanese.
  • 2008: 8.31%
  • 2009: 4.41%
  • 2010: 7.02 % 
  • 2011: 8.86% 
  • 2012: 10.93%.
The inflation from 2008 to 2012 was 46.1%. According to the article, however, it was 39.5%. The reporter calculated that number by wrongly adding the percentages. This is a mistake.

Imagine that the annual inflation is 20%. If one kg of ema costs Nu 100, the next year the price inflates to Nu 120. And the next year? 20% on top of Nu 120, which is Nu 144. The total inflation in two years was 44%, not 40%.

If you do the math right, you'll end up with a 5-year cumulative inflation of 46.1%, not 39.5%.

Other figures in the story are also misleading. Hopefully the paper will publish a revised article with the correct numbers.

An Even Cheaper KA-Lite + Kiwix Wireless Server

Our recent post about the $99 Khan Academy wireless server made quite a splash, leading to mentions on the official Raspberry Pi blog, comments by the good folks of KA-Lite, and then a few other places.

Another major resource for education is Wikipedia. The most common software for serving offline Wikipedia articles is Kiwix. We recently put KA-Lite, together with Kiwix and other educational resources, on a single Raspberry Pi. We call this project Sherig-in-a-Box. To read more about this initiative (and find out what Sherig means), check out our project page.

While $99 is cheap enough (about Nu 5,300), we can make our box even more affordable. In our original server, we used the Raspberry Pi Model B, which costs $35. Since then, Model A became available. Model A costs $25, which is $10 less than the Model B. Model A lacks the Ethernet port and has only one USB port instead of two, as well as only half the memory (256 MB vs. 512 MB). If you only want to run a wireless server without a wire-line (Ethernet) option, then model A should suffice. Less memory, however, will translate to fewer concurrent clients and possibly sluggish performance.

To reduce the cost even further, we can use a lower-capacity SD Card. In our original prototype, we used a 64 GB card to hold all of KA-Lite's 4,000+ videos as well as a Kiwix database. The 64 GB SD card, which runs at about $50, is the most expensive component of our server. Many schools, however, will not need all 4,000 videos. A primary school, for example, will be happy with a small subset that does not include the high-school-level-and-above material.

In a blog post yesterday, KA-Lite wrote about running a configuration similar to ours, but without the Wikipedia component. The post mentioned that the Pi was able to serve 35 simultaneous wireless users. Assuming users are all concurrently streaming MP4 videos, this is impressive, especially noting that a few of the KA-Lite videos are encoded at around 2 Mbit/sec.

This brings us to a further cost reduction option: Many of KA-Lite's videos are high-resolution (1280x720) with CD-quality audio (44.1 KHz, stereo). While a few of the videos do require high-resolution (for example, a video clip displaying crowded Excel spreadsheets), many others do not. Many low-cost smartphones and tablets will not support such resolutions anyway (e.g., the Indian Aakash low-cost tablet has a 800x480 screen). Thus, transcoding the videos into lower resolution formats and reducing the unnecessarily-high audio quality will result in lower space requirements, as well as lower streaming rate. Serving low-resolution videos will reduce the required WiFi bandwidth and lower the demand on the Pi's CPU, thereby increasing the number of clients that can be served concurrently. Hopefully, KA-Lite will provide a low-resolution video compilation.

A quick back-of-the-envelope calculation shows a few possible configurations of low-cost servers, starting at around $48.

HardwareSoftwareTotal Cost (US)
Raspberry PiSD Card
Class 10
KiwixKA-Lite(§) 
Model A
8 GB
Wikipedia for Schools~ 250 videos
~ $48
Model A
16 GB
Wikipedia for Schools~ 800 videos
~ $52
Model A
32 GB
Wikipedia for Schools~ 1300 videos
~ $64
Model A
64 GB
Wikipedia for Schools4000+ videos
~ $86
(§)Approximate number; assumes existing video encoding. Lower-bit-rate encoding will increase the number of videos.



Using a Model B Raspberry Pi will add the capability for a wired (Ethernet) connection, as well as increased performance. It will also add $10 to the bill.

P.S.: The cost of hardware for equipping all public schools in Bhutan with the most expensive Sherig-in-a-Box Raspberry Pi is around $52,000, or Nu 28 lakh.

Saturday, April 27, 2013

Funny Photos (K2 #61)

Question
I noticed that in some local magazines and even websites the photos sometimes look stretched or squashed. Why does this happen? How to fix it?
— J. N., Thimphu

Answer
Dear J. N.,

Indeed, I’ve seen those photos too. They remind me of the special mirrors placed in clothing shops’ dressing rooms, designed to make you “look” extra thin in that dress. Or funhouse mirrors in amusement parks that make you look extra short or extremely tall.

Let’s bite our teeth into the issue: each photo has a certain aspect ratio, which is the ratio of the width of the photo to its height. Sounds complicated? Not really. For example, a 4”x6” photo of cute puppies has an aspect ratio of 4” divided by 6”, or 2:3 (two-thirds). Computer images also have aspect ratios. A photo which is 1024 pixels (or dots) wide, and 768 pixels high, has an aspect ratio of 1024 divided by 768, or 4:3. A perfectly-square image has an aspect ratio of 1:1, since the height and the width are equal. CD covers, by the way, are square images. 

Time is Money

Many people no longer use their fixed line at home, but it is still required if you have a broadband Internet connection. (A fixed line is useful for emergencies as well). If you feel that the monthly hassle of paying the Nu 25 maintenance fee is a waste of time, there’s a solution. Bhutan Telecom allows you to prepay for the line. So next time, ask the person at the counter to make an advance payment of Nu 150, and you won’t need to come again for half a year.
Why do you see these distorted images in some publications? The distortion happens when a photo’s aspect ratio is changed. The graphic editor decided to increase (or decrease) the width or height of the photo, but without a corresponding change in the other dimension. Here’s an example: say that you want to design a beautiful CD cover (remember, it’s a square) using a stunning landscape photo taken with a digital camera – one in which the width is larger than the height. You open the photo in a photo-editing software, such as Photoshop, Picasa, or Microsoft Office Picture Manager, and start decreasing the width until the photo is a perfect square. Notice that while decreasing the width, you did not change the height at all. The photo can now fit nicely as a CD cover, but you have squashed the image and it doesn't look very professional. 

In order to avoid a distorted photo, never resize only the width or only the height. You should resize them together. Some software packages allow you to lock the aspect ratio of a photo when resizing; you will want to use that option. And if the photo does not fit exactly into the space allocated for it - the trick it to crop (remove) unnecessary parts until it fits.

Readers are encouraged to submit technology-related questions to boaz@thimphutech.com

Thursday, April 25, 2013

Visualize the NC elections results

This week's National Council elections results were reported in this form or the other by the media and by the Election Committee of Bhutan. Most of the results were reported one dzongkhag at a time, which made it difficult to see the overall picture. Using the numbers from the ECB's report (which were presented in one big table), I created two dashboards, each telling a story. One about voter percentage and the other about winner share of votes.

Dashboard 1: Voter Participation by Dzongkhag

I computed the per-dzongkhag percentage of votes (= total votes for all candidates / registered voters). Some dzongkhags clearly stand out! To focus on a particular dzongkhag, click on the map, bar-chart or scatter plot.


Dashboard 2: Winner's Share of Votes

The map shows the % of votes that the winner received from the total number of votes in his dzongkhag. Some winners received a very large majority, while others did not. We'd expect that the share would be affected by the number of candidates: the more candidates, the lower the winner's share. While this is the case in most dzongkhags, notice an interesting exception: Samtse's Sangay Khandu won almost 49% of the votes despite having the largest number of competing candidates. Also, in Dagana and Trashigang, which had a single contestant, each received more than 90% ("yes") votes, which is much higher than even dzongkhags with two contestants.

These dashboards were created with the free Tableau Public tool. It would be great to see the media and other organizations create similar visualizations and interactive dashboards for the upcoming elections.

MoH's website needs a computer doctor

The website of the Ministry of Health was hacked recently by "Palestina Hacker". The website is currently not loading. Hacking government websites can become a serious threat to a country's security.


Bhutan's domain registration website hacked

DrukNet's Network Information Center (NIC), www.nic.bt, was recently hacked. The website is an important server, displaying information about all .bt domains. Internal databases hold crucial information, including domain name ownership.

We are hoping that DrukNet's Domain Name Server (DNS) security was not breached. DNS is the service that translates domain names (such as www.health.gov.bt) to Internet numerical address (202.144.157.196). Hacking Bhutan's DNS servers could mean a very serious security problem.