[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is it worth reporting a bug just for that ?



Le Mon, Jun 28, 1999 at 12:13:06PM +0200, Goswin Brederlow écrivit:
[Just to close the thread that my initial shortsighted point of vue beg an]
> : prog spam_spam_spam
> or just
> : prog
> 
> should give a short summary of the useage of "prog", not more than 20
> lines I would say.
> 
> : prog --help
> 
> can scroll on forever, but not on stderr
> 
> Eveything else I fill a wishlist bug against if I'm in the mood of
> filling bugs.

Wichert Akkerman's answer reminded me this evidence : we don't talk about "programs" but about "programs in an Unix environ ment". This means :
1°) A program is not only invoked by the "end user" from the prompt, but used in combination with other ones via pipes ;
2°) So the programs must behave intelligently, taking the input via 0, sending the RESULT ( what the program is actually designed for) via 1, and sending meta-informations ( comments for debugging etc...) via 2.

So, indeed :
1°) If the program isn't invoked cleanly, it has no RESULT to send via 1, but must complain via 2  ( and yes the message have to be short, just giving the "entry point" to know how to get more informations);
2°) If the program is invoked via the "egotistical" option ( say, --help), one asks it "please, talk about yourself". This is the RESULT, what it's invoked for ;  so => SDTOUT.
3°) It the program is invoked via the "schizophrenic" option ( say, --verbose), one asks "do what you have to do, and please look at yourself and comment". The RESULT => STDOUT, and the comments ( meta-informations ) => STDERR.

In practice, we don't always think about that ( see, for example, sgmltool : the man page says : invoke it without argument to have the help ; and the result, with the error, is sent via STDOUT ...).

As an exercise, the reader can now think about the following problem :

Write a program that talks about itself and, if it is invoked cleanly, exit with an error and send the message :"I made an error".
Let's call it : TheLiar.

Question : according to the above policy, where must be sent the message ? :-)

-- 
 /~~~~/-------------------------------------------------
(    (__ Thierry LARONDE
D\_/^ _/ http://www.polynum.com
Q  \|/   thierry.laronde@polynum.com
M___^___________________________________________________


Reply to: