[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object epiphany: A new way of building widget applications

JD Smith <jdsmith@astro.cornell.edu> writes:

> Martin Schultz wrote:
> > 
> > Hi all,
> > 
> >    With almost a week delay, I finally get around to release the first
> > version of a new class of IDL objects: the MGS_GUIObject hierarchy.
> I think it only fair to let people know that I tend to shy away from
> distributed code with people's initials in the name.  I know, it sounds
> stupid, but I'm not sure I'm the only one.  It seems to be a reasonably
> common practice here (Craig, you listening?), but one which I think
> might be best to avoid, for the following reasons:
... remainder deleted ...

Hi JD--

I understand what you are saying, but I think you are a little too
harsh in criticizing other people for how they name their functions,
especially when Martin's code is as cool as it sounds.

I for one do not mind using other people's code which has their
initials on it.  As has been pointed out before, this helps keep the
name spaces separated.  We've had enough problems where RSI bonks into
user-code with their proprietary or internal functions, that using a
little something special appears legitimate to me.

As for my own code, I don't follow any strict naming rules.  Generally
speaking I tack a "CM" on when I am duplicating the function of
somebody else's code (CMPS_FORM, CMHISTOGRAM), or where there is a
*potential* for a later clash (CMAPPLY).

Sometimes it's just a namespace issue so I can keep the functions
sorted in my brain (all of the MPFIT functions are based on MINPACK,
hence the "MP" on the front).

Lastly, when I know that procedures will be typed from the command
line I try to make them short and sweet.  I picked the "DX" commands
to be short, and also because "D" and "X" were near each other on the
keyboard.  Ergonomics baby!


Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response