Numbers guy here, I can confirm 256 is an evenly specific number, and not an oddly specific number.
Microblog Memes
A place to share screenshots of Microblog posts, whether from Mastodon, tumblr, ~~Twitter~~ X, KBin, Threads or elsewhere.
Created as an evolution of White People Twitter and other tweet-capture subreddits.
Rules:
- Please put at least one word relevant to the post in the post title.
- Be nice.
- No advertising, brand promotion or guerilla marketing.
- Posters are encouraged to link to the toot or tweet etc in the description of posts.
Related communities:
Oh you are the numbers guy ? Name every number
I'm going for the boring but practical answer: {x | x ∈ A} and {x | x ∉ A}. Obviously the second set is doing the heavy lifting.
But is it Numberwang, Mr. Numbers Guy?
Shout out to Castlevania II, where you can hold anywhere from 0 to 256 laurels. Yes, you read that right -- 256, not 255. I inspected RAM to double check. It's a 16-bit word on an 8-bit system with a maximum value of 0x100
. They could have used 8 bits instead of 16. But no, they really did choose this arbitrary number.
"I inspected RAM to double check."
That's an unhinged level of commitment. Respect — I dig it
I hate this. I love this.
If I ever make a game I might put stuff like this in it.
Maybe they keep some other data in the same space using bitmask?
plausible, but my experience from dissecting these kinds of games is that they tend not to be as space efficient as you'd think they could be if they were the kaze emanuar type. The fact that they opted to have 257 distinct values for the laurels suggests to me that they weren't prioritizing space efficiency.
My best (wildly speculative) guess is that a designer, knowing 256 is a common limit, wasn't thinking carefully and said the maximum value should be 256 (instead of 255), and then an overly pedantic coder implemented this to the letter while rolling their eyes.
Currently in the industry - it's exactly this. It's a communication issue between the programming team and other teams, where designers freely speak for design, artists freely speak for art, etc. but it's much harder for programmers to speak for implementation since it's usually in reference to somebody else's work, and when designers get offended or defensive or dismissive of the non-designer requesting 256 be changed to 255, then it stops being worth it.
For example, we made an absolutely mint UI backend, it was data driven with editors so anyone could whip up a new UI for the next feature without needing programmers. The design team were like "damn, I hear how complicated this thing was to build, so let's make the programmers lives easier by not using it and only asking for simple bespoke stuff". Telling them "the investment has already been paid for so please use it" was tantamount to telling them how to do their job while being ungrateful they had considered us, furthering the communication breakdown.
Yes I'm bitter and tired. It's easier to use a short for 256 instead of arguing to have my opinion considered
A previous version of this article said it was "not clear why WhatsApp settled on the oddly specific number." A number of readers have since noted that 256 is one of the most important numbers in computing, since it refers to the number of variations that can be represented by eight switches that have two positions - eight bits, or a byte.
Lol, weird way to say that 256 is a power of two, and computers operate in base two.
It's a pretty succinct explanation that links what it is to something most people have heard of (a byte).
Their definition is a lot better.
Yep very weird, should have been 255.
No, you can't have a group of zero, so the counter doesn't need to waste a position counting zero.
0 is reserved for the FBI agent listening in.
If you ever create a system where the number of users is "group.members - 1" everywhere in the code, I'd be very disappointed in you and deny that PR.
On another note; I doubt WhatsApp are so concerned with performance they are actually limiting the number of group members by the data type.
But it wouldn't be like that though would it. It would be public group.members() and the u8 would be private.
If all the millions of groups are saved on a central database then making the size a u8 isn't really that weird
As a software engineer: actually there is no need for a number of people as a power of 2 unless you need exactly 1 byte to store such information which sounds ridiculous for the size of Whatsapp
Or some binary search tree with an artificial height lol.
It’d make sense at protocol level. Otherwise, yeah, even bit-size database columns end up being stored as a word unless the engine compacts it.
I remember being puzzled by this and many other numbers that kept cropping up. 32, 64, 128, 256, 1024, 2048... Why do programmers and electronic engineers hate round numbers? The other set of numbers that was mysterious was timber and sheet materials. They cut them to 1220 x 2440mm and thicknesses of 18 and 25mm. Are programmers and the timber merchants part of some diabolical conspiracy?
Still odd, I very much doubt they use a 8bit variable to set this limit. What would this bring ?
Still odd
Actually, it's even.
When the program is running it's probably stored with 32 or 64 bits, but that probably isn't the case for the network packet layout. I can imagine them wanting to optimize network traffic with over 3 billion users even if it's just a small improvement.
Also TIL that Erlang's VM apparently stores strings as linked lists of chars. Very strange.
evenly specific
That's a super old article as well.
They got rightfully roasted in the comments for not knowing even the most basic things about computing.
I remember thinking something similar when I was a kid modding Starcraft. Max levels/ranks in researching was 256 and I always wondered why such a weirdly specific number.