g r o t t o 1 1

Peeve Farm
Breeding peeves for show, not just to keep as pets
  Blog \Blôg\, n. [Jrg, fr. Jrg. "Web-log".
     See {Blogger, BlogSpot, LiveJournal}.]
     A stream-of-consciousness Web journal, containing
     links, commentary, and pointless drivel.


On My Blog Menu:

InstaPundit
USS Clueless
James Lileks
Little Green Footballs
As the Apple Turns
Entropicana
Cold Fury
Capitalist Lion
Red Letter Day
Eric S. Raymond
Tal G in Jerusalem
Secular Islam
Aziz Poonawalla
Corsair the Rational Pirate
.clue

« ? Blogging Brians # »





Book Plug:

Buy it and I get
money. I think.
BSD Mall




 10/6/2003 -  10/8/2003
 9/29/2003 -  10/5/2003
 9/22/2003 -  9/28/2003
 9/15/2003 -  9/21/2003
  9/8/2003 -  9/14/2003
  9/1/2003 -   9/7/2003
 8/25/2003 -  8/31/2003
 8/18/2003 -  8/24/2003
 8/11/2003 -  8/17/2003
  8/4/2003 -  8/10/2003
 7/28/2003 -   8/3/2003
 7/21/2003 -  7/27/2003
 7/14/2003 -  7/20/2003
  7/7/2003 -  7/13/2003
 6/30/2003 -   7/6/2003
 6/23/2003 -  6/29/2003
 6/16/2003 -  6/22/2003
  6/9/2003 -  6/15/2003
  6/2/2003 -   6/8/2003
 5/26/2003 -   6/1/2003
 5/19/2003 -  5/25/2003
 5/12/2003 -  5/18/2003
  5/5/2003 -  5/11/2003
 4/28/2003 -   5/4/2003
 4/21/2003 -  4/27/2003
 4/14/2003 -  4/20/2003
  4/7/2003 -  4/13/2003
 3/31/2003 -   4/6/2003
 3/24/2003 -  3/30/2003
 3/17/2003 -  3/23/2003
 3/10/2003 -  3/16/2003
  3/3/2003 -   3/9/2003
 2/24/2003 -   3/2/2003
 2/17/2003 -  2/23/2003
 2/10/2003 -  2/16/2003
  2/3/2003 -   2/9/2003
 1/27/2003 -   2/2/2003
 1/20/2003 -  1/26/2003
 1/13/2003 -  1/19/2003
  1/6/2003 -  1/12/2003
12/30/2002 -   1/5/2003
12/23/2002 - 12/29/2002
12/16/2002 - 12/22/2002
 12/9/2002 - 12/15/2002
 12/2/2002 -  12/8/2002
11/25/2002 -  12/1/2002
11/18/2002 - 11/24/2002
11/11/2002 - 11/17/2002
 11/4/2002 - 11/10/2002
10/28/2002 -  11/3/2002
10/21/2002 - 10/27/2002
10/14/2002 - 10/20/2002
 10/7/2002 - 10/13/2002
 9/30/2002 -  10/6/2002
 9/23/2002 -  9/29/2002
 9/16/2002 -  9/22/2002
  9/9/2002 -  9/15/2002
  9/2/2002 -   9/8/2002
 8/26/2002 -   9/1/2002
 8/19/2002 -  8/25/2002
 8/12/2002 -  8/18/2002
  8/5/2002 -  8/11/2002
 7/29/2002 -   8/4/2002
 7/22/2002 -  7/28/2002
 7/15/2002 -  7/21/2002
  7/8/2002 -  7/14/2002
  7/1/2002 -   7/7/2002
 6/24/2002 -  6/30/2002
 6/17/2002 -  6/23/2002
 6/10/2002 -  6/16/2002
  6/3/2002 -   6/9/2002
 5/27/2002 -   6/2/2002
 5/20/2002 -  5/26/2002
 5/13/2002 -  5/19/2002
  5/6/2002 -  5/12/2002
 4/29/2002 -   5/5/2002
 4/22/2002 -  4/28/2002
 4/15/2002 -  4/21/2002
  4/8/2002 -  4/14/2002
  4/1/2002 -   4/7/2002
 3/25/2002 -  3/31/2002
 3/18/2002 -  3/24/2002
 3/11/2002 -  3/17/2002
  3/4/2002 -  3/10/2002
 2/25/2002 -   3/3/2002
 2/18/2002 -  2/24/2002
 2/11/2002 -  2/17/2002
  2/4/2002 -  2/10/2002
 1/28/2002 -   2/3/2002
 1/21/2002 -  1/27/2002
 1/14/2002 -  1/20/2002
  1/7/2002 -  1/13/2002
12/31/2001 -   1/6/2002
12/24/2001 - 12/30/2001
12/17/2001 - 12/23/2001
Sunday, July 14, 2002
21:27 - Filename Extensions Suck

(top) link
I don't know if the English language is a sufficient tool for me to adequately convey just how much I despise filename extensions.

Just recently, Kris told a story from several months ago about installing FileMaker Pro on Windows NT, a process that involved a plain-text configuration file whose name ended with ".pdf"-- because it was a "Product Description File" or some such. And because Windows had determined that all files whose names happen to end in that particular dot-and-three-letter combination were Adobe PDF documents, every time he had to open that file during the installation (which occurred numerous times because the procedure was a pile of puke), double-clicking on it would open it in the Acrobat Reader, which couldn't read it. And because .pdf was a registered extension in Windows, it wouldn't give him the "Open With..." option in the right-click menu, which wouldn't have stuck anyway for future openings of the file, but which would have allowed him to open it in NotePad. No, he had to find NotePad each time, then open the file manually from within the program, steering clumsily through the labyrinthine filesystem monstrosity that is the NT user-directory structure.

This occurred on a weekend, and by the time I came in on Monday, he had destroyed a mouse in fury over the idiocy of his Windows box-- he had been driven to such heights of pique that he had grabbed hold of the mouse, slammed it down onto the table, and with a Braveheart battle-cry and an inexorable and fluid movement, yanked the mouse out from the box into which it was plugged below the desk. Its carcass, the next day, was ruptured and shattered, with the cord morphed at its (former) point of attachment to the mouse's body into a grotesque intestinal deformation of instantaneous plastic fatigue.

At least it made Kris feel better.

But it points squarely to one thing: If there is one crime of software design for which I hold Microsoft accountable, for which I will never forgive them, it's filename extensions. That garbaceous hack, that ill-conceived relic of a dim and all-but-forgotten age, that pathetic little attempt at file-typing meta-data that has forced us in the fucking year 2002 to have no more heuristic control over the behavior of our files than we did in 1983 under DOS. This is criminal, and I will explain why, through anecdotes of pain.

First of all, over the past several weeks, I have noticed more and more of the following behavior among the artists on my site. They upload files with names of the form "picture1jpg.jpg" into my system. See what's going on there? Windows hides filename extensions by default, and the icons in the filesystem don't distinguish between different kinds of "picture" files (they all have the same damn icon), but they have a vague notion in their minds of files whose names end with "jpg" or "gif". So how do they label these files? How do they make the format visible? Not by turning on the display of filename extensions in Windows, no, heavens no! They just put "jpg" onto the end of the portion of the filename that they can see. To them, it appears as "picture1jpg". And it works, more or less. Sure, it seems sorta clunky, even to them-- but then, computers are just "like that", right?

No, they sure didn't bloody have to be; but that's getting ahead of myself.

No, that's not the half of it. See, here's the really irritating part: People hear about different graphics "formats". GIF and JPEG and BMP and PNG. My site only accepts GIF and JPEG. But everybody's creating their pictures in the graphics tools that come with Windows-- namely, Paint-- and Paint doesn't acknowledge the existence of JPEG, and its GIF output support alters the palettes of pictures to an unacceptable level. So people demand that I accept BMP images into my site, which I can't do because they're fucking uncompressed and would take forever to load-- and there aren't any browsers on earth that will display them inline, though IE used to until somebody at Microsoft had a brief inkling of clue and tore out that Ernest P. Worrell of a feature.

So how are they supposed to convert their files from one format to another? Windows sure doesn't come with any tools that make it obvious how it's done. And people who are new to computers don't know which shareware programs to go out and download.

So what do they do? Easy... they change the donkey-humping filename extensions.

People create files on Oekaki boards and attempt to save them on their local machines-- and when the browser gives them a filename that ends in ".png", they have the brainstorm that in order to save them as GIF files, all they have to do is replace that ".png" with ".gif". Glory be! It looks like it worked! Hey, they can do that with files that are already saved on their machines, too! Sure, it gives you that strange warning message about how changing the filename might cause things to not work properly, but hey-- the file now has a .gif extension! It's converted! And the warning message must mean something momentous took place-- so certainly it's been changed somehow!

And then I get to explain how that is not the way computers work. It's not as fun a task as you might imagine it is, especially the ninth or tenth time in a month, especially when the frequency of these events is increasing.

But I put up with it, because that's just the way the world is, right? I note with amusement that ACDSee, the world's most popular image-archival and browsing software, stores image description meta-data in a per-folder file which contains a flat text database, tab-delimited, with filenames on the left and descriptions on the right. What's this file's name? descript.ion. Yeah, that's right, Windows, it's an ION file. It opens in the Molecule Editor program I just bought, which I hope to use in a plot to go back in time and tweak a few random base-pairs in Bill Gates' DNA to make him grow up to be a chimpanzee or a football player or something, or at the very least to have the good, common, human decency not to go into a career in technology.

The plan is still in its infancy, but it's progressing.


And then I open up my e-mail, and I notice with dismay the crop of ten or fifteen attachments with filenames like "friend.gif.vbs" or "annakournikova.jpg.scr", which take advantage of this unconscionably bad design decision in Windows to hide all filenames by default-- so all you'd see is "friend.gif" or "annakournikova.jpg", and naturally the double-click reflex takes over and the virus storms with a Pashtun battle-cry into Outlook and I get another layer of these damnable things crowding out my legitimate e-mail. I get more viruses than spam these days, you know. It doesn't particularly amuse me anymore. I'm the first person to appreciate a good joke, but...

I've talked about the history of filename extensions before, haven't I? I've pointed out how the basename and the extension were never meant to be mashed together into a single string. Look at a DIR listing in DOS; the filenames look like this:

COMMAND       COM


The file was called "Command". That's how the engineers thought people would use the names. The extension was a simple piece of meta-data for defining certain types of files, and simultaneously binding those types of files to certain programs. (Using a dot to connect the two elements was just a convenient shortcut for addressing the files programmatically.) The theory was that every single program would have its own private file types-- nobody at the time had envisioned things like GIF or JPEG, file types that could be read and written by thousands of different applications, and could be shared between them all. Nah, instead it was all going to be .PCX for PC Paintbrush, .CUT for Dr. Halo, .TGA for Targa, and so on.

But interchangeable file types came, whether the DOS engineers had predicted them or not. The proliferation of incompatible formats vanished very rapidly. This was a Good Thing. But how were you supposed to tell which application you wanted to open your various GIF and JPEG files?

Well, that's easy. Just set it globally.

What if you want some GIFs and JPEGs to open in one application, and other such files to open in a different application? What if you wanted to double-click some in-progress art files and have them open in Photoshop, or double-click some Web graphics and have them open in a browser, or double-click some porn and have it open in ACDSee?

Well, now... sorry, mister. That's a bit of a tall order. No sirree, it's best that you just make a decision and stick to it; see, 'cause we never really designed DOS to have any facility for assigning files different type designations that are separable from the application binding on those files. Just never crossed our mind, really. But you can cope, can't you?

Meanwhile, when PCs made the leap to Windows, those 8.3-style filenames were dutifully shown on-screen in a nice proportional font. And then there was Windows 95, which finally-- after twelve long years-- managed to implement a way to get the DOS filesystem to support filenames longer than eight letters plus that three-letter extension, which some applications had taken to using as part of the filename (ludicrous limitations often lead to very creative solutions, as with the ARJ archiver-- whose registered extensions included ".a00", ".a01", ".a02", and so on). Granted, the DOS console still didn't support these long filenames because they were really just secondary labels in the file's header, that Windows 95 knew how to read through some funky magical juggling; but that's just details. Keep on plowing on ahead. At Microsoft, there isn't time to do it right or to do it over.

So what about those extensions? Well, they traveled right along with the long filenames, which could now support spaces. Yeah. Frickin' spaces in filenames that by necessity have to have a .ext extension on the end. So we have filenames like "My 2000 Taxes.pdf" and "Joe Satriani - Surfing With The Alien.mp3". You know what that kind of filename looks like, assuming you haven't accepted Microsoft's already-lambasted-earlier horrific hack-job of hiding all filename extensions by default? To the human eye, used to reading English, it looks like this:

Joe
Satriani
-
Surfing
With
The


Alien.mp3


What the ass is that? This is having control over what our files are called? God, no, say the engineers; if you try to take off that ".mp3" at the end, or change it to something else, you get a dire warning about how it will break your system and make that file not work properly. Which it will. Remove the extension, and the icon changes to the generic Windows icon. Change it to, say, ".doc"-- and suddenly the icon reflects the obvious fact that you've just converted the file to a Microsoft Word document. Yay! Hooray for technology!


Don't you think that by this supposedly advanced age in the technology revolution, we would be able to assign all kinds of different meta-data to our files-- like, oh, I don't know... which program we want our files to open in, independent of what type it is? Wouldn't you have thought we should be able to name our files whatever we want, without having to worry about whether forgetting to add the correct esoteric little three-letter tag at the end will cause the system to forget what the hell kind of file it is and what to do with it if you double-click on it, even though the file's contents and validity have not changed in the slightest? Oh, yes-- Windows XP has all kinds of meta-data you can assign to files, including owner name, camera make and model, favorite color, allergies, credit history, and whether the file is stoichiometrically right-handed or left. But not the god-frickin-blasted opener application!


What is wrong with these people? Who the hell hired them and paid them six-figure salaries to dictate this as our computing destiny?

And why is Apple ridiculed and sneered at for somehow managing to avoid this litany of successive pieces of apocalyptically bad design and ridiculous hack-jobs to cover them up, the horrific lack of elegance of which should have earned Windows some kind of MPAA rating to protect it from the sensitive eyes of youngsters?

I suppose I don't need to (and shouldn't) point out, once again, that the Mac OS has always had mutable and immutable forms of meta-data: the mutable kind, like the icon and the filename, could always be changed to the user's heart's content; you could apply custom icons to the files, you could rename a GIF file to "My Picture" or even "My Picture.jpg.doc.tiff.pict.html" and it would still open in the application specified in its Creator code, the application that created the file-- a piece of immutable meta-data, like the last-modified date, which could be overridden and changed as the user saw fit (though not as part of the standard workflow). The file's type and what application it opened in could not be inadvertently changed through something as simple and innocent as changing its pus-guzzling name. You couldn't break your files' functionality by doing something totally reasonable that's right smack in the standard expected user-level workflow.

Whereas Windows had a simple one-dimensional mapping table between filename extensions and their associated applications, the Mac had the Desktop Database. This non-authoritative data store, which could be rebuilt at any time by re-caching the data from the applications themselves, kept a record of all apps installed on the system-- by their four-letter Creator code-- and each application had a list of which four-letter Type codes it would accept. Thus the system knew at all times which apps would accept which files. You could drag a JPEG file over GraphicConverter, and the GraphicConverter icon would darken to show that it was willing to open that type of file; but drag that file over AppleWorks, or drag a text file over GraphicConverter, and it wouldn't darken. This was the way things were always supposed to work. It was beautiful, it was elegant, and it made those of us who knew how it was engineered piss our pants and wet our cheeks with emotion.

In Mac OS X, we got good news and bad news. First the good: We got more meta-data. Yaaay! Happy day! Namely, we got an "open with application" subsystem-- a database with global settings per file type/creator, with individual per-file overrides. The Creator code still remained-- but now we had a standard-workflow way to permanently change the application some or all of our files of a certain type opened in. More control! Something we needed!


But this came with a price. In the name of "compatibility", and as a peace offering to the Windows world, Mac OS X added filename-extension dependence on a certain level... and filename extension hiding. But not in the way that Windows does it. No... granted, it's far from ideal, and it's fairly ugly. But for practicality's sake, it's quite ingenious. Here's how it works: If you have a "picture1.gif", and you rename it to "picture1", the ".gif" is not deleted; it's merely hidden, causing the user no more consternation, and moved into what's effectively a piece of inline meta-data: the "compatibility extension". The neat part is that if you use any applications that ignore the "hide extension" bit, which they added in Mac OS 10.1, those applications simply use the extension as a completely visible part of the filename... so you can FTP or e-mail files to Windows users, or burn them onto CDs, and the files will appear on Windows machines with the right extensions and work just as expected.

There are pros and cons to this scheme. On the plus side, it definitely does increase compatibility, without causing more than a miniscule bit of discomfort to Mac users. But at the same time, there are pitfalls; we're now susceptible to the same "virus.gif.vbs" types of attacks, and extensions are being used even by Mac developers-- and even by Apple itself-- in the old DOS sense, to associate certain private file types with their respective applications, rather than using the Creator code, which is now relegated to all but a legacy status. Indeed, instead of the clean and elegant Type and Creator codes, we're now being subtly encouraged to use the extension to determine the Type, and the Open With subsystem to determine the opener app. The functionality is more or less the same, and it's been engineered very smoothly to maintain consistent workflow. But for those of us who know how technically ravishing the Type/Creator system and the Desktop database were, the new system seems asymmetrical, ungainly, error-prone... we wouldn't go so far as to say Windows-like, but the thought has crossed our minds.

Apple clearly knows how terrible a thing filename extensions are, and how much of a bane they've been on the computing world; and they want to associate with them only as perfunctorily as they have to, and at all costs do it the right way, for God's sake. Because they look at that feature, above all others, as emblematic of the design "ethic" of Microsoft-- as clear an example as any other of "what not to do, because-- why, because we're Apple. We don't do shit like that."

If bad software design were a crime, filename extensions would be earning a number of early-80s engineers long sentences of hard time; and companies everywhere would be working Microsoft over from head to toe in class-action lawsuits. To anybody who has taken a peek under the hoods of operating systems, it's painfully clear that we're now irrevocably committed to internal-combustion engines only because it was better marketed than the cold-fusion engines that the turn-of-the-century inventors also happened to have on hand. Whichever one makes more noise, right?

Twenty years from now, will we be tapping our eyeglass-mounted, voice-activated computers to life and saying, "Okay, show me the expense report that Johnson sent me-- dot doc"? Will we be waving a casual hand toward our in-desk terminals and saying, "Open up a new message to Grandma, and send her that picture we took of the kids-- dot picture"?

Believe it or not, there are things Microsoft has done for which I'm willing to forgive them. But one thing which does not fall into that category-- one thing for which I will curse Bill Gates' name until my dying day-- is codifying into de facto and de jure standard computing procedure the crime against humanity that is the filename extension. For steadfastly refusing, for twenty bloody years, and with no end in sight to that number, to stop and redo Windows' application-binding system the right way, the way that would give users more control and ease in their lives-- and instead, as though purely out of spite, making it so that my repeated railing against filename extensions appears only as so much pointless, pathetic bin-Laden-esque ranting against the Way Things Are from a remote and anonymous heroin-filled cave.

If I ever meet him, I will personally carve ".JPG" into Bill's forehead with an ice pick. I'll make sure the dot goes nice and deep.

Nah. Maybe I'll do his Type/Creator codes: SHIT/SATN.



UPDATE: Kris corrects...

A minor correction to your file type story about my destroying a mouse. I was only annoyed at having to manually open the ".pdf" file in WinPad or NotePad or whatever I was using.

<Sideline>
Which bring up an interesting point. Would NotePad allow you to open a .jpg file? Is there any protection under Windows to not allow opening a file if the application does not understand what the file contains? (A protection against data crashing a program.) And conversly, a way to force open a file if you know what you are doing?
</Sideline>

What made me mad enough to commit mousyside was NT's stupid path mechanism. I renamed a folder in a path. A dialog appeared which said I could not do that because the path was locked. The only option was the (OK) button which gave you the error again. The error dialog contained contained a text field with the new name. You would have to retype in the original folder name into the dialog box, which I could not remember as it was long with lots of numbers. Undo would not work and clicking outside the box produced only a beep. Results, a slammed mouse, a pulled mouse tail and a mouse explodie(tm) as it smashed into the floor. Then a very careful reset of my system after I replaced the mouse (I didn't like that mouse anyway).

I don't know about how Windows protects against apps opening inappropriate file types, or if it does; but for the benefit of anybody who might care, Mac apps will only open file types that they say they can open, as discussed above in the Desktop Database bit. You can hold down Option when you drag a file onto an app, to force it to try to open that file. The Option key generally is for "Do the slightly more funky version of this action", like "Force Quit" instead of "Quit".

Anyway-- after lengthy discussions with Matt Robinson, I must concede that Windows XP has indeed made some very concrete steps forward in its handling of application binding. Granted, you still can't set a per-file opener app; but you can fairly easily add apps to the contextual menu, for "Open With..." entries; and finally, application names show up as "Adobe Photoshop 7.0" and "ACDSee™" rather than "NOTEPAD.EXE" and "IEXPLORE".

All more spackle and paint over a dog's breakfast of a substructure, but of course for most people it's good enough.



Back to Top


© Brian Tiemann