Tuesday, January 23, 2007

example of really poor programming

I got in my car this morning and the (outside) temperature gauge read -0oC.

The issue here is that minus zero is actually zero.
Yes, as it gets colder the display changes between 2, 1, 0, -0, -1, ...

Now it might be that they (whoever wrote the temperature display software) thought that by showing the minus indicator, based on the un-rounded temperature was actually helping to provide an extra level of detail in the display.

Two things:
1. When I'm driving in my car I don't need to know the outside air temperature to such a level of accuracy as in practice I only need to know two things. Firstly, I need to know if the outside temperature is below about 3oC, as this is when I might expect to see ice on the roads. Secondly, I interested if it gets to below -4oC, as this is when my anti freeze stops working and I may have other issues with the car.

2. Precision should not be shown in an unconventional and technically incorrect way. We have a common method of showing precision in numbers and that is through an increased number of decimal places. The display in my car doesn't display any decimal places (see point 1 above).


The outside temperature gauge in my car does a bad thing in mixing rounded and un-rounded figures. Or, combines, calculates and displays data of differing levels of accuracy.
THIS IS A VERY BAD THING TO DO!

It's just a good thing that the people involved in writing and testing this aren't writing financial software. As inconsistencies and errors in rounding could have consequences that could be much more far reaching.

It's the same way I feel when someone is struggling to do a simple task. Rather than get annoyed with what their doing, or the speed at which they are doing it. I take solace in the fact that they are not doing something more serious or something with bigger consequences for poor performance.

0 comments:

Post a Comment

I get a lot of comment spam :( - moderation may take a while.