http://qs321.pair.com?node_id=86696

Let me preface this post by directing your attention to the title: "What does it take to LEARN Perl". In my mind this is different than "What does it take to become a good Perl programmer". So with that out of the way...

I'm a new programmer and Perl is my first attempt at learning a language. I've been studying Perl for the past 4 months and I'd like to share what I think it takes to learn Perl (or any programming language for that matter). This post is geared mostly toward new programmers who may be wondering if programming is for them but I'd also like to hear the thoughts of more seasoned programmers on this topic.

I think there are a few crucial requirements needed to learn programming. Here they are, in no particular order:

High Literacy Skills
Being able to read at a 12th grade level or above is extremely important for two reasons. First, it gives you a strong foundation for learning the technical vocabulary (jargon) behind all programming languages. Knowing this jargon allows you to more efficiently think about the structure of the code. And once you learn the vocabulary, you will get a lot more from the documentation and books about Perl. Second, excellent literacy skills means that your mind is good at giving meaning to symbols and maniuplating them. This is all programming is, after all.

Persistence
Unless you are extremely gifted, you will not understand everything right off the bat and you shouldn't expect to. What's required is that you persist and not let yourself get frustrated. There are some concepts/syntax in Perl that you may not even understand after 4 or 5 attempts. You need to be willing to look at piece of documentation or code over and over. I've read particulary difficult sections in books/documentation for hours. I also often learn by going to many different sources, each with their own unique perspective on a topic, before finally putting the whole thing together. You may feel like you are making no progress; but programming is a lot like climbing a mountain which is done inch by inch, toehold by toehold. Keep lookin' up! Eventually you will get there.

Know the basics of how computers work and have a comfort level with them
This probably goes without saying. Know what a microprocessor is, what memory is, how data gets stored, bytes, bits, hex, ascii code etc. This is stuff you could learn in any good basic computing course.

Natural curiousity about programming
If you don't look at the applications on your computer or a web site like PerlMonks and ask yourself "Damn! How did they do that?" you are probably not going to learn programming. This is what provides the motivation to actually sit down and spend oodles of...

...Time
learning how to program. If you are working 50 hours a week and running a household, it's going to be very difficult for you to learn programming. I quit my job to take a year and half off to learn programming and I'm still a little worried this may not be enough time to get all the skills I want to get under my belt.

So I would say the above is the 5 crucial ingredients needed to learn Perl. If you have each of them to at least some good degree, there is absolutely nothing stopping you. As far as becoming a good Perl programmer, enough of that has been written already here on PerlMonks and I'll continue to leave that discussion to the real pros.

Good luck!

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar";
$nysus = $PM . $MCF;

Replies are listed 'Best First'.
(zdog) Re: What does it take to LEARN Perl?
by zdog (Priest) on Jun 07, 2001 at 23:42 UTC
    Here's one I want to add on to your list:

    Reason for Using Perl (or A Way to Use Perl)
    Basically, my point here is that in order to learn Perl well, you have to have something to practice on. You have to have some sort of ideas for using Perl. I've found that just by reading books on a certain programming language, one learns very little unless one applies what he/she has learned in some real way. And in order to want to pursue such projects, it has to interest the person or the person must have some need for it, otherwise the person doesn't feel like doing it eventually, and the point of doing it is lost. And that ultimately is the most difficult part in completing this aspect.

    Zenon Zabinski | zdog | zdog7@hotmail.com

      I couldn't agree more with your sentiment, zdog. Some of you may remember I was sent on a Java course ("Obviously, You Will Need A Java Course...") a while ago, which I did find interesting. Unfortunately, seeing as my daily duties at work involve Perl coding, not Java, I have had no time to practise. And I have now pretty much forgotten everything I was taught on that course while I get caught up in the world of Furthering One's Perl Skills.

      update : also, I have never been on a formal Perl course, just learned it from books. Maybe it sticks better that way.

      Makes you wonder why my boss decided to send me on a java course eh?

      Azatoth a.k.a Captain Whiplash

      Make Your Die Messages Full of Wisdom!
      Get YOUR PerlMonks Stagename here!
      Want to speak like a Londoner?
Re (tilly) 1: What does it take to LEARN Perl?
by tilly (Archbishop) on Jun 08, 2001 at 06:21 UTC
    The top of the list is a willingness to learn. Have you ever noticed that the people you see exercising are always the ones who don't need it? Well the same holds for learning. The best programmers are ones who get onto a learning curve and never bother getting off.

    Beyond that take a look at 70113 for some insight into my learning technique. It seems that programming is a lot like math. Sitting down and learning straight through does not seem effective. My pattern goes like this. I learn a little. Integrate a little. Review a little. Realize a gap, something didn't fit what I thought so it is time to go back and review something in earnest. Then continue on. All the while doing a lot of routine stuff, but constantly staying aware during it and ask myself if I can integrate what I have learned into what I am doing.

    This seems to work well. The key here is that you are not aiming to learn anything in great depth, or learn a lot of trivia. Instead you want to have a reasonably wide and very well integrated knowledge base. When you see something that kind of fits something that you know, you don't want to be able to deliver a set-piece lecture if that were only pointed out. In real life problems come to you dirty and it is up to you to be able to recognize the connection and take advantage of your knowledge.

    All that said one suggestion that I recommend following up on is to not learn programming in isolation. You can read a lot of theory, but a little experience will go a long way towards making that theory relevant, and giving you a concrete sense of what you know and what you think you know. If you can't take a job programming right now, then do volunteer work. Perform a code audit on an open source project. Do documentation. Write something. Do volunteer work for a local charity. Find a reason to write code that someone will find useful. Spend a good chunk of your learning period actually writing code.

    For the record I have not been programming that long either. I started programming in November of 1997. I started teaching myself Perl in January of 1998. Since October of 1998 I have been a full-time Perl programmer. (OK, I have learned to be able to program with varying amounts of competence in several other languages in that period.) I figure that if I keep programming for a few more years I should become reasonably good...

      Hey tilly, I wished there was a like button next to your post! Thank You
Re: What does it take to LEARN Perl?
by Maclir (Curate) on Jun 08, 2001 at 03:10 UTC

    Firstly - a well thought out meditation. worth at least a double ++. One could make those criteria applicable to learning any computer programming language.

    One thing that tends to be glossed over these days, in the great rush to provide more and more programmers and developers though, is a distinction between what I would call a "programming technicial" and a "computer scientist". There is a growing unmet demand for programmers who can cut code using whatever language is "flavour of the month" - at the moment that is Java, but it was Visual Basic, and before that Turbo Pascal, CICS Cobol, IBM 360 Assembler . . . the list goes on. There are a wide range of educational instutions, from traditional universities, technical colleges, and commercial training organisations that are willing to teach the technical skills in these languages, and give people a piece of paper saying they are a "Certified Professional Code-Cutter" in 3 months or 6 months or a year.

    The same applies on the system administration and network support side. Look at all the "certifications" - in Netware, MCSE, Cisco; whatever people thing can give their product an edge, or provide an opportunity to sell training.

    But many of these people end up as the "cannon fodder" of the industry. When technology passes them by, they are left with their technical skills in a now unwanted product. So, what skills and attributes do I believe should be part of a good computer scientist's makeup?

    • A good general knowledge. Not just in computer and technology matters, but truly general. I have had to develop systems for radio communication engineers, lawyers, government and military agencies, land and property valuers, bus company operators, natural resource managers, finance and accounting types and the list goes on. You need to be able to understand their business, and to be able to speak at their level.
    • An analytical approach to problem solving. A good grounding in mathematics often helps here, or other pure science areas - not that you need to understand the complexities of n-dimensional integration, or particle interaction in atomic nucleii - but the discipline of the scientific method, and its approach to problem solving and analysis is important.
    • Good oral and written communication. More than just the high literary skills nysus mentioned. You have to be able to write reports, documentation, and other material that prople can understand. Sooner or later you will have to write proposals to convince people that what you have or want to do is the best approach. You need to be able to talk to people, either one to one or in a group situation, to clearly express your ideas without upsetting people. Listening skills are essential too - listening and understanding. Read up on body language and non-verbal communication.
    • An understanding of algorithms. Read Knuth's books. (sorry, no reference available here) Despite being written in the late 1960's (and his code examples are in a very simple machine language) they still apply today.
    None of these are Perl specific, of course. But in my view, a person with these traits, with skills in one or two programming languages, is in the long term far more valuable than a code cutter who only knows today's popular language.

      Maclir wrote:
      An analytical approach to problem solving. A good grounding in mathematics often helps here, or other pure science areas... but the discipline of the scientific method, and its approach to problem solving and analysis...

      Apart from "formal" education, can you recommend a method to develope and exercise this type of thinking? I often feel as though a proper analytical thought process is something I lack, which makes learning Perl difficult.

      I understand that practice is essential so I continue writing everything I can, (which turns out pretty good sometimes) but I can't help to think the process is delayed by my "haphazard" approach to problem solving.
        Wow - a blast from the past. My personal belief is that having "an analytical approach to problem solving" is an inate ability. Just like some people have a natural ability for art, or music, or languages, so is the ability to logically approach problems. This can be improved by a good education in science and mathematics - not for the subject matter that is taught, but in the approach to problems. As well, look at some of the books on design theory - Knuth's books are a good (but very academic) start - and structured analysis.
Re: What does it take to LEARN Perl?
by Henri Icarus (Beadle) on Jun 08, 2001 at 01:25 UTC
    You missed the most important one: Other Programmers (either peers or mentors, preferably both). This is true of any discipline. Trying to learn it all from a book is extremely difficult because a book can't figure out what you don't understand about what your reading. For that you need another person, and this is precisely why this Monastery is such an excellent place to LEARN perl.
Re: What does it take to LEARN Perl?
by marcink (Monk) on Jun 08, 2001 at 01:00 UTC
    I can only agree with you -- after a couple months of using perl (it became a regular, highly valued piece of my toolbox by now) my impressions are very similar to yours.

    I would add just two more things that helped me a lot:

    The willingness to use constructs you don't fully understand

    It's usually considered dangerous, but hey -- it took me some time to get perl's idea of reference right. I needed \@a and \%h prior to that ;-)

    And more important...
    A deadlined project to write in perl

    Okay, the deadline part is not necessary (tho' it really helps ;-)), but you definitely need to sit down and start coding something bigger than funny one-liners, involving file i/o, lots of hash & array mangling, possibly objects, definitely modules...

    -mk
Re: What does it take to LEARN Perl?
by perigeeV (Hermit) on Jun 08, 2001 at 03:11 UTC
    Nysus, I have read many of your posts with interest because I am in a very similar situation as yourself, with the difference being I am doing the 55 hour work week and raising two children path. Perl and shell were my first languages.

    I can certainly identify with reading the same documentation repeatedly. I discovered quickly that to accomplish anything of value I needed three or more reference texts on the subject. Each author would emphasize points differently, and thus I could find illumination "by committee". This practice led me to frequenting the sale tables at all of the local bookstores.

    Buying sale books was an economical coup, but I soon learned the danger: they put books on sale because they suck. Oh yes. I swear to you I spent four hours trying to figure out the if; then; fi construct in shell because the bastards forgot to mention fi closes an if clause. It took me quite a while to stop using symbolic references in Perl because the first book I had with Perl in it used them like they had healing powers.

    Looking back, learning Perl as a first language can be dangerous. Perl certainly gives you the rope to hang yourself. I sometimes wonder if I would have been better served learning C first instead. The argument being that you should learn Latin before you learn other spoken languages. Now that I know some (childish) C, I have a much easier time. I also appreciate Perl much more!

    Although it deals with Unix, I have found the Loginataka has much wisdom for the larval programmer.