I remember back to my first programs (in Apple Basic). They were very simple things, like "Whodunit" or "Twenty Questions." Things that take input, parse it, make decisions, then give output.
Once I got to school and started learning in a structured fashion, most of the first semester's assignments were like that as well. "Write a program that will solve arithmetic problems." "Write a program that will check spelling in a given file." "Write a program that counts the number of XYZ."
I think most of the respondents have the right idea - give her problems that are relevant to her life. Perl may not be the best language for this. Personally, I plan on starting my kids (when I have them) on Turtle-Logo or VB - languages that are graphically oriented. That way, they can write stuff that they can get immediate results out of.
Then, once s/he comes up to me and says "How can I do X?" and Perl is better, I'll introduce him/her to a more structured language, like Perl. Or, maybe, just leave them in VB for a while.
Now, this may sound like heresy, but the point is to teach good programming practice, not advance a religious belief. I learned good programming habits in PASCAL on a VAX/VMS. C was this really neat thing upper-level students used ... until I got to learn it that summer. Then, I realized it was just PASCAL with funny syntax and new operators, but allowed you a lot more leeway to make mistakes. Once I realized that every third generation language is essentially the same, I realized it didn't matter what language I wrote in, so long as it was appropriate for the task. (It just so happens that Perl is most appropriate to the types of stuff I tend to work on!) Teaching a child to code in XYZ isn't a bad plan, just cause it's XYZ. Teaching a child good programming habits and style is a good plan, regardless of language. A younger child will benefit from the easy graphical coding that VB or Turtle-Logo has. Then, let them decide when that language doesn't have enough tools. They're learning the language, not you.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||