"I want to make sure this value is at maximum 16384. So I have to do min(value, 16384)"
I ALWAYS get this wrong. I absolutely always write max instead of min, and fuck up. Just like I just did.
Hello I'm a professional programmer and I've been programming for >20 years. Please kill me
@jon_valdes Dates are even worse for me. "I want the newest 30 but no earlier than T" 🤯
Which is #1 case for me to write unit tests.
"it_is_at_most_16384" is a perfect unit-test. Then just write the implementation and trial-and-error the right setup.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!