Chaos on the M25 as two separate crashes leads to 75 minute delays
Chaos on the M25 as two separate crashes leads to 75 minute delays
The place where Britons are most likely to use loyalty cards... and how much they earn each year
Rents surge in commuter towns as work-from-home flat sharers seek to escape cost of cities like Manchester and Bristol
I'm 61, recently retired and took a £69,000 lump sum - a chunk needs to go on home improvements, where should I invest the rest?
Power Grids On 5 Continents Pulse Every 60s. Scientists Think They Know Why
Read more of this story at Slashdot.
CodeSOD: Next Month
One of Sean's colleagues left Initech on good terms. It caused no small amount of surprise that the very next day their billing system started failing. The billing system which the colleauge had worked on.
No one truly suspected foul play, it was just a weird coincidence. Still, billing blowing up was a 5 alarm fire, so everyone was throwing every idea out about what could be the cause.
Late in the evening, after staring at the code for many hours, Sean found this:
if item.next_bill_date.month >= end_date.month item.next_bill_date = nil item.save else ... endIf the month of the next billing date is greater than the last billing date for this account, wipe the billing date and update the item.
It's worth noting that Sean's co-worker's last date happened to be the end of November, and billing started blowing up on the 1st of December. You'll also note this is checking just the month and not any other part of the date, like, oh, I don't know, the year?
While this bug could happen to any bill, it was blowing up in December because every bill's ending month was greater than or equal to January. So this code canceled all the bills due in January.
The good news was that they could reconstruct the correct next billing dates without having to restore from a backup. The bad news is that some unknown number of billing periods had been canceled for some of their customers, and someone was going to have to check the history.
Sean reached out to his former co-worker to politely thank them for an early Christmas present.
"At least I understand our billing code better," Sean writes.
[Advertisement] Plan Your .NET 9 Migration with ConfidenceYour journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!
AWS distills its cloud into a local emulator that runs on your PC
TfL continues to hide cost of Gallows Corner works despite completion
Cat named Thor loses paw after freak kitchen accident
Girls from four Witham schools take part in Lift Maltings football day
Cat named Thor loses paw after freak kitchen accident
Up to 149 affordable homes proposed for soldiers in Braintree veterans village
Tributes paid to ‘great man’ who used gaming to improve youngsters’ lives
Disgraced former CA eMudhra blames buggy script for hopelessly weak certificates
QUENTIN LETTS: Burnham's so passive, indecisive, bland. No wonder he's got Boston Consulting to write his Ten-Year Plan
Sunken SS United States Set To Become World's Largest Artificial Reef
Read more of this story at Slashdot.