Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jul 2001 14:01:18 -0700
From:      PM Lashley <patl@phoenix.volant.org>
To:        Alexey Zakirov <frank@agava.com>
Cc:        freebsd-isp@FreeBSD.ORG
Subject:   Unnecessary cats/clean coding practices [Was: Re: jail ]
Message-ID:  <635860000.995403678@asimov>
In-Reply-To: <Pine.BSF.4.32.0107172359540.78881-100000@hellbell.domain>
References:   <Pine.BSF.4.32.0107172359540.78881-100000@hellbell.domain>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
--On Wednesday, July 18, 2001 00:11:39 +0400 Alexey Zakirov 
<frank@agava.com> wrote:

> On Tue, 17 Jul 2001, PM Lashley wrote:
>
>> > Sorry but this is doesn't matter for jail solution. No one aware about
>> > updating jails. I'm make it about 2 times per month but not so care. In
>> > the real life users most interested in the things like GD perl library
>> > not the system /usr/sbin/faithd one. :)
>>
>> It's a matter of cultivating good practices.  (That's why I called it a
>
> that not to be a RTFM, it just a working solution.

Right.  But the primary mode of human learning is by example.  It is 
incumbent upon those of us with experience to attempt to display best 
practices even for quick working solutions.  (I can't begin to tell you the 
number of times I've grabbed a bit of my own code as an example, and then 
cleaned it up before sending it out.)


>> use the best practices.  (Unless they are explicitly examples of bad
>
> Sorry but have ever seen msh? It is a shell with 2 or 3 tens lines
> of code and it doesn't have a pipelinig features :)

If it doesn't have pipelining features, how does the 'cat foo | xargs cmd' 
work?  Or did you mean to say that it doesn't have redirection? 
(Personally, I would consider any shell without redirection to be too 
crippled to be useful.)

>> very much whether there's an extra 'cat' or not.  BUT it is better to
>> simply cultivate the habit of avoiding such constructs so that you won't
>> use them where they do matter.  AND the code fragment was being
>> ezplicitly
>
> we've got a simply not too important reason to discuss. Jail is a very
> important feature for the FreeBSD and I like it very much. (Looking to
> scheme) It's about tens of virtual machines and they're work. We should
> appreciate PHK for his work.

Absolutely, no argument there at all.

Nor did I intend to disparage your example.  It was a useful and helpful 
response to the original query; and should be helpful to other new jail 
users who browse the archives.  I was merely trying to point out a minor 
improvement to your example.

>> listed as an example to a less experienced admin.  Examples should
>> -ALWAYS- practices...)
>
> shell scripts get us more than one way to go

Yes, and they are used as coding examples for further projects.  Which is 
another reason why it is a good idea to code them as cleanly as feasable.
In many cases there will be more than one clean way to do something.  But 
there will always be even more unclean ways to be avoided.



-Pat

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (SunOS)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjtUp58ACgkQncYNbLD8wuOIAACfT9FlAG0ZCNFMWB969lXlwOBf
ANgAnjrhJeIJjSTHSY6P6M/yTRem0TDq
=0lPT
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?635860000.995403678>