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

Re: Game announcements on LGDC





Rick Genter wrote:

> > of optimisation, ofcourse.  It wouldn't be particularly malicious, imho, to
> > label that kind of contributions as "Warning : unstructured programming" or
> > something ;) Anything else which does meet a certain standard of structuring,
> > couldn't be really judged upon, because that would become a matter of style.
> What about code that, while correctly structured, is still incomprehensible
> due to:
> 1) completely obscure, typedef, variable and function names
> 2) a complete lack of comments?

Well, I thought about this, and was in doubt for a while, but as you read I
decided to call that a matter of "style".  "My style" would be, as much
comments as possible, and NamesThatExplicitlyShowWhatTheyAreFor.
However, comments are usually omitted, and variables shortened, in cases
where the code is self-descriptive; and then ofcourse you run into the
problem  that what's simple enough to be left as is for one may be obscure
for another :

> If you've ever looked at the sources to the Quake 1 tools qbsp and vis, you
> know of what I speak :-/.

I'm sure the code doesn't really need comments, from JC's point of view ;)

So should we exclude a listing because it's loops have no comments, and only
variables called i, j and k indexing into x [] and t [] ?  The author may come
back asking "What are you talking about ?  That code is trivial !"...

Not that I disagree completely though.  Code should be "readable", the
problem is simply that there's no simple metric for measuring readability;
if there was, every manager would know about it, last time I checked, they
didn't :)  So I agree with the idea of keeping really bad code off the site,
but the majority of cases will probably be in the grey zone of
reasonably-good-but-still-written-to-learn...  That will be tricky to
judge, with or without a few guidelines such as Dijkstra-compliance,
comments, and identifier names, and I do not volunteer to proof read
every source submitted anyway, so... ;)

Bert
--

-=<Short Controlled Bursts>=-