Absolute noob to Linux programming needs language choice help

Discussion in 'Python' started by stylecomputers, Jun 21, 2006.

  1. 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


    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 :) )


    stylecomputers, Jun 21, 2006
    1. Advertisements

  2. stylecomputers

    James Stroud Guest

    Yes python will be good for this. I'm not so sure C is better suited.
    Definitely resist "shell scripting". Several chapters in Mark Lutz's
    _Programming Python_ will help with networking (after you have read
    through _Learning Python_ or equivalent). NewRiders publishes _Python
    Web Programming_ authored by Steve Holden, who visits this list on occasion.


    James Stroud
    UCLA-DOE Institute for Genomics and Proteomics
    Box 951570
    Los Angeles, CA 90095

    James Stroud, Jun 21, 2006
    1. Advertisements

  3. Thanks James,

    Good to know resist shell scripting.

    Python web programming now theres something I had no Idea you could do
    with Python. how interesting :).

    Just been to your website, the letters after your name wouldnt fit very
    easily on one line would they :)


    stylecomputers, Jun 21, 2006
  4. stylecomputers

    Mirco Wahab Guest

    Thus spoke (on 2006-06-21 03:51):
    C is not really a choice in the perimeter
    of Perl and Python.

    Perl was created to do "networking duties" in
    the Unix environment and had a phenomenal impact,
    was (then) also a long time the number #1 scripting
    language for web apps ('CGI' was almost synonymously
    used w/Perl).

    Then came Python, which was (iirc) also intended for
    solving problems around "networking duties" by the GvR,
    who didn't like the appearance of Perl-Programs (couldn't
    stand sigils and braces, I guess;-).

    So it's today just a matter of
    1) personal taste, what do think is fancier for you,
    2) choice of the community you want to be in.

    BTW. I don't really think its a "choice"
    at all, I'd use each language where it
    applies best.
    Never ever ;-)


    Mirco Wahab, Jun 22, 2006
  5. C is extremely low-level -- you'll want to know it well if you ever need
    to program something inside the kernel (or study kernel sources to
    understand some detail or anomaly), but for general programming it's a
    lot of unwarranted effort.

    Python, Perl, and a third language you have not mentioned, Ruby, are
    very high level, and each is suitable for just about the same range of
    programming (almost any programming, except very low-level;-). The
    choice between the three cannot really be based on language level or
    power because those aspects essentially coincide; rather, you should
    choose based on your tastes, and practical considerations such as the
    availability of libraries and other tools (which tends to be excellent
    for all three languages, so it's unlikely to guide your choice all that
    much). If you want to make sure you have no regrets later, a minimal
    amount of study of all three is warranted before you pick one to get
    deeper into, IMHO.

    Me, I knew the Perl of the time very well when I met Python, and I've
    studied Ruby later -- Python definitely meets _my_ needs optimally; but
    other people, with very different tastes, could well choose differently!

    Alex Martelli, Jun 23, 2006
  6. stylecomputers

    Ben C Guest

    My favourite's Python, but Tcl is definitely worth a look. It's been
    around a bit longer than Python (so more time for every conceivable
    problem to have been met by someone and fixed), and I'm not an expert
    but I think it's particularly good for things like sockets-- they're
    just sort of built in and are very easy to work with.
    Ben C, Jun 24, 2006
  7. .
    [more true and
    pertinent obser-
    Tcl is also in this category. Even with Alex expanding the discussion
    to encompass Ruby, I wouldn't mention Tcl--except that the original
    questioner explicitly mentioned "networking duties". While his intent
    is ambiguous, it deserves to be said that, just as Alex has written,
    all four of these languages are rough equivalents, differing as much
    in subjective feel as objective functionality, but that
    1. Tcl, with its emphasis on event programming,
    codes multi-processing TCP servers more com-
    pactly than the other three;
    2. Tcl is the extension language for Cisco's
    IOS and several other networking products;
    3. Tcl-based Scotty is the single most mature
    SNMP suite any of the four languages have
    4. There's the whole BEEP story; and
    5. Tcl-based Expect has a special role in
    system administration and network manage-

    There's plenty to read on all these subjects, if you have an interest.
    <URL: http://www-128.ibm.com/developerworks/linux/library/l-sc1/ > might
    be a place to start.
    Cameron Laird, Jun 25, 2006
  8. .
    Tcl's maturity advantage is tiny--*maybe* two years. Both began at
    the end of the '80s. There've been close to two decades since to
    obscure any initial leads.

    I entirely agree with you, though, that Tcl's [socket] command is
    a wonderful thing.
    Cameron Laird, Jun 25, 2006
  9. stylecomputers

    Carl Banks Guest

    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

    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

    Carl Banks
    Carl Banks, Jun 25, 2006
  10. stylecomputers

    Tim Roberts Guest

    The difference is more significant than that. Tcl started in 1987, but
    Python's history doesn't begin until the early 1990s, unless you're
    counting ABC as well.
    Tim Roberts, Jun 26, 2006
  11. .
    We agree it was ambiguous. It was only in 1988 that John Ousterhout
    started *using* Tcl, and '89 when he first gave source to early adopters
    <URL: http://wiki.tcl.tk/1721 >.

    Both Tcl and Python have covered a LOT of territory since then.
    Cameron Laird, Jun 26, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.