If you have never written a computer program - and I'm assuming that most of you haven't - you might well be under the impression that computer programming is an esoteric discipline requiring special skills possessed only by a few. But programming - like almost any discipline - can be exercised at a whole range of experience and skill levels. Mathematics at the Phd. level is incomprehensible to most of us, including me, but that doesn't mean that all math is difficult: 2 + 2 = 4. Here's a programming version of 2 + 2. Copy and paste (or type, if you really want the full experience) the following line of code into your browser's address bar (the place where you type in web site addresses):
javascript: alert("Hello world, I'm a programmer!");
Then just click on "OK" to end your new program. Congratulations, you're a programmer! In subsequent posts, you'll learn how to do much more clever things. But before you get too far into self-congratulation, I need to keep you a bit honest here. The reason that little bit of code worked at all is that it built on top of literally millions of lines of other code, written by thousands of programmers you never met. And those programmers themselves worked for perhaps a dozen or more companies, and were mostly strangers to each other. And that whole edifice is, in turn, built on a few brief decades of technological history and development. How on earth did we get here?
Well, there are many pieces to that history, far too many to document here. But here is one big part of that history:
The woman in that picture is Grace Murray Hopper. If celebrity was a function of achievement, Hopper would be one of the 20th century's most remembered figures. I guess I might say that Hopper was the predecessor to Bill Gates and Steve Jobs, but it is probably unfair to Gates and Jobs to compare them to somebody that smart.
What did Hopper do? Lots of things, but arguably her most important achievement was to make the world of modern computer programming possible by developing the concept of a computer programming language.
You may know that the modern computer traces its lineage back to the World War 2 era, when scientists and cryptographers developed machines to help them do calculations and analyze patterns in order to crack enemy communications codes (that's right, hacking and identity theft is what computers were originally invented to do). One famous example is the machine the secret British Ultra project used to decrypt the German Enigma cypher, and win the submarine war in the Atlantic. Another was this machine, the first computer Grace Hopper worked with in 1943.
You'll notice that these computing machines were quite literally machines, with lots and lots of moving parts. They were built to do a specific job, like most machines before or after them. They were narrowly configurable within the context of their explicit purpose, in the narrow sense that, say, your microwave oven is configurable. The mechanical switches in these machines soon gave way to electrical switches - vacuum tubes - and each computer developed a very limited set of low-level tasks that could be triggered: adding or subtracting two numbers, for instance. This set of tasks is often called the instruction set of a computer, and the human-readable expression of that instruction set is often called "machine language". By feeding the computer a very long list of these low level instructions in machine language, you could get it do some work for you.
But programming computers via machine language was extremely limiting. Imagine trying to instruct a fellow human being how to perform a complex task using a total vocabulary of 20 words, with no other visual, auditory, or other sensory cues available. That's what it's like programming in machine language. To replicate your simple Hello World program above in machine language would require many thousands, if not millions, of machine language statements.
Grace Hopper's innovation was to build a very special kind of program called a compiler. A compiler is a program that writes machine language for you, by interpreting a language designed to be understood by humans. A compiler, then, is just a translator, capable of speaking the arcane language of a particular piece of computer hardware when given the text of a language spoken by programmers.
So a compiler accomplishes three important objectives. First, it allows us to program in a language better understood by human brains. Second, it allows programs written in a programming language to be compiled - translated - and run on different kinds of computing hardware (notice, there were no browser-specific or Mac/Windows specific instructions to running our little program above). Third, as we've just seen, it allows the development of a language where just one word or statement can represent many thousands of instructions, and therefore dramatically speeds up the programming process.
Hopper's innovation was the final conceptual step in the development of the modern general purpose computer, the innovation that made the computer an entirely different kind of machine. It is now so familiar to us that we take it for granted. We buy this thing called a computer, with it's case and display and keyboard and mouse. And then, without making a single physical alteration, we load software, and magically convert this "computer" to a machine that can variously edit words, compute the family budget, play games, display pictures, play video and audio, design houses and roads and machines, connect us to friends we'll never meet in person. The computer is the only machine we buy in the expectation that it will get better as we own it - because the software will get better, and enable new and better uses. That is a great part of the wonder of this thing we call software.
In future posts, we'll investigate this wondrous phenomenon from many angles, bottom up, top down, and in between. For now, I hope I've held your interest long enough to continue that investigation with me.
javascript: alert("Hello world, I'm a programmer!");
Then just click on "OK" to end your new program. Congratulations, you're a programmer! In subsequent posts, you'll learn how to do much more clever things. But before you get too far into self-congratulation, I need to keep you a bit honest here. The reason that little bit of code worked at all is that it built on top of literally millions of lines of other code, written by thousands of programmers you never met. And those programmers themselves worked for perhaps a dozen or more companies, and were mostly strangers to each other. And that whole edifice is, in turn, built on a few brief decades of technological history and development. How on earth did we get here?
Well, there are many pieces to that history, far too many to document here. But here is one big part of that history:
The woman in that picture is Grace Murray Hopper. If celebrity was a function of achievement, Hopper would be one of the 20th century's most remembered figures. I guess I might say that Hopper was the predecessor to Bill Gates and Steve Jobs, but it is probably unfair to Gates and Jobs to compare them to somebody that smart.
What did Hopper do? Lots of things, but arguably her most important achievement was to make the world of modern computer programming possible by developing the concept of a computer programming language.
You may know that the modern computer traces its lineage back to the World War 2 era, when scientists and cryptographers developed machines to help them do calculations and analyze patterns in order to crack enemy communications codes (that's right, hacking and identity theft is what computers were originally invented to do). One famous example is the machine the secret British Ultra project used to decrypt the German Enigma cypher, and win the submarine war in the Atlantic. Another was this machine, the first computer Grace Hopper worked with in 1943.
You'll notice that these computing machines were quite literally machines, with lots and lots of moving parts. They were built to do a specific job, like most machines before or after them. They were narrowly configurable within the context of their explicit purpose, in the narrow sense that, say, your microwave oven is configurable. The mechanical switches in these machines soon gave way to electrical switches - vacuum tubes - and each computer developed a very limited set of low-level tasks that could be triggered: adding or subtracting two numbers, for instance. This set of tasks is often called the instruction set of a computer, and the human-readable expression of that instruction set is often called "machine language". By feeding the computer a very long list of these low level instructions in machine language, you could get it do some work for you.
But programming computers via machine language was extremely limiting. Imagine trying to instruct a fellow human being how to perform a complex task using a total vocabulary of 20 words, with no other visual, auditory, or other sensory cues available. That's what it's like programming in machine language. To replicate your simple Hello World program above in machine language would require many thousands, if not millions, of machine language statements.
Grace Hopper's innovation was to build a very special kind of program called a compiler. A compiler is a program that writes machine language for you, by interpreting a language designed to be understood by humans. A compiler, then, is just a translator, capable of speaking the arcane language of a particular piece of computer hardware when given the text of a language spoken by programmers.
So a compiler accomplishes three important objectives. First, it allows us to program in a language better understood by human brains. Second, it allows programs written in a programming language to be compiled - translated - and run on different kinds of computing hardware (notice, there were no browser-specific or Mac/Windows specific instructions to running our little program above). Third, as we've just seen, it allows the development of a language where just one word or statement can represent many thousands of instructions, and therefore dramatically speeds up the programming process.
Hopper's innovation was the final conceptual step in the development of the modern general purpose computer, the innovation that made the computer an entirely different kind of machine. It is now so familiar to us that we take it for granted. We buy this thing called a computer, with it's case and display and keyboard and mouse. And then, without making a single physical alteration, we load software, and magically convert this "computer" to a machine that can variously edit words, compute the family budget, play games, display pictures, play video and audio, design houses and roads and machines, connect us to friends we'll never meet in person. The computer is the only machine we buy in the expectation that it will get better as we own it - because the software will get better, and enable new and better uses. That is a great part of the wonder of this thing we call software.
In future posts, we'll investigate this wondrous phenomenon from many angles, bottom up, top down, and in between. For now, I hope I've held your interest long enough to continue that investigation with me.