FidoNet Echomail Archive
aust_c_here

<<< Previous Index Next >>>

From: David Nugent
To: Frank Malcolm
Date: 1997-01-14 03:08:12
Subject: A few questions

 > PW>  FM> just as C is a write-only "language".
 > PW> I don't quite understand that... <%-\

 > Have you ever tried to *read* it? Someone else's code or your own after
 > a few months?

FWIW - and I realise you didn't actually ask me, but you're going to get a
response anyway - yes, I commonly do. In fact, 90% of the work I do is with
other people's code in one way or another. Moreover, some of this code goes
back into the early and mid 80's, perhaps before; ie. pre-ISO, pre-ANSI -
just pure K&R code. So I have to read and write "hybrid"
styles.

My experience is that it isn't the *language* that is
"write-only", just some programmer's coding styles. If you're
having problems reading your own code, then that experience may be telling
you something. :-) :-)

Seriously, though, I find that most C code if commented appropriately - not
too much, not too little - and using intelligent/natural naming conventions
is easy to read. What I usually find difficult to read is code polluted by
artifical naming conventions (e.g. "hungarian"), using
over-commenting in a rigid format that reads more like a novel than code
containing lengthly explanations of the blatantly obvious, using private
libraries with obscure interfaces, using short and non-obvious local
variable names, using global variables (period - almost) or using a bunch
of private headers without any logical grouping.

It is my unfortunate observation that all these characteristics are far
more common in *recent* code than the older code, all of which usually
constitutes a "valid" excuse to use C++ rather than C when it all
becomes too large and unmanagable.

Sometimes progress is backwards.

Sometimes?  Who am I kidding.


Regards,
David

--- MaltEd/2 1.0.b6
 * Origin: Unique Computing Pty Limited (3:632/348)
SEEN-BY: 633/267 270
@PATH: 632/348 360 50/99 635/728 633/267



<<< Previous Index Next >>>