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.It also has the second best NES soundtrack, after The Guardian Legend.
I’ve never given TGL a proper listen, though I have the game for NES. Thanks for the recommendation!
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.
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.
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.
Numbers guy here, I can confirm 256 is an evenly specific number, and not an oddly specific number.
Oh you are the numbers guy ? Name every number
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
nerd
Oh yeah well if you’re some sort of numbers guy, answer me this: I think you’re name is super cool, and makes me wonder, is there a largest prime you can make listing digits of pi starting from the beginning. There’s gotta be infinite right?
Well, three is prime and pi starts with a three, therefore, even if there’s larger primes, there is one which is the largest. QED.
Damn, math is wild.
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.
What’s app starting from 1 the scrubs
Depends on how they handle groups with 0 members, if they just get deleted once the last person leaves, you shouldn’t run into issues
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.
Sure you can. It’s a group that exists, but it has 0 participants.
0 is reserved for the FBI agent listening in.
It’s an ICE agent now
Nah, ICE agents don’t care about evidence.
Also they can’t use computers anyway. They just publicly post on social media. It’s considered secure because no one likes them enough to follow them.
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
I hadn’t thought about it on their server side tbf. But the more i think about it maybe there are other compounding reasons to keep group sizes small, such as the exponential number of links in a growing network and such. But, that is all beyond my knowledge area.
You probably could, if everyone got banned or something
Since people are binary like the great Orange says, they have to use a power of 2?
In this case the limit was entirely arbitrary.
The programmers were told to pick a limit and they liked 256. There are issues with having a large number of people in a group, but it wasn’t a hardware limit for this particular case.
But it’s still not oddly specific, they picked a nice round number
Like memory in bits maybe, so 64 128 256 512 1024 2028
Wouldn’t max value for 8 bit (unsigned) integer be 255? Like the number has 256 distinct values, but that includes 0.
You’re thinking of the highest integer number, not the “number of numbers” - which is 256, from 0 to 255, and thus 256 possible users in a group chat.
Computers start counting at zero, (unless it’s python) so the first person in the group would be ID 0, the second person would be ID 1
At a basic level python normally counts from zero (indices as an example)
If this is about a counter for users in the chat, sure. But if this is an array of users indexed by an 8-bit number, then it will fit 256 slots with the first slot being numbered 0.
Fair, sounds reasonable
Right but having a group chat of size 0 isn’t very useful.
Not to be snarky, in programming there’s rarely (in situations like this) a reason to keep count. Computers are exceptionally good at counting integers so they’d just count individual client id’s (however they’ve implemented that system), not keeping toll on how many clients are in a group chat.
So one client, be it at position zero is a one client group. Add another client at position one and you have two clients and a two person group.
I don’t think it’s the variable for counting the number of us in a group that’s the issue here. There’ll be some internal tracker that gives everyone in the chat group a local ID probably for the purposes of ensuring that everyone stays in sync.
If you leave the group and then go into a different chat group you’ll probably have a different number in that group because the internal counter is specific to the chat, not to the user ID which will be a unique ID used across all interactions for that phone number.
What would 0 represent then?
The first index
one person, and 255 would represent 256 people
The limit isn’t on the actual count of people, it’s likely the size of the chat user id number.
False.
And programmers usually start counting at 0.
Your thinking indexing, 0 is still 0 when counting.
The number of distinct values are what matters.
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
That quote really is the problematic part. The part about switches is fine - it’s an attempt to explain tech to a “normie.” But for a tech writer to ever say it’s not clear why they settled on 256 is worse than embarrassing. They had to be corrected by tweets.
Anyone whose ever had an intro to computers class has had a computing professional explain computers using simple language and analogies. That’s the way this kind of thing should work. It sounds like this author has no more clue about computing than the target audience, which isn’t going to work out well for the reader.
If you look what the last articles for the independent Doug Bolton (the guy who wrote the stuff in question) wrote, it was Condom discovered inside woman’s appendix, and afterwards he only wrote for “Movers & Makers Cincinatti” and some stuff looking like crawler bait for “Old Times Music” so i’m pretty sure the Independent didn’t want him anymore
Maybe he’s a vibe journalist.
Honestly chat gpt would probably be better at this.
That is both sad and likely accurate.
It doesn’t really matter that it’s a “normie article for normie readers”. Writing articles is journalism. Not knowing 256 offhand? Permissible. Being a journalist who wrote an article and didn’t even do the bare bones of research? You’re still a bad journalist, and as callous as it is, you should lose your job and livelihood. Bad journalism is too dangerous to just let it fester like this.
The newspaper he was writing for is a major publication he absolutely could have asked someone.
The problem here is the newspaper didn’t care enough about the article to put anyone on it who is even remotely familiar with technology. They probably thought of it as just some throwaway piece to fill out a bit of space. Which to be fair it would have been had it not been for that comment.
That weird ass explanation with switches and “one of the most important numbers” still sounds absolutely clueless.
I liked the switches analogy! Generally about binary though; I agree it doesn’t connect back to the number of users application.
And yeah most important number…sounds like they were quoting an LLM.
“Quoting” is generous.
One of the most important numbers? I’d argue the most important number in computing is either 1 or 0…
There are only 10 kinds of people in this world…
What the fuck is a power of 2??? I’m vibe coding python AI.
Isn’t python a snake? /s vibecoders wouldn’t know
What do you bet that if you were Vibe coating in python it would import a library so it could do zero indexing again?
Vibe coating in python
I coat my python every day winknwink
One is one of them
You know you’re a tech nerd when 256 sounds more even than 250 or 300. 😅
Or when it’s bothering you that it’s 256 and not 255… aren’t we counting 0 anymore? :/
Or when it’s bothering you that people forget the difference between counting and indexing.
You can index to 255 in an 8 bit number, but your count is still 256 when you get there.
Fair point 😄
If there are two things I hate in this world, it’s off by one errors.
https://en.wikipedia.org/wiki/Zero:_The_Biography_of_a_Dangerous_Idea
One of the most annoying books I ever read. Every page made me feel stupider and more uneducated.
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.
256/256 is not even
Even that is odd.
Or a maths nerd!
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.
Enragement bait.
They’re the same picture.
I wish we could see what outlet it was for context
The independent
Thanks :)
pregagenant
Because 257’s a crowd