|
|
 |
Re: FN-FORUM junior forum suggestion
date posted 29th September 2002 21:19
----- Original Message -----
From: "Alex Butcher" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Sunday, September 29, 2002 8:24 PM
Subject: Re: FN-FORUM junior forum suggestion
.
>
> I've seen this with a number of self-taught programmers too. By no means
> would I claim to write the most optimal, most correct, or even most clear
> code, but I do make an effort to make everything I write understandable by
> others.
>
Which is all anyone can hope for and expect. It isn't always possible to
make code as readable as we would like, either because it would make it too
inefficient, or because of time constraints (an insultingly painful fact of
life) but it is important that engineers know why they have made code that
is not as easy to read as they would like, rather than just not giving a
damn.
> > BTW when I showed him HTML-Tidy, he rejected it because it was 'too
rigid'
> > and kept on bringing up errors....
>
> Heh. I used to hate gcc (the GNU C Compiler) and the reams of errors it
> generated when compiling with '-ansi -Wall' (ANSI standard C, all
warnings)
> as it very often made it hard to track down the original source of an
error
> (a missing semi-colon, usually ;-) but now I make sure any production code
> compiles cleanly with both those options. If I was making the compiler do
> all sorts of horrid tricks (e.g. kernel code) I might have an excuse for
> letting one or two slip past, but as I don't...
:) It is a pain sometimes :) I remember inheriting someone elses code that
had lots of weird bugs in it and taking a couple of weeks to eradicate
nearly 300 warnings from it. There was general perplexity about why I spent
the time to do this as, after all, they were 'only warnings', weren't
they???
Just goes to show how badly educated they were in the nature of compilers
and C and how they really weren't qualified to do the job they were doing.
The real answer, that a warning in C means that code could be generated, but
it is perhaps ambiguous, elluded them. A warning in C is actually an error
that must be addressed (and K&R, H&S and the X3J11 documents do point it
out - maybe the point about people not reading standards could be made again
:) )
Occasionally there are cases when it is impossible to remove a warning
because of a conflict with a library of other resource. This can happen when
writing the OS kernel or, ironically, a compiler where odd datastructures
are being used. However, accepting the existence of a warning shouldn't be
taken lightly and should really only be accepted by someone who fully
understands the compilations process. There are fewer people around with
those skill than would be suggested by the amount of code that throws a
warning ;)
Mark
|
 |
|