Kwakkelflap: tools for the IT pro

Tuesday, November 27, 2007

Currency rounding

I've talked about automatic currency conversion a while ago. Right now I'm using a home made script that uses the Plimus system to display the price in the users currency if this is different than the default currency.

The automatic conversion is nice, but it's even better if the converted number is rounded to a sensible amount. Right now, I use a rounding to 50 cents. And this is where I have a problem.

I sell my software in euros in nice round numbers. But now and then the rounding and the currency script combination act in strange ways:

As you can see, 55 euros was rounded to 55.50 euros. There is no need for rounding but Plimus does it anyway. And of course 55 euros is not equal to 55.50 euros so the conversion is displayed on my webpage. The amount is 55 euros when ordering though, so there is no error in the conversion there.

I suspect that there is a conversion from euro to dollars and then back to euros when using the script. This might result in a conversion error depending on the (daily adjusted) conversion rate.

Plimus is having problems in locating this bug so I've disabled price rounding again for the time being.


Wednesday, November 07, 2007

The Fping story

I created Fping in 1998 because I was frustrated with the ping application that comes with windows. I wanted to ping more than once a second, so I created a basic ping application that could do this. It didn't have many options at that time. Basically the only thing it did was sending ICMP 'echo request' packets and wait for the response. I had to give it a name and went with Fping (fast ping). How original.

Turns out it wasn't original at all. There was (and still is) an open source Fping application available with very similar goals. Oops. I swear I didn't know about it until it was too late. I was adding options to my Fping application and the program was spreading on the net. It first dawned on me when I got a 'bug report' with an option that didn't work like the open source program did.

So the name of my ping application was bad. Very bad. But the program was also successful, spreading fast, and I didn't want to change it at that time because of this. Also, my Fping is not simply a copy of the open source version. Some features are the same and some features are unique (for both). I will keep it this way, cause it seems the best thing to do.

In all those years the maintainers of the open source version never contacted me. I can only hope the name confusion didn't cause frustration. My sincere apologies.