Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: How do you master Perl?

by dragonchild (Archbishop)
on Apr 11, 2005 at 12:56 UTC ( #446587=note: print w/ replies, xml ) Need Help??


in reply to How do you master Perl?

A few thoughts, in no particular order.

The more I think about this, the more I'm convincing myself (for good or ill), that the things programmers need to learn next aren't so much about Perl as things they should know how to implement in Perl, but could also do in some other language. Surely I can teach more and more Perl stuff, but at some point the student who really wants to learn more needs to have a "programming lifestyle" that supports it.

To me, this is the heart of it. I first learned Perl in 1995, and thought it was a heck of lot better than C or Pascal, but it was just a year-off from college, so I didn't do much with it. In 1999, I started working seriously with Perl and, after reading the Camel 3rd a few times, realized that I already knew all the language stuff, but didn't know the programming stuff (despite have a CS degree). I was lucky enough to be directed here, where I have happily undergone a 4+ year apprenticeship to some great people.

Teaching beginners is easy because we know where to start and everyone is pretty much in the same place. A lot of people are content to stay at that level, and that might be okay for them. What catapults people into the higher levels, though?

This is also very important. Most people who write stuff in Perl do so because they're not programmers, don't want to be programmers, and know just enough to get done what they need to get done. They don't need to know how to do more. At best, a quick tour of CPAN is all they need to be more productive.

You can also look at Saints in our Book and catalog what they thought they'd be when they grew up. I'll bet you less than 20% thought they would actually be real-life computer programmers. Yeah, there's the people like me who wanted to be a programmer ever since they first played around with AppleBasic or CP/M or whatever. But, most just fell into it because some random job accidentally asked them to go beyond what they thought they could do. How many times do we get the question that goes something like "I can write cronjobs, but now I'm being asked to write mission-control software. Help!"

As for your safety net ... every dangerous task has its own safety net. I think that instead of trying to build Safe for mid-level developers, you should instead look at trying to develop habits. I programmed for 5 years before I even knew that you could have automated tests for software. It was something missing from my foundation. Now that I know about them, I (try to) follow the XP guideline of "write test, fail test, write code, pass test." It's just a more sanitary way to live, but you don't know that until you've seen it.

For your "Do Foo in Bar" thing ... we're actually have this discussion on the extreme-perl mailing list. (Well, Rob Nagler and Ovid are having the discussion while the rest of us are making sure no blood spills on the carpet.) I tend to agree with Rob, though not as vehemently. He feels that Perl has all the tools he has ever needed for the projects he's run into, and I agree with that. The big eye-openers for me have been when I learned to program thinking of

  • lists instead of items (map/grep/sort vs. for/while)
  • functions as first-class items (dispatch tables, closures, etc)
  • objects as both instances of classes and entities in their own right (classic OO vs. prototyped OO)

I'm certain a few others can be described, as well. If you teach those, in Perl, then you're well on your way to giving your students many of the benefits of other languages. This isn't a substitute for learning Haskell or Smalltalk, but it's a good start.


Comment on Re: How do you master Perl?
Can you learn French culture from a movie?
by Ovid (Cardinal) on Apr 11, 2005 at 20:36 UTC
    For your "Do Foo in Bar" thing ... we're actually have this discussion on the extreme-perl mailing list. (Well, Rob Nagler and Ovid are having the discussion while the rest of us are making sure no blood spills on the carpet.) I tend to agree with Rob, though not as vehemently.

    I think it's interesting to note that no one on that mailing list who argues that you can "learn all that stuff in Perl" has any experience with languages in paradigms other than procedural or OO. Do they know any functional languages? No. Logical? No. Heck, not one of them even knows a pure OO language (or, at least all have been silent when I have repeatedly asked).

    It reminds me of a kid in an English class who told our professor that he (the kid) doesn't need to visit any foreign countries because he has the Internet. Once someone is that far gone in their misunderstanding, it's often difficult to explain what they're missing. Let's call that kid Alex. Imagine that Alex smokes Gauloise, reads about France on the Internet, and recites from memory the dialogue to every Eric Rohmer film while wearing a beret. That still doesn't mean he understands what it is to be French or to experience French culture first-hand. However, never having even visited France, Alex would have no way of knowing what he's missing. Further, having never been to France, many of us would rightfully mistrust him as an expert on French culture, particularly if he is disagreeing with someone who has lived there.

    Sure, you can learn functional programming techniques in Perl, but it's a piece of cake (and natural) to fall back to procedural or OO techniques. If you are forced to work in a purely functional or logical language for a period of time and you have no comfortable techniques to fall back on, you can gain a better appreciation of those other points of view. However, Rob Nagler and friends have never directly experienced those other cultures. I hardly feel they're well-placed to judge Perl's merits vis-a-vis languages they do not know.

    Mind you, this is not to say that they're not a bunch of great guys and sharp programmers. They just have a bit of a blind spot.

    Cheers,
    Ovid

    New address of my CGI Course.

      Somehow I missed this reply earlier: that's excellent advice. I deal with this situation quite a bit since I spent a long time in the Middle East and now get to listen to people tell me all about what's it like over there since they saw it on CNN. :)

      At some point, you have to stop relying on the information you got second- (or third-) hand and experience it yourself I didn't really define "master" before, but now I think I'll have to include "first-hand, direct experience".

      It also reminds me of what a physics professor said about the Dirac equation for the electron: "Schrodinger is a nice place to visit and walk around, but you have to take a picnic basket with you to visit Dirac." Some places you can visit for a couple of hours, but other places you have to set up camp and stick around for a while if you want to get anything good out of them. :)

      A big part of living in the culture deals with discovering why they do things. Almost everything, including the stupid things, has some sort of history behind it. That doesn't justify it, but it makes it understandable. Once you understand why something is the way it is, you can deal with it more effectively (including changing it if need be).

      --
      brian d foy <brian@stonehenge.com>

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2014-09-24 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (243 votes), past polls