EDIT: Well file really had a bug in this case, where they didn't detect what they thought they were, but the point stands.
EDIT: Well file really had a bug in this case, where they didn't detect what they thought they were, but the point stands.
EDIT: Apple routinely don't update the Unix utilities for a decade...
This, of course, is passive-aggressive snark. Suffice to say that I disagree with you; why shouldn't people expect software they buy from Apple to work? People buy from Apple because they don't want to have to deal with all this sort of crap; they just want it to work.
I can understand the attitude that 99% of their userbase will never touch the command line, but that last 1% represents the developers that keep the whole ecosystem going.
But who would EVER think of naming the first column of a spreadsheet "ID"?
https://www.optibrium.com/community/forums/6-general-how-do-...
>Q: I have saved the result table from admensa into .csv format. However I am not able to open in excel. It is said that SYLK: file format is not valid. Do you have any experience on it? Thanks.
>A: This is an Excel 'feature.' I would guess that the first column of your data is entitled "ID". For some reason, Excel interprets any CSV file beginning with "ID" as an SYLK format file (not really sure what that is!). If you edit the file in, say, Notepad and change the name of the first column in the header row, you should find that it will load without a problem.
>This will happen if you save a CSV file from any application with the first characters "ID". So, unfortunately, there's not much we can do about it, other than to recommend that users don't call their first column "ID"!
This magic detection of file type has one unfortunate side effect: it is not exactly obvious how to convince Excel to load plain text data that is not CSV with delimiters from the current locale. (which is major PITA with most European locales where Excel uses "Semicolon"-SV and not "Comma"-SV but still calls it CSV)
The lack of this feature pushed a lot of scientists to OpenOffice/LibreOffice Calc. At first, just to open the file and "Save as Excel", but of course, then they start using Calc.
(At least that's my experience writing scientific software in Europe. Excel localized not just display, but the input and output. With Calc you could just open a file as "pipe separated UTF-8" and be done with it.)
Another thing is that LO Calc will present you with text import dialog when you open anything vaguely text like and also when you paste multiline plain text from clipboard.
I particularly relish the way it identifies macOS disk image files as VAX executables. I hope they never change that.
But your point arguably stands: if a user says "print file X", and you want different files printed using different logic (e.g. PDFs and PostScript files should be printed differently than text files), what other option is there other than using something like "file" to try and guess the file type? It would be very annoying for the user to have to specify each time from a massive list of possible optins.
You can't just pipe a textfile into printer port and hope your printer spits out anything useful.
.. but as one of the other comments says, programs which want specific interpretation should consider having their own heuristics, especially including "precedence". In the Excel example, it should be considering XLS and CSV first before trying other things.
[0] Actually, UNIX's "everybody just guess" mechanism is probably the stupidest, but it is so stupid I didn't even consider it.
That's a fascinatingly apt mixed metaphor: duct taping meets duck typing.
("Duck" refers to the water-resistant nature of the tape. Duct doesn't actually mean anything other than sounding like "duck". Ironically, duct tape is the wrong type of tape to use on heating ducts.)
If you're going to be pedantic, then get it right. ;-)
According to Wikipedia, the name comes from it being manufactured from "cotton duck" (not because water rolls off it like a duck). Then a derived product became popular for wrapping air ducts, and the name evolved to duct tape. Then someone trademarked "Duck Tape" and revived the old name.
I'm not sure anymore about the true origins of the terms, but I still maintain that "duck tape" and "duct tape" are both acceptable names (trademark issues aside).