1281
Off by one solitude (fed.dyne.org)
submitted 1 day ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 103 points 1 day ago

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

[-] [email protected] 33 points 1 day ago

Your rulers start at 1? That sounds annoying.

[-] [email protected] 11 points 1 day 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] 15 points 1 day ago

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] 18 points 1 day ago

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

plastic ruler starting at 0 cm

[-] [email protected] 20 points 1 day ago

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] 7 points 23 hours ago

since the metal end can slide in or out by just the right amount.

OMG! I genuinely thought all the tape measures I have handled were a little broken.

[-] [email protected] 5 points 1 day ago

Just shave down the rulers margin!

[-] [email protected] 8 points 1 day ago* (last edited 1 day 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] 6 points 21 hours ago

When playing games with the kids, we start at 0 being the position you are currently in, then count from there.

e.g. in snakes and ladders, if you are on spot 30 and roll a 5, tap spot 30 and say "zero", then spot 31 is "one" etc.. till you are at spot 35 saying "five".

Teaches the kids about zero and avoids miss counts from the younger ones counting their current position as "one"

[-] [email protected] 7 points 1 day ago

There's another way to think about it which I actually use. Look in the empty bin and say "zero", then move an apple and say "one".

load more comments (16 replies)
this post was submitted on 19 Sep 2024
1281 points (98.6% liked)

Programmer Humor

32060 readers
1147 users here now

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

Rules:

founded 5 years ago
MODERATORS