1039
submitted 1 week ago* (last edited 1 week ago) by treverd@lemmy.world to c/programmer_humor@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] SpaceNoodle@lemmy.world 186 points 1 week ago

If you don't understand how and why, it's broken.

[-] HalfSalesman@lemm.ee 70 points 1 week ago

Sometimes its either ship something broken or lose your job.

If you're gonna do that it should only be after sending a very blunt CYA email.

[-] SpaceNoodle@lemmy.world 21 points 1 week ago

Lose a little credibility now, or a ton of credibility later? Sounds like a pretty short-sighted tradeoff, and a good opportunity to find a less shitty employer.

[-] HalfSalesman@lemm.ee 49 points 1 week ago

It sometimes depends on the programmer's situation. Maybe its "lose a ton of credibility or live on the street/lose your H-1B Visa"

[-] SpaceNoodle@lemmy.world 20 points 1 week ago

I admit that I'm currently in a position of privilege where I don't have to worry about immigration status or insecure housing. I do try to use my power to shield those less fortunate.

[-] MajorHavoc@programming.dev 13 points 1 week ago

But, losing a little credibility now buys everyone time for their job search!

[-] anzo@programming.dev 3 points 1 week ago

Precisely. I was remembering someone else's complain on a co-worker thay had. It was bad for this reason(s), and to make the situation even more infuriating they were able to sell themselves quite well. So they changed jobs, always 'capitalizing' on their frauds...

[-] sp3tr4l@lemmy.zip 9 points 1 week ago

You're thinking like someone who exists beyond this quarter's profit margins.

I mean, you do, but as your boss, I'm required to tell you that you need to maximize short term results, and take all the responsibility for medium and long term calamities caused by me telling you to do that.

[-] wizardbeard@lemmy.dbzer0.com 2 points 6 days ago

Hahaha, I'll do whatever you want boss, but you're sorely mistaken if you think you're getting away without a written record of you signing off on telling me to do stupid shit.

[-] SpaceNoodle@lemmy.world 6 points 1 week ago

You're not gonna be my boss for long with an attitude like that.

[-] Clent@lemmy.dbzer0.com 1 points 1 week ago

It's never the nameless developer's credibility that is being harmed.

[-] ByteOnBikes@slrpnk.net 2 points 1 week ago

Pretty much. These commenters seem to believe engineers are given all the resources needed to deliver everything in time in perfect condition.

[-] Miaou@jlai.lu 1 points 6 days ago

If you don't, you quit. See Boeing.

[-] Gork@lemm.ee 56 points 1 week ago

It's a load-bearing function.

We have no idea why it's important, just that it is critical to everything functioning.

[-] PrimeErective@startrek.website 20 points 1 week ago

One of my favorite Simpsons lines, the load hearing poster

[-] pixelscript@lemm.ee 14 points 1 week ago

I feel like the "we don't know what this function does" meme is kinda bad. There's no reason beyond maybe time crunch why you shouldn't be able to dissect exactly what it does.

Despite this, the notion of a load-bearing function is still very relevant. Yeah, sure, you know what it does, including all of the little edge case behaviors it has. But you can't at this time fully ascertain what's calling it, and how all the callers have become dependant on all the little idiosyncracies that will break if you refactor it to something more sensible.

It has been several times now where a part of my system of legacy code broke in some novel fantastic way, because two wrongs were cancelling out and then I fixed only one of them.

[-] MajorHavoc@programming.dev 17 points 1 week ago

There's no reason beyond maybe time crunch why you shouldn't be able to dissect exactly what it does.

Usually it's mysterious business logic from before the dawn fo time.

[-] bisby@lemmy.world 12 points 1 week ago

https://en.wikipedia.org/wiki/Fast_inverse_square_root

even if you can figure out specifically WHAT a function does, it's not always clear WHY a function does, and honestly, if this function wasnt labeled in the code, no way in hell would I know what it does.

It has an entire wiki page dedicated to explaining it, and it involves enough math that most people wouldn't be able to follow along.

Nothing this atrocious lives in any current codebases I work on... but if you work at an old enough company, some of the load-bearing code will be tricky to figure out what is calling it, but also it was written in a time where little hacks were needed to eke out performance.

You only have to experience it once for it to be a memorable enough thing that you will cite it for the rest of your days.

Or more realistically, it IS comprehensible, but the level of effort necessary to comprehend it is not worth it. So you leave it as "undecipherable" and move on.

[-] moseschrute@lemmy.world 4 points 1 week ago
[-] smeg@feddit.uk 1 points 6 days ago

My tests always pass! They've never failed, that's how good a programmer I am!

[-] moseschrute@lemmy.world 1 points 6 days ago

You deleted the failing test, didn’t you

[-] smeg@feddit.uk 1 points 6 days ago

Test can never fail if it never makes any real assertions!

[-] MajorHavoc@programming.dev 7 points 1 week ago* (last edited 1 week ago)

If the tests pass, then everything is fine... Unless we expected the tests not to pass...then it's time to burn the codebase down and try again after a long vacation to clear our heads.

Of course, I'll usually settle for fixing the test suite after a long weekend. But in my heart, I'll know what I should have done...

[-] moseschrute@lemmy.world 8 points 1 week ago

...or you can just delete the failing tests :)

[-] Lemminary@lemmy.world 7 points 1 week ago
[-] moseschrute@lemmy.world 4 points 1 week ago

Delete all the tests!

If the tests don't give any insight into the functionality it is testing, they are probably not the best tests.

this post was submitted on 30 Jan 2025
1039 points (100.0% liked)

Programmer Humor

20351 readers
1464 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS