From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius)
Newsgroups: comp.lang.c
Subject: Re: Strings and integer sizes
Date: 10 Oct 92 13:53:24 GMT
Organization: University of Helsinki

[ I cancelled an earlier version which could be understood to claim that
  I am more experienced than I am.  Sorry if you see it anyway. ]

berlin@is.morgan.com (Alexander Berlin) writes (regarding Richard
Hartman's recently posted strncpyz function): 
> What is the purpose of having the third argument when calling strcpy 
> in your "central include file"?

Considering the intended purpose of the function, I assume that strncpy
was meant instead (I didn't even notice that it used strcpy, but read it
as strncpy).

>I agree with Lars - you are not the only caretaker here. You are free to
>skip a few discussion threads and do some C-studies.

My intended meaning was similar but not quite as blunt.  I don't want to
kick anybody out of the newsgroup, or to insist that only people with
certified knowledge and generally accepted wizard diplomas should be
allowed to post here (not only because then I couldn't post here
either).  I do not have the power to do that, and in practice, nobody
does.  Even if I did have the power, I wouldn't use it.  If you think
you have something to add to a discussion, something which probably
isn't going to be said by anybody else, go right ahead and post,
otherwise we won't have that many discussions.  (On the other hand, if
you make a mistake, don't get upset if somebody corrects it.)

My meaning is that it would be a good idea to try to get one's facts
straight, especially in cases when it only requires looking up things in
a book.  This applies to everybody, not just Mr.  Hartman; he just
happened to post a few posts too many with small but irritating
shortcomings for me to be able to resist making snide remarks.  This
wasn't particularly polite on my part, either; this kind of problem is
usually better dealt with personal e-mail.  

Also, please don't assume that I think I don't make mistakes (of course
I do).  Making a mistake is no crime, but doing it often and not trying
to avoid them is at least impolite.  (I'm not claiming that Mr.  Hartman
doesn't try to avoid making mistakes, but from the looks of it, he seems
to be a bit careless at times.  Again, he is not the only one, this is
actually the case with a lot of people, including myself often enough,
but he posts enough to become quite noticeable.)

Personally, I usually try to resist the urge to post unless I am very,
very certain, or have my usual reference works [note 1] around so that I
can check things.  (I don't like making mistakes in public.)

Of course, trying to minimize errors does require you to be very aware
of your own shortcomings and to be very sensitive to what things you
really know (or grok, using a term from Heinlein's "Stranger in a
Strange Land" [and I checked the title, since I don't rely on my memory
well enough to be certain of it after a couple of years]), and what
things you only happen to never have any real trouble with.  Having a
lot of experience (like, say, more than ten years), and not being too
confident help a bit.  (Unfortunately, I have little experience and am
almost megalomaniac at times.)

As an example, do you _really_ know all the rules of automatic type
promotion, balancing, and casting, or do you just happen to avoid all
the darker corners? If you have written a certified compiler, or were on
the committee when they forumlated the rules, you probably do, otherwise
you might well not.  I don't, so I check them if I have to, or avoid
them if I can.

In the hope of not starting a flame war: This is not a flame on Mr.
Hartman.  I have nothing against him; although I don't necessarily like
his discussion style, if he doesn't agree, he is free to continue just
as he pleases.  Also, this kind of meta-discussion of how and what
should be discussed on comp.lang.c is usually not very fruitful, nor
interesting.  Either taking it to another newsgroup (usually alt.flame,
since the tone of the postings drops quickly to that level), or
preferably to e-mail would be more appropriate for it.  I am posting
this because I made the comments in an earlier article fully knowing
they were flame-bait, and hopefully I can stop a flame war.  I apologize
for the comments.  (Not, however, for my opinions, only the way I
expressed them; as I said, e-mail would have been a better way.)

--
Lars.Wirzenius@helsinki.fi  (finger wirzeniu@klaava.helsinki.fi)


Note 1.  In case it interests, and there does seem to be an ongoing
interest in good C books (although it is usually directed towards
introductory books), the books I usually use are "Standard C" by P.J.
Plauger and Jim Brodie, an excellent and compact reference to Standard
C, and K&R, both editions (not as much for looking up things, P&B covers
that part rather well, but more out of love, since these are the two
books from which I learned C originally, and I like to keep them
around).

In addition, I use the compiler / operating system manuals when
necessary, but only when necessary.  In general I try to avoid product
specific C manuals, since they document only a particular
implementation, and often don't even hint at portability problems or
deviations from the standard.
Newsgroups: comp.lang.c