Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Perl for Non-Programmers...

by mrmick (Curate)
on Feb 20, 2001 at 20:21 UTC ( [id://59683]=perlmeditation: print w/replies, xml ) Need Help??

Dear Fellow Monks,

Since early last year, I have been giving some informal workshops as an introduction to Perl at the college I attended. It's my way of giving back to the alumni and building a bit on my presentation skills. Now, don't get me wrong - I'm not a 'guru'. I just love programming with Perl and want to show others how useful it can be.

I have seen many people out there (in the 'real' world) who have expressed a keen interest in learning to program but have no idea where to start.In response to this apparent need, I have begun writing (since December, 2000) a book that addresses computer programming for the non-programmer. Perl will, of course, be the implementation language here because of its power, flexibility, and ease of use.

My plan is to create a book without all of the assumptions that experienced programmers have and work from the ground up. Before even touching Perl, I am demonstrating what programming is and the importance of planning before you even write your first bit of code for a particular project. I have decided that I will have to describe such things as data objects and what a scalar really is.

(Do you know how difficult it is to describe to someone what a scalar is when they don't have anything to compare it to?) chuckle :-)

One assumption I am making here is that the reader of the book will be using WIN32 as their OS because most desktops (I hate to say) run windows. Larger audience. :-)

Now for the juicy stuff... I want to ensure that all bases are covered and would like to solicit your input about what kind of assumptions we make with respect to programming and Perl when talking about it with others.

Is there anything that others miss out on through our assumptions? How do you describe what you do (for a living) to those without any technical background?

Mick

Replies are listed 'Best First'.
Re: Perl for Non-Programmers...
by footpad (Abbot) on Feb 20, 2001 at 20:39 UTC
    I think this is a laudable goal, for there is much that can be confusing to someone with no background or a different background.

    If you're assuming a Win32 audience, I think it's important you:

    • Highlight the documentation sources most Perl programmers take for granted: man, info, perldoc, the FAQ's, etc.

    • Note the assumptions most Unix folk take for granted, such as the extensive supporting utilities. Perl was originally invented as a glue language, so demonstrate ways to glues various bits together in the Windows arena.

    • Spend time on the advantages of regular expressions, as well as providing examples of good ones in practice. How do I verify that the user entered a number, a currency value, a date value, etc?

    • Compare and contrast arrays and hashes pretty carefully, again with working examples and techniques. Show and discuss variations.

    • Introduce the main CPAN modules and provide examples of how to obtain and install modules the easy ways and the harder ways, so that those behind firewalls will have the skills needed to get their work done.

    • Spend time discussing the icky bits that confuse many Windows-based newbies, such as the cryptic symbols, map, tie, and so on.

    • And so on.

    To make this work, I would come up with a small number of real-world applications/uses and then walk through the development of each. I've found this to be a particularly effective way to develop courseware, especially if you develop things that everyone needs or can adapt to make work in their organization. Examples include a contact manager, a message-taking system, an employee location board, and so on.

    It's tough to design a good courseware, but it is possible. Remember, you need to ensure that your readers/students understand the facts you've presented in the material and have the abilitiy to assemble those facts into the solutions to their own problems.

    Finally, remember that you not only have to teach non-programmers how to write code, you also have to teach them how to solve programming problems.

    --f
Re: Perl for Non-Programmers...
by danger (Priest) on Feb 21, 2001 at 02:56 UTC

    Thanks for the recommendation davorg ... but you've inadvertently munged the title: Elements of Programming *with* Perl (the link is to the review of the book on this site).

    Having written just such a beginner's book, I'll chime in with a few words of advice:

    • Don't talk down to the reader.
    • Introduce 'strict' and '-w' very early (at the beginning even), and then always use it.
    • How we explain something in a classroom environment doesn't often translate well to the printed page -- and we tend to forget all the little extra narrative bits we may have used when we explained concept X. Test out your written material early and often. (this also means writing the book in sequence so you can have a few test students reviewing it as you go rather than waiting until it is complete).
    • Definitely emphasize the importance of planning (as you mention).
    • Try to keep the book as OS neutral as possible (make it a Perl programming book, not a Win32 or Unix or Mac specific book).
    • Get out of the house and do something active -- programming during the day and then writing into the wee hours can take a toll, and depression from just the lack of sunshine can creap up on you.
    • Don't always write in the same place, take a notebook (paper variety) to a coffee shop or pub and sketch out some of your ideas and explanations on paper. For one thing, you're out of the house and around other people, and more importantly, it seems a less formal environment than sitting in front of the computer, so your mind may be a little freer to wander around and come up with novel ideas (maybe even ideas for novels :-).
    • Above all, enjoy writing it -- writing is hard work (well, it is for me anyway) and if you don't enjoy writing it, it is unlikely that anyone will enjoy reading it.

    I wish you the best of luck, and I hope to see your book on the shelves in the future. Every new 'good' book helps prevent the unwary newcomer from wasting their time and money on one of the less than stellar ones that already over-populate the shelves.

Re: Perl for Non-Programmers...
by japhy (Canon) on Feb 20, 2001 at 20:59 UTC
    I had an idea for a book: "Learning to Speak Perl". Here's the synopsis:
    Perl can be seen as a natural language, with nouns, verbs, pronouns, idioms, objects, and (perhaps most important of all) context. Why not, then, learn Perl as if it were a spoken language? Become familiar with nouns, what they are, how they are used, and plurality. Then learn which nouns are special pronouns, and so on.

    This book is meant as a beginner's tutorial for someone who might be somewhat overwhelmed by what seems like line noise. Topics covered are: data types, references, complex data structures, functions and subroutines, modules, classes (object-oriented programming), and regular expressions.
    I started work on it at my web site.

    japhy -- Perl and Regex Hacker
Re: Perl for Non-Programmers...
by mothra (Hermit) on Feb 21, 2001 at 00:31 UTC
    Showing someone the basics of what programming is about, and trying to teach them Perl all in the same book is a pretty difficult task, but surely can be done, and done well.

    Some important things to consider (from my humble perspective anyways :):

    • Clearly define, within a practical context buzzwords like "function", "module", "variable", "scope", "array", etc, etc...there are some definitions required that will be so basic that you might have to work really hard to remember to include them. :)
    • Keep the book short! Nothing says newbie-friendly like a little book that can be read in a few nights. 200-230 pages at most.
    • With that in mind, my opinion is to forget about trying to get into explaining hardly anything at all about regex's...there is a lot of coding(in fact, most coding) done without them, especially on Win32. Also, limited, if any exposure to OO, references, and anything much more beyond simple function definitions, variable assignment, statements and expressions, basic looping and decision constructs, simple I/O, and a few nifty algorithms. As programmers talking to non-programmers we often forget what "non-programmer" really means. :)
    • As mentioned, a heavy emphasis on what other documentation is out there (and helpful forums like Perl Monks), and how to install from CPAN, etc is crucial. In fact, this was probably one of the few things I didn't like about Learning Perl, which was an otherwise amazing intro.

    With every page you write, ask yourself "could my grandmother understand this?" If the answer is yes, you're on the right track. :)

    Also, with all these points and those mentioned by others, never understimate what a great book (and certainly if it were so great that even the newbiest newbie could start to "get it") can do for a language. There are probably many people who developed an interest in Perl just because of the technical mastery displayed in books like Learning Perl, Programming Perl, and The Perl Cookbook. I did.

Re: Perl for Non-Programmers...
by arhuman (Vicar) on Feb 20, 2001 at 20:36 UTC

    I wish you good luck !

    Even to only define the 'planning before', could take a whole book.

    I remember loooong time ago I was told :
    "Use organigram(ordinogram) to build your program."
    I was then said :
    "think procedural".
    Lately the hype was :
    "everything is an object, think in terms of interaction between those objects".
    (And I don't speak about other exotic scheme : predicate,recursive solving...)

    Even for the naming convention things changed :
    The hungarian was once good, it's now bad...

    Of course everything isn't so clear,
    but the fact is that there isn't to my mind one way to code :
    There are several, each best suited for a specifical kind of problem...

    I fear that you can only teach basics things :
    loop, I/O, branching, error handling, different type of variable, pointer/reference...

    Learning how to program can only be, IMHO, a long process,
    made of experiments, other coders comments, mistakes, book reading...

    Now, please don't see it as an "It's impossible" answer,
    but rather as "give them THE BASIC and THE WILL TO LEARN"

    Anyway knowledge transfer is an interesting field,
    and I long to read here what you (perl mongers) think.
    I'd really love to see a method to learn how to programm,
      Yup!

      I only plan on giving them the basics. I feel I have to give them something with which to work. I figure that if I can provide them with a foundation on which to build, I can hopefully direct them towards some good practices - or at least away from some bad ones.

      Mick
        May you succeed to give them desire to learn, and joy of programming.
        It's the best present you could give them...
Re: Perl for Non-Programmers...
by davorg (Chancellor) on Feb 20, 2001 at 20:40 UTC

    You might like to look at danger's book Elements of Programming with Perl which already does a fine job in much the same area.

    Update: Book title corrected. you'd think I'd have titles of the form 'XXX with Perl' burned into my brain by now :)

    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me

Re: Perl for Non-Programmers...
by jynx (Priest) on Feb 21, 2001 at 06:59 UTC

    First a question,
    Assumptions we make when talking with others who we are certain know perl, or those where we aren't so certain of that fact?

    Rather quickly,
    When talking to someone who i think knows perl, having read the camel book is an assumption. i can't imagine a person being good at perl without having read it (or goodly portions of it) at least once.

    When talking to someone who i don't think knows perl, i assume that i'll have to explain things in the simplest terms possible, since they possibly don't know other programming languages as well. At this point you have to use models and similes and metaphors and anything you can get your hands on to help them wrap their mind around it. This is an active process.

    If the person is learning perl (or programming), i assume they're interested in the subject matter long enough to learn something about it. From there one must probe how much they do know so as not to bore them with simplicities already learned.

    As far as explaining what i do for a living, i just say i get paid to live in a small hole and they figure i'm a computer person of some kind ;-)

    hope that helps,
    jynx

Re: Perl for Non-Programmers...
by larsen (Parson) on Feb 22, 2001 at 16:33 UTC
    I had some didactic experience (programming basic courses for freashmen). First of all, I told the students that the choice of the programming language was an incidental fact. Not very important (we used Pascal).

    Coding was only matter of translation from meta-language (used to develop a solution) to programming language.

    It seems that using a natural language instead of another does not influence the way one thinks (I suggest reading Steven Pinker's The Language Instinct)

    I'm not so sure of that for what concerns programming languages, in particular for Perl. In programming languages do exist different paradigms: it doesn't happen in natural languages. But this is another thread.

    I was talking about my experience. My impression is that is not actually difficult to comprehend what a scalar or a vector is.

    What seem really difficult to teach are structured programming principles and techniques. By-value- and by-reference calls, scope and so on. I don't mention recursion, that seems really hard (are you including it in your book?)

    see you. larsen

      By teaching the reader how to program, I mean that I will be teaching the basics. If I ge too ambitious in what I want to show them, the book will be much too large and intimidating. mathra made an excellent point about the size of the book. I plan for it to contain ~300 pages (including examples and exercises).

      I will be demonstrating structured programming and will stress the importance of logic in programming. In fact, I have a section called "The Logic of Truth".

      I won't get into vectors or recursions. Let them learn the basics and then graduate to one of the other fine books out there for more meat.

      btw.. I found it difficult to describe (in writing) what a scalar is to a novice. I simply stuck with stating (paraphrasing) that it's the basic data type in Perl and gave some examples.

      Mick
Re: Perl for Non-Programmers...
by joee (Beadle) on Feb 22, 2001 at 20:52 UTC
    I wish you the best of luck, Mr Mick. If I could add my $0.02, (as a Perl learner with Win 2000 running,) such a book will be helpful with a chapter on how to install and use Perl on Win2000. Example: I eventually found out after installing 5.6.0 and Komodo that I could use the DOS Text editor to start my exercises. I admit my Unix and DOS skills are beyond rusty and being in an environment I haven't seen for 12 years was frustrating.

    Thank you
    puts down the chalk and walks away from the board

UPDATE: Perl for Non-Programmers...
by mrmick (Curate) on Apr 25, 2001 at 16:55 UTC
    Just to share a little about what is going on here...

    I have been busily working on this book and it is well on it's way. I am happy to say that the publishing agency has helped a lot by showing some excellent examples of learning to program books and the different styles. I am making an effort of integrating these different approaches to the problem of learning to program into something I can call my own. Once I have more completed, I will share a few exerpts with my fellow monks so that you can provide some feedback (good, bad, indifferent).

    Cheers,

    Mick

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-03-19 04:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found