Write Software for People, Not Computers

Throughout a normal day, I end up reading a lot of information about current issues in technology, and today is no different. There was a debate raging about whether or not high-level math was required for programmers that was sparked by this article by Sarah Mei Programming is not math. While it is an interesting topic, and, surprisingly, I mostly agree with Sarah on this issue, that is not the most important portion of her post. The important part is instead a quote from Structure and Interpretation of Computer Programs from MIT Press, and is as follows:

programs must be written for people to read, and only incidentally for machines to execute. Structure and Interpretation of Computer Programs, MIT Press

The interesting thing to take away from this quote from a book designed to teach introductory Computer Science to college students is that this concept never seems to sink in to many software developers. It fails to sink in to entire groups of developers, so much so that there are actual contests to see who can write the most obfuscated code.

Fortunately for developers, style guides and best practices for various languages have arisen. If you are a front end web developer, one of the important style guides that includes best practices is Idiomatic JavaScript which will hopefully guide JavaScript developers new and old to write better, more consistent, and supportable code for their websites.

All code in any code-base should look like a single person typed it, no matter how many people contributed. Idiomatic JavaScript

An important concept to grasp, then is that all code in your project should look like it should have a single author and be easily readable by humans. A perfect correlation to the desired end result of skilled software development efforts should be as easy to read as your standard novel which has a single author. Interestingly enough, it seems that Sarah Mei was making this argument all along in that:

For actual developer jobs, by contrast, the two main skills you need these days are programming and communication. Sarah Mei

In the end it seems that if all of us anti-social developers work more on our communication skills and ability to work well with others instead of throwing up more roadblocks that make software development a walled garden, we may actually have the power to make things a bit better for everyone.

Related Posts

Mar 31, 2014
2 minutes

JavaScript Templating

Many times it becomes useful to be able to make an AJAX request for some data, insert it into some HTML that is already on the client, and then display it to the user. There are a few ways to implement this, each approach has its benefits and drawbacks.

String Concatenation

Possibly the simplest way to accomplish the templating in JavaScript is to use simple string concatenation with ‘+’. This is the approach that I see many newcomers to JavaScript use in their code, as it is the simplest to implement. However, it does have a major drawback in that this method has the worst performance of all, especially in older versions of Internet Explorer. This could be implemented as below:

Jul 15, 2014
2 minutes

The Easiest Way to Create A Solution That Works

The easiest way to create a solution that works…is to do it right the first time. Yes, this is a bit of a cop-out, but it turns out to be an important factor to keep in mind when you are tempted to come up with a quick and dirty solution for a problem that does not follow established best practices and is likely to have code quality issues later.

I have run across many sections of code that I or other developers have written in the past that we thought were “good enough” at the time it was written, yet, I was revisiting the code because we discovered a bug in it. Many times, this code had an issue that would have been trivial to fix at the time it was written, if it were only found. It seems that as a developer, we tend to find the least sufficient solution that will solve the immediate problem we are experiencing instead of finding an optimal solution that will be easily maintained months and years after it was written.

Jul 8, 2014
3 minutes

Always Use Automated Integration Testing

QA or Quality Assurance of a software project is often the area of software development that is most neglected. Typically developers avoid software testing like their lives depended on it. While a basic level of testing is required for a single scenario to validate that your code “works”, the level of testing that is required to ensure that all users have a good user experience across all targeted platforms is something that a developer seems to think is beneath them.