| Re: Most Common IDL Programming Errors [message #59747 is a reply to message #59738] |
Wed, 09 April 2008 00:06   |
Spon
Messages: 178 Registered: September 2007
|
Senior Member |
|
|
On Apr 9, 3:27 am, David Fanning <n...@dfanning.com> wrote:
Judging by the fact that we've got 11 IDL licences in the building,
probably 5-15 users in any given week (including at least one *Real*
computer scientist - with a PhD and everything) and I'm the only one
who ever seems to use REBIN, REFORM, REVERSE... even READ_BINARY
instead of OPENR / FSTAT / READU, I'd say some more major errors are:
- Not knowing where to find the useful built-in functions in the sea
of helpfiles
- Coding up your own function when there's a perfectly useful inbuilt
command that'll do what you want, and can even do it without three
nested FOR loops ;-)
- Writing code that solves one specific problem (particularly using
integers that don't change for this dataset but may well do so for the
next one, rendering the function useless without major re-working,
when a simple call to SIZE would have made it SOOO much more flexible)
So in short, I'd love to see an article entitled something like: "I've
only got time to read a dozen helpfiles - which ones should I read?"
This could contain the names of the commands and a brief one-line
summary of what each one does. Of course, deciding which helpfiles to
pick is liable to cause some, uh... heated debate ;-)
FWIW, I'd definitely throw in: SIZE, REFORM, REBIN, TRANSPOSE, WHERE,
BYTSCL ... and then maybe ARRAY_INDICES; also TV, PLOT, OPLOT & TVSCL
to show the wealth of keywords they accept.
I realise that I'm coming at this from a biophysics-lab-in-academia
angle, which may be completely different to other people.
Regards,
Chris
|
|
|
|