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

Cases for teaching Perl

by l3nz (Friar)
on Jan 29, 2004 at 13:18 UTC ( #324924=perlmeditation: print w/ replies, xml ) Need Help??

Exquisite monks,
it sometimes happes to me to meet some bright person who is interested in learning a programming language; what usually happens, after a brief talk, is that I lend them my Camel book and ask them to read the tutorial in the first 30 pages or so.

Non programming peopole usually cannot get a hold of the thing, and I believe that this happens because they don't understand "How can this thing help me?", so they get bored after a while not seeing a clear payoff for their fatigues. I do understand how Perl can help me - I am used to write all sort of one-liners to solve my everyday computing chores, but this happens because I know the language and therefore it's very convenient for me to do so.

I wonder if - in your experience - there is any problem that the average Windows-Office user faces every day and gets tired of that can be easily solved by a beginner in Perl, so it can light people up and be a reason to start studying Perl and programming in general?
And have you even introduced a not necessarily geek friend to programming, and what is your experience in this case?

Thank you,
l3nz

Comment on Cases for teaching Perl
Re: Cases for teaching Perl
by Abigail-II (Bishop) on Jan 29, 2004 at 13:24 UTC
    there is any problem that the average Windows-Office user faces every day and gets tired of that can light people up and be a reason to start studying Perl and programming in general?
    I find this question similar to is there any problem that the average commuter faces every day and gets tired of that can light people up and be a reason to start studying Ford engines and car mechanics in general?

    My answer to the latter question is "probably not".

    Abigail

      It's a pity, because if you are on a Unix box you're probably a little more computer-savy and your environment is much more programmer or power user friendly (a good part of what you do on a Unix box is text file editing ad manipulation, so Perl is at home in this environment).

      On the other side, it would be quite a crash start to start the average Windows user with Win32::OLE, however invaluable this proves when you've learnt your basics.

      Maybe something that's file-oriented, like building an HTML catalog of all or some files or images on your hard disk, could be something easier....

      Thanks anyway

      Exactly. The OP needs to take a look at basic economics, if there was a problem that required the average Windows-Office user to learn to program, someone would sell a program to handle that problem.

      I find it more similar to is there any problem that the average commuter faces everyday and gets tired of that can light people up and be a reason to start studying how to change their tires/fluids/brake lights and car maintenance in general?

      There's a great amount of utility that can be gained from learning just a small amount of programming, especially shell programming or "scripting languages" like Perl. Sure, it might take a few hours to learn the basics of a simple language, but the amount of time it can save you on automating many tasks will more than pay off in the long run.

      Now, there are people who will say "huh, my car is oozing mutant goo again, better take it in to the shop so they can add some new goo for me" and there are people who who will say "ok, I've wasted enough time/money having these yahoos fix up my car, time to see if I can find out any info on what this goo is and replace it myself". People in the first category are probably a hopeless case, but people in the second category may just need a little prod to set them on the path toward Perl-Fu Enlightenment.

Re: Cases for teaching Perl
by dragonchild (Archbishop) on Jan 29, 2004 at 13:41 UTC
    If you're a Windows-Office user, why on earth would you want to learn Perl?!? I'd much rather learn VBA, because that's the environment I'm working in.

    Now, if I was a Linux-OpenOffice user, there might be a little more of a case for learning Perl, cause I have access to a useful commandline. But, still, I'd be better off learning whatever macro language is available in OpenOffice.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

      Most normal Office users learn at least one programming language, and it's not VB. They're Excel formulas. IIRC, they actually are computationally complete (I remember seeing a BrainF*ck implementation in Excel).

      ----
      I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
      -- Schemer

      : () { :|:& };:

      Note: All code is untested, unless otherwise stated

        I once implemented an Excel insurance rating and evaluation system (by company request) for a certain insurance company on the East Coast. This was an internship in...98? Not using VB at all, mainly hlookup() and vlookup() and many other stat functions. You could enter in rows upon rows of insurance tables and it would compare insurance risks versus various competitors, then generate graphs, win percentages, and summary data. I guess this is just saying that even with an abacus, great things are possible.

        Given what I know now, this would have been a great place to write a custom Perl/Tk app instead, perhaps loading rules and datasets from YAML files versus the clumsy Excel format. Heck, it really needed a database backend too!

        Excel is decent for what it does, but storing 50 tables in a worksheet is just plain ugly. The worksheet grew to about 10 megs, a colleague developed a motorcycle version that was 25 MB! Anyhow, long story short, yes, it is all Turing Equivalent.


        To the question posed at the top of the page, IMHO, programming is something you have to WANT to do. You don't need a problem in search of a solution, but rather, you just want to get under the hood and see what happens. I think there is a good reason, typically, why you don't see many marketing folks, etc, that like to code. It's puzzle-solving in a very pure form. In the case of Perl, it's puzzle solving combined with a very strange form of art.

Re: Cases for teaching Perl
by matthewb (Deacon) on Jan 29, 2004 at 15:05 UTC
    I wonder if - in your experience - there is any problem that the average Windows-Office user faces every day and gets tired of that can be easily solved by a beginner in Perl...

    The last person I `converted' I found pasting entries from a huge MS Word document into a form that populated a database. I demonstrated that it was possible to knock up a two-minute script that split the lines into records and executed a corresponding INSERT statement. ``Okay, maybe it is time I learned some of this'', was the reply.

    The first thirty pages of the Camel deal exclusively with basic theory - that's more like what you read after you've been inspired than your inspiration. Show your friends how Perl can let them sit around drinking coffee when they would otherwise be performing some mundane administrative task and they'll be sold.

    MB
Re: Cases for teaching Perl
by techgirl (Beadle) on Jan 29, 2004 at 19:38 UTC
    >> And have you even introduced a not necessarily geek friend to programming, and what is your experience in this case?

    The other posters gave you some thoughts on specifically on Windows tasks.

    But I have lately been considering the latter part of your question because I'd like to teach my 14 year old cousin (another girl geek, and she runs a web-ring site in the UK) how to code.

    You can of course, start with immediately relevant tasks, but then I wonder if you risk skipping over important foundation-level concepts -- which is I think why you start with those first 30 pages of the Camel book.

    Thus, teaching the non-interested -- or perhaps piquing the interest of the non-initiated -- can indeed be a formidable task.

    I had hoped that there might be a series of programming challenges somewhere on PerlMonks -- perhaps even a parallel experience system, where you'd complete programming exercises to rise up through the ranks (rather than just logging into the site.)

    Maybe it could be implemented just by organizing the tutorials appropriately, or maybe the most appropriate thing is to set up a wiki somewhere else.

    I wonder if this has come up before? But I don't know the monastery well enough to know where to look. In the XP discussions (of which there are so many). Or in the learning perl discussions? If you have any related threads you'd like to point me to, please do... ;|

      "Thus, teaching the non-interested -- or perhaps piquing the interest of the non-initiated -- can indeed be a formidable task."

      Indeed. I've given up on trying to get my little sister (in 11th grade) interested enough to try programming, even though she did run Linux (exclusively!) for a couple years.

      I always thought a decent idea to get someone started on programming from the ground up would be a simple, text-oriented RPG. This, of course, will work best if the person actually likes RPGs. This would be a simple introduction to basic ideas of control flow, data structures, and the like, but should be fairly fun. I'd be willing to bet that you can actually write a decent game, with good combat mechanics and plotline, without having to worry about complicated user interface/graphics issues.

      Another similar idea would be to start "programming" through some sort of scripting/creation utilities available in other computer games. MUDs come to mind as the obvious text-based choice, but games like Neverwinter Nights and Warcraft come with nice graphical level editors that have some scripting capabilities built in.

        My personal road went from html to javascript to perl (more or less), with a bit of random c hackery thrown in on the way. I started with the html, which is nice and simple and got me used to the idea of writing something that would be executed , as it were, by something else, it also gave me some experience reading the "source" to teach myself.

        After doing that for a while I got interested in javascript to do more l33t stuff. I rather like javascript as a first "programming language", just because it's simple, easy to use and immediate, "cool" results. It also supports a number of fairly advanced features such as OO and so forth (more or less, it's been a while) which lets you get more advanced as you learn more.

        After spending a while with javascript I wanted to do stuff that it couldn't do, learned about perl, and the rest is history =]

        Give the world a magic system based on programming, such that characters can manipulate the game world through spells (programs.) If you could pull off making the game world compelling of itself, and the magic system not throwing it out of balance, it could become a great inspiration to learn programming.

        Ah, fond memories of TinyMUSH...

Re: Cases for teaching Perl
by tilly (Archbishop) on Jan 30, 2004 at 01:04 UTC
    In my experience, the average Windows user faces incredibly varied problems each day, many of which can't be trivially automated. If this wasn't so then the job would have been automated away already.

    That said, effective advocacy generally involves waiting until the person has a real problem. When that person has a real problem, solve it and offer to explain the solution. After you wash, rinse and repeat a few times, you might get your chance. Sometimes you don't get the chance, but you at least left a happy person.

    But each person will have to decide to learn for their own reasons.

Re: Cases for teaching Perl
by inman (Curate) on Jan 30, 2004 at 10:45 UTC
    Following a slightly corrupted 70:20:10 split -
    • 5% of Office users are scared that they will delete something and make a complete mess. They hate computers but have to use them.
    • 70% of Office users will be quite happy creating letters and reports in Word, spreadsheets in Excel etc. These people are quite happy to just get on with their work and not worry about the technology. This type of user will print out hundreds of documents that need to be reordered by hand becasue they had no idea that there was an option to 'print in reverse order'.
    • 20% of Office users will learn more advanced techniques such as mail-merging, importing data from other Office applications etc. These users a lot of their time in Word, Excel etc. and have learned these techniues because they were interested and because it was worth the effort.
    • The remaining 5% are borderline technology people who start out by recording macros and then graduate to VBA programming. They have probably designed their own website etc.

    Interestingly, I count myself as being part of the 70%. I spend very little time doing anything in Word, Excel etc. I do however know quite a lot about Windows and technology in general.

    In answer to the original question - No, Perl is an amazing language which can be applied to a great many technology areas. Working with Office however, is not one of them. Somebody wanting to do more with Office and learn about programming whould really graduate into the last 5% in my list and learn the basics using VBA before moving on to something else.

Re: Cases for teaching Perl
by bart (Canon) on Jan 31, 2004 at 10:24 UTC
    it sometimes happes to me to meet some bright person who is interested in learning a programming language; what usually happens, after a brief talk, is that I lend them my Camel book and ask them to read the tutorial in the first 30 pages or so.

    Non programming people usually cannot get a hold of the thing

    I think you're giving them the wrong book. The camel book is a book for seasoned programmers, not for people who eventually might be interested in learning programming. Don't get me wrong, it's an excellent book, just not for this audience. It just is not speaking their language.

    Now, there are many books out there teraching Perl to a non-programming audience. One of those, for example Elements of Programming with Perl, would make a much better choice for a introductory book.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2014-07-29 00:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls