this post was submitted on 24 Jan 2024
970 points (98.1% liked)

Programmer Humor

19213 readers
344 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 1 year ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] Pantrygheist@programming.dev 97 points 8 months ago (2 children)

That's step zero: rule out black magic

[–] embed_me@programming.dev 55 points 8 months ago (2 children)

Those damn cosmic rays flipping my bits

[–] blanketswithsmallpox@lemmy.world 9 points 8 months ago

Please tell me you look skyward, shake your fist and yell damn you!!!!

[–] CanadaPlus@futurology.today 4 points 8 months ago (1 children)

I wonder if there's an available OS that parity checks every operation, analogous to what's planned for Quantum computers.

[–] Danitos@reddthat.com 4 points 8 months ago (1 children)

Unrelated, but the other day I read that the main computer for core calculation in Fukushima's nuclear plant used to run a very old CPU with 4 cores. All calculations are done in each core, and the result must be exactly the same. If one of them was different, they knew there was a bit flip, and can discard that one calculation for that one core.

load more comments (1 replies)
[–] DragonTypeWyvern 15 points 8 months ago

That feeling when it is, in fact, computer ghosts.

[–] KingBoo@lemmy.world 68 points 8 months ago (1 children)

Me: "Hmm... No... No the code is good, it's the compiler that's wrong."

runs again

[–] Blackmist@feddit.uk 58 points 8 months ago (9 children)

Yeah, but sometimes it works.

[–] Aceticon@lemmy.world 20 points 8 months ago (1 children)

It's even worse then: that means it's probably a race condition and do you really want to run the risk of having it randomly fail in Production or during an important presentation? Also race conditions generally are way harder to figure out and fix that the more "reliable" kind of bug.

load more comments (1 replies)
[–] CanadaPlus@futurology.today 9 points 8 months ago

Mmm, race conditions, just like mama used to make.

[–] noddy@beehaw.org 9 points 8 months ago

Good luck figuring out why it sometimes doesn't work 🙃

[–] Octopus1348@lemy.lol 7 points 8 months ago* (last edited 8 months ago)

There was that kind of bug in Linux and a person restarted it idk how much (iirc around 2k times) just to debug it.

[–] crushyerbones@lemmy.world 6 points 8 months ago

This is 100% valid when dealing with code generation sometimes and I hate it

load more comments (4 replies)
[–] Peafield@programming.dev 38 points 8 months ago

The first is a surprise; the second is testing.

[–] xor@infosec.pub 33 points 8 months ago (1 children)
[–] vamputer@infosec.pub 65 points 8 months ago (1 children)

Hmm..you may be right. I'll get my Hispanic friend to run it and see if he gets the same result.

[–] aiden@lemm.ee 21 points 8 months ago (1 children)
[–] gaston1592@feddit.de 27 points 8 months ago (1 children)

ok, then we ship your machine.

[–] quantenzitrone@feddit.de 27 points 8 months ago (1 children)

i sometimes do that so i can inspect the error messages on a cleared terminal

[–] winky9827b@lemmy.world 9 points 8 months ago

Sometimes I forget what I was looking for and have to restart the mental loop when doing this.

[–] PoolloverNathan@programming.dev 22 points 8 months ago (1 children)

One of my old programs produces a broken build unless you then compile it again.

[–] mindbleach@sh.itjust.works 3 points 8 months ago

Some code has bugs.

Some code has ghosts.

[–] gravitas_deficiency@sh.itjust.works 20 points 8 months ago (2 children)
======== 37/37 tests passing ========
[–] OsrsNeedsF2P@lemmy.ml 12 points 8 months ago

That's when the real debug session begins

[–] lorty@lemmy.ml 11 points 8 months ago (6 children)

Great time to find out your tests are useless!

They’re not completely useless. They’re conditionally useless, and we don’t know the condition yet.

load more comments (5 replies)
[–] Buttons@programming.dev 19 points 8 months ago

If that doesn't work, sometimes your computer just needs a rest. Take the rest of the day off and try it again tomorrow.

[–] BigBenis@lemmy.world 19 points 8 months ago

The crazy thing is that sometimes this just works...

[–] nieceandtows@programming.dev 19 points 8 months ago (1 children)

Just had that happen to me today. Setup logging statements and reran the job, and it ran successfully.

[–] TurtleTourParty@midwest.social 17 points 8 months ago (1 children)

I've had that happen, the logging statements stopped a race condition. After I removed them it came back...

[–] Hupf@feddit.de 11 points 8 months ago

Thank you for playing Wing Commander!

[–] Aceticon@lemmy.world 17 points 8 months ago (1 children)

Well, duh! You need to use the right incantations!

[–] DirkMcCallahan@lemmy.world 17 points 8 months ago (2 children)

I often do this, but I always hit Ctrl-S before running it again. Shamefully, this probably works about 10% of the time. Does that technically count as changing nothing?

[–] LazaroFilm@lemmy.world 11 points 8 months ago

That and a make clean can work wonders.

Autosave on focus loss dude.

[–] jerrythegenius@lemmy.world 14 points 8 months ago (1 children)

I actually did this earlier today

load more comments (1 replies)
[–] reverendsteveii@lemm.ee 10 points 8 months ago

it's only dumb til it works

[–] rockSlayer@lemmy.world 5 points 8 months ago

Sponsored by QA gang. Gotta make sure it's a 5/5 issue and not just a frequent issue

[–] Fixbeat@lemmy.ml 5 points 8 months ago

Got to make sure it's not one of those phantom failures.

[–] attero@feddit.de 5 points 8 months ago

The definition of insanity is doing the same thing over and over and expecting different results.

[–] drsensor@programming.dev 4 points 8 months ago (1 children)

My way: wrap it in a shell script and put a condition if exit status is not 0 then say "try clear the cache and run it again"

load more comments (1 replies)
load more comments
view more: next ›