WEBVTT

1
00:00:00.080 --> 00:00:03.319
<v Speaker 1>So imagine you are hungry and you ask a friend

2
00:00:03.319 --> 00:00:04.559
<v Speaker 1>to make you a peanut butter sandwich.

3
00:00:04.559 --> 00:00:05.839
<v Speaker 2>Okay, sounds good, right.

4
00:00:05.960 --> 00:00:07.240
<v Speaker 1>You just say, hey, could you whip me up a

5
00:00:07.280 --> 00:00:09.359
<v Speaker 1>PB and J. Yeah, And they just do it. They

6
00:00:09.400 --> 00:00:11.160
<v Speaker 1>know to walk to the pantry, they get the bread,

7
00:00:11.160 --> 00:00:12.119
<v Speaker 1>they unscrew the jar.

8
00:00:12.240 --> 00:00:13.960
<v Speaker 2>Yeah, and they use a butter knife, not a spoon.

9
00:00:14.160 --> 00:00:16.440
<v Speaker 2>It is all entirely seamless.

10
00:00:16.120 --> 00:00:22.440
<v Speaker 1>Exactly because you both share this massive amount of unspoken

11
00:00:22.559 --> 00:00:23.440
<v Speaker 1>human context.

12
00:00:23.559 --> 00:00:26.440
<v Speaker 2>We really do. I mean, we rely on intuition to

13
00:00:26.519 --> 00:00:29.399
<v Speaker 2>fill in the gaps of our communication every single day.

14
00:00:29.640 --> 00:00:33.840
<v Speaker 1>But now imagine asking a painfully literal robot to do

15
00:00:33.880 --> 00:00:36.479
<v Speaker 1>that exact same thing. Oh boy, Yeah, you say, put

16
00:00:36.479 --> 00:00:39.600
<v Speaker 1>peanut butter on the bread. The robot grabs the unopened

17
00:00:39.600 --> 00:00:42.880
<v Speaker 1>glass jar and just smashes it directly into the loaf

18
00:00:42.880 --> 00:00:43.280
<v Speaker 1>of bread.

19
00:00:43.320 --> 00:00:46.280
<v Speaker 2>Crunch, glass and peanut butter everywhere.

20
00:00:45.920 --> 00:00:48.719
<v Speaker 1>Everywhere, because you know, you didn't explicitly tell it to

21
00:00:48.799 --> 00:00:50.119
<v Speaker 1>unscrew the lids, so it didn't.

22
00:00:50.280 --> 00:00:53.520
<v Speaker 2>It is basically the perfect recipe for disaster. When we

23
00:00:53.560 --> 00:00:56.880
<v Speaker 2>try to talk to machines, we realize very quickly just

24
00:00:57.039 --> 00:00:59.679
<v Speaker 2>how much we take our human intuition for granted.

25
00:01:00.039 --> 00:01:00.520
<v Speaker 1>We really do.

26
00:01:00.640 --> 00:01:04.799
<v Speaker 2>Yeah, we speak in generalities, but machines they only understand absolutes.

27
00:01:05.200 --> 00:01:07.719
<v Speaker 1>And that is exactly why you are joining us for

28
00:01:07.760 --> 00:01:10.920
<v Speaker 1>this deep dive today. We are looking at a world

29
00:01:11.159 --> 00:01:13.239
<v Speaker 1>completely devoid of human.

30
00:01:13.040 --> 00:01:15.519
<v Speaker 2>Intuition, a very literal world.

31
00:01:15.439 --> 00:01:18.840
<v Speaker 1>Super literal. The mission for our deep dive is to

32
00:01:18.959 --> 00:01:24.040
<v Speaker 1>explore how humans and machines actually communicate. And to do this,

33
00:01:24.159 --> 00:01:27.560
<v Speaker 1>we're using Steven R. Davis's book CLUS plus for Dummies

34
00:01:27.560 --> 00:01:30.319
<v Speaker 1>seventh edition as our guide today.

35
00:01:30.120 --> 00:01:32.719
<v Speaker 2>Which is great because it serves as a fantastic foundation

36
00:01:32.799 --> 00:01:33.599
<v Speaker 2>for this whole topic.

37
00:01:33.680 --> 00:01:37.439
<v Speaker 1>Absolutely, but just to be clear to you listening, our

38
00:01:37.439 --> 00:01:40.040
<v Speaker 1>goal today is not to have you memorize code or

39
00:01:40.159 --> 00:01:41.120
<v Speaker 1>like learn syntax.

40
00:01:41.319 --> 00:01:43.159
<v Speaker 2>No, we aren't building a mobile app here.

41
00:01:43.079 --> 00:01:46.280
<v Speaker 1>Right, No apps today. Instead, we want to look under

42
00:01:46.280 --> 00:01:50.319
<v Speaker 1>the hood of C plus plus to understand the really fascinating,

43
00:01:50.439 --> 00:01:53.000
<v Speaker 1>highly literal way that computers actually think.

44
00:01:53.079 --> 00:01:55.319
<v Speaker 2>We are going to see how a programming language acts

45
00:01:55.319 --> 00:01:59.000
<v Speaker 2>as this ultimate middleman, you know, translating our messy human

46
00:01:59.000 --> 00:02:02.079
<v Speaker 2>intentions into cold, hard binary reality.

47
00:02:02.200 --> 00:02:04.920
<v Speaker 1>Because the underlying truth of computing is that processes are

48
00:02:04.920 --> 00:02:08.080
<v Speaker 1>incredibly fast, but they are also incredibly stupid.

49
00:02:08.240 --> 00:02:10.360
<v Speaker 2>Right, they do not speak English, They don't understand the

50
00:02:10.360 --> 00:02:11.639
<v Speaker 2>concept of a sandwich.

51
00:02:11.280 --> 00:02:12.439
<v Speaker 1>At all, not even a little bit.

52
00:02:12.759 --> 00:02:16.919
<v Speaker 2>No, they only understand machine language, which is really nothing

53
00:02:17.000 --> 00:02:20.520
<v Speaker 2>more than an endless see of microscopic electrical signals turning

54
00:02:20.520 --> 00:02:22.560
<v Speaker 2>on and off billions of times a second.

55
00:02:22.759 --> 00:02:26.240
<v Speaker 1>Okay, let's unpack this, because if they only speak voltage

56
00:02:26.240 --> 00:02:30.240
<v Speaker 1>and we only speak human language, we obviously need a translator.

57
00:02:30.639 --> 00:02:33.520
<v Speaker 1>We do. It is like we need to draft a

58
00:02:33.639 --> 00:02:40.039
<v Speaker 1>peace treaty for this ultra efficient but painfully literal alien species.

59
00:02:40.400 --> 00:02:43.240
<v Speaker 1>And that, I guess is the role of an intermediate

60
00:02:43.280 --> 00:02:44.800
<v Speaker 1>language like C plus plus N.

61
00:02:45.120 --> 00:02:47.280
<v Speaker 2>That is a great way to put it. You, as

62
00:02:47.319 --> 00:02:49.800
<v Speaker 2>the human programmer, write what is known as a source

63
00:02:49.800 --> 00:02:50.919
<v Speaker 2>file in a text.

64
00:02:50.759 --> 00:02:52.759
<v Speaker 1>Editor, and that looks a bit like English, right, Yeah,

65
00:02:52.800 --> 00:02:53.159
<v Speaker 1>it looks a.

66
00:02:53.159 --> 00:02:55.840
<v Speaker 2>Bit like English combined with some heavy algebra. But the

67
00:02:55.840 --> 00:02:58.599
<v Speaker 2>computer still cannot read that source file. It is still

68
00:02:58.639 --> 00:02:59.159
<v Speaker 2>too human.

69
00:02:59.240 --> 00:02:59.960
<v Speaker 1>So what happens to it?

70
00:03:00.680 --> 00:03:03.639
<v Speaker 2>Well, a specialized program called a compiler has to step

71
00:03:03.639 --> 00:03:04.719
<v Speaker 2>in to bridge that gap.

72
00:03:04.800 --> 00:03:07.080
<v Speaker 1>Okay, I always hear that term compiling. Yeah, but what

73
00:03:07.159 --> 00:03:09.439
<v Speaker 1>is it actually doing mechanically? I mean, it is not

74
00:03:09.680 --> 00:03:11.879
<v Speaker 1>just reading the text aloud to the computer.

75
00:03:12.000 --> 00:03:15.199
<v Speaker 2>No, it is entirely reconstructing it. The compiler takes your

76
00:03:15.319 --> 00:03:19.439
<v Speaker 2>human readable source file and meticulously translates it into object code.

77
00:03:19.599 --> 00:03:20.360
<v Speaker 1>Object code.

78
00:03:20.400 --> 00:03:23.439
<v Speaker 2>Okay, right, but it doesn't stop there. It then performs

79
00:03:23.479 --> 00:03:24.800
<v Speaker 2>a process called linking.

80
00:03:25.039 --> 00:03:26.680
<v Speaker 1>What does linking do think of linking?

81
00:03:26.840 --> 00:03:29.759
<v Speaker 2>Like taking different chapters written by different authors. Maybe you

82
00:03:29.759 --> 00:03:34.280
<v Speaker 2>wrote one chapter and a standard C plus plus library

83
00:03:34.400 --> 00:03:37.360
<v Speaker 2>provided another chapter. Oh I see, yeah, and it binds

84
00:03:37.400 --> 00:03:41.800
<v Speaker 2>them all together into one cohesive, executable book that the

85
00:03:41.800 --> 00:03:44.560
<v Speaker 2>computer's processor can actually open and run.

86
00:03:44.919 --> 00:03:48.800
<v Speaker 1>That makes sense. And C plus plus is uniquely positions

87
00:03:48.800 --> 00:03:50.919
<v Speaker 1>for this kind of heavy lifting, isn't it. Yeah, because

88
00:03:50.919 --> 00:03:53.479
<v Speaker 1>the source mentions it is certified as a ninety nine

89
00:03:53.520 --> 00:03:55.439
<v Speaker 1>point nine percent pure standard.

90
00:03:55.879 --> 00:03:59.240
<v Speaker 2>Yes, and it is considered a low level language.

91
00:03:58.800 --> 00:04:01.000
<v Speaker 1>Which honestly sounds like an insult, like it is less

92
00:04:01.000 --> 00:04:02.039
<v Speaker 1>sophisticated or something.

93
00:04:02.120 --> 00:04:04.280
<v Speaker 2>It does sound bad, But in this world, being low

94
00:04:04.400 --> 00:04:05.879
<v Speaker 2>level is a massive compliment.

95
00:04:06.039 --> 00:04:06.960
<v Speaker 1>Really. Why is that?

96
00:04:07.319 --> 00:04:10.560
<v Speaker 2>Because being low level means it operates very close to

97
00:04:10.599 --> 00:04:13.840
<v Speaker 2>the physical hardware of the computer. There are fewer layers

98
00:04:13.840 --> 00:04:17.319
<v Speaker 2>of abstraction between your code and the actual silicon chips.

99
00:04:17.399 --> 00:04:20.319
<v Speaker 1>Oh wow, so you are right down there near the metal.

100
00:04:20.279 --> 00:04:23.800
<v Speaker 2>Exactly that proximity to the metal is why C plus

101
00:04:23.800 --> 00:04:27.680
<v Speaker 2>plus is heavily used for things where performance absolutely counts,

102
00:04:28.000 --> 00:04:32.560
<v Speaker 2>things like high end video games, graphics, rendering, direct hardware control.

103
00:04:32.680 --> 00:04:34.439
<v Speaker 1>So it is blazingly fast.

104
00:04:34.240 --> 00:04:38.000
<v Speaker 2>Extremely fast, but because it sits so close to the hardware,

105
00:04:38.480 --> 00:04:41.160
<v Speaker 2>it forces the programmer to be incredibly precise.

106
00:04:41.439 --> 00:04:44.560
<v Speaker 1>It demands that precision because, like we said earlier, it

107
00:04:44.600 --> 00:04:46.720
<v Speaker 1>totally lacks that human intuition. Right.

108
00:04:46.759 --> 00:04:49.600
<v Speaker 2>A computer does exactly what it is told, nothing more

109
00:04:49.879 --> 00:04:50.560
<v Speaker 2>and nothing.

110
00:04:50.360 --> 00:04:53.920
<v Speaker 1>Less, and C plus plus enforces this reality through some

111
00:04:54.639 --> 00:04:56.600
<v Speaker 1>incredibly strict grammar rules.

112
00:04:56.360 --> 00:05:00.199
<v Speaker 2>Right, oh, violently strict. For instance, the compiler will completely

113
00:05:00.240 --> 00:05:03.240
<v Speaker 2>ignore all the blank spaces or tabs or empty lines

114
00:05:03.279 --> 00:05:04.040
<v Speaker 2>you put in your code.

115
00:05:04.079 --> 00:05:05.959
<v Speaker 1>Wait, really, even if I format it nicely so I

116
00:05:05.959 --> 00:05:06.959
<v Speaker 1>can read it yep to.

117
00:05:06.959 --> 00:05:09.319
<v Speaker 2>The machine, that is just called white space, and it

118
00:05:09.399 --> 00:05:11.920
<v Speaker 2>just throws it out. It does not care about your formatting.

119
00:05:12.199 --> 00:05:15.399
<v Speaker 2>But it is obsessively strict about capitalization.

120
00:05:15.000 --> 00:05:17.720
<v Speaker 1>Right the case sensitivity, because if you type I int

121
00:05:17.920 --> 00:05:21.360
<v Speaker 1>in all capital letters, it means absolutely nothing to the computer.

122
00:05:21.319 --> 00:05:23.720
<v Speaker 2>Nothing at all. It will just stare at you blankly

123
00:05:24.120 --> 00:05:27.319
<v Speaker 2>and probably throw an error that crashes your entire bills.

124
00:05:27.360 --> 00:05:29.800
<v Speaker 1>But if you type in in all lowercase letters.

125
00:05:30.000 --> 00:05:32.720
<v Speaker 2>Suddenly it understands you perfectly. It knows you are giving

126
00:05:32.720 --> 00:05:34.319
<v Speaker 2>it specific vital command.

127
00:05:34.839 --> 00:05:40.240
<v Speaker 1>That is wild. This strict literal nature really dictates everything

128
00:05:40.279 --> 00:05:41.920
<v Speaker 1>about how we interact with the machine.

129
00:05:41.959 --> 00:05:45.120
<v Speaker 2>It dictates everything. We can't just throw vague concepts or

130
00:05:45.240 --> 00:05:47.319
<v Speaker 2>you know, floating ideas at a processor.

131
00:05:47.439 --> 00:05:48.560
<v Speaker 1>So what do we do instead?

132
00:05:48.680 --> 00:05:51.680
<v Speaker 2>We have to package our data, our numbers, our text,

133
00:05:51.800 --> 00:05:54.879
<v Speaker 2>our logical states. We have to put them into very specific,

134
00:05:55.000 --> 00:05:58.120
<v Speaker 2>rigid containers before the machine will even acknowledge them.

135
00:05:58.279 --> 00:06:00.759
<v Speaker 1>Okay, so if the computer is this pain fully literal

136
00:06:00.800 --> 00:06:04.040
<v Speaker 1>with our commands, how does it handle our actual information?

137
00:06:04.759 --> 00:06:06.839
<v Speaker 2>Well, it uses variables, right.

138
00:06:06.720 --> 00:06:08.800
<v Speaker 1>But if I think about basic algebra, a variable is

139
00:06:08.879 --> 00:06:11.279
<v Speaker 1>just the magic box. You say x equals one, and

140
00:06:11.319 --> 00:06:13.519
<v Speaker 1>then later you can say x equals an entire sentence,

141
00:06:13.839 --> 00:06:15.399
<v Speaker 1>and the math just rolls with it.

142
00:06:15.680 --> 00:06:18.519
<v Speaker 2>Yeah, human math is flexible like that. But C plus

143
00:06:18.519 --> 00:06:21.480
<v Speaker 2>plus does not allow that kind of freedom, not at all.

144
00:06:21.920 --> 00:06:24.439
<v Speaker 1>You have to tell the computer exactly what shape the

145
00:06:24.480 --> 00:06:27.160
<v Speaker 1>box is before you are allowed to put anything inside

146
00:06:27.160 --> 00:06:27.959
<v Speaker 1>it exactly.

147
00:06:28.399 --> 00:06:31.639
<v Speaker 2>C plus plus is what we call a strongly typed language.

148
00:06:31.720 --> 00:06:32.439
<v Speaker 1>Strongly typed.

149
00:06:32.639 --> 00:06:36.199
<v Speaker 2>Yes, every variable is essentially a holding tank and you

150
00:06:36.279 --> 00:06:40.240
<v Speaker 2>must declare the exact type, the exact physical dimensions of

151
00:06:40.279 --> 00:06:42.600
<v Speaker 2>that holding tank in the computer's memory before you ever

152
00:06:42.680 --> 00:06:42.959
<v Speaker 2>use it.

153
00:06:43.079 --> 00:06:45.360
<v Speaker 1>And the most common box is that lowercase T we

154
00:06:45.519 --> 00:06:47.279
<v Speaker 1>just mentioned right, which stands for integer.

155
00:06:47.480 --> 00:06:50.160
<v Speaker 2>Right, whole numbers one to negative fifty.

156
00:06:50.319 --> 00:06:55.160
<v Speaker 1>But relying on integers introduces a massive mechanical flaw. The

157
00:06:55.160 --> 00:06:57.079
<v Speaker 1>book calls it the truncation problem.

158
00:06:57.240 --> 00:06:59.680
<v Speaker 2>Yes, this is where the literal nature of the machine

159
00:07:00.160 --> 00:07:01.480
<v Speaker 2>really bites the programmer.

160
00:07:01.639 --> 00:07:04.199
<v Speaker 1>Let me use a real world analogy to explain how

161
00:07:04.240 --> 00:07:07.240
<v Speaker 1>bizarre this is to you listening. Imagine you are trying

162
00:07:07.279 --> 00:07:10.560
<v Speaker 1>to split three leftover pizzas among three friends.

163
00:07:10.639 --> 00:07:12.160
<v Speaker 2>Okay, you, me and another buddy.

164
00:07:12.319 --> 00:07:16.120
<v Speaker 1>Right, But the accountant managing our pizza party only understands

165
00:07:16.120 --> 00:07:20.279
<v Speaker 1>whole pizzas. They are literally incapable of comprehending a fraction.

166
00:07:20.519 --> 00:07:23.560
<v Speaker 2>They do not have the mental architecture for a slice.

167
00:07:23.240 --> 00:07:26.680
<v Speaker 1>Exactly an integer. Only accountant handling the catering.

168
00:07:26.879 --> 00:07:27.959
<v Speaker 2>That sounds terrible.

169
00:07:28.199 --> 00:07:30.560
<v Speaker 1>It is. So we have three pizzas. I take the

170
00:07:30.600 --> 00:07:33.120
<v Speaker 1>first one and divide it by three people. The account

171
00:07:33.199 --> 00:07:35.519
<v Speaker 1>looks at it and says, one divided by three is

172
00:07:35.600 --> 00:07:38.680
<v Speaker 1>less than one whole pizza. Therefore, the result.

173
00:07:38.399 --> 00:07:40.879
<v Speaker 2>Is zero, and they physically take the slices and throw

174
00:07:40.879 --> 00:07:41.439
<v Speaker 2>them into the.

175
00:07:41.399 --> 00:07:44.360
<v Speaker 1>Trash, right into the trash. You take the second pizza

176
00:07:44.439 --> 00:07:48.920
<v Speaker 1>divide by three, the accountant truncates it again zero into.

177
00:07:48.759 --> 00:07:52.399
<v Speaker 2>The trash, and our buddy does the same thing zero exactly.

178
00:07:52.879 --> 00:07:55.279
<v Speaker 1>We started with three hole pizzas, we divide them up

179
00:07:55.279 --> 00:07:58.720
<v Speaker 1>to eat, and the computer mathematically calculates that we now

180
00:07:58.759 --> 00:08:02.920
<v Speaker 1>have zero plus zero plus zero, which is zero pizzas.

181
00:08:03.040 --> 00:08:06.240
<v Speaker 2>It is infuriating to a human, but it is flawlessly

182
00:08:06.360 --> 00:08:07.639
<v Speaker 2>logical to the machine.

183
00:08:07.720 --> 00:08:09.040
<v Speaker 1>That is so frustrating.

184
00:08:09.199 --> 00:08:12.399
<v Speaker 2>It is if you use integer math in C plus

185
00:08:12.399 --> 00:08:15.680
<v Speaker 2>plus to divide one by three, the fractional part isn't

186
00:08:15.759 --> 00:08:17.920
<v Speaker 2>rounded down, it is simply lopped off.

187
00:08:18.079 --> 00:08:18.920
<v Speaker 1>It just vanishes.

188
00:08:19.160 --> 00:08:22.120
<v Speaker 2>It vanishes into the ether because the integer holding tank

189
00:08:22.240 --> 00:08:25.279
<v Speaker 2>literally has no physical memory space to store a decimal point.

190
00:08:25.319 --> 00:08:27.240
<v Speaker 1>Wait, so if it just throws away the traction, I

191
00:08:27.279 --> 00:08:30.839
<v Speaker 1>am literally losing data every single time I do basic.

192
00:08:30.560 --> 00:08:32.039
<v Speaker 2>Division, every single time.

193
00:08:32.240 --> 00:08:35.240
<v Speaker 1>Why on Earth can't the computer just figure it out? Yeah,

194
00:08:35.320 --> 00:08:37.320
<v Speaker 1>why can't it just see that one divided by three

195
00:08:37.440 --> 00:08:37.879
<v Speaker 1>is a third?

196
00:08:38.080 --> 00:08:40.600
<v Speaker 2>Well, the creators of the language did provide a tool

197
00:08:40.639 --> 00:08:45.120
<v Speaker 2>to handle fractions, but it comes with a significant architectural.

198
00:08:44.519 --> 00:08:46.679
<v Speaker 1>Catch, of course it does. What is the catch?

199
00:08:47.000 --> 00:08:49.879
<v Speaker 2>To store decimals, you have to use a completely different

200
00:08:49.960 --> 00:08:53.440
<v Speaker 2>type of holding tank, a variable type called a float,

201
00:08:53.840 --> 00:08:56.279
<v Speaker 2>which is short for floating point number.

202
00:08:56.159 --> 00:08:58.399
<v Speaker 1>Oh, or you can use its bigger cousin the double

203
00:08:58.519 --> 00:08:59.440
<v Speaker 1>right exactly.

204
00:08:59.720 --> 00:09:03.639
<v Speaker 2>The boxes are specifically engineered to handle the decimal point.

205
00:09:03.720 --> 00:09:06.759
<v Speaker 1>Oh. Perfect problem solve, Then we just use floats for

206
00:09:06.799 --> 00:09:08.720
<v Speaker 1>everything and fire the integer account.

207
00:09:08.840 --> 00:09:12.519
<v Speaker 2>If only were that simple. There is a constant, unavoidable

208
00:09:12.600 --> 00:09:15.840
<v Speaker 2>trade off in computer science between speed and accuracy. Ah

209
00:09:16.000 --> 00:09:20.519
<v Speaker 2>the catch right, Integers are lightning fast. The computer's processor

210
00:09:20.559 --> 00:09:23.840
<v Speaker 2>can crunch millions of integer calculations in the blink of

211
00:09:23.879 --> 00:09:27.480
<v Speaker 2>an eye because they are so simple exactly. Floats require

212
00:09:27.639 --> 00:09:31.200
<v Speaker 2>vastly more computational work. But the real danger isn't just

213
00:09:31.279 --> 00:09:34.639
<v Speaker 2>the speed. It is that floats introduce round off errors.

214
00:09:35.000 --> 00:09:38.519
<v Speaker 1>Round off errors because a computer, as a physical object

215
00:09:38.919 --> 00:09:41.720
<v Speaker 1>doesn't understand the concept of infinity precisely.

216
00:09:42.080 --> 00:09:45.720
<v Speaker 2>Mathematically, one divided by three is point three three three

217
00:09:45.879 --> 00:09:49.279
<v Speaker 2>repeating forever right infinitely. But a computer only has a

218
00:09:49.320 --> 00:09:53.039
<v Speaker 2>finite amount of physical memory. A float variable can only

219
00:09:53.080 --> 00:09:55.799
<v Speaker 2>hold about seven digits of accuracy before it runs out

220
00:09:55.799 --> 00:09:58.200
<v Speaker 2>of space, so it just stops. It stops. It stores

221
00:09:58.240 --> 00:10:01.960
<v Speaker 2>that infinite concept as a very finite three point three

222
00:10:02.120 --> 00:10:04.679
<v Speaker 2>three three three three three. And if you take that

223
00:10:04.759 --> 00:10:06.960
<v Speaker 2>float and multiply it back by three, you do not

224
00:10:07.000 --> 00:10:09.399
<v Speaker 2>get ten. You get nine point nine nine nine nine.

225
00:10:09.519 --> 00:10:12.200
<v Speaker 1>Oh well, think about that. If you are checking out

226
00:10:12.200 --> 00:10:14.399
<v Speaker 1>of an online cart or looking at your banking app,

227
00:10:14.639 --> 00:10:16.200
<v Speaker 1>someone is stealing fractions of ascent.

228
00:10:16.320 --> 00:10:18.120
<v Speaker 2>Yeah, the math just doesn't add up perfectly.

229
00:10:18.320 --> 00:10:20.799
<v Speaker 1>Or worse, if you are calculating the trajectory of a

230
00:10:20.840 --> 00:10:24.360
<v Speaker 1>spacecraft returning to orbit, nine point nine nine nine nine

231
00:10:24.399 --> 00:10:27.480
<v Speaker 1>is not ten. That tiny missing fraction could mean missing

232
00:10:27.519 --> 00:10:28.679
<v Speaker 1>the atmosphere entirely.

233
00:10:28.759 --> 00:10:31.440
<v Speaker 2>It is a real problem. Now, the larger double box

234
00:10:31.480 --> 00:10:32.440
<v Speaker 2>tries to mitigate this.

235
00:10:32.600 --> 00:10:33.559
<v Speaker 1>How much larger is it?

236
00:10:33.840 --> 00:10:36.039
<v Speaker 2>Well, an inbox has a limit of about two billion,

237
00:10:36.320 --> 00:10:40.120
<v Speaker 2>which sounds enormous until you realize modern processors perform billions

238
00:10:40.120 --> 00:10:42.360
<v Speaker 2>of operations every single second.

239
00:10:42.639 --> 00:10:45.159
<v Speaker 1>Right, they chew through two billion instantly exactly.

240
00:10:45.519 --> 00:10:48.759
<v Speaker 2>The double box can hold massively larger numbers, up to

241
00:10:48.840 --> 00:10:50.279
<v Speaker 2>ten to the thirty eighth power.

242
00:10:50.440 --> 00:10:51.879
<v Speaker 1>That is a staggering number.

243
00:10:51.960 --> 00:10:55.840
<v Speaker 2>It is huge. But even the mighty double starts losing

244
00:10:55.919 --> 00:11:00.240
<v Speaker 2>accuracy and generating garbage data after about thirteen or sixteen digits,

245
00:11:00.440 --> 00:11:03.000
<v Speaker 2>you just can't win. You really can. You can have

246
00:11:03.120 --> 00:11:07.039
<v Speaker 2>massive numbers with loose precision or small numbers with type precision,

247
00:11:07.480 --> 00:11:10.440
<v Speaker 2>but the physical limits of memory mean you cannot have both.

248
00:11:10.759 --> 00:11:14.519
<v Speaker 1>So we are basically forced to store our data in

249
00:11:14.559 --> 00:11:18.480
<v Speaker 1>these inherently flawed containers. We have integers that are blazingly

250
00:11:18.519 --> 00:11:22.080
<v Speaker 1>fast but throw away fractions, and floats that are mathematically

251
00:11:22.159 --> 00:11:24.279
<v Speaker 1>precise but slightly inaccurate.

252
00:11:24.440 --> 00:11:26.000
<v Speaker 2>That is the reality of the hardware.

253
00:11:26.039 --> 00:11:28.559
<v Speaker 1>But once you have your data sitting in those flawed boxes,

254
00:11:28.600 --> 00:11:30.279
<v Speaker 1>you have to make them interact. You have to get

255
00:11:30.279 --> 00:11:32.440
<v Speaker 1>the computer to actually make decisions.

256
00:11:32.279 --> 00:11:35.200
<v Speaker 2>And getting a machine to make a logical choice based

257
00:11:35.240 --> 00:11:38.879
<v Speaker 2>on that flawed math is surprisingly dangerous. I can imagine

258
00:11:38.960 --> 00:11:42.600
<v Speaker 2>decision making is what makes a program appear intelligent. You know,

259
00:11:42.639 --> 00:11:46.360
<v Speaker 2>if this specific condition happens, execute that specific command in C.

260
00:11:46.559 --> 00:11:49.559
<v Speaker 1>Plus plus ah. The core of that decision making process

261
00:11:49.679 --> 00:11:52.720
<v Speaker 1>is boolean logic, isn't it, which is handled by a

262
00:11:52.759 --> 00:11:54.840
<v Speaker 1>tiny variable type called bool.

263
00:11:54.720 --> 00:11:58.159
<v Speaker 2>Yes, named after George Boole, the nineteenth century mathematician.

264
00:11:58.399 --> 00:12:01.600
<v Speaker 1>Right, and a bool variable is the simplest box of all.

265
00:12:02.080 --> 00:12:04.879
<v Speaker 1>It can only hold one of two values true.

266
00:12:04.679 --> 00:12:08.279
<v Speaker 2>Or false exactly, though in the early days C plus

267
00:12:08.320 --> 00:12:10.720
<v Speaker 2>plus just use integers to represent this logic.

268
00:12:11.240 --> 00:12:12.120
<v Speaker 1>How does that work?

269
00:12:12.360 --> 00:12:16.000
<v Speaker 2>A zero meant false and absolutely any other number meant true.

270
00:12:16.240 --> 00:12:19.559
<v Speaker 1>Oh that is interesting. That still works under the hood today.

271
00:12:19.679 --> 00:12:22.519
<v Speaker 1>But using the words true and false makes the code

272
00:12:22.600 --> 00:12:23.879
<v Speaker 1>much more readable for humans.

273
00:12:23.960 --> 00:12:24.840
<v Speaker 2>It definitely does.

274
00:12:25.080 --> 00:12:28.240
<v Speaker 1>But here's where that strict, unforgiving grammar comes back to

275
00:12:28.320 --> 00:12:32.320
<v Speaker 1>haunt us. Let's talk about the catastrophic difference between typing

276
00:12:32.360 --> 00:12:35.919
<v Speaker 1>a single equal sign and typing two equal signs.

277
00:12:35.919 --> 00:12:38.840
<v Speaker 2>Oh man, this is a rite of passage. Every programmer

278
00:12:38.879 --> 00:12:41.919
<v Speaker 2>makes this mistake at least once. Really, Oh yeah, A

279
00:12:41.960 --> 00:12:45.279
<v Speaker 2>single equal sign is an assignment operator. It is a command.

280
00:12:45.360 --> 00:12:47.960
<v Speaker 2>A command right, It means take the value on the

281
00:12:48.039 --> 00:12:50.200
<v Speaker 2>right side and violently shove it into the box on

282
00:12:50.240 --> 00:12:50.919
<v Speaker 2>the left side.

283
00:12:50.960 --> 00:12:52.080
<v Speaker 1>Shove it in there, okay.

284
00:12:52.320 --> 00:12:56.080
<v Speaker 2>But two equal signs is an entirely different concept. It

285
00:12:56.200 --> 00:13:00.919
<v Speaker 2>is a question. It means are these two things currently identical?

286
00:13:01.440 --> 00:13:03.639
<v Speaker 1>So if I am writing code for an e commerce

287
00:13:03.679 --> 00:13:06.519
<v Speaker 1>site and I want to ask the computer is the

288
00:13:06.639 --> 00:13:10.759
<v Speaker 1>user's shopping cart equal to zero? But I accidentally use

289
00:13:10.840 --> 00:13:13.559
<v Speaker 1>one equal sign, then you are in trouble because I'm

290
00:13:13.600 --> 00:13:17.480
<v Speaker 1>not asking a question anymore. I am actively emptying their cart.

291
00:13:17.759 --> 00:13:20.000
<v Speaker 1>I am commanding the computer to set their cart to.

292
00:13:20.039 --> 00:13:23.519
<v Speaker 2>Zero, and the compiler will happily execute that command. Even

293
00:13:23.519 --> 00:13:25.720
<v Speaker 2>if you buried it inside an if.

294
00:13:25.440 --> 00:13:26.919
<v Speaker 1>Statement, It just does it.

295
00:13:26.919 --> 00:13:28.960
<v Speaker 2>It views the destruction of the shopping cart as a

296
00:13:29.039 --> 00:13:32.840
<v Speaker 2>highly successful operation. It ruins the entire logic of your program.

297
00:13:32.960 --> 00:13:33.840
<v Speaker 1>That is terrifying.

298
00:13:34.039 --> 00:13:36.519
<v Speaker 2>It is. But even if you master the grammar and

299
00:13:36.639 --> 00:13:39.120
<v Speaker 2>use the double equal sign correctly to ask a question,

300
00:13:39.600 --> 00:13:42.360
<v Speaker 2>you still run headfirst into the math quirks we just discussed.

301
00:13:42.480 --> 00:13:46.200
<v Speaker 2>Oh right, You should virtually never use the equality operator

302
00:13:46.240 --> 00:13:49.519
<v Speaker 2>the double equals to compare two floating point numbers.

303
00:13:49.320 --> 00:13:51.600
<v Speaker 1>Because of the roundoff errors we talked about. Exactly, if

304
00:13:51.639 --> 00:13:55.840
<v Speaker 1>the computer is asking is ten exactly equal to nine

305
00:13:55.879 --> 00:13:59.759
<v Speaker 1>point nine nine nine nine, it will boldly shout false,

306
00:14:01.039 --> 00:14:03.480
<v Speaker 1>even though any human looking at the equation knows the

307
00:14:03.519 --> 00:14:05.200
<v Speaker 1>math was supposed to result in ten.

308
00:14:06.120 --> 00:14:09.279
<v Speaker 2>Exact equality is a total myth when it comes to floats,

309
00:14:09.679 --> 00:14:12.679
<v Speaker 2>because of the microscopic inaccuracies and how they are stored,

310
00:14:12.960 --> 00:14:15.000
<v Speaker 2>you always have to ask if they are close enough.

311
00:14:15.039 --> 00:14:17.000
<v Speaker 2>Close enough, Yeah, you have to write extra code to

312
00:14:17.039 --> 00:14:19.679
<v Speaker 2>check if the difference between the two numbers is incredibly small.

313
00:14:20.000 --> 00:14:21.799
<v Speaker 2>Rather than asking if they match.

314
00:14:21.639 --> 00:14:25.360
<v Speaker 1>Perfectly, that is so tedious. But the way the computer

315
00:14:25.440 --> 00:14:29.000
<v Speaker 1>evaluates multiple logical questions at once is where it gets

316
00:14:29.159 --> 00:14:30.159
<v Speaker 1>genuinely wild.

317
00:14:30.159 --> 00:14:31.519
<v Speaker 2>To me, Oh, you mean short circuiting.

318
00:14:31.720 --> 00:14:35.639
<v Speaker 1>Yes, C plus plus is secretly incredibly lazy.

319
00:14:35.799 --> 00:14:39.000
<v Speaker 2>Well, we prefer to call it ruthlessly efficient. In computer science,

320
00:14:39.039 --> 00:14:40.759
<v Speaker 2>we call this short circuit evaluation.

321
00:14:40.879 --> 00:14:42.879
<v Speaker 1>Okay, let me give an example. Let's say you have

322
00:14:42.879 --> 00:14:45.279
<v Speaker 1>a logical A and D statement. For example, I will

323
00:14:45.279 --> 00:14:47.480
<v Speaker 1>only go outside if it is sunny. A and D

324
00:14:48.000 --> 00:14:49.000
<v Speaker 1>I have my sound glasses.

325
00:14:49.120 --> 00:14:49.639
<v Speaker 2>Makes sense.

326
00:14:49.840 --> 00:14:51.679
<v Speaker 1>Both of those things must be true for the whole

327
00:14:51.679 --> 00:14:52.519
<v Speaker 1>sentence to be true.

328
00:14:52.600 --> 00:14:55.080
<v Speaker 2>Right In C plus plus A, you represent that A

329
00:14:55.159 --> 00:14:57.039
<v Speaker 2>and D with a double Ampersand.

330
00:14:56.879 --> 00:14:59.320
<v Speaker 1>Now if I look out the window and it is

331
00:14:59.399 --> 00:15:03.440
<v Speaker 1>pouring down, that first condition is its sunny.

332
00:15:03.600 --> 00:15:05.440
<v Speaker 2>Yeah is false, completely false.

333
00:15:05.480 --> 00:15:07.679
<v Speaker 1>And because it's an A and D statement, the entire

334
00:15:07.759 --> 00:15:10.120
<v Speaker 1>operation is already ruined. Doesn't it matter if I have

335
00:15:10.159 --> 00:15:13.120
<v Speaker 1>my sunglasses in my pocket or not, I'm not going outside.

336
00:15:13.279 --> 00:15:17.639
<v Speaker 2>And the computer's processor recognizes this inevitability, it does yes,

337
00:15:18.399 --> 00:15:23.240
<v Speaker 2>to save precious microseconds of processing power. If the first

338
00:15:23.279 --> 00:15:26.039
<v Speaker 2>condition in an A and D statement evaluates to false

339
00:15:26.360 --> 00:15:29.440
<v Speaker 2>C plus plus completely ignores the second condition.

340
00:15:29.559 --> 00:15:30.399
<v Speaker 1>It just skips it.

341
00:15:30.399 --> 00:15:32.799
<v Speaker 2>It's short circuits. It refuses to even look at the

342
00:15:32.799 --> 00:15:35.519
<v Speaker 2>rest of the line of code. The same logic applies

343
00:15:35.559 --> 00:15:38.679
<v Speaker 2>to an our statement too. If the first condition is true,

344
00:15:38.759 --> 00:15:41.639
<v Speaker 2>it skips the second one entirely because the overall statement

345
00:15:41.679 --> 00:15:42.639
<v Speaker 2>has already succeeded.

346
00:15:42.840 --> 00:15:46.399
<v Speaker 1>But think about the massive trap hidden in that laziness.

347
00:15:46.480 --> 00:15:49.519
<v Speaker 1>The side effects, Right, What if that second condition wasn't

348
00:15:49.600 --> 00:15:53.320
<v Speaker 1>just checking a value. What if it had actual operational

349
00:15:53.320 --> 00:15:54.600
<v Speaker 1>instructions baked into.

350
00:15:54.440 --> 00:15:56.279
<v Speaker 2>It, like the increment operator.

351
00:15:55.919 --> 00:15:59.039
<v Speaker 1>Exactly, the plus plus which tells a variable to increase

352
00:15:59.039 --> 00:16:00.240
<v Speaker 1>its value by one.

353
00:16:00.279 --> 00:16:02.919
<v Speaker 2>This is a classic example of silent failure.

354
00:16:03.159 --> 00:16:04.159
<v Speaker 1>Explain how that works.

355
00:16:04.519 --> 00:16:07.559
<v Speaker 2>Imagine you write a complex statement that says, is variable

356
00:16:07.559 --> 00:16:10.639
<v Speaker 2>A greater than variable B A and d is variable

357
00:16:10.679 --> 00:16:12.639
<v Speaker 2>C plus plus greater than variable D.

358
00:16:12.840 --> 00:16:15.240
<v Speaker 1>Okay, So if variable A is not greater than b,

359
00:16:15.759 --> 00:16:18.559
<v Speaker 1>the computer stops dead in its tracks.

360
00:16:18.639 --> 00:16:21.759
<v Speaker 2>It never even glances at variable C, which means variable

361
00:16:21.759 --> 00:16:22.960
<v Speaker 2>C never gets incremented.

362
00:16:23.120 --> 00:16:25.559
<v Speaker 1>Never happened if variable C was supposed to be tracking,

363
00:16:25.639 --> 00:16:28.000
<v Speaker 1>like how many times a player tried to log in,

364
00:16:28.080 --> 00:16:31.559
<v Speaker 1>or how many seconds had passed, that data is just gone.

365
00:16:31.639 --> 00:16:32.879
<v Speaker 2>It is lost forever.

366
00:16:33.000 --> 00:16:36.039
<v Speaker 1>The program didn't crash, it just silently failed to do

367
00:16:36.120 --> 00:16:38.759
<v Speaker 1>its job because the computer was trying to save a microsecond.

368
00:16:38.840 --> 00:16:40.679
<v Speaker 2>And this is why we have to ask, how do

369
00:16:40.759 --> 00:16:45.039
<v Speaker 2>you build a stable, reliable digital world when your foundational

370
00:16:45.039 --> 00:16:45.960
<v Speaker 2>tools behave.

371
00:16:45.759 --> 00:16:47.519
<v Speaker 1>This way it seems impossible.

372
00:16:47.600 --> 00:16:50.519
<v Speaker 2>The answer is a philosophy called defensive programming.

373
00:16:50.600 --> 00:16:52.440
<v Speaker 1>Defensive programming, Yeah.

374
00:16:52.240 --> 00:16:54.639
<v Speaker 2>Writing code isn't just about getting the syntax right so

375
00:16:54.679 --> 00:16:57.879
<v Speaker 2>the compiler doesn't throw an air. It is about deeply

376
00:16:57.960 --> 00:17:02.679
<v Speaker 2>anticipating how the machine will stock yiberally lazily optimize your logic.

377
00:17:02.840 --> 00:17:03.919
<v Speaker 1>You have to outsmart it.

378
00:17:04.200 --> 00:17:07.839
<v Speaker 2>You have to actively protect the program from the machine's

379
00:17:07.880 --> 00:17:09.440
<v Speaker 2>own ruthless efficiency.

380
00:17:09.559 --> 00:17:11.559
<v Speaker 1>It's almost like you have to stop thinking like a

381
00:17:11.640 --> 00:17:14.279
<v Speaker 1>human and start thinking like the machine just to control it.

382
00:17:14.400 --> 00:17:15.079
<v Speaker 2>You really do.

383
00:17:15.839 --> 00:17:18.519
<v Speaker 1>And all of that ruthless efficiency, you know, the stript rules,

384
00:17:18.519 --> 00:17:22.440
<v Speaker 1>the flawed math, it all stems from the physical hardware.

385
00:17:22.079 --> 00:17:24.640
<v Speaker 2>Itself, the actual silicon, which.

386
00:17:24.400 --> 00:17:27.880
<v Speaker 1>Brings us to the very bottom layer of our deep dive. Today,

387
00:17:28.519 --> 00:17:31.799
<v Speaker 1>we've talked about how C plus plus translates human logic,

388
00:17:32.480 --> 00:17:35.359
<v Speaker 1>but what is it actually translating into down at the

389
00:17:35.359 --> 00:17:36.079
<v Speaker 1>absolute bottom.

390
00:17:36.160 --> 00:17:37.599
<v Speaker 2>It is translating it all the way down to the

391
00:17:37.640 --> 00:17:39.200
<v Speaker 2>metal to pure binary.

392
00:17:39.400 --> 00:17:43.079
<v Speaker 1>See human math feels so absolute, like a universal law,

393
00:17:43.519 --> 00:17:45.960
<v Speaker 1>but it's totally biological when you think about.

394
00:17:45.720 --> 00:17:46.720
<v Speaker 2>It, very biological.

395
00:17:46.799 --> 00:17:50.000
<v Speaker 1>We count in base ten the decimal system, we use

396
00:17:50.039 --> 00:17:52.559
<v Speaker 1>the digit zero through nine. Why do we do that

397
00:17:53.599 --> 00:17:55.200
<v Speaker 1>because we have ten fingers.

398
00:17:55.279 --> 00:17:58.880
<v Speaker 2>If human beings had evolved with twelve fingers, our entire

399
00:17:58.960 --> 00:18:01.759
<v Speaker 2>mathematical foundation from birth would be base twelve.

400
00:18:01.880 --> 00:18:03.319
<v Speaker 1>That is so weird to think about it.

401
00:18:03.359 --> 00:18:06.519
<v Speaker 2>But computers don't have human hands. They essentially have two fingers.

402
00:18:06.680 --> 00:18:09.720
<v Speaker 2>They are built out of billions of microscopic electrical switches,

403
00:18:10.400 --> 00:18:12.519
<v Speaker 2>and a physical switch can only exist in one of

404
00:18:12.559 --> 00:18:16.559
<v Speaker 2>two states, on or off, true or false one or

405
00:18:16.599 --> 00:18:17.359
<v Speaker 2>is zero.

406
00:18:17.599 --> 00:18:21.079
<v Speaker 1>Base two binary. You know, there's a great joke in

407
00:18:21.119 --> 00:18:23.880
<v Speaker 1>the source material about this. If my dog had invented

408
00:18:23.880 --> 00:18:26.920
<v Speaker 1>a number system, it would be base eight or octal

409
00:18:27.000 --> 00:18:29.000
<v Speaker 1>base eight. Yeah, because if you look at a dog's

410
00:18:29.000 --> 00:18:31.319
<v Speaker 1>front pause, he's only got eight visible toes.

411
00:18:31.480 --> 00:18:34.920
<v Speaker 2>That is hilarious but completely true. It illustrates perfectly how

412
00:18:35.039 --> 00:18:36.839
<v Speaker 2>arbitrary counting systems really are.

413
00:18:37.039 --> 00:18:38.000
<v Speaker 1>Totally arbitrary.

414
00:18:38.079 --> 00:18:40.640
<v Speaker 2>The math works identically in any base but reading base

415
00:18:40.680 --> 00:18:42.359
<v Speaker 2>two is a nightmare for human eyes.

416
00:18:42.440 --> 00:18:44.240
<v Speaker 1>It can't even imagine, like the number.

417
00:18:43.960 --> 00:18:47.559
<v Speaker 2>One twenty three in our familiar decimal system translates to

418
00:18:47.920 --> 00:18:50.640
<v Speaker 2>zero one one, zero eleven in binary.

419
00:18:50.759 --> 00:18:51.799
<v Speaker 1>That's just visual noise.

420
00:18:52.000 --> 00:18:54.559
<v Speaker 2>It is your eyes just glaze over trying to parse

421
00:18:54.559 --> 00:18:55.440
<v Speaker 2>a screen full of that.

422
00:18:55.759 --> 00:18:58.200
<v Speaker 1>So how do programmers deal with that visual noise without

423
00:18:58.200 --> 00:18:59.400
<v Speaker 1>going completely cross eyed?

424
00:18:59.559 --> 00:19:03.599
<v Speaker 2>They create mental bridges. First, they group those individual binary digits,

425
00:19:03.640 --> 00:19:05.920
<v Speaker 2>which we call bits, into packages.

426
00:19:05.400 --> 00:19:06.720
<v Speaker 1>Of eight and that is a byte.

427
00:19:06.920 --> 00:19:09.400
<v Speaker 2>Yes, an eight bit package is a byte. And to

428
00:19:09.480 --> 00:19:13.559
<v Speaker 2>make those bites readable to humans, programmers use hexadecimal.

429
00:19:13.039 --> 00:19:16.720
<v Speaker 1>Hectadesimal, which is base sixteen right, and hexadecimal uses the

430
00:19:16.799 --> 00:19:19.680
<v Speaker 1>numbers zero through nine, and then it borrows the letters

431
00:19:19.720 --> 00:19:22.279
<v Speaker 1>A through f to represent the numbers ten to fifteen

432
00:19:22.359 --> 00:19:23.240
<v Speaker 1>right exactly.

433
00:19:23.319 --> 00:19:27.519
<v Speaker 2>By using base sixteen, programmers can compress that long, dizzying

434
00:19:27.559 --> 00:19:31.279
<v Speaker 2>string of ones and zeros into something short, punchy, and

435
00:19:31.319 --> 00:19:33.200
<v Speaker 2>recognizable like seven.

436
00:19:33.000 --> 00:19:36.400
<v Speaker 1>B seven B That is way easier to read.

437
00:19:36.519 --> 00:19:39.440
<v Speaker 2>It doesn't change the underlying on and off switches. It

438
00:19:39.519 --> 00:19:42.759
<v Speaker 2>just acts as a visual shorthand a bridge between the

439
00:19:42.759 --> 00:19:45.680
<v Speaker 2>physical silicon switches and human comprehension.

440
00:19:45.920 --> 00:19:48.759
<v Speaker 1>Wait, we don't just process numbers. What about characters, text,

441
00:19:48.880 --> 00:19:51.240
<v Speaker 1>the alphabet, All of that has to become numbers too.

442
00:19:51.119 --> 00:19:54.279
<v Speaker 2>Right, Absolutely it does. When you declare a chart variable

443
00:19:54.319 --> 00:19:56.519
<v Speaker 2>in C plus plus to hold a single letter or

444
00:19:56.559 --> 00:19:59.680
<v Speaker 2>a wide char for bigger characters, the computer is secretly

445
00:19:59.799 --> 00:20:02.279
<v Speaker 2>just storing a number that corresponds to that letter in

446
00:20:02.319 --> 00:20:03.319
<v Speaker 2>a massive index.

447
00:20:03.400 --> 00:20:04.640
<v Speaker 1>Oh, like a secret code.

448
00:20:04.839 --> 00:20:07.880
<v Speaker 2>Basically, the capital letter A might just be the number

449
00:20:07.920 --> 00:20:08.440
<v Speaker 2>sixty five.

450
00:20:08.519 --> 00:20:10.000
<v Speaker 1>Okay, I see, But as.

451
00:20:09.880 --> 00:20:13.319
<v Speaker 2>Software expanded globally, we needed much bigger boxes to hold

452
00:20:13.359 --> 00:20:17.200
<v Speaker 2>thousands of unique symbols for complex languages like Chinese or Arabic.

453
00:20:17.359 --> 00:20:18.839
<v Speaker 1>Right, sixty five only gets you so.

454
00:20:18.839 --> 00:20:23.279
<v Speaker 2>Far, exactly. That is why encoding formats like UTF eight,

455
00:20:23.440 --> 00:20:26.440
<v Speaker 2>UTF sixteen, and UTF thirty two were created.

456
00:20:26.599 --> 00:20:28.759
<v Speaker 1>I've seen those terms in my browser settings. Yeah.

457
00:20:28.799 --> 00:20:32.319
<v Speaker 2>They use more bits, meaning more physical switches to provide

458
00:20:32.400 --> 00:20:36.480
<v Speaker 2>enough unique numerical combinations to represent every single human symbol

459
00:20:36.480 --> 00:20:36.920
<v Speaker 2>on Earth.

460
00:20:37.000 --> 00:20:39.720
<v Speaker 1>Wow. When you really step back and look at this

461
00:20:39.920 --> 00:20:44.200
<v Speaker 1>entire system, all of those strict C plus plus grammar rules,

462
00:20:44.519 --> 00:20:48.279
<v Speaker 1>the intruncation throwing away pizza slices, the float round off errors,

463
00:20:48.319 --> 00:20:51.720
<v Speaker 1>dropping digits, the lazy short circuiting a and d statements.

464
00:20:51.799 --> 00:20:54.079
<v Speaker 1>It is a lot to take in, it is, but

465
00:20:54.160 --> 00:20:57.720
<v Speaker 1>they all exist because we are attempting an impossible magic trick.

466
00:20:57.839 --> 00:20:58.319
<v Speaker 2>How do you mean?

467
00:20:58.680 --> 00:21:02.519
<v Speaker 1>We are taking the incredible, complex, nuanced analog reality of

468
00:21:02.599 --> 00:21:05.599
<v Speaker 1>human existence and we are forcing it through a tiny,

469
00:21:06.039 --> 00:21:09.519
<v Speaker 1>rigid physical pipe of billions of microscopic switches that can

470
00:21:09.559 --> 00:21:10.640
<v Speaker 1>only ever say yes or no.

471
00:21:10.920 --> 00:21:12.799
<v Speaker 2>That is exactly what programming is.

472
00:21:12.920 --> 00:21:14.880
<v Speaker 1>And what does this all mean for you listening to

473
00:21:14.920 --> 00:21:17.680
<v Speaker 1>this deep dive right now? It means that every single

474
00:21:17.720 --> 00:21:20.519
<v Speaker 1>app you use on your phone, every high definition video

475
00:21:20.559 --> 00:21:23.359
<v Speaker 1>you scream to your TV, every digital photograph you've ever

476
00:21:23.400 --> 00:21:24.759
<v Speaker 1>taken of your family, it.

477
00:21:24.720 --> 00:21:27.519
<v Speaker 2>Is all ultimately just a carefully orchestrated illusion.

478
00:21:27.680 --> 00:21:31.839
<v Speaker 1>It really is. It's a towering, fragile skyscraper built entirely

479
00:21:31.839 --> 00:21:36.000
<v Speaker 1>out of microscopic ones and zeros, bundled into bytes, abstracted

480
00:21:36.000 --> 00:21:41.440
<v Speaker 1>into hexadecimals, managed by flawed variables, and meticulously translated by compilers.

481
00:21:41.680 --> 00:21:44.799
<v Speaker 2>And that skyscraper is kept from collapsing every single day

482
00:21:44.880 --> 00:21:47.519
<v Speaker 2>by programmers who have learned exactly how to draft those

483
00:21:47.559 --> 00:21:50.400
<v Speaker 2>piece treaties with the alien intelligence of the processor.

484
00:21:50.519 --> 00:21:55.279
<v Speaker 1>C plus plus is our strict, uncompromising translator in that relationship.

485
00:21:55.920 --> 00:21:59.240
<v Speaker 1>Today we've explored the literal minded nature of data variables,

486
00:21:59.480 --> 00:22:02.839
<v Speaker 1>the hidden changers of computer math, the lazy efficiency of

487
00:22:02.880 --> 00:22:06.440
<v Speaker 1>short circuit logic, and the binary reality beneath the metal.

488
00:22:06.680 --> 00:22:08.559
<v Speaker 2>We covered a lot of ground, we did.

489
00:22:08.599 --> 00:22:10.880
<v Speaker 1>But before we wrap up, I had this realization during

490
00:22:10.880 --> 00:22:13.920
<v Speaker 1>our conversation about the increment operator. You know, the plus

491
00:22:13.960 --> 00:22:14.759
<v Speaker 1>plus we talked.

492
00:22:14.559 --> 00:22:16.240
<v Speaker 2>About earlier, Oh, the one that gets trapped in the

493
00:22:16.279 --> 00:22:17.359
<v Speaker 2>short circuit right.

494
00:22:17.720 --> 00:22:20.319
<v Speaker 1>Adding one to a number is the most common mathematical

495
00:22:20.319 --> 00:22:22.960
<v Speaker 1>action in all of programming. But the reason the plus

496
00:22:23.000 --> 00:22:26.599
<v Speaker 1>plus operator actually exists in C plus plus is because

497
00:22:26.759 --> 00:22:31.079
<v Speaker 1>early microprocessors in the nineteen seventies physically had a specific

498
00:22:31.119 --> 00:22:34.400
<v Speaker 1>hardware instruction wired into them just for adding one.

499
00:22:34.640 --> 00:22:36.880
<v Speaker 2>It was faster than general addition exactly.

500
00:22:37.119 --> 00:22:41.039
<v Speaker 1>Hardware memory and processing power were so unbelievably limited back

501
00:22:41.039 --> 00:22:44.519
<v Speaker 1>then that saving a few micro instructions was a massive deal.

502
00:22:45.039 --> 00:22:49.200
<v Speaker 1>So the software language evolved to include plus plus specifically

503
00:22:49.480 --> 00:22:51.440
<v Speaker 1>to take advantage of that one physical wire.

504
00:22:51.640 --> 00:22:55.400
<v Speaker 2>The physical constraints the hardware literally dictated the vocabulary of the.

505
00:22:55.359 --> 00:22:57.599
<v Speaker 1>Software, which leaves me with a chilling thought to end

506
00:22:57.599 --> 00:23:00.200
<v Speaker 1>on for you listening, if a physical wire from a

507
00:23:00.240 --> 00:23:04.039
<v Speaker 1>nineteen seventies microchip permanently altered how we write code today.

508
00:23:04.519 --> 00:23:06.920
<v Speaker 1>How much of our modern cutting edge software is still

509
00:23:06.960 --> 00:23:08.119
<v Speaker 1>being shaped by the past.

510
00:23:08.240 --> 00:23:09.160
<v Speaker 2>That is a great question.

511
00:23:09.319 --> 00:23:13.359
<v Speaker 1>The very code running global high frequency finance, or simulating

512
00:23:13.400 --> 00:23:17.480
<v Speaker 1>protein folding, or powering the artificial intelligence that is fundamentally

513
00:23:17.640 --> 00:23:20.000
<v Speaker 1>changing our world right now, how much of it is

514
00:23:20.000 --> 00:23:22.720
<v Speaker 1>still being steered by the invisible ghosts of nineteen seventies

515
00:23:22.759 --> 00:23:23.759
<v Speaker 1>hardware limitations.

516
00:23:24.000 --> 00:23:27.119
<v Speaker 2>It really makes you wonder who or what is actually

517
00:23:27.160 --> 00:23:28.880
<v Speaker 2>giving the instructions it does.

518
00:23:29.759 --> 00:23:31.640
<v Speaker 1>Next time you ask someone for a peanut butter and

519
00:23:31.720 --> 00:23:34.960
<v Speaker 1>jelly sandwich and they intuitively know not to smash the

520
00:23:35.000 --> 00:23:38.119
<v Speaker 1>glass jar into the bread, take a moment to be

521
00:23:38.200 --> 00:23:41.880
<v Speaker 1>grateful for human intuition. Absolutely, thank you for joining us

522
00:23:41.880 --> 00:23:45.160
<v Speaker 1>on this deep dive. Keep questioning the digital world around you.

523
00:23:45.599 --> 00:23:46.440
<v Speaker 1>We'll see you next time.
