Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Survey my peers

by /dev/null (Chaplain)
on Sep 12, 2002 at 23:49 UTC ( [id://197397]=perlmeditation: print w/replies, xml ) Need Help??

Fellow Monks:

I have questions that have been plaguing me for weeks. I am a (fairly new) UNIX administrator and newbie programmer/Perlist. I decided to go with Perl as my first language as opposed to Unix shell scripting due to multiple recommendations.

My questions are as follows:

1. Can Perl perform every programming task I will ever need to perform? i.e. Sys Admin, CGI, etc..

2. What additional programming/scripting languages should I learn in conjuntion with Perl to better enhance my "all-around" programming possibilities? In other words, what additional languages work well with Perl?


I know these questions do not seem to be researched, but I have asked many SI graduate students and fellow administrators and I would rather hear responses from the Perl community as it is a language I show great regard for. I highly respect the opinions from Fellow Monks and appreciate any responses I may receive.

/dev/null

Replies are listed 'Best First'.
Re: Survey my peers
by thraxil (Prior) on Sep 13, 2002 at 01:50 UTC
    1. Can Perl perform every programming task I will ever need to perform? i.e. Sys Admin, CGI, etc..

    if your needs are fairly typical, perl will get you pretty far. you'd have a tough time writing a device driver or similar super low level stuff in perl. but to be fair, you could say the same thing about nearly any turing-complete language. many of us here just think that perl has hit a sweet spot in the power/ease trade-off. as far as sysadmin type stuff, perl is almost ideal. its standard library maps almost directly to the UNIX libraries and applications, it's fantastic at text-processing and UNIX is text-heavy, and if there's something you can't do in perl, you can just use backticks or a system() call to execute the shell code, or use Inline::C to do lower level stuff.

    2. What additional programming/scripting languages should I learn in conjuntion with Perl to better enhance my "all-around" programming possibilities? In other words, what additional languages work well with Perl?

    thinking strictly as a UNIX sysadmin, it wouldn't hurt to learn some C. not necessarily to actually code in it, but to have a better understanding of the guts of UNIX. knowing how libraries are linked, what goes on inside Makefiles, etc can frequently be a lifesaver. i can't even begin to count the number of times i've tried to install some program only to find it not compiling and had to go dig through the Makefile and the C source to track the problem down. often it's just looking in the wrong place for a library or something easily fixed, but i'd be screwed if i wasn't comfortable getting into the innards.

    don't shy away from the shell scripting either. bash is super easy and if you spend most of your time at a bash prompt, knowing it inside and out will improve your productivity even when you're not actually "coding".

    probably the other important one to be familar with is emacs lisp if you swing that way. otherwise, learn vi real well. either way, know your editor and learn how to make it work for you.

    anders pearson

Re: Survey my peers
by mjeaton (Hermit) on Sep 13, 2002 at 00:10 UTC
    2. What additional programming/scripting languages should I learn in conjuntion with Perl to better enhance my "all-around" programming possibilities? In other words, what additional languages work well with Perl?

    As a builder would never attempt to build a house with just a hammer, neither should the programmer attempt to use but one tool in his profession.

    In other words, the more tools you have in your toolbox, the better off you'll be. I personally enjoy writing Perl code. It makes me smile, it makes me glad to be in the profession that I'm in. On the other hand, I make my living using tools such as Visual Basic, Java, Delphi...C# has really grabbed my interest lately as well.

    In the end, it will depend most importantly on your interest in learning other tools and technologies.

    You should also remember that it's not just programming languages that make a good "all around" programmer. It's the soft skills, it's being able to take a problem and break it down into its essential pieces, it's about being able to translate geek speak into something an end-user can comprehend. :-)

    Good luck in your pursuits!

    mike
Re: Survey my peers
by dreadpiratepeter (Priest) on Sep 13, 2002 at 00:38 UTC
    I would learn SQL and how to install/configure/maintain databases. (Oracle would be a good one to know). A sys admin who can wear a dba hat is worth double her weight in gold.

    -pete
    "Pain heals. Chicks dig scars. Glory lasts forever."
      ++dreadpiratepeter. Plus learn the appropriate sql extensions (PL/SQL, Transact SQL) for writing stored procs for a particular db.

      -derby

Re: Survey my peers
by greenFox (Vicar) on Sep 13, 2002 at 03:47 UTC

    You are not going to get by as a Unix Administrator without learning shell scripting, you will find shell scripts through-out the system, some quick examples- crontab uses shell syntax, the systems /etc/init.d and /etc/rc?.d (or equivalent) scripts are written in shell. You will get install programs and wrapper programs written in shell and unless the systems are brand new and you are the only adminsitrator there will be shell scripts other people have written which you will have to maintain. Shell syntax is mandatory for the command prompt which is where you are going to be living most of the time if you stay in this work.

    The good news is that you don't have to stop learning Perl whilst you develop your shell expertise and a great deal of what you learn in shell will be directly or almost directly translatable into Perl, Perl after all began life as an "assembly" of Unix shell tools. Learning Unix shell scripting can only help your Perl and learning Perl won't hurt your shell scripting - though it will spoil you a little :)

    --
    Until you've lost your reputation, you never realize what a burden it was or what freedom really is. -Margaret Mitchell

Re: Survey my peers
by blokhead (Monsignor) on Sep 13, 2002 at 06:06 UTC
    2. What additional programming/scripting languages should I learn in conjuntion with Perl to better enhance my "all-around" programming possibilities? In other words, what additional languages work well with Perl?

    If you're only interested in the sysadmin side of things, then bash is the hands-down most helpful other choice. It's not too challenging to learn at all. Also become familiar (if you're not already) with command-line filter utils like awk, sed, grep, sort, cut, etc... You will find awk and sed to be pretty straight-forward coming from a Perl background. And although they aren't really scripting languages, make yourself familiar with the programs in the GNU textutils, fileutils, etc., they will be your friends forever once you start getting into bash scripting. Search this page for all package names ending in *utils and you'll find a huge arsenal of tools that will prove to be priceless.

    If you are interested in a broader view of programming (ie, not just the sysadmin side of life), try out as many languages as you can grab. C/C++ are going to stay useful for a long time, especially in a *NIX environment. Java, SQL, as others mentioned.. Examine how different languages handle different constructs, and find your favorite modes of expression. I would highly recommend learning a functional programming language like Lisp or Scheme if you don't know these already. They are so different from the imperative languages we all know -- it will blow your mind at first, but (ideally) open your mind up to new paradigms. Exploration is the key to broadening your skills, so look around and find what you like in every language you try.

    1. Can Perl perform every programming task I will ever need to perform? i.e. Sys Admin, CGI, etc..

    Theoretically, if it's computable, Perl can do it. Then again, so could any language. A better question might be: Is Perl the best choice to perform every programming task I will ever need to perform? In short, no. Perl makes a lot of things easy, there is no doubt. But other languages make some things easier. On a related note, when is someone going to make Perl bindings to the Linux kernel so that we can write device drivers in Perl? Hopefully never ;)

    Cheers,
    blokhead

Re: Survey my peers
by TStanley (Canon) on Sep 13, 2002 at 11:31 UTC
    Since I do work as a Unix admin, I can tell you that I use both Unix shell scripting and Perl on a regular basis. Perl is a wonderful tool, but it can't do everything (or at least I can't make it do everything). As mentioned above, it is good to have more than one tool in your toolbox. Check out this node for some more ideas/suggestions, and good luck.

    TStanley
    --------
    It is God's job to forgive Osama Bin Laden. It is our job to arrange the meeting -- General Norman Schwartzkopf
      Perl is a wonderful tool, but it can't do everything

      Well, actually it can do everything a programming language can do. As others have said, it is not the best choice for certain things, notably low level stuff like device drivers, but it can certainly de everything shell scripting can and much much more.

      Nowadays I no longer write shell scripts, preferring Perl's better precision, control and error checking, but without some knowledge of the shell tools, it is probably hard to write the Perl version.

      I would second suggestions to learn the basics of C and SQL as the most generally useful. Shell scripting in bash or similar a close third. I have gotten away with not knowning sed and awk at all, but I wouldn't like to completely be without find and grep from the comandline, although I don't use them in scripts anymore.

      Regards,
      Helgi Briem

Re: Survey my peers
by theorbtwo (Prior) on Sep 13, 2002 at 20:30 UTC

    As far as other languages go: C, bash, SQL, Makefile, and autoconf/automake. That isn't as much as it sounds like -- learning bash will come pretty naturaly. Makefile/autoconf/automake you only really need to know enough of to debug problems, and hopefuly fix them. (BTW, a hint: reading the files generated by auto(conf|make) is diffucut, and normaly not useful.) C you should be able to at least read with fair fluency. Personaly, I learned most of my C from reading, and occasionaly hacking on, the Linux kernel.

    Oh, and it really is always possible to do everything in perl. I've even kind of written device drivers in it, with some Inline::C, and without integrating with the kernel. (IE, not device-drivers-proper, but debugging register dumpers and such.)


    Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Re: Survey my peers
by John M. Dlugosz (Monsignor) on Sep 13, 2002 at 21:36 UTC
    I find C++ and Perl complement each other. Even if Perl is your dominant language, use C++ for device drivers, OS access, and speed.
Re: Survey my peers
by /dev/null (Chaplain) on Sep 16, 2002 at 17:42 UTC
    I Thank everyone who replied to my question. I will take each into consideration.

    Thanks again,
    /dev/null
Re: Survey my peers
by hding (Chaplain) on Sep 16, 2002 at 17:36 UTC

    As you've no doubt noticed by now, there are all kinds of reasonable answers to your questions, and Perl fits together well with many other options to give you a better toolbox. :-)

    I use Perl in conjunction with Common Lisp. I use Perl largely to be able to use CPAN and solve quite a few problems in trivial fashion; I use Common Lisp to do most of the rest of what I need.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://197397]
Approved by chromatic
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (1)
As of 2024-04-25 01:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found