this post was submitted on 11 Apr 2025
1154 points (99.4% liked)

Programmer Humor

22619 readers
1192 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] 1 points 2 days ago* (last edited 2 days ago)

tries to hide C:\jp\scripts\whuj9f.bat and the fact he copied 90% of the thing from a post in the offtopic section of a gaming forum behind his back (with no success)

oh also hhe62m.lsp was copied off a magic spellbook dont ask about it

[–] [email protected] 46 points 1 week ago (1 children)

This symbol isn't needed for spells this long, but it's considered best practice and other wizards will make fun of me for not including it, even though it isn't needed.

[–] [email protected] 7 points 1 week ago (1 children)
[–] [email protected] 2 points 5 days ago

LBRP versus the Lord's prayer.

[–] [email protected] 27 points 1 week ago

Who is the artist?

[–] [email protected] 25 points 1 week ago* (last edited 1 week ago) (4 children)

If you’re adding code you don’t understand to a production system you should be fired

Edit: I assumed it was obvious from context that I’m referring to copy-pasting code from stack overflow or an LLM or whatever without knowing what it does but apparently that needs to be said explicitly.

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

Never use libraries you don’t contribute to in Production

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

There's a huge difference between copy-pasting code you don't understand and using a library with the assumption that the library does what it says on the tin. At the very least there's a clear boundary between your code and not-your-code.

[–] [email protected] 10 points 1 week ago (1 children)

I really like to build from zero, but some things are better copied, no matter if you fully understand them or fall short. :)

For example, I'm not qualified to check if Hamilton and Euler were correct - I only do as they explained, and later double-check the output against input.

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

I didn't say never copy and paste. I'm saying when you push a commit you should understand what all the LOC in that commit do (not counting vendored dependencies). If you don't understand how something works, like crypto (not sure what Hamilton or Euler refers to in this context), ideally you would use a library. If you can't, you should still understand the code sufficiently well to be able to explain how it implements the underlying algorithm. For example if you're writing a CRC function you should be able to explain how your function implements the CRC operations, even if you don't have a clue why those operations work.

[–] [email protected] 13 points 1 week ago (1 children)

Many times the code we work on is built in abstractions we don't know about from top to bottom.

[–] [email protected] 1 points 1 week ago

If you are submitting work, you should understand how the code you're submitting works. Sure, you don't have to know exactly how the code it calls works, but if you're submitting code and there's a block of code and you have no clue how that block works, that's a problem.

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

So you code everything in Assembly from scratch?

[–] [email protected] -2 points 1 week ago (1 children)

Are you seriously trying to equate "I don't know which instructions this code is using" to "I copied code I don't understand"? Are you seriously trying to say that someone who doesn't know how to write x = a + b in assembly doesn't understand that code?

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

No, they're pointing out that it's a little silly to expect everyone to understand each and every later of abstraction fully before deploying code.

[–] [email protected] 0 points 1 week ago* (last edited 1 week ago)

I said you need to understand what the code you wrote (as in, LOC that git blame will blame on you) does. Not that you need to fully understand what the code it calls does. It should be pretty obvious from context that I'm referring to copy-pasting code from stack overflow or an LLM or whatever without knowing what it does.

[–] [email protected] 1 points 1 week ago

In what world is assembly more readable or easier to understand?

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

No I just read the stack overflow guy's explanation and the other small comments around and they explain it.

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

Closed as duplicate

[–] [email protected] 3 points 1 week ago (1 children)

I don't understand Assembly. Straight up binary only for me.

[–] [email protected] 1 points 1 week ago (1 children)

Same here. Assembly is a little too high level for me. I don't like the assembler guessing what I meant. I like telling processors exactly what to do.

Honestly, modern CISC processors are also a little high level if you think about it. I don't want the processor guessing what I meant to tell it. I like telling them exactly what to do.

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

The processor is just going to guess wrong and might occasionally waste a few cycles!

[–] [email protected] 6 points 1 week ago (2 children)

Man this is just another great example of why I think software is essentially magic.

At the root of it, the hardware, it's magic smoke. It's all based on magic from that point up - because the layer below the one you are using "works because it does."

[–] [email protected] 2 points 1 week ago* (last edited 6 days ago)

I think it depends a lot on a person's individual knowledge. If you keep studying far enough away from your main area of expertise, there'll still be some point where you stop and have to blindly accept that something "just works", but it will no longer feel like that's what your main field is based upon.

Imagine a chef. You can be an OK chef just by memorizing facts and getting a "feel" for how recipes work. Many chefs study chemistry to better understand how various cooking/baking processes work. A few might even get into the physics underlying the chemical reactions just to satisfy curiosity. But you don't need to keep going into subatomic particles to have lost the feeling that cooking is based on mysterious unknowns.

For my personal interest, I've learned about compilers, machine code, microcode and CPU design, down to transistor-based logic. Most of this isn't directly applicable to modern programming, and my knowledge still ends at a certain point, but programming itself no longer feels like it's built on a mystery.

I don't recommend that every programmer go to this extreme, but we don't have to feel that our work is based on "magic smoke" if we really don't want to.

ADDED: If anyone's curious, I highly recommend Ben Eater's YouTube videos about "Building an 8-bit breadboard computer!" It's a playlist/course that covers pretty much everything starting from an overview of oscillators and logic gates, and ending with a simple but functional computer, including a CPU core built out of discrete components. He uses a lot of ICs, but he usually explains what circuits they contain, in isolation, before he adds them to the CPU. He does a great job of covering the important points, and tying them together well.

[–] [email protected] 8 points 1 week ago (2 children)

If writing software makes you some sort of magician then writing in assembly should surely mean you are a cleric or warlock.

[–] [email protected] 5 points 1 week ago (2 children)

I designed microcontrollers and wrote assembly for them

Now I'm just a regular software dudebro

What class do I get?

[–] [email protected] 1 points 1 week ago

Either respec or multiclass

[–] [email protected] 2 points 1 week ago

Seeker, you learned your people's language and then learned the way of the world.

[–] [email protected] 2 points 1 week ago

I havent worked with assembly or any firmware in 10+ years, but from memory, I think it's more like being a Witch Doctor. You got primitive things and no idea what they do, but the specific patterns and dances make things happen.

[–] [email protected] 1 points 1 week ago
[–] [email protected] 15 points 1 week ago* (last edited 1 week ago)

Pretty much most chem students doing labs.

load more comments
view more: next ›