comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: The Elements of IDL style
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: The Elements of IDL style [message #37496 is a reply to message #37491] Sat, 20 December 2003 08:39 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Michael Wallace writes:

> I hope I'm not opening a can of worms with this question. Maybe I am.
> If I am, let the fun ensue! ;-)
>
> I am curious if there are any community guidelines for coding
> conventions and style for IDL. I tried googling, but the results I
> turned up were either "do whatever you want" or just some little blurb
> about one little itty-bitty facet of the language. I did find a link
> that looked promising, http://www.rsinc.com/helpfile.asp?wh=14, but
> alas, I got a lovely empty white web page in return.
>
> I'm not just interested in the style of coding things like when to use
> UPPERCASE or lowercase or MixedCase, but also in what is an appropriate
> way to name functions and procedures, files and such.
>
> The coding standards meetings I've been in over the years have been some
> of the most heated and hated meetings of all and at the end of the day,
> when the dust has settled, no real progress was made except that
> everyone now thinks that everyone else is a stark raving mad idiot. So
> with that in mind, I don't want to start anything like that. Either
> standards exist or they don't. If they exist, I'd appreciate someone
> providing a link to the standards. If not, just tell me so, and I'll
> make up my own.

Of course there is an IDL Style Guide. It is called
the "Coyote Way" and I have made it a 16-year quest
to get it adopted. So far, only Ben Tupper has converted,
and then only intermittently. :-(

*Which* style you use is much less important than
the fact that you *have* style. All decent IDL programmers
have style, and it usually involves consistent indenting
and use of white space, as well as a style of capitalization.
I've never seen two good programmers use the same style, but
when you look at a piece of IDL code you know immediately
whether you are looking at the work of a stylish programmer or not.
And believe me, if you are, that program is going to be a LOT
easier to work with and to understand.

A style helps you see how a program works. A good style along
with decent variable naming conventions allows you to "read"
code the way you might read a book. (And, of course, a *great*
style involves a copious amount of program documentation, too.)

The only *absolute* rule I have, and this drives me absolutely
insane, is that people learn to name their programs and structure
their program modules in a file in such a way that they don't have
to compile the damn thing every time they want to use it. But I
have written about this, too (apparently to little avail given
the typical code I see when I am out and about):

http:/www.dfanning.com/tips/namefiles.html

This probably has less to do with the Coyote Way then it does
with the IDL Way. But programs should be written in a way that
they automatically compile themselves. Period. :-)

(Whew! Am I ready for Christmas yet? I've been working on
that Scrooge thing.)

Cheers,

David

P.S. Let's just say if you find any code around here written by
someone named, say Liam, or Craig, or JD, or Rick that it is likely
to have the appropriate style for you to emulate. :-)

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: IDL vs JAVA/JAI
Next Topic: Orientation of IDLgrAxis Tick Labels

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Jul 22 10:36:32 PDT 2026

Total time taken to generate the page: 0.05704 seconds