PHP coders

I get e-mails often of companies looking to hire me or find a hot-shot front-end Ajax-style PHP coder. It’s very difficult to help and I don’t know who to recommend.

My policy is to cast a wide net and then grill the people in interviews until they break in order to see where their real knowledge is. Others can’t be so luxurious because they’re not me. Anyone who can string a web page together with MySQL can (and often does) call themselves a “front-end PHP coder.” The variance in quality is very high, so high that I often recommend a good solid C programmer over a PHP one, because the former can learn PHP if need be.

The problem here is this doesn’t work well for a front-end UI developer because the web is a tricky business.

Ben mentions a different problem. What should the going rate of such a person be?

The rate conundrum

I agree with the general gist of the article. In theory the rate should be comparable with a comparable Java front-end coder, probably quite a bit higher since a Java programmer belongs to a company and receives benefits but we’re talking freelance work here.

I’m not sure what that rate is myself.

The problem here is for PHP programmers to be able to demand this rate, there needs to be a better system of separating the wheat from the chaff as I mentioned above.

In the PHP world there is no “signal” for qualification. The closest thing we have is Zend Certification. And how good is that? I never bothered to take the test and have no need. Nor does it test what is currently the largest need in the industry: PHP coders who understand Ajax. The result is that the supply of PHP coders seems extremely high when the reality that the supply of good coders is actually quite low.

Demand on the other hand is decent but lower. PHP engineers get their shit done using much less programming resources than other ones because the language mentality causes them to glue stuff together from existing resources. For instance it’s not “PHP” per-se, it’s “Linux Apache MySQL PHP” and a host of any tools and resources: want to scale that session? we consume memcached instead of rolling our own in PHP. And how is any certification going to catch that approach?

Large apparent supply, medium demand mean lower prices. That’s life, learn to live with it. The first time I went to OSCON, I saw about 90% of the Java developers had Apple Powerbooks; Only about 10% of the attendees at the PHP talks had Powerbooks and maybe the same number had iBooks. Over time, the latter has increased, but it is nowhere close to parity.

Want more money as a developer? Code Java for “enterprise” (clearly the “final frontier” of making a market where none should exist).

Tickling the price-fixing dragon

The only problem I had with Ben’s article was that he recommended actual rates. I don’t think it is proper that we mention actual suggested rates in a post generally read by PHP programmers on “what to charge”—it smacks of collusion/trusts.

It’s technically alright because Ben’s blog isn’t a professional organization, but it still bothers me when professional organizations flirt dangerously with pricing fixing. If the idea has traction, it has a tendency to snowball into something that is clearly illegal. (Don’t believe me? What do you think the main purpose is of WEVA?)

Winnowing the chaff

What follows are some technical criteria to consider when interviewing candidates for PHP front-end positions. Note this does not consider non-technical areas like culture fit, enthusiasm, and initiative. Nor even more difficult to measure things like design skills, UI, and usability.

I hope this helps some of you find the right PHP engineer. Any suggestions and comments are appreciated. Please realize that I don’t expect the candidate to “ace” everything here (in some cases the questions are not actually questions; in others there are no right answers). I hope these questions does cast light into some deep recesses of what it takes to be a skilled PHP/Ajax engineeer. Think Napoleon Dynamite here. You want see if your front-end engineer has how much of the useful skills. You know like: “numchuck skills, bow-hunting skills, computer hacking skills…”

”…PHP coding skills…”

This is something a Zend Certification might show. The thing you want to test beyond that is practical knowledge. Questions like these might probe some of that.

Can they show where PHP 4’s object/reference model breaks down? Can they explain how PHP 5 fixes this? Can they explain what “safe_mode” is? Can they code defensively around a “magic_quotes_gpc=on”? Can they write the code to execute a simple shell command from PHP and do something with the output?

Can they explain what a “PHP extension” is? Do they know how to compile one or where to get one? Can they recommend a library or extension to solve the following problems: web scraping, image manipulation, etc? Can they explain how PHP’s Zend Engine works (just the basic process)? Can they explain what a code caching extension does (like Zend Engine, APC, or Turck-MMCache)?

Do they know what PEAR is? Can they say how you would install a PEAR library? Can they tell you how PEAR’s error system works?

How would they prevent SQL injection? How would they create a single security audit point for such attacks? Can they articulate what “filter-input, escape-output” means? Can they evaluate “magic quotes” as it relates to that? Can they explain an example of session fixation or the dangers of not properly filtering out script or css?

Can they show a process by which one would i18n a PHP application? Can they give some examples of interesting PHP quirks they’ve run across in their last project?

“…Object Oriented Programming skills…”

You want someone who can program Oo with the best of them but not someone entrenched in the idea of Oo that they lose flexibility. Here are some examples:

Can they explain HTML templating as Model-View-Controller? Can they explain how it is not Model-View-Controller?

Can they explain the principles of package reuse? Can they explain the strengths of a framework/weakness of it? Can they explain Ruby on Rails in that light? Can they explain why there is little to no adoption of a “PHP on Rails”?

Can they explain what a programming pattern is? Can they explain what “consequences” are? Can they give an example of some “consequences” of patterns they’ve used?

“…HTML/CSS coding skills…”

Basically you want someone who is well-versed in HTML and CSS coding, but isn’t afraid to look up the parts that they don’t know nor is so brainwashed by “A List Apart” kool-aid that they spin wheels forever when a simpler, uglier solution might do.

Can they mention some browser rendering quirks? Can they explain what the box model is and how it differs in IE? Can they give an example of a way to get CSS code to be read in one browser but not the other (without using server-side switching)?

Can they explain the difference between logical and presentational markup? Can they show how you might code a sliding doors or other div-based rounded rect? Can they code a linked list markup that renders as an inline list or menu?

“…practical Ajax skills…”

How good is their javascript is the question you need to answer. They can bomb some of the specifics of Ajax implementation because there are libraries that handle it, but it makes a good model of general solutions on their programming abilities. Especially when Javascript is not coded like PHP?

Do they know the JSON syntax? Can they code with anonymous/alpha functions? Do they know what a closure is? Can they make a generic onload handler? Can they mention some Javascript browser-quirks that they’ve run across?

Do they know the acronym of Ajax? Can they explain the meaning of each word in the acronym (besides the second A)? Can they explain the marshaling and asynchronous issues involved with Ajax?

Can they code using Remote Scripting via iframes or explain how it could be done? Can they articulate the pros/cons of ti? Can someone build an XMLHTTPRequest instantiation? Can they give examples of differing browser support/considerations at it relates to XMLHTTPRequest? Can the explain the readyState system and the callback system of XMLHTTPRequest?

Do they understand what DOM scripting is? Can they make up a DOM scripting example? Can they explain how one might implement an i18n solution when some of the data is in Javascript?

Can they articulate their favorite Ajax framework and how it works? Can they explain its weakness vis-a-vis some other framework or rolling your own?

“…abstract thinking skills…”

Basically can they think at a high level. This isn’t necessary but it certainly helps if you want to trust that this person can do things with minimal guidance.

Can they show areas where you may end up with race conditions in PHP? Can the explain how to guard against it? Can they explain how PHP is a HTML templating language itself?

Can they explain Ajax as a “design pattern”? Can they give the advantages/disavantages of Ajax vs. Flash-based sites?

Can they explain what XML is? Can they explain when to use and when to avoid XML as a transport especially in regards to client-side javascript?

“…creativity/flexibility”

The hallmark of PHP is the self-deprecating nature of the language. If they can’t look for solutions outside the “PHP box”, you might as well code the thing in JSP, ASP.NET, or C. Finding the right level of solution for the problem saves a lot of hiring overhead down the road.

Can they express what are the pros/cons of a HTML templating system and when to use or avoid it? Can they explain the practical reasons to use HTML templating?

Can they show they’d use a library to solve a programming problem? Do they know how to use the Error Document to do lazy caching?

Can they explain why CSS took so long to catch on? Can they give examples of weaknesses/pitfalls of using divs to replace tables as non-logical markup?

Can they explain when they would use/avoid the following payloads: delimited format, JSON, XML. Can they explain when they would use/avoid the following RPC patterns: REST, XMLRPC, SOAP?

23 thoughts on “PHP coders”

  1. Excellent post, Terry. This provides great insight into what a potential employer is/should be looking for in a front-end PHP coder today. While I’m not looking for a job right now, I think I’ll use this as a reference to brush up on my skills and keep my mind sharp. :-)

  2. Being a good interviewer is quite an art. I’ve often enjoyed being asked to break interviewees, since it really does tell you a lot (and is fun.) The above types of questions and what not are very interesting, but do not consitute the optimal approach. It is too based on knowledge testing. Knowledge testing is of limited value with programmers. The pool of potential knowledge out there is huge and ever expanding. Further, it is trivial to find this knowledge. A reasonably intelligent and experienced programmer cannot only find the knowledge quickly, but can usually make use of it very quickly as well. Many of the above questions could be answered simply be regurgatating the Wikipedia entry on the topic.

    Some of the best programmers I’ve worked with would do terrible on these kind of questions. However, I’ve known some very marginal programmers who would do quite well. It’s like finding out if the interviewee would be good at Trivial Pursuit…

    Testing analytic skills is much more telling. Give them “real world” problems (i.e. concrete problems) and see what kind of solutions they come up. This can also indicate knowledge of algorithms, data structures, etc. See how they react with and without time pressures. See how well they communicate ideas and concepts. These are all better indicators of the potential value the interviewee can add.

  3. I think I understand where you are coming from with your approach and it is a very valuable point. However, this was not meant to be an article about how to interview programmers in a general sense, this is an article about dealing with the variance of all the people who list “PHP” “Ajax” and “Web Standards” on their resume. I already mentioned that, in general, I prefer a skilled C/C++ coder who may be weak in PHP syntax to a pure PHP coder who is weak in algorithms and problem solving at. The assumption is that they’ve either passed that bar earlier, or you are evaluating them on that later.

    Indeed, in the general hiring processing, Plaxo tests all the engineers in abstract thinking (a la lame Microsoft-esque logic puzzles that I can now answer in my sleep because I’ve already jumped through that hoop like a trained dog) as well as simple algorithms that are so simple it’d be the first time approaching them. The idea in the latter case, by testing the obvious but unconsidered, is to look at the process by which they are answered (not the answers themselves) to get an idea of how they think and solve problems.

    Finally, if all the lights are green, we bring them in for a simulation in order to solve a real world problem that we’ve run across and solved ourselves. The weakness we run into in simulations is that they take a lot of investment of time to create, run and evaluate—it’s not going to be the option of first resort.

    I understand that these particular questions can be frustrating if you have never made a front-end, customer-facing website. But I was assuming the job description was web front-end developer who codes in PHP and now claims to have built highly dynamic Ajax-style sites. Even if you have made them, they’re still designed to be frustrating because they’re based on a lot of wasted brain cycles particular to problems I have run across.

    I hope that is a civil answer, so you can stop reading now.

    Since the egotism in your comment borders on indecent, I’m going to proceed to be uncivil…

    This shit is spoken like an enterprise Java programmer who doesn’t know what it takes to make front-end websites. Besides, you’re a mathematician who loved things like the Putnams so you would ace exactly these sort of lame-ass problems you suggest. I would too. In fact, if memory serves I was actually quite a bit better than you at the pure logic problems.

    I also find your claim about this being just “knowledge testing” and a matter of “trivial pursuit” or reciting Wikipedia offensive. Because of this, I’ll resort to the Mark Jen defense:

    You’re telling me someone who has coded real-world CSS in any capacity has got to resort to looking up what the box model is? You’re telling me a supposed Javascript expert doesn’t know what a closure is or has never used a alpha function or JSON-style syntax? You’re telling me that a supposed PHP developer who knows OO can’t tell you at least one story about how they were up until 3AM because they dropped an “&” in PHP4? That they’ve build a customer-facing site and can’t give you one example off the top of their head of SQL injection or how to protect against it?

    These are like asking a C coder to do atoi() or strstr().

    I’m asking them to give their own words for what a programming pattern is (my own definition is quite famous) and then testing on whether they know it in the rote sense or they actually have but half a thought into it. It’s not like I’m asking them what the decorator pattern is and then saying, “You don’t know? Fuck off.”

    You’re telling me I can look up in wikipedia the consequences (in the design pattern sense) of using XML vs. JSON as a payload? That using wikipedia as a reference on templating won’t give me the completely wrong answer? That everyone agrees to (or has even thought of) why CSS took so long to catch on? I know a great many people who probably read my question on “PHP on Rails” and believe that not only can PHP do Rails-style “convention over configuration,” it should. They can even hold their own in an argument with me about it!

    “Trivial pursuit,” my ass. I’m not expecting there is a right answer here. Often there are none. I do expect that people who claim to be an expert in this field either have a personal answer or can formulate at one.

    Have they claimed to work in a large web-based company where many people have skills that are beyond their ken? Then how could they not name some pros of templating?

    Have they claimed to work on a g11n website? Then how could they not explain how to implement i18n works? How could they not instantly tell you the difference, in their own words betwen i18n and l10n?

    Have they claimed to have built a site that survived heavy loads? How would they not know one place where PHP might race for the same resources? How can they not explain how they solved it?

    Have they claimed to use PEAR? Given that there are only two framework objects in the entire library, correctly explaining how it handles an error condition actually shows me they aren’t bullshitting.

    I don’t expect perfection. Truth be told, I would have trouble with questions similar enough to these. But before you go off spouting out bullshit about “knowledge testing” and what a fucking great interviewer you are, maybe you need to consider that others might be just as good at hiring competent engineers as you and are a hell of a lot better at their own specialty then you think you might be at theirs.

    Personally I’m not the best interviewer in the world, in fact, I ask that Plaxo not use me as an interviewer unless they need me. I have probably given bad evaluations for some very good engineers. I have erred and never claimed to be complete with this list. However, I have been proud of every candidate that I have helped to hire at the last four companies I’ve been at (mostly through the great fortune of having some very good people work with or for me). As criteria go, that’s about as high a bar that can be set by us less-than-omniscent, never-perfect human beings.

  4. International PHP Magazine blogs it. I love this magazine!

    Rereading their summary of my post, it sounds like I’m all negative about Zend Certification. I did not mean to be the case at all. My point is that something like Zend Certification may be a valid signal of a certain level of PHP programming competence. The problem is that it is neither necessary (because people like me don’t bother getting certified) nor sufficient (because it doesn’t test LAMP/sysadmin issues, software architecture, or the triumverate of web development: HTML, CSS, and Javascript). I apologize for being not clear, because I, no doubt, offended a whole lot of people with my offhand remark.

  5. Wow, have I got a lot to learn. I thought I knew a few things about PHP coding. After reading this post, I realize I know barely more than my grandmother. But, I guess I now have some indication of what I have to learn. Thanks!

  6. First a disclaimer: I work with Terry @ Plaxo.

    I think the list of qualifications presented is incredibly complete. I would guess that a competent “front-end PHP programmer” would be able to answer most of these, but I doubt that most candidates could answer all of them. Some are more important than others, and some need to be more ingrained in a programmer’s way of doing things than others.

    The statement I most agree with in this treatise is “They can bomb some of the specifics of [...] implementation because there are libraries that handle it, but it makes a good model of general solutions on their programming abilities.” When interviewing with a few different companies recently, this bugged me the most about their process. I was asked to write up an example, on a whiteboard, of some algorithm or another. It was fairly trivial, sorting elements in an array or something similar. The problem was that they were looking for perfect syntax as well as an acceptable answer. Making sure every ; and . was in place was harder than solving the problem! Everywhere I’ve worked I have programmed iteratively, writing code and trying it out. I can go through 10 iterations in 3 minutes if necessary to iron out any missing parens or whatnot, versus taking 10 minutes or more to get it perfect to start with, and that’s not even guaranteed.

    Protecting against SQL injection and other deal-breakers should absolutely be required.
    Any programmer who has not dealt with something like this is going to be very surprised at how easy it is to screw it up. This needs to be ingrained in their methods and thinking at the deepest level possible. Conversely, knowing what a closure is within JavaScript may be useful in some situations, but it’s not vital, and can be learned quickly.

    The best way to interview a candidate is to make sure they have the basic “skills’ you’re looking for, make sure they’re good at problem solving, and make sure they know where to find the answers to what they don’t know. The first is simply to be able to hit the ground running. If someone has to learn PHP from scratch, that’s not going to help get your project done. Problem solving is why you hire a programmer versus a coder, if it’s just “make this happen” anyone can do it, but someone who can problem solve will make it happen bigger, better, faster, more. Finding what they don’t know may be the most important quality to have, since everyone I’ve met _doesn’t_ know a lot more than they _do_ know. Finally, take a look at what someone has done. I think the sentiments about “what’s the most annoying quirk of …?” are sometimes the most informative, simply because they show you how this candidate thinks, and you can probably identify with them on something that bugs you too.

  7. I won’t take your ad homenims personally. Instead I’ll take them as a compliment, as usual, indicating the arguments struck a nerve and yet you were unable to muster a logical counter-argument. I’ll also humor you on your claim about being better at “pure logic” than me :-)

    You make many claims as to why your questions are valid, such as “someone who has coded real-world CSS,” “a supposed Javascript expert,” “work in a large web-based company,” and “built a site that survived heavy loads.” All of these statements make a presumption about what’s on a person’s resume. I made no such assumptions.

    Perhaps this is the fundamental difference. If I needed to hire someone to do complex front end work, I wouldn’t have a set of skills in mind already. Now if I was just hiring them as a contractor for a short term project, then obviously I would indeed have a skill set in mind. But if I was hiring them for my company, then specific skill sets are a waste of time in my opinion. And if you do not presume that somebody claims to have a certain set of skills, and certain kinds of experience, then your questions really are a game of trivial pursuit. If you presume certain skills and types of experience, then obviously some of the questions become much more relevant.

    I am not claiming to be a good interviewer at all. I only said that I had been looked to as the “go break them” person in my places I worked. That doesn’t make me a good interviewer, it just means that I know how to ask hard questions and I know a lot of crap. I’m pretty good at trivial pursuit, though you would certainly crush me Terry! Now chess is a different story…

    I’ve hired a good number of people in my career. Some of them have been very good, and some of them have been failures. I’ve hired people to do web development who had done little or no web development previously. Take a look at http://www.washingtonpost.com/jobs. Now it’s not a snazzy AJAX site (my team did this back in 2003, though I know that was after “you invented” AJAX), but it has some powerful functionality and handles tremendous load. There were two web developers who worked on it. I hired one of them and cherry-picked another from a different division (games) in my company. Neither had any web development experience prior to working for me. Both did a great job and have done a lot of succesful web development projects since then.

    My point is that if you didn’t hire a good programmer just because they didn’t know squat about JSON or Rails or then I think you are making a big mistake — even if they need to know this technology to do the job you need them to do. Now if they claim to know said technology and don’t really, then obviously that’s a different kind of problem.

  8. @rmoore: I hope that my grilling was actually enjoyable, instead of the “trivial pursuit-style knowledge testing that you could answer by regurgitating the wikipedia definition” that Michael shows me it obviously was.

    Ryan is one of the people I’m really proud of interviewing. He’s just the sort of person to come up with a set of questions similar to mine that I’d not be able to answer.

    @Jason: Remember this is only representative of the sorts of questions that can test front-end PHP coding skill. Another person would have slightly different questions of the same sort that would be difficult for me to answer. But I think that finding or being able to formulate your own answer to these questions can hint at deep problem solving skills in front-end coding.

    Perhaps I should actually give my own versions of the answers to my own questions in future articles. But here is the basic idea (to take one case):

    You would have had to learn Javascript closures if you ever had multiple asynchronous XMLHttpRequests “in the wire” at the same time. Something, I believe, that any highly dynamic website is going to have to have solved. Closures allow a “callback-system” (as opposed to a multi-process system with signals or a multi-threaded system) to handle variable passing. Given that callbacks are so common in Javascript (setTimeout(), for instance), you can see how closures would be important.

    Thinking further, you’d see that PHP can’t support closures (making it an important question to ask a PHP developer—it is not something you’d immediately have in your toolbox, but for a Javascript developer it would be). Then thinking more abstractly you’d discover how PHP gets around this language deficiency. That workaround is the key to solving many PHP problems with Ooo, something you might have run across in either coding or using a PEAR library. Reading that solution brings you to the concept of anonymous functions and this may bring you back to its use + recursion in Javascript to solve a great many problems, including how DOM scripting.

    That’s just one path that tours a lot of important programmatic concepts in PHP and Javascript. Someone else would take it differently, see it differently, and maybe have some differing views about the relative merits. But I don’t think a single person who has ever had to build a front end Ajax site in PHP would think that the general concepts (while not the exact verbiage) of alpha functions, closures, and callbacks aren’t important tools to have for an Ajax PHP coder.

    @Michael: Hey, if the ad hominem fits…

    The logic puzzle statement comes having to have wasted two hours convincing you that a solution existed to the twelve coins problem. I’m quite bad at Trivial Pursuit, but some people might not recognize the difference between my ability to remember details but not numbers and names. And the reason why you and others won’t play me in chess now is that you are afraid of losing. Which speaks more about your need to win than it does about my chess ability.

    You make an assumption on what is on their resume the instant you post an egotistical comment to this blog entry which specifically mentions many times “front-end PHP developer with Ajax experience.”

    Yes, I must have claimed to have “invented Ajax” before 2003. That’s why my talk has Jesse James Garret’s original 2005 coining of the term as well as references to the 1999 version of Outlook Web Access, when the concepts of Ajax were invented, the 2000 articles on MSDN when the XMLHttpRequest was first shown to allow dynamic loading of content, and the 2002 article on Apple’s website which popularized the concept of “Remote Scripting”, and the 2003 copy of OWA by Oddpost. All of these things went into seeing how the 2004 release of GMail would flow naturally from this.

    Your Washington DC jobs page must “handle tremendous load” because the page took about 20 seconds to render a static content homepage in Safari. I invite other PHP developers to visit the link you provide and draw their one conclusions.

  9. Audienceone summarizes the discussion.

    The excerpt his the point right on the head. The questions are supposed to serve as a guide for figuring who is wheat and who is chaff if the person is a front-end PHP developer with Ajax experience. How they formulate their answers shows their sort of thinking and experience. Because software is built by a team of people, the resume by itself cannot reveal this.

  10. This had let me know that i still needs to learn lot of things and specifically programming never approaches to end, no matter how much you have learn. it always keep going deeper and deeper.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>