Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] latest sorcery hangs on queue

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: "drs. Eric D. Schabell" <erics AT cs.kun.nl>
  • To: eric AT sandall.us
  • Cc: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] latest sorcery hangs on queue
  • Date: Wed, 4 Dec 2002 08:02:50 +0000

I would have to agree with Sandall, I would prefer that all guru's did this,
and
not for example use the synax like I found in my init.d scripts:

echo "$1ing dhcpcd ...............

This is carrying things a bit too far and is more obscure. Not to start a war
on
coding practices but the more clear it is the easier it is to attract more
help
(carity was the main reason I got into this type of distro, bash package
management makes alot of almost-developers take the step into trying actual
development).

Mvg/Regards,

/*
* drs. Eric Schabell
* Scientific Programmer - (PRONIR)
* CentER Applied Research - Tilburg, The Netherlands
*
* e-mail : erics AT cs.kun.nl
* Mobile : +31 (0)6 543 613 15
* Homepage : http://infolab.uvt.nl/people/erics
* SourceMage : http://www.sourcemage.org
*/



Quoting Eric Sandall <eric AT sandall.us>:

>
> Sergey A Lipnevich said:
> > Eric, why are you putting everything in braces ${blah} anyway :-)?
>
> Well, it's not really necessary and it bloats (a little) the grimoire, but
> I am mostly doing it so that when new SMGL users are looking through the
> code base, they see that parameters are done this way, and so we won't
> have problems with weird variables. It's mostly to "teach" the new users
> (well, the ones who go through the grimoire for examples, anyways ;)) a
> "proper" way to code, getting them in a "good" habit.
>
> Example:
>
> VERSION=$SPELL_$VERSION_stable
>
> This would cause problems, unless the braces are used to explicitly define
> the variable name (I know you know this, this is for those who're reading
> whom do not :)). So, now the user would be asking why their spell isn't
> working, unless they had learned to do it with the braces, then it would
> look like this:
>
> VERSION=${SPELL}_${VERSION}_stable
>
> Which would then assign the correct version information to VERSION.
>
> So, that is the long reason on why I try to use the braces. :)
>
> -One of Four
> a.k.a. sandalle
>
> --
> PGP Key 0x5C8D199A5A317214
> http://search.keyserver.net:11371/pks/lookup?op=get&search=0x5A317214
>
> Eric Sandall | Source Mage GNU/Linux Developer
> eric AT sandall.us | http://www.sourcemage.org
> http://www.sandall.us/~sandalle | SysAdmin @ Inst. Shock Physics @ WSU
> http://counter.li.org #196285 | http://www.shock.wsu.edu/
>
>
> _______________________________________________
> SM-Discuss mailing list
> SM-Discuss AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/sm-discuss
>




Archive powered by MHonArc 2.6.24.

Top of Page