What is a file? (2011)
When I first started using computers, I did so on Microsoft Windows 95. The first applications that I used were Netscape Navigator and MS Paint, as well as a few games. Being a child when I was introduced to computers, I did not have any notion about what was going on inside of the computer at all. All I knew was that there was a screen, a mouse and a keyboard, and that I could click on things on the screen and I could type on the keyboard.<p>The first time I was confronted with the notion of a file was certainly when I had painted something in MS Paint and I had clicked the save button. I think I had been told to not click &quot;My Computer&quot;, which makes sense -- you don&#x27;t want a child to accidentally move, delete or rename files on your computer. Hence I had no notion of the file system. All that was know to me was the desktop, the start menu, and a select few programs accessible through either icons on the desktop or in the start menu.<p>I had played a couple of games on the computer, and in those I could save the game and then the next time I could resume the game someplace near to where I had last been -- or rather, I could have my father help me resume the game. So when I managed to save the painting I sort of expected that it would just show up on screen the next time I started MS Paint. When it didn&#x27;t I was a befuddled for a moment but I just concluded that I didn&#x27;t understand what had happened and didn&#x27;t give much more thought to it. I think this is pretty typical of how most children treat situations that confuse them.<p>This is user level 0. You are able to move the cursor and to type a little bit on the keyboard and to run some specific programs, but that&#x27;s it.<p>During the next few years I learn how to work with files in MS Paint and other specific applications.<p>However, not all files are equal. If I try to open a file that was made in one application with another application it will often either result in an error message or in garbage on the screen.<p>This TIED my notion of a <i>file</i> to <i>specific programs, and to the content that is shown on screen</i> for the LONGEST time. It is a bit difficult to explain what I mean here but I think that to the majority of the population of a whole, this is what a file is to them. They view a file as an icon that you can open in a SPECIFIC program. And they call that file a &quot;&lt;name of program&gt; file&quot;, or they call it by the extension, but they have no idea, or they have the wrong idea, about what is the contents of the file. If you give a regular Windows user two files which are both named say .dat, (a commonly used generic file extension for data,) then they will think that those two files necessarily must be of the same kind &quot;somehow&quot; and that they are to be opened, both of them, with some specific, unknown program. This is bad and harmful in my opinion.<p>Likewise, I was quite confused for the longest time about &quot;My Documents&quot; and &quot;My Pictures&quot;. I was confused by why things were being put in &quot;My Documents&quot; by default when those things were not things that I considered to be &quot;documents&quot;.<p>Furthermore it was quite mystical to me for a long time how &quot;My Computer&quot; could be on the desktop at the same time as my desktop was under a folder that was within &quot;My Computer&quot; itself. This however is not a <i>huge</i> deal. Just yet another thing that didn&#x27;t make sense to me while I was trapped with the graphical representation of the system.<p>The paper is arguing a point of view that a different abstraction should be used than the hierarchical file system. I agree to some extent but not for the same reason perhaps.<p>I think that the desktop metaphor is inherently harmful as a first introduction to computing. The desktop is fine ONCE you&#x27;ve understood how the system works from a bit of a different point of view (though perhaps NOT <i>necessarily</i> a <i>lower</i> level as such), but until then the desktop metaphor will trick you into believing very many things that are simply not true, and which are going to come back and bite you in ways like those mentioned in the paper.<p>As for the doing away with the hierarchical file system, I agree. Throw it out. I enjoy Unix, but I don&#x27;t hold the hierarchical file system particularly dear. In fact, I think Unix has some very powerful ideas, and it sucks a lot less than Windows, but Unix is just a local optimum and nothing more.<p>---<p>Finally, on a bit of a different note, I&#x27;d like to state how I tend to think of files now.<p>To me, a file is data. Often that data will have been structured in a particular way, and sometimes it will have been structured in no particular way. A valid python program has a structure that allows the python interpreter to execute it. A text file that someone wrote using a plain text editor has a certain encoding but no structure beyond that. A file that was created by putting random data into it will not have any structure. A file that was corrupted will have some data that does not conform to the intended structure.<p>I am aware that the order of the bytes and their property of being one single, continuous unit, in persistent storage might don&#x27;t match the order that is presented to applications by the operating system, but in my use of computers this has not yet mattered so I choose to ignore that fact. So I too am living a bit of a &quot;lie&quot; with regards to how I think about files, I admit that.<p>Some files are not really files, but they are convenient because they offer you a simple interface to some useful functionality. I am speaking of course of &#x2F;dev&#x2F;urandom and friends.<p>Regular files are representations of &quot;something&quot;. Like a text, or a photo, or anything else that you can create a meaningful representation of. You can load the data into a program as long as that program has been programmed to understand the structure that is used in the file that stores your representation of your data. If the program that you would like to use does not understand that file format you either convert the file to some other format if an acceptable conversion is possible with an existing piece of software. If none exists, you implement it yourself, either into the program that you are using, because it&#x27;s open source as is the vast majority of the rest of your software, or as a standalone program that does just conversion, in both cases you are able to do this because the file format is sufficiently simple, or at least the subset of the format that you need is, and the format is open. If you are using proprietary software (including using multiple pieces of proprietary software) in combination with proprietary file formats, then either<p>1. The proprietary piece(s) of software is&#x2F;are able to do <i>absolutely everything</i> that you need to do (or at least, you think so), or<p>2. The data is not sufficiently important to you to warrant building better tools yourself, or<p>3. It&#x27;s so difficult to build these tools that you don&#x27;t have an alternative. For example, the data might come from very complicated equipment that you couldn&#x27;t build yourself even if given a million years to do so, and the data is so complex that you aren&#x27;t able to understand it from inspection nor from reverse engineering, or<p>4. The requirements changed (see also point one about thinking that the software did everything that you needed it to do), or<p>5. You&#x27;ve done fucked up. You didn&#x27;t do your research and now you&#x27;ve stuck with this. (See also point one about thinking that the software did everything that you needed it to do.)<p>Anyway, once you&#x27;ve loaded your data into a piece of software that is able to read it, something happens, and it brings us back to what we were talking about.<p>---<p>Once you&#x27;ve loaded your data into a piece of software that is able to read it, or &quot;opened a file&quot; as is often the way that this is achieved, I would argue that you are not operating on a file. You are working on the data that was in the file. This is a very important distinction.<p>When you hit save, you are not saving the file. You are requesting that parts of the application state to persistent storage. Again, a very important distinciton.<p>If people knew this and understood this, computers would make more sense to them. They are right in the paper that the mismatch between what developers, computer scientists and others think of as files is the cause of a lot of the kinds of problems that people have when they are dealing with files.<p>But where did the users gain their misinformed ideas about files from? I&#x27;ve said it already, I think the desktop metaphor is to blame. Again, it&#x27;s an ok metaphor <i>as long as it&#x27;s not the only metaphor</i>.