this post was submitted on 19 Sep 2024
741 points (98.1% liked)

Programmer Humor

32047 readers
1390 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 6 points 39 minutes ago

If you love me meet me at first floor

Americans 😒 British πŸ€·β€β™‚οΈ

[–] [email protected] 2 points 20 minutes ago* (last edited 19 minutes ago) (1 children)

Bullshit.

Every programmer knows that 'A' in ['A', 'B', 'C', 'D'] would be the 0th item; the first item is 'B'

[–] [email protected] 1 points 35 seconds ago

That would be wrong in every technical sense. You're saying that .first() would skip the 0th item.

First = leftmost.

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

And then he texts back 'where are you?' And then she texts back 'the first table' and he replies 'umm I'm here too. But I don't see you' confused she asks him ' table 0p?' And then '01*?' He says 'no, 00.' Releaved she says 'lol I am at table 01' he chuckles 'I am at 00, I'll go find you'

Later they get married and have kids. But relationship collapses and it ruins both of them and they cannot find the heart to love anyone again. Their children grow up broken and struggle through life. Some get arrested end up in prison, all of them repeatedly fall into a series of toxic relationships for the rest of their lives.

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

πŸ™… zeroth, first, second, third
πŸ‘‰ Zerost, onest, twost, threest

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

This would work better as Nth floor of a building

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

Hey, if she thinks 1 is 1st index then you dogged a bullet and deserve better.

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

you dogged a bullet

😳

[–] [email protected] 20 points 3 hours ago

The real punch line is that in a cafe run by programmers, esoteric rules are in full force, but tables 0 and 1 are no where near each other.

[–] [email protected] 9 points 3 hours ago (1 children)
[–] [email protected] 2 points 1 hour ago (1 children)
[–] [email protected] 2 points 30 minutes ago

Dangit Bobby!

[–] [email protected] 33 points 5 hours ago (3 children)

In the UK it's called a ground table.

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

So it was a spelling mistake? They're actually The Knights of The Ground Table!

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

They dance whenever they're gable?

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

do you also have minced tables there?

[–] [email protected] 52 points 6 hours ago (3 children)

She is right, using 0 index for physical stuff is stupid.

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

Your rulers start at 1? That sounds annoying.

[–] [email protected] 1 points 21 minutes ago* (last edited 20 minutes ago)

Your job is to move apples from one bin to another. You pick up the first one and set it in the other bin, and say "zero."?

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

Rulers measure cardinal quantities and not ordinal ones. There is no cardinal numbering scheme that starts at 1, all of them "start" at 0. For ordinal numbering schemes, the symbols are arbitrary anyway and you can start with whatever you want. It's equally valid to start with 1, 0, -1, A, or "aardvark". The only benefit to picking 1 as the start is to make it easier to count with your fingers while picking 0 lets you easily convert an ordinal quantity to a cardinal one.

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

I've seen a lot of rulers that actually don't have a mark at 0 and instead go right to the edge as 0. Typically they are worn down, being made of wood, so the accuracy of the first inch is dubious. To ensure the distance is correct, sliding the ruler down one unit is a good idea. So, my ruler starts at 0 but my measurements start at 1.

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

That's why decent rulers have a 0 and a margin:

plastic ruler starting at 0 cm

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

It really depends on what you're measuring. Good luck measuring the distance from a corner if you can't get 0 to touch the end.

Tape measures are almost always designed with this in mind, so you can hook the end over an edge, or butt it up against something and the measurement will be accurate both ways, since the metal end can slide in or out by just the right amount.

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

Just shave down the rulers margin!

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

Not on this side of the pond. We typically don't have a ground floor, that's just the first floor.

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

i wish the people making buildings around here knew that. some start at floor 3, others at 5. some start at 0. others at 2. every building has its own story. you need to understand the building before you can understand your position in it.

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

if a building is built into a hillside in the uk and has exits on floors 2 and 5, which would be the ground floor?

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

it’s floor 5 from monday to wednesday, and floor 2 from thursday to sunday

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

Why? It seems exactly as valid to me, and more valid if you like positional numberings of your physical stuff.

You just count the number of times you departed from an item in order, rather than the times you arrived.

[–] [email protected] 3 points 3 hours ago

Plot twist, neither cared about the table number

One went to the first table produced, the other to the first table placed

[–] [email protected] 26 points 6 hours ago

That is why my restaurant will number tables by UUID.

[–] [email protected] 23 points 6 hours ago

maybe she's a lua developer

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

Don't wanna state the obvious, but it looks like they still ended up staring at each other for the rest of the evening.

They have shown that they still love each other, so hope they can work with their one irreconcilable difference.

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

I love the idea that they're at two adjacent tables, each one staring at the other wondering why they hate them.

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

They hate each other because they are intolerant to one another's index choices

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

It’s for the best

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

It clearly says 1

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

Wouldn't it be nice if documentation used the words index and offset consistently?

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

The problem is that they both are contextual and can mean any position in a list/array. The starting index or starting offset is generally zero, but could be one, depending on the language used.

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

i wonder why people haven’t made a language that starts indexing at 2 yet. maybe some day

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

Maybe this could be a feature in brainfuck or COBOL.

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

god i hope so

load more comments (3 replies)
[–] [email protected] 13 points 8 hours ago

I still mess this up for lists in Python...

load more comments
view more: next β€Ί