r/programminghorror
•
u/Leonnee
•
Jun 12 '25
•
1
Javascript Javascript is filled with horror
2.4k
Upvotes
View all comments
Show parent comment
11
u/LutimoDancer3459 Jun 12 '25
But is this really the way we want it to handle things? Best case, nothing happens. Worst case, we work with wrong, invalid data that may be persisted and used later on for other stuff.
A coworker once did such a thing. Just use some random chosen value to keep the program from crashing. Resulted in many errors down the line and endless hours wasted of debugging why that is so.
A program is supposed to do what I tell it to do. Not just assume some arbitrary solution just to keep running. The language used should help me get the program I want. Not hiding my incompetence.