Blog

Ich bin ein Dummkopf

Anyone outside of certain European and South American countries that use a comma as the decimal separator in numbers can safely ignore this posting. Everyone else read on.

Update (04/09/09) : Version 1.0.1 approved and fixes this issue

The Bug.

Early this morning we started getting some bug reports about wrong conversions in Convertbot. After some troubleshooting we determined that this is a problem that happens when a Phone’s International Region Format is set to a locale that uses a comma as the decimal separator (i.e. 1000,00 for one thousand). After a bit of digging around through the code I found the problem and fixed it with a very simple addition to the code. Within another hour or so we fully sanity checked the app and submitted version 1.0.1 to Apple. Assuming things go as planned that release should be approved within the next 7 days, though unfortunately this is totally out of our control.

So how did this happen?

In order to convert from one unit to another there needs to be a formula for the conversion. For example from Celsius to Kelvin we store something like K = C + 273.15 as a string. In order to use that formula we have to do some parsing on the string that isn’t very interesting to anyone but geeks like me. The problem however comes when we get to that 273.15 number. We’re using a class called an NSNumberFormatter which abstracts a lot of the complexity of turning numbers into strings and vice versa. The NSNumberFormatter code uses the Region Format settings to decide exactly what the user would expect a number to look like. Since some of the locales use comma as the decimal separator NSNumberFormatter was assuming that 273.15 meant 273 which is what’s causing all the havoc during conversions. For currencies a conversion of $1.35 to €1.00 would just become $1 to €1. The Fix was a single line of code to tell NSNumberFormatter to expect a period as the decimal separator when reading in data from the conversion formulas.

Data Integrity.

Obviously regardless of how cool a unit conversion application looks its pretty useless if you can’t depend on it to correctly perform calculations. Because of this there is a lot of automated testing code that was built as part of Convertbot. Every single conversion is exercised a number of times through these tests so that we can avoid a situation like this. Unfortunately neither the automated tests nor any of the beta testers ever tested using a comma as a separator. This is obviously in the process of being changed and each of the tests will be run through multiple locales to make sure this particular problem can’t happen again.

Work Around.

Again we hope Apple approves this new release as soon as possible. The temporary work around for folks affected by this bug is to change their Region Format to one that doesn’t use a comma. Simply go to the Settings app and Navigate to General -> International -> Region Format and chose a different format, United States as an example.

Apology.

I’m personally very embarrassed by this bug and its something that should never have happened. There’s really no excuse for it and we are very sorry that it happened. As we’ve shown with Weightbot we are only interested in producing high quality applications and we are very concerned with making our applications work properly for all countries. We’ve localized Weightbot for over 10 countries and we’ll probably do the same for Convertbot. We respect and go out of our way to respect any locale differences whenever possible (Stones as a weight unit available in the UK). Again we are sorry and will do better next time.

Retweet this Article

16 Comments:

Permalink
  • Moe said:
  • March 26th, 2009

I appreciate your honesty and sincerity on this post. You found a bug, reported not only how it happened, but you fixed it and gave us the workaround in the meantime.

Your apology is accepted and continue providing quality apps like you have with Weightbot and Convertbot. You have shown that you are human.

Permalink
  • Ako74 said:
  • March 27th, 2009

I totally agree with Moe!

I was using another currency converter until now and though i knew v1.0 has a bug, i was so intrigued seeing your new bot, that i bought it … and i am really amazed about it!

So, it’s really good you found the bug and i am fine knowing, i will be able to use ConvertBot for Currency conversions in a week or so … but until then … i really like your app and am really impressed by your great work!

Permalink

The same here, thanks for the explanations and the quick fix.

And if you need a french beta-tester… ;)

Permalink
  • Dezorian said:
  • March 27th, 2009

Thanks for the update, i’ve not gotten it yet but i was about to report a bug when the (awesome) question textbox interpreter found this post.

Thanks for explaining (love the programmer explanation since i’m one myself). The program is awesome so ill just wait for the update, to let it work 100%.

Permalink

For the title of this post alone you deserve the self-deprecation medal in gold ;-)

People make mistakes and even though one might think that you guys could’ve changed your locale at least on one iPhone nobody reading this would cast the first stone as we’ve all made mistakes in our lives.

The Appstore reviews will not be that kind though – you’re so lucky that the review process has been changed and all those reviews will get purged once you release 1.0.1 :-) I guess I might even buy your app, I didn’t even know about it (I knew weightbot but it was lacking too many conversions I wanted from a converter – guess Convertbot is exactly what I was waiting for).

Permalink

Hello,

You have made the best convertion app for the iPhone that i have ever seen. The very first version of any application always have some bugs. I always will prefer the honesty than hiding the problems. You have post about the problem, offer a walkarround and fix it, great and honest work.

Thanks :)

Marcelo.

Permalink
  • Firebrain said:
  • March 27th, 2009

I was wondering why this app wasn’t working properly here (Germany). Thanks for the Info and keep up the cool work!

Permalink
  • fabianjul said:
  • March 27th, 2009

First of all, thanks for this cool app! I saw it and immediately bought it ;-)

But there’s one thing you could make better. I do not say you have to do it but it would be cool and i don’t think it’s a lot of work; What’s about a possiblity to enter new convertations, for example “dm” in the lenght section.

So – what’s about a little update?

Permalink
  • Edmundo said:
  • March 27th, 2009

Now it makes sense!
Ok, Let’s wait for the new version then. I’m from Brazil and been using weightbot for a long time now. That’s why I bought convertbot without thinking twice.
And thanks for the honesty!

Regards,

Edmundo

Permalink
  • peterhamburg said:
  • March 27th, 2009

hi,

I also have the problem here in germany that mass, length, currency and area are not working and understand now that I have to wait for the update. thanx for your clear, honest and open explanation and apalogy which is truly appriciated and excepted.

thank you by the way for that great work on both apps. for me they represend not more or less than the highest standard of GUI so far in this computer world. go and make mac os XI please! ;-)

by for now, peter

Permalink
  • Willy Schepers said:
  • March 29th, 2009

Thanks for your honesty. How and when do we obtain the upgrading?

Permalink
  • Lock said:
  • April 3rd, 2009

well done! :]
I’ve known your company from weightbot I’ve saw on a colleague’s iphone. it was really cool even if I didn’t need that application (I’m not lazy but already do that on Wii Fit, when I’m not lazy of course). ;P
I liked it so much I felt I had to support your great work so I bought Convertbot. I was a bit scared from the comments on italian AppStore about wrong currency conversion but I guessed it was because maybe they didn’t have an active internet connection for updates. I was a bit shocked to realized nothing worked. then, coming to your website I read you don’t support jailbroken devices and I scared that was the reason, since mine is(*).
now this post made me happy again and as previous commenters I really appreciate your honesty (as well as I enjoy the blog part of website where you explain how and why your application are created).

maybe this is not the right place for a pair of suggestions but I’ve not the patience to write another post elsewhere so please forgive me.

it would be nice (even if not necessary) to have a bit of intertia in the will, like in default iphone lists (or a gun’s drum, just to give the idea). I don’t know how much useful it would be but I’m sure it will be cool and I’d play a lot with it. ;]

and I’d also apreciate an option to make units selections a bit faster. you select a “from” or “to” button, choose unit and then press directly on other one. as it’s now you get an error because you didn’t press “ok”. I know it’s about the “game like experience” so like “wrong button” but after a while it becomes a bit irritating because sometimes you just need to do a conversion as quick as possible. so, not to remove the fun experience, it would be nice to have an option about that so users can choose the way they prefer.

looking forward for the update and thanks.

have a nice day,
Andrea

I’m a good JB guy, no cracked app or so, I just need it because I’ve a business SIM and I need to use a prefix in front of phone numbers to differentiate work and personal calls for billings. since iPhone sadly doesn’t do that, or I double hundreds of numbers or I modify the iPhone formatting function to consider the prefix as an area code. and only JB allows me to do so. maybe i’m very OT but I wanted to show not all jailbreakers are bad. of course a great percentage of users use it to steal software and this is sad and wrong. :[

Permalink
  • Lock said:
  • April 3rd, 2009

meh… tons of typos, my english is really poor.
in the first suggestion, I mean “wheel”, not “will” and I forgot to write “(*)” before last paragraph.

Permalink
  • Jose said:
  • April 4th, 2009

The problem is not only the comma or the point. The currency converter won’t work either. 5 euros aren’t 5 pounds
Regards and txs for the effort

Permalink
  • Lock said:
  • April 7th, 2009

if you choose a correct international format converter works perfectly so it’s somehow something related to comma.

Permalink
  • Stef Peels said:
  • April 15th, 2009

What a fantasic apps ! Both are incredible easy to handle. One suggestion: the sound on convertbot is very soft and not adjustable. It may be a little louder if you ask me.

Cant wait for the next app!