this post was submitted on 19 Sep 2024
1471 points (98.6% liked)

Programmer Humor

32562 readers
381 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] dave@feddit.uk 2 points 2 months ago (1 children)

Function/Method names, on the other hand, should be written so as to make the most sense to the humans reading and writing the code

Of course—that’s why we have such classics as stristr(), strpbrk(), and stripos(). Pretty obvious what the differences are there.

But to your point, the ‘intuitive’ counterpart to ‘zeroth’ is the item with index zero. What we have is a mishmash of accurate and colloquial terms for the same thing.

[–] xmunk@sh.itjust.works 1 points 2 months ago

explode('brain', 'ai')