Apr 052016
 

During a recently on-line rant about anti-abortion terrorists, I happened to trip over some statistics on the rate of mortality during childbirth (the “Maternity Mortality Rate”) from the WHO. And being the kind of person that statistics interest, I spent some time looking into them; indeed I got so interested I transcribed some of the raw figures to generate a pretty graph :-

mmr2

This obviously excludes many countries – what we could call the developing countries. The countries included (which you’ll have to peer closely in order to see – sorry about that) are all rich. At least relatively speaking.

Just look at the USA! Down with the also-rans amongst what could be called the relatively dysfunctional countries at the fringes of being considered “developed”. Now you could argue that there is something special about the reason why the USA doesn’t have a single-digit MMR like the overwhelming majority of developed countries. I can think of a few possibilities myself :-

  1. Perhaps the USA is the only country in the world to tell the truth about it’s actual MMR and all the other countries are lying. Perhaps. I am not going to argue there isn’t a bit of shady practices going on with the figures in some cases, but these figures are produced by statisticians and as an overall group statisticians don’t like lying about numbers. Yes there is the old saw about “lies, dammed lies, and statistics”, but the source of that distrust is the twisting that politicians apply to statistics to support their lies.
  2. Perhaps the USA didn’t read the instructions from the WHO properly about what kind of deaths to include in their returns and they’re including deaths that other countries wouldn’t include. But whilst I’ve not read the instructions from the WHO about this, I have read other instructions on statistics and they usually go into excruciating detail about what should and should not be included. It’s possible that the USA handed this little job over to a complete dumb-arse, but it doesn’t seem very likely.
  3. The WHO is anti-American and decided to inflate the figures. This is just laughable – the WHO isn’t going to risk getting called out by doing something so obvious even if it really was anti-American.

Sometimes the most obvious reason is the real reason – and here the most obvious reason is that the US health care system sucks.

There is additional evidence to show that – the WHO figures cover years other that 2013, and the US figures are consistently bad and getting worse.

But how can this be? The USA is one of the wealthiest countries in the world that spends a ridiculous percentage of it’s annual GDP on health care. It also produces many healthcare innovations and undoubtedly has improved maternal care at some point with some new technique. The really rather obvious (although it really needs to be tested) is that healthcare in the USA is divided into three.

There are those who have full insurance, and this group probably gets pretty good healthcare.

There are those who are covered by government schemes and this group probably gets reasonable healthcare.

And there are those who fall between the cracks – they’re not covered for various reasons – and their care is abysmal and probably limited to emergency care only. Which can sometimes be too late.

But when you come down to it, if you are pregnant it may be worth avoiding the USA until you’ve given birth. And if you’re already in the USA, it may be worth thinking about a long break somewhere where they have a healthcare system that doesn’t suck.

Mar 252016
 

Recently I have been seeing quite a lot of usage of random.org (to pick out winners of various kinds of competitions; and no I’m not a winner). The documentation on that site are reasonable with regard to pseudo-random number generators but are not quite correct with regard to the source of random numbers under Linux. And for non-cryptographic uses, the following is fine.

The use of random.org momentarily made me wonder how I would do the equivalent at the Unix (or Linux) command-line, and having used the command before, the shuf command came to mind. To be honest shuffling is not what I think of randomisation given how bad I am at shuffling cards, but despite the name, shuf does pretty well at randomising things :-

» seq 1 10 | shuf
4
5
8
7
2
1
10
9
6
3

The seq command generates a sequence from 1-10 as given. It turns out that shuf can do it itself :-

» shuf -i 1-10
7
3
5
6
9
10
8
1
4
2

The most common (relatively) use I have for shuf is to pick out a random line or two from a file. By using the -n option, shuf can do this. The following example makes use of an example file which contains a small number of first names :-

» shuf -n 1 first-names 
Julian
» shuf -n 1 first-names
Ian
» shuf -n 1 first-names
Craig

If you have just a small selection to make, you can provide the list on the command line with the -em option :-

» shuf -n 1 -e Male Female
Female

And that is pretty much all there is to it – a simple tool that does just one thing well.

damascus-unix-prompt

Mar 192016
 

As you may or may not know, Unicode is the standard for encoding text into ‘computer speak’. There have been many different encodings of characters (graphemes, and other symbols) into “computer speak” by different manufacturers; all of which were severely limited. Almost all of them included the normal Roman alphabet plus a variety of other symbols. Amongst other things, this had two main problems.

Firstly, it excludes large parts of the world that use other writing systems from using computers sensibly – computers are difficult enough to use (at least at first) without learning a whole new writing system. And even then storing a document by transliterating it is not ideal – you have changed the original and introduced another possible source of errors.

Secondly there is the problem of errors introduced into documents when moving them from one computer system to another – for example it was not unknown for a “#” to become a “£” (or very similarly, “£” will appear as “£”). Very much more extreme examples exist.

Of course because of the enormous number of symbols in Unicode, there is a great deal of fun to be had with Unicode – not infrequently poking fun at Unicode for including ridiculous symbols. And why not? There’s no harm in having a bit of fun :-

ɥʇıpǝɹǝɯ ǝʞıɯ

However it is worth pointing out that Unicode standards are a serious business and slipping in “fun” symbols is not likely to happen. Although I was not directly involved, I did help out one of the people who pushed for the inclusion of medieval Slavonic characters within the Unicode standard, and it is not a trivial process.

And now for some “fun” Unicode characters…

þ

The Thorn. The English letter that got away. Before the age of printing, English had an additional letter (I’m over-simplifying here) which was used instead of the digraph th, so words such as the would have been spelt þe. By the time that printing had arrived, the shape of the thorn letter was becoming more like a “y” and because the printers imported their equipment from countries that did not have a thorn, the printed books tended to use “y” instead of þ. Which is of course where we get “Ye olde Shoppe” from.

Of course it was confusing printing ye when we said þe (or the), so the printers settled on the.

So why is þ in Unicode? Because you cannot discuss the letter without including it, and perhaps more importantly cannot encode a historical document that used þ without an encoding for it.

☃ and probably ☕

Ah! The snowman (and the cup of coffee). What sense of fun allowed these symbols into the standard?

Well according to the Unicode standard, it is contained within a block of weather symbols so it was almost certainly contained within a TV station’s encoding standard for weather forecasts. And you cannot claim to be a universal standard for text encoding without including the symbols included in other encodings.

The interrobang. The punctuation symbol used (if rarely) for signalling both a question and an exclamation: What the bleep are you doing‽

Whilst not commonly used today, it was very commonly used in the 1960s and so there are many documents that need encoding that use this symbol.

☠, ⚠, ☢

These look like fun don’t they? They certainly do to me, but in fact they are international symbols for various dangers – poison (☠), warning (⚠) of a general nature, and radioactivity (☢). All pretty serious stuff; and you really don’t want those symbols garbled in a document.

This is a Thai “letter” and I picked it out because it’s made fun of elsewhere, but it stands for all the non-European symbols used in language.

It may look kind of funny, but it probably isn’t so much to someone who knows Thai. To put it another way, if you told me that we’re not going to include the “M” in a character encoding because it looks too silly, I’d be very, very annoyed (my name contains two of ’em).

And yes I can type all of the above and the following into a text terminal 😃

 

2016-03-19_1119