If it's engagement bait, it's working.
Engagement byte
So far at least, I've found this much more charming than culture war bait.
This isn't a "tech article", it's an article about tech. This is a normie article from a normie news outlet for normie readers.
Also from the article:
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. This has now been changed. Thanks for the tweets. DB
One of the most important numbers? I'd argue the most important number in computing is either 1 or 0...
That weird ass explanation with switches and "one of the most important numbers" still sounds absolutely clueless.
You know you're a tech nerd when 256 sounds more even than 250 or 300. 😅
It kind of is "more even".
256 is just 2⁸
250 is 2x5³
300 is 2²x3¹x5²
Any division of 256 with an integer and integer result will be even. Most divisions of 250 and 300 with an integer and integer result will be odd.
Or a maths nerd!
So, I get that 256 is a base 2 number. But we're not running 8-bit servers or whatever here (and yes, I understand that's not what 8-bit generally refers to). Is there some kind of technical limitation I'm not thinking of where 257 would be any more difficult to implement, or really is it just that 256 has a special place in someone's heart because it's a base 2 number?
Because 256 is exactly one byte. If you want to add a 257th member, you need a whole second byte just for that one person. That's a waste of memory, unless you want to go to the 64k barrier of users per chat.
Except that they're almost certainly just using int
, which is almost certainly at least 32 bits.
256 is chosen because the people writing the code are programmers. And just like regular people like multiples of 10, programmers like powers of 2. They feel like nice round numbers.
It'll have to do with packet headers, 8 bits is a lot for an instant message packet header.
Well, no. They are not certainly using int
, they might be using a more efficient data type.
This might be for legacy reasons or it might be intentional because it might actually matter a lot. If I make up an example, chat_participant_id
is definitely stored with each message and probably also in some index, so you can search the messages. Multiply this over all chats on WhatsApp, even the ones with only two people in, and the difference between u8
and u16
might matter a lot.
But I understand how a TypeScript or Java dev could think that the difference between 1 and 4 bytes is negligible.
But I understand how a TypeScript or Java dev could think that the difference between 1 and 4 bytes is negligible.
Shots fired.
If each user is assigned a number as to where they're placed in the group, I guess. But what happens when people are added and removed? If #145 leaves a full group, does #146 and beyond get decremented to make room for the new #256? (or #255 if zero-indexed). It just doesn't seem like something you'd actually see in code not designed by a first semester CS student.
Also, more importantly, memory is cheap AF now 🤷♂️
While I completely agree with the sentiment, snorting too much "memory is cheap AF" could lead to terminal cases of Electron.
There would be no need to decrement later people because they're definitely referred to using pointers. You'd just need to update the previous person's pointer to the new next person.
when writing somewhat low-level code, you always make assumptions about things. in this case, they chose to manage 256 entries in some array; the bound used to be lower.
but implicitly there's a tradeoff, probably memory / CPU utilisation in the server.
it's always about the tradeoff between what the users want, what is easier for you to maintain, what your infrastructure can provide, etc.
There's often a lot of fun cheats you can use - bitwise operators, etc - if your numbers are small powers of two.
Also it's easier to organize memory, if you're doing funky memory management tricks, if the memory you're allocating fits nicely into the blocks available to you which are always in powers of two.
They're not necessarily great reasons if you're using a language with sufficient abstraction, but it's still easier in most instances to use powers of two anyways if you're getting into the guts of things.
Maybe each user has a user id in a group, and that group user id is stored as 8bit int? Idk
ITT: People who have never done low level networking.
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.
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).
Numbers guy here, I can confirm 256 is an evenly specific number, and not an oddly specific number.
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?
32, 64, 128 etc. are all round numbers, counting in binary. They are powers of two. Since computers work in binary, they make logical sense.
1220mm is 4ft, and 18 and 25mm are three-quarters of an inch, and an inch respectively.
They were making a joke. That being said, im not familiar with lumber or imperial<->metric conversions so their second point was lost on me, so thanks.
Because 257's a crowd
I'm typing this on a 64 bit device. Why anyone would limit something to an 8 bit number in 2025 is really odd.
It’s for their servers. I guess it might have to do with cache optimization reasons. For performance reasons, they want to ensure they can fit as much as possible in the cache. One extra byte can throw the memory alignment off, which cause wasted space in cache.
Just my guess. There might be other reasons.
On a device with many gigabytes of RAM and probably terabytes of storage.
I guess when you have billions of users, and presumably tens or hundreds of billions of instances of a thing living in your sever every bit adds up? I don't even know where to even start doing the napkin math for something like that.
I get what you’re saying but I don’t like this line of thinking. In the tech industry there is far too much bloat that we just accept due to cheap memory and storage.
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
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: