I have often been asked to tech interview
intermediate to advanced PHP developers. Sometimes a phone interview just isn't possible, so I have to submit an email questionnaire. As a result, I can't ask too many things which are easily looked up, and having them code a mini-project is way overkill.
I have come up with this mini-interview questionnaire. I figure anything they don't know about on it is tough enough that if they
do go look it up, it's okay because they at least now have a foundation for doing it. Did that make sense?
Anyhow, below is the questionnaire. Please
critique, comment, and help me add to it. I of course open it up to the public, so you may all freely modify/use it as desired.
If it looks too big and you don't want to read the whole thing, that's fine, just comment on the one or two things you
did look at; any feedback is better than none.
And Paul: if you want to make this a sticky or an article when it's all done, let me know
This document is in 3 sections:
1. coding
2. business practices
3. design/architecture
Section I: Coding
1. Because PHP isn't a true compiler, it is up to you to perform by hand many of the optimizations performed automatically by modern compilers. List all the ways you can think of (large or small) to optimize a php-based website, whether at the script level or system level, and explain (briefly, one line) what it optimizes.
2. What are some of the drawbacks of using references?
3. What are some reasons not to use persistent database connections? Are they on or off by default in php? How do you check this?
4. Why would you want to use your own session handling functions?
5. Where do you go for php help? List any books, websites, tools, etc. you use.
6. XML-RPC is great and all, but what are some of the problems/drawbacks with it? What are some alternatives?
Section II: Business Practices (client management)
NOTE: there are no right or wrong answers here. It's all just a matter of experience, situation and perspective.
1. The boss wants something done in a clearly impossible amount of time and just won't take no for an answer. Do you:
a) decide on your own to drop features that you know won't be done in time
b) put in all the features, but release a buggy version and just deal with it later
c) try and get help from coworkers
d) write a CYA (cover your ass) memo to your boss so that there's a paper trail
e) a combination of the above (list which)
f) something else (describe)
2. Your boss wants you to code some php in a certain way that you know isn't the best way to do it. Do you
a) just do it
b) try and talk it through with him on the whiteboard
c) do it both the right way and wrong way, then try and talk it over
d) ignore him and do it the right way
e) write a CYA (cover your ass) memo to your boss so that there's a paper trail
f) a combination of the above (list which)
f) something else (describe)
3. Your boss wants you to code something you've never done before, and you need to learn how. Besides online resources, there are a few books you need to buy, and you ask your boss if he will reimburse you for them. Your boss states firmly that he WILL NOT pay for them, no matter how much you beg. Do you
a) eat the cost and buy the books anyhow
c) screw him; it'll just take longer, be buggy, and he'll get a resounding "I told you so" when he confronts you about it.
d) quit; who wants to work for that kind of guy
e) write a CYA (cover your ass) memo to your boss so that there's a paper trail
f) a combination of the above (list which)
g) something else (describe)
4 Describe briefly the 1 worst and 1 best coding experiences you've had from a project management perspective.
Section III: Design & Architecture
NOTE: there are no right or wrong answers here. It's all just a matter of experience, situation and perspective.
1. Design patterns: do you like them or not? Why have/haven't you used particular design patterns?
2. Is MVC overkill for forms processing, or is it actually useful? Discuss some pros and cons.
3. Classes have their place, but discuss why you might not necessarily implement a site (or parts of a site) using classes.
4. Is it a good thing that php doesn't have multiple inheritance? Discuss briefly.
5. Discuss aggregation: when is being "has a" better than being "is a"?
6. Relating to question 1 above, singletons and factories: do you like them or not? Why have/haven't you used them?
END