Explaining the Excel Bug
joelonsoftware.com
joelonsoftware.com
Now I don't have any idea why Excel had such special cases around 65535, but this incident seems to confirm my growing suspicion that it is wrong not to test 100% of code paths. Some of you may say off course it is, but I've seen programmers that just test a few sample points and then bombarding the code with random input and say it's working. I myself have been bitten by some bugs hidden in rare code paths since I was lazy to construct a special input that tests the path, which sometimes takes some effort. (I haven't used automated test case generation tools; any opinions?)