Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: (jeffa) 3Re: The Case for Learning Perl

by talexb (Chancellor)
on Jun 12, 2002 at 04:17 UTC ( [id://173728]=note: print w/replies, xml ) Need Help??


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

More good points. I drew on my own experience, with 15 years of programming in C, to provide the necessary support in learning Perl in the first place. If necessary, I could dig through the code and find out how it works (I always wanted to write my own regexp engine).

Your comparison with riding a motorcycle is particularly apt. I got my first bike in 1978 after having ridden a bicycle for a number of years. I had no idea about how to use a clutch, so took the bike out to a back road where I drove up and down (very carefully!) till I got the feel for it.

After a while I was quite competent at downshifting, braking with brake and engine, checking my mirrors and flicking the turn signal, but to begin with I had to single-task my way through the unfamiliar territory of a motorcycle. Perl can be like that.

I can't imagine trying to learn Perl as a first programming language though. Way too much information and complexity at once, especially if one is trying to do something as complex as CGI programming.

My opinion still stands. I hope and expect to see civility from everyone (not just Anonymous Monks) when they visit this site, just as any of us would expect visitors to their home to behave properly and not break furniture, make fun of our choices of music or drink all the beer.

--t. alex

"Nyahhh (munch, munch) What's up, Doc?" --Bugs Bunny

  • Comment on Re: (jeffa) 3Re: The Case for Learning Perl

Replies are listed 'Best First'.
Re: Re: (jeffa) 3Re: The Case for Learning Perl
by danger (Priest) on Jun 12, 2002 at 04:52 UTC
    I can't imagine trying to learn Perl as a first programming language though. Way too much information and complexity at once, especially if one is trying to do something as complex as CGI programming.

    The very end of that paragraph outlines one of the biggest problems with people trying to learn Perl as their first language. It isn't that Perl isn't a reasonable language to learn as the first language --- it is that many people who do so are attempting to do something complex like writing CGI applications as they learn. They don't seem to want to bother working their way up. And Perl makes it seductively easy to get started. However, soon they are in over their heads --- and it isn't merely too much syntax or that Perl is way too complex, it is because they just haven't built up their basic programming skills over any period of time, nor been taught fundamental concepts such as variable scope or shown how to tackle and decompose a problem in a structured fashion ...

    Any language would be a horrible first language if people tried to learn it all at once and without any real instruction in programming to speak of --- one doesn't learn how to program as a side-effect of learning a programming language. But that winds up being both the expectation of many beginners, and the route they try to take.

      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.

        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.

        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?
Username:
Password:

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

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

    No recent polls found