this post was submitted on 11 Feb 2025
674 points (97.1% liked)

Programmer Humor

20039 readers
2462 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] 16 points 7 hours ago* (last edited 7 hours ago)
  • 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.
[–] shortrounddev 38 points 10 hours ago (2 children)

Main branches will be renamed Master

[–] spongeborgcubepants 16 points 10 hours ago

More like Grandwizard

[–] iAvicenna 2 points 9 hours ago

Nope Main branches will be renamed Daddy

[–] Phoenix3875 12 points 10 hours ago

MAGA - Make Assembly Great Again

[–] MTK 19 points 14 hours 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.

[–] Randelung 5 points 10 hours ago

Single letters or UTF8 symbols only. Emojis are encouraged.

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

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

load more comments (1 replies)
[–] [email protected] 64 points 18 hours ago (1 children)

reverting main back to master

[–] [email protected] 28 points 17 hours ago (2 children)

Yeah...this one is sadly on brand

[–] [email protected] 22 points 13 hours 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.

[–] qaz 13 points 10 hours ago

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

[–] Maggoty 7 points 11 hours ago (1 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.

[–] shortrounddev 5 points 10 hours ago (2 children)

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

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

letting uneducated people

More like overeducated people

[–] eager_eagle 1 points 4 hours ago

overeducated people who can't see that "master" has multiple meanings.

[–] Maggoty 1 points 8 hours ago

What makes you think they're uneducated?

[–] chonglibloodsport 7 points 11 hours ago (1 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] 4 points 9 hours 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] 2 points 7 hours ago

Merged -> gone gold

Deployed -> gone platinum

Gone a week without crashing production -> triple platinum

load more comments (1 replies)
[–] riodoro1 6 points 11 hours ago

For this political correctness you get trunk.

[–] [email protected] 18 points 15 hours ago (2 children)

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

load more comments (2 replies)
[–] [email protected] 70 points 19 hours ago (4 children)

Git default branch renamed back from main to master

[–] phcorcoran 7 points 11 hours ago

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

[–] [email protected] 5 points 11 hours ago

That one actually seems plausible, if he ever learns about that whole thing

[–] mEEGal 37 points 18 hours ago (1 children)

and all the others start with "slave/"

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

Merge me senpai

load more comments (1 replies)
[–] [email protected] 2 points 9 hours ago (3 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] 1 points 59 minutes ago

this is what messed me up with ZSH for a bit, having a shell default to 1 instead of 0 was weird

[–] [email protected] 12 points 9 hours ago (3 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.

[–] IndustryStandard 5 points 9 hours ago (2 children)

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

[–] [email protected] 2 points 8 hours ago

A lot of languages have a .last() or negative indexer ([-1]) to get the last item though.

[–] thedeadwalking4242 3 points 9 hours ago* (last edited 5 hours ago) (1 children)

For i = 0; I < array.length; i++

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

i < array.length or else you overflow.

[–] Klear 3 points 9 hours ago

It doesn't make sense that the fourth element is element number 3 either.

Ultimately it's just about you being used to it.

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

Yeah, but if we went back and time and changed it then there wouldn't be other stuff relying on it being 0-based.

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

It was not randomly decided. Even before arrays as a language concept existed, you would just store objects in continuous memory.

To access you would do $addr+0, $addr+1 etc. The index had to be zero-based or you would simply waste the first address.

Then in languages like C that just got a little bit of syntactic sugar where the '[]' operator is a shorthand for that offset. An array is still just a memory address (i.e. a pointer).

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

I know. But in the alternate reality where we'd been using 1-based indices forever you'd be telling me how useful it is that the first element is "1" instead of zero and I'd be saying there are some benefits to using zero based index because it's more like an offset than an index.

[–] chuckleslord 3 points 9 hours ago

Also remove null reference

[–] [email protected] 4 points 11 hours ago (3 children)

What about stacks grows to higher addresses?

load more comments (3 replies)
[–] Thcdenton 8 points 14 hours ago

Halfway to Lua lol

load more comments
view more: next ›