57 points

Are you indexing your fingers or counting them ?

Indexing starts ar 0 but counting starts at 1.

permalink
report
reply
27 points

This.

One of the reasons indexing starts at zero is because back when we used to use pointers and memory addresses, the first byte(s) of an array were at the address where the array was stored. Let’s say it is at 1234. If it was an array of bytes, the first data element was at 1234, or 1234 + 0. The second element would be at 1235, or 1234 + 1. So the first element is at location 0 and the second at location 1, where the index is actually just an offset from the base address. There may be other/better reasons, but that’s what I was taught back in the 90s.

Counting always starts at 1 (if we’re only using integers). You don’t eat a hamburger and say you ate zero hamburgers.

permalink
report
parent
reply
10 points
*

There was a time when I had to switch back and forth between Fortran90 and C several times a day, and it messed me up so bad that doing simple tasks like counting apples at the grocery gave me anxiety.

permalink
report
parent
reply
9 points

I do say I ate zero hamburgers if I just started counting and I have yet to eat one

permalink
report
parent
reply
2 points

When you’ve eaten more than 50% of the hamburger, do you claim to have eaten one, or do you claim zero? Are you useing standard founding or are you using floor()?

permalink
report
parent
reply
5 points

“used to”?

permalink
report
parent
reply
3 points

Perchance programming with pointers has plunged as a percentage of programmers.

But thank you. I was hoping someone would notice that.

permalink
report
parent
reply
2 points
*
Deleted by creator
permalink
report
parent
reply
52 points

Ffs. 16, 8, 4, 2, 1.

permalink
report
reply
19 points

I’m glad I’m not the only one. My son is a year and half old. I’ve been teaching to count on his hand in binary since day 0. He goes wild and celebrates when we reach 31 🙂

permalink
report
parent
reply
7 points

My siblings and I always loved the number 4 because our puritanical mother was so casual about sticking her middle finger out at only that moment. That was just about the most taboo thing we could imagine, and it was as a result hilarious.

permalink
report
parent
reply
2 points

I’m in my mid 40s, and I’ve never thought to count in binary on my fingers. I haven’t needed to use binary for about 30 years, and I’m easily the geekiest of my friends, so I’ve never had an excuse to do it for fun.

You’ve just put a huge smile on my face.

Guess what I’m teaching my kid this week 😁

permalink
report
parent
reply
3 points

Most of the time it’s not exactly useful and some of the positions are awkward (e.g. 8, 9, 10), counting to 31 on one hand is maybe useful.

More useful IMO is counting in base 6 and treating each hand as a single digit. i.e counting to 35 on 2 hands without awkward fingerings. Better than 10, less awkward than binary.

permalink
report
parent
reply
1 point
Deleted by creator
permalink
report
parent
reply
19 points

Jokes on you, I use my fingers as bits for a total of 1024 numbers (0-1023). Or I can sacrifice 1 finger time be a sign bit and count negative numbers too.

permalink
report
reply
11 points

Sacrifice a few extra bits and you can do floating point arithmetic on your fingers too

permalink
report
parent
reply
6 points

Jokes on you, fingers are tri-state (fully extended, fully closed, bent at middle knuckle) not binary, so I can count to 59049.

Someone with better finger control should be able to treat them as quad-state, granting the ability to count to 1048576 by bending just the outer knuckle.

permalink
report
parent
reply
3 points

Let’s just keep multi level cells to just flash memory.

permalink
report
parent
reply
1 point

3^10-1=59048.

permalink
report
parent
reply
5 points

I like this idea in theory, but some combinations of fingers are very awkward to extend without the others, and one particular combination is very rude.

permalink
report
parent
reply
5 points

Maybe that’s just because 132 is a rude number.

permalink
report
parent
reply
4 points

I’ve tried this a few times and my fingers always get really Fucking confused after about four bits.

permalink
report
parent
reply
1 point
Deleted by creator
permalink
report
parent
reply
2 points

I can’t imagine a scenario when you need to be able to do BOTH positive and negative numbers at the same time 😂

permalink
report
parent
reply
1 point

If we figure out a clever trick with phalanges we can go even further

permalink
report
parent
reply
15 points

Count in binary up to 1023 on your hands you filthy casual

permalink
report
reply
7 points

just beware when counting the number 4 in public

permalink
report
parent
reply
4 points

Or 256, or 260.

permalink
report
parent
reply
2 points

Especially 260.

permalink
report
parent
reply
13 points

You count one finger up as the same as no fingers up? Counting is not the same as an index.

permalink
report
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 7.2K

    Monthly active users

  • 954

    Posts

  • 37K

    Comments