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

Programmer Humor

420 readers
3 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 32 comments
sorted by: hot top controversial new old
[–] Deceptichum@kbin.social 71 points 1 year ago* (last edited 1 year ago) (1 children)

And the worst part is when it actually does and you have no fucking idea what went wrong before.

[–] MrCookieRespect@reddthat.com 18 points 1 year ago

The pc had the hiccups and now it's fine. Problem solved!

[–] Pantrygheist@programming.dev 64 points 1 year ago (2 children)

That's step zero: rule out black magic

[–] embed_me@programming.dev 39 points 1 year ago (1 children)

Those damn cosmic rays flipping my bits

[–] CanadaPlus@futurology.today 2 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.

[–] Danitos@reddthat.com 3 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.

[–] CanadaPlus@futurology.today 1 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.

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

[–] Peafield@programming.dev 27 points 1 year ago

The first is a surprise; the second is testing.

[–] Blackmist@feddit.uk 27 points 1 year ago (4 children)

Yeah, but sometimes it works.

[–] noddy 9 points 1 year ago

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

[–] CanadaPlus@futurology.today 5 points 1 year ago

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

[–] Octopus1348@lemy.lol 5 points 1 year ago* (last edited 1 year 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.

[–] KairuByte@lemmy.dbzer0.com 1 points 1 year ago

Legit happens without a race condition if you’ve improperly linked libraries that need to be built in a specific order. I’ve seen more than one solution that needed to be run multiple times, or built project by project, in order to work.

[–] quantenzitrone@feddit.de 16 points 1 year ago

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

[–] nieceandtows@programming.dev 16 points 1 year ago (1 children)

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

[–] TurtleTourParty@midwest.social 15 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...

[–] Hupf@feddit.de 9 points 1 year ago

Thank you for playing Wing Commander!

[–] PoolloverNathan@programming.dev 12 points 1 year ago

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

[–] Buttons@programming.dev 11 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.

[–] reverendsteveii@lemm.ee 6 points 1 year ago

it's only dumb til it works

[–] attero@feddit.de 4 points 1 year ago

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

[–] drsensor@programming.dev 3 points 1 year ago

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"

[–] tengkuizdihar@programming.dev 2 points 1 year ago

Einstein did say...

[–] Jimmycrackcrack@lemmy.ml 2 points 1 year ago (2 children)
[–] puttputt 11 points 1 year ago (1 children)
[–] gandalf_der_12te@feddit.de 1 points 1 year ago* (last edited 1 year ago)

Every sufficiently complicated system is indistinguishable from being alive, and living beings need some warm-up time.

[–] CodeMonkey@programming.dev 6 points 1 year ago* (last edited 1 year ago)

All the time. Causes include:

  • Test depends on an external system (database, package manager)
  • Race conditions
  • Failing the test cleared bad state (test expects test data not to be in the system and clears it when it exits)
  • Failing test set up unknown prerequisite (Build 2 tests depends on changes in Build 1 but build system built them out of order)
  • External forces messing with the test runner (test machine going to sleep or running out of resources)

We call those "flaky tests" and only fail a build if a given test cannot pass after 2 retries. (We also flag the test runs for manual review)

[–] freakrho@programming.dev 1 points 1 year ago

on xcode i would say it has a 50% chance of working