[Haifux] My "Stop Using (and Teaching) C-Shell and Tcsh" Page
Orr Dunkelman
orr.dunkelman at gmail.com
Thu Oct 18 16:53:22 MSD 2007
On 10/18/07, Shlomi Fish <shlomif at iglu.org.il> wrote:
>
> Indeed. I always find it a curious fact when Matam/Mamat students were
> instructed to solve exercises without using sed or awk, or in one line of
> C-shell. This may indicate that they want to design clever exercises, but
> not
> to really teach the beauty of shell scripting.
Exactly. The point is not to teach the beauty of shell scripting.
I suggest you'll approach the lecturers in charge to get a better
understanding why they teach this shell rather than that shell (like Eyal
did).
As for the "beauty" thing - beauty is in the eye of the beholder.
> Well, from what I understood, up to a point TX still carried a Perl that
> was
> 9-years-old or so (Nadav can fill the details). But even if it didn't
> carry
> bash, then bash was easily installable there.
Yes and no.
Unlike what many people think, installing software on a server with multiple
users is not as simple as running yum/rpm/whatever your distro is using.
It is an obligation by the staff to support, update (to some extent), insure
backward competability (in the case of updates), etc. The claim that "It's
easy to install" is wrong for systems which you do not own, nor understand
all the technical (or political) aspects related to.
> > Seeing as C and shell-scripting are used for inherently different
> purposes,
> > I do not see why this is an advantage; furthermore, I think that in the
> > exercises which are being taught, far too much stress is being put on
> loops
> > and "if" statemenets; Too little on effective usage of "&&" and "||"
> > operators. Also, extremely useful unix commands such as sed and find are
> > not taught, and I have actually seen an exercise given in the course
> where
> > the students implement a crippled version of "find". More relevant uses
> for
> > shell scripts are never brought as an example - students are not shown,
> for
> > example, how to use them in conjunction with "make" in order to create a
> > test suite for their programs. If you want to teach scripting - use a
> > scripting language (preferably something more organized than perl, like
> > Python). If you want to teach SHELL scripting, the exercises must be
> > relevant to that style of programming.
>
> Right.
Please note that the idea is not to teach UNIX, but to teach on the
existance of a tool called shell scripting.
For us it is very easy to say "yeah, this can be solved by find". But these
students need to learn how to implement find in a crippled scripting
language, because when they'll leave the academy and go to the dark side,
a.k.a., industry, they will have to work on machines which are not even
POSIX complaint!
People, please remember we are talking on a degree in computer science (or
EE), i.e., you do not learn JAVA, you learn OOP methodology (for example, by
using JAVA). These two things are completely different.
> > * One-liners are not possible - blocks have to start on separate lines.
> > This makes tcsh very uncomfortable to use in interactive mode.
>
> I know and I've explicitly mentioned it in my original article:
>
> <<<<<<
> Entire Bash mini-programs can be written, tested and debugged in one line.
> This is impossible to do in csh which forces loops to be on separate
> lines.
> >>>>>>
oh, these kids who never worked on COBOL... ;)
--
Orr Dunkelman,
Orr.Dunkelman at gmail.com
"Any human thing supposed to be complete, must for that reason infallibly
be faulty" -- Herman Melville, Moby Dick.
GPG fingerprint: C2D5 C6D6 9A24 9A95 C5B3 2023 6CAB 4A7C B73F D0AA
(This key will never sign Emails, only other PGP keys. The key corresponds
to orrd at vipe.technion.ac.il)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://haifux.org/pipermail/haifux/attachments/20071018/57137007/attachment.html
More information about the Haifux
mailing list