Interview questions

gav on 2004-04-08T21:39:32

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?


Been There, Did That

merlyn on 2004-04-08T22:03:45

WT column 22. Mostly done, anyway. Theory is there.

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.

Is this a pre-interview task???

neuroball on 2004-04-09T01:30:47

I sure hope so, otherwise you will be sitting around for a pretty long time during the interviewee(sp??) defines, designs, programs, and tests the perl code.

Given as a pre-interview task it allows for a good view into the coders world. You could not only see someone solving a problem but also question his/her thoughts behind certain pieces of code.

bravo
/oliver/

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 ;-).

It's reasonable

KM on 2004-04-09T15:34:42

But, since I usually interview a company as they are interviewing me, I'd ask you for use cases to the program to see if the company writes things on napkins and say "MAKE THIS WORK" or actually thinks things out.

I was once being interviewed and one of the people had a real-life problem he wanted worked out. We brainstormed on a whiteboard together. This was excellent to do. I, as the interviewee, got to see what a brainstorming session with a possible co-worker would be like, and he got to see what it would be like with me. We could see eachothers thought process, knowlege of what modules could do certain things, and various options to be a solution. That may even be more valuable to do than make them write a script before an interview. You should already have some code samples, know if they know about the CPAN, what they use for reference material, etc... But, seeing someones thought process in action, and how they may interact with teammates while designing is a good idea since you don't get that from a resume or pre-interview exercise.

Outside the box... what box?

phillup on 2004-04-09T22:56:30

Why don't you just open the site up in your HTML editor and click on the little widget that says to use absolute URL's?

;-)