Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re(6): The Case for Learning Perl

by cjf (Parson)
on Jun 12, 2002 at 09:02 UTC ( #173744=note: print w/replies, xml ) Need Help??

in reply to Re: Re: (jeffa) 3Re: The Case for Learning Perl
in thread The Case for Learning Perl

many people who do so are attempting to do something complex like writing CGI applications as they learn.

CGI applications are excellent introductory projects.

Think about what they can teach you:

  • Security - validating all incoming data mostly, but depending on the project they could also learn about encryption, server configuration, and many other areas.
  • Use existing code - writing parameter parsers is boring, tedious work that will more likely than not result in a buggy, insecure end product. Using extensively tested code is a good idea.
  • Most importantly, programming, and more specifically Perl is fun and has real world applications. If people spend a week writing programs to convert fahrenheit to celsius, they're going to get turned off programming pretty quick.

I see very little wrong with writing CGI scripts as an introduction to Perl. So what if people develop a few bad habits while they're learning? If they stay interested and stick with programming they'll learn to fix them fast enough.

Replies are listed 'Best First'.
Re(7): The Case for Learning Perl
by ajt (Prior) on Jun 12, 2002 at 11:30 UTC
    I don't think Perl is any better or worse than many other languages to learn. I started with BASIC (Commodore V2, BASIC Lightening, BBC BASIC, and finally Turbo BASIC), then tried 6510/6502 machine code, then Pascal (Turbo Pascal and Delphi) then Perl and now XML/XSL-T. Along the way I picked up many good and bad habits, and I still consider my code to be often childish, and inelegant.

    CGI is a fun place to play in, and as you say there are lots of things to learn, security being a key one. However it is like driving a Formula One car in a Grand Prix, fun but very dangerous.

    Have a look here to see what I mean, lots of keen, well intentioned people, with not a lot of knowledge to go round. Dig deep and you will find a certain famous monk trying hard to teach people what to do - overall you will find he does not have that much luck...

    If you are learning Perl and CGI on an isolated machine, and you have access to good books and people to talk to, then it's doable, if you're an unskilled programmer on an exposed production server then you could dig yourself into a very big hole - or worse leave a dirty great hole after you have left*.

    I think there is a thin line between fun and dangerous, and I agree that safe programming may be dull, but having seen the results of unsafe programming I'm a bit more cautious now...

    *There is some where in the world a production server running an early Perl script that I wrote that allows a remote user to arbitrarily view any file on the server - I can't remove the file as I don't have access anymore, and the current admin is less knowledgeable than I was then...

    Update: In reposne to Abigail-II I do not believe that Perl is the best language to learn on, only average when compared with many others. I also wish to stress that I think learning CGI (Perl or otherwise) on an internet connected computer is very unwise.

      I don't think Perl is any better or worse than many other languages to learn.

      I think it is. Perl is a powerful, but dangerous language. We don't learn people how to drive in a Ferrari, people don't learn to fly in an F-16 jet, nor do people learn to read using Shakespeare plays. Why should computer languages be any different? Other languages are, IMO, much more suited to learn programming in. To name a few, Pascal, Python, Java, Haskell. Probably Eiffel as well.

      I also think that Perl isn't a suitable language for everyone. In fact, I believe that more than 75% of the people currently using Perl should be using a different language (or maybe not even program at all). The influx of bad programmers due to the popularity of the web certainly plays a role here.


Re: Re(6): The Case for Learning Perl
by danger (Priest) on Jun 12, 2002 at 14:23 UTC
    CGI applications are excellent introductory projects.

    I think you took my statement a little out of context. I didn't mean CGI *couldn't* be used as introductory material --- I meant that often people who are trying to learn Perl as their first language are doing so with CGI applications that are less than introductory in nature and *without* any real instruction in programming in general.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://173744]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2018-05-23 17:06 GMT
Find Nodes?
    Voting Booth?