perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: [OT] AW: Unsuccessful stat on filename containing newline in
Date Thu, 28 Feb 2013 15:50:37 GMT
demerphq wrote:
> On 28 February 2013 13:29, André Warnier <> wrote:
>> wrote:
>> ...
>>> I am pretty shure, I tested the capability of filenames on a Linux (ext2)
>>> or Solaris (ufs) filesystem, a long time ago
>>> The outcome was, that you can use 254 different characters, except the
>>> '\0' and the '/'.
>>> But I agree, it is an annoyance it should be forbidden. ;)
>> The person who invented that spaces and other unprintable characters were
>> allowed in filenames and paths should be found, his PC and iPhone should be
>> confiscated, he should be exiled to an isolated island in the middle of the
>> Arctic Ocean, and he should be nominated for an IgNobel.  The person at
>> Microsoft who decided that "C:\Program Files" was an acceptable place to
>> install programs should be sent along as his butler.
> What a stupid thing to say.

My comment was meant as light and humorous.  I am sorry that it was misunderstood, and 
sorry that you feel like starting to call names.  Relax.

> You can use those things on pretty much every file system and OS.

1) not without quoting them, you can't. Which is the whole point.
2) which does not mean that it was a good idea to start with, nor that it is a good idea 
to keep going along with it.  The layout of the keys on the computer keyboard on which you

are now typing was designed originally for mechanical writing machines, and its purpose 
was to slow down typing, so that the levers would not cross eachother.  Does it still make

sense ? no. Do we keep on using them ? yes.

> since your grandmother started using a computer and thought it was
> pretty darn stupid for young whippersnappers like yourself to tell her
> that she couldnt name a file "good recipies".

Sir, you flatter me. Being called a young whippersnapper hasn't happened to me in a long,

long time.
My grandmother - peace to her soul - never even heard about computers.  But had she used 
them, she could also not have saved a file named "bills/to-pay", nor a file named "good 
recipes" (she could spell) written in the special reddish ink color that she used in her 
And had she wanted to call me on the telephone, she would have had to dial a number 
composed of the digits 0-9, she could not have just typed my name.

> A special place in hell is reserved for programmers that write code
> that assumes that spaces and other unprintables are illegal in a
> filename.

If that is their only sin, then I'd assume that this special place would be rather nice, 
relatively speaking. And I'd happily join them, because I freely admit that I have made 
that same mistake several times (in my youth of course).  But it is probably pretty crowded.

Let me put this another way. Would you be willing to have your salary docked, until it has

paid for the time lost over the last 20 years, due to mistakes inadvertently made by 
programmers with 10 years or more of experience, in failing to properly quoting paths or 
filenames because they could have spaces in them ?
Or to put in yet another way : would you publically declare here that you have *never* 
yourself made such a mistake ?

It has also been a while since I have personally programmed something without taking this

fact into account. Which does not mean that I like it. And I have seen several generations

of programmers working for me, who are still making that same mistake.
The point is that one must take it into account, and has to add extra programming steps 
*every time* to take this into account. And it did not necessarily have to be so.
If "\0" and "/" or "\" and "<" and ">" and "|" and "&" are disallowed in filenames
on most 
systems, I fail to see how disallowing spaces would be such a dramatic drawback.  But I 
can easily imagine how disallowing spaces in filenames would save the world many thousand

work hours every year.  Would you pretend the opposite ?

Like the keyboards, it can probably not be changed anymore, so we are stuck with it. But I

often think nostalgically about what would have happened (or not happened) if that 
original designer had just said "hey, let's not allow spaces in paths and filenames; they

can use underlines instead".

View raw message