Hi Trevor and others

The reason I'm teaching this stuff is that I am encouraging our postgrads
to have a "script collection". Currently I find that most people collect
their code together with their data, without the code being under version
control.

However, your example suggests a compromise position that might be much
easier to teach:

Instead of teaching how to make scripts that run like commands, teach
environment variables. Then you can do:

bash $SCRIPT_DIR/myscript.sh

where $SCRIPT_DIR is under version control and not worry about `chmod`,
PATH etc.

Peter
P.S. just after telling students about PATH etc one of our more experienced
students managed to make their laptop unusable by setting PATH incorrectly
in their .bash_profile, so I am well aware of its dangers.

On 10 March 2016 at 08:53, W. Trevor King <[email protected]> wrote:

> On Wed, Mar 09, 2016 at 10:14:25PM -0800, Steven Haddock wrote:
> > I think the three concepts are not particularly difficult but their
> > implementation is extremely cryptic…
>
> I'm pretty convinced that the level of complexity is not worth it, when:
>
>   $ $INTERPRETER $SCRIPT_PATH
>
> for example:
>
>   $ python my/script.py
>
> is so easy to use.  For lots of detail on just how ugly the whole
> thing is, see [1] (shell lesson link to [1] landed via [2]).  Having
> executable commands is nice for easier autocompletion and such, but
> I'd much rather drop a link to [3] for interested parties than cover
> it live with a group of novice programmers.
>
> It's much easier to teach things like this after folks are comfortable
> with their operating system being a hairy mess of historical cruft ;).
>
> Cheers,
> Trevor
>
> [1]: http://www.in-ulm.de/~mascheck/various/shebang/
> [2]: https://github.com/swcarpentry/shell-novice/pull/307
>      Subject:  instructors.md: We really, really don't want to talk about
> #! #307
> [3]: https://en.wikipedia.org/wiki/Shebang_%28Unix%29
>
> --
> This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
> For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
>
_______________________________________________
Discuss mailing list
[email protected]
http://lists.software-carpentry.org/mailman/listinfo/discuss_lists.software-carpentry.org

Reply via email to