What would I look for in hiring a developer?

What would I look for from a technical perspective when hiring a developer?

Below is a list of areas I would look into when hiring a developer …

Consistency of code
Is the consistency of the developers code consistent. There are many different ways of writing the same code in terms of code syntax but is the chosen way to write a piece of code consistent with a later way of writing the same piece of code. I am not talking about blocks of code here although it could apply to blocks of code as well but I am mainly talking about the small pieces of code for example arrays.

In PHP arrays can be written in the following 2 ways …

Or …

I would expect the developer to choose a way to write arrays and stick to the one way of writing arrays throughout the code. This also applies to using brackets within the code …

Or …

I would expect the developer to choose a way of writing brackets within the code and stick to that way of writing brackets. In the particular example above it would be except-able for the developer to change the style of writing the IF statement if the IF statement was no longer than 1 line of code for example …

The above is fine because there is a reason for it. That reason being the IF statement is no longer than 1 line of code. This reasoning can be applied consistently through all areas of the code. So when an IF statement is no longer than 1 line of code brackets are not needed. This is except-able if the reasoning is kept consistent throughout the code.

Consistency can be applied across many more areas including, naming conventions in code, code files and database, structure of the code, classes and extending classes, using code in view files or not using code in view files, tabbing / spacing of code.

So long as areas of code are kept consistent and the code is not mixing the above styles without reason then that would be except-able in my opinion.

Abstraction of code
Is the code appropriately abstracted? Is the code that is used in more than 1 place wrapped in classes / functions. If using a framework is the code in the controllers appropriately thin and the models and other classes doing most of the work.

When using a framework my controllers are quite small when compared to the level of functionality that is being executed. This is because my Models do most of the work and I make full use of the “beforeSave” and “afterFind” methods.

The controllers should control the flow whilst the details are kept tucked away in classes / functions.

Making the most of the tools / web frameworks
If using a web framework is the appropriate functionality being used? For example some of the latest frameworks have a feature called “scopes”. Are scopes being used where they should be or has the developer ignored scopes and written his own way of doing scopes?

If there is a legitimate reason for writing custom code to allow functionality similar to scopes then use it but if there is not a legitimate reason and the developer wrote his / her own way because he / she could not be bothered to read the scopes documentation then I would except the legitimate scopes to be used.

Same applies with “user authentication”. I have seen plenty of developers use their own way of “user authentication” including a full permissions system when the framework the developer used already had this feature built in.

When prompted as to the reason the developer created his / her own “user authentication” system the developer will state “the built in functionality is not fit for our requirements”, or “the custom user system that has been built is better and will allow us to do more complex user permissions” or some other general reason.

However upon further inspection it can be found that the frameworks built in functionality was fit for the requirements (plus more) and that the developer just could not be bothered to use the built in functionality.

So in conclusion if I was hiring for a developer the above areas are some criteria which I would make my decision on. The above areas are not set in stone and if some of the code was not in line with the above areas and there was a reason for it that would be except-able. If the there was no reason for it, it still may be except-able under the agreement that the areas are rectified. All in all the areas have to be taken on a case by case basis.