Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I think that problem solving skills are more important than syntactical knowledge. A better question would be to ask them how they'd measure network traffic on a unix server. That way, you can drill down on specifics without getting hung up on syntax issues that would be found and corrected during the development process.


"If it's going to run as a one-shot, I'd run netstat using flags to isolate only the information I need and discarding the rest. I'd put a system call in a loop, use split to assign the different name-value pairs to a hash, and print them to STDOUT or to a file as CSV so we can import the data into an Excel spreadsheet or a graphing utility. If it's going to be running as a part of a standard test suite, I'd use a Unix::netstat instead of a system call to save CPU cycles. I could be wrong about the specific module name, but I'm sure that there's a module on CPAN to drive netstat. BTW, if you want to measure CPU and memory and disk i/o as well, sar is probably a better choice than netstat."

At this point, the examiner can determine that the interviewee knows something about unix and its internal monitoring tools, CPAN, hashes, the expense involved in doing repeated system calls, and how to present data. Plus, they have a bead on how to develop a quick-and-dirty tool vs. a productized tool suite. The specific syntax of netstat and split are things that can be checked once coding has begun. It's far more important to see the thought process and system experience than to nitpick over syntax. If you hire them, they'll have the Camel book on their desk anyway, so why freak out over comma placement?

"What do I want? I'm an American. I want more."

In reply to Re: A Perl aptitude test by logan
in thread A Perl aptitude test by Jonathan

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 all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (6)
    As of 2018-04-26 06:35 GMT
    Find Nodes?
      Voting Booth?