Theta Code

Scientology and Computer Programming

Complexity to Fix Complexity

Posted by Max Kanat-Alexander
On January 13th, 2008 at 09:01

Permalink | Trackback | Links In

Category: General

In Dianetics: The Modern Science of Mental Health, L. Ron Hubbard discusses a principle called the Introduction of an Arbitrary:

An aribtrary structure is one in which one error has been observed and an effort has been made to correct it by introducing another error. In progressive complexity, new errors must be introduced to nullify the evil effects of old errors.

How many times have you seen this happen with a software project? It’s poorly designed in the first place, and then somebody discovers an error. Instead of fixing the design, they tack on some “hack” to fix the error. In other words, just like Ron says, they keep introducing new errors.

It’s long been known that this is a bad idea, but the new idea here is to look at this as a process of introducing errors. Just because some code “fixes a bug” doesn’t mean that it’s not an error to write code that way. You are actually introducing new errors into your program every time you “hack” in a fix instead of fixing the real root cause of a problem.

I think most professional developers have long felt uneasy with “hacking” in a fix, but perhaps didn’t quite have anything to back them up when they protested and said, “I just want to fix it the right way!” However, if we look at “hacks” as errors, then it becomes easier to see why the “right way” is the right way.

So in the future, when you’re fixing an error, don’t introduce new errors to fix it. Do things the “right way.” :-)

-Max

Comments RSS | Trackback URI

4 Comments »

+/- Comment by Brad Mathews at 2008-01-14 09:51:07

Max,

I have total reality on your observations here. Elevating the “hack” or “quick fix” to the role of error finishes a shift in reality for me that has been waiting to happen for a while. Thanks.

All of us programmers know that at some point software of any size will need to be completely scrapped and re-written. I have always said this was due to the foundation no longer supporting the added stories of the latest remodel. While this is still true, not introducing errors as you add on will let the program grow taller before the wrecking ball need to be called in. Also, more intelligence and foresight when designing the software to begin with can also forestall this. But I believe the arbitraries we introduce are much more important than I previously recognized.

Of course, a cure for featureitis would also help as added features can act as arbitraries as well. Many programs grow well beyond their original purpose or try to be everything to everyone.

- Brad

+/- Comment by Max Kanat-Alexander at 2008-01-14 11:40:31

Hey Brad! Yeah, I totally agree with everything you said there. :-)

-Max

 
 
+/- Comment by Grahame at 2008-01-14 12:59:29

You are so right!

I’ve seen this cycle of fixing problems by introducing new problems and then wondering why the program is a piece of garbage. It makes the code hard to maintain and almost impossible to add new features to.

+/- Comment by Max Kanat-Alexander at 2008-01-14 14:28:16

Hahahaha, yeah, you’re telling me! :-) That’s what I’ve spent the last three years fixing in Bugzilla! :-)

-Max

 
 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.