@Severity One said:
No, the biggest problem was that he allocated absolutely everything statically (on the heap), and never did any boundary checking. So there was a program that ran over a set of data and produced some or other result, or inserted it into a database. Naturally, all data would be loaded into memory before any processing took place, and as the data sets grew, there would be more and more crashes due to segmentation violations.
His solution? He 'rewrote' the application by allocating 100 times as much memory, and if the first one crashed, the second one ran. They actually had to buy bigger and rather expensive Sun hardware to run the crap code this guy came up with.
Ouch. Sounds like a particularly nasty case of C Programmer's Disease.
I had a former cow-orker who'd do stuff like that all the time. He did a lot of static allocation, loved putting related data in separate arrays instead of a single array of either a struct or a class, wouldn't write structs and classes so we could stick 'em in a vector or map, and didn't think it at all strange to have to modify five different files and rebuild to add a single option to a dropdown, even though no basic functionality had changed.
I no longer work with him. Thank God.