x
Loading
 Loading
Hello, Guest | Login | Register

Feedback and Comments

The magic of magic numbers, Linux isn’t Minix, a correction, and free software goes to jail…

Norm!

In September 2005’s Linux Magazine, a reader asked why magic numbers are a better solution than Windows’ s file extension mechanism. I wanted to add to[ “Power Tools” columnist Jerry Peek’s] reply.
I can think of several reasons that magic numbers are better than extensions.
First and foremost, extensions on Windows are little more than vanity. Microsoft got to .doc first, so they own it. If I want a document format, I have to name it something else. In addition, because there’s no (global) registry, my nifty extension loses as soon as some big vendor steps on me.
For the use of short names, Apple did much better with file types. The Macintosh keeps the type (or kept, as I don’t know how this has evolved), the equivalent of the extension for this purpose, in a consistent location and vendors have an opportunity to register new types. Unfortunately, dealing with a centralized authority of “magic numbers” is also problematic.
Another concern about extensions is that there are so few of them. I expect modern versions of Windows allow extensions longer than three letters (but does the extension-to-type mapping system allow it, I don’t know) and allows extensions containing any Unicode character, but in practice, we’re talking three monocase, alpha-numeric characters. That’s less than 50,000 possible file types (mathematically), nevermind the fact that no one wants the .sux extension. Lest 50,000 seem like more than anyone could ever need, I observe that there…

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. KDE 4.4: Does It Work Yet?
  2. Writing Custom Nagios Plugins with Python
  3. Power Up Linux GUI Apps
  4. Tweeting from the Command Line with Twyt
  5. When Memory Serves You: Using ramfs and tmpfs
Follow Linux Magazine
Rackspace