in reply to A Perl aptitude test
Example:
"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?
-Logan
"What do I want? I'm an American. I want more."
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: A Perl aptitude test
by Jenda (Abbot) on May 05, 2003 at 16:11 UTC | |
by logan (Curate) on May 05, 2003 at 17:30 UTC | |
by Jenda (Abbot) on May 06, 2003 at 12:10 UTC |