News for hackers. Stuff that matters.
Re:Home Office tells man, 101, his parents must confirm ID by NauticalStu on Tuesday February 18, 2020 @01:58PM (#22359047)
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.

Re:Home Office tells man, 101, his parents must confirm ID by JoshTriplett on Tuesday February 18, 2020 @05:58PM (#22361325)
> So the logic was resulting in an age of -1 (since DOB was prior coverage start date), which wrapped around to 255

I really look forward to human ages breaking your assumption that they fit in 8 bits.

Re:Home Office tells man, 101, his parents must confirm ID by OJFord on Tuesday February 18, 2020 @07:17PM (#22361850)
If the fix was to make it signed, that might not be so far off!
Re:Home Office tells man, 101, his parents must confirm ID by NauticalStu on Tuesday February 18, 2020 @06:48PM (#22361663)
0.001K ought to be enough for anyone.
Re:Home Office tells man, 101, his parents must confirm ID by kube-system on Tuesday February 18, 2020 @07:07PM (#22361802)
I spent some time debugging insurance systems, and bugs exactly like that were everywhere. There are lots of date comparisons in those kinds of systems, and the order in which those events happen are almost always described to happen in a certain order, but there's tons of exceptions for every case.