this post was submitted on 24 Jan 2024
1013 points (100.0% liked)

Programmer Humor

22189 readers
1515 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
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 100 points 1 year ago (2 children)

That's step zero: rule out black magic

[–] [email protected] 56 points 1 year ago (2 children)

Those damn cosmic rays flipping my bits

[–] [email protected] 9 points 1 year ago

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

[–] [email protected] 4 points 1 year ago (1 children)

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

[–] [email protected] 4 points 1 year 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.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

Interesting. I wonder why they didn't just move it to somewhere with less radiation? And clearly, they have another more trustworthy machine doing the checking somehow. A self-correcting OS would have to parity check it's parity checks somehow, which I'm sure is possible, but would be kind of novel.

In a really ugly environment, you might have to abandon semiconductors entirely, and go back to vacuum as the magical medium, since it's radiation proof (false vacuum apocalypse aside). You could make a nuvistor integrated "chip" which could do the same stuff; the biggest challenge would be maintaining enough emissions from the tiny and quickly-cooling cathodes.

[–] [email protected] 15 points 1 year ago

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

[–] [email protected] 71 points 1 year ago (1 children)

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

runs again

[–] [email protected] 41 points 1 year ago

The first is a surprise; the second is testing.

[–] [email protected] 34 points 1 year ago (1 children)
[–] [email protected] 67 points 1 year 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.

[–] [email protected] 21 points 1 year ago (1 children)
[–] [email protected] 27 points 1 year ago (1 children)

ok, then we ship your machine.

[–] [email protected] 28 points 1 year ago (1 children)

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

[–] [email protected] 9 points 1 year ago

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

[–] [email protected] 23 points 1 year ago (1 children)

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

[–] [email protected] 3 points 1 year ago

Some code has bugs.

Some code has ghosts.

[–] [email protected] 22 points 1 year ago (2 children)
======== 37/37 tests passing ========
[–] [email protected] 12 points 1 year ago

That's when the real debug session begins

[–] [email protected] 11 points 1 year ago (6 children)

Great time to find out your tests are useless!

[–] [email protected] 4 points 1 year ago

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

load more comments (5 replies)
[–] [email protected] 21 points 1 year ago (1 children)

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

[–] [email protected] 19 points 1 year ago (1 children)

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

[–] [email protected] 10 points 1 year ago

Thank you for playing Wing Commander!

[–] [email protected] 19 points 1 year 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.

[–] [email protected] 19 points 1 year ago

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

[–] [email protected] 17 points 1 year 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?

[–] [email protected] 11 points 1 year ago

That and a make clean can work wonders.

[–] [email protected] 4 points 1 year ago

Autosave on focus loss dude.

[–] [email protected] 17 points 1 year ago (1 children)

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

[–] [email protected] 14 points 1 year ago (1 children)

I actually did this earlier today

load more comments (1 replies)
[–] [email protected] 11 points 1 year ago

Somehow higher than 0% success rate.

[–] [email protected] 10 points 1 year ago

it's only dumb til it works

[–] [email protected] 5 points 1 year ago

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

[–] [email protected] 5 points 1 year ago

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

[–] [email protected] 5 points 1 year ago

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

[–] [email protected] 4 points 1 year 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)
[–] [email protected] 3 points 1 year ago

Einstein did say...

load more comments
view more: next ›