Explicit is better than Implicit

Cameron Simpson cs at cskk.id.au
Thu Aug 6 18:34:33 EDT 2020


On 07Aug2020 09:40, DL Neil <PythonList at DancesWithMice.info> wrote:
>On 07/08/2020 05:33, Skip Montanaro wrote:
>>Hmmm... Rename genes, fix Excel, or dump Excel in favor of Python? I know
>>what my choice would have been. :-)
>>
>>https://www.theverge.com/2020/8/6/21355674/human-genes-rename-microsoft-excel-misreading-dates
>
>
>At the risk of screaming off-topic...
>
>The article does point-out that MS-Excel is attempting to be helpful 
>in identifying data, and thus formatting it appropriately. The 
>human-error is exposed: "opens the same spreadsheet in Excel without 
>thinking, errors will be introduced". So, should the mistake be laid at 
>the feet of the tool?

The tool. Anything that reaches into my data and silently decides to 
misinterpret it is busted, particularly if if it is silent, 
unreversible, and untunable.

When I read a CSV file, quoted strings are just strings. "8.1" is a 
string. And so forth.

When Excel reads a file, it looks for stuff and decides to upgrade its 
type. Eg dates etc (particularly pernicious with US-style dates versus 
the rest of the planet).  Mojibake for data ensues.

As always, I am reminded of Heuer's Razor:

    If it can't be turned off, it's not a feature. - Karl Heuer

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Python-list mailing list