Teaching Perl with Comedy

While testing some code for an forum answer i made a stupid mistake. It was late, I didn't thought of it, why in the world should I name the Module "Test" and wonder then why it behaves unexpected (I do know why! - some newb might not). But the more glorious idea is that we all have such moments and hide them carefully. Why not pile the xp up and make a Perl course out of it by showing what can go wrong and maybe even write it like a comedy? I saw even a motion picture in my mind about someone ranting how bad Perl is while making such moves.

Tuts are hard work, I know because i wrote some. To set up all the traps that a screwball comedy comes out of it that actually works dramaturgically should be even harder. But maybe someone runs with the idea.


Actually I started to collect 'bad' code from modules or beginners' tries in current or recent projects. Not a huge collection at the moment but growing. If you like to get the file periodically, give me a hint :-)

Any chance of sharing that collection to the public? Examples (bad or good) are all good.

depending on Lichtind's interest in getting some material, I will think about putting together a few things into a blog entry. As mentionned before, the document is not very long, as I just started collecting beginners' mistakes.

I saw a great talk years a go 'war stories from the front' or something like that, I think it was Piers Cawley that did it.

Basically he told a couple of war stories about how things had gone wrong, and then got other people from the audience to share their experiences.

It's not that you learn much, but you do feel like it's not just you that comes across issues, technical or otherwise.

Please be careful when making fun of beginners' code or of modules you qualify as containing bad code.

As for the idea in general: Comedy and learning go very well together. Examples, good or bad, often help.
It's all about how well you manage to share your insight with empathy to the one who unwillingly contributed the example. :-)

On a side note: Not all of us posting here write perfect English (me included). Perhaps also because it is not the first language some of us learned..
So, if someone pointed out our errors, that would be very good for learning.
And, uhm, Perl was also not the first language I came across in my life.. ;-)

lichtkind: a mail is on the way to you :-)

:m): I am not planning to blame beginners for their code. Every example is kept without any reference to the author. However, some people prefer to try things instead of learning how to do it right. Understanding the paradigms of a language as well as knowing vocabulary and grammar is essential when doing a job with it and people using the trial-and-error pattern definitively do the wrong thing. On the other side you are absolutely right. Nobody is perfect, everybody has his problems and a non-native-speaker's english (like mine) may read strange and wrong to a person using the language every day. The same applies to programming languages. People being used to code in assembler will usually not have a fundamental understanding of regular expressions and will use a different approach for solving a given problem.

Hi, Piers here. I think the talk Ranguard is talking about was "12 step Perl" and it was a while ago. I think I ran it at the YAPC::Europes in London and Amsterdam. I'm glad you remember it fondly; I had a lot of fun doing it.

Maybe it's time to dust the format off again.

Leave a comment

About lichtkind

user-pic Kephra, Articles, Books, Perl, Programming