Live data from Hacker News

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

chess.com

91–100 of 338 posts

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

#91
post #46

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

Like when people say to IT: "Everything's working, what am I playing you for?!"

Followed by the inevitable "Nothing's working, what am I paying you for?!"

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

#92
post #55

I recently experienced a nasty bug with BLOB in MySQL. The software vendor was storing a giant json which contained the entire config in a single cell. It ran fine for months, and then when it was restarted it totally broke. Reason was: the json had been truncated the entire time in the database, so it was gone forever. It was only working because it used the config stored in memory on the local system. Nasty!

Mysql's unix_timestamp() breaks on years past mid 2038...so plan for that one too.

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

#93

"This was obviously an unforeseen bug that was nearly impossible to anticipate..." Snarky... Except that there were probably years of games to notice that you were approaching a "magic number" like 2^31.

I actually read that quote as fully sarcastic.

Poe's law.

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

#94
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? This decade I knowingly wrote code that will break in 2036 [1]. My supervisor was against investing the time to do it future-proof (he will be retired by 2036), and I have good reason to believe the code will still be around by that time. I don't think I'm the only programmer in that position. [1] Library specific variant of the y2038 prob…

- This decade I knowingly wrote code that will breaks in 2038

Sure, but how bad was it really? Something you could fix relatively quickly with a little time and money, or an instance of Lovecraftian horror unleashed upon the world like so much COBOL code?

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

#95
post #28

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.

My long-term active retirement plan involves building a year-2038 consultancy.

[deleted]

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

#96
post #46

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

I think the "availability heuristic" is what you're looking for.

https://en.wikipedia.org/wiki/Availability_heuristic

The availability heuristic is a mental shortcut that relies on immediate examples that come to a given person's mind when evaluating a specific topic, concept, method or decision. The availability heuristic operates on the notion that if something can be recalled, it must be important, or at least more important than alternative solutions which are not as readily recalled. Subsequently, under the availability heuristic, people tend to heavily weigh their judgments toward more recent information, making new opinions biased toward that latest news.

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

#98
post #53

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

There's a usecase for lower-bounded types such as int_least32_t, where the compiler may choose a larger type if it offers better performance. However, if you're using that, the test suite should run all relevant tests for multiple actual sizes of that particular type (through strategic use of #define, for example).

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

#99
post #8

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

The naive, 9 years in the past me once was like "int will last us forever! and it'll save us some space!", only to have to change it to bigint a few months later

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

#100
post #56

Earlier quoted context omitted.

> I sometimes think it would've been better if a few things had visibly failed in January 2000. Having to spend billions of dollars on programmers' goofy means of saving a few bytes of memory is a pretty visible failure.

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 future isn't a good tradeoff. Obviously things are different now.

Post reply on HN