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

Apr 1, 2014
One minute

Hover Effects in JavaScript?

One of the things that can be annoying when looking at someone else’s code is when a more complex technology is used to solve a problem that can be handled more simply with another method.

An example of this is when you utilize JavaScript to implement a hover effect on some elements. I know of one scenario when you would need JavaScript to trigger a hover effect, and that would be when you want to trigger the hover effect with a touch event. However, in this case, the elements that would be affected by this hover effect are hidden on any mobile device, so the touch events would be unneeded for this hover effect.

May 12, 2014
2 minutes

Mobile Web Development Is the New Internet Explorer 6

Developing a website that works well across devices and browsers is an excersize in playing Whack-A-Mole. Once you get one browser working on a desktop browser, you go to the next browser and find that not everything works the same way. In 2014, it seems that there aren’t that many differences in functionality between desktop browsers, but that all changes once you start making a responsive website that must handle mobile devices as well as it does desktop browsers.

May 21, 2014
One minute

Window.Open Causes Browser Compatibilty Issues

One of the things that always annoys me as a web developer is when native browser functions that are accesible from JavaScript do not share the same function signature. One perfect example of this is the window.open function. When you are using non-Microsoft browsers such as Firefox and Chrome, you are able to make a call something like this window.open(url, 'window name', 'dimensions or other settings');. The window name parameter is important because it allows you to open multiple links in the same external window/tab. However, when using Internet Explorer, especially Internet Explorer 8 and older, you can only use window.open(url);. If you try to use the first type of function call, you get a very ambiguous error message in the browser that doesn’t tend to show exactly where the error occurred.