Live data from Hacker News

Cursed Excel: "1/2"+1=45660

quadratichq.com

91–100 of 144 posts

Re: Cursed Excel: "1/2"+1=45660

#92
post #79

Earlier quoted context omitted.

Yes, that's the point. But excel just incorrectly determines what you meant, and corrupts your data.

> But excel just incorrectly determines what you meant How would you, if you were programming excel, determine whether the 5-digit number entered with a leading 0 is meant to be a zip code or not?

Would keeping the leading zero cause any problems with future calculations?

Re: Cursed Excel: "1/2"+1=45660

#93

> Unfortunately, news of the 1582 promulgation had not yet reached the developers of Lotus 1-2-3, so they assumed that 1900 (being a multiple of 4) was a leap year. Joel Spolsky mentions a more charitable take on this from Ed Fries: > Lotus had to fit in 640K. That’s not a lot of memory. If you ignore 1900, you can figure out if a given year is a leap year just by looking to see if the rightmost two bits are zero. Th…

Am I remembering it wrong or did Microsoft use an undocumented call in excel to grant it more memory than was possible for early competitors who didn't also write the OS?

they did. later during the Netscape antitrust case it was shown in court that Microsoft gave Internet Explorer internal Windows hooks that Netscape couldn't have known about because they weren't documented.

Re: Cursed Excel: "1/2"+1=45660

#94
post #61
post #40

Earlier quoted context omitted.

I cannot imagine any programming language interpret "1/2" as a day and month in that specific context. It takes a very special mindset to do that, maybe the kind that comes from a junior MBA manager, for example ... and even then I find that farfetched. It sounds more like one of those things that is observed, but some manager decided it is not high priority enough to fix right away. And then technical debt raises it…

“1/2” is a string. So “1/2”+1 is either an error because of datetype mismatch (which is terrible UX for a spreadsheet or going to mean one of the following to scenarios: Date plus a day “1/2” concatenates with “1” The latter is wrong, the former, while unexpected, does kind of make the most sense here.

Haven't seen "1/21" as an answer yet

Re: Cursed Excel: "1/2"+1=45660

#96

Earlier quoted context omitted.

Meanwhile every time I import a CSV into LibreOffice I can't work out how to make it interpret my dates as actual dates.

If it provides any comfort, Excel in turn is unable to properly open/save a CSV with the separator being a comma (!) unless the regional settings of Windows are not defining it as such. On german systems it's for example a semicolon, so a CSV is basically a "semicolon separated value" file, and there is no working solution around that...

How do you make a comma seperated CSV with numbers with commas in them?

Re: Cursed Excel: "1/2"+1=45660

#97
post #79

Earlier quoted context omitted.

Yes, that's the point. But excel just incorrectly determines what you meant, and corrupts your data.

> But excel just incorrectly determines what you meant How would you, if you were programming excel, determine whether the 5-digit number entered with a leading 0 is meant to be a zip code or not?

I would not make any default determination until and unless there was a proactive user action. If there is any value that doesn't round trip through string serialization, don't allow it to be coerced without the user deciding to allow it, explicitly.

Re: Cursed Excel: "1/2"+1=45660

#98
post #96

Earlier quoted context omitted.

If it provides any comfort, Excel in turn is unable to properly open/save a CSV with the separator being a comma (!) unless the regional settings of Windows are not defining it as such. On german systems it's for example a semicolon, so a CSV is basically a "semicolon separated value" file, and there is no working solution around that...

How do you make a comma seperated CSV with numbers with commas in them?

you don't. use SQLite instead

Re: Cursed Excel: "1/2"+1=45660

#99
I'm not sure why this is FP news. I knew "1/2" was being interpreted as "January 2" as soon as I saw the title. This is nothing new, or even particularly interesting -- Excel (and Sheets) have been doing this date conversion from the beginning.

This is just an ad for Quadratic, nothing more.

Re: Cursed Excel: "1/2"+1=45660

#100
post #23

Earlier quoted context omitted.

How does it then work if I send the file to others. Is it saved in the file or will it just crash there?

The others may have their own preferences to edit documents. It's like you edited one code file in a project, and you want everyone to switch to night IDE theme when they open that particular file.

Come on, there is no room for anyone to have a preference here when an excel document is meant to be storing the names of genes and would never need to have a date or time in it, and can very easily get corrupted beyond repair if someone turns date conversion on. (For context, genome research is the whole reason this toggle was added in the first place.) Even something like Vim lets you enforce file-specific settings with a header.

At the same time, we're clearly shooting ourselves in the foot by using Excel for this. This feature is just a hodge-podge solution to the problem of Excel not having strict data types. There should be enough cautionary tales (https://eusprig.org/research-info/horror-stories/) for everyone to know to avoid Excel.

Post reply on HN