Beefy Boxes and Bandwidth Generously Provided by pair Networks kudra
Think about Loose Coupling
 
PerlMonks  

Re (tilly) 1: Offering a helping hand

by tilly (Archbishop)
on Aug 02, 2001 at 16:14 UTC ( [id://101698]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Offering a helping hand

Focus on finding something useful you can have him do early. If he isn't used to jumping in with both feet, it may have to be something small. Personally the first useful thing that I wrote was a simple program that just waited in an infinite loop on STDIN, every time you typed something in it would use the Win32::Clipboard module to read the clipboard into $_, it would do something, then it would paste $_ back into the clipboard. (Hint: you will probably want to turn \r\n into \n on the way in, and vice-versa on the way out.)

The code was a complete mess. The program was dead simple in concept. The kinds of activities that it allowed were copying the clipboard to a named buffer (internally a hash), pasting back out, executing a buffer directly against the clipboard, prepending a string (eg "> ") to the beginning or end of each line, stripping off characters from each line, running the typed in code (eg a substitution) directly. That kind of thing.

However it was something I understood and could use. The simple ability to use Perl to do mass edits to VB source-code gave me lots of flexibility that is old hat to anyone who uses emacs but was new to someone using VB. Trying to do mass edits gave me lots of opportunities to learn regular expressions. And all told that little piece of code, despite its faults, is the single program that I have written for myself that I have used the most. Copy text to clipboard, manipulate, and paste back. Comment out this block. Uncomment it. Take a list of items, turn it into the HTML for a dropdown box. And so on.

I am not saying that this is the project you should give this person. But if you want him to learn Perl, it is good to find some way of making sure that that he uses it and continues to use it for a period of time. And the above piece of silliness worked for me when I was a rank beginner.

Replies are listed 'Best First'.
Re: Re (tilly) 1: Offering a helping hand
by stefan k (Curate) on Aug 02, 2001 at 16:22 UTC
    Personally the first useful thing that I wrote was a simple program that just ... The code was a complete mess. That reminds me of something .... uhm ... It was my third post at the monks and my first programm: crush_data
    ... plus the first _hard_ lesson in TIMTOWTDI: merlyn showed the one-liner *grin*
    Those were the days...

    Regards... Stefan

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://101698]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.