October 5, 2015
Why Experienced Programmers Don’t Know Basic Programming (But Should)

Last weekend I attended Arizona State University's Hacks for Humanity 2015, a 36-hour hackathon focused on developing an application to provide for social good. My primary goal was to write a cool, useful app, and to get better at developing.

I achieved these things, but as is usual the primary benefit was an unexpected one - a realization that quite often, experienced programmers have forgotten, or perhaps never even learned, basic programming.

What in the world does that mean? It sounds like an oxymoron and that's mostly due to the way I've phrased it. A better way of putting it may be: many experienced programmers have forgotten how to write plain, unadorned, vanilla code in the language of their choice. Perhaps some never even learned in the first place.

Perhaps an example is in order. I'm a Drupal developer, and the great majority of my programming time is spent writing Drupal modules. Drupal, as we know, is written in PHP - so therefore I am an experienced PHP programmer. And yet, when it came time to write a plain PHP app without Drupal as part of the hackathon, I suddenly realized that I had not done this since I first learned the language four years ago as a stepping stone to learning Drupal. I was experienced in PHP, but had forgotten basic PHP programming.

I would imagine that this is a wider spread phenomenon than one might expect. In modern web programming, CMSs, libraries and frameworks abound. PHP apps are written in the Symfony framework, or in a CMS like Drupal or Wordpress. JavaScript apps are written in Node.js, or Express.js in Node.js, and client-side JavaScript usually involves jQuery. I'm more than certain that the trends are similar on the desktop side. Aside from the frameworks are the libraries. These days it feels wrong if you can't find a library to solve your problem.

Just a few of the many, many JavaScript libraries

According to this, Knuth foresaw this, and was worried about it. Despite Knuth's pessimism I don't see this as a bad thing at all. In fact, I love it. Code reuse is one of the best things about our field.


It becomes far, far too easy to become reliant on these libraries. And in certain circumstances this reliance can become problematic when suddenly you can't use them. The hackathon was, for me, the perfect storm. I was working with developers who weren't familiar with Drupal (the framework) but were familiar with PHP. Or, they knew JavaScript, but didn't know Node. I was working on my laptop, which I don't normally use for development, and hence my standard environment and tools wasn't present. And I was severely time limited. The most difficult part of using these frameworks and libraries is setting them up, so I certainly didn't have time to do this; and they wouldn't have been useful to do so anyways since my development partners didn't know how to work within them anyways.

These problem extend to development tools and environments as well, perhaps even more so since these tools are proliferating, and being adopted, even faster than frameworks. Next time you watch a webinar hosted by a developer, count the number of tool icons in the System Tray / Taskbar, and then consider that these are only the tools that are visible!

Once again, these tools are (usually) enormously useful. But overreliance on them can cripple us if they suddenly disappear. What happens if you need to write an app, but your IDE with all your custom settings and integrations is not available? What happens if you suddenly have to perform yourself all the tasks that Gulp usually does for you?

Some even more extreme situations: what will you do if you or someone else doesn't have WAMP / MAMP set up? What if your team members don't know how to use git? Both of these cases happened during the hackathon, and we were able to handle them by doing a quick setup and educational session, which fortunately was enough; but what we would have done had we, for some reason, not been able to use these tools makes for an interesting thought exercise.

To bring this post to some sort of a conclusion, we should all use libraries and tools and frameworks. But we should also be capable of, at any time, operating independently of them. The situations where you'll need to do this aren't common, surely - but they are there, and we ought to be prepared for them. In the cases when you just can't live without a tool (git being the prime example) you should be able to teach someone else how to use it in five minutes or less.