Why You Can’t Just Tell Your Computer What You Want It To Do
I was taking my morning constitutional through reddit today when I clicked through to the blog post “We need a programming language for the rest of us“. It’s basically a short rant about programming being hard and it not being fair to the average Joe who can’t speak computerese and dammit why ain’t the gubmint doin’ sumpin’ ’bout it??? I left a long comment in reply, and thought it would make a good blog post of my one. So without further ado, here is why you can’t just tell your computer what you want it to do in plain old English.
The problem with programming languages isn’t that they’re too complicated, or even that they’re “unnatural”. Programming languages are in fact laughably simple when compared to human languages. There are only a very few syntactical rules, and they have a vocabulary of just a couple hundred words at most. Learning a programming language is FAR easier than learning a human language, no question about it.
No, the problem is that computers are stupid. Incredibly powerful calculating engines and inhumanly fast, to be sure, but unbelievably stupid by any other human standard. Computers do not understand ANYTHING. I mean, how many times have you slammed your head into your keyboard, screaming “NOOOOO! DAMMIT, JUST DO WHAT I WANT YOU TO DO!!!”? More than once, I’m willing to bet, and if you’re a programmer you’ve probably already invested in a nice padded keyboard to keep your forehead from scarring up too much.
So, computers are definitely dumber than a sack full of doorknobs. To be able to parse a natural language like English, a computer would need to be able to comprehend context and semantics. In order to do that, it unfortunately seem to need to be just as intelligent as a human is; all the research seems to point to the idea that in order to understand what humans are gibbering about, you have to more or less be as smart as a human. Smarter, actually, if you really want a computer that will completely understand what you mean when you say something. After all, there is still plenty of room for misunderstanding between two average human language speakers even when doing something like giving directions to drive a car from point A to point B. Unfortunately, artificial intelligence like that is still well beyond the state of the art and will be for some decades to come. Which is why you tell a programmer what you want and the programmer (who is hopefully as smart as you and can understand what you mean) writes a program instead of you telling the computer what you want and having it write a program to do what you want.
Even using a high level language with libraries of functions and methods that others have built before you to call on, it’s still incredibly time consuming and frustrating. You still need to know those functions and methods and when to call them, because the computer DOESN’T. Remember, it’s stupid. It doesn’t understand context, not even a little bit. So while to you or me it’s obvious from context that to draw a stick figure cartoon man you’re going to need a circle for a head, a line for the body, and some angled lines sticking off the main line for the arms and legs… a computer still needs to be told that all, every time, explicitly. You’re going to have to tell it to call those libraries to draw those shapes and how to arrange them all in relation to each other, using the very simple and extremely limited tiny little programming language it can barely parse.
To give you an example, imagine explaining to a four year old child how to drive to the grocery store, get all the groceries you’ll need for the week, pay for them, and then bring them home and put them away for you. Got it? Ok, now also imagine that the kid is also deaf, dumb and blind and can only be instructed via tapping morse code on the tip of it’s left pinky finger while it dances the hokey-pokey. Go on, imagine it. I’ll wait right here for you to uncurl from the fetal position and overcome the horror associated at the idea of having to do that before I continue. Alright, now that you’ve recovered I can tell you: a computer is not even as capable as that kid.
And THAT is what makes programming hard: not the language, which is really very simple in nature, but having to write reams and reams and reams of instructions for a complete idiot who can never just ‘get’ what you mean, using just the few words it can understand, over and over again.