Jun06

In Response to ‘Where did all the PHP developers go?’

at 7.55am

In response to this post by Leonid Mamchenkov about the lack of good PHP developers in Cyprus I thought I would share my thoughts about the experience that the company I work for has had in recruiting a PHP developer to work on our web applications in the UK. We have had great difficulty targeting the quality of developer that we need for our large scale business applications and have come to the conclusion that it’s partly due to the lack of good web developers in the market. We have had a wide variety of applicants but very few have been anywhere near the quality we have been looking for (so far).

There are a lot of ’script kiddies’ around who claim to be advanced developers just because they have made a few websites that use a scripting language and a database. Very few seem to have any knowledge of MVC, frameworks, design patterns, version control or even fundamental concepts like OO and basic commenting and documentation techniques. Like Leonid we would settle for even a few of these skills.

I don’t believe that these problems are necessarily specific to PHP (I may be wrong) but probably the web development industry in general. One of the main problems is the lack of respect for web development by computer scientists and academics. Coming from a university that teaches what I would call pure computer science (by that I mean concepts, thought processes, theory and techniques rather than any particular technologies or programming in a specific language) I was staggered to find, at the end of my degree, that out of my hundred or so fellow students I was one of the only ones going into the web development industry as a career. There were some who had an interest but it was always considered a secondary skill which would be a bonus feature on their CV rather than their main selling point. Web development, particularly with scripting languages (including PHP, Ruby and Python), is not considered to be a ‘proper’ profession for someone with that level of qualification. Java is the exception to the rule as it seems to be the language of choice for many universities to teach the principles of programming and is therefore accepted by its students as an appropriate tool on which to base their career path.

There are quite a few universities that teach the more practical aspects of computer science and some even specifically web development but our experience is that many of their graduates have learnt either .Net or Java but nothing else. The former often do not seem to even be aware of programming tools outside of the safe and cosy Microsoft ecosystem. I am not criticising these universities or the languages that they teach but I do feel that other languages and tools are under-represented in academia.

In response to Leonid’s criticisms of PHP I do agree that one of its problems is its ease of use and the fact that it is newbie safe. There is no doubt that this does attract a lot of beginners to the community. However with the right training and experience there is no reason why these beginners can’t become great programmers, even if they do stick to PHP.

I also think it is unfair to say that it is an ‘ugly language’ although it most certainly can be if not used well. It certainly can’t be criticised for not being ‘convenient’ especially when used with PEAR or a good framework. In my opinion Java is more of an ugly language to read and certainly some of it’s libraries have been forced into its ‘everything is an object’ approach even where it is not appropriate. I admit that PHP is somewhat inconsistent in its function naming and the combination of native functions, procedural code and objects in its documentation but this is becoming easier to ignore with projects such as PEAR and the Zend Framework. PHP is a rapidly maturing language which in the last few years has become a very realistic candidate for developing large scale applications. Yes, it has its weaknesses and can be used to write horrible code but any language can, if put in the wrong hands. The problem here is not PHP itself but the type of people who claim to be good at it.

I think as a community there needs to be more work done to raise the profile of PHP, and web scripting in general, within academia. There are a lot of misconceptions about web scripting and its applicability to large projects and computer science theory. The industry is very young and its power only just being demonstrated. In order to keep moving forward we need more benchmarks and qualifications for developers so we can really separate the excellent and the good from the truly awful. Less time spent searching for the people our projects need is more time creating new and innovative applications.

Reader Comments

  1. Alastair Smith wrote:
    June 6th, 2008 at 9:45 am

    Hi Tim

    You might want to check out Jeff Atwood’s recent post on PHP (PHP sucks, but it doesn’t matter) if you haven’t already seen it: http://www.codinghorror.com/blog/archives/001119.html. It offers a good list of reasons why PHP “sucks”, and even goes as far as offering solutions to the problem.

    As far as languages for web development are concerned, I’ve really had my eyes opened since starting at Citrix. I didn’t know any Microsoft programming before starting here (I’d heard of .NET, used it in my internship, and that was as far as it went), and was relatively well-versed in Java and open source tools and methodologies. I’d done a not-insignificant amount of programming in PHP myself; maybe partly because of this, and because I came to programming fairly late (I started in my lower sixth, having played with Quick Basic a little when I was about 12-13), I had no idea of patterns, MVC, etc., etc., etc. My first exposure to these concepts was our fourth-year project.

    I’m working on a web application at Citrix, the Citrix Web Interface, which is one of our most prominent components. What is it written in? Java and ASP.NET. What does it run on? IIS or a Java Servlet Container such as Tomcat. Why don’t we use PHP? Because PHP simply is not suitable for enterprise-level web applications. We couldn’t do half the clever stuff we do if we were using PHP.

    PHP is an excellent language for knocking together a quick data-driven system, and I’m sure that with a good programmer behind it, it can be made to do good things. However, there are features of a fully-fledged OOP language like Java or C#, or even C++ CGI, that bring things to the table that scripting languages just can’t. For example, proper object garbage collection, designed from the beginning for object clean-up, rather than bending the existing memory management functions designed for individual variables and arrays, etc., to a higher purpose.

    Leonid’s post mentions Google and Amazon; Google makes heavy use of Python and Java, and whilst I don’t know what language Amazon uses, I’d be willing to bet it’s not PHP. Or isn’t any more, at the very least. PHP is quick and easy to set up not least because of the reasons Leonid mentions in his article, and because of that it has some issues. It’s not terribly secure, and it almost *promotes* poor programming; there’s no good IDE that matches the PHP philosophy (i.e., there’s no good *free* IDE, and even Zend sucks a bit), and so there’s nothing to guide the programmer into doing things “the right way”. The frameworks don’t come bundled with PHP the way they do with Java and .NET, and they don’t integrate into the IDE. *Unless you explicitly know what to look for, you’re on your own*.

    My first PHP application provides a good example here. I didn’t know what I was doing: it was my first experience with web development, my first experience with anything outside of Pascal, and I wasn’t a particularly good Pascal programmer. I’d only been seriously programming for about 18 months by this time, and only really just “got” what OOP was about (not helped by a lack of exposure to it)! It consisted of a handful of super-sized PHP files (I’m not kidding, they ranged from ~500 to 2-3000 LOC each). It was almost completely procedural – you could count the total number of functions on the finger of one hand, two at a stretch, and there was *so* much repeated code. It was so horrendously unmaintainable, that I’ve given up supporting it now, and am completely and utterly embarrassed by it. It’s just too easy in PHP to utterly mess things up. If my bank used PHP to write their internet banking application, I’d be switching bank faster than you can say “register_globals”.

    I’m glad to say that my PHP skills improved a lot over the years since that first application, and the last application I worked on was an experiment with PHP 5’s OOP facilities. However, given that PHP is a scripting language, the OOP facilities can only go so far, and ultimately I gave up through frustration as much as anything else.

    I’m no Java evangelist, I don’t particularly like it and its everything-is-an-object approach, and the way objects are passed by value all the time and the performance issues and the fact that it seemingly has historically had poor support for underlying platform functions. I have to work with it on a daily basis, and as a language it is more than good enough. You should, however, try C# some time; it’s very much like Java, but done right. It’s got enough of C++ in it to iron out Java’s quirks, and I really enjoy programming in it.

    I’ve spoken to one big web design company in the past, a company called M-Corp based down in Ringwood in the New Forest. They use the Microsoft ecosystem – Windows, ASP, IIS, SQL Server, all the rest of it – with PHP as an option if, presumably, a) the project is better suited to PHP, or b) if the customer requests it for some reason. My knowledge of PHP web development posts is that they tend to be within a company that doesn’t do web development and design as its bread and butter business, and is looking for a quick/easy/low-cost solution, and because PHP runs in the LAMP stack, it most certainly is low-cost. Even something like Facebook is not a web development and design company, it’s a social-networking trying-to-be-advertising company; their web site is just the enabler for the rest of their business.

    Just my 5p :-) Hope things are all well with you.

    Alastair

  2. Tim wrote:
    June 6th, 2008 at 11:49 am

    Thanks for the comments Alistair!

    I honestly didn’t want to start a flame war about which platform or language was the best and as I said in my post I have no issues with the Microsoft platform (except for maybe the cost) or Java. I was trying to identify the reasons why there are so few good web developers around who aren’t tied to Java or .Net and I feel that it is mainly down to misconceptions that people have about web scripting and its capabilities. I would however like to challenge some of the comments you have made as I am afraid I have to disagree with some of them. I feel that if I can’t justify the tools that I have made the decision to use then I shouldn’t be using them.

    Your first point relates to whether PHP is a suitable tool for building enterprise applications. Up until the last year or so I would definitely have agreed with you and even now it is somewhat unproven territory. However I firmly believe that it is capable of providing everything that is needed for a large scale application that is elegantly and efficiently designed. The Zend Framework, in my opinion, is the main enabler here as it provides an excellent set of components designed by superb developers which utilise design patterns and concepts inspired by other platforms such as Java and .Net (as well as some from Ruby on Rails and other scripting frameworks). The very essence of the framework is to promote good practice and enable PHP to scale to the kind of applications we are talking about. As for my evidence, apart from the results I have seen myself from the application I am writing, I would like to point out some large scale projects that have utilised PHP to great effect. Yahoo, Digg, Facebook, YouTube, Wikipedia and Magento (built on the Zend Framework) all demonstrate that PHP can scale and be used to model complex processes (especially Magento and Yahoo).

    With regard to your comment about these companies not being primarily development companies I feel it is a little irrelevant. The point is that the applications *have* been developed using PHP, *by* PHP developers. Saying that Facebook’s core business is not its website is no different to saying that Google’s core business is not software – it may not be where they make their money but you can’t deny that their developers are some of the best in the industry – probably better than most developers who work in independent web design companies. In fact I would say that it is the web design/development companies who are the ones who are generally not creating enterprise level applications (they tend to work on a large number of smaller projects) and therefore the tools that they use are less sensitive to these issues.

    Two final points; the example you gave about the 2-3000 LOC files is really what I am getting at – you could write a Java program with all the classes in one file if you wanted too! You could even write the whole program in the main method! I can’t see how this is any different. Yes, there are a lot of bad PHP tutorials on the internet that promote procedural code but increasingly these are being replaced by excellent sources such as Zend, Sitepoint and a whole array of books. I have to say that I would argue that Java does not promote good practice through its documentation any more than PHP does. The fact is that good practice is about Software Engineering in general and not about language documentation. It’s like having all the materials to build a house, each with a set of details on what they do, without the builder having any engineering expertise – it just doesn’t work!

    My second point is about why PHP is popular. It is free, it is easy to set up and it is easy to get started. However, as with any powerful tool, like Java, you won’t get its full power or make it fully secure without some configuration. Register_globals is not a security flaw if it is not switched on! You might not be happy about your bank running PHP but to be honest I wouldn’t be happy about them running .Net either! However I am quite happy to make credit card payments on a PHP driven website, as I’m sure you are too. It’s all about your security requirements. Banking is probably the most extreme example of high security requirements but most applications simply don’t have these needs.

    I will give C# a try one day – it’s on my (long) list of stuff to try out and I’m sure it’s very powerful but for now I’m kind of committed to PHP and proving that it’s capable of fighting with the big boys.

  3. Alastair Smith wrote:
    June 6th, 2008 at 3:49 pm

    Hi Tim

    My apologies if I misled you into thinking that I was trying to start a flame war; it wasn’t my intention either! :) In the spirit of healthy debate, though, I shall attempt to address your comments also.

    Firstly, I haven’t done any real development in PHP since the summer of 2006; the only things I’ve done since then are CLI PHP (for cron jobs for the 4YP) and the help web service for the 4YP, none of which I’d call proper development (I hacked the web service together having got a small understanding of the Mediawiki API). I’m sure things have moved on since then, and things like PDO, etc., in the 5.2 releases of PHP were a huge step forward and I’ll try and get round to trying them out at some point (I’m trying to build my C#/.NET skills at the moment, because application development interests me more than web development these days). I never tried using one of the PHP frameworks like CakePHP or Zend because I didn’t know (enough) about them at the time, although I have made use of PEAR libraries in the past to make life easier for me (e.g., the XML-RPC library or whatever it was that I used for the help web service).

    My point was, though, that Java and .NET provide the framework *as part of the package*; what’s to stop PHP distributing CakePHP or PEAR/PECL as part of the package, particularly given the whole OSS thing? All you then need is a half-decent IDE that will do autocompletion, etc., for the framework as well as your own code, and you’ve got an experience similar to that of Visual Studio or the Java IDEs. I don’t count Zend here, because it’s not freely available the way PHP is; I feel that the framework and the IDE are there to support the language, and so should be available under the same restrictions.

    Additionally, I recognise that PHP scales well; Wikipedia and Facebook are both PHP-based. My comment about the types of companies employing PHP developers was a bit misguided, I admit; it could easily be possible that the difficulties recruiting PHP developers are due entirely to the fact that all the good PHP developers are working at Yahoo!, Facebook, etc. For example, Citrix bought the open source server virtualisation outfit, XenSource, last year, and XenSource use OCaml (a functional language much like the SML we did in the first year); indeed, we’re the second largest OCaml user, the first being a French aerospace firm. We’re now suffering similar problems hiring OCaml developers, because we (or the French firm) already hired them all!

    Java does, in a sense, force you into better file structure, because you can only declare one public class per file, and the filename has to match the class name. It takes a very determined newbie to get around that, and they may then of course start suffering scoping problems. But I do agree that you could easily write a completely procedural program in Java’s main() method.

    I guess my underlying point to all this is that, oddly enough, I actually agree with you! My feeling is that PHP, as a development environment, is not yet mature enough to properly compete with Java and .NET because the other components in that environment are not yet in place and available with PHP. I think that’s what turns trained developers off PHP, but I recognise that there’s a big, obvious, vicious circle going on here.

    I don’t know if you read The Daily WTF or not, but I thought you’d appreciate (as a software engineer/computer scientist) the following articles:
    http://thedailywtf.com/Articles/wtflibphp.aspx
    http://thedailywtf.com/Articles/Superencryptalisticexpialidocious.aspx

    and just to prove I’m not looking for PHP-specific articles :-) here’s a couple of NET ones:
    http://thedailywtf.com/Articles/Some-one-is-trying-to-Hack-the-Site.aspx
    http://thedailywtf.com/Articles/More-Randomer.aspx
    http://thedailywtf.com/Articles/Thats-Helpful.aspx

    I guess what I’m trying to say is that bad development practices (and dumb developers) abound whatever language you’re using, and there’s no substitute for good training. And if I’m surprised at anything about what my CompSci friends have done after graduation, it’s the number that have gone into non-tech jobs in the City or similar. But that’s another conversation :-)

Comment on This Post

The XHTML tags <a>, <abbr>, <acronym>, <b>, <blockquote>, <cite>, <code>, <del>, <em>, <i>, <q>, <strike>, <strong> and <pre> can be used in your comment. Your e-mail address will not be displayed.

* Required field

This Post

This entry was posted on Friday, June 6th, 2008 at 7:55 am in Web.

You can leave a comment below or trackback from your own site. Discussion can be followed through the entry's RSS 2.0 feed.