847
The eye-opener commit (discuss.tchncs.de)
all 39 comments
sorted by: hot top controversial new old
[-] lobut@lemmy.ca 143 points 1 year ago

I remember when I was working with .NET and I saw some web service code and I saw there was no try catches. They didn't have a global catch in the asax either or anything. I just wrapped each call into a try catch and log.

I got the same treatment where my manager wanted to know what happened with the increase in errors. I told him what I did. My manager got another developer to go through my commits regardless. I was a bit upset at the lack of trust.

[-] MotoAsh@lemmy.world 49 points 1 year ago

I mean, that 'could' be a straight up wrong thing to do if some of the calls were expecting errors to be able to escape. Yea, it'd be super weird and I don't know if .NET would marshall them anywhere, but in some systems, that sort of, "obvious" fix could break shit. Sure, it'd be something doing something weird and kinda' dumb, but ... don't we see "weird and dumb" all the time??

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

oh yeah I just logged and rethrew, so it shouldn't have had any behavior change, but I could have broken something I make mistakes all the time.

The errors we were seeing in logs were like logic or application errors that we just didn't see before. My changes really shouldn't have caused.

[-] AlboTheGuy@feddit.nl 18 points 1 year ago

I think that was the right approach, then again didn't you have through a pull request or at least a code review? Knowing that would give raise to so many "errors" you should have had some sort of communication beforehand.

I don't blame you, more the workflow and ironically the manager

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

Oh that was like years ago! Probably SVN, we on-boarded Git a little while after.

No pull requests, you just manually merged back then. It's definitely a workflow improvement we adopted later and we as a company and as an industry have gotten better.

lol, the thing was just that my manager asked me what I did and I told him. Him getting another dev to "fact-check" me after is what bothered me a bit. I am usually the type of look into issues rather than brush them off and I am the first to confess to a screw up. Which is why I was irked.

[-] magikmw@lemm.ee 24 points 1 year ago

A manager that can't read a simple try catch commit? Why am I surprised.

[-] MonsiuerPatEBrown@reddthat.com 32 points 1 year ago* (last edited 1 year ago)

they shouldn't have to do that. the commit log tells the manager who to go ask.

and since the developer did that to be a big swinging dick instead of bringing it up to the team in a meeting as a problem to address together the manager didn't trust them.

makes sense to people that have to manage other humans.

[-] ursakhiin@beehaw.org 12 points 1 year ago

This is a massive assumption from the story that was provided. We don't know that they didn't discuss with the team and an explanation of "I added a log to errors that were already happening" shouldn't result in lack of trust from the manager.

Reactive managers like that are a big problem in the industry.

[-] 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

[-] hesusingthespiritbomb@lemmy.world 75 points 1 year ago

Changing the error level in the build config without telling everyone and then making a hyperbolic passive aggressive comic when the senior admonishes you for doing so ?

I'm gonna guess 1 YoE, second job out of college. Enough experience to know what they're doing, but not enough to know when to do it.

[-] bouh@lemmy.world 61 points 1 year ago

It's the delusion stage, when you think companies are places where you do professional work. Then you learn no one cares about properly doing your job. In fact, they'd rather you do not.

[-] Pringles@lemm.ee 15 points 1 year ago

Ah, that hits close to home. I have spent a lot of time and energy to get my direct bosses onboard with following best practices and doing things right from the start. To their credit, they got onboard with it and are pushing that message themselves now. Of course, the board doesn't care about that and just jams random projects with strict deadlines without any thoughts given to the IT aspects of it up our asses, but our head of IT has apparently grown a spine and started pushing back, with some moderate success.

The MO of my company has for years been: do a POC and then as soon as it works, push that POC in production. I'm still cleaning up the mess of idiotic shit like that from 15 years ago.

[-] baltakatei@sopuli.xyz 3 points 1 year ago

Ultimately, the quality of your work is a function of you and your resources. Corruption and miscommunication plague all management systems. Corrupt management siphons resources away from otherwise good work. Government bureaucracy is another layer of management like any other. Customers are not just consumers but working people like you.

Hang in there.

[-] AlboTheGuy@feddit.nl 13 points 1 year ago

Tbh the fact that they were even ABLE to push something like that without anyone noticing is a red flag for the work environment and workflow.

[-] lukas@lemmy.haigner.me 5 points 1 year ago* (last edited 1 year ago)

I worked on software that's roughly as bug-free as a living bug. Intended behavior crashed the software. The master branch was broken, no way to compile the software without local changes. Devs hunted down suppressed exceptions to find out why everything crashes and burns on a daily basis. Unit tests are in the backlog, we'll get around to it eventually.

Code reviews are ask whoever is available to approve your changes without looking at the code. Most seniors abused suppressed exceptions to use the Java Streams API, no proper technical justification. So my first official task was to unsuppress all exceptions. This caught many seniors off-guard, but made crashes infinitely easier to diagnose.

I would've done that even if it wasn't my task. Shotgun debugging is hell. I don't want to learn which component is most likely to fail silently due to retarded suppressed exceptions. Do your job properly ffs. Don't shoot others in the foot. Don't shoot yourself in the foot. You have absolutely no reason to shoot people's feet. Stop it.

[-] phorq@lemmy.ml 61 points 1 year ago

I would normally put an if-statement before that to verify if IGNORANCE still equals BLISS

[-] db2@sopuli.xyz 56 points 1 year ago

The second panel would be "No, I enabled error reporting. Those errors belong to just you."

[-] LazaroFilm@lemmy.world 36 points 1 year ago

But it works fine on MY computer.

[-] cynar@lemmy.world 49 points 1 year ago

"But we can't ship your computer!" and so Docker was born.

[-] MNByChoice@midwest.social 19 points 1 year ago

No, we cannot just put every random library on the server. Please stick to the stable ones the team picked, not random ones you just heard about and wanted to try in production.

Docker enters the chat: Now you can!

[-] xmunk@sh.itjust.works 7 points 1 year ago

For some reason our executable only works if you include a jpg of a coconut... do you want to debug why or just ship it?

[-] MajorHavoc@lemmy.world 2 points 1 year ago
[-] palordrolap@kbin.social 3 points 1 year ago

Begins planning a coconut / computer wedding.

[-] MNByChoice@midwest.social 2 points 1 year ago

Shit that sounds familiar. Like the jpg was large enough to push the binary into some random memory region.

[-] mdhughes@lemmy.ml 28 points 1 year ago

"My project" doesn't exist in any team. It's everyone's project. A manager needs to have a long conversation with Pink Pants.

If you build your project at anything but highest error level, clang -Wall etc., you're letting errors in, relying at best on coincidence to work the way you think it does.

Commit it and don't revert it!

[-] pkulak@beehaw.org 2 points 1 year ago* (last edited 1 year ago)
[-] mdhughes@lemmy.ml 1 points 1 year ago

You'd think, but there's a lot of Pink Pants stans downthread.

[-] tsonfeir@lemm.ee 28 points 1 year ago

Yay a PHP joke that isn’t making fun of PHP.

[-] cupcakezealot@lemmy.blahaj.zone 23 points 1 year ago
[-] SapientLasagna@lemmy.ca 3 points 1 year ago

I'll see your blame.css and raise you git blame somebody else

[-] Crul@lemm.ee 21 points 1 year ago
[-] BruceDoh@sh.itjust.works 7 points 1 year ago
[-] Crul@lemm.ee 5 points 1 year ago

Yep, that's why I added the twitter source too.

[-] Klear@lemmy.world 8 points 1 year ago* (last edited 1 year ago)

Twitter is also expired.

[-] Bear_with_a_hammer@lemmy.ml 8 points 1 year ago* (last edited 1 year ago)

That's why PHP team gave us null coalescing (??), oh the misery we went through writing if / else

[-] lseif@sopuli.xyz 1 points 1 year ago

who doesnt love ??

[-] Cysioland@lemmygrad.ml 4 points 1 year ago

Isn't it how most frameworks do it by default? As in, crashing on E_NOTICE?

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

Programmer Humor

32591 readers
1707 users here now

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

Rules:

founded 5 years ago
MODERATORS