Intro to Perl

mikeraz at patch.com mikeraz at patch.com
Sat Feb 9 10:22:38 CST 2002


Curtis,

This is a great idea.  If you are looking for a co-teacher I'd like to get in line.

I've been mulling over your statement and these ideas have emerged:

Time planning for the course is a difficult thing for a non teacher.  The first couple
of passes will probably be bumpy as a result.

12 chapters of Llama seems really aggressive.  That's a chapter every 45 minutes.  If the
material can be presented that fast can it be assimilated and practiced?

The one day format is good.    Perhaps include a week of homework.  Each morning for
the week following the class you'll email the students a program to create.  This will
transfer the class setting to the work/home setting and give them the experience of 
doing Perl in their own life context.


It seems that the format you have in mind would have 2 primary objectives:  
	- teach the student where to get answers quickly
	- show the student some capabilities of Perl through the construction of a program

I suggest adding:
	- build the students confidence that they can write Perl

And in fact I would put that ahead of the display of Perl capabilities.

To illustrate:

    To the end of building confidence I would suggest having them write 6
    to 12  extremely, very, completely simple programs.  (if they can be
    called programs)  These simple program problems should be designed to
    be assimilated and typed within 10 minutes.  They should take something
    that is (to the student at this point) some concept that they've read
    about and turn it into something that they have typed and made real
    (as real as any bunch of bits in a computer).
    
    A off the top of my head progression might be:
    
    1st program:  scalar assignment and printing 
    2nd program:  list assignment and printing 
    3rd program:  scalar modification 
    4th program:  the while(<>) {...} construct 
    5th program:  the if(//) construct on $_
                  # at this point we have a simple grep, real world useful 
    6th program:  something more complex
     ...
    
    
    The intent here is to have them type something in see it work.  To type
    things in Perl syntax into a file that Perl and interpret and give the
    student feedback "Yes!  I've done it!"  (hmm?  replace "hello World!" with
    "Yes! I've done it!"  must consider implications)
    
    Then type in more things and see them work.  I think the actual typing
    is important.  I think the repetition of typing and seeing results is
    important - you build the familiarity of making a program so that later
    they have a starting point where they have the comfort of familiarity.
    
    Overall structure:
    	$complexity = 0; while(<Exercising>) {
    		type_Perl_program; see_it_work; $complexity++;	# +=
    		.2 instead?  adjust to class?
    	}
    
    
    Save the iterations of the simple programs so that at the end of the day
    you review whatever level of complexity is achieved through showing how
    the end program is in essence the combination of all those very simple
    little programs.
    
At the time you illustrate that big programs are collections of little program 
subroutines, objects, pipelines and such can be introduced.  You can point out
how they have learned some things and they can now use Perl.  To do more things
they just need to add in more simple program pieces to what they have.  Since
they just spent a day typing Perl and seeing it work they will have (at least to
a small extent) internalized "Yes!  I can do it!"  





On Fri, Feb 08, 2002 at 12:52:35PM -0800, Curtis Poe typed:
> I just made a post to Perlmonks
> (http://www.perlmonks.org/index.pl?lastnode_id=6364&node_id=144213) regarding starting an "Intro
> to Perl" seminar.  I won't be able to start this right away, but I was hoping to guage the "real"
> level of interest in this.  I've have received a fair amount of email from people who want to
> learn Perl, so I wonder if they're really willing to jump through the hoops outlined in the post. 
> Also, any suggestions would be welcome.  Finding a place to actually do this would be great.  We
> can do it at my company's offices (probably), but it wouldn't be very convenient.
> 
> Below is the text of the post.
> 
> ------------------------------
> Camel Fishing
> 
> I was chatting with merlyn one day (ooh, I'm such a shameless name dropper :) about the lack of
> Portland Perl Monger meetings and he said "why don't you run it?" Well, sometimes I'm not very
> bright, so I took over pdx.pm. It's been fun and we've had one social and one technical meeting
> (with the next meeting coming up). However, I am constantly getting email from people who ask a
> variant of the following question:
> 
>     I want to learn Perl. I've signed up for the 
>     mailing list but some of the conversations are 
>     intimidating. Are these meetings okay for a 
>     beginner?
> 
> I always respond that we welcome any and all, from the "just looking" to the gurus. However, there
> has been a lot of interest in learning Perl, but not everyone can afford to pay for training.
> Further, just learning from a book can be deathly dull for some people (it is to me, for example).
> To deal with this, I'm thinking of a one-day (eight hour) Intro to Perl seminar. This is not to
> teach someone to program Perl. Rather, the intent is to give them enough exposure to the language
> that they will know where to look for answers when they want to get something done. I don't have
> the time or the resources to teach full time (even though I would love to). The intent is not to
> give them a fish, but to teach them how (hence, the title of this node and possibly of the
> seminar).
> 
> There were some very interesting ideas presented in the Teaching a class thread, but again, I am
> not trying to teach Perl. Here is the minimum of what I'm shooting for:
> 
> 1.  They must supply their own copy of "Learning Perl"
> 2.  We'll build a small app illustrating a key point 
>     from chapters 1 through 12 of Learning Perl
> 3.  Teach them how to use perldoc and online resources
> 4.  Small seminars with at max 5 attendees? 
> 5.  Printed seminar materials that they can later review 
>     for the highlights 
> 
> Item 1 would show they are serious. Maybe I could require they work through the LLama's Chapter 1
> "Whirlwind tour" prior to attending? They could email me working copies of their programs as the
> price of admission :) I would probably request a very, very tiny change to the program just to
> show they didn't download the code from somewhere.
> 
> I think that writing a very simplistic BlackJack game (file I/O demonstrated by saving high
> scores) would address item 2. Item 3 would teach them how to fish and item 4 would make it easier
> to manage and help them.
> 
> Learning Perl would be used because it's fairly straightforward. The curricula could open each
> section by briefly explaining the topic (scalars, arrays, regexes(!)) and then using that to build
> a new part of the BlackJack program. I don't want to commit to teaching them everything, but
> giving them a starting point seems workable.
> 
> Is this too ambitious for an 8 hour seminar? Can anyone suggest resources for developing a
> curriculum? I have three guinea pigs here at the office, so the first "real" seminar would not be
> totally new to me, but I could use some advice here. The one thing that really worries me is a
> comment that Tom Phoenix made to me (there I go name dropping again): "I never realized how much I
> didn't know about Perl until I started teaching it." That scares the heck out of me. Any common
> teaching pitfalls that I should be aware of?
> 
> Cheers,
> Ovid
> 
> 
> =====
> "Ovid" on http://www.perlmonks.org/
> Someone asked me how to count to 10 in Perl:
> push at A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//;
> shift at a;shift at a if $a[$[]eq$[;$_=join q||, at a};print $_,$/for reverse @A
> 
> __________________________________________________
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com
> TIMTOWTDI

-- 
    Michael Rasmussen  aka  mikeraz
   Be appropriate && Follow your curiosity
   "They that give up essential liberty to obtain
   temporary safety, deserve neither liberty nor safety."
				-- Benjamin Franklin 	
     But keep in mind:
There is no such thing as a problem without a gift for you in its hands.
TIMTOWTDI



More information about the Pdx-pm-list mailing list