Top 10 challenges to pose when interviewing a PHP web developer

First off, that your company was wise enough to stay with open-source and go PHP is a compliment to you and your leaders’ foresight.  You have that going for you, at least!  If your company is looking for an open-source web developer, chances are you need someone who knows PHP, MySQL, HTML, CSS and Javascript/JQuery.  At a minimum.  If you are the “techiest” tech person from your company who was tasked to find someone “because we need to bring web development in house”, but you don’t know where to start, then this articles is for you.

Do you need some impartial advice?

If you are very technically proficient in PHP, perhaps you don’t need any advice.  You know what you’re looking for, but it’s always smart to seek others’ opinions.  After all, how’s the rest of the world doing things?  Knowing this will help you understand what kind of candidates are out there, but not only that, you are protecting your company in the future because you don’t want to build your information systems, websites, internal and external software and get cornered because you didn’t leverage the “open” in “open source”.  You would be beholden like some companies that were Johnny-come-latelies the last wave of a programming language and still have COBOL programmers on staff.

It is your duty to future proof your code and web assets

About 8 years ago, the PHP community figured it was time to grow up so the movement towards “object oriented programming” (OOP) started in earnest.  I can tell you that if you write PHP scripts so everything belongs in one .php file, you are not qualified to think you know as much as you do about PHP to interview and hire a PHP developer.  If you think including a few “include” files is a great way to organize your code, you blinked and 10 years have passed.  Seriously.  Go to this primer to get off the “Spaghetti Code Diet”:  http://codebetter.com/raymondlewallen/2005/07/19/4-major-principles-of-object-oriented-programming/

If the web’s important, a team development environment is key to your future

First off, if a developer leaves your company, you don’t have to worry, everyone on your team is involved with each project because they can be if you design your development environment around MVC and OOP.  If you plan on being bigger and relying more on your information systems and websites, you best modularize your code.  This way, your team can divvy up projects and work together without overwriting code.  Many benefits and compounding savings from reusing code more efficiently along with designing your code around a collaborative environment will save you a lot in time and will benefit you in a compounding level of quality code production.  Think of the “smart grid” but in terms of your websites.  If you are a big enough company with multiple developers, OOP and MVC is the only approach that makes sense.  Not to mention your need for a code versioning repository like Git Hub or an SVN server solution from Collabnet or the likes.  It’s imperative you foster a team environment where your developers can collaborate and not stumble over themselves in frustrating futility.  It’s like asking them to write code in a pool of water, it just doesn’t make sense.

With the right environment, multiple developers can work on the same project, and since it’s all modularized by design, one can work on the front-end form, the other the data handler all without colliding with each other.  “Here’s the class with the parameters, I provided a sample of the methods,” one developer can say to the other and take what the other developer wrote and inject it into where they needed to utilize their object just like plug and play.  It really is “plug and play” code.  This is what you need and your company should want.  But what happens if you’ve read up to this point and all you have are more questions?!  Contact me, I’m not cheap, but my advice could save you millions and help make you even more.

It is your duty to future-proof your company, even if you don’t know how

If it is your job to hire a web developer, it is your duty to find someone who will future-proof your software and web assets.  Procedural code has it’s place, nestled neatly within a method of a class.  If what I just said is foreign to you, start Googling “MVC” and “OOP” related to PHP for your own sake and stop and get some serious advice.  First of all, who is making the decisions that you need a web developer in house?  Someone who heard from someone else told you it was a good idea?  It’s a pretty safe bet that if the owner or GM of the company is telling you to look for a full time web developer, then there’s a budget set aside for his or her’s salary.  I often wonder how a company winging it often got as far as it did and still managed to at least stay open source and no go the Microsoft route.  Perhaps Microsoft’s licensing for .NET applications and servers serves a higher purpose.  In case you can’t tell, I’m an open-source guy through and through.  Give me a LAMP running the newest version of PHP and I can bring all kinds of information and tools onto the screen.  Using PHP correctly is an art, but when designed and executed properly, it will stand the test of time.

We will be discussing OOP and MVC much more in other articles.  It’s just so important that even if you don’t understand the technical issues, it’s the difference between building a house over wet sand or building a house on a solid foundation.  One way is going to cause you so many more headaches later.  It is that critical and doing your homework by finding the most suitable, future-proof web developer now will save you thousands of hours, the need to hire more developers to maintain poorly designed code, and the immeasurable savings you will never actually see in time and problems saved by your web visitors and internal users of your websites, databases, and internal software systems.

Top 10 Challenges to Test Your Future Web Developer

These questions get to the heart of the matter and will help guide you in picking a web developer you won’t have to worry about learning on the job and can hit the ground running.  By the way, these questions are focused on the big 5 PHP, MySQL, HTML, CSS and Javascript/JQuery because you need someone who understands not only how code works, they can show that they understand how to show the code!

  1. What is the difference between an abstract class and an interface?
    • This tells me if the PHP developer has at least a moderate level of experience with object oriented programming
  2. Design two database tables, one that holds basic user profile data and another that logs their activity of every page they visit on a particular website
  3. Using the database you designed above, write a MySQL query that will create a report of the top 5 most popular pages visited.
  4. What type of code repository do you use and why is using one important?
  5. Write a sub-routine that will place two rows of 4 boxes, each 200 pixels wide on screen.
  6. Make the boxes responsive so tablet they will be 4 rows of 2, and smart phone 8 rows each with one box.
  7. Write a JQuery loop that will resize all boxes to be 350 pixels height
  8. Design the file structure and breakdown, in MVC, of a contact form that will pre-validate with bootstrap, but post-validate with a separate handler.
  9. Design the contact form in your favorite IDE, complete with fields, field names, and design.  Be sure the form page is responsive.
  10. Customize the contact form with your favorite bootstrap or other CSS library and customize the buttons and header of the page to match our current website theme.

Other questions, depending on the type of business you run (e-commerce or more data-driven):

When instancing a class from an external file, what are some things that can happen that will throw a 500 server error?

When is it a good opportunity to use session variables?

When should you avoid using AJAX calls and instead load a new page?

Write a couple of .htaccess rules that will redirect a user from:  request.php?id=3 to /request/3/

How do you call a WordPress shortcode from an external php template?

In Magento, what is a child theme and how do you create one?

These are just general questions, maybe you have your own you’d like to share?  Please do!

 

 

 

 

 

This entry was posted in   PHP.
Bookmark the   permalink.

Aaron Belchamber has written 243 articles

Leave a Reply

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