Archive: February 1, 2006

<<< January 31, 2006

Home

February 2, 2006 >>>


On the Persistence of Bad Design...

Wednesday,  02/01/06  09:36 PM

… on the persistence of bad design decisions …

As a programmer you are constantly making design decisions.  Some are small, some are big.  Some have little effect, some have larger effect.  And every once in a while you make some decisions which seem small, but have a huge effect.  If these decisions are made badly, then it affects many other people for years to come.  Some of the worst decisions which have had the biggest bad effect were made in the early days of DOS.

These decisions were not made at Microsoft (raise your hand if you knew DOS was not originally developed by Gates & company) and were made in a hurry, because IBM was choosing the operating system for their new personal computer, and time was of the essence.  The competitors at that time were CP/M, QDOS, and UCSD p-system.  QDOS was a skinny clone of CP/M, which was [at that time] the dominant OS for personal computers.  Microsoft took QDOS, reworked it a bit, and positioned it as the OS of choice for IBM.  They priced it far less than CP/M and p-system, and the rest, as they say, is history.

Now CP/M was a shallow copy of Unix.  CP/M was little more than a command line interpreter, but it did emulate a few really important Unix concepts, such as stdin/stdout, redirection, and pipes.  (It also introduced some non-Unix kludges, like “drive letters”, which – in the spirit of this rant - we regret to this day.)  And these concepts were cloned in DOS.

The DOS people made one little teeny decision which plagues us to this day.  They wanted to support “switches” on the command line.  This is a Unix-ish concept, and in Unix switches are always introduced by a dash.  So you type, “program –switch –switch2 file file”.  The command line parameters were positional, but switches were a way to stick in non-positional optional things.  I don’t know why – history does record, or at least Mr. Google doesn’t seem to know – but for some reason the DOS people decided to use slashes instead of dashes for switches.  Queue heavy organ music – dum dum DUM.

As we all know, the Unix path delimiter was a forward slash.  But this was before hard drives, there were no directories in DOS.  Only devices and files.  Since slashes were not used for anything else, it probably seemed okay to use them for switches.  That was a bad decision – not to remain compatible with a preexisting standard – but so be it.  There was worse to come.

Along came DOS 2.0, and support for hard drives, and support for directories.  And now we needed path delimiters!  But since the DOS people had already used forward slashes for switches, they decided to use backward slashes for path delimiters.  Queue more heavy organ music – dum dum DUM.  This one decision ranks as one of the worst OS design decisions of all time, amid serious competition.  At least in terms of the reach of the effect, this one wins.

Now backslashes are funky characters to begin with – most people have trouble finding them on a keyboard – but they already had a purpose in life.  Since time zero backslashes have been used to “escape” non-printable characters.  For example, t means “tab” and n means “linefeed” (“newline”).  So the DOS guys, in their infinite dis-wisdom, picked the escape character to use as their path delimiter.

By the way, this difference only exists on the command line.  Internally DOS has always supported forward slashes as well as backward slashes in path delimiters, probably as a concession to compatibility with Unix.  But on the command line you must use backward slashes to avoid confusion with switches.

Did this make sense?  No.  Does it cause problems?  Yes.  How much time has been wasted over this bad design decision?  Who can say...  Not only do people like me have to make a career of editing scripts which include things like this: “sed s/\\\\/\\\\\\\\/g”, we also get so irritated that we spend additional time composing and posting long rants about it on blogs.  Which then waste the time of our visitors who have to read them :)

Moral of the story:  Make good decisions.  You never know how far-reaching the effects of a bad decision might be.

P.S. Yes, I really have a script which includes “sed s/\\\\/\\\\\\\\/g”.  This is necessary to preserve the leading “\” in servernames.  Don’t ask.

[ Later: this article explains further.  [ via Keith Gaughan ]  My favorite part of the article is the last line, "Fixed title - it's been bugging me all week"; of course we know exactly why the title was broken, it contains a backslash, and the author probably had to add at least one backslash, or maybe three, or maybe five, in order to get a backslash to appear in the title correctly :)  The persistence of bad design, indeed...  ]

 

Wednesday,  02/01/06  09:49 PM

Happy Birthday to you,
Happy Birthday to you,
Happy Birthday dear Nicole,
Happy Birthday to you!

Woah.  I have a 24 year old daughter.  Now that is scary.

Woundwart notes the age gauge.  It tells me: "You were...  25 years old when Apple introduced the Macintosh" So be it :)

Hey, we have a new planet!  (or something...)  There's a new kid in town, named UB313, which orbits our Sun and is larger than Pluto.  First we had Quaoar, then Sedna, and now this - clearly the whole planet definition thing needs to be looked at.  I actually think all of them are Kuiper objects and probably not really planets... 

P.S. Score another one for Caltech.  We can't play football, but we can find planets :)

P.P.S. However, we can't find our way down Mount Wilson in the dark.  Without flashlights.

BW: Top ten hybrid myths.  #10 is "Hybrids are a Fad".  That is clearly a myth :)  Here in Southern California many freeways have a diamond lane, the left lane can only be used by vehicles with two or more people in them - or, by hybrids.  A very cool law, IMHO. 

The Sailing Simulator!  Very cool.  I was able to hit 8 knots to weather in 17 knots, how about you?  [ via The Horse's Mouth

So what do you think, Is it time to revamp the periodic table?  (One approach is shown at right; it looks a bit like the solar system including Kuiper belt objects...)  This is one of those vexing problems that nag at you every day, isn't it :) 

liquid on siliconHere are more awesome pictures from science, posted at Princeton's website.  Just amazing.  [ via Cory Doctorow

Okay, more beautiful pictures, this time from the Harbin ice festival in China!  I have to say it - this is SO COOL!  Check it out, you'll be amazed... 

Here's good news: Randall Parker reports Brain Enhancement Drugs Headed to Market.  Primarily memory enhancers, but also some other things that I can't quite remember... 

Maybe after I use brain enhancement drugs, I'll be able to fully comprehend quantum physics.  Until then, it seems too weird to be true.  Bram Cohen (author of Bittorrent) illustrates the weirdness perfectly with hisquantum duelist.  "After entering and locking the black box, the Quantum Duelist flips a coin.  If it comes up heads, he turns to the right, if it comes up tails, he turns to the left.  Either way, he then takes ten paces forwards, turns around, and fires a gun straight ahead.  According to quantum mechanics, after the black box is opened, there's some chance that the duelist will be lying on the floor ten paces to the left, dead from a gunshot between the eyes fired by himself at a distance of twenty paces."  Riiight. 

 

NASA's Virtual Earth

Wednesday,  02/01/06  11:14 PM

NASA recently published a high-resolution topographic map of the Earth, created from satellite photographs.  It was remarkable not only for its detail, but for the fact that it was 2.9GB in size (86400x43200 pixels), and that it was distributed using Bittorrent.  Pretty cool.  For those of you who don't feel like downloading the file, you can still view it in comfort right here in your browser, just click this image:

(After clicking, hit F11 to maximize your browser's window.)

This same problem confronts Pathologists who want to view digitized microscope slides.  The images are so large they cannot practically be transferred over wide-area networks, not even with Bittorrent.  But using incremental client/server viewers like Aperio's, they can view any part of the image at any resolution.  Pretty cool :)

 
 

Return to the archive.