Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: LifeinAsia
There is something like this in PHP? Do you know some code or trick that every PHP programmer should know and shows me if he/she(1) is really working with this languaje?
Thanks in advance.
(1) It's the first time I receive a résumé of a woman for a technical job; things are changing.
[edited by: Lexur at 12:55 pm (utc) on Jan. 17, 2007]
You could ask him/her something basic-security-related like
"would you validate some GET/POST variables before using them, or better not?".
Any answer other than a prompt "Of course I would! And of course every variable!" should raise a red flag.
If they're going to be working with a database, make sure they know how to do stuff such as joining two tables (I have personally had it explained to me by one of the above how this is done, namely using loops and arrays...), and maybe ask them to explain what an index is and how it is useful.
If they can give you a logical solution (or at least a logical approach to how to go about solving the problem), this will be an indication of a good programmer.
Or ask how them about their past experience- have them describe a problem they had to solve and how they went about solving it.
Seriously though, if you gauge someone's HTML skills in this fashion
If I needed a HTML programmer the question could be, i.e., "What label closes a paragraph?" (</p>) or "How do you break an image alignment into a paragraph?" (<br clear="all">).
The interviewee's impression is that they will be able to pull the wool over your eyes just about any time they like. You're likely to make the same mistakes in interviewing a programmer - you are querying someone on a topic you know little about.
LifeInAsia's approach is the one I would go with, structure your query around the tasks you need done and ask to see previous samples in action. Some important items to bring up in the interview:
- Does the code output from your programs produce valid html (does it pass a validator?)
- Can your programs output semantically correct HTML (table layout or can you output CSS-dependent tableless layout?)
- What do your programs do to insure security? There are really two levels to this question, one is how input to the forms on the web is managed, as in references to web form abuse and what is done to limit it, and the other is security on the server side. What is done to encrypt sensitive data and prevent attacks on the server via your programs?
A good approach to the second half of this question is to ask what the programmer would do if you choose to retain credit card information input by customers. How they respond and structure their approach to this issue is going to tell you a **lot** about their programming abilities.
- The last test I would do before taking a programmer under contract is to assign them a small task (and do not be cheap, pay them for their time.) Have them program the task, then if it performs the task to your satisfaction, have someone review the methods used (as mentioned, you won't know what you are looking at.)
1) Do you follow and coding conventions or coding standards? What ones?
Answer: Even if they aren't following a 'recognised' standard, they should at least be able to answer the question to the extent of: "Well, I use camel case for all functions, my variables are prepended by str, int or bool. I prefer to place my opening cury bracket for functions and if statements on a new line because I find it easier to pair up the matching closing bracket." That's the kind of thing you want to hear. If they follow a formalised coding standard so much the better and that's generally a *very* good sign but even a self taught programmer needs to know what standards they follow in their own work in order to work with others.
2) Do you have experience working within frameworks?
Answer: Personally, I think frameworks are going to be what allows PHP to stop being duct tape and start being something that people consider a fine tool for doing delicate and intricate and difficult work. My personal favourite is Code Igniter but there are quite a few others out there, do some research and hope that your interviewee at the very least knows some names to throw about.
3) Have another programmer write a short piece of poorly written code and have your interviewee rewrite it.
Answer: This one's pretty self explanitory, even if they don't catch all the bugs in the first iteration you should be able to get a sense of what they're like reading other people's work and finding and fixing problems.
Most of you probably could ask those questions and detect the right or wrong answer but I have no idea about PHP (well... I've read some online tutorials) and I feel myself insecure.
I know a good programmer who's working for a big company and maybe I should hire him for a few hours in the evening to do the interviews. That's what I will do.
Simply describe the task that you need done (or, A task that you need done) to the prospective programmer. Do not ask them to solve it. Just tell them what you do, what your website is about, and what you need to yet accomplish. This should be a part of any interview, anyway.
See if they dig in and start asking questions and solving the problem and making suggestions or porposing solutions right then and there. If so, and there is a give-and-take in their questions (i.e. they aren't so sure of their solution that they won't modify it) then hire them. Ideally, YOU will come out of the interview understanding your problem better than you did at the start, and certainly knowing better what you don't know and need to nail-down.
If they get flustered and wonder why your lips stopped moving, don't hire them.
The key here is to not ask them what they think or ask them to solve the problem.
Since you are hiring *a* programmer, you need somebody who can take charge of the problem and doesn't have to be told exactly what to do.
This also works the other way. The best way to be hired as a programmer is to ignore everything else in the interview (or give polite responses if necessary) and find out what the company needs. Then start solving it in the interview.
Don't get insulted if they hijack the interview. You WANT them to hijack the interview. Better than the guy (gal) that just sits there waiting for you to ask the next dumb trick question.
There's also a lot to be said for using an agency. (Particularly for temporary work.) Agencies use the same people repeatedly and know their capabilities. They also can look at a resume and know a lot about the prospect simply from where they have been and for how long. They will be familiar with specific projects the person has worked on. Over the years, they ask programmers what they think of other programmers they have worked with. Agencies know a lot more than you do about prospective hires.
Academics are taught to define and answer questions exactly like this in 100 lines or less.
As any experienced programmer will tell you, that all falls apart when you are given a 100-KLOC program of someone else's code.
Many designs that cleave to academic ideals can't scale for squat. You need someone who can deal with chaotic systems and can scale to meet the needs at hand.
Fortunately, the Web is a very public place. We have track records out there for all to see. Ask them to show you some sites they've done. Ask them to tell you stories about difficult tasks, and how they solved them. A good programmer, even if they have lousy people skills (which many do), will usually wax eloquent.
I run a software development shop in my day job, and I have interviewed many programmers for some intense positions. I'm a very good engineer myself, so that helps. I have made good decisions, and bad decisions.
Just my $0.02.