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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I wouldn't use DBI, and probably not CGI either to teach some beginners about perl.

To use DBI is ok in itself, but it is kind of pointless unless the students already know some SQL and have some database to do queries against, and moreover see a reason why they would want to learn this. The teacher knows some SQL yes, but will the students grasp what is perl and what is not, and should they learn basic SQL first?

Actually, CGI is suboptimal as well, as it kind of expects you to understand at least a little about HTML and how the web works - it is possible to learn to do some web stuff anyway of course, but it will all be very confusing as to why "this produces that result". So, same thing there, without some basic knowledge about HTML it is kind of hard to get actual understanding on what happens.

Granted, I've not read this book mentioned, and I understand the need to capture the interest of the students, which is why CGI programming is a natural way to go - still, if they aren't already doing some experimenting with web pages, they will have problems, I'd say.

Other books I didn't really read, only looked through at some point are Learning Perl and Learning Perl on Win32 Systems - I have to wonder if any of these aren't what would be better - at least select chapters. I seem to recall they have a chapter or two about CGI.pm and CGI programming, but they start of with how the language works.

I guess it boils a bit down to if it is perl that should be taught, or just give the students a demostration on the "cool" stuff you can do on the web.

Personally, I think I'd go for an approach that starts with "Hello world", and proceeds to the basic, simple funcions in perl, and then pulls in some very simple standard modules to do some simple tasks easier. I bet many of them would be as interested in having something that will sort their MP3's or something as they would creating something that will echo their name back on the web. And you should really start to echo your name back on the comand line first. :) Maybe something that would read a directory with readline first, then move up to using File::Find to do it easier and get an understanding of subs, and then even introduce to CPAN by pulling down one of those MP3 tag modules and produce some kind of table with both the filename and the name from the tag? Just one example of what the alternatives could be - if this guy gets some help of course.

The problem with that, is of course that someone will need to set up and write that kind of course, and there is a special case here.

The CGI approach is likely to catch their immideate attention at first, as many probably dream of doing their own communinty or some such, but without the web understanding, it is likely to leave them none the wiser, sadly. It should still be examplified at one class, so they can see that "if you learn this language, this will become possible". CGI/web is how many start programming, perl and other languages, but they usually can do some basic HTML layout first - at least those that get anywhere with that path.


You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.

In reply to Re: Re: Can a non-programmer teach Perl? by Dog and Pony
in thread Can a non-programmer teach Perl? by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found