Speaker 1: Get in text with technology with tech Stuff from stuff
Speaker 1: works dot com. Hey there, and welcome to tech Stuff.
Speaker 1: I'm your host, Jonathan Strickland, a senior writer with health
Speaker 1: stuff works dot com. I hope you guys are doing
Speaker 1: well today. I'm going to start tackling a subject I
Speaker 1: have alluded to in previous episodes, the history of programming languages.
Speaker 1: There's a lot of it, so this will be a
Speaker 1: two parter at the very least, and part one we're
Speaker 1: going to be laying the groundwork for programming languages. Long
Speaker 1: time listeners know this is kind of my m O.
Speaker 1: I like to really make sure that we have a
Speaker 1: foundation before I go into a topic because I feel
Speaker 1: like context is really important. And despite our love of
Speaker 1: stories that have a beginning, middle, and end, typically history
Speaker 1: is not so neat and tidy. We tend to have
Speaker 1: lots of stuff bleed into other things and so it
Speaker 1: gets a little complicated. So before we talk about the
Speaker 1: history of programming languages itself, let's talk about why we
Speaker 1: need programming languages in the first place. Well, when you
Speaker 1: get down to it, computers process machine language, or a
Speaker 1: type of machine language. Machine language in itself is a
Speaker 1: descriptor it is the language that machines quote unquote understand
Speaker 1: and what they are using in order to execute various operations. Uh,
Speaker 1: the machine language of today is the binary code zeros
Speaker 1: and ones. All those instructions that a computer carries out
Speaker 1: essentially boiled down to chains of zeros and ones. So
Speaker 1: in order to really understand programming languages, at least most
Speaker 1: of modern programming languages, we need to understand about binary
Speaker 1: and as it turns out, the concept of using binary
Speaker 1: arithmetic dates back quite a ways, well before the dawn
Speaker 1: of the computer. The earliest scholarly work I could find
Speaker 1: regarding binary arithmetic dates to seventeen o three, eighteenth century.
Speaker 1: It was written by Gottfried Wilhelm Leibniz. The Leibniz was
Speaker 1: a German mathematician and philosopher and one of the two
Speaker 1: people to invent differential and integral calculus. Anyone know who
Speaker 1: the other person was? Bueller, Bueller, I'm sure a lot
Speaker 1: of you are shouting it out right now. It's actually
Speaker 1: sir Isaac Newton. Newton and Leibniz were two co inventors
Speaker 1: of calculus. They did it independently of one another. In
Speaker 1: other words, neither of them were aware of the other
Speaker 1: person's work, which is kind of cool when you think
Speaker 1: about it. It's this this uh, an interesting moment in
Speaker 1: history where you have two different brilliant people coming up
Speaker 1: with the same idea simultaneously. And this is not the
Speaker 1: only time this has happened. There have been quite a
Speaker 1: few times in human history where people in different parts
Speaker 1: of the world have come to the same sort of
Speaker 1: amazing realization at around the same time without ever being
Speaker 1: aware of the other person. As it turns out, they
Speaker 1: both tried to lay claim to being the father of calculus. Uh. Really,
Speaker 1: their followers were more rabid about it than they were.
Speaker 1: And there's in fact, an entire fascinating story about the
Speaker 1: battle for who should be given credit for inventing calculus.
Speaker 1: But that's a story for another podcast. It's really not
Speaker 1: a tech stuff story. You might be a stuff you
Speaker 1: missed in history class story if you really want to
Speaker 1: make some history folks go crazy about talking about, you know,
Speaker 1: lots of maths. But let's go back to binary arithmetic.
Speaker 1: The Leibnitz wrote about binary arithmetic in his memoir De
Speaker 1: la Caademir Royal de san sees ha ha ha, And
Speaker 1: I know my French is terrible. You shouldn't pop off
Speaker 1: from Sabien and Maroisment. His work, though, was the first
Speaker 1: to explain that arithmetic typically relies upon base ten. Makes sense.
Speaker 1: You know your your typical person has five fingers on
Speaker 1: each hand, five toes on each foot. Base ten makes sense.
Speaker 1: You count one to ten with your fingers. So he
Speaker 1: would say that base ten really ranges from the number
Speaker 1: zero up to the number nine, and then you repeat
Speaker 1: that sequence again, only you put a one in the
Speaker 1: second column, you know, the really the tens column, and
Speaker 1: then you start back at zero and work your way
Speaker 1: back up to nine, and then you would put it
Speaker 1: to there, and so on and so forth. So you
Speaker 1: worked up to the one hundreds column and the one
Speaker 1: thousand's column. But he says he found that the simplest
Speaker 1: progression of all to be more useful in the science
Speaker 1: of numbers. That simplest of progressions is between just two
Speaker 1: numbers zero and one before it repeats itself. So the
Speaker 1: number zero is zero, the number one is one. If
Speaker 1: you wanted to represent the number two, you would write
Speaker 1: one zero. So again it's kind of like going zero
Speaker 1: to nine, and then you would go to ten. In
Speaker 1: this case, you go to zero the one, then you
Speaker 1: would go to what is effectively ten that represents the
Speaker 1: number two. Three would be one, one or eleven if
Speaker 1: we were using the decimal system, and a four is
Speaker 1: one zero, zero or one, and so on and so forth.
Speaker 1: Now by the time you get the thirty, you're looking
Speaker 1: at one one, one, one zero, and a thirty two
Speaker 1: is one followed by five zero, so it would be
Speaker 1: one hundred thousand in the base ten system. Leibnitz said
Speaker 1: that this scheme allowed for geometric progression. So if you
Speaker 1: were to take the binary digits for four, which is
Speaker 1: one zero, zero, and then you took the binary digits
Speaker 1: for two, which is one zero, and then as in
Speaker 1: the number one followed by the number zero, and then
Speaker 1: you took the binary digit that represents the number one,
Speaker 1: which in this case is one, and you were to
Speaker 1: add all of those together, you'd end up with one
Speaker 1: on one that is the binary digit for seven, which
Speaker 1: is also what you get when you add four and
Speaker 1: two and one together in base ten. Leimnez says this
Speaker 1: approach allows for lots of practical applications, such as weighing
Speaker 1: a lot of different masses with just a few different
Speaker 1: types of weights or in coinage to allow for many
Speaker 1: different values with just a few coins, So he was
Speaker 1: thinking of practical applications for binary arithmetic. He also said
Speaker 1: that expressing numbers this way allowed for easy mathematical operations
Speaker 1: such as subtraction, multiplication, and division. Leibnitz also said that
Speaker 1: using binary just made sense. You didn't have to memorize
Speaker 1: facts by rote as. Everything was evident through what he
Speaker 1: called ordinary reckoning. So in other words, you wouldn't have
Speaker 1: to memorize things like seven plus eight is fifteen, right,
Speaker 1: You wouldn't have to memorize these sort of ideas, or
Speaker 1: that four times six, you know, what is that? What
Speaker 1: is four times six? I'm asking you know it's twenty four.
Speaker 1: So you wouldn't have to memorize these and and have
Speaker 1: it all by rote But that with the binary approach,
Speaker 1: because you're only working with ones and zeros, there's none
Speaker 1: of that memorization. It's all very intuitive. Now. Granted you
Speaker 1: then have to work out what those ones and zeros
Speaker 1: are representing in the base ten system. That's a little
Speaker 1: more complicated, but it works. Leibnitz Is work predates computers
Speaker 1: by centuries, and there's some evidence to suggest that binary
Speaker 1: counting systems were actually being used by other culture ors
Speaker 1: well before Leibniz came along. They weren't written in scholarly journals,
Speaker 1: but they existed. Some researchers from the University of Norway
Speaker 1: noted that on the island of Manga Manga Riva, and
Speaker 1: I could be completely butchering the pronunciation of that, so
Speaker 1: I apologize. It's a island over in the South Pacific
Speaker 1: Islanders had been using a binary system to count between
Speaker 1: the numbers twenty through eighty. So they used base ten
Speaker 1: for all numbers leading up to twenty, and then between
Speaker 1: twenty and eighty they used binary digits. And they were
Speaker 1: doing this before the fifteenth century, so before the fourteen hundreds,
Speaker 1: the islanders didn't have a written language, which meant that
Speaker 1: whenever they had to do math, which they started having
Speaker 1: to do they began to trade with other islanders and
Speaker 1: other cultures well before the fourteen hundreds. It meant that
Speaker 1: they needed to be able to do math in their
Speaker 1: heads easily, and binary allowed for that as opposed to
Speaker 1: something that's in the decimal ten system. But who considered
Speaker 1: using binary as the basis for machine language? Where did
Speaker 1: that come from, well, that would be much much later,
Speaker 1: And in fact, there's some other elements of programming that
Speaker 1: pre date the decision to go with binary as the
Speaker 1: basic language for computers. So let's look at some of
Speaker 1: those developments because that's kind of again what led to
Speaker 1: the rise in programming itself. So to find the thread
Speaker 1: of this story, we have to go back to eighteen
Speaker 1: o one, so a century after Leibniz was writing about
Speaker 1: binary arithmetic, and that's when Joseph Mrie Jacquard introduced the
Speaker 1: programmable loom. We've talked about this in previous episodes of
Speaker 1: Tech Stuff. The programmable loom was a real innovation back
Speaker 1: in the nineteenth century. The programs consisted of wooden punch cards,
Speaker 1: So you had these large pieces of wood with holes
Speaker 1: punched in through in a certain pattern, and what you
Speaker 1: would do is pass threads through the holes in the
Speaker 1: cards when you were threading up your loom, and those
Speaker 1: holes would essentially dictate what the pattern was going to
Speaker 1: be when you finished. So if you wanted a specific pattern,
Speaker 1: you just put the appropriate punch card, load that up
Speaker 1: for your loom, pass the thread through, and then weave
Speaker 1: on the loom. So that you would get the pattern
Speaker 1: you wanted. You needed to change it up. You just
Speaker 1: switched out the cards that you were using. Uh, so
Speaker 1: different patterns would use different configurations of holes. You know, obviously,
Speaker 1: if the hole is there, then a thread can pass through.
Speaker 1: If there's no hole in that position, then a thread
Speaker 1: cannot pass through. It's pretty pretty intuitive now if you
Speaker 1: think about this in an abstract way. The punch cards
Speaker 1: are like a series of two positions switches. The holes
Speaker 1: are the on switch because they allow a thread to
Speaker 1: pass through, and the areas where a hole could be
Speaker 1: but there isn't a hole is an off switch because
Speaker 1: you cannot pass a thread through a solid piece of wood.
Speaker 1: So Jacquard's loom sped things up and really got things
Speaker 1: moving in the weaving business. It also ended up putting
Speaker 1: a lot of weavers out of work in the process,
Speaker 1: and they got very upset. But it would take a
Speaker 1: couple of decades before someone made the mental leap that
Speaker 1: a punch card could be something that you could use
Speaker 1: with abstract ideas, not just physical material like thread. That
Speaker 1: someone was Charles Babbage who first proposed a mechanical device
Speaker 1: called the difference engine. That was a device that was
Speaker 1: meant to compute tables of numbers, and it was a
Speaker 1: really complicated device with lots of gears and shafts that
Speaker 1: could rotate in different directions, and it would have used
Speaker 1: a lot of moving parts. But Babbage was never able
Speaker 1: to actually finish it. It took longer than what he
Speaker 1: had predicted, and ultimately the funding dried up as various
Speaker 1: patrons got fed up with waiting around for Babbage to
Speaker 1: finish the thing, and they ended up stopped. They stopped
Speaker 1: paying him. But he began to work on a new
Speaker 1: device that he called the analytic engine. And here's where
Speaker 1: Jacquard's work came in. Babbage realized that those punch cards
Speaker 1: that were physically either allowing or preventing thread to pass
Speaker 1: through could act not just as gateways for physical material
Speaker 1: like thread, but also for abstract notions like a problem
Speaker 1: statement or information needed to work out a problem solution.
Speaker 1: So by changing up what could and couldn't pass through,
Speaker 1: you could run a problem through a mechanical calculator. Essentially.
Speaker 1: Now with Babbage's design, we're not talking about electricity. Is
Speaker 1: still gears, mechanical parts that have to connect with one another,
Speaker 1: and all of it is based on physical motion. So
Speaker 1: if you've ever worked with a loud computer that had
Speaker 1: a bad fan or something, you have a hint of
Speaker 1: what it must have sounded like to work on this thing.
Speaker 1: Only the analytic engine involved more clanking, or at least
Speaker 1: I hope it involved more clanking than your computer did.
Speaker 1: If your computer is clanking, you probably should take that
Speaker 1: in to get a bit of an adjustment, or if
Speaker 1: you're really handy, take a look in there, your fan
Speaker 1: is probably out of alignment. While Babbage was working on
Speaker 1: that first analytic engine, he was also helped by the
Speaker 1: world's first computer programmer. Her name was Aida Lovelace, the
Speaker 1: Enchantress of Numbers, and I've done a full episode about
Speaker 1: Lovelace before. I Think the Stuff you Missed in History
Speaker 1: Class podcast has done an episode on Lovelace before. She
Speaker 1: was remarkable, an incredible person, uh, someone who I think
Speaker 1: needs more reck ignition for her contributions to computer science.
Speaker 1: She envisioned a world in which not only could one
Speaker 1: create a punch card program for a calculator to run
Speaker 1: through and give you the solution to a problem, she
Speaker 1: was able to make another mental leap on the same
Speaker 1: level that Charles Babbage had made. Babbage's leap was, hey,
Speaker 1: this card that could allow or prevent thread to pass
Speaker 1: through could also be used in a more abstract way.
Speaker 1: Lovelace's leap was this device that is intended to solve
Speaker 1: mathematical equations and answer those sorts of problems, could also
Speaker 1: be used to do all sorts of other things, things
Speaker 1: that computers today can do. But no one at the
Speaker 1: time was even imagining. She was such a forward thinker
Speaker 1: that she was able to envision a world where you
Speaker 1: could encode all sorts of information and use a device
Speaker 1: like the Analytic Engine to process it information like music
Speaker 1: or images. So the remarkable thing is, years before, decades
Speaker 1: before anything like that would be possible, Lovelace was imagining
Speaker 1: that actually coming to pass. And I really wonder what
Speaker 1: she would think of the world today from a technological standpoint.
Speaker 1: If she was able to look around and see the
Speaker 1: sort of things that computers could do, she might feel
Speaker 1: very much vindicated by this vision she had back in
Speaker 1: the nineteenth century, where electronics were not a thing yet.
Speaker 1: No one had really harnessed electricity in a meaningful way
Speaker 1: at the time that they were working on the analytic engine.
Speaker 1: So it's a really phenomenal thinker. I cannot imagine being
Speaker 1: in a world where I'm able to project ahead that
Speaker 1: far and think of something so abstract and to be
Speaker 1: so right on the money. Really well. The next step
Speaker 1: along the path to programming happened in eighteen nineties, so
Speaker 1: we're getting to the end of the nineteenth century, and
Speaker 1: that was a census year in the United States. So
Speaker 1: in the US we hold a census every decade, and
Speaker 1: the purpose of the census is to determine the representation
Speaker 1: of states in the House of Representatives, that is a
Speaker 1: group in Congress in the legislative branch that is dependent
Speaker 1: upon state populations. So we have the Senate. Every state
Speaker 1: gets to senators, but then we have the House of Representatives,
Speaker 1: and the number that we have is dependent upon the
Speaker 1: population of the various states, which means we occasionally have
Speaker 1: to check and see what the populations are. If they
Speaker 1: changed dramatically, then the number of representatives will again change
Speaker 1: to reflect that. But the U s had hit a
Speaker 1: problem by the end of the nineteenth century. There were
Speaker 1: just too many dang people to count. It was just
Speaker 1: taking really long to count them all by hand. So
Speaker 1: in seventeen nine century earlier. They was also the very
Speaker 1: first year that we held a census. It took nine
Speaker 1: months to count up all the different responses for the
Speaker 1: United States Census. By eight the census, the previous census,
Speaker 1: the one that just happened before. They were trying to
Speaker 1: figure out a new method. It took them seven and
Speaker 1: a half years to tally all the results. Seven and
Speaker 1: a half years to count up the results of the
Speaker 1: previous census. That meant that you were two and a
Speaker 1: half years away from having to do it all over again.
Speaker 1: And so the Census Bureau held a contest, and they
Speaker 1: called for inventors to come up with some way of
Speaker 1: tallying the census responses much more quickly so that they're
Speaker 1: not wasting so much time and money just counting how
Speaker 1: many people are in each state. Enter Herman Hollerith, who
Speaker 1: invented a solution in response to the US Census Bureau
Speaker 1: and offered he won the prize that the bureau was offering. Holly.
Speaker 1: Rith created what he called a card reader. So again
Speaker 1: we get to punch cards, very similar to what was
Speaker 1: being used by Babbage and then previously by Jacquard. This
Speaker 1: red cards by sensing holes that were punched into the cards,
Speaker 1: and it also had a gear mechanism to help keep
Speaker 1: count of all the different things that needed to count
Speaker 1: all the demographic information, and had a panel of dials
Speaker 1: that would track the various counts so that you could
Speaker 1: just look at the different dials and you would get
Speaker 1: a summary of all the different responses. Each card had
Speaker 1: positions on it that would indicate different data about the
Speaker 1: citizen it represented, and his invention meant the eighteen nineties
Speaker 1: census could be tabulated in three years, so less than
Speaker 1: half the time of the previous census, the one that
Speaker 1: had happened in eighteen eighty. It's still a good long
Speaker 1: while to have to count that up, but much much
Speaker 1: faster and more efficient it than the previous census was.
Speaker 1: Hall Earth would go on to found a company called
Speaker 1: the Tabulating Machine Company. That company, by the way, is
Speaker 1: still around today, but its name has changed because the
Speaker 1: Tabulating Machine Company would evolve into International Business Machines, which
Speaker 1: today we know as IBM. So IBM had in its history,
Speaker 1: the original purpose of it was to uh tabulate punch cards,
Speaker 1: and those punch cards were originally used for the eight
Speaker 1: nineties census in the United States. Kind of cool little
Speaker 1: bit of trivia. So if you're ever at pub trivia
Speaker 1: and they're asking where IBM came from, now you know.
Speaker 1: And you also know that the person who's running the
Speaker 1: trivia is a total geek who may also listen to
Speaker 1: the show, So hey, shout out to you, Mr or
Speaker 1: Mrs Trivia Master. Those punch cards would become an important
Speaker 1: part of programming later on now. Arguably the first person
Speaker 1: to build a general purpose computer was a man named
Speaker 1: Conrad Zeussa who designed and built the Z one computer
Speaker 1: in the late nineteen thirties. His device combined electronic and
Speaker 1: mechanical parts, so it wasn't a purely electronic computer. It
Speaker 1: still had some moving parts to it, and he had
Speaker 1: decided to go with binary processing as the basis for
Speaker 1: his computer. It makes it simple because you only need
Speaker 1: to switch with two positions on or off for each
Speaker 1: of your little processors and or gates if you prefer,
Speaker 1: and he thought that made more sense than decimal processing.
Speaker 1: And he used discarded film as his medium to send
Speaker 1: commands to the computer. He wasn't using card stock, he
Speaker 1: wasn't using paper tape, he didn't have access to it,
Speaker 1: but he did use discarded film from various film houses
Speaker 1: in Germany, and he would just punch holes in that
Speaker 1: to be the instructions for his machine. His Z three machine,
Speaker 1: which he built in nineteen forty one, might have been
Speaker 1: the first general purpose programmable digital computer, but it was
Speaker 1: destroyed during a bombing raid in World War Two. Only
Speaker 1: his Z four device was able to make it through
Speaker 1: the war, and for years Zeus's work remained in obscurity.
Speaker 1: No one knew that he had made these things, and
Speaker 1: he had done it again independently of anyone else. So
Speaker 1: you would see the rise of computer science in other
Speaker 1: countries disconnected from his work, and in turn, his work
Speaker 1: was disconnected from their's. Again, another example of these two
Speaker 1: different places with the same ideas coming into shape. He
Speaker 1: arrived at his designs independently of all the other pioneers
Speaker 1: and computer science. We'll talk a little bit about his
Speaker 1: programming language in our next episode, because while he was
Speaker 1: creating a programming language earlier than almost anyone else, it
Speaker 1: didn't become known to most computer scientists until the nineteen seventies. Well,
Speaker 1: I've got a lot more to talk about in the
Speaker 1: history of programming languages, but before I jump into the
Speaker 1: next section. Let's take a quick break to thank our sponsor.
Speaker 1: All Right, during World War Two we get the term computers.
Speaker 1: But here's the interesting thing. Computers were not machines. For
Speaker 1: the most part. In World War two computers the word
Speaker 1: computers referred to people. It applied to human beings, and
Speaker 1: their job was to compute various equations, specifically relating to
Speaker 1: artillery and gunnery when it first started. By World War two,
Speaker 1: our war machines had reached incredible amounts of power and
Speaker 1: you could fire upon positions that were well out of you.
Speaker 1: But it meant that you needed to understand exactly what
Speaker 1: a shell was owing to do when you fired it.
Speaker 1: In other words, based on the power of the gun,
Speaker 1: the weight of the shell, wind, other factors. If you
Speaker 1: fire at a certain elevation, if a certain angle from
Speaker 1: the ground, where is that show going to go? It's
Speaker 1: really important if you want to hit, say, an enemy
Speaker 1: encampment versus just countryside or a town. Well, it meant
Speaker 1: that they needed people who were really good at maths.
Speaker 1: So the army started to hire math majors. But that
Speaker 1: meant that they were looking primarily at women, because the
Speaker 1: men were already drafted into the armed forces, and they
Speaker 1: were serving as soldiers and other frontline personnel. So women
Speaker 1: were predominantly the computers of World War two. These were
Speaker 1: women who were studying mathematics, and we're breaking round in
Speaker 1: the areas of math. So they would work out all
Speaker 1: of these different equations to figure out how things like
Speaker 1: muscle velocity or wind effects or atmospheric drag and other
Speaker 1: factors affected shells, and they created what we're called firing
Speaker 1: tables for various types of weaponry. But there was more
Speaker 1: work than they had manpower or maybe I should say
Speaker 1: woman power to do. So they needed some way to
Speaker 1: do this work more quickly and efficiently, especially where you're
Speaker 1: just taking small changes in a variable in order to
Speaker 1: create another table, because otherwise you just have to run
Speaker 1: all those different equations again. If you could do something
Speaker 1: where you could just make a small change and run
Speaker 1: that same problem and get the answer quickly, it would
Speaker 1: save a lot of time. So there was a need
Speaker 1: for computational engines that could do this work faster. Now
Speaker 1: over at Harvard, engineers built a machine called the Mark one.
Speaker 1: This was the first programmable digital computer made in the
Speaker 1: United States, but one it was not a purely electronic machine.
Speaker 1: It had some mechanical parts to it, including a large
Speaker 1: central shaft that had to be turned by a an
Speaker 1: actual motor and about uh, you know, five horsepower, and
Speaker 1: it also had clutches and relays. It weighed five tons
Speaker 1: and had five hundred miles of wiring inside of it.
Speaker 1: The computer itself was eight feet tall and fifty one
Speaker 1: ft long, and it read instructions on a reel of
Speaker 1: paper tape with holes punched into it. So this was
Speaker 1: like one really long punch card this roll of paper tape.
Speaker 1: And it solved the problem that some other early computer
Speaker 1: programmers ran into, which is, if you have a stack
Speaker 1: of punch cards, and especially if you failed to number
Speaker 1: your stack of punch cards and you dropped that stack,
Speaker 1: then your program was completely out of order and it
Speaker 1: was useless. In fact, it might be easier for you
Speaker 1: to go back and e program using a fresh new
Speaker 1: stack and a hole puncher. Then it would be to
Speaker 1: try and figure out what order the cards had been in. Uh.
Speaker 1: The moral of that story was always number your cards.
Speaker 1: Although very few people have to worry about working with
Speaker 1: punch cards these days, but if you do, always number
Speaker 1: your cards. That way, if you do drop them, then
Speaker 1: you just have to get them in the right sequence again. Uh,
Speaker 1: and it's not as big of a headache. One of
Speaker 1: the programmers of the Mark one was a woman named
Speaker 1: Grace Hopper, who is also credited with creating the term debugging. Now,
Speaker 1: the word bug had been in use for a while
Speaker 1: to designate the idea of a design error or flaw
Speaker 1: that needs to be corrected, whether it's in calculating machine
Speaker 1: or something else. So bugs as a term for something
Speaker 1: that's not right have been around for a while, but
Speaker 1: Grace Hopper got the credit for debugging. She was involved
Speaker 1: in a literal d bugging in which programmers pulled a
Speaker 1: moth out of relay number seventy in the Mark two system.
Speaker 1: We'll talk more about Grace Hopper in a little bit now.
Speaker 1: Around the same time as the Mark one was being
Speaker 1: put together over in the UK, scientists were building another
Speaker 1: machine called the Colossus. This machine was a more specific
Speaker 1: computational device. It wasn't a general purpose computer. It was
Speaker 1: made specifically to break the cryptographic codes sent by German
Speaker 1: officers during World War Two, including codes that were created
Speaker 1: using the Enigma Machine, a fiendishly clever cryptographic device. Now
Speaker 1: I have done a full episode about the Enigma, so
Speaker 1: I'm not going to dwell on it very much here.
Speaker 1: It is a fascinating gadget, and again, Colossus was a
Speaker 1: specific purpose machine. It could not be reprogrammed to do
Speaker 1: really anything else. So while it was fascinating, it also
Speaker 1: had limitations by its very design. But we see here
Speaker 1: that each individual piece of information can come in various forms, right,
Speaker 1: and so especially with punch cards, is essentially on or off. Now,
Speaker 1: the mechanical computer didn't take over the world, and digital
Speaker 1: computers wouldn't really emerge until the nineteen forties and fifties,
Speaker 1: and truly digital electronic computers wouldn't be there till the
Speaker 1: nineteen forties and fifties. But many of the earliest computers
Speaker 1: would use physical switches that you would set before you
Speaker 1: would run any sort of program. So you didn't have
Speaker 1: like a processor. You had all these these banks and
Speaker 1: banks of switches, so you'd have to make sure that
Speaker 1: each switch is in the correct position and all the
Speaker 1: wires are plugged into the correct ports before you would
Speaker 1: run a problem through the calculation machine. Now, if the
Speaker 1: switches had two positions, that's essentially programming in binary zeros
Speaker 1: and ones or or off and on, so that only
Speaker 1: uh counts if the switches have just two positions. If
Speaker 1: you put multiple positions for the switches, then you're not
Speaker 1: using binary, you're using a different system. Uh. But a
Speaker 1: lot of those early machines were using two position switches,
Speaker 1: so they were binary machines. And it makes sense in
Speaker 1: the digital world where on and off are the only
Speaker 1: discrete values, and so in the beginning, programmers built code
Speaker 1: in binary. For the most part, not every machine is
Speaker 1: like this, but a lot of them were. In this world,
Speaker 1: a single unit of information is the bit that is
Speaker 1: either a zero or a one. And I'm sure you've
Speaker 1: heard that eight bits are a bite. Now, that was
Speaker 1: not arbitrarily chosen. There was a reason for eight bits
Speaker 1: to make a bite, and it wasn't the only strategy
Speaker 1: of making bites. There were other versions of the bite
Speaker 1: that were six bits long or twelve bits long. So
Speaker 1: how did eight bits becoming a bite become the standard? Well, honestly,
Speaker 1: that part of our story happens a little bit later.
Speaker 1: So in part two of Programming Languages, we are going
Speaker 1: to revisit bits and bytes to explain why eight bits
Speaker 1: make a byte. But I'm going to talk a lot
Speaker 1: about binary in this particular episode, so that's why I
Speaker 1: had to bring it up here. The next computer I'm
Speaker 1: going to chat about, however, was not dependent upon binary.
Speaker 1: It was dependent upon the decimal system that that base
Speaker 1: ten system. And that computer was one that I mentioned
Speaker 1: recently on a different episode of of Tech Stuff. It
Speaker 1: was in the Weather Models episode. That would be the
Speaker 1: Electronic Numerical Integrator and Computer or ANIAC. It's a very
Speaker 1: early computer, one that I talked about in that Weather
Speaker 1: Models episode just just previously, and it was the brainchild
Speaker 1: of John Mauchley, and several other people worked on it
Speaker 1: as well, obviously, but Marchley was the one who proposed
Speaker 1: an all electronic calculating machine back in nineteen forty two,
Speaker 1: ended up taking a few years to build. The United
Speaker 1: States government, specifically the military, was very interested in this
Speaker 1: because they wanted to have a more uh efficient machine
Speaker 1: to do things like figure out those those firing tables.
Speaker 1: But the ENIAC was not completed until after the conclusion
Speaker 1: of World War Two in nineteen forty five. It was
Speaker 1: the first fully electronic computer with no mechanical parts. The
Speaker 1: electronic nature meant it could complete a calculation in a
Speaker 1: fraction of the time it took the Mark one. So,
Speaker 1: for example, a calculation with the mark one might take
Speaker 1: six seconds for it to complete because it actually involves
Speaker 1: moving physical pieces around in order to get to that calculation. However,
Speaker 1: the ENIAC could do the same calculation in two point
Speaker 1: eight thousands of a second. Then againting yet could only
Speaker 1: store twenty numbers at a time, so there were limitations,
Speaker 1: and for the first ten years of its existence, the
Speaker 1: ENIAC ran more calculations than the totality of all calculations
Speaker 1: performed by human beings before the ENIAC was built. So
Speaker 1: from the dawn of time up to nine humans did
Speaker 1: a certain number of calculations that were dwarfed by the
Speaker 1: first ten years of Niac's operations. However, then it got
Speaker 1: struck by lightning, which reminds us we probably shouldn't get
Speaker 1: too cocky about this sort of thing. We might anger
Speaker 1: thor So. NIAC didn't have a CPU like a modern computer.
Speaker 1: To run a program through NIAC to have it solve
Speaker 1: a problem, you would have to set physical switches that
Speaker 1: had ten positions, and you'd had to plug wires into
Speaker 1: specific ports Before running your calculation. So ANIAC was a big,
Speaker 1: big machine, so big it was a hundred fifty feet
Speaker 1: wide that's forty six meters wide, and it weighed thirty tons,
Speaker 1: and it kind of looked like one of those old
Speaker 1: timey phone operator banks where you'd pull a plug out
Speaker 1: of one socket and place it into another. And some
Speaker 1: of you probably still have no clue what I'm talking about,
Speaker 1: but just imagine a big panel of sockets into which
Speaker 1: you can insert cable plugs, and on one problem, you
Speaker 1: would have a sample configuration of plugs in some of
Speaker 1: those sockets. But let's say you want to run another problem.
Speaker 1: That would mean having to unplug those first cables, plug
Speaker 1: them into different sockets. Each problem would look totally different,
Speaker 1: so you would have to change those physical connections as
Speaker 1: well as the physical orientations of those ten position switches
Speaker 1: that were there. Any act also could not store problems.
Speaker 1: It didn't have a programmed storage capability. It was a
Speaker 1: collection of electronic adding machines and other arithmetic units which
Speaker 1: were originally controlled by a web of large electrical cables.
Speaker 1: According to David Alan Greer in the Annals of the
Speaker 1: History of Computing, the original programmers of ENIAC were Jene
Speaker 1: Jennings Bartek, Francis Betty Snyder Holberton, Kathleen McNulty, Mauchley, Anton Nelly,
Speaker 1: Marlon West, Scoff Meltzer, Ruth Lichtmann, Title Bomb, and Francis
Speaker 1: Bilas Spence. In other words, the first programmers for ENIAC
Speaker 1: were six women, the first programmers of the first fully
Speaker 1: electronic computer. And I think it's really important to drive
Speaker 1: that home because the very history of computer science is
Speaker 1: reliant upon the contributions of women, and frequently, far too frequently,
Speaker 1: in the world of computers, women are are disregarded or
Speaker 1: thought of as being incapable of uh any real meaningful contribution,
Speaker 1: when in fact, the very foundation of computation is on
Speaker 1: the backs of women. Um As as for these six,
Speaker 1: for years the Army failed to acknowledge their contributions. For
Speaker 1: one thing, NIAC was classified and still is to this day,
Speaker 1: classified information, and so their contributions weren't acknowledged as a
Speaker 1: matter of national security for quite some time. But since
Speaker 1: then they have been acknowledged, and I'm glad their story
Speaker 1: is now available for people to hear. It's a pretty
Speaker 1: incredible one and maybe someday I'll do a more specific
Speaker 1: episode about ENIAC and the men and women who were
Speaker 1: instrumental in getting it going. But clearly they're programming didn't
Speaker 1: involve much of a programming language, at least not in
Speaker 1: the way we think of programming languages today. They were
Speaker 1: all looking at the very complicated decimal systems. They were
Speaker 1: setting things up for running a single problem. If you
Speaker 1: wanted to change the problem, you had to change that
Speaker 1: entire set up, that physical setup of the computer. Now,
Speaker 1: the ENIAC team invited another person, John von Neuman, over
Speaker 1: to take a look at it, and I talked about
Speaker 1: von Neuman in the Weather Models episode as well, and
Speaker 1: together the ani ACT team and von Neuman were able
Speaker 1: to kind of come up with the the premise for
Speaker 1: the successor to ani ACT. This would become the EDVAC,
Speaker 1: which was the first stored program computer. EDVAC stands for
Speaker 1: Electronic discrete variable automatic computer, and the stored program aspect
Speaker 1: meant you didn't have to change the physical wiring of
Speaker 1: the device itself. The program would be stored inside the computer,
Speaker 1: not in the arrangement of all its components, and unlike NIA,
Speaker 1: ed VAC would be based on the binary system instead
Speaker 1: of the decimal system. The binary system simplified things because
Speaker 1: you only needed a switch with two positions. And again,
Speaker 1: the decimal based machine meant that you needed switches with
Speaker 1: ten positions. Since you can represent numbers using binary, then
Speaker 1: you know, Leibnitz showed us that centuries earlier, it made
Speaker 1: sense to go with that system. Now, one person who
Speaker 1: realized this and who really nailed it was Claude Shannon,
Speaker 1: another mathematician and someone that I will probably do a
Speaker 1: full episode on again in the future. I actually do
Speaker 1: have a Claude Shannon episode in the archives as well.
Speaker 1: Shannon wrote The Mathematical Theory of Communication in nine to
Speaker 1: set the foundation for the theoretical limits of communication between
Speaker 1: humans and machines. The identified the bit as the fundamental
Speaker 1: unit of information and thus the basic unit of computation.
Speaker 1: For this, Shannon is often cited as one of the
Speaker 1: fathers of computer science. Since the computers could be reprogrammed
Speaker 1: without making physical changes to the machine, it meant that
Speaker 1: you had to do that reprogramming through code, and so
Speaker 1: we finally get into some of the programming languages. Now.
Speaker 1: One of the earliest was called shortcode, originally known as
Speaker 1: brief code, and proposed by Mauchley, you know, was the
Speaker 1: one of the guys behind Eniac. So how is shortcode
Speaker 1: a programming language different from machine code, the language computers
Speaker 1: actually quote unquote understand. Well, we'll find out after we
Speaker 1: take a quick break to thank our sponsor. Alright, So
Speaker 1: how was shortcode different from machine code? Well, shortcode allowed
Speaker 1: programmers to work out problems using mathematical expressions instead of
Speaker 1: machine instructions, so you didn't have to just have everything
Speaker 1: out in zero and ones in binary. You could take
Speaker 1: a couple of shortcuts. It was developed for the UNIVAC computer,
Speaker 1: the first mass produced computer, and also the work of
Speaker 1: Eckert and Mauchley of NIAC fame. This removed programmers from
Speaker 1: the same level of language as the one that the
Speaker 1: machines were using. So you have machine level language that
Speaker 1: refers to the specific language the machine itself quote unquote
Speaker 1: understands the language it uses to process the problems that
Speaker 1: you submit to it. So you can program machines at
Speaker 1: the machine level. But it's hard to do. It tends
Speaker 1: to be tedious and difficult, and it's really easy to
Speaker 1: introduce an error into the programs because it's not very intuitive,
Speaker 1: particularly if you're talking about programming in binary. If you're
Speaker 1: just looking at a bunch of zeros and ones, very quickly,
Speaker 1: you can lose track of what it actually represents. And
Speaker 1: if you put in a zero or a one where
Speaker 1: it should have been the other, everything turns to popsy
Speaker 1: turvy and you've got bugs in your program. You have
Speaker 1: to go back and figure out where the mistake is,
Speaker 1: and then you have to fix it, and that one
Speaker 1: fix may not be enough. You may have to end
Speaker 1: up going down the line and fixing everything that comes
Speaker 1: after it. Beyond machine level languages are things like short code.
Speaker 1: That's that next step up. It's a very very small
Speaker 1: step up. It's actually a low level programming language, which
Speaker 1: means the level of the language is not that far
Speaker 1: off from the machine code itself. It's easier for humans
Speaker 1: to use than pure machine code, but it's not that
Speaker 1: far removed from actual machine code. Another low level programming
Speaker 1: language would be an assembly language, and there are many
Speaker 1: assembly languages. These use simple mnemonic instructions. Assemblers translate this
Speaker 1: into machine code, and because different machines rely on different architectures,
Speaker 1: there are many assembly language is. Essentially, each architecture needs
Speaker 1: its own assembly language. The program that turns that is
Speaker 1: of course called the assembler. The assembly language into machine
Speaker 1: code is your assembler. So in the old days, we
Speaker 1: didn't have a common architecture across computer systems. Computer systems
Speaker 1: were very specifically designed by different manufacturers and often for
Speaker 1: very specific purposes, so there was no compatibility across different machines,
Speaker 1: and your assemblers had to be peculiar to whatever the
Speaker 1: architecture was of that machine that you were working on.
Speaker 1: One ninety two, Grace Hopper, you remember her well. She
Speaker 1: built the first compiler, and it was called the a
Speaker 1: dash O compiler. A compiler's job is to take code
Speaker 1: that's written in a programming language and convert it into
Speaker 1: machine codes. It's sort of like a translator. It takes
Speaker 1: the programming language something that humans can work with, and
Speaker 1: turns it into machine code, something that machines can work with.
Speaker 1: Hopper's compiler was pretty simple and was an effective way
Speaker 1: for Hopper too, As she once said, be lazy. She
Speaker 1: wanted to stop being a programmer and returned to being
Speaker 1: a mathematician, so she wanted to find ways that she
Speaker 1: could generate sort of shortcuts to doing very basic tasks.
Speaker 1: And that's when she built this basic compiler. Copper took
Speaker 1: all these subroutines that she had been using over the years,
Speaker 1: and she put them on a reel of paper tape,
Speaker 1: labeling each subroutine with a call number. Then when she
Speaker 1: needed to run a specific subroutine, she could refer to
Speaker 1: it by the appropriate call number, and the machine could
Speaker 1: find the corresponding section on the paper tape and run
Speaker 1: the subroutine. Now, according to Hopper, people didn't realize the
Speaker 1: significance of her contribution right away. Many people were still
Speaker 1: thinking of computers as glorified calculators, so these were machines
Speaker 1: that could do math, but not much else. Hopper says,
Speaker 1: she you foresaw more complicated programs, but they would need
Speaker 1: things like compilers to offload some of that laborious work
Speaker 1: to make those programs practical. So Hopper was saying, what
Speaker 1: I'm doing here is opening up new opportunities for us
Speaker 1: to use computers. And she said she ran into a
Speaker 1: lot of resistance where people just didn't see it that way.
Speaker 1: They had been used to programming these things by hand,
Speaker 1: working either at machine code level or just barely above
Speaker 1: machine code level, and so it was too complicated to
Speaker 1: consider using it for anything other than just crunching some
Speaker 1: numbers and running some equations. Well, she and her colleagues
Speaker 1: worked on improving this approach and two generations of compilers later.
Speaker 1: With the A two compiler, it became one of the
Speaker 1: first compilers to get extensive use in the computer world,
Speaker 1: and that is what laid the foundation for higher level
Speaker 1: programming languages that fell along that same pathway. At this stage,
Speaker 1: computer languages were mostly reliant on symbols, not on words,
Speaker 1: and Hopper saw need to change that as well. She
Speaker 1: wanted to create a system which programs could be written
Speaker 1: in English. Letters, she reasoned, were really just symbols, so
Speaker 1: they should be something that could be interpreted by a
Speaker 1: compiler and then converted into machine code. So she made
Speaker 1: further adjustments to the compiler she had created, and she
Speaker 1: built something called the flow Matic compiler f L O
Speaker 1: W DASH M A t I C. The flow Matic. Well,
Speaker 1: this set the stage for an important programming language called Cobal.
Speaker 1: But before Cobal, we have to talk about four tran
Speaker 1: So over at IBM, there was a programmer named John
Speaker 1: Backus who was leading a group who are designing a
Speaker 1: programming language and their group had a lofty goal. They
Speaker 1: wanted to create a high level programming language. So in
Speaker 1: other words, they wanted a language that's much closer to
Speaker 1: how we humans tend to communicate with each other, rather
Speaker 1: than the types of languages that machines rely on. Assembly
Speaker 1: language is a low level language, and it's still pretty
Speaker 1: close to machine code, and it's best used for low
Speaker 1: level applications. IBM one is something that would be much
Speaker 1: easier to use from a programming perspective, something that's much
Speaker 1: more robust. For TRAN was the solution, and it stands
Speaker 1: for formula translation. Some folks call it a scientific language.
Speaker 1: It's largely used in the scientific field. For TRAN was
Speaker 1: machine independent as well, which meant that it could run
Speaker 1: on different computers and not just a single type. So
Speaker 1: it wasn't that they had developed this for a particular
Speaker 1: type of IBM computer and that's the only thing it
Speaker 1: would run on. It was meant to run on different
Speaker 1: types of machines, and it was also meant to be
Speaker 1: easy to learn and suitable for a wide variety of uses.
Speaker 1: The tradeoff for high level languages is that it takes
Speaker 1: longer to compile them into machine code, so it's it
Speaker 1: creates a delay in executing the code. You end up
Speaker 1: making it easier to build the code for humans, but
Speaker 1: it's harder for the machine itself to read the code.
Speaker 1: The compiler has to translate more and more, so if
Speaker 1: the language is easier to program in, you can make
Speaker 1: up the gap of that decrease in efficiency for executing
Speaker 1: the code, and that was the case with Fortran. The
Speaker 1: high level nature increased the execution time by about twenty
Speaker 1: so it added more time for it to execute the
Speaker 1: code using the compiler, but it increased the efficiency of
Speaker 1: actual programmers by five percent, so programmers were writing programs
Speaker 1: faster than they were before. They were making up way
Speaker 1: more time because of the ease the relative ease of
Speaker 1: programming and for tran as opposed to programming and say
Speaker 1: assembly language, so it took longer to execute the code,
Speaker 1: but that was more than balanced out by how quickly
Speaker 1: programmers could actually write code. So while back Is Group
Speaker 1: developed for Trand in nineteen fifty four, it wasn't until
Speaker 1: nineteen fifty seven they got a commercial release for Trand
Speaker 1: would become the programming language for the scientific community, which
Speaker 1: is why it's still used in weather modeling applications, as
Speaker 1: I mentioned in our previous episode. Alright, so back to COBAL.
Speaker 1: The development of COBAL took place right around the time
Speaker 1: the third generation of four trand was being developed. COBAL
Speaker 1: would become important because it helped unify efforts in programming.
Speaker 1: Up to that point, all those computers were pretty much
Speaker 1: using their own specific methods of programming. So you couldn't
Speaker 1: build a program meant for one system and poured it
Speaker 1: directly over to another. You'd have to go about rebuilding
Speaker 1: your entire program following the architecture and constraints of your
Speaker 1: new machines architecture UM or design, I should say. And
Speaker 1: so in the late nineteen fifties, some computer scientists set
Speaker 1: out to create a programming language that could run on
Speaker 1: different computers, and that group was then Conference on Data
Speaker 1: Systems Languages or CODACILL c O d A S y L.
Speaker 1: Members of the group included government employees, computer science experts
Speaker 1: from various universities, and members of various industries. So by
Speaker 1: the end of nineteen fifty nine they had settled on
Speaker 1: the specifications of their programming language, and they called it
Speaker 1: the Common Business Oriented Language or COBAL for short. It
Speaker 1: would officially be published in January nineteen sixty after receiving
Speaker 1: approval from an executive committee. How the Department of Defense
Speaker 1: was really behind the effort. They were really pushing for
Speaker 1: it because they were one of the few agencies in
Speaker 1: the world that actually possessed computer systems from different manufacturers,
Speaker 1: So they were running into this problem of having all
Speaker 1: these different computer systems that were incompatible with each other.
Speaker 1: Most other places didn't have that problem because they didn't
Speaker 1: have the money to own that many different systems. They
Speaker 1: were all in with a single system, but a unifying
Speaker 1: language would mean they could run programs on multiple machines
Speaker 1: to handle lots of boring stuff like data management, tracking
Speaker 1: information for inventory, payroll administration, and other tasks. The US
Speaker 1: government would eventually require that all computers sold or least
Speaker 1: to government agencies had to be able to run COBOL software,
Speaker 1: which ensured the languages adoption. It's very sad that was
Speaker 1: Cobal and not Cobold's the little critters from Dudgeons and
Speaker 1: Dragons that end up being low level monsters, but such
Speaker 1: as life now. The custodian of COBAL is the American
Speaker 1: National Standards Institute, which develops and publishes new COBAL standards.
Speaker 1: COBAL saw the most use in government and business applications,
Speaker 1: whereas for TRAN was being used in scientific applications. Now,
Speaker 1: with COBAL and for TRAN, we are in the earliest
Speaker 1: days of computer programming, and I think this is a
Speaker 1: good place for us to include today's episode. In our
Speaker 1: next episode, we're gonna look at how those programming languages
Speaker 1: and a couple of others arose over the years and
Speaker 1: gave birth to different programming languages. We're gonna look at
Speaker 1: how these different languages are different, why are they different,
Speaker 1: what is it that they are able to do because
Speaker 1: of those differences, and kind of explain the various families
Speaker 1: of programming languages and why they exist. So make sure
Speaker 1: you tune into the next episode to learn more. And
Speaker 1: then we're gonna turn our glance to some other form
Speaker 1: of technology, something that doesn't involve supercomputers and programming languages,
Speaker 1: at least not on the technical end, because eventually I
Speaker 1: gotta stop talking about math or my brains will leak
Speaker 1: out of my ears. If you guys have suggestions for
Speaker 1: future episodes of tech Stuff, you should let me know
Speaker 1: by sending me an email. You could scream out the window,
Speaker 1: but I often can't hear you. The email address for
Speaker 1: our show is tech Stuff at how stuffworks dot com
Speaker 1: um or you can drop us a line on Twitter
Speaker 1: or Facebook. The handle it both of those is tech
Speaker 1: Stuff hs W. Remember you can go to twitch dot
Speaker 1: tv slash tech stuff and watch me record these shows live.
Speaker 1: Every Wednesday and Friday, I go live and I record
Speaker 1: episodes of tech Stuff. You get to talk with me,
Speaker 1: I chat with the chat room. We have a grand
Speaker 1: old time, and you also get to see all the
Speaker 1: outtakes that don't make it into the final version. So
Speaker 1: go to twitch dot tv slash tech stuff to check
Speaker 1: out the schedule, and I hope to see you in
Speaker 1: there and I'll talk to you again really soon for
Speaker 1: more on this and thousands of other topics. Because it
Speaker 1: has staff works dot com