YouTube2Text

Early Programming: Crash Course Computer Science #10 — Transcript

by CrashCourse · 1,804 words · 152 segments · language en · Watch on YouTube

Full transcript

  1. 0:02Hi, I'm Carrie Anne and welcome to Crash Course Computer Science.
  2. 0:05Over the last few episodes,
  3. 0:07We've talked a lot about the mechanics of how computers work.
  4. 0:10How they use complex circuits to save and retrieve values from memory,
  5. 0:13and perform operations on those values,
  6. 0:15like adding two numbers together.
  7. 0:17We've even briefly talked about sequences of operations,
  8. 0:19which is a computer program.
  9. 0:21What we haven't talked about
  10. 0:22is how a program gets into a computer.
  11. 0:24You might remember in episode 7 and 8 ,
  12. 0:25when we stepped through some simple example programs for the CPU that we had created.
  13. 0:30For simplicity, we just waved our hands
  14. 0:33and said that the program was already magically in memory.
  15. 0:35But in reality, programs have to be loaded into a computer's memory.
  16. 0:38It's not magic. It's computer science.
  17. 0:40[Theme Music]
  18. 0:49The need to programme machines existed way before the development of computers.
  19. 0:53The most famous example of this was in textile manufacturing.
  20. 0:56if you just wanted to weave a big red tablecloth,
  21. 0:58you could simply feed red thread into a loom and let it run.
  22. 1:01But what about if you wanted the cloth to have a pattern like stripes or plaid?
  23. 1:05Workers would have to periodically reconfigure the loom as dictated by the pattern,
  24. 1:09but this was labor intensive which made patterned fabrics expensive.
  25. 1:12In response, Joseph Marie Jacquard developed a programmable textile loom,
  26. 1:16which he first demonstrated in 1801.
  27. 1:18The pattern for each row of the cloth was defined by a punched card.
  28. 1:21The presence or absence of a hole in the card determined
  29. 1:24if a specific threat was held high or low in the loom.
  30. 1:26Such that the cross thread called the weft passed above or below the thread.
  31. 1:30To vary the pattern across rows these punch cards were arranged in long chains,
  32. 1:34forming a sequence of commands for the loom.
  33. 1:36Sound familiar?
  34. 1:37Many consider Jacquard's loom to be one of the earliest forms of programming.
  35. 1:40Punched cards, turned out to be a cheap , reliable,
  36. 1:43fairly human readable way to store data.
  37. 1:45Nearly a century later,
  38. 1:46punch cards were use to help tabulate the 1890 newest census
  39. 1:49which we talked about in episode 1.
  40. 1:51Each card held an individual person's data.
  41. 1:54Things like race,
  42. 1:54marital status,
  43. 1:55number of children,
  44. 1:56country of birth, and so on.
  45. 1:57For each demographic question,
  46. 1:59a census worker would punch out a hole of the appropriate position.
  47. 2:02When a card was fed into the tabulating machine,
  48. 2:04a hole would cause the running total for that specific answer to be increased by one.
  49. 2:09In this way you could feed the
  50. 2:10entire county's worth of people
  51. 2:12and at the end you'd have running totals for all of the questions that you asked.
  52. 2:15It is important to note here that early tabulating machines
  53. 2:18were not truly computers as they can only do one thing-tabulate.
  54. 2:22Their operation was fixed and not programmable.
  55. 2:24Punished cards stored data, but not a program.
  56. 2:26Over the next 60 years, these business machines grew in capability,
  57. 2:30adding features to subtract, multiply, divide,
  58. 2:33and even make simple decisions about when to perform certain operations.
  59. 2:36To trigger these functions appropriately,
  60. 2:38so that different calculations could be performed,
  61. 2:40a programmer accessed a control panel.
  62. 2:42This panel was full of little sockets, into which a programmer would plug cables
  63. 2:45to pass values and signals between different parts of the machine.
  64. 2:50For this reason they were also called plug boards.
  65. 2:52Unfortunately, this meant having to rewire the machine each time a different program needed to be run.
  66. 2:57And so by the 1920s, these plug boards were made swappable.
  67. 3:01This not only made programming a lot more comfortable,
  68. 3:04but also allowed for different programs to be plugged into a machine.
  69. 3:07For example, one board might be wired to calculate sales tax, while another helps with payroll.
  70. 3:12But plug boards were fiendishly complicated to program.
  71. 3:15This tangle of wires is a program for calculating a profit loss summary,
  72. 3:18using an IBM 402 accounting machine, which were popular in the 1940s.
  73. 3:23And this style of plug board programming wasn't unique to electromechanical computers.
  74. 3:26The world's first General-Purpose electronic computer,
  75. 3:30the Eniac, completed in 1946, used a ton of them.
  76. 3:33Even after a program had been completely figured out on paper,
  77. 3:36physically wiring up the Eniac and getting the program to run could take upwards of three weeks.
  78. 3:42Given the enormous cost of these early computers, weeks of downtime simply to switch programs
  79. 3:47was unacceptable and the new, faster, more flexible way to programme machines was badly needed.
  80. 3:51Fortunately by the late 1940s and into the 50s, electronic memory was becoming feasible.
  81. 3:57As costs fell, memory size grew.
  82. 3:58Instead of storing a program as a physical plug board of wires, it became possible to store a program entirely in a computer's memory.
  83. 4:05Where it could be easily changed by programmers and quickly accessed by the CPU.
  84. 4:09These computers were called stored-program computers.
  85. 4:11With enough computer memory, you could store not only the program you wanted to run,
  86. 4:15but also any data your program would need.
  87. 4:17Including new values it created along the way,
  88. 4:20Unifying the progrmming data into a single shared memory is called the von Neumann architecture.
  89. 4:25Named after John von Neumann, a prominent mathematician and physicist,
  90. 4:29who worked on the Manhattan project and several early electronic computers.
  91. 4:33And once said, "I'm thinking about something much more important than bombs, I'm thinking about computers".
  92. 4:38The hallmarks of a von Neumann computer are a processing unit containing an arithmetic logic unit,
  93. 4:43data registers, an instruction register, and an instruction address register.
  94. 4:47And finally, a memory to store both data and instructions.
  95. 4:51Hopefully, this sounds familiar, because we actually built a von Neumann computer in episode 7.
  96. 4:55The very first von Neumann architecture stored program computer
  97. 4:59was constructed in 1948 by the University of Manchester, nicknamed "Baby".
  98. 5:04And even the computer you are watching this video right now uses the same architecture.
  99. 5:08Now electronic computer memory is great and all,
  100. 5:10but you still have to load the programming data in to the computer before it can run.
  101. 5:14And for this reason, punch cards were used.
  102. 5:16Let's get to the Thought Bubble.
  103. 5:17Well into the 1980s, almost all computers had a punch card reader.
  104. 5:20Which could suck in a single punch card at a time and write the contents of the card into the computer's memory.
  105. 5:26If you loaded in a stack of punch cards, the reader would load them all into memory sequentially, as a big block.
  106. 5:31Once the programming data were in memory, the computer would be told to execute it.
  107. 5:35Of course, even simple computer programs might have hundreds of
  108. 5:38instructions, which meant that programs were stored as stacks of punch cards.
  109. 5:41So if you ever have the misfortune of accidentally dropping your program on the floor,
  110. 5:45it could take you hours, days, or even weeks to put the code back in the right order.
  111. 5:49A common trick was to draw a diagonal line on the side of the card stack called striping,
  112. 5:53so you'd have at least some clue how to get it back into the right order.
  113. 5:57The largest program ever punched into punch cards was the US Air Force's sage air defense system, completed in
  114. 6:031955. At its peak, the product is said to have employed
  115. 6:0620% of the world's programmers. Its main control program was stored on a whopping
  116. 6:1162,500 punch cards, which is equivalent to roughly 5 megabytes of data.
  117. 6:16Pretty underwhelming by today's standards.
  118. 6:20And punch cards weren't only useful for getting data into computers, but also getting data out of them.
  119. 6:25At the end of a program, results could be written out of computer memory and onto punch cards by, well, punching cards.
  120. 6:31Then this data could be analyzed by humans or loaded into a second program for additional computation.
  121. 6:36Thanks, Thought Bubble.
  122. 6:38A close cousin to punch cards was punched paper tape,
  123. 6:40which is basically the same idea, but continuously instead of being on individual cards.
  124. 6:44And of course, we haven't talked about hard drives, CD-Roms, DVDs, USB thumb drives, and other similar goodies.
  125. 6:50We'll get to those more advanced types of data storage in a future episode.
  126. 6:54Finally, in addition to plug boards and punch paper,
  127. 6:57there was another common way to program and control computers pre-1980: panel programming.
  128. 7:00Rather than having to physically plug in cables to activate certain functions, this could also be done with huge panels full of switches
  129. 7:07and buttons. And there were indicator lights to display the status of various functions and values in memory.
  130. 7:12Computers of the 50s and 60s often featured huge control consoles that look like this.
  131. 7:17Although it was rare to input a whole program using just switches, it was possible.
  132. 7:21And early home computers made for the hobbyist market used switches extensively, because most home users couldn't afford expensive
  133. 7:27peripherals like punch card readers. The first commercially successful home computer was the Altair 8800, which sold in two versions:
  134. 7:35preassembled and as a kit. The kit, which was popular with amateur computing enthusiasts, sold for the then unprecedented low price of around
  135. 7:42$400 in 1975 or about $2,000 in 2017.
  136. 7:47To program 8800 you'd literally toggle the switches on the front panel to enter the binary Op codes for the instruction you wanted.
  137. 7:53Then you press the deposit button to write that value into memory.
  138. 7:57Then in the next location in memory, you toggle the switches again for your next instruction, deposit it and so on.
  139. 8:03When you had finally entered your whole program into memory, you would toggle the switches, move back
  140. 8:08to memory address zero, press the run button, and watch the little lights blink. That was home computing in 1975, wow.
  141. 8:15Whether it was plug board switches or punched paper
  142. 8:17Programming these early computers was the realm of experts. Either professionals who did this for a living, or technology enthusiasts.
  143. 8:23You needed intimate knowledge of the underlying hardware,
  144. 8:26So things like processor Op codes and register wits to write programs.
  145. 8:30This meant programming was hard and tedious. And even professional engineers and scientists struggle to take full advantage of what computing could offer.
  146. 8:37What was needed was a simpler way to tell computers what to do; a simpler way to write programs.
  147. 8:43And that brings us to programming languages which we'll talk about next episode. See you next week.
  148. 8:49Crash Course Computer Science is produced in association with PBS Digital Studios.
  149. 8:53At their channel you can check out a playlist of shows like Braincraft,
  150. 8:56Coma Niddy and PBS Infinite Series. This episode was filmed at the Chad and Stacey Emigholz studio in Indianapolis, Indiana
  151. 9:03And it was made with the help of all these nice people and our wonderful graphics team is Thought Cafe.
  152. 9:08Thanks for the Random Access Memories, I''ll see you next time.

About this transcript

This page contains the full transcript of Early Programming: Crash Course Computer Science #10 by CrashCourse, generated from the public captions YouTube serves with the video. The transcript has 1,804 words across 152 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.