28 Sep 2012

How to correctly format currency in South Africa?

Recently on a Windows Phone project I got a bug raised that I was formatting the currency for South Africa incorrectly (in particular the use of a comma to separate the Rands & cents – i.e. the decimal mark) which sparked off an investigation into what is the correct way to format the currency in the country I live in.

tl;dr: The comma is the decimal mark for South Africa.

As I am a developer my first stops were Microsoft & IBM who both have guides on this that states the decimal mark for South Africa is a comma. Wikipedia also states that officially the comma is has been adopted as the decimal mark.

Not happy with that vague “official” - I dug further to try and find a more official source which lead me the University of Johannesburg (UJ) style guide, which is meant to assist students with the correct language style to use in their documents. The very interesting bit is in section 6 (bold & underline added by me):

Note the spaces and commas in the following: 3 000 (or 3000); 3 500; 2 354 701; R5,87. The so-called Continental System (also used in South Africa) requires that the decimal point be replaced by a comma. However, it is not always possible to do this, since many computer programs require a decimal point for calculations.

So UJ agrees with the usage of the comma – but for me this also gave me a clue to find more info in something called the Continental System… which didn’t lead anywhere.

I then happened to find the 2012 Winter School textbox for Grade 10 Maths Literacy which also states:

South Africa officially uses a decimal comma, with a space as thousands separators.
1 450 789,32 = one million; four hundred thousand; fifty thousand; zero thousands;  seven hundreds; eighty; nine; three tenths; two hundredths.

Finally I found some official documentation on the subject, first up Government Editorial Style Guide which states – still not saying it is “official” as Wikipedia said:

Write decimal and negative numbers as numerals: 3,3 and –4. Use the decimal comma, not the decimal point: 17,4 million.

Use a space, not commas, to indicate thousands: 3 000, 20 000.

However the best source I found was a document titled The South African measurement system and its origin by EE Publishers which has the following:

Finally, it is worth noting that, in Table 1, the grouping of thousands (in threes) and the use of the decimal comma, as opposed to the decimal point, was effected, to be in accordance with the applicable legislation of South Africa: “where the magnitude of a quantity is expressed in terms of a unit, a comma on the line is used as the decimal sign in the numerical part of the expression and the digits are separated into groups of three digits on either side of the comma by means of spaces…” [2]. The exception was made, for land registration purposes, by the then Director-General of Surveys, who judged, in his Circular No. 2 of 1971: “it has been decided to abandon the writing of areas, such as 45 236 1 ha with a space after the 3rd decimal figure and to advocate that as in the past the four figures be grouped together viz. 45 2361 ha”. Here, a space was left between the number and the symbol of a unit, as required [2]. These rules were highlighted in an old Land Survey Act No. 9 of 1927 (Regulation 24.1), but an amended Land Survey Act No. 8 of 1997 does not contain such information.

English-speaking countries (plus China, India and Japan) use the decimal point. There seems to be a general tendency to formally declare its use worldwide and the International Organisation for Standardization, ISO, also tends towards using the decimal point over the decimal comma. In view
of the South African law, however, the comma shall still be employed in South Africa as “the only recognised decimal indicator for all numbers” [3].


[1] DR Hendrikz: South African Units of Length and Area, Department of Lands, Trigonometrical Survey, Special Publication No. 2, 1944.
[2] Measuring Units and National Measuring Standards Act, 1973 (Act No. 76 of 1973), Government Gazette No. 4326, 5 July 1974.
[3] The International Metric System (SI), Guide to the use of the SI in South Africa, The Council of the South African Bureau of Standards, M 33a, 1992
[4] Measurement Units and Measurement Standards Act, 2006 (Act No. 18 of 2006), Government Gazette No. 29752, 28 March 2007.
[5] T Zakiewicz: “Units of Length Measure & Geodetic Standards at the Cape, 1813-1912”, History of Surveying and Land Tenure, Collected Papers,
Vol. 2, The Institute of Professional Land Surveyors & Geomaticians of the Western Cape, May 2004.

WOW! That gives the official acts and a great depth of knowledge into the subject matter and for me answers it once and for all – we use a comma!

The two final locations I found in my searches provided some interesting information on the comma as a decimal mark in general (i.e. not specific to South Africa). First up is the Wikipedia page for International System of Units which states

The 10th resolution of CGPM in 2003 declared that "the symbol for the decimal marker shall be either the point on the line or the comma on the line." In practice, the decimal point is used in English-speaking countries and most of Asia, and the comma in most of Latin America and in continental European languages.

Secondly is a forum answer about the use of the comma:

Sender: Franck Menuge
Subject: comma as decimal separator

Could somebody tell me the origin of the use of a 'comma' as a decimal separator and of a 'dot' for thousands in the French numeric system, ex.1.234,56 Is it only used in France or in other european coutries? Why is it different in the UK?

Many thanks,

Hi Frank,

The comma as a decimal separator is used in several continental European countries, including Germany, Austria, Switzerland, Belgium, Luxembourg, and - we think - also Italy and the Netherlands.
   The notational convention of using a punctuation mark to separate the fractional part of a number seems to have begun with John Napier,a Scot, in his book "Descriptio" published in 1616. In this book he proposed using a decimal point (period) to separate the whole number part from the decimal part of a number. In the following year, 1617, in his book "Rhabdologia" he proposed a point or a comma as the decimal sepatatrix. In his writing he used both. To quote Cajori, "Napier vacillated between period and comma; mathematicians have been vacillating in this matter ever since", Florin Cajori, "A History of Mathematical Notation", 1974 page 324. By 1619 the decimal point had become standard in England.
   In Earliest Uses of Mathematical Symbols under Grouping the claim is made that the modern system of separating a numeral into groups of 3 with commas first appeared in 1795 in the article "Numeration" in "Mathematical and Philosophical Dictionary" by Hutton. Again the reference is from Cajori.
   The confusion doesn't stop there. In the school system in North Amarica teachers have started to use a space rather than a comma to separate the digits in a numeral into groups of three. Thus the number thirty-one thousand three hundred twenty four and six tenths is written 31 324.6. One last point. Notice that the decimal point in the number 31 324.6 in on the line were it is our understanding that in the UK you would write this number with the decimal point floating above the line. In North America the period floating above the line indicates multiplication, so

Patrick and Penny

12 Sep 2012

SMS Subscription Service: the scam & how I got my money back

This post is a departure from my usual technology filled posts, it is rather a personal story that affects many people that I think is worth sharing my experience. It is about these SMS subscription services where people signup for a service, and get content via SMS and then get billed monthly for it via there cellphone provider. I was signed up without my knowledge, billed and this is how I found out about this scam industry and got my money back from them.

The Story

It starts

The first indication I had was the odd appearance of “Content Charge” on my July invoice from MTN (my service provider). MTN uses such complicated names for services that it could mean anything but something said I should find out what it is. I called MTN and was told it was for a subscription service! I told the call centre agent that I had never signed up and wanted my money back. Unfortunately MTN couldn’t help me – all they did was cancel it that day and give me the details of who to contact about this.


The interesting thing about this is that to run a subscription service in South Africa you must be a member of WASPA, Wireless Application Service Providers' Association. WASPA has excellent rules about what is allowed and what is not allowed and the company MTN told me to call about a refund is thus a WASPA member – that company is called Opera Interactive. (I am not linking to these companies not because I do not want you to know exactly who they are, but I do not want to give them any search engine love).

I phoned and spoke to their Opera’s call centre (by now the 25th July) and they told me they could not help – as they only do the billing. All they can do is cancel the service and give me the actual companies details. That is right, Opera is not the company they are a middle man and, from what I understand, they let non-WASPA members “pretend” to be them, handle the interaction for billing with the service providers and take a cut of the profit!

Opera then told me to contact Mobmatic who were incredibly rude & told me to email as they do not help on the phone with refunds because, while they have a South African phone number, they are based on the UK - eventually they just hung up up me after I asked to speak to a manager. So I emailed then and then immediately logged a complaint with WASPA.

Lies, damn Lies

Nothing until the 31st July when Mobmatic emailed me a document (below) as proof I had signed up and told me that they wouldn’t refund me. So I looked over it and checked the details.

  1. Checked my SMS’s on my phone to see if there were any @ the dates/time specified. There was only one the 3rd July one, but considering I have never signed up I ignored as it seemed like a scam – however the key confirmation signups were not there.
  2. The phone model & even the browser string features did not match my phone.

I responded again with that info and asked for a refund.


Then nothing, no one responding until the 2nd August when WASPA said it had proof of me signing up from a company called Sprint (note: not Mobmatic), had asked for the service to be cancelled and then closed the case. Despite me asking for a refund, they ignored it – it really felt like WASPA had an automated system. I contacted them back and said I suspected the the “proof” was the same as sent to me and outlined the error in the “proof” and asked for a refund.

The scary part of the WASPA reply was “Since your unsubscribe request was not resolved using the informal process,” – informal?! What is informal about logging requests, getting reference numbers and so on. Just leads more proof that WASPA does it in an automated process.

WASPA contact Sprint again with the details I sent them and told them they had to provide a significant data in their response of they would have to go before an adjudicator.


The fight back

Oddly within 3 days of this I was phoned and offered a full refund and told I would be emailed and I could respond with my details. I got the email the next day (below) and it is almost what they said, except for a clause to protect themselves of any legal action if I accepted the refund.


I gave them the details and got my refund! WASPA contacted me a week later to confirm and I held responding for a further 3 days until the money actually arrived in my account (10 full days after I had spoken to them – what is this the 80’s). I told WASPA it is sorted out but urged them to launch an investigation into the companies and structures. That all was a few weeks ago and nothing has happened since.

Final Thoughts

Hopefully this shows you that it is possible to fight these people who are screwing the man in the street around and gives you some idea what to do. The short list of things to remember is:

  • Your mobile provider can’t do much – so do not fight with them. Be kind, and get them on your side so you can get as much info as possible.
  • Keep a log of all interactions, get names, reference numbers, times etc…
  • Once you have tried the direct route with the companies, contact WASPA immediately. While they seem to be a tick the check box type organisation, you will need their help too.
  • When you get “proof” go through it in detail. I would have likely just agreed with them that maybe it was a mistake, but the phone model was wrong & the ISP suspicious, gave me confidence that I was correct. These are not simple things to check, so maybe get your favourite geek to help.
  • Do not give up – if you are right there is plenty of routes. From speaking to MTN during this, if WASPA fails you can still escalate to the consumer commission which does give you a lot of power to fight them.

While WASPA is a good idea, it seems they are underfunded and employing everything they can to automate the system and deal with the load as much as possible. It is clear in the requirement you need a double opt-in, however the opt-in system does not need to be on the device and thus can be forged – this is just a sign that while the good idea is there, they are not able to keep up to date with techniques that bad companies are using to steal money.

Hopefully you never have this happen to you, and if you do I hope this helps you fight these scammers!

07 Aug 2012

Outlook 2013 Preview: The Case Of The Missing Email

Office 2013 is available in preview and being the fan boy researcher I am, I am running it. In the last week I have had an odd problem – it started when someone told me they had emailed me, but I never got it. I logged a call with the IT desk at work and they were able to find it in OWA (Outlook Web Access), and then suddenly I had it in Outlook too. I am over worked and tired maybe I just missed it – that was the thought I had, so I left it and went on believing I need a holiday.

Then yesterday I was in OWA and saw I had 25 unread while Outlook had 0 – I AM NOT CRAZY.


I logged a call again with the IT desk and got some awesome feedback – it is still too early to say it is fixed but I will update this post as I know more.


There is a patch already for Outlook 2013 available at: http://support.microsoft.com/kb/2737132

Not sure what it exactly does, but I am sure it is worth applying (blind faith that patches bring magic is a key requirement of a fan boy). It is worth nothing that Windows Update is not pushing this out – so you must manually get it.

Other sources of Help

There is a FANTASTIC page with 29 common issues for Outlook 2013 that is worth reading: http://www.howto-outlook.com/faq/outlook2013newandchanged.htm

One of those on their is about caching, which leads to…

Caching in Outlook 2013 is very different

Prior to 2013 Outlook would grab all the mail from the server and store it locally in an OST file giving you a locally cached copy of all the mail. Starting with Outlook 2013 that has changed, by default only the last 12 months are cached.

To change this to work like it used to:

Click File, then Account Settings ,then Account Settings…


Next double click on your Exchange account.


Here you’ll find a “Mail to keep offline” slider.


Move that all of the way to the right to select "ALL" and restart your Outlook.


Finally wait for it to update.


It is a preview

The last thing is a personal one – this is a preview, it is not promised to work. I have been so spoilt by great releases from Microsoft in the preview stages (Windows 8 & Visual Studio 2012) that I forget that it is a preview and could be broken. It is important to always have a backup & a way to verify it is working. For me this means I will be checking with OWA daily now.

19 Jun 2012

Who can see my tweets to a friend?

A while ago I wrote a post about an interesting Twitter behaviour – if you start a tweet with an @<username> only people who follow you & that person can see the tweet (if you unsure see the post which explains it). The question I had today was to find out who is in that list – or put who follows us both on Twitter?

Oddly, I could not find anything (besides some tools that cost money) to do this?! So I built my own awesome little tester you can use below:

First username
Second username

    For the developers among you who want to see how this all works? Check it out on bitbucket: https://bitbucket.org/rmaclean/twittercoalesce

    Known issues:

    • My website uses an older version of jQuery, and I use a newer one in this code. If the loading gives an error or gets stuck on the screen, try refreshing the page (seems to solve it).
    • If you have too many people shared between the two names - it will break. I am looking into how to solve this. If this happens - loading will get stuck :|
    • Twitter limits clients to 150 calls per hour. If the rate limit is exceeded the loading will get stuck.
    04 Apr 2012

    Why the harder you work to prove to Microsoft you know better, the less chance it will ever happen

    Disclaimer: I do not work for Microsoft and these are my views based on discussions with multiple people at Microsoft which I have stitched together – maybe I misunderstood everyone and this is all wrong too. All examples I use are my own. I am no lawyer – check with a lawyer for legal & license advice.

    tl;dr: Microsoft is really worried about being sued and thus is risk adverse to “stuff from the internet”. It is better to tell Microsoft what you dislike, not how to fix it. Learn about licensing content.

    Paper Work

    A few years ago I went on an amazing trip to work with Microsoft but before I could do that I needed to sign not only a NDA, but also waivers for the work I would do – which makes sense. I did it for free and Microsoft didn’t want me to sue them for money later for my work. Not only that I had to sign them, my employer had to do the exact same thing. Once again because I work for someone else who could claim money from Microsoft and Microsoft lawyers had deemed that a risk and needed to be protected.

    This involved a lot of time and money, it is VERY expensive to have lawyers review documents from other lawyers and the DHL the originals half way round the world, but it is far cheaper than being sued.

    I know that neither myself of BBD would sue Microsoft for the work I did, but that doesn’t still the hearts of those lawyers who live in a world of ugly mean liars that will cheat the system if it was easy and good. I wish it wasn’t this way but some wishes don’t happen.

    The Users Voice

    A while back Microsoft started spinning up loads of uservoice.com (UV) sites to collect feedback and I believe they are successful in getting some things changed. There is an odd issue I see on UV especially with how Microsoft deals with it, that being as technology advanced users & developers we are taught to give the most detail as possible – really there is nothing like too much detail… however in UV, it seems that Microsoft ignores them and favours those who do and give very little. A great example of this, is in Visual Studio land where we can compare the current top two ideas: this short idea which is “under review”


    versus to this guy who has pages of details and even as taking the design and proving a lot of it could work – for all his hard work, nothing.


    WTF?! Microsoft doesn’t listen to me

    If you read both suggestions they seem to say the same thing except the lazy guys one got the reward, right? No – it is more fundamental than that. The first one is really just discussing the what & why the VS colour change that is an issue, the second piece of feedback though is discussing how to fix it. The problem for Microsoft is if they take the second guys stuff, a person who hasn’t signed a waiver, the how guy has a legal ability to sue Microsoft for the money they owe him for work/royalties etc… And Microsoft legal won’t allow that to happen because that is their job, to protect Microsoft legal issues.

    This is not a complaint about legal, I am sure they are nice people that are just doing their job and it is annoying their job and my wishes do not align...

    The thing about taking the what feedback is Microsoft is pretty safe in taking and improving VS in anyway they see fit and that is why the what & why is under review and not the how.

    Licensing & Public Domain

    The next that will be brought up is that this is work in the public domain and thus “free”… wrong. Public domain work is more a legal trap than anything, and there is so many steps that you need to jump through to get access to using that “free” work that often it is easier to redo it yourself. This is why ANYTHING you do should have a license, even if you want to just give it away and never see it again or if you want someone like Microsoft to be able to use it.

    For software check out a good open source license, such as BSD 3-clause which basically says do what you like with my work and I promise I won't sue you except if you use me as an endorsement for your product which contains my work. For non-code items,  like art, music or blog posts have a look at the creative commons licenses.

    Microsoft can fix this too

    Microsoft could reach out to people with good ideas and get them to sign waivers (WAY too much work and also maybe risky after the work is provided), but better would be to adopt an approach like StackExchange (SE) does. SE states if you provide feedback on their sites it is creative commons.

    Microsoft could do the same and even put in a waiver clause on UV, I don’t know if UV allows for this, but Microsoft is big enough to get it done. It doesn’t solve great ideas that are posted elsewhere, those still required YOU to take the time to learn a little about licensing, public domain and so on and take the right steps so we can ALL benefit… not just the lawyers who get paid to say no.

    30 Mar 2012

    South African ID Numbers: The racial identifier flag


    In a previous post on what makes up an ID number I mention that

    The second last number used to be a racial identifier but now means nothing.

    But I never went into the topic so lets dive into the options – today it is for almost everyone 08 (I suspect a 09 or two may be floating around) but in the “bad old days” there was a variety of options:

    Population Group S.A. Citizen Non-S.A. Citizen
    White 00 10
    Cape Coloured 01 11
    Malay 02 12
    Griqua 03 13
    Chinese 04 14
    Indian 05 15
    Other Asian 06 16
    Other Coloured 07 17

    For my non-South African readers the use of Coloured as a group here is not the same as the American racial slur, in South Africa we have a population group called Coloured: http://en.wikipedia.org/wiki/Coloured

    How did we change from the old to the new?

    So what happened to those bits as we do not have them now? In 1986 there was the introduction of a new law: Identification Act no 72, which caused the law that made the classification (and a horrible concept where every black person had to carry a “Pass Book”) repelled.

    So over the course of 1986 and 1987 everyone in South Africa was issued a new ID number and somewhere inside the government there is a database that maps old ID numbers to new ones for people born before 1986! I can’t remember what this was process was like, since I was about 4 years old at this point. This means though I have a different number on my birth certificate to what I use now!

    09 Feb 2012

    The MVP award

    WP_000575Being a MVP gets you very little, some status boost in those who misunderstand it (MVPs are not awarded for technical skill & a lot of people think MVP = expert), a MSDN subscription, a lot of paperwork (including multiple NDA’s), some access to product teams (this varies from product team to product team – some have great interactions others are poor) and a trophy.

    To the right is my MVP trophy (as well as ALM Rangers award and MVP of the year cube) and I think it looks pretty awesome but how does it get to me?

    In this post I want to take a slightly tongue in cheek look at the box the MVP award comes in and what it is saying about MVP’s.


    Above you can see the three years of the trophy box. So lets analyse those box covers. I am assuming that the person on the box is supposed to represent MVP’s.

    • MVP’s are dress smart casual always – chinos & a blue shirt are required. Hah, not likely.
    • MVP’s have neck problems causing them to tilt their heads. This is likely true from all the time people spend at their machines.
    • MVP’s always have their laptops with them. Also likely true. Next year he better have a Windows 8 tablet though.
    • Interesting that 2010 guy got one cover while 2011 guy got to come back in 2012. Guess 2010 guy wasn’t re-awarded Winking smile
    • 2011 guy has gotten smaller in 2012 – are we shrinking away or did Mr 2011 not do enough work?
    • In 2010 and 2011 the ghosts of MVP’s past are clearly standing in support for the MVP. In 2012 they aren’t concerned anymore and just chatting with each other.

    What would I do differently? Easily, take a photo from MVP summit with real MVP’s engaging with each other and put that on the cover. What may be nice is to have new 2012 MVP’s (i.e. first timers) get together to pose for it and so there is extra incentive for 2013 – a box with real MVP’s that could include you.

    01 Dec 2011

    Platforms > Implementations

    imageI recently read an insightful post about how being a developer is less about coding and more about tooling, and while I do not agree with all of the post, the fact we as developers are tool obsessed rings very true. This obsession with tools becomes a white hot rage when our favourite tool is threated with extinction or causes a world of panic when a competing tool is proposed without enough information on it.

    Let’s look at two key examples of that:

    • WinForms was very popular and when Microsoft brought us WPF, there was major push back from those who did not want to change and learn a new tool. If you reading this, then you are thinking well time solved that, I disagree. This very week I was asked about WinForms vs. WPF again. Time doesn’t heal all wounds, it just gives some of us time to move on.
    • To illustrate the world of panic I can use a more recent issue – Windows 8! Remember all the discussion before //Build about the death of <insert your favourite tool here>? The confusion caused by incomplete discussions around tools we love caused panic.

    So what is the solution to this? I think simply a mind set change would be enough. The mind set change needed is to remember that a platform is more important/powerful/useful than a tool. I would like to take credit for this idea, but the first time I heard anyone mention this was a few years back and it was Scott Hanselman talking on MVC almost three years ago to the day. He mentioned that ASP.NET > ASP.NET Web Forms and ASP.NET > ASP.NET MVC. In short he was saying that the core understanding of ASP.NET, the core features and the core uses of the platform are bigger than a single implementation (tool) could be. Sure, you need to learn a new tool, but you aren’t starting at zero if you know the platform.

    Silverlight_h_rgbWhy I am bringing this up? It is because of the discussions I have been having about another tool recently: Silverlight. We are approaching the panic stage on this tool due to rumours of it’s demise. However it is VERY important to take a step back and see what the platform is and how knowing the platform means that a tool can move along and we are still able to work/code/make money etc…

    The platform Silverlight uses is XAML based UI technologies, a core set of how we can layout UI components using an XML dialect called XAML. This platform also has lots of options for things like binding, the MVVM patterns and so on that are either difficult or impossible to do with other UI technologies (like WinForms for example).

    XAML based UI technologies started with a single tool: WPF – an implementation of the platform designed to run on top of the .NET Framework. A second tool, Silverlight, later appeared – this is an implementation of the platform designed to run as a plugin in a browser. A third tool, Silverlight for Windows Phone 7, came next and while very close to Silverlight it had it’s differences as it was an implementation of the platform for the phone. In the last few months we have had the forth implementation of the XAML based UI technologies appear: WinRT. This is the Windows Runtime in Windows 8 and when you develop with C#, VB.NET or C++ your UI technology is just another implementation of the platform.

    Every implementation of the platform has been different, some in big ways and some in smaller ways but the core of the XAML based UI technology platform hasn’t changed and there is not a single rumour, plan, or hint that we are even close to seeing the end of XAML based UI technologies. We may see a tool end of life and die (like some rumours say about  Silverlight) or other tools just find completeness and not need new work done (like WPF if) but the platform remains and grows and learning a platform is always more important/powerful/useful.