Live data from Hacker News

Chess.com stopped working on 32bit iPads because 2^31 games have been played

chess.com

241–250 of 338 posts

Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played

#241
post #8

Self-confidence as a programmer is when starting a new project, storing the transaction ID as a long rather than an int...

It's the smart thing to do - 4.3 billion is not that much.

I had some students that asked me if even a long would be enough to handle exponential growth, after all it's only twice as big. As a thought experiement I asked them to come up with a time to fill a 32 bit int completely. They came up with roughly a year. Then as a margin of error I said, let's assume you have 4.3 billion transactions every second instead. This volume can be sustained for 100 years, and we're still not in the danger zone yet.

Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played

#242
post #56

Earlier quoted context omitted.

Nope. Definitely not goofy. My dad was a programmer in the early days. The machines he started on in the 1960s had 8 KB of RAM. Saving a byte then is the equivalent today of saving 1 MB on an 8 GB machine. Multiply that times, say, the thousands of customer orders you're trying to process and the goofy thing would be burning a lot of additional RAM because it might help somebody 35 years later. Who among us is writin…

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?

A 2 digit date typically used two guys, one for each digit. Cobol and all

Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played

#243
post #56

Earlier quoted context omitted.

Nope. Definitely not goofy. My dad was a programmer in the early days. The machines he started on in the 1960s had 8 KB of RAM. Saving a byte then is the equivalent today of saving 1 MB on an 8 GB machine. Multiply that times, say, the thousands of customer orders you're trying to process and the goofy thing would be burning a lot of additional RAM because it might help somebody 35 years later. Who among us is writin…

- 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.

In the 80s I questioned the use of using two bytes for the date. I was laughed at by the experienced programmers. They said the software would be rewritten by then. It should have been, but it wasn't... But there is a trade off between how much time you spend today vs future compatibility.

Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played

#244

Earlier quoted context omitted.

Maybe it's because of how young I was at the time, but I remember media outlets reporting on the Y2K problem, and showing video of hundreds of older computing devices that were being retired (thrown in landfills) because they wouldn't work properly after the date change happened. Maybe this isn't a "real" failure, and the symptom of some IT departments working diligently to solve the problem before it happened. In an…

Y2K was a software issue. In short and very simple terms, some software stored date as DD/MM/YY. It would asume that for year it would always prefix 19. The problem was when you reached /00. Any calculations or software decisions that happened based on that date, it would be off. Way off. Some solutions where expanding the date to YYYY or adding a prefix to the new dates. Dates without the prefix would be 19xx. Date…

There were a couple of computers in my shop that had a Y2K BIOS issue. Although there is a sort of software in the form of firmware on BIOS, many people considered this sort of Y2k error presentation a hardware problem.

So, while a Y2K compliance program dealt mostly with software, a complete program went through and tested all hardware in inventory.

Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played

#245
post #56

Earlier quoted context omitted.

Nope. Definitely not goofy. My dad was a programmer in the early days. The machines he started on in the 1960s had 8 KB of RAM. Saving a byte then is the equivalent today of saving 1 MB on an 8 GB machine. Multiply that times, say, the thousands of customer orders you're trying to process and the goofy thing would be burning a lot of additional RAM because it might help somebody 35 years later. Who among us is writin…

Last time this came up, I ran the numbers and the cost of the RAM saved per date stored was hundreds of dollars. Not per computer, or per program, but per date . Comparing total memory sizes doesn't tell the whole story, because RAM for a whole machine is so much cheaper now. Spending that much money on storing "19" just so your code keeps working in the unlikely event that it's still in use 3+ decades into the futur…

You're calculating what it would cost to store a string representation of a date. Which is silly. You should always convert to a timestamp for storage. You can cram way more info into a single integer than you can with a base 10 string. And the bonus is you verify the date's correctness before storing.

Even a 32-bit int could hold 11 million years worth of dates. And if your software is used for longer than that, you can just change it to a 64-bit long and have software that will outlast the sun.

Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played

#246

It'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.

> 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.

Except many countries who spent no money on upgrading their system has very few problems too.

Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played

#248

It'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.

There actually were a lot of inconsequential failures with date display.

A fair number of websites went from showing "Dec. 31, 1999" to showing "Jan. 1, 19100".

Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played

#249

Earlier quoted context omitted.

Sarcasm is recursive.

Yours is the first comment in this chain that I can say pretty confidently isn't sarcasm. So it kind of breaks the chain, making the sarcasm in this chain non-recursive. Which means maybe you were being sarcastic after all? Actually I don't even know if my own comment is sarcasm or not.

It's the base case

Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played

#250
post #152

Earlier quoted context omitted.

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…

in JavaScript, new Date().getYear() returns 117 :)

And in early 2000 web was full of "Copyright 19100".
Post reply on HN