were they ever expecting negative number of games? why signed integer?
Chess.com stopped working on 32bit iPads because 2^31 games have been played
21–30 of 338 posts
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#22How many other examples like this have occurred throughout computing history?
IIRC at least slashdot and twitter had to do some non trivial database migrations because they hit maximum value of some ID field.
One interesting aspect of it was that Twitter realized what was going to happen in advance, and artificially pushed their IDs over the edge at a preplanned time so they could have as many people available as possible to work on any problems that appeared.
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#23This reminds me YouTube changed its view counter from 32-bit integers to 64-bit integers due to the popularity of 'Gangnam style' https://www.wired.com/2014/12/gangnam-style-youtube-math/
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#24Self-confidence as a programmer is when starting a new project, storing the transaction ID as a long rather than an int...
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#25were they ever expecting negative number of games? why signed integer?
It looks like they are using PHP/MySQL/Javascript/Flash, with only MySQL having any explicit types.
Even so, an error is often preferable to overflow, which is usually undefined behavior and could lead to a duplicate primary key anyways if it wraps to the first game.
A better question is "why 32-bit over 64-bit", but the site dates back to 2005 where that was the norm and the question has the same issues.
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#26were they ever expecting negative number of games? why signed integer?
Because signed is default for some reason in most languages, and most developers aren't taught to think critically about how decisions like simple datatypes might affect scalability.
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#27were they ever expecting negative number of games? why signed integer?
Also, you have problems whenever you compare against signed ints.
Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played
#28It'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.