Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Helping Beginners

by bluto (Curate)
on Oct 30, 2001 at 06:03 UTC ( [id://122017]=note: print w/replies, xml ) Need Help??


in reply to Helping Beginners

When I first saw the Schwartzian transform it took me a while to just decipher it (ok, I'm getting old). I was writing similar code (i.e. calculating sort fields once rather than during each compare), but obviously I was using a lot of intermediate arrays & hashes. It probably ran almost as fast (and certainly fast enough for me). I didn't learn how to sort with the transform, nor how to optimize, but rather how to unhinge my brain from writing in C and think of the problem totally differently, in perl.

If I were teaching sorting to a beginner, I'd teach them how to write a compare function. The first one would probably just (inefficiently) parse each line each time it was compared. After that I'd piecemeal a transform using intermediate arrays. Then if they could grok that I'd finally present the transform in it's simplest form (i.e. each element would look somethine like

[ $sortable_date, $original_string ]
In certain limited forums I think "baby Perl" is ok. Books, tutorials, college classes are all appropriate for this. Past that they should be expected to use the available resources (or be pointed to them). It just amazes me that folks actually interview for jobs that they would be, not just slightly, but totally incompetent in. These people just don't have the "right stuff". The "right stuff" here isn't knowing perl or being a programming guru. It's the drive that pushes you to learn about it, and the mental ability to actually be able to apply some of it from time to time.

bluto

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-18 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found