The Myth of Code Anyone Can Read

By | June 18, 2015

I got into a conversation recently coming out of the Houston.pm user group meeting. As usual, we wandered over numerous technical topics, but one stuck out in my mind: whether or not to use more advanced or more complicated language idioms.

I’ve written about programming idioms and advanced code many times in the past (see below). Part of the reason for revisiting this topic repeatedly is a mindset that I have seen throughout my career. The idea is to write the code so that anyone can read it. Although this sounds reasonable at first, lowest common denominator code (LCDC) almost always results in a hard-to-maintain code base.

The Failure of LCDC

There are a number of reasons for this simple idea to fall apart. The most obvious comes from your experience of reading text in a human language. If we wanted to keep the text at a level that anyone could read, everything would need to be written at a first grade level. That’s really the lowest level that you can claim that someone can read.

In human languages, text is written at different levels depending on the context and expected audience. Why would you expect programming to be different? Over the next few posts, I plan to cover some of the context that would change the way code should be written.

Over the course of the next few entries, I plan to show different places where writing lowest common denominator code (LCDC) would harm the project and, possibly, your business.

References

Leave a Reply

Your email address will not be published. Required fields are marked *