The title is probably wrong, off by one. You probably mean 2^31 -1.
Chess.com stopped working on 32bit iPads because 2^31 games have been played
281–290 of 338 posts
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#282What would be the best way to test for this kind of issues in advance. Testing at theoretical limits at all endpoints?
I'm not sure this falls under testing. If you start with an empty database each time you start the test you may never hit this issue. I think this is more of a capacity planning issue.
Usually when I hit some sort of unexpected bug in production I try to think about what type of testing will prevent similar problems in the future.
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#283It's fascinating... the Y2K problem never came to fruition because - arguably - of the immense effort put in behind the scenes by people who understood what might have happened if they hadn't. The end result has been that the entire class of problems is overlooked, because people see it as having been a fuss over nothing. I sometimes think it would've been better if a few things had visibly failed in January 2000.
If you were watching closely and knew what to look for in the first couple of months of 2000, the failures were there. But they were generally minor and easy to overlook as Y2K problems. I spotted something like half a dozen failures in various systems I interact with which I strongly suspected, based upon the timing, were likely Y2K problems that slipped through testing. For example, I received duplicate bills for o…
The call centre staff told me that this wasn't a Y2K bug, but a year-end bug. As if that was meant to make me feel better about an obvious, grim, failure.
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#284This problem is more related to a programming underestimation than the actual limitations of a 32bit CPU (which can happily process numbers or IDs that arbitrarily big if you have the memory for it and program it correctly). That said, this is definitely indicative of what's going to happen in just 20 years, 6 months and 20 days from now. I mean, we're still cranking out 32bit CPUs in the billions, running more and m…
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#285Earlier quoted context omitted.
> Self-confidence as a programmer is when starting a new project, storing the transaction ID as a long rather than an int... uint64_t even Or a UUID as others have suggested. Technically C spec doesn't really say exactly how many bits int, long and long long should be. If you want specific sizes and your code to be somewhat portable use the specific bit sizes to make that clear. There are also types for size-like thi…
> If you want specific sizes I would go further and say you should _always_ use specific sizes, unless forced otherwise. There's no reason not to.
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#286Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#287Earlier quoted context omitted.
But a 2 digit date should take less than 7 bits. Were they using systems that didn't use 8 bit bytes? Why wouldn't the dates work from, say 1900 to 2155?
Good question! Nobody was writing 1900 + (year % 100), right?
Some systems, where storing numbers in columns of characters were common practice (COBOL idiomatic style?) stored the date as two digits (possibly BCD), so the possible range is 00-99 no matter how many bits are used.
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#288Earlier quoted context omitted.
This is a whole class of problem - I wonder if there's a name for it. More examples include: talking about welfare being unnecessary because no one is starving. Or people on medications stopping because they feel better (while still on them).
It's a form of (inverse) Survivorship Bias. "None survived, therefore none started out" is an (inverse) extension of "The ones that survived were the ones that started out".
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#289Earlier quoted context omitted.
- Who among us is writing code today worried about how it will be used in 2052? The good programmers who are fortunate enough to be working on software that matters.
I doubt that's true, unless you mean it tautologically. There are plenty of good programmers working on software that matters that should absolutely not be trading off hazy possible benefits in 2052 for significant costs now. It's occasionally necessary. When I wrote the code for Long Bets [1], I took a number of prudent steps to make sure things would have a good shot at surviving for decades. But I only took the ch…
wat
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#290Earlier quoted context omitted.
Similar to how much effort goes into dealing with things like dangerous strains of bird flu, only to have people complain about how much money was spent on "nothing" when an outbreak doesn't occur.
This is a whole class of problem - I wonder if there's a name for it. More examples include: talking about welfare being unnecessary because no one is starving. Or people on medications stopping because they feel better (while still on them).
*"Thinking fast and slow", best good recommendation I got from the HN crowd