this post was submitted on 26 Aug 2024
1195 points (99.1% liked)

Programmer Humor

19480 readers
30 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 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] lemmytellyousomething@lemmy.dbzer0.com 118 points 2 months ago* (last edited 2 months ago) (58 children)

Why are they even named like this?

When I read code, I want to be able to read it.....

Is this from a time when space was expensive and you wanted to reduce the space of the source files on the devs PC???

For me (with a native language != english), this made it a lot harder to get into programming in the first place.

[–] sandalbucket@lemmy.world 19 points 2 months ago (4 children)

Did you know that in the first version of php, each function name would be hashed to lookup the code to run it? And the hashing algorithm was: the first letter. So all the functions started with a different letter.

[–] rainerloeten@lemmy.world 9 points 2 months ago (2 children)
[–] FooBarrington@lemmy.world 19 points 2 months ago (1 children)

It's not. PHP used to use the function length as hash buckets, so by having evenly distributed lengths the execution time was faster. No idea where GP came up with that.

[–] racemaniac@lemmy.dbzer0.com 1 points 2 months ago

GP specifically talked about the first version of PHP, sounds like it was just a dummy implementation as they were working on PHP, that then later got replaced with a proper implementation :)

[–] Honytawk@lemmy.zip 1 points 2 months ago

No it is, only 26 functions in total.

The Chinese had it way easier.

load more comments (1 replies)
load more comments (54 replies)