Sunday, 25 October 2015

How much do countries spend on education, per capita?

During the recent #FeesMustFall campaign here in South Africa, I wanted to know how much we spend on education, per head, and to compare that figure with other countries' spending. Wikipedia has a list of spending as a percentage of GDP, and a list of countries by GDP per capita, but I didn't find one of spending on education, per capita.

Multiplying the values from each list (I took the UN values for GDP) gave me the result I wanted. I did this with a little Perl script that started off as an attempted one-liner at the shell prompt, but turned out to outgrow that space.

Some highlights from the full list:

1 Monaco: 14216.914 2 Norway: 7043.848 3 Denmark: 4673.838 4 Switzerland: 4412.408 5 Sweden: 3997.356 6 Qatar: 3827.432 ... 12 United States: 2881.56 13 Trinidad and Tobago: 2845.44 ... 21 United Kingdom: 2333.265 22 Israel: 2224.536 23 Germany: 2029.095 24 Kuwait: 1983.524 ... 39 Argentina: 959.4 40 Cuba: 949.96 41 Estonia: 927.744 42 Maldives: 920.64 43 Suriname: 884.34 44 Greece: 870.72 ... 54 Poland: 674.24 55 Botswana: 650.768 56 Slovakia: 645.408 57 Costa Rica: 641.655 58 Croatia: 620.54 59 Brazil: 571.149 ... 69 Gabon: 385.738 70 Kazakhstan: 382.2 71 Romania: 380.679 72 Colombia: 375.648 73 South Africa: 374.544 74 Antigua and Barbuda: 372.33 75 Namibia: 349.568 ... 81 Mauritius: 306.976 82 Tunisia: 302.673 83 Iran: 299.061 ... 97 Swaziland: 219.882 (go go go King Mswati! Maybe if you reduce that a bit more you can have a few more virgins!) ... 115 Lesotho: 133.3 ... 136 Cameroon: 49.173 137 India: 47.988 138 Zimbabwe: 43.838 (wow Bob, so uplifting of your people - but at least you have your land, right?) ... 167 Somalia: 0.532
It's a bit depressing. SA's GDP per capita is close to Cuba's, but they significantly outspend us on education. Botswana too, to a lesser degree. I guess we're too busy bailing out delinquent state-owned enterprises that were de rigueur last century. So we "can't afford" to spend more on education. And a fleet of nuclear power stations is just so much sexier than a more productive workforce, right?

Friday, 17 July 2015

My phone is dead, but ADSL is (barely) up

Three weeks ago I got burgled, and the bastards cut my phone line. My permanently temporary fix involved stripping the wire ends and twisting corresponding ends together. It had also rained plenty the two days before the burglary, and usually rain has meant phone line problems. So it was this time; the phone worked a day or two after my repairs, then it died for a few days. Then it worked for another day or two, but then died again, and has stayed that way for the last week plus change. There is nothing on the line as far as my telephone is concerned. No dial tone, no hum, no buzzing, no hiss. If I still had a multimeter I could measure the on-hook voltage between tip and ring, but I now don't, so I can't. Just to be sure I jury-rigged a 1mA meter with a 47kΩ resistor in series to try and measure the voltage, and again, nothing there. The needle didn't even move.

I'm so glad my ADSL (just about) works though. I really depend on ADSL more than on my telephone, although especially now after the burglary I would have liked to be able to call people to make fire under their arses (I'm looking at you, Hollard / Ooba / 1000 other "partners", it's been three weeks and I've had an army of people come and look at the damage, but the only doing that's happened is what I've done myself).

Better watch that ADSL then, since it's important. So I wrote a script to monitor the ADSL modem's stats. Just some screen-scraping, although I'm sure there's some neat way to do it with SNMP. Add some Gnuplot and I get a nice graph of SNR margins, up and downstream. Red = upstream margin, green = upstream power, the others for downstream.