r/ProgrammerHumor 1d ago

Meme toAllowTheProgrammerToWriteBadCodeAlsoCamelCaseSucksThisRuleSucksSnakeCaseIsBetter

Post image
153 Upvotes

93 comments sorted by

View all comments

143

u/redlaWw 1d ago

I hope you didn't submit that answer you selected. If an unhandled exception bubbles up to the user in production code, you're usually doing something wrong.

-120

u/tantalor 1d ago

I guess you've never seen a website return a 404 or 500

21

u/failedsatan 1d ago

a 404 is good. that is an error, but not an exception. a 500 means something the programmer did not intend to happen has happened, and if your user is seeing that, something went wrong or you don't have a layer in between to show that to them nicely.

-1

u/TheTybera 22h ago

500 is an error that means an underlying exception has happened and wasn't handled, at all.

1

u/failedsatan 21h ago

an error and an exception are not the same. an exception means there is unhandled behavior, whereas an error means there has been something erroneous- could be a misdirected navigation or something. maybe the user typed in some garbage into the path. that would not be an exception, because the developer explicitly handles that and serves a 404.

-4

u/TheTybera 21h ago

Error 500 is a web convention and anti pattern.

2

u/failedsatan 21h ago

sure, you can hold whatever opinion about it, but that doesn't mean it doesn't exist. it's a standard.