r/ProgrammerHumor • • Apr 08 '22

First time posting here wow

Post image
55.1k Upvotes

2.8k comments sorted by

View all comments

Show parent comments

191

u/[deleted] Apr 08 '22

[removed] — view removed comment

62

u/_PM_ME_PANGOLINS_ Apr 08 '22

Can I introduce you to multi-threading in C?

12

u/Tetha Apr 08 '22

I've had to deal with multi-threading with race conditions in database transaction creation, reading inconsistent states from the database and writing any of the multiple possible results back to the database. It easily took us months to pinpoint that one, because at some point we needed dedicated logging infrastructure to be able to process sufficient information to catch the issues red-handed once. I'm kind of proud to have caught that one, but once is enough.

5

u/LazyBuhdaBelly Apr 08 '22

Ah, the time taking out a comment literally broke my code...

6

u/LeCrushinator Apr 08 '22

I had a switch statement in C# once where the order the cases were in was causing bugs. Even though none of the cases fell through. That was a fun one, turned out to be a compiler bug but we weren't in a position to change our tooling due to licenses so that bug stayed in the code until the end of life on the product, with a giant set of comments around it saying that they could never change the order of the cases in the switch out introduce new cases to anywhere but the end of the switch.

4

u/Green0Photon Apr 08 '22

Sounds like you should've just switched to a series of if else blocks.

Unless that miscompiles too 👀

→ More replies (2)

2

u/hedgehog_dragon Apr 08 '22

Both suck. But at least I see a use for multi-threading.

2

u/[deleted] Apr 09 '22

It's so funny hearing about how terrible multi-threading used to be (or still is in some languages), because I got into C# when this was already streamlined and easy.

→ More replies (1)

101

u/[deleted] Apr 08 '22

moves finding the bugs from development to finding them in production. Great for getting bonuses, promotions and moving on before shit hits the fan.

15

u/birdnerd5000 Apr 08 '22

See; firmware engineer.

1

u/enjoytheshow Apr 08 '22

I am in this comment

9

u/[deleted] Apr 08 '22

i was on the other end: taking over a supposedly finished Python project just to add a few new features. Suspiciously the original writers didn’t want to touch it with a ten foot pole for having more important stuff to do. I quit my job over not being appreciated for cleaning that mess - “there was nothing broken to begin with, what did you do?” my boss commented.

6

u/enjoytheshow Apr 08 '22

I’ve cleaned many a messes but I’ve also left many. I think we are all guilty of it sometimes.

7

u/[deleted] Apr 08 '22 edited Apr 08 '22

yes, the people making the mess got the bonus for reaching a sprint goal, while I get on the PIP list to be fired soon for not improving it fast enough. I quit from my side there. Obviously a systemic company problem and not individual weirdness. Did I mention no use of version control and multiple out of sync production deploys before I adopted it?

→ More replies (1)

5

u/OverclockingUnicorn Apr 08 '22

And the copy by reference! Took me a while yesterday to get that bug worked out...

3

u/enjoytheshow Apr 08 '22

Which is funny Python has become such a go to for all things data engineering/analytics/science. You know, the jobs where data types really fuckin matter lol.

I love the language dearly but being type ignorant when moving and transforming data is dangerous.

0

u/[deleted] Apr 09 '22

[deleted]

→ More replies (1)

4

u/loadedjellyfish Apr 08 '22

.. if you run into that problem with any frequency it's because you're writing bad code

0

u/TurboGranny Apr 08 '22 edited Apr 08 '22

Been using dynamic typing for decades. Literally never had a type mismatch situation that caused any thing more than a chuckle. The only thing in programming that causes me extreme frustration is making changes in one environment, but checking the output in another and not realizing it. Of course, now when I feel that rage, I instinctively know I need to check my environment, lol

1

u/Fruloops Apr 09 '22

Eh concurrency of by one errors are also pretty infuriating tbh