6 ms·
3-character filename extensions
- informatimago 12y agoEven if MS-DOS wasn't used anymore, the various MS-DOS file systems are still used; a lot of media comes from the vendor pre-formated in FAT16. Phones, cameras, USB hard disks, etc are all formatted in FAT by default. Even the file system on Spirit and Opportunity, the Martian rovers, is FAT16! ( See page 6 of https://www.cs.princeton.edu/courses/archive/fall09/cos109/mars.rover.pdf https://www.cs.princeton.edu/courses/archive/fall09/cos109/m... ) By default MacOSX doesn't read Linux file systems (EFS, ReiserFS, etc); by default Linux doesn't read MacOSX file systems (HFS, HFS+). On the other hand, by default, most system read FAT16 or sometimes FAT32 file systems. Therefore if you want to use those amovible media to exchange data accross file systems, you better stick to those MS-DOS file systems. Granted, you could use MS-Windows extensions, but again, nothing guarantees that the system where you will plug your USB key will have a system understanding those extensions. In all probability, it will have FAT16 or FAT32 support, ie. 8.3 file names.
- to3m 12y agoIt's been a very long time since I saw something that doesn't support FAT32, and probably even longer than that since I saw something that didn't support LFN. Windows '95 was 19 years ago. People have had plenty of time to switch, and it seems that they all have. Which is hardly surprising, because 8.3 file names were annoying, and everybody hated them. (Any stragglers can simply be ignored; people still stuck on DOS are even less important in the grand scheme of things than people still using the Amiga...)
- jeffreyrogers 12y agoI don't really see an argument in favor of longer extensions except in rare cases (such as with html where you only need one extra letter). `mp4` tells me just as much about a file as `mpeg4` does and is equally easy to remember, plus it saves a few keystrokes. The same logic applies to most programming languages. I have no problem remembering `.js` is javascript or `.rs` is rust. And I think the vast majority of programmers would agree with me. Further, filenames don't play a large role in most (nontechnical) users lives. The tools they use (e.g. Word or Excel) append the filename for them, so they don't worry about it at all. The only people who routinely write filenames by hand are coders and they're familiar enough with the extensions that shortcuts work fine.
- metacorrector 12y agomp4 actually tells you more about a file than mpeg4 does, because mp4 is only one thing, the file. mpeg4 is another thing, but that thing is not a file. So, calling files mpeg4 actually confuses things rather than clarifies them. If you work with these concepts, it's nice to be able to say to your coworker, "hey, send me the mp4". if you say "send me the mpeg4", you'll get back "how do you want me to send it?" This works for many similar concepts. The idea of not overloading words that already have meanings with other meanings was one of the sensible underpinnings of the Hungarian Naming Convention. Let's not rehash the Hungarian debate, you don't need to like Hungarian to realize the sensibleness of this particular concept.
- freshyill 12y agooldmanyellsatcloud.gif But seriously, it's a silly limitation from a bygone era. Why should we adhere to it? Why should we have to remember these things? Some of them are easy to remember, but even less technical users change their workflows from time to time. Sketch uses ".sketch" as its extension. Should they have gone with something ".skc" as their extension, just because that's *the way things are done?", even though the application only runs on the latest version of an operating system without that primitive limitation? Even with Markdown, most people use ".md", but Gruber has expressed ".markdown" as his preference because the limitation doesn't really exist.
- Gigablah 12y agoWhy should we even have extensions in the first place? Ideally the filetype should be determined from metadata or scanning the header. (Speaking as someone who's had to fix image file processing bugs because the original coder trusted file extensions to be correct.)
- bluedino 12y agoAnd this is how the Mac has worked for a long time.
- chime 12y agoAbbreviations are convenient. I'd rather type .psd than .photoshop or .m than .module.
- shitgoose 12y ago.m is just as much a Matlab file, as a module. Speaking of Matlab, .mat extension is reserved by Access somehow deep in Windows guts and up until this day I don't know how to get rid of it.
- deleted 12y ago[deleted]
- prawn 12y agoAgree. From the article: "It's not like it saves typing or anything. It only decreases clarity." I find it both easier and clear enough.
- yk 12y agoYou should either use TAB-completion or click on the file. There should be no reason to type the extension. ( Though in practice I sort of see your point. )
- nkozyra 12y agoBut abbreviations are ambiguous and convenience factors can be mitigated by UX. Typing p-s-d is faster than typing p-h-o-t-o-s-h-o-p but typing the whole thing isn't the only way to skin the cat.
- bodyfour 12y agoFirst, the 3-character file extension predates CP/M. It goes at least as far back as various DEC operating systems like RT-11 and RSTS/E; probably there are antecedents further back in time. I've also seen old filesystems with 2-character extensions, but 3 has been common for quite some time. I think that the original selection of 3 character extensions was made because it felt like a comfortable number of characters to make something meaningful while not being too burdensome to type. The fact that we still tend towards <= 3 character extensions is probably because this is still true, not because of a conscious attempt to maintain DOS compatibility.
- Alupis 12y agoI've only ever seen Windows-based systems adhere strictly to the 3-character extension. All 'Nix's I've worked with (Linux, BSD's, etc) usually have native files on the system with extensions longer than 3 characters. (.conf anyone?) Also, probably should note, file extensions are largely a Windows-based OS thing as well. On the 'Nix's, an extension isn't really needed (OK, it's not needed on Windows-based OS's either, but the OS prefers it). the "file" command will tell you all you need to know about a file without an extension. Or, you can just open it with a text editor. Or, execute it if it has execute permissions, etc. So, it seems, the 3-character extension (or extensions at all) are really a Windows-Based OS thing. (While we're at it, Windows-Based OS's are the only OS's I've worked with that actually require something in-front of the "."! For example, try to natively create a ".somefile" on Windows -- it will complain and not let you).
- ppog 12y agoWindows has allowed extensions longer than 3 characters for about 20 years now. I'm not sure what you mean by "natively create" but it also definitely doesn't require anything before the "." -- e.g. I have files called ".gitignore" etc. just as on any other OS.
- dahdum 12y agoRight click a text file (such as "example.txt") and try to rename to ".gitignore". You get an error popup dialog "Rename: You must type a file name." That's what he means...you can create it in various applications though.
- orbitingpluto 12y agoThe only reason to make a file extension longer is to avoid collisions. NTFS has a file length limit fo 255 characters. And if the company you work for does things like this: \\SERVER1\Data\Region\SubRegion\SubSubRegion\Reports\Weekly\2014-25\WidgetReport\SubWidgetReports\..... you can eat up space pretty quickly. You might need those extra characters.
- chc 12y agoJust a little nit that I feel compelled to pick: The path length limitation is part of Windows, not NTFS. NTFS has a 255-character limit on individual path components, but it allows for much longer paths than that, just like all modern filesystems do. It's the Windows API that sets MAX_PATH to 260.
- lucb1e 12y agoThat explains a thing or two, thanks for mentioning it.
- orbitingpluto 12y agoFeel free to nitpick. I remember writing to an NTFS parition from Linux. I finally managed to delete the unresponsive directories in Powershell except for one straggler which also had special characters.
- oakwhiz 12y agoI've managed to go past this limit on NTFS and very strange things did happen.
- acdha 12y agoBefore everyone wised up / bad publicity forced them to, it wasn't uncommon for things like FTP servers to be able to create filenames which were either very long or contained reserved DOS names (e.g. CON, AUX, LPT1, etc.) and were thus undeletable using the Win32 APIs used by Explorer or cmd.exe. The posix and NT-native APIs didn't have this limit so Windows admins either had to find a ported POSIX utility (rm.exe was popular) or learn how to use UNC paths: http://msdn.microsoft.com/en-us/library/aa365247%28v=vs.85%29.aspx#namespaces http://msdn.microsoft.com/en-us/library/aa365247%28v=vs.85%2... Characteristically, Microsoft doesn't seem to be interested in fixing this so everyone who builds a new file sharing service probably has to add layers of script-kiddy protection for backwards compatibility.
- thathonkey 12y agoIf it ain't broke, don't fix it. (The reasons for why it is "broken" to limit to 3-char in the article aren't good enough to warrant a paradigm shift for a convention almost as old as computing itself).
- nikatwork 12y agoThree letter extensions can also be important for compatibility with poorly-written software. I work with an "enterprise" (hah) document management system which refuses to believe that .docx files are a thing.
- magnetikonline 12y agoIf you were going to go the whole hog, slap the entire MIME type name in the extension :) Otherwise I don't think 3-4 character file extensions have really let anyone down in the history of computing.
- lucb1e 12y ago> Perhaps the only, quite unusual, exception is the .html file name extension for HTML files Sounds like he has been missing out on Microsoft Office since at least 2007, though I must say I can only applaud that fact. More seriously, the article might as well have ranted about files having any extension at all. Magic mime is much more reliable and versatile, not to mention all the viruses using .jpg.exe extensions.
- phkahler 12y ago.jpg.exe extensions are less of a problem when the operating system doesn't hide them.
- lucb1e 12y agoHeh, that too. I keep saying "first thing I do when" because there's so much to do when installing Windows even if it's not for myself (nowadays Windows installs are, luckily, never for myself), but it really is one of the first things.
- dm2 12y agoThe "hide known file extensions" default option should have been around less than a month before someone realize, "this is very insecure". The fact that it's been around for over a decade is just lame.
- sheetjs 12y agoFWIW the 2007+ office file extensions are all more than 3 characters (e.g. ACCDB, ACCDT, DOCX, DOCM, DOTX, DOTM, XLAM, PPTX, PPTM, POTX, POTM, PPAM, PPSX, PPSM, SLDX, SLDM, XLSX, XLSM, XLTX, XLSM, XLSB)
- deleted 12y ago[deleted]
- vbrendel 12y agoThe .html 'exception' shouldn't really be that surprising. How many web servers do you know that run on MS-DOS?
- boomlinde 12y agoThe "htm" extension was a lot more common back when some consumer systems still had the three character limit. The web server limitations don't matter that much on something like a web hotel where users typically FTP their files over from whatever OS they are using themselves.
- kourt 12y agoOne of my biggest disappointments with Gnumeric is the file extension: tab completion only works sometimes, and I'd really like to change find ~ -name \.gnumeric to find ~ -name \.gnm or find ~ -name \*.gsc Also it takes up more space when listing files in a terminal. Also, the 3 letter convention is a somewhat helpful limitation in the same way that countries defining which side of the road to use is actually helpful. For instance, it is nice to have all of my JPEGs ending in .jpg rather than a mix of .jpg, .jpeg, .JPG .JPEG.
- ChuckMcM 12y agoHeh, no respect for history. Short answer, while UNIX had its 'magic' number which looked at the first 32 bits (four bytes) of a file to figure out what kind it was (hash bang for the win) and Apple had its own awesomesauce of a 'forked' file system where the file and what it was were in two completely separate but extensible parts of the file system, CP/M (which had emulated DEC) and then DOS which had emulated CP/M used a 3 character (which is only 24 bits but still plenty) to encode the type of file in the name since it couldn't necessarily live in the file itself and there was no 'attribute fork' to stick it in. Interestingly this is a problem that lives on, people still want to identify what a file is and that requires some sort of identifier. Embedding it in the name is just as good as anything, but the important bit is that you stay consistent. If you're web documents are .htm, .html, .www, .web, etc your configuration gets unwieldy.
- kabdib 12y agoI really liked the Mac "forked" file system. File types and bundles were simple and worked really well. They also facilitated "drag and drop" application installs, where the Finder did most of the work keeping track of where applications lived. The app install process on Windows makes me weep (I think that Visual Studio installs well over 10,000 keys in the registry. What the hell? This number should be zero in a well designed system . . . but don't get me started on the disaster that is COM). Incidentally, Windows NT has file forks. They're not often used, and lots of utilities don't know about them, but they can be quite useful.
- irysius 12y ago.html isn't quite served exactly the same way as .htm on a Windows OS. Although both .html and .htm will open up a page in your default browser, the latter will attempt to locate predefined folders that presumably contains images/scripts for your .htm file.
- korzun 12y agoArticle is from 2010. For the same reason you want shorter domain names, people want shorter extensions. Decade later you can see that there a greater amount of 4+ characters extensions. > http://en.wikipedia.org/wiki/List_of_file_formats http://en.wikipedia.org/wiki/List_of_file_formats
- lucb1e 12y ago> For the same reason you want shorter domain names Good one, hadn't thought of the analogy to .commercial, .network and .organization yet (.com, .net and .org, incase anyone doesn't get it). It's 2014, let's use the whole name already!