This was one of the moments where I was glad to have written tests first!
A simple method to get one or the other date.
I just typed it down in confidence and out of a sudden a whole bunch of test were failing! 😱
Can you spot the issue?
Tiny mistakes like these often sneak in unnoticed and causing mayhem.
How often have you investigated a critical bug, just to find some – after hours of digging – some wrong placed character causing the issue?
Tiny mistake, huge impact!
The code looked fine. It looked correct.
But it wasn’t.
The Swift compiler didn’t scream.
The testing safety net did.
That’s why I still write tests first.

