Hacks are good for you!
Comments here on the MS code.
Agreed. It all goes with the attitude of 'I am a really bad programmer, hence I am good'
It depends on the code that the comment is describing. I've seen a comment like that in a function that translates a date in one format to another. The formats were both based on the number of seconds since date X, but with different values of X. Instead of just basing the translation on X - X, the calculation involved some bizarre accounting of leap years and leap seconds (and actually it was incorrect). Worse yet, the code was copy/pasted all over the place.
Most of the acknowledged "hacks" are to fix errors in applications including those written by other companies. They are really gracious accommodations of the work of people who didn't follow the API.
Great find. Interesting read.
Not only that but later on you can search for the word "hack" to find things you might want to refactor.
name withheld out of cowardice
Fog Creek Home