|
|
|
|
|
by NauticalStu
2318 days ago
|
|
This reminds me of my favorite bug at my first programming job. I worked on a system that processed benefits. We generated a lot of reports, one of which being the overage dependent report, listing all children that were over the age limit for that insurance plan. We had one case where a newborn was showing up on that report, and for end users, there was no indication why. DOB was 20-something days ago, not 20-something years ago. Lo and behold, the paperwork was somehow filed before the baby was born, and our date calculation method was returning an unsigned int. So the logic was resulting in an age of -1 (since DOB was prior coverage start date), which wrapped around to 255, which was obviously higher than whatever the max dependent age was. It was a fun one to debug and explain. |
|
I really look forward to human ages breaking your assumption that they fit in 8 bits.