Re: Coyote's Guide to IDL Progamming Update [message #12963] |
Tue, 22 September 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
I appreciate Kevin Ivory's (Kevin.Ivory@linmpi.mpg.de) kind
comments about my web page, and I always look forward
to his suggestions. He writes:
> I know you are already expecting my usual "drop the FOR loops" comment
> to your pages. Here is a small one for
> http://www.dfanning.com/tips/sort_columns.html
> You write:
> FOR j=0,2 DO data[j, *] = data[j, sortIndex]
> The same is easier without the FOR loop:
> data = data[*, sortIndex]
I thought I was in real trouble when about 10 seconds
after I posted the update article yesterday I got an e-mail
from Eddie Haskell pointing out how one of my 25 line
programs could have been written in a single line!
My persistent use of FOR loops stems mainly from two
sources: (1) I am often writing these programs to explain
a concept and the code is clearer (I think) using a FOR
loop, and (2) I am not clever enough to think of these
wonderfully concise non-loop constructs on my own. :-)
In any case, I appreciate the suggestions. To my credit
I can usually figure out how and why these suggestions
work after only an hour or so of complete befuddlement.
(Although I am still working on the "baroque" piece
of code Eddie posted the other day.)
> Thanks for the wonderful summary of tips. With all those objects tips,
> I figure I should soon be able to figure out what an object is. ;-)
> (Or perhaps I'll just to wait for your next book.)
Uh, I wouldn't be waiting for the book. Today starts the
first day of an absolutely brutal teaching schedule. You
may not hear a word from me until some time next year. :-(
Cheers,
David
----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|