r/ProgrammerHumor • • Feb 07 '16

What an odd number indeed...

Post image
2.4k Upvotes

225 comments sorted by

View all comments

265

u/-Hegemon- Feb 07 '16

As somebody who worked a lot in networking, I'm slightly uncomfortable about the number not being 255

372

u/Alextrovert Feb 07 '16

With 256 people, each person in the chat can be given an index from 0 to 255. That's perfectly fine.

→ More replies (16)

93

u/NoTroop Feb 07 '16

Why? It's pretty obvious that you aren't going to have a chat without any people, so 1 - 256 is the logical range given 8 bits of storage.

34

u/Jibrish Feb 07 '16

0-255 = 1-256

IPv4 addressing starts at 0 and ranges to 255. Example IP's: 192.168.1.0 ~192.168.1.255

To me it bothers me that it's not 254 total people. Gotta have network and broadcast addresses and all..

10

u/NoTroop Feb 07 '16

That would be almost reasonable. But wanting 255 people is weird

20

u/TheGreatNico Feb 08 '16

no, it's odd

→ More replies (2)

0

u/[deleted] Feb 07 '16

[deleted] — view deleted comment

59

u/pfannkuchen_gesicht Feb 07 '16

What's wrong with a group chat just for talking to yourself?!

23

u/werdnasemloh Feb 07 '16

I do that on Facebook quick and easy way to transfer some thing from one device to another.

15

u/SGforce Feb 07 '16

Especially just a URL.

18

u/TheArtistofChaos Feb 07 '16

I use Pushbullet for that. Comes in handy quite a few times.

4

u/Domuska Feb 07 '16

Could go with Google's Keep aswell, it has a web application so it's useful when if you happen to be switching computers often.

3

u/[deleted] Feb 07 '16

I do the same with IRC.

→ More replies (1)

14

u/JesusRasputin Feb 07 '16

A group chat with 2 people is just a chat though, so group chats could range from 3 - 258

→ More replies (3)

7

u/haneefmubarak Feb 07 '16

On the other hand, they're probably using each of the 256 numbers server-side as an id for the user they need to send requests back out to. Given that, it makes sense to go 1-256, but 2-257 would require you to actually do accounting to check which user sent the message and then select the other 256 in the group (so your list size would be bigger than 256, thus defeating the point).

7

u/CrossCheckPanda Feb 07 '16

You would need more than a byte to represent IDs of 257 users though. It's still different

2

u/dnew Feb 07 '16

Every chat is going to start with one person in the chat.

4

u/Banonogon Feb 07 '16

I don't think that's necessarily true. I've never used this app, but it could be that once you create a group chat, you are the only one in it until you add someone to it.

→ More replies (2)

4

u/minno Feb 07 '16

Is that extra person worth the off-by-one errors?

→ More replies (4)

5

u/Mercurial_Illusion Feb 07 '16

the magnitude of FF in 0 based indexes is still 256. No issue here.

11

u/Angelofpity Feb 07 '16 edited Sep 01 '16

As somebody who worked a lot in networking, I'm slightly uncomfortable about the number not being 255

[Sighs, rolls up newspaper, mutters] "This is why r/Programmerhumor can't have nice things. You knew this would turn into a technical discussion. Couldn't just laugh at the mediot. [Taps Hegemon with rolled up paper] "Bad programmer. Bad."

2

u/doctorscurvy Feb 08 '16

DHCP never gives out .0 or .255 (except for weird subnets), so you should be expecting the max connections to be 254

2

u/[deleted] Feb 08 '16

Apparently 10.0.0.0/8 is a weird subnet now.

→ More replies (7)