Musings of a Software Designer

Thursday, April 06, 2006

Software design is a pretty strange thing when you think of it. You know what it is you want the computer to do, you can describe it to yourself and to your friends, but it becomes such a difficult and sometimes frustrating task to properly tell that same thing to a computer. Granted some of the difficulty is a result of the vagueries of normal conversation, but that's mostly a minor problem.

The biggest problem with software design today is the lack of an appropriate means of communication between a human being and a computer. The most popular languages available to us today are C++, Java, and Python. These languages are all just minor variations of one another, and as such they all suffer from the same fundamental flaw, they lack a level of expressiveness and flexibility that humans beings desire when they talk to one another.

Think of writing an essay... does it ever occur to you while writing one how restrictive the English language is? Do you ever write an essay, stop, and think to yourself, "Oh darn, I can't quite explain this concept elegantly in English. If only I could write it in Russian, or Japanese, or Arabic I would be able to clearly say what it is I want."

Assuming you were an incredibly fluent speaker of every human language, it's highly unlikely you would find that some things are easier to express in one language while being incredibly difficult in another. Yet, software designers face this problem all the time, trying to find just the right language they need to get the computer to do the task they want it to.

The root of problem is largely historical. During the 50s, the sole task of a computer was to take a mathematical formula, and calculate a precise and correct answer to it. Essentially a computer was just a really big calculator that engineers could use to find solutions to their highly complicated equations. This was a very complicated and infinitely frustrating task as the only way to communicate to a computer back then was by punching holes into a card, with the pattern of holes determining what equation to calculate. To simplify this task, the very first high-level programming language was developed, FORTRAN (Formula Translator). Boy did it make life easier... for the first time in computing history, someone could input to the computer an equation like:

x^2 + 5x + 6 = 0

And the computer would almost instantaneously solve it. Life was good for the engineers, they had a great tool at their disposal to do all the mechanical work for them while they focused on the design.

Surely, while one can appreciate the power FORTRAN has for solving equations, one can only imagine how difficult it would be to express the game of Chess, Gemstone IV, or even The World of Warcraft as a series of equations. And so for the next 50 years, all software designers have done with respect to the design of computer languages was to add new constructs, new features to the language. Basically taking FORTAN, a special purpose language, and adding a new feature to it that makes it easier to do some other specific task, and adding a new feature later on, and so on so forth...

This, in my opinion, has proven to be a flawed approach in the pursuit of a general purpose computer language. C++, Java, and Python are not general purpose languages, they are just examples of languages that have many purposes that are of practical importance today. This has held back the potential that computers can have since before the use of a computer can expand to new, uncharted territory, these languages have to be updated with new features to accomodate the new problems that are faced. Of course it would be a miracle if human beings could come up with a genuinely general purpose language that would allow humans to easily communicate with a computer after only 50 years, but we will be far from such an ideal language if we continue down the same path we've been on.

The best path we have towards the ideal language is one that was also discovered 50 years ago, but unfortunately was almost all but abandoned shortly after. That path begins with a language called Lisp, and its other dialect, Scheme. Perhaps I will go into detail as to why these two languages lay the true foundation for an ideal language, but that will have to wait for another day.

0 Comments:

Post a Comment

<< Home