This post from John Somnez caught my eye:
Why does Programming suck?
In his post, he addresses an email from one of his followers asking “why does Programming suck?” I was taken back by this question. It’s something I’ve asked myself a lot over the years, but due to my insecurities I felt that maybe I just wasn’t good enough to do the job. Over time I’ve seen this question pop up again and again. There was even a talk that I watched delivered by Thomas Figg describing the horrors that he has experienced in the Industry. In a way, I felt vindicated. I felt that the responsibility had been lifted from me. The responsibility of trying to become better as a Developer and a Communicator. “Of course it’s not me, the Industry just sucks.”
This ties into a point John Somnez makes about why programming sucks. The constant pace of change in our Industry. He argues that professions like Electrical Engineering don’t change very much over time. A circuit is a circuit. In some ways I agree with this, but my gut feels differently. In some ways, this is true. However, in the beginning of Electrical Engineering, there were many new ideas being introduced. For example, Alternating Currents (AC) was first utilized in the 1850s which was incompatible with the infrastructure that Edison had setup based on Direct Currents (DC). It was adopted after much resistance (pardon the pun). Today, Electricians are the practical application of Electrical Theory and have reliable and standardized tools to allow them to perform their work.
My personal feelings on the matter is that programming sucks because of a lack of standardization. In the early days of my career doing Web Programming, MVC was not a widely adopted way of structuring code. In fact, every project I took on seemed to be a snowflake. Each one was coded in an entirely different way. Although WordPress, Drupal and Joomla were starting to come into their own at the time, custom web applications simply followed the Architecture of least resistance. Want an SQL query displayed directly to the user? Sure! Go for it! The aforementioned CMS’ as well as CodeIgniter and Zend Framework did much to remedy this and today I would be hard pressed to find a PHP project that was built without the use of a CMS or Framework. It seems like we have come to some sort of standardization when it comes to MVC. However, we still have a long way to go in my opinion.
The next domain we need to standardize is that of the Front-end. This is something I feel we as Developers need to do more to solve. Take jQuery for example. Yes, it has weaknesses and drawbacks. But think of the benefits it offers. I can select an element and change its color if I wanted to in one line of code! I did Front-end development for a time before jQuery existed. If you haven’t done that then compare it to writing Assembly code in some regards. The DOM combined with Browser compatibility issues ensured that the most trivial tasks would take about a full day of work with enough defensive programming checks and if/else statements to make you feel like someone suffering from Clinical Paranoia. jQuery comes and takes a lot of that away. Were Developers happy!?! No! We needed it to be more lightweight which led to the birth of Zepto and other variations because Developers can be an arrogant bunch. We see something and think it can and should be done better.
Developers need to be comfortable with the idea of Tradeoffs and we need to be better at communicating to our Stakeholders and our Clients. We also need to promote the idea of “the right tool for the right job.” To further riff on this idea, I recently worked on a Ruby on Rails project. The site was basically a CMS and even included a Blog, User Management, etc. However, it was coded entirely from scratch and making any changes to it is perilous because there is no testing and the original developers are long gone. My contention was that Ruby on Rails wasn’t even needed for this. Yes, you are probably screaming a list of Ruby CMS’ into the screen right now. However, I would argue that this was a perfect job for WordPress! WordPress had a lot of the desired features right out of the box and millions of plugins available. But, because the original Developers were Rails Developers, they wrote it from scratch. If all you have is a hammer, then everything is a nail as they say.
To conclude, my answer to the question of why Programming sucks is that it is because of us. Because of Developers. Our natural inclination towards trying to improve tools by writing new ones makes it much harder to standardize our tools. We can’t blame our Clients or Stakeholders for our misery because they trust us to weigh the pros and cons of our tools and proposed solutions. They don’t understand our problems and they certainly can’t adapt their goals and expectations unless we explain it to them in a clear way.