HELP! Must choose language!

Laura Creighton lac at strakt.com
Mon Dec 30 05:21:11 EST 2002


C and C++ and BASIC are far from ideal languages to learn programming
despite the fact that many people did learn C or BASIC as their first
programming language.  Whatever language you learn first will give you
some habits which will last a lifetime, and will form the basic of
your own mental conception of 'what programming is like'.  This is a
good thing, and makes learning the next computer language a lot
easier, but it means that you get bad habits in with the good.  You
have to unlearn them later.  Now, you can write sloppy programs that
reflect sloppy thinking, and unbarably cute programs that are full of
dirty tricks in any language once you learn the language well enough,
but C and Basic are set up so that the dirty way to do things is often
the only way to do things, the easiest way to do things, the most
common way to do things, or the first way you will think of.  Thus you
learn an incredible amount of bad habits if you begin learning to
program in C or BASIC.  (If you get this far.  C and C++ are also
both harder, and less fun to learn.  So many people start and give up).

Eventually, you learn enough, and see enough good code, to understand
why it is that your code is poor, and then, if you actually want to
become better you take major steps to change your thinking, your way
of coding, and sometimes your way of life.  This is hard.  First of
all, changing any habit is hard, but writing code is all about the
power to think things, and the power to do things, which means that
writing code ties directly into your ego.  This means that actually
deciding that you write poor code feels very much like deciding that
you are a bad person, even though this is not the case.  Thus many
people never change the bad habits they acquired when they were first
learning to program.  They remain poor programmers forever.  And many
of them console themselves at night with the thoughts that 'most
people write code like this' and 'it is good enough to get the job
done' and even 'I am making a significant amount of money doing this,
so it can't be that bad'.  And they are correct in this. Compared to
the people who cannot program at all, they aren't 'that bad'.  The
problem is that they _are_ 'that bad' compared to what they _could_ be.

Now, the people who write computer languages, which are, after all,
just another computer program, have thought long and hard about this,
and many of them have tried to come up with a language which is easy
to learn, and which does not teach you many bad habits, and which, not
coincidentally is good for teaching computer science in.  Scheme is
one result.  Haskell is another.  Pascal was an earlier attempt, but
we have invented something called Object Oriented Programming since
that time, so I wouldn't recommend it now.  The others are great
first programming languages.

But there is a problem.  None of these languages are heavily used in
industry for anything, because while they are great to learn computer
science with, they aren't so great to do anything else with.  Python
is different, in that it was designed to be a good programming
language to learn as well as one that you can do useful work with.
Smalltalk was designed with similar goals.  As a result, people are
getting useful work done in both languages.

-----

Which you decide to learn depends more on you.  If your primary reason
to learn a programming language is 'to impress the university of my
heart's desire', then you need to research what that university desires.
Hint -- MIT is the home of scheme.  Lots of universities turn up their
noses at languages you can do useful work in, Haskell is a really good
choice for impressing such places.

If, on the other hand, you want to learn a language in order to leave
school as soon as possible and start earning a living, because you already
have had about as much school as you can stand for a while, then I
would recommend java.  Of the commercially successful languages, it
will ruin you the least, in my opinion.  Still stay away from C or C++
until you have learned some other language first.

But given that you are in such a hurry and believe that you are running
out of time, I will hazard a guess and propose that you are more of
an artist or an engineer than a mathematician or a scientist, and that
a burning desire to go out and build, create something is what is
motivating you.   You woke up one morning, and thought, 'Holy Smokes,
I have all this code to write to build this <cool idea I just had>,
and I don't even know how to program yet!'

If so, then, 100% I recommend that you learn Python no matter what
your teachers or anybody else says.  Because what they aren't telling
you, perhaps because they do not know themselves, is that how quickly
you can develop an application from 'i had a cool idea' to 'come see
it; it works a bit now' to 'everybody come see; it works great'
depends on what language you use.  And Python is the absolute best at
developing things that take more than a hour to do, of all the
languages I have ever seen, period.  It is much, much, much faster
than C or C++ to develop in.  This is why experienced, expert C++
programmers learn Python -- they want to get more accomplished in the
same amount of time.

Could you do me a favour and tell me why it is that your teachers
recommended against you learning Python?  If it is simply that they
have never heard of it, that is one thing.  One of my goals in life
is to make Python widely accepted as a first programming language
among people like your teachers.  Clearly, I have more work to do,
but I don't know where I should start until I understand why they
discouraged you in the first place.  Did they have any specific reasons
why they thought Python was a bad choice?

Good luck to you, whatever you decide.  If you decide on Python, check 
out http://www.python.org/doc/Newbies.html and
http://www.python.org/psa/MailingLists.html#tutor

Have fun, and, if you decide to go with C or C++ anyway, get bogged down,
and start thinking -- 'maybe programming isn't for me', do remember that
it is quite possible that what your are experiencing is 'maybe C or
C++ wasn't a good first programming language for me' and don't give up
on programming until you have tried another one.  

best of luck,
Laura Creighton






More information about the Python-list mailing list