> I prefer to see all the files in a dir and leave it to the file req to filter
> if necessary.

Someone has to code that.
 
> A well organised storage medium should only have files of a suitable type
> anyway.  Unless people like saving .wav in the image files drawer of a gfx
> program etc.

Most users will do that. The OS shouldn't enforce storage habits. It's a
user education issue, not anything to do with file requesters.

> > > > How do you tell if a file is an IFF file
> > > > from inside a DPaint requester, with a name like that?
> > > 
> > > They're discussing the merits of the computer doing the donkey work of
> > > checking a files type not the user! 
> > 
> > Dpaint doesn't check, though, does it? Think.
> 
> Probably not. I haven't used that in a looooooong time.  But they weren't
> discussing a particular programs' faults.  Please re-read my, and their,
> previous statements.

95% of Amiga programs do not filter or check the type of a file before listing
it to load. They only do the check once you click that "Open" button.

At which point "Not a valid IFF file" starts to piss you off a little.

Would it be too hard to scan for FORM...ILBM at the start of every file in
the lister? Yes. It probably would be. Especially on slow media. Especially
in a large directory. Especially on FFS. Especially when you're in a hurry
and the single-threaded checking is blocking your access to the requester
buttons...

> > you don't even need a computer to tell you what's in it.
> 
> Of course you do!  Unless you can read a hard disk with your own eyes! ;)
> In which case, you've been using a computer for too long (or become one ;) and
> you ought to take a break... ;)

I print out directory listings sometimes. Look at a sheet of paper with a
bunch of files listed on it.

"A file for Jamie" 68626524 11/11/2002

Doesn't tell you much about it, does it?

"An mp3 for Zapek" 73635242 11/11/2002

Is better. But it isn't easy to sort or categorise.

"Gundam Wing Theme.mp3" 98737336 11/11/2002

Perfect. Quickly indexed, sorted, human readable too.. I didn't know of
anyone here who could identify a file type of 1000 files just by looking.

> > than to scan the first few kilobytes pattern matching it against a
> > database of 100-200 descriptions of file formats.
> 
> If the header structure is organised/designed effeciently, only a few bytes
> need to be checked and there are faster, more effecient ways of achieving this
> than pattern matching.

Yeah. So you could enforce on your OS that every file has a specially written
super-efficient file type header. What do you do about files created on another
OS?
 
> As I (and Don) said, it's a fundamentally flawed (not to mention basic) method.

Your idea above is more fundamentally flawed.

Blah.mp3 - 99% chance that this is an mp3
Blah2.mp3 - 1% chance that this is an html file

Blah.txt - a file with mp3 header values in just the right places but otherwise
           just a text file. Deficons detects it as an mp3 player and tries to
           load it into AMP. BZZTTT SCREEEECHHHHHHHH as it tries to play it as a
           raw audio file :P

Nothing is infallible. But it's a lot less hassle to try and fail a non-foolproof
method, than it is to expend huge amounts of time and effort just to get it
wrong at the end of the day.

Most operating systems are designed on the basis of keeping things as simple as
possible: the more complex you design a component, the more chance it has of
going wrong, and the more complex the rest of the system is, the more chance a
simple failure cascades into something nasty.

In the above example, blah2.mp3 would be loaded into WinAMP under Windows and
be played as a screechy mess. But it didn't expend any effort into checking
the file, and therefore no CPU time was wasted. What if it did an expensive
free-form check into the file for html tags? I could embed html tags into a
ordinary .txt text file and it would also flag it as html and open it in a
web browser, screwing all my formatting...

> > One day when you learn how computers work in the real world, maybe you'll
> > be qualified enough to talk about them. Until then you seem to be little
> > more than a BAF.
> 
> Oh, and I suppose you do then?!  You, the one who thinks 80s filetype
> recognition is acceptable today!  I don't think many frustrated win users would
> agree with you there....

There's nothing frustrating about it when you consider the support costs
involved. If you ever had to design software in a professional setting, with
real users to support, and real money at stake ($thousands per license
rather than $10 shareware fees) then you realise that overcomplicating your
system with huge and sophisticated methods - when there is a simpler and
just as "broken" way of doing it - will only cause you grief in the end.

Elegance is NOT the ultimate goal of computing. It's a pleasant side effect.
GETTING THINGS DONE overrides wasting time at any point during the design
process.

-- 
Matt Sealey <[EMAIL PROTECTED]> 

Reply via email to