this post was submitted on 11 Feb 2025
991 points (100.0% liked)

Programmer Humor

21779 readers
2422 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] 99 points 1 month ago (5 children)

Git default branch renamed back from main to master

[–] [email protected] 47 points 1 month ago (1 children)

and all the others start with "slave/"

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

Merge me senpai

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

(Someone else made it but I can't find the source)

load more comments (3 replies)
[–] [email protected] 90 points 1 month ago (1 children)

reverting main back to master

[–] [email protected] 41 points 1 month ago (2 children)

Yeah...this one is sadly on brand

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

Sadly? Master branch never implied the existence of a slave branch. It was one of the dumbest pieces of woke incursion into tech.

[–] [email protected] 26 points 1 month ago

It was kind of pointless, but at least it made software work with custom default branches.

[–] [email protected] 24 points 1 month ago (5 children)

Yes exactly. It’s a reference to the recording industry’s practice of calling the final version of an album the “master” which gets sent for duplication.

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

In alignment with this, we should not replace the master branch with the main branch, we should replace it with the gold branch.

Every time a PR gets approval and it’s time to merge, I could declare that the code has “gone gold” and I am not doing that right now!

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

Merged -> gone gold

Deployed -> gone platinum

Gone a week without crashing production -> triple platinum

load more comments (4 replies)
[–] [email protected] 9 points 1 month ago (5 children)

But why even? There's no risk to changing it and some risk to keeping it. That's the reason for the push to change it. Keeping something just because it's tradition isn't a good idea outside ceremonies.

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

It's the principle of letting uneducated people dictate what words are acceptable to us

load more comments (4 replies)
[–] [email protected] 10 points 1 month ago* (last edited 1 month ago) (3 children)

There is definitely a risk in changing it. Many automation systems that assume there is a master branch needed to be changed. Something that's trivial yes but changing a perfectly running system is always a potential risk.

Also stuff like tutorials and documentation become outdated.

load more comments (3 replies)
load more comments (3 replies)
load more comments (1 replies)
load more comments (1 replies)
[–] [email protected] 72 points 1 month ago* (last edited 1 month ago) (3 children)
  • Push directly to master, not main
  • No command line args, just change the global const and recompile
  • No env vars either
  • Port numbers only go up to 5280, the number of feet in a mile
  • All auth is just a password; tokens are minority developers, not auth, and usernames are identity politics
  • No hashes – it's the gateway drug to fentanyl
  • No imports. INTERNAL DEVELOPERS FIRST
  • Exceptions are now illegal and therefore won't occur, so no need to check for them
  • SOAP/XML APIs only
  • No support for external machines. If it's good enough for my machine, it's good enough for yours.
[–] [email protected] 17 points 1 month ago

Exceptions are now illegal and therefore won't occur, so no need to check for them

Ah, I see you've met C++ developers.

[–] [email protected] 8 points 1 month ago

No command line args, just change the global const and recompile

Nah, don't use global variables, magic values everywhere. And don't use const whatsoever, we need to move fast and break things, we can't let something immutable stop us

load more comments (1 replies)
[–] [email protected] 63 points 1 month ago (2 children)

Main branches will be renamed Master

[–] [email protected] 23 points 1 month ago (1 children)
load more comments (1 replies)
load more comments (1 replies)
[–] [email protected] 32 points 1 month ago* (last edited 1 month ago) (11 children)

GTFOH with that. 1-indexed arrays?! You monster.

(Mostly joking... Ok, somewhat joking :P )

[–] [email protected] 40 points 1 month ago (4 children)
[–] [email protected] 49 points 1 month ago (6 children)

Lua had been banned from the chat

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

In Lua all arrays are just dictionaries with integer keys, a[0] will work just fine. It's just that all built-in functions will expect arrays that start with index 1.

[–] [email protected] 16 points 1 month ago

Your argument isn't making me any happier - it just fills me with more rage.

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

That's slightly misleading, I think. There are no arrays in Lua, every Lua data structure is a table (sometimes pretending to be something else) and you can have anything as a key as long as it's not nil. There's also no integers, Lua only has a single number type which is floating point. This is perfectly valid:

local tbl = {}
local f = function() error(":(") end

tbl[tbl] = tbl
tbl[f] = tbl
tbl["tbl"] = tbl

print(tbl)
-- table: 0x557a907f0f40
print(tbl[tbl], tbl[f], tbl["tbl"])
-- table: 0x557a907f0f40	table: 0x557a907f0f40	table: 0x557a907f0f40

for key,value in pairs(tbl) do
  print(key, "=", value)
end
-- tbl	=	table: 0x557a907f0f40
-- function: 0x557a907edff0	=	table: 0x557a907f0f40
-- table: 0x557a907f0f40	=	table: 0x557a907f0f40

print(type(1), type(-0.5), type(math.pi), type(math.maxinteger))
-- number	number	number	number
load more comments (1 replies)
[–] [email protected] 9 points 1 month ago

Fortran angrily starts typing...

load more comments (4 replies)
load more comments (3 replies)
load more comments (10 replies)
[–] [email protected] 28 points 1 month ago (2 children)

Error handling should only be with "if"

Variable names must be generic and similar to each-other

Debugging is only done with prints

Version numbers must be incoherent, hard to order correctly, contain letters and jump in ways that don't align with the updates done.

[–] [email protected] 8 points 1 month ago

Single letters or UTF8 symbols only. Emojis are encouraged.

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

Variable names should be var{n} where n = 0, 1, 2...

load more comments (2 replies)
[–] [email protected] 24 points 1 month ago

MAGA - Make Assembly Great Again

[–] [email protected] 24 points 1 month ago

He’s got to be in contact with the CEO of my company, this is trade secret theft if not…

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

From this point on, all arrays are reverse-indexed.

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

Hey now, you know that according to the Bible the biggest number is a million. Anything larger than that including infinity is some of that "woke shit".

Your array will be 999,999, 999,998, 999,997 ...

[–] [email protected] 20 points 1 month ago (1 children)

NGL, this kind of form of putting the decisions the monkey-in-charge is making in a way experts in a field will understand, is a very good way to showcase the absurdity.

load more comments (1 replies)
[–] [email protected] 17 points 1 month ago (4 children)

Am I The only one that sees the tie as yellow in this photo?

[–] [email protected] 9 points 1 month ago
load more comments (3 replies)
[–] [email protected] 11 points 1 month ago

Halfway to Lua lol

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

I don't get why only four of these are jokes

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

Arrays not starting at 1 bother me. I think the entrenched 0-based index is more important than any major push to use 1 instead, but if I could go back in time and change it I would.

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

It really doesn't make sense to start at 1 as the value is really the distance from the start and would screw up other parts of indexing and counters.

[–] [email protected] 9 points 1 month ago (5 children)

It would screw up existing code but doing [array.length() -1] is pretty stupid.

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

Haven't heard of the stack address thing, anyone got a TLDR on the topic?

[–] [email protected] 24 points 1 month ago* (last edited 1 month ago)

https://softwareengineering.stackexchange.com/questions/386194/why-do-we-still-grow-the-stack-backwards

TL;DR: For historical reasons stacks growing down is defined in hardware on some CPUs (notably x86). On other CPUs like some ARM chips for example you (or more likely your compiler's developer) can technically choose which direction stacks go but not conforming to the historical standard is the choice of a madman.

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

Pretty sure that it’s something a long the lines of “stack begins high, grows down, while heap behind low grows high” when they meet, it’s a stack overflow

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