Menu

1 / 2

The date bug that cost us a $120K contract and what i built to make sure it never happens again

DEV Community·Blues Clues·6 months ago
#0YV0WU1e
#fintech#api#webdev#productivity#holidays
Reading 0:00
15s threshold

I still remember where i was when the email came in.

December 25th. Christmas morning. Phone in hand while having breakfast, and there is an email from our client's CTO. No greetings, Just

"We're terminating the contract. Our legal team will be in touch"

We lost a 120K a year contract. On a Christmas morning because of a date calculation bug that none of us, not a person on a team of 5 experienced developers had ever experienced.

Here's what happened

The file nobody wanted to touch

Every engineering team I've ever been on had a file similar to this. Ours was business_day_utils.py . It was 1,847 lines long and had a comment at the top that read:

# WARNING: Do not refactor. Do not "improve". Do not touch. # This file has been through 3 rewrites. All 3 failed. # If you think you understand it, you don't. # - James, 2021

Enter fullscreen mode

Exit fullscreen mode

It handled our SLA deadline calculations for a Fintech client operating across Germany, the Netherlands and Saudi Arabia.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.