Skip navigation.

Software Development

Correcting The Future

Vocabulary

When I hear talk of vocabulary as it relates to computers, I do not see vocabulary at all. I see notes (as in scribbles on a piece of paper or in source text files), groups of notes, and personal made-up words for these other groups of words. These are most definitely not vocabulary.

vocabulary:

1. the stock of words used by or known to a particular people or group of persons.

There are other definitions, but this is by far the best one because it cuts to the core of the purpose of a vocabulary. Why do vocabularies exist? Never is this mentioned in any programming blog entry (other than mine), or in articles or presentations. It's assumed that words have certain meaning. And that groups of words can also be called by yet another word, thus increasing the vocabulary. But what is the purpose of this? Why is it done?

Well, we all know what functions are. As this is a grouping of other words or functions, their purpose is obvious. However, the purpose of a vocabulary still isn't made clear. The assumption is that vocabulary and functions are equivalent. This cannot be further from the truth. These have nothing in common as presently used.

Here's what I mean. Say you write a function and you believe this to be a new word in your vocabulary. Good so far? Now, here are a few questions I have for you. Who is the group of people or 'machines' that understand this vocabulary? I can tell you right now that if it's the machines, then you've wasted your time because once your software terminates, all its knowledge and vocabulary goes with it. Is it not more reasonable to say that this vocabulary is only for you and you alone as the programmer? The machine certainly doesn't understand this concept. It is not sentient and it only understands machine code. If you're talking about the compiler, it doesn't care about your custom functions either. So who else is using this new vocabulary?

The reality is that there is no one else using it most of the time. But hold on! What if the function is in a library? Well, in this case we must admit to ourselves that rarely do we pay enough attention to how we write functions so that it's good enough for wide-spread distribution in a library. How many functions can you write that are truly good enough for this kind of usage, do not break down and are general enough? Even if you believe you can do this, you cannot say the same for the majority of programmers. And that's the point. Programming isn't about you. At least, it's not only about you. It never was. It's about many programmers. These are the ones that need the vocabulary. Not you alone.

So forget the library. The vocabulary you think you are using in your software needs to be understood by other programmers who look and update your code. Those are the group of people who understand your vocabulary. Or do they? Can they understand your vocabulary?

This entire notion that writing custom functions or custom libraries increases a vocabulary is bunk. It cannot happen. What increases vocabulary is by having many programmers understand new terms. If you write a function and no other programmer knows what it does, then the vocabulary has actually gone down because you're using alien words.

Here are examples of increased vocabulary for programmers. STL in C++. Containers, data structures and many algorithms have now been standardized. Java has the advantage of having a vast initial vocabulary. Other languages have oftentimes gone too far or too little.

Too much vocabulary is not good. Most people in real life converse using a subset of the entire language. The same should be true in programming. The vocabulary should only increase when dealing with certain tools and operations. Math has its own vocabulary. Business has its own vocabulary. Graphics have their own vocabulary. So one should only use extended vocabularies when it makes sense to do so.

So what exactly are custom functions? Are they extensions to vocabularies? No, they can't be. The computer doesn't understand them. No other programmer has seen them. Only you know what they mean. Functions are actually the anti-thesis of vocabulary. I learned this the hard way when I was developing a grammar last year for Project V. I found out quite early on that functions hindered developing a vocabulary.

Forget computers for a second. Just think about how you use vocabulary in real life. If I say the word "chair", do you see only ONE chair? If you see something that isn't exactly like the chair you saw when you learned the word, then do you say that these are NOT chairs? Well, this is exactly what computers do when you write functions. If you write two identical functions, the computer, compiler or whatever else does not know they are the same. Especially not if they are in different modules or you have some statements in a different order. After your software is compiled or during its execution, if another software has better code for this function, can your software make use of it? Why not? With vocabulary, the machine in question should be able to do these things.

Now we get to the second point I want to make. That vocabulary shouldn't be just for other programmers to understand. It should be for the machine to understand as well. However, the machine cannot look at many components and recognise that it's the same as component X. In the real world, it's the same as a computer not being able to recognise a car by looking at its parts and how they are connected. You can give it one model, or many, but there'll always be a configuration it won't recognise. So this is what I learned the hard way. That computers, because they are as dumb as you can get, can only go from the top down. You can give them a word, and they can break it down to the configuration that it knows about.

I've talked about this before, but what if you could leave this function or capability on the computer for anyone to use? Have a place on the computer where you can store functionality. For example, place a video player there. Now, every software that wants a video player does not need to code one in. Every user can have their favourite player installed. As long as it conforms to the predefined functionality, then there are no problems. If the computer doesn't have one installed, then it can fetch one online or from the software writer directly. The software could come with defaults too. BTW, Project V will have this built-in, but much more powerful.

Once computers start having a vocabulary, something new can start happening. Computers can start talking with each other. Why would this be useful? Well, if you have software and the computer you're running it on can't perform something, then it can start spreading your software around the network and execute it there without bothering you with the details. It can find alternate routing on its own. It can distribute and collect functionality. It can start sharing performance data and compare stats to seek out the best implementations. It can also start to recognise functionality based on its part. Maybe not often. But just once would be quite the breakthrough. Right now, there is no hope of any of this.

Mainly, programming languages have concerned themselves not with vocabulary, but with language extensions and modularity. Do not confuse these. These problems remain even if the terms used have been incorrect. How do we add our own extensions or functionality? Well, containment isn't exactly new. Problem is that we thought this was something more that it seemed. Sometimes, things are exactly what they seem to be. A function is a function. Nothing more. Yet the need for custom functionality exists. How do we get other programmers to understand our new functionality?

Just maybe we're going at it backwards. In any kind of work in real life, we don't implement something and then try and get others to use it. Instead, we state what we need and someone comes along and implements it. We don't really care how it's done just as long as it does the job. So if you want something different or better, it is re-implemented. Functions are really bad at enabling this because the process is always there. They are not separable. It doesn't even make sense to talk about it with functions. Once we can remove the process from the requirement, only then will significant progress be made.

I find it amazing that the more I look at how we do things in creating software, the more I realise that we've been doing it completely backwards. And what's more frightening is that there are much easier ways to do things.

The greatness of a vocabulary isn't determined by the amount of words or the number of people using it, but by how many other languages assimilate its words.

-Vorlath

Can you C what language has the best vocabulary of all?

Random Thoughts On How We CodeThe Art of Hacking (as in creating hacks)

Comments

Anonymous 17. June 2007, 19:54

Anonymous writes:

vorlath, how old are you?

Anonymous 20. June 2007, 04:25

Anonymous writes:

Yeah--you're a curious person. You seem to know a lot about some things, but are very naive at others but will write authoritatively anyway.

What languages do you work in? What languages do you play in?

Vladas 20. June 2007, 06:09

To anonymous:

Would it have more sence, if it would be not so authoritative or cathegoric? Would you pay more attention to the topic in that case? :wink:

If someone doesn't write "IMHO" after each phrase, it doesn't mean that it's not his IMHO.

Strange people...

Vorlath 20. June 2007, 20:12

To anonymous: if I write authoritatively, it's because it goes against the grain of common (and I believe incorrect) perceptions. I've learned that what I used to know (and most likely what you know right now) was actually wrong as it relates to computers. So this blog divulges some of that newfound knowledge. Naive would be an incorrect description to say the least. Also, when I say 'wrong', I mean that there were deeper and simpler mechanisms that have been brushed aside that truly explain the power of everything we see today and reveals new things not currently in use such as implicit concurrent programming.

If you disagree with what I say, then explain why. If it strikes a nerve, then that's to be expected. It's hard to dislodge things that we used to take for granted. For me, the biggest one was that a function (and/or ordering of functions/statements) was actually not needed for software and that it was actually a hindrance in many cases as they are used in imperative, OOP and FP languages. The notion of vocabulary ranks pretty high up there too.

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31