this post was submitted on 02 Nov 2025
188 points (99.0% liked)
Programmer Humor
38989 readers
111 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I use the catastrophe theory of error handling: if something fails sanity checks or throws an exception, then kill it with fire: crash the whole program and make the users cry.
True, it’s a pain but.. no more hidden errors that get reported two years later
actually a really bad idea if you're doing anything with critical data between your systems and other systems, like a credit card getting charged on a remote server but then your code crashes
Dev mode is when developing by the programmers. Production means used by others.
When I am working with a service, I want to know immediately when there is a problem.
When I push my code to be used, the dev flag is off and the code does stuff as normal.
For example: if I am making a payment service using a third party, I use sandbox and fake cc numbers. I want things to fail loudly on my computer so I can make things fail silently. And safely, when it’s used with real money. But I can only do that if I know there are issues. And only logging lets some bugs be unnoticed , particularly if a cluttered log. So being loud in development saves tears in production
I agree in general, that a crash is much better than silently failing, but well, to give you some of the nuance I've already mostly figured out:
All good points!
Also, I’ve learned from others that how you crash depends on the environment, if running in dev, be different than if the thing is used by the public or in production.
formatting edit