Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: How to teach perl to novice programer

by Anonymous Monk
on Aug 26, 2013 at 10:50 UTC ( [id://1050938]=note: print w/replies, xml ) Need Help??


in reply to How to teach perl to novice programer

Maybe start by teaching programming using http://www.alice.org/ or http://www.squeakland.org/ or some such ( Logo Turtle ), before moving onto perl?

Below is some food for thought, a recurring theme is know-your-audience, be-a-hero(solve something they frequently encounter as they watch), teach/work towards solving a real problem that interests them

You gotta start by introducing variables(buckets), how to put stuff in them (interpolation), when they live/die (scope), ... basically do a few walk throughs of how a program runs (now the bucket is empty...)

Then move onto introducing file+folder model, how files work (files are iterators), but don't delve into readdir. Teach File::Find::Rule for obtaining a list of paths. Maybe Path::Class/Path::Tiny for working with paths. no readdir, its too low-level.

Then give overview of the process model (STDIN/STDOUT/STDERR/@ARGV) and the shell

Then have the beginner start solving that real problem they're interested in

Ask what is the goal of program? Ask what next change should do? What series of steps should play part? What input/output/result/effect? How to go organise it? ... design the program on paper before start writing it, backing up incremental improvements as you guide over beginners shoulder -- after the initial planning session (which beginner adds as comments ) you be quiet until they're done, then you review together -- ask beginner to describe step/by/step how the program works, then run the program and see what happens, then praise the things that correct, explain any misunderstandings , and make backup and have the beginner fix the program while you wait

By the time you're done with buckets you'd have 10-30 small programs, at least half typed by the beginner Each new metaphor/model/topic should start with your writing a file as beginner watches, then beginner writing a file, fixing typos, dumpering , fixing thinkos, repeat, you-review-together, you-fix-for-beginner (add comments to file explaining any typos/thinkos and how to overcome them), beginner-type-fixes .... and you end up with 10-50 small files the beginner can review

Naturally this type of 1-on-1/master/guru-style learning requires explicit agreement/willingness from both parties -- its very effective , esp if both teacher/learner are nice and positive and eager... The important dynamic to develop is STOP - Stop, Think, Observe, Plan then Act then repeat STOP ; In no time at all you'll both be thinking like computers, you'll know where to look (what to dumper), what to expect, what to call it ... how to know what you mean, ask questions the smart way

Also, while you're discussing how to solve each task/goal/step walk the beginner through RTFM-ing a couple of times, from checking the faqs( perlfaq4#How can I get the unique keys from two hashes? ) to searching the docs, to searching the perlmonks :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-03-19 02:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found