Monday, August 20, 2012

Apple #599: C:\ Drive and 404 Not Found

Now that the Olympics has ended (sigh), it's time for me to get caught up on a few requests.  I've got one that comes from a reader and one that comes from me.  Since they're both computer-related and brief, I'm combining them into one entry.

C:\ Drive


C:\ command prompt
(Image from DeviantArt)


Regular Daily Apple reader Jeremiah wants to know, why are computer hard drives labeled c:\?  Why not a:\ or q:\ or any other letter?

Well, I know why it's not called a:\. Those were floppy drives.  But why the hard drive isn't called any other letter of the alphabet, I don't know.

  • The reason it's called c:\ turns out to have about as much thought behind it as, because floppies were called a:\.
  • IBM came up with this naming convention.  Way back in the days of the first computers, there really wasn't a thing like a hard drive -- at least, not the way we know hard drives today.  Most of the information was supplied by some external source, like a floppy disk.

 
The 8-inch floppy disk. First introduced in 1971, with storage capacity of about 100K.
(Photo from Old Computers.net)

The 3 1/2 inch floppy disk, first introduced by Sony in 1980.
(Photo from Old Computers.net)

This is a Macintosh (circa mid-1980s) with a floppy drive visible in the front.
(Photo from Only HD Wallpapers)

  • Since floppy disks were usually what you needed even to boot the computer, their drives were called a:\.
  • As computers got more advanced, they began to require users to load one floppy disk, switch to another and load that, and sometimes switch back to the first.  So it became convenient to add a second floppy drive, called -- you guessed it -- b:\.
  • Some people, when they tell this story, say that the b:\ drive was for a different type of external media, namely, tape drives.  Tape drives obviously had different dimensions and specifications than a floppies, so they needed a different drive altogether to handle those, and thus, those got called b:\. 


Various versions of magnetic storage tape (not cassette but computer), with a floppy at far right, all sitting on top of a tape drive.
(Photo from Wikipedia)

  • I'm not sure which of the two versions is more reputable -- b:\ drive is second floppy or b:\ drive is tape drive -- so I'll leave it to you to decide which tale you prefer.
  • Hard drives, which came along a little later, got the next available letter, c:\.
  • People have wondered, now that there aren't floppy drives anymore, and very few people use tape drives -- or even mention b:\ drives -- why not bump the hard drive up to a:\?
  • Answer: because every computer-related thing is standardized to look for the hard drive at c:\. Software, hardware, peripherals, you name it, when it wants to find the hard drive, it says, "C:\? Where are you?" If the hard drive were re-named anything else, c:\ would go unfound. It would wander, lost and lonely, through the world of computers, friendless and disconnected....

404 Not Found
This is the closest I could find to what I remember about how the 404 Not Found message used to look.  Ah, Netscape. Remember Netscape?  Good times.
(Image from AlphaSoftware)

  • Speaking of things not found, I wanted to know why that web error message you used to get -- not so much anymore, but every once in a while it does pop up -- had that number 404 at the beginning.
  • Once upon a time, long long ago in 1992, the World Wide Web Consortium (but mainly some guy named Tim Berners-Lee) came up with a list of codes, each of which stood for a different type of web browsing event. If some web page wasn't able to display anything helpful, it would at least display a handy 3-digit number that would tell you what was going on. The codes are specific enough so that, if there's some problem in communication, the code displayed would tell you where the communication broke down.
  • The codes were based, by the way, on FTP status codes. Those go all the way back at least to 1985, if not longer.
  • There are 5 categories of status codes. The first digit indicates the category.  The categories are as follows:
    • 1xx = Informational. Request received, continuing process
    • 2xx = Success. Action was received, understood, and accepted.
    • 3xx = Redirection. Needs further action to process the request.
    • 4xx = Client error. The request contains bad syntax or cannot be fulfilled.
    • 5xx = Server error. The request is apparently valid, but the server failed to fulfill it.
  • Since the 2xx's indicate success, you would hardly ever see a 2xx code.  The 4xx's mean that something about the request you made didn't work.
  • The second & third digits work together as in, "01" "02" "03" or "10." Some of the categories only go up to "07" or "05" or even only as far as "01." The 4xx's -- the "it's your fault" codes -- go all the way up to "17." Of course. Always blame the user.
  • What seems to be counter to "it's your fault" is that the 4xx's are also considered transient errors. Meaning, this is the information we're getting from the server at the moment. But if you try again a bit later, your request might work after all.
  • Here are the codes for the 4xx's:
    • 400 = bad request
    • 401 = unauthorized
    • 402 = payment required
    • 403 = forbidden
    • 404 = not found
    • 405 = method not allowed
    • 406 = not acceptable
    • 407 = proxy authentication required
    • 408 = request timed out
    • 409 = conflict
    • 410 = gone
    • 411 = length required
    • 412 = precondition failed
    • 413 = request entity too large
    • 414 = request URI too large
    • 415 = unsupported media type
    • 416 = requested range not satisfiable
    • 417 = expectation failed.
  • Some of those seem redundant, but other seem like they would be just as useful as 404, if not moreso. Some, like 401 payment required or 401 unauthorized, seem like they would still come in handy today. I might have seen 400 maybe once.  But I don't think I've seen any of the other ones ever.


Well, I'll be dipped. Somebody did get a 410 gone. This is from Germany, though, so maybe that explains it. German precision engineering and all that.
(Image from Schnurpsel, which word I did not make up, I promise.)

  • But the point is, why, if there are all of those "it's your fault" codes, did we only ever really see 404?


Getting a little more current, another 404 Not Found display.
(Image from ZackTheTech)

  • It's rumored that 404 was named after a room at CERN, where the original web servers were located. But that rumor is incorrect. There isn't even a room numbered 404 at CERN.
  • The truth seems to be that 404 turned out to be a very handy catchall. It means that you've done something wrong, but it's not being very specific about what that problem is. Maybe you mistyped something, but it's not sure. It also can't say for sure whether the page or sever you tried to access is permanently gone or disabled. All it knows is it couldn't make the connection. 
  • In fact, it's not really sure about anything, just that there's a problem. If you try again, though, it might work. Or it might not,
  • That's a pretty handy error message:  "It's not working and we're not sure why! But try again and see what happens!"


This is what the 404 Not Found screen looks like these days.  You can see the 404 status code at the bottom of the window.
(Image from Evagoras Charalambous


  • Actually, these status codes are still in use today. In fact, there are now extended codes, which add a decimal point and another digit after the 404 to give you more detail about why you got the 404. Not every site will use the extended codes, but some do.
  • From the web developer side of things, if you can access the log files for a website, you'll see that one of the fields indicates the HTTP status code. This page parses the data you'll see in log files and points out where the status code appears.
  • I think I need to employ 417 Expectation Failed on a more frequent basis.

No comments:

Post a Comment

If you're a spammer, there's no point posting a comment. It will automatically get filtered out or deleted. Comments from real people, however, are always very welcome!