847
The eye-opener commit (discuss.tchncs.de)
you are viewing a single comment's thread
view the rest of the comments
[-] dark_stang@beehaw.org 9 points 1 year ago

I joined a team years ago where everyone would catch exceptions then throw a different exception in the catch, swallowing the original. Sometimes these were nested many layers. Troubleshooting was a nightmare.

I spent a week deleting all of them and told everybody that "try" was now a forbidden word outside of entry points.

[-] lobut@lemmy.ca 5 points 1 year ago

I remember doing that as a junior because everyone in our codebase did it!

My new team lead came in and asked me why. I said it's to reformat it due to the layer it was in. He said "...and what did you really accomplish with that?" All we did was bury our real error really well. It made me think about these things and to question convention more

this post was submitted on 23 Nov 2023
847 points (97.9% liked)

Programmer Humor

32591 readers
926 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS