Semantics cause bugs

An interesting discussion is going on in the CSLA.NET forum. In message 5 of the discussion, Tom Leylan points out that the discussion is getting bogged down in semantics. I would agree with Tom’s assessment. I was going to post a response of my own to his original entry. However, I realized halfway through my response that there could be multiple interpretations of the term “parent”. I canceled my response and elected to seehow others interpreted it.

I think semantics is the root cause for a significant percentage of software bugs. I also believe that these kinds of bugs are harder to detect. The main problem is that human language is very inexact. Programming languages are the exact opposite. We try to build computer programs by translating the inexactness of human language into the exactness of a programming language. Translations of this type are very, very, difficult, even for the most powerful computers on earth — our brains.

Conversely, translating from one exact language to another exact language is very easy. There are hundreds of programs to translate code from one programming language to another. In a sense, every compiler is simply a translator, since a compiler is translating a higher-level language to a lower-level language. Compilers are introduced at the undergraduate level, so they can’t be considered a terribly difficult concept. 🙂

An assembler is translating assembly language to machine language. In the .NET environment, two translations are taking place. There is a compiler that translates VB, C#, J#, etc. into IL. A second compiler translates the IL into machine language.

The task is not so easy when one wants to translate English to Spanish. In fact, it’s not so easy translating from relatively similar languages. Many American jokes don’t translate very well when told in the UK, even though both countries use English as their primary language. Try using Babelfish to translate this page into French.

If you are interested in how the best and brightest are dealing with this issue, check out the Proteus project.

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: