Hacker News new | ask | show | jobs
by edgarjph 6319 days ago
That was what I meant when I said zero is zero years and so many months. Using integers (or even decimals) and without rounding, 0 years and 9 months is really zero. One will start 12 months (or the number of months the calendar is using) after the date of birth.

Edge cases, I would estimate, would account for 30% of a program's logic. When doing the first cut, I classify those as exceptions: abnormal values that generate, well, exceptions.

Time-bound edge cases are abundant, especially in financial apps. End of periods, beginning balances, ending balances.

Other edge-case values are max and minimum values, limits of whatever sort. And these don't include limits of systems, like how many times a stored procedure can be dropped and recreated, that are not commonly known or just ignored hoping the app will hold before the longint limit will be reached.