If you find a stupid mistake, fix it.
I once made a stupid mistake that people found, didn't fix, and worked around in the worst way possible.
I was working at a company that developed software for the transportation industry. We were testing a new wireless network for use in vehicle tracking applications and I was responsible for writing software to record vehicle location, speed, and sensor data in a database. My manager then used the data to plot his trips on maps and identify areas with little or no coverage.
The mistake I made was getting the vehicle's latitude and longitude mixed up. I was inserting latitude as longitude and longitude as latitude. It was a stupid mistake that I shouldn't have made and that I should have found immediately. My manager found it as soon as he went to plot his first trip, but he didn't tell me about it, he just corrected the data before he plotted each trip.
My software was supposed to be thrown away at the end of the test. If it had been, the mistake would have been thrown away with it, and I wouldn't have found out about it. Instead, it became part of a larger vehicle tracking product. I was responsible for developing software interfaces for new tracking hardware while another programmer developed user interfaces. I recorded the data and he plotted, displayed, and calculated on it. He didn't tell me about the mistake either. Instead, he corrected for it.
I finally found out about the mistake when we were running a trial project with a fire department and one of the dispatchers pointed out that the latitude and longitude on a dialog were mixed up. When I asked the other programmer about it, it went something like this:
CC: The latitude and longitude on that dialog are mixed up.
??: Oh. I forgot to convert them. Thanks.
CC: What do you mean "convert"?
??: Oh, latitude and longitude are mixed up in the database, you
have to convert them before you display them.
CC: What do you mean "mixed up"?
??: The latitude is in the longitude column and the longitude is
in the latitude column.
CC: (getting horrified) And you wrote your software to correct
for it instead of telling me?
??: (getting defensive) Hey, it was YOUR mistake!
By then it was too late to fix the mistake at the source. Where he'd needed latitude and longitude, he'd corrected for it in-place. You could never be sure if that latitude variable or parameter you were looking at contained a latitude or a longitude. In some cases he'd corrected for it in SQL by aliasing columns:
SELECT
vpr.latitude AS longitude ,
vpr.longitude AS latitude
FROM
VehiclePositionRecords vpr
In other cases he'd corrected for it in code by exchanging values, reading values from lat/long columns into long/lat variables, or passing long/lat values to parameters expecting lat/long values:
temp = latitude;
latitude = longitude;
longitude = temp;
In still other cases he'd corrected for it in ASP:
Latitude: <%=longitude%>
Longitude: <%=latitude%>
My manager and the other programmer didn't see the problem. "It's not broken as far as the users are concerned, except for that one form, so it doesn't need to be fixed. And if you hadn't made the mistake in the first place..."
So the mistake was never fixed.
The mistake lives on in software used to track and dispatch ambulances, among other things, and could lead to all sorts of problems. Maybe an edge case won't correct for the mistake and a dispatcher won't see an ambulance near a 911 call. Maybe the data used to decide where to put a new fire hall won't be accurate. If something does happen, it won't be entirely my fault, but I'll have to take at least some of the blame.
If you find a stupid mistake, fix it, or tell the person who wrote it so that they can fix it.
Colin
08:37 PM | Colin

TrackBacks
Comments
# RE: If you find a stupid mistake, fix it.
I empathize, really. I also find that ridiculously funny.
12:09 AM | Nathan