Absolute noob to Linux programming needs language choice help

Carl Banks invalidemail at aerojockey.com
Sun Jun 25 04:44:23 CEST 2006


stylecomputers at gmail.com wrote:
> Hey guys,
>
> I am absolutely new to Linux programming, with no w######s programming
> experience except a small amount of C++ console apps.
> Reasonably new to Linux, BSD etc, got good sound networking base of
> knowledge and dont have any problem working the command line etc.
>
> I want to learn a language that I can use in my networking duties that
> is most likely to be of use to me. I have a few choices I can think of
> being:
>
> Python
> Perl
> C
>
> Any other Langs out there that would be better suited?
>
> I want to be able to use the app's I write in OpenBSD and RH versions
> of Linux
>
> What would you reccomend (Unbiased opinion please, I'm after the
> functionality I'll love it later :) )

I'm known as a Perl hator, but I'll try to be as unbiased as I can.
I'm limiting myself to the three you mentioned.

C is a very simple (meaning "straightforward", not "easy to learn")
language.  Almost everything in C is reduced to basic building blocks
that are quite close to how the CPU itself runs.  For example, there's
no such thing as a "list" or even a "string" in C; instead, what you
have are pointers, arrays, and a small number of built-in types (and a
small standard library that provides more complex things like strings).
 This makes C an excellent language for programming hardware and
low-level stuff like that.  However, it's really not optimal for
application programming--it forces you to worry about stuff like
freeing memory and buffer overflows.

I was frustrated with C because I mostly do application stuff, so one
day I sat down to learn Perl.  I was amazed at the leap in
productivity--I was able to write an email autoresponder the very same
day I began the tutorial (granted, I was an expert programmer at the
time, but still).  Perl freed me from having to worry about stuff like
memory management, and it provided useful things like growable arrays
and dictionaries.  However, unlike C, Perl is not simple.  Perl is
complicated, ad hoc, and inconsistent.  It never really fit inside my
head--I was always afraid there was something going on, some obscure
rule or behavior was lurking.  In addition (and here the Perl hator in
me comes out), it's poorly designed as a language: it often makes you
do extra work to do things the better way (for example, local variables
have to be declared, but not globals).

So we have C, which is simple and straightforward but too low-level to
be efficicient at application programming.  We have Perl, which is
high-level enough for application programming, but is complicated and
inconsistent.

Then we have Python, which is both simple and high-level.

So, yeah, I like Python best of those three.  For someone new to
programming, I definitely recommend learning Python first, unless you
intend to be a expert or professional programmer or to do low-level
stuff, in which case I'd say start with C.  Definitely don't start
learning with Perl.  It might be the best choice for some people (in
some universes), but it encourages bad programming habits, so I don't
recommend it for newbies.  Learning to program in Perl is like learning
to do stand-up comedy by laughing at your own jokes.

For someone looking for looking to learn preferrably only one language,
I'd say Python, without knowing more about your intended problem
domain.


Carl Banks




More information about the Python-list mailing list