lin-club  

[Haifux] Re: using unix page: early draft

mulix
Mon, 17 Sep 2001 01:09:33 -0700

On Mon, 17 Sep 2001, Nadav Har'El wrote:

> On Mon, Sep 17, 2001, mulix wrote about "Re: using unix page: early draft":
> > On Mon, 17 Sep 2001, Shlomi Fish wrote:
> > if csh is to c as english is to french, bash to c is as english to
> > arabic. nothing alike, syntax-wise. csh at least LOOKS familiar, which
> > sure seems like a lot to a frightened freshman.
>
> This is completely silly. When I was a freshmen, I studied infi and algebra
> (for example) in the same semester. Two completely different things. Who
> says you can't learn two different things?? If C and shell were the same
> thing, there would have been no reason to learn them both anyway!

you completely missed my point. i said that it LOOKS familiar, which
*seems* like a lot to a frighteneed freshman. purely psychological, but
i guess psychology counts.

just to make sure i'm understood, i wouldnt mind if they were teaching
perl instead of csh, or bash, or $SHELL_OF_THE_WEEK. as long as its
useful and teaches the student how to write a shell script - which csh
does just fine.

> Do you know what? I learnt sh (bourne shell) and C when I was 10, reading a
> book in English when I barely knew English, and knew nothing about computers.
> If I managed to do it, so can the students in the Technion at the age of 20.
> Give them a little credit - they are not total idiots :)

sorry, but i give most computer science students exactly that - a little
credit. a small credit. let's just say i've been appalled by some of the
code i've heard or seen discussed, *in the first two semesters*. after
that, most students become much better programmers.

(i'd like to note that i'm not a bigot - i'm appaled in quite the same
way sometimes by code i wrote a few years ago :))

> As someone already mentioned, learning two different syntaxes is actually
> a good preperation for a world filled with dozens of languages with different
> syntaxes.

the technion seems to think that not at that stage, and i think i
agree. note that by the end of the *third* semester, a student could have
studied, if choosing the correct classes:

c, advanced c, csh, c++, asm, pascal, ml and prolog.

by the end of the fourth semester, you can add at least java and eifel
to the list, and maybe even lisp.

so the technion is definitely not shy on programming languages, but not
by the end of the second semester.

another issue i'd like you to consider is inertia. switching to teaching
a different shell would require *teaching the ta's* that shell first,
most likely, and revising the course material. i dont see any
overwhelming reason for the technion to do so - do you?

> > i think the technion should not be teaching c as a first language, but
> > rather c++ or even java.
>
> This is a seperate debate, and I personally don't agree: I think C++ is a
> much more complex language than C, and it's much harder to write *good*
> programs with it (i.e., a program which an expert can look at it and say:
> yeah, that's a good way to code what you wanted to do!). I've seen too many
> examples of people writing bad code in C++, which is even harder to fix or
> understand than bad code in C.

read stroustroup's 'why i think c++ should be taught as a first
language', which was published in cuj a few years ago.  i haven't been able to
find an online link now, though.

when i discussed this matter (c vs. c++ as a first language) with the
instructor, while taking 'matam', he completely agreed that c++ should
be taught first, and said that they are teaching c first, 'because
that's the way the technion wants it, the way it has always been done' (paraphrased).

> > there's always a better tool. so what's your point?
>
> "betterness" of tools is not a linear ordering. You can't say
>       csh < bash < perl < C++ < lisp
>
> Because usually when you take a pair of tools (e.g., bash and perl) each one
> is better in different things. Perl is not a convenient replacement to sh
> when it comes to writing short scripts with mostly pipelines of existing
> utilities, while bash is not a convenient replacement to perl when it comes
> to complicated text and number handling.
>
> However, in this case clearly csh < bash, in every case (can you show an
> example where csh is better than bash?), which is why you can teach csh
> as some archaic language (like Latin is taught), but it should not be taught
> as the tool of choice.
> Tools which are always inferior to others should go the way of the dodo. This
> is why no-one uses 'ed' anymore for interactive editing, and nobody lights
> their house with candles, to use just two silly examples. csh is just as silly,
> in my opinion.

csh is *good enough* for the technion, and that's my point. it's good
enough for 'matam', and it's even good enough for my 5 line shell
scripts (anything longer i do in perl or python). bash might be better
in every aspect, but i guess it's  just not better enough to replace csh
in the curriculum. can you offer a persuading enough reason for bash to
replace csh? ("it's just better" will not do, obviously).

welcome to the real world, where people still write code in visual
basic.

also, i have a weird sort of deja vu now - i dont think this is the
first time where you present the idealistic view point, and i present
the pragmatic one, although i agree with you. hey, maybe i just like to
argue :)

[ in any event, we're going pretty off topic for haifux. i suggest
follow ups in private, or perhaphs on hackers-il ]
-- 
devil's advocate

http://www.advogato.com/person/mulix
http://www.sf.net/projects/syscalltrack



--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://linuxclub.il.eu.org)
To unsub send an empty message to [EMAIL PROTECTED]