Wednesday, September 23, 2009

One particularly stupid bug that was discovered in production code involved code that was made overly complicated. This occurred a number of years ago, so I don't remember the exact details.

What was happening was that some code was taking an id, which was a long, converting it into a String, then doing a new Integer() on that String. Just some code doing stupid pointless things.

It got discovered in production once the ids got too big to fit in the 32-bit int.

After that, the QA systems were set up to start all the ids at 10 billion or something, to see if anything else would get shaken out. I don't think anything else was found, though.

No comments:

Post a Comment