Re: Stupidest IDL code: my entry [message #11959] |
Fri, 05 June 1998 00:00 |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
>
> In article <MPG.fe07069789b867d9897ce@news.frii.com>,
> davidf@dfanning.com (David Fanning) wrote:
>
>> P.S. I think we should have a contest to see who can write
>> the lousiest IDL code. (Or the code which most resembles
>> C code, which often amounts to the same thing.) Bonus points if
>> the user can't figure out *what* it is suppose to do!
...or how about stupidest IDL code? Once I was having a particularly
bad day, one of those days when you should not be coding *anything*,
when I needed an array of handles so I could access some data. So
trying to be as clever as I possibly could be, I used:
handle_array = replicate( handle_create(), 10 )
While I was running the program, I was having all kinds of really
strange behaviors where it seemed like data was disappearing or
changing types. It took me about 30 minutes (on this very bad day)
to track down the problem.
Dave
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
|
|