On Fri, Aug 03, 2012 at 10:41:09PM -0700, Philip Guenther wrote:
> On Fri, Aug 3, 2012 at 9:35 PM, David Diggles <[email protected]> wrote:
> ...
> > here's an example of how not to script rsync, when just starting
> > to learn how to script
> >
> > it got over complicated over time.  i should rewrite it sometime :)
> ...
> 
> I guess I don't understand the point of sending that out.  It's like a
> generic ghost story: "...and the code walks the corridors of the
> office building to this day!  There it is!  Ahhhhhhhhh!"
>
> If the goal is to help the inexperienced shell script writer avoid
> that fate, you must provide instruction and suggestions, not just set
> up your prior works up as warning.  The beginner will be dazzled by
> the mess-o'-punctuation, but that doesn't help them see what they
> should do instead when they, in turn, find their own scripts crawling
> into the morass.
> 
> 
> Philip Guenther

There were already excellent examples of what to do provided by others.

What is wrong with an example of how bad spaghetti scripting looks like?
I think there can be value in seeing an exagerrated example of what not to do.

Furthermore, I provided my own script, not someone elses, because I am
happy to own my own mistakes.  Another good thing to teach.

IMO, a teaching method that only ever teaches what to do, and never what not to
do, and only ever provides instructions and guidance, risks creating the kind of
box that breeds idiots with no ability to think for themselves.

Reply via email to