We have a set of questions for new hires. I'm trying to think up a new one that would both be of a enough difficulty, see if they think to use any modules from CPAN, lead to plenty of talking points during an interview, and be relevant to the sort of things we do here.
We need a utility called fixlinks. Its job is to take an html file, convert all the links inside it to absolute ones, then save the output. It should take three command line arguments, an input filename, an output filename, and the link base.
Implement this program (in Perl).
Consider the edge cases in both determining a link and making a url absolute; create a program to test these cases.
How well does it handle html that is not technically valid, yet works in a browser?
Does this seem sensible? What would you write?
Re:Been There, Did That
gav on 2004-04-09T01:26:52
Is there anything Perlish that you haven't written about? I would give bonus marks to a interviewee that provided a url to one of your columns.
I do have a few things to nit pick about the code, but I'll save them for a day or so to see if anyone else posts an answer.
Re:Is this a pre-interview task???
gav on 2004-04-09T01:51:38
Sorry for not being clear, the questions are given before the interview. You are right, the main goal is to be able to question the applicant's thinking. It gives us something more interesting to talk about and hopefully draws the applicant out into a more prolonged conversation. How you think is more important than how well you can recite parts of "Programming Perl". For this reason I prefer questions like "what do you like least about Perl?" over "what's returned by stat?".Re:Is this a pre-interview task???
htoug on 2004-04-09T11:35:18
I'd give negative marks to someone who can answer "what's returned by stat?" without looking it up in the docs (or explaining that they had used it intensively just yesterday;-).