this post was submitted on 11 Feb 2025
585 points (96.8% liked)

Programmer Humor

20039 readers
1745 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] 3 points 17 minutes ago* (last edited 15 minutes 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. PROTECT INTERNAL DEVELOPMENT
  • Exceptions are now illegal and therefore won't occur, so no need to check for them
  • SOAP/XML APIs only
[–] shortrounddev 32 points 3 hours ago (2 children)

Main branches will be renamed Master

[–] iAvicenna 2 points 1 hour ago

Nope Main branches will be renamed Daddy

[–] spongeborgcubepants 13 points 3 hours ago

More like Grandwizard

[–] Phoenix3875 7 points 2 hours ago

MAGA - Make Assembly Great Again

[–] [email protected] 2 points 2 hours ago (2 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] 8 points 1 hour 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 4 points 1 hour ago (2 children)

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

[–] [email protected] 2 points 47 minutes ago

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

[–] thedeadwalking4242 3 points 1 hour ago (1 children)

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

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

i < array.length or else you overflow.

[–] Klear 3 points 1 hour 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 1 hour ago

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

[–] chuckleslord 1 points 2 hours ago

Also remove null reference

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

What about stacks grows to higher addresses?

[–] SamboT 2 points 1 hour ago (1 children)

Im unfamiliar with this as well. If you are allocating memory for a stack, why does it matter which direction it populates data? Is this just a convention?

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

I ask deepseek: Downward-growing stacks** are more common in many architectures (e.g., x86, ARM). This convention originated from early computer architectures and has been carried forward for consistency.

Funny, I can't remember, , because I did a lot of assembler back in my youth.

[–] SamboT 2 points 1 hour ago

Ah thank you so its just a convention.

[–] MTK 19 points 6 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 4 points 3 hours ago

Single letters or UTF8 symbols only. Emojis are encouraged.

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

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

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

Something something the cruelty is the point.

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

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

load more comments (2 replies)
[–] Thcdenton 8 points 6 hours ago

Halfway to Lua lol

[–] [email protected] 62 points 10 hours ago (12 children)

reverting main back to master

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