Google Groups Home
Help | Sign in
Message from discussion Most Common IDL Programming Errors
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Vince Hradil  
View profile
 More options Apr 8, 8:27 pm
Newsgroups: comp.lang.idl-pvwave
From: Vince Hradil <hrad...@yahoo.com>
Date: Tue, 8 Apr 2008 17:27:28 -0700 (PDT)
Local: Tues, Apr 8 2008 8:27 pm
Subject: Re: Most Common IDL Programming Errors
On Apr 8, 7:13 pm, David Fanning <n...@dfanning.com> wrote:

> Folks,

> I realize you don't much like to play games (I'm thinking
> back to the "Yo mama's so ..." thread), but you have no
> idea how hard it is to come up with new topics for my IDL
> Tips page every week. (Especially so because I try to
> understand what I write and make available, which
> pretty much rules out 4/5 of what I read on this newsgroup.)

> Anyway, I was sitting here wondering why we don't have any
> beer in the house again, and it occurred to me that I should
> have a page listing the 10 or 15 most common IDL programming
> errors with their solutions. But I can only think of three.

> Here are the three errors I most commonly see in IDL programs.

> 1. IDL programs are named incorrectly. The last program
>    module in the file should have the same name as the file.
>    Utility modules in the file should start with the name
>    of the "command" (or last) module to make clear their
>    purpose.

> 2. KEYWORD_SET is used to check whether a keyword is
>    "used" or "defined". This function should only be
>    used with binary keywords. (I plan to avoid all
>    nuance with this list, and just go with black and
>    white pronouncements.)

> 3. People draw graphics willy-nilly in widget programs
>    without having the faintest idea which window their
>    graphics might show up in.

> What would be on your list? Of course, typos are assumed. :-)

> Cheers,

> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

How about:
-indexing for-loops with (short) integers.
-using indeces from where without checking count > 0

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google