this post was submitted on 11 Oct 2023
1111 points (98.1% liked)

Programmer Humor

31230 readers
1372 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 113 points 8 months ago (1 children)

Rule 9 from Agans's Debugging: If you didn't fix it, it ain't fixed

Intermittent problems are the worst...

[–] marcos 35 points 8 months ago (4 children)

The problem is, how do you fix it if you can't make it break?

The worst thing is when somebody comes to you saying "yeah, I had this problem yesterday, but it's working now".

[–] [email protected] 22 points 8 months ago (1 children)

this is a case for excessive logging man

likely won't help you actually fix the issue because miraculously you didn't log the three variables you actually need but it'll make you feel better in the meantime

[–] kameecoding 8 points 8 months ago* (last edited 8 months ago)

and gives you some headroom in improving performance since it's being choked by the excessive logging

load more comments (3 replies)
[–] [email protected] 72 points 8 months ago (4 children)

ngl my programming career helped me stay grounded in reality. Every impossible issue turned out to always have a cause, a reason to be there. Could have taken weeks to track down the issue, but there was always a cause.

But still.. every 3 or so years.. something actually impossible pops-up. Impossible to fix, impossible to reproduce, and suddenly gone from existence, as if it was never there.

[–] MrPoopyButthole 45 points 8 months ago (2 children)

Cosmic radiation! Bit flips! Quantum tunneling! Who TF knows...

[–] [email protected] 12 points 8 months ago

If only consumer hardware had ECC memory

load more comments (1 replies)
[–] tdawg 19 points 8 months ago (3 children)

Given how software is a giant Jenga tower made of smaller Jenga towers it's amazing any of it works at all

load more comments (2 replies)
load more comments (2 replies)
[–] [email protected] 36 points 8 months ago (1 children)

The longer I’m in IT, the more I realize that the adeptus mechanicus might be on to something with beseeching the machine spirit.

[–] peopleproblems 30 points 8 months ago (4 children)

A lot of people think I'm joking when I say I'm a good at what I do because I'm a witch doctor with computers. Software Engineering requires experience with the occult, at a minimum.

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

“In my professional opinion, this network is haunted.”
…haunted?
(Points to various certifications) “HAUNTED.”

[–] [email protected] 12 points 8 months ago (2 children)

And for some reason printers seem to be the place where the spirits are strongest

[–] [email protected] 6 points 8 months ago

I think you mean demons

[–] [email protected] 5 points 8 months ago

The demons are attracted to doorways, passages between spaces, worlds, and realms. And printers are the ultimate doorway: a portal through which ideas and concepts can leave the software realm and enter the physical

load more comments (3 replies)
[–] Traegs 33 points 8 months ago (2 children)

The other day I launched an old game and got met with an error, something about directX9 and missing a redistributable file or something. Decided not to fuck with it.

Yesterday I launched it again to take a closer look at the error message to see if I could fix it. No error message, game booted without issues.

My confusion.

[–] sheogorath 6 points 8 months ago

Don't forget them cosmic rays flipping bits in your memory.

[–] [email protected] 4 points 8 months ago

It got scared and decided to fix itself.

[–] [email protected] 29 points 8 months ago* (last edited 8 months ago)
if (new Date().getDay() % 2) {
    runCode();
}
[–] [email protected] 24 points 8 months ago (1 children)

I have this issue once in a while with PowerShell.

The environment gets f'up as you develop. You get strange shit happening or it blows up.

Restart PowerShell or reboot and it's all good

load more comments (1 replies)
[–] [email protected] 21 points 8 months ago

lucky, you have code gnomes. leave out an offering of mountain dew and pizza rolls to appease the spirits.

[–] takeda 20 points 8 months ago

Still better than my Go experience 2 years ago.

  • fails when deployed, after adding debug statements looks like in one structure there's 2 instead of 1, and looking at the code that should be impossible. Issue happens every single time.
  • the same exact unmodified container when downloaded and run locally works correctly every time.
[–] LazaroFilm 18 points 8 months ago (3 children)

I had that happen with embedded programming when you forget to flush the eeprom after changing your saved values.

[–] [email protected] 9 points 8 months ago (1 children)

hmm embedded. Beautifuly memories from uni. One lab my team forgot to remove a register whose supposed purpose was only enabling a communications bus (documentation didn't mention it doing anything else). Turns out that same register disables the dac which we needed for the new excersise. You learn to love the hardware datasheets real quick.

[–] LazaroFilm 10 points 8 months ago (1 children)

And when the data sheet is wrong that gets fun. You start parsing I2S for each bit and record the result until you see a pattern. Or when your program crashes the USB and you can’t reupload without hitting boot or reset but they are inside the box.

[–] [email protected] 7 points 8 months ago (1 children)

MY PEOPLE!!! My code recently decided to not erase the flash when writing new firmware, bricking the device. Good times. (Old code || new code does not make for a working system)

[–] LazaroFilm 5 points 8 months ago (3 children)

I’m dealing with this right now. Making the largest embedded project for me (self taught) RP2040 in Cpp with a TFT touch screen, an IMU with fusion, a strip of “neopixels”, a 12v battery voltage reader, some Lemo connectors and custom cables, all in a 3D printed case in 3 parts. I’m so close to the end but still facing some code issues.

load more comments (3 replies)
load more comments (2 replies)
[–] [email protected] 18 points 8 months ago

Build caches are a bitch.

[–] [email protected] 15 points 8 months ago

Cosmic radiation could always wreak havock by simply switching a 0 to a 1. It appears The Universe is Hostile to Computers.

[–] kamen 13 points 8 months ago

Maybe it only works on even dates, which is, you know, perfectly normal.

[–] [email protected] 12 points 8 months ago

In university, we had to complete weekly tasks. A few times, the validation script provided by my professor returned an error, meaning that my solution had a mistake. When I tried rerunning the script the following day, my answer was accepted. At the end of the last lecture, my professor came to me and told me that I was usually the first one to hand in a solution and that he sometimes used my answers to validate his results.

[–] FruitfullyYours 12 points 8 months ago

I've recently had the opposite: code worked then the next day without anything changing it didn't.

Turned out the J-Link programmer always needs the license check to work, but that expires every day at midnight. It only prompts again if you choose the app and restart it. So I couldn't get my debugger to work and spent hours trying to figure it out until I did the best thing. I turned it off and on again.

[–] [email protected] 12 points 8 months ago (1 children)

So... Network issue. I'm not falling for those ever again.

[–] [email protected] 9 points 8 months ago (1 children)

As a network engineer, I hate you. Everyone blames network, even when the program/code/script/etc is the only thing that won't work on it.

load more comments (1 replies)
[–] [email protected] 11 points 8 months ago (2 children)

just make sure you absolutely don't comment or document it then commit it to git with a cryptic commit message and even more cryptic author name and then hand it off to your coworkers

load more comments (2 replies)
[–] [email protected] 11 points 8 months ago

I had a bug in unity once where my project just stopped working. I hadn't changed anything, but I could no longer compile it or run the game in editor. I looked up the issue and apparently unity has/had a long-standing bug where the engine would rarely just quit being able to compile your scripts. The only solution was to make a new project and reimport all your assets, scripts, scenes, etc. Dunno if they ever figured out what was causing it or if it just kinda resolved itself and stopped showing up at some point. I don't really use unity much anymore.

[–] [email protected] 10 points 8 months ago

Code works

Ctrl+a, ctrl+x, ctrl+v

Code doest work

[–] [email protected] 8 points 8 months ago

As a full stack cloud dev usually for me it ends up being some lag between when Azure claims a thing was updated and when it actually was.

(shout out to azure B2C custom policies for taking like 10 minutes to actually reflect changes despite giving me a lil green checkmark)

[–] [email protected] 7 points 8 months ago (1 children)

Did you include an odd day of the month exception?

load more comments (1 replies)
[–] [email protected] 7 points 8 months ago (3 children)

Reminds me of the time I couldn't get my code to compile due to invisible unicode characters in the code I copy-pasted from the web.

load more comments (3 replies)
[–] ohlaph 6 points 8 months ago (1 children)

It do be like that sometimes... haha

load more comments (1 replies)
[–] [email protected] 5 points 8 months ago (2 children)

Setting up a stack of mongo db and unifi network application in docker compose
Doesnt work

Takes stack down, turns a setting off and on, starts the compose
Suddenly starts working

._.

load more comments (2 replies)
[–] Ryan213 4 points 8 months ago

Must've been the effective_date.

load more comments
view more: next ›