The IWDN

Advanced Search





You are not logged in.

IWDN Forum Index > Extras > Articles > Web Design and Development >> PHP developer mini-interview questionnaire

Reply
 
Thread Tools
Old November 5th, 2004, 21:30   #1
sea otter's Avatar
sea otter
IWDN Core Team
 
Join Date: Oct 2004
Location: NYC
Posts: 1,012
PHP developer mini-interview questionnaire

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
sea otter is offline   Reply With Quote
Old November 5th, 2004, 21:36   #2
websterworld
Web Professional
 
Join Date: Oct 2004
Location: Haifa, Israel.
Posts: 383
Send a message via MSN to websterworld
Re: PHP developer mini-interview questionnaire

Quote:
Quoting sea otter:
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?
RTFM.

Honestly, PHP is extremely well documented and this is covered.
For the most part I like the questions, they make sense... however, you dont want to get too basic. (I think)

Did I help?
websterworld is offline   Reply With Quote
Old November 5th, 2004, 22:08   #3
sea otter's Avatar
sea otter
IWDN Core Team
 
Join Date: Oct 2004
Location: NYC
Posts: 1,012
Re: PHP developer mini-interview questionnaire

Quote:
Quoting websterworld:
Quote:
Quoting sea otter:
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?
RTFM.

Honestly, PHP is extremely well documented and this is covered.
For the most part I like the questions, they make sense... however, you dont want to get too basic. (I think)

Did I help?
Yes, you did. You're right, I don't want to get too basic at all. So that question is too simple? I've run into a couple of "advanced" developers who got bit by this, so I wasn't sure. I guess they weren't "advanced".

I agree that PHP is well-documented, especially the online docs with user wiki comments, which I have found invaluable (along with the bug lists and changelog). That's part of the answer I look for in the "where do you go to find stuff out" question.

Thanks for the help Any additions?
sea otter is offline   Reply With Quote
Old November 6th, 2004, 03:20   #4
sonicgroup
Web Guru
 
Join Date: Oct 2004
Posts: 596
The problem here is in your definition of advanced. There can be, for instance, 2 programmers, each with a comparable amount of experience and knowledge about PHP.

One writes lots of websites/CMS type stuff with MySQL backends. Uses databases in almost everything he does.

The other codes modules/blocks/scriptlets (whatever you wanna call 'em) and has never touched the (dbname)_functions.

Now, both would be considered advanced (assuming here equivalent experience and knowledge of the language and coding structure/styles), but in very different areas.

The CMS guy can write you a slick, smooth, optimized, and fast Db interface. The Module guy can write you all the stuff to manipulate that data in every conceivable way, in a fast, smooth manner.

Do you take points away from the Module guy because he doesn't know the database functions? Do you take points away from the CMS guy because his code for everything else isn't as tight and smooth?
sonicgroup is offline   Reply With Quote
Old November 6th, 2004, 08:03   #5
sea otter's Avatar
sea otter
IWDN Core Team
 
Join Date: Oct 2004
Location: NYC
Posts: 1,012
sonicgroup--

fair enough. To what degree did my questions assume mysql knowledge? (other than the one question that websterworld said was RTFM and too simple?)

Or, put even another way, is it fair to "assume" that an "advanced" php web developer would naturally have some level of understanding of mysql (or postgresql or mssql or sybase or oracle etc. in a php environment?

Did I skew the questions towards DB guy in any way? I thought not...
sea otter is offline   Reply With Quote
Old November 6th, 2004, 09:17   #6
BigBison's Avatar
BigBison
<span> is my friend
 
Join Date: Oct 2004
Location: Northwest Colorado
Posts: 6,029
Quote:
Quoting sea otter:
Or, put even another way, is it fair to "assume" that an "advanced" php web developer would naturally have some level of understanding of mysql (or postgresql or mssql or sybase or oracle etc. in a php environment?
I have a more thoughtful reply on the way. But first, I'd like to say for a PHP developer, wouldn't the correct answer to the above issue be PEAR?

http://pear.php.net
BigBison is offline   Reply With Quote
Old November 6th, 2004, 10:24   #7
BigBison's Avatar
BigBison
<span> is my friend
 
Join Date: Oct 2004
Location: Northwest Colorado
Posts: 6,029
Counterpoint

Grasp of the particulars of a specific language doesn't make a good coder. Grasp of programming fundamentals is what's important. The point I'm trying to make with my comparison between browser sorting and chemistry lab is that writing the code is the least of your worries. You've gotta do your homework before jumping into the coding.

I wouldn't worry so much about a coder who does everything with a mySQL database (I'm not saying I wouldn't worry...) as I would a coder who just uses stacks for everything, even when a queue is more appropriate. Convoluted, bloated and unreliable code is the inevitable result. One can make almost anything work. What does matter is the ability to write a decent algorithm.

Check out my browser-sorting code. Bear in mind it's my first significant effort at PHP, which I'm only beginning to learn. I'd be willing to bet there are professional PHP coders out there who could pass your quiz with flying colors due to their years of experience who couldn't write an elegant little script like that if their life depended on it. I, on the other hand, couldn't pass your quiz if my life depended on it.

If you followed that script's development in my original WHT thread, you'll see I changed my looping method two or three times in one or two places. How I chose to loop (using fyrstrtr's line of code in one place, tip o' the hat) made no difference to the functionality, or reliability, of the script. How I wrote the algorithm, using pen and ink and later Visio, is less important than the fact that it was documented before it was coded. Others use UML, which I'm clueless about but which sounds like a good idea.

It took me two months to write that script. It only took 3-4 days to code it. Making it conform to PHP best-practices was the final step, took less than a day, and involved having someone with more experience take a quick look, plus a bit of studying on my part to figure out how to do a few things better. I suggest solving a simple problem as opposed to a quiz, because I'll take pragmatism over theory any day.
BigBison is offline   Reply With Quote
Old November 6th, 2004, 11:04   #8
BigBison's Avatar
BigBison
<span> is my friend
 
Join Date: Oct 2004
Location: Northwest Colorado
Posts: 6,029
A good coder adapts proper methods to solve a problem. A bad coder structures a solution around a preferred method. There's got to be a simple CS 101 problem out there with a possible recursive solution. Nine out of ten applicants for your position won't see it.
BigBison is offline   Reply With Quote
Old November 6th, 2004, 12:56   #9
BigBison's Avatar
BigBison
<span> is my friend
 
Join Date: Oct 2004
Location: Northwest Colorado
Posts: 6,029
Another good idea to separate the wheat from the chaff:

A short essay quiz to ascertain knowledge of secure coding practices. Does the applicant have any clue about avoiding buffer overruns? That's a bit extreme for PHP developers, perhaps. More important to the web development issue is knowledge of cross-site scripting issues, and the need to validate input, in forms as well as URLs.

OK, 'nuff said! Here's the links:

http://irccrew.org/~cras/security/securesoftware.html
http://dovecot.org/doc/securecoding.txt

(good luck)
BigBison is offline   Reply With Quote
Old November 6th, 2004, 14:46   #10
sonicgroup
Web Guru
 
Join Date: Oct 2004
Posts: 596
I'm not saying you skewed the questions in any way; I'm merely pointing out that advanced can mean very different things depending on the project and it's scope.

As for any PHP developer, knowledge of fundamentals and resources are the top things, as BigBison said. A good PHP developer will take advantage of things like PEAR and PECL to shorten development time. The libraries provided are robust, tested, and demonstrate (for the most part) good programming practice, and the "right" way to do it.
sonicgroup is offline   Reply With Quote
Old May 18th, 2011, 05:39   #11
michaeljii
Aspiring Enthusiast
 
Join Date: May 2011
Posts: 19
This post is really the sweetest on this notable topic. I harmonize with your conclusions and will thirstily look forward to your incoming updates. Saying thanks will not just be sufficient, for the phenomenal clarity in your writing. I will directly grab your rss feed to stay informed of any updates. Admirable work and much success in your business dealings!? Please excuse my poor English as it is not my first tongue.
642-427\70-648\642-384\1z0-051\1Y0-A24\312-50\646-671\70-433
__________________
michaeljii is offline   Reply With Quote
Old October 26th, 2011, 10:44   #12
miketyson986
Newcomer
 
Join Date: May 2011
Posts: 19
I'm not saying you skewed the questions in any way; I'm merely pointing out that advanced can mean very different things depending on the project and it's scope.mcse exams / mcitp training / pmp training / a+ certification practice test / cisco ccnp / mcts practice exam / Microsoft certifications / ccie certification /
miketyson986 is offline   Reply With Quote
Old November 3rd, 2011, 07:46   #13
samstonz
Aspiring Enthusiast
 
Join Date: Aug 2011
Posts: 28
Thanks for your marvelous posting! I actually enjoyed reading it, you will be a great author.I will ensure that I bookmark your blog and will come back in the foreseeable future. I want to encourage that you continue your great job, have a nice weekend!think you’ve made some truly interesting points.women's trench coat with hood/long trench coats for women/long trench coats for men/short trench coats for women/kids leather coats/boys designer jackets/kids designer jackets/womens designer leather jackets
samstonz is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump