|P is for Practical|
Re: Re: Can a non-programmer teach Perl?by Dog and Pony (Priest)
|on Aug 17, 2002 at 18:28 UTC||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.