Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

There are three things you really want to check for. You want to check that they understand context, references, and the CPAN. A good Perl coder really needs to understand these three things. There are other things that are useful (objects, closures, map and grep, certain specific modules, and so on), but these three things are really key, IMO. (Plus, you can only test so much in a screening, and if they've already learned this stuff they'll be able to pick up whatever other stuff you require.)

References are easy to test for. Hand them something like a sub that returns a hash reference wherein each value is an arrayref, and ask them to write code that calls the sub, takes what it returns, and does something with the value for a certain key. A simple example will do ...

sub newpoint { return [rand($maxx), rand($maxy)] } sub newcircle { return { center => newpoint(), radius => rand($maxradius), } }

You might ask them to call newcircle twice and compare the results to determine which circle is centered closer to [0,0] or somesuch. If they have trouble with the dereferencing syntax, you know you have a problem. If they breeze through the thing, or even if they only breeze through the dereferencing and spend most of the time remembering from high school geometry class how to calculate the distance between two points, then they understand Perl's references well enough to pass.

Testing their knowledge of context is at least as important, if a bit trickier. You'll probably want a series of three or four questions. Don't warn them that the questions are about context, just ask, "What does this code do?", but construct the examples so that if they don't understand context they'll get it wrong. Approach it several different ways, evaluationg different things in different contexts. For example, maybe print <FILEHANDLE>, "\n"; for one question, for another something like print "Some stuff " . @foo . " more stuff.\n" and so on.

For CPAN, give them a web browser and say something along the lines of, "Find me a Perl module for working with MARC records", or something equally obscure that you've checked in advance does exist on the CPAN but is not a module they're likely to have used in the past. If they go straight to, find it in notime flat, and start reading the documentation on how to use it, you have a winner. If they do a Google search and end up on (or wherever), give them a shell prompt and say, "okay, install it", and you can probably pass them if they fire up CPAN at that point.

And yes, the ability to read your site's existing bad Perl code is at least as important as being able to develop new code well, so don't do away with that part of your test.

Alternately, if you can detain them for several hours, you could combine the two parts of the test by handing them a few hundred lines of bad code and saying, "refactor this". But I prefer the other approach.

;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print

In reply to Re: How to measure Perl skills? by jonadab
in thread How to measure Perl skills? by optimist

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

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and snow settles gently...

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (8)
    As of 2018-06-21 18:57 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (118 votes). Check out past polls.