Zum Inhalt springen
L

Das Video kommt von YouTube: erst beim Abspielen verbindet sich die Seite mit YouTube (Google).

Every Programming Language Explained in 20 Minutes (Part 2)

Just Explained19:31 35.073 Aufrufe veröffentlicht Auf YouTube

Das Wichtigste aus dem Video

Tipp auf eine Zeit – das Video springt genau dorthin.

Transkriptautomatisch erstellt · 135 Zeilen
Herunterladen
  1. assembly. Before programmers had friendly words like print or add, coding was basically talking to a computer in numbers. Because early computers only
  2. understood machine code, basically zeros and ones, the binary system, humans had to work almost directly with them. Imagine trying to code and you can only
  3. use these zeros and ones for every instruction. And every code block looks like this. One wrong number and good luck finding the mistake. Assembly was
  4. created to make this nightmare less terrible. Instead of memorizing a number for every instruction, programmers could use short words called pneummonics. If
  5. you wanted the processor to add something, simply write add. Want to move data? Just write move. Then a program called an assembler translates
  6. those commands into binary machine code, something the processor actually understands. And that's basically assembly's whole personality. You move
  7. things around, tell the processor exactly what to do, and control everything at a ridiculously low level. It gives you incredible control, but it
  8. also means that writing a simple Hello World program can feel like filling out government paperwork. It was developed by Kathleen Booth in 1947 while working
  9. on some of the earliest computers at Burkebeck College in London. And here's a crazy little detail. She lived long enough to see smartphones, AI, and
  10. modern computers become normal. She died in 2022 at the age of 100. Damn. I guess she did receive a lot of coders blessings. Before you start thinking
  11. like, meh, what's so special about assembly? Let me tell you, a huge amount of the software behind the Apollo moon missions was written in assembly. So,
  12. humans literally reached the moon using this programming language. But here's the weird part. Assembly isn't one universal language. Different processors
  13. have different instruction sets. The processor in a PC and the processor in a phone both have different types of assembly. The basic idea is the same,
  14. but the actual commands can be different. Today, nobody builds an entire modern app in assembly, but it is still used in everything from the code
  15. that helps your PC boot to operating systems, car electronics, routers, and even the firmware inside tiny devices. One important thing before we move
  16. ahead, guys, I've already covered a bunch of coding languages in part one of this series. [music] So, make sure to check that out after this one. Don't
  17. worry, though, you can totally enjoy part two even if you haven't watched part one yet. Let's move on to the next one. Forran assembly made machine code
  18. much easier to deal with, but you were still telling the computer almost every tiny step yourself. Move this number here, add that, store the answer there.
  19. And in the 1950s, scientists basically looked at this and thought, I already know the maths. Why do I have to translate every little step into
  20. computer instructions myself? That frustration led an IBM programmer named John Bakis and his team to build Forran, short for formula translation. Bakus
  21. hated how much work programming took. He even joked later that a lot of his work came from being lazy. He simply wanted an easier way to write programs. And
  22. Forran did exactly that. Instead of breaking a calculation into dozens of tiny computer instructions, scientists could write something much closer to an
  23. actual mathematical formula. And a program called a compiler would translate it into machine code [music] for them. And the difference was
  24. ridiculous. A problem that could take around 1,000 machine instructions could be reduced to just 47 forrand statements. This sounds completely
  25. normal today. Back then, people genuinely thought it wouldn't work. Programmers believed automatically generated code could never be as fast as
  26. code carefully written by an expert. Well, they would have lost their minds today if they saw what AI can do. Anyways, the 4R project was originally
  27. supposed to take only 6 months, but it took nearly 3 years. But when Forran finally arrived in 1957, it worked so well that it completely changed
  28. programming. Suddenly, scientists and engineers didn't need to become machine code experts just to use a computer. FORRAN exploded in fields like
  29. engineering, physics, weather forecasting, spaceflight, and scientific research. NASA used it for flight calculations. And by the way, Forran is
  30. older than NASA. So yeah, it is still used today for things like weather prediction, ocean simulations, and supercomputers. Cobalt. You might have
  31. never coded in this language, but there's a good chance your last payroll ran on it. By the late 1950s, businesses were starting to use computers for
  32. payroll, customer records, banking, and all the boring stuff that absolutely cannot go wrong. The problem was programming these systems was still a
  33. mess. Different computer manufacturers had different machines. Programs weren't easy to move between them and most languages weren't really designed around
  34. the kind of data businesses dealt with every day. So in 1959, representatives from computer companies and the US government actually met at the Pentagon
  35. with an ambitious idea. What if all the businesses could use one common programming language? That language became Cobalt, common businessoriented
  36. language. One of its biggest contributors was Grace Hopper, a programmer and US Navy officer who had already helped create Flomatic, a
  37. language designed to make code look more like normal English. Cobalt followed the same idea. You could write something like add hours to total hours. And even
  38. if you had never coded before, you could probably guess what it meant. But Cobalt was also built for handling huge amounts of business data. It could process
  39. thousands of employee records, bank transactions, or insurance claims one after another. It even handled decimal numbers exactly, which is pretty useful
  40. when those decimals are somebody's money. The funny part is even some of its creators thought it wouldn't last. Howard Bramberg, who worked on the
  41. original Cobalt Committee, actually had a tombstone made for the language because he thought Cobalt was basically finished. That tombstone is now in a
  42. museum. Cobalt is still running, and yes, people still code in it today. mostly maintaining and updating enormous banking and government systems built
  43. decades ago. Basic. Back in the 1960s, computers used to be the size of a room. They cost more than a house, and learning to program wasn't exactly
  44. something an average student could just try after class. [music] They were expensive, complicated, and mostly used by scientists, governments, and big
  45. [music] companies. Two professors at Dartmouth College, John Kemin and Thomas Kurtz, wanted to change that. They believed students shouldn't have to be
  46. computer experts just to use one. So in 1964 they created basic, short for beginners allpurpose symbolic instruction code. And the name pretty
  47. much explains the whole idea. It was supposed to be simple enough for beginners to pick up quickly. The commands were short and readable. You
  48. could type something like print hello, run it, and immediately see the computer respond. [music] That sounds completely normal now, but back then, making
  49. programming this approachable was a pretty big deal. When personal computers started taking off in the 1970s and 80s, basic ended up everywhere. [music]
  50. A lot of early home computers actually came with basic built-in. On some of them, you switched the computer on and basically landed straight into it. So
  51. people would copy little programs from magazines, change a few lines, see what happened, break something, [music] fix it, and slowly learn how programming
  52. worked. For an entire generation, BASIC became their first experience with coding. And here's something you didn't know. A teenager in the 70s got obsessed
  53. with BASIC, dropped out of college, and used it to [music] build his first product. That teenager was Bill Gates. Basic was the very first thing Microsoft
  54. ever sold. Pascal basic made it much easier for beginners to start programming. But as [music] computer science became a proper subject in
  55. universities, teachers had another question. What's the best way to actually teach someone how to program well? And this was something Swiss
  56. computer scientist Niklaus Vert cared a lot about. He felt that students shouldn't just learn enough commands to make a program work. they should learn
  57. how to organize their logic, break a big problem into smaller pieces, and write code that someone else could actually follow. So in 1970, he created Pascal.
  58. And unlike Basic, which was mainly designed to get beginners programming quickly, Pascal was deliberately designed around structured programming.
  59. Instead of letting a program turn into one long chain of instructions, [music] Pascal encouraged you to divide it into clear sections and build the logic step
  60. by step. Commands like go to, which could send the program jumping from one place to another, were exactly the kind of thing structured programming was
  61. trying to rely on less. Basically, basic was great at getting you through the door. Pascal was more interested in teaching you what to do once you were
  62. inside. SQL SQL is a bit of an odd one out compared to languages like basic, Pascal, or C. All of these are generalpurpose languages. It means you
  63. use them to build whole programs, apps, games, whatever. But SQL can't build you an app or a game. It's got zero interest in that. It's like the guy at the party
  64. who only wants to talk about one thing and one thing alone, databases. You see, by the 1970s, computers were getting very good at storing huge amounts of
  65. information. Banks had customer records, companies had employee data, and airlines had reservation details. But actually finding something inside all
  66. this data was very complicated. So researchers at IBM started working on a different idea. What if instead of telling the computer how to search
  67. through the data step by step, you could simply tell it what you wanted. And that idea led to SQL. It stands for structured query language and it was
  68. developed in the 1970s by Donald Chamberlain and Raymond Boyce. For example, if you wanted every customer from New York, you could write something
  69. like select star from customers where city equals New York. It basically means show me all the customers whose city is New York. The database handles the
  70. complicated searching in the background. And unlike a lot of languages from the 1970s, SQL never really disappeared. Even 50 years later, basically every
  71. major system still runs on it. Your bank, Instagram, Amazon, your food delivery app, all of them are firing off SQL behind the scenes every time you tap
  72. something. It just quietly became the language the entire world stores its information in, and nobody's managed to replace it. Pearl. Pearl is the language
  73. that was everywhere in the '90s, then quietly slipped into the background. It was created by a guy named Larry Wall, who was actually a trained linguist
  74. before he got into programming. And this detail is important because he built Pearl to work a bit like a human language. Messy, flexible, and with tons
  75. of different ways to say the same thing. Pearl was ridiculously good at chewing through text. Log files, reports, huge, messy piles of data, you name it. if you
  76. needed to rip through a mountain of text and pull out exactly what you wanted. Pearl did it faster and easier than anything else at the time. Now, you
  77. might be thinking that SQL does the same thing. What makes Pearl different? And why did Shawn just call it the fastest and easiest of its time? Well, for SQL,
  78. your data has to already be neat and organized, sitting in tidy tables inside a database. You ask it a clean question, it gives you a clean answer. Pearl is
  79. the exact opposite. Pearl was built for the messy stuff that isn't organized at all. Let's say you have a million lines of raw website logs. Every single visit
  80. dumped together with no order to it whatsoever. That data was never in a database, so SQL can't touch it. But Pearl, Pearl can tear through that
  81. entire pile in seconds and pull out exactly what you want, like every visitor from Chicago who visited the website on a Tuesday. That was Pearl's
  82. superpower. And this superpower made it the duct tape of the internet. When the early web was being built in the9s, a huge chunk of it was held together by
  83. Pearl scripts quietly doing the boring work behind the scenes. Craigslist was built in Pearl and still runs on it. Early Amazon used a lot of Pearl. IMDb
  84. ran on it and even Booking.com was heavily coded in Pearl. But that same flexibility became its problem. Pearl code could get so dense and cryptic that
  85. even the person who wrote it couldn't read it a month later. People started jokingly calling it write once, read never. And when cleaner languages like
  86. Python came along, offering the same power without the chaos, a lot of people just switched Lua. Most programming languages are designed to build the
  87. whole program. But Lua was designed to sneak inside one. In 1993, a team at PUC Rio, a university in Brazil, was building software that needed to be
  88. customized without rewriting the application every time. So, Robert Urusimchi, Luise Henrik Defiguredo, and Waldemar Celis created Lua. Damn, hu
  89. Brazilians have pretty complicated names. Lua's whole point was to be tiny, fast, and easy to slip inside software already built in C or C++. Developers
  90. would deliberately embed Lua right into their software code. So, if they wanted to change how something behaved, they didn't need to crack open the core code.
  91. they could just edit a separate Luis script instead. This turned out to be incredibly useful for video games. A game engine can handle the heavy stuff,
  92. graphics, physics, memory, while Lua scripts control things like what an enemy does, what happens when you press a button, or when an event should
  93. trigger. And because Lua is small and easy to learn, developers can change those behaviors without rebuilding the engine. That's why Lua ended up inside
  94. games like World of Warcraft and Angry Birds. Roblox also has a close connection to it. Roblox games now use Lua, a language derived from Lua 5.1.
  95. Oh, and Lua means moon in Portuguese. One of the languages that helped inspire its creation was called Saul, which is Portuguese for sun. So, Lua, the new
  96. language, got the opposite name. More than 30 years later, Lua is still actively developed and used in games, embedded systems, software tools, and
  97. applications around the world, Ruby. By the early 1990s, programmers already had plenty of languages to choose [music] from. But Japanese programmer Yukihiro
  98. Matsumoto, better known as Matts, asked a simple question. What if writing code could actually make programmers happy? Computers shouldn't be the only ones
  99. comfortable reading the code. Programmers should enjoy writing it, too. And this led to the birth of Ruby in 1995. It was designed to read almost
  100. like normal language. Instead of forcing programmers to write lots of complicated symbols and repetitive code, Matts wanted them to express an idea clearly
  101. and let the language handle more of the boring stuff. Even the name has a fun story. Ruby was partly inspired by Pearl. So Matts wanted another gemstone
  102. name and he eventually chose Ruby after [music] the birthstone of one of his colleagues. But there was something else that took Ruby from a beloved little
  103. language to a global phenomenon. In 2004, [music] a developer built a tool on top of it called Ruby on Rails. And Rails was almost magic for its time. It
  104. let a single person build a full working website ridiculously fast when the same thing used to take a whole team months. Suddenly, one founder in a bedroom could
  105. launch a real product over a weekend. That kicked off an entire era. Twitter, Airbnb, GitHub, Shopify, all of them were originally built on Ruby on Rails.
  106. It became the language of the startup boom. The thing you reached for when you had an idea and wanted it live, like yesterday. Oh, and true to its happy
  107. roots, the Ruby community has an actual unofficial motto. Matts is nice, so we are nice. They literally built kindness into the culture, Swift. Around 2008,
  108. Apple had a big problem. Developers were building iPhone and Mac apps mostly with Objective C, a language that had been around since the 1980s. It was powerful,
  109. but Apple wanted something more modern, easier to read, safer to write, and still [music] fast enough for serious apps. So, in 2010, Apple engineer Chris
  110. Latner quietly started working on a new programming language. For years, only a small group inside Apple knew about it. Then, at WWDC's Apple event in 2014,
  111. [music] Apple finally revealed it to the world. >> What would it be like if we had Objective C without the baggage of C?
  112. We did more than think about it. We have a new programming language. [cheering] [applause]
  113. [applause] The language is called Swift and it totally rules.
  114. >> Swift was designed to make common programming mistakes harder to make. For example, one of its big features is something called optionals. Basically,
  115. if a piece of data might be missing, [music] Swift makes you deal with that possibility and fix it right there instead of just assuming it exists and
  116. letting [music] the app crash later. But Apple also wanted the language to feel cleaner. Something simple like printing text could just be written as print
  117. hello without a lot of extra code around it. Apple also knew it couldn't expect developers to rewrite years of existing Objective C apps overnight. So, Swift
  118. was designed to work alongside Objective C, letting developers slowly add Swift to apps they had already built instead of starting from zero. Swift quickly
  119. [music] became the preferred language for building apps across Apple's ecosystem, iPhone, iPad, Mac, Apple Watch, and Apple TV. Then, Apple did
  120. something unusual for one of its major technologies. In 2015, it made Swift open source, meaning developers outside Apple could contribute to it and even
  121. bring [music] it to other platforms like Linux. Today, Swift is still actively developed and remains one of the main languages behind modern Apple apps,
  122. Cotlin. If Swift is the language for building on the iPhone, Cotlin is the one for the other side of the world, [music] Android. And for years, if you
  123. wanted to build an Android app, you only had Java. Now, Java worked. It was rock solid. It still is. But it was also old and wordy. The kind of language where
  124. saying something simple took a whole formal paragraph. You'd sit down to write hello and somehow stand up an hour later having typed an essay. So a
  125. company called Jet Brains who [music] made tools for programmers got tired of it and built something better. They released Cotlin in 2011 and the pitch
  126. was basically Java without the pain. Everything Java could do but cleaner, shorter, and far less annoying to write. Where Java made you write 10 lines,
  127. Cotlin often did it in two or three. For a while it was just a nice little alternative that some developers quietly loved. Then the big moment came. In
  128. 2017, Google officially backed it and soon after named Cotlin the preferred language for building Android apps. That's about as close as programming
  129. gets to a royal coronation. Practically overnight, the recommended way to build for a huge chunk of the world's phones was this cleaner, friendlier language,
  130. and developers jumped ship without looking back. And the smartest part, the same move Swift pulled is that Cotlin gets along just fine with Java. Old Java
  131. code and new Cotlin code can sit in the same project without a fight which almost never happens with two languages in one room. So nobody had to burn down
  132. decades of work to switch. They just started writing the new stuff in Cotlin and left the old stuff alone. Oh, and Cotlin is named after a real island near
  133. St. Petersburg, [music] which sounds random until you remember Java is also named after an island, the one in Indonesia where the coffee comes from.
  134. So JetBrands basically named their language after an island as a quiet little wink, like a younger sibling going, "Yeah, [music] we're the next
  135. Java. Don't worry about it.

Zum Nachlesen