top | item 37237876

Special cases broke Microsoft Zune and can ruin your code base too

4 points| knsv | 2 years ago |mermaidchart.com

3 comments

order

jaclaz|2 years ago

I am not convinced that leap years can be called "special cases", after all they are a known occurrence and happen roughly every 4 years (and they were taken into account - wrongly - in the code in the example), if something similar had happened with the divisible by 100 but not by 400 rule, that happens three times every 400 years (and that seems not have been taken into account in the code) I would have found it more convincing.

knsv|2 years ago

Some thoughts on special cases, a love-hate relationship, I guess :)