This site will look much better in a browser that supports web standards, but is accessible to any browser or Internet device.

Anomaly ~ G. Wade Johnson Anomaly Home G. Wade Home

July 29, 2015

LCDC: Business Logic

In The Myth of Code Anyone Can Read, I introduced the idea that least common denominator code (LCDC) is not a goal anyone should aim for. Despite my assertion, I've seen a number of places where I have seen this as a requirement.

Even if you don't believe any of the other reasons for code to not cater to the lowest common denominator, there is one reason that you can't really ignore.

Business-specific Knowledge

Your particular company or project embodies knowledge that is not universally known. If it didn't, your code would not be worth much, because anyone could reproduce it on demand. As such, a novice walking in off the street will never understand all of your code. They don't have the context to understand it. Often, the logic that makes up the business decisions that the code needs to make are written into your system. There are functions, objects, and algorithms that are particular to your business. There are particular ways of using these fundamental parts to do work that has value to your users.

Terminology

All of this means that there are idioms, terminology, and approaches in your code that novices or really junior people won't understand. Some of this terminology may qualify as jargon. This just means that there are terms that mean something particular in your business that people from another industry or possibly even company may not understand. One of these jargon terms may be a short-cut to an entire paragraph of context. Novices or people from outside your company are likely not to recognize any jargon used inside the code.

If you try to re-write the code so that they can, it will become a morass of low-level details that make any higher-level understanding impossible. Randall Munroe gave us a wonderful example of what happens when you don't use specialized terms in xkcd: Up Goer Five.

Summary

Obviously, you want any code written for your project to be specialized for your business. You expect over time, your developers will learn more about your business. Obviously, that knowledge should be reflected in the code. This insights into your business is what makes your developers able to write code specific to your business.

Next time, we'll explore a specific case why LCDC might be useful for parts of your project.

Posted by GWade at July 29, 2015 08:12 AM. Email comments