WEBVTT

1
00:00:00.080 --> 00:00:03.799
<v Speaker 1>Okay, so you're really diving deep into C plus plus

2
00:00:03.799 --> 00:00:07.360
<v Speaker 1>software architecture. Huh, looks like we've got a ton of

3
00:00:07.360 --> 00:00:10.039
<v Speaker 1>material to get through. Excerpts from a C plus plus

4
00:00:10.119 --> 00:00:14.359
<v Speaker 1>architecture book, the preface, even some code snippets.

5
00:00:14.599 --> 00:00:15.679
<v Speaker 2>Yeah, there's a lot here.

6
00:00:15.839 --> 00:00:18.600
<v Speaker 1>Sounds like someone's ready for a serious knowledge upgrade.

7
00:00:18.640 --> 00:00:21.320
<v Speaker 2>Absolutely tons of great info to unpack.

8
00:00:21.480 --> 00:00:24.359
<v Speaker 1>Well, we're here to help you extract the gold, right, Yeah,

9
00:00:24.399 --> 00:00:26.480
<v Speaker 1>I'm already kind of fascinated by some of this stuff,

10
00:00:26.519 --> 00:00:30.399
<v Speaker 1>like this winking out memory technique. It's like straight out

11
00:00:30.440 --> 00:00:33.479
<v Speaker 1>of a sci fi novel or something. Right, But before

12
00:00:33.479 --> 00:00:35.280
<v Speaker 1>we get lost in the weeds, maybe we should take

13
00:00:35.280 --> 00:00:38.759
<v Speaker 1>a step back, like why is software architecture so important

14
00:00:38.759 --> 00:00:40.920
<v Speaker 1>in the first place, especially when we're talking about something

15
00:00:40.960 --> 00:00:42.880
<v Speaker 1>as powerful as C plus plus bouth.

16
00:00:43.039 --> 00:00:45.679
<v Speaker 2>Well, that's a great question, and you know, the book

17
00:00:45.759 --> 00:00:48.960
<v Speaker 2>really emphasizes that even with a language like C plus

18
00:00:49.039 --> 00:00:54.000
<v Speaker 2>plus O, good architecture is still like the foundation for success.

19
00:00:54.119 --> 00:00:54.399
<v Speaker 1>Yeah.

20
00:00:54.479 --> 00:00:57.280
<v Speaker 2>They talk about this concept of software decay, you know,

21
00:00:57.280 --> 00:00:59.600
<v Speaker 2>where systems just naturally tend to get harder and harder

22
00:00:59.640 --> 00:01:04.159
<v Speaker 2>to maintain over time, and without a clear architectural vision,

23
00:01:04.599 --> 00:01:07.799
<v Speaker 2>you risk ending up with what they call an accidental architecture,

24
00:01:08.079 --> 00:01:10.560
<v Speaker 2>which is basically just a big mess that doesn't really

25
00:01:10.680 --> 00:01:11.799
<v Speaker 2>meet the user's needs.

26
00:01:11.879 --> 00:01:14.959
<v Speaker 1>Oh yeah, it's like building a house without blueprints exactly.

27
00:01:15.359 --> 00:01:17.640
<v Speaker 2>You know, it might stand for a while, but try

28
00:01:17.719 --> 00:01:20.719
<v Speaker 2>making any changes or additions later on and things can

29
00:01:20.760 --> 00:01:21.760
<v Speaker 2>get really dicey.

30
00:01:22.000 --> 00:01:22.200
<v Speaker 1>Right.

31
00:01:22.400 --> 00:01:27.040
<v Speaker 2>Yeah, So choosing an architecture consciously it's like creating those blueprints, right.

32
00:01:27.640 --> 00:01:33.719
<v Speaker 2>It makes your software adaptable and maintainable, so it can

33
00:01:33.840 --> 00:01:35.400
<v Speaker 2>evolve gracefully over time.

34
00:01:35.719 --> 00:01:36.200
<v Speaker 1>I like that.

35
00:01:36.400 --> 00:01:40.159
<v Speaker 2>Now they do mention different scopes of architecture, like enterprise solutions,

36
00:01:40.239 --> 00:01:43.159
<v Speaker 2>software and infrastructure, but it looks like your focus here

37
00:01:43.200 --> 00:01:44.799
<v Speaker 2>is mainly on software architecture.

38
00:01:45.319 --> 00:01:47.879
<v Speaker 1>Yeah, for this deep dive at least, I'm mostly interested

39
00:01:48.000 --> 00:01:52.120
<v Speaker 1>in how the code itself is structured within a specific project. Okay,

40
00:01:52.439 --> 00:01:55.120
<v Speaker 1>And speaking of structure, the book brings up this idea

41
00:01:55.239 --> 00:01:59.920
<v Speaker 1>of architecturally significant requirements or asrs, and these are like

42
00:02:00.200 --> 00:02:03.640
<v Speaker 1>the make or break factors that really influence the design choices.

43
00:02:03.920 --> 00:02:06.120
<v Speaker 1>But figuring these out is key because they might not

44
00:02:06.239 --> 00:02:10.439
<v Speaker 1>always be super obvious, like they give examples of needing

45
00:02:10.479 --> 00:02:14.800
<v Speaker 1>to integrate with a specific external system, or maybe there

46
00:02:14.879 --> 00:02:18.080
<v Speaker 1>are really strict performance targets that you have to meet,

47
00:02:18.800 --> 00:02:23.039
<v Speaker 1>or even specific technologies that a client requires you to use.

48
00:02:23.159 --> 00:02:27.400
<v Speaker 2>Absolutely, Like they had this great example about an app

49
00:02:27.439 --> 00:02:31.719
<v Speaker 2>being developed for the Dominican Fair in quotesk oh yeah, Yeah.

50
00:02:31.800 --> 00:02:35.680
<v Speaker 2>The functional requirements were pretty straightforward. List the merchants events,

51
00:02:36.120 --> 00:02:40.840
<v Speaker 2>search functionality, user registration, payment processing. Okay, standard stuff, but

52
00:02:40.879 --> 00:02:43.599
<v Speaker 2>there was this hidden requirement they had to integrate with

53
00:02:43.719 --> 00:02:48.919
<v Speaker 2>an existing ticketing system. Ah, and that integration will it

54
00:02:48.919 --> 00:02:51.080
<v Speaker 2>would have a huge impact on the architecture for sure.

55
00:02:51.159 --> 00:02:54.039
<v Speaker 2>So thinking about those asrs upfront can save you a

56
00:02:54.080 --> 00:02:54.960
<v Speaker 2>lot of pain later on.

57
00:02:55.319 --> 00:02:55.560
<v Speaker 1>Right.

58
00:02:55.840 --> 00:02:58.319
<v Speaker 2>Yeah. Another thing the book stresses is the importance of

59
00:02:59.080 --> 00:03:02.759
<v Speaker 2>choosing between a state full or stateless approach when you're

60
00:03:03.080 --> 00:03:04.159
<v Speaker 2>designing your software.

61
00:03:04.240 --> 00:03:05.919
<v Speaker 1>Okay, so let's break that down a little bit. So

62
00:03:06.840 --> 00:03:11.560
<v Speaker 1>stateful software like a web service that remembers user data.

63
00:03:11.680 --> 00:03:14.319
<v Speaker 1>It seems efficient on the surface, but then you've got

64
00:03:14.360 --> 00:03:17.400
<v Speaker 1>the whole challenge of synchronization, right right, If you have

65
00:03:17.719 --> 00:03:20.879
<v Speaker 1>multiple requests trying to modify the state at the same time,

66
00:03:21.199 --> 00:03:24.840
<v Speaker 1>you can run into all sorts of data races and inconsistencies.

67
00:03:24.840 --> 00:03:28.000
<v Speaker 2>Absolutely, it gets messy. Yeah, And they contrast that with

68
00:03:29.120 --> 00:03:33.840
<v Speaker 2>stateless services, where each request is self contained. They're much

69
00:03:33.879 --> 00:03:40.080
<v Speaker 2>easier to scale and reason about because each request doesn't

70
00:03:40.120 --> 00:03:41.360
<v Speaker 2>depend on what happened before.

71
00:03:41.599 --> 00:03:41.840
<v Speaker 1>Yeah.

72
00:03:41.919 --> 00:03:44.400
<v Speaker 2>Think of it like a conversation where each sentence makes

73
00:03:44.439 --> 00:03:46.400
<v Speaker 2>sense on its own. Yeah, you know, you don't have

74
00:03:46.439 --> 00:03:47.879
<v Speaker 2>to remember everything that was said.

75
00:03:47.719 --> 00:03:48.479
<v Speaker 1>Before, gotcha.

76
00:03:48.719 --> 00:03:51.199
<v Speaker 2>The book uses Twitter as an example. They show how

77
00:03:51.199 --> 00:03:56.000
<v Speaker 2>they're stateless approach, RESTful APIs and all that really contributes

78
00:03:56.039 --> 00:03:58.879
<v Speaker 2>to their ability to handle a massive volume of requests.

79
00:03:58.919 --> 00:04:01.560
<v Speaker 1>That makes sense. So they're basically saying that stateless is

80
00:04:01.560 --> 00:04:02.120
<v Speaker 1>the way to go.

81
00:04:02.319 --> 00:04:05.759
<v Speaker 2>Well, they do acknowledge that sometimes there are practical reasons

82
00:04:05.840 --> 00:04:10.199
<v Speaker 2>to deviate from the stateless ideal, like maybe you want

83
00:04:10.199 --> 00:04:13.520
<v Speaker 2>to minimize data transfer or you need to squeeze out

84
00:04:13.520 --> 00:04:16.519
<v Speaker 2>every bit of performance. It's all about finding the right

85
00:04:16.600 --> 00:04:18.759
<v Speaker 2>balance for your specific needs.

86
00:04:19.040 --> 00:04:21.319
<v Speaker 1>It sounds like a lot of software design comes down

87
00:04:21.360 --> 00:04:24.519
<v Speaker 1>to finding that sweet spot between competing priorities.

88
00:04:24.720 --> 00:04:28.040
<v Speaker 2>Yeah, definitely. And this leads us to the distinction between

89
00:04:29.319 --> 00:04:34.759
<v Speaker 2>service oriented architectures SOA and micro services. Both of them

90
00:04:34.800 --> 00:04:39.120
<v Speaker 2>involve breaking a system into smaller, more independent services, but

91
00:04:39.199 --> 00:04:40.319
<v Speaker 2>there are key differences.

92
00:04:40.920 --> 00:04:43.399
<v Speaker 1>So help me out here. What are the key differences

93
00:04:43.439 --> 00:04:45.720
<v Speaker 1>between SOA and micro services?

94
00:04:45.920 --> 00:04:49.399
<v Speaker 2>So soa is more of a broader concept. The services

95
00:04:49.439 --> 00:04:51.399
<v Speaker 2>are self contained units, but they're bigger.

96
00:04:51.519 --> 00:04:51.800
<v Speaker 1>Okay.

97
00:04:51.920 --> 00:04:55.839
<v Speaker 2>They have well defined interfaces, and you can develop and

98
00:04:55.839 --> 00:04:58.879
<v Speaker 2>deploy them independently, even using different technologies.

99
00:04:59.000 --> 00:05:02.079
<v Speaker 1>I see example of two teams, one using C Shark,

100
00:05:02.160 --> 00:05:05.800
<v Speaker 1>the other using C plus, building separate services that could

101
00:05:05.839 --> 00:05:06.759
<v Speaker 1>still talk to each other.

102
00:05:06.879 --> 00:05:09.639
<v Speaker 2>Yeah, exactly. It's like a universal translator for software. I

103
00:05:09.720 --> 00:05:13.199
<v Speaker 2>like it now. Micro services take this modularity even further.

104
00:05:13.519 --> 00:05:16.759
<v Speaker 2>Think smaller, even more focused services that can be deployed

105
00:05:16.759 --> 00:05:21.079
<v Speaker 2>and scaled independently. Gotcha companies like Amazon, Netflix, and Facebook,

106
00:05:21.519 --> 00:05:25.480
<v Speaker 2>they all use micro services to handle those massive scales

107
00:05:26.639 --> 00:05:29.240
<v Speaker 2>and enable continuous delivery.

108
00:05:29.399 --> 00:05:31.639
<v Speaker 1>It's like an army of ants, each one doing a

109
00:05:31.680 --> 00:05:34.560
<v Speaker 1>small task, but together they accomplish something amazing.

110
00:05:34.879 --> 00:05:38.000
<v Speaker 2>Exactly. But you know, micro services aren't a silver bullet.

111
00:05:38.600 --> 00:05:41.160
<v Speaker 2>Managing a large number of them can get really complex.

112
00:05:41.399 --> 00:05:44.000
<v Speaker 2>You need a strong DevOps culture and a high degree

113
00:05:44.000 --> 00:05:44.519
<v Speaker 2>of automation.

114
00:05:44.639 --> 00:05:45.279
<v Speaker 1>I can imagine.

115
00:05:45.279 --> 00:05:48.720
<v Speaker 2>And this actually brings us to a fascinating point Conway's law.

116
00:05:48.959 --> 00:05:54.519
<v Speaker 2>Conway's law it states that organizations which design systems are

117
00:05:54.560 --> 00:05:57.959
<v Speaker 2>constrained to produce designs which are copies of the communication

118
00:05:58.079 --> 00:05:59.839
<v Speaker 2>structures of these organizations.

119
00:06:00.160 --> 00:06:02.720
<v Speaker 1>Wow. So basically, if your team isn't set up for

120
00:06:03.000 --> 00:06:07.079
<v Speaker 1>good collaboration and clear communication, your architecture is going to suffer.

121
00:06:07.199 --> 00:06:10.160
<v Speaker 2>Exactly. It's like that saying form follows function, but applied

122
00:06:10.199 --> 00:06:11.120
<v Speaker 2>to software development.

123
00:06:11.199 --> 00:06:12.920
<v Speaker 1>That's a really interesting way to look at it.

124
00:06:13.279 --> 00:06:16.759
<v Speaker 2>Now, there's one more architectural pattern they talk about that's

125
00:06:16.800 --> 00:06:22.680
<v Speaker 2>worth mentioning CQRS, which stands for command query responsibility segregation.

126
00:06:23.920 --> 00:06:26.959
<v Speaker 2>It's a way of separating the responsibility of handling commands

127
00:06:27.319 --> 00:06:31.959
<v Speaker 2>that change data from queries that retrieve data, and this

128
00:06:32.560 --> 00:06:37.560
<v Speaker 2>can lead to better performance and scalability, especially in systems

129
00:06:37.600 --> 00:06:41.439
<v Speaker 2>with really complex data models. They even suggest using different

130
00:06:41.480 --> 00:06:44.240
<v Speaker 2>data stores for reads and writes. Oh interesting, So you

131
00:06:44.319 --> 00:06:47.279
<v Speaker 2>might have like a really fast readoptimized database for your

132
00:06:47.319 --> 00:06:50.240
<v Speaker 2>queries and then a more robust one for handling changes.

133
00:06:50.720 --> 00:06:52.519
<v Speaker 2>It's all about choosing the right tool for the job.

134
00:06:52.600 --> 00:06:53.240
<v Speaker 1>That makes sense.

135
00:06:53.399 --> 00:06:55.480
<v Speaker 2>Now, CQRS can also make your code a lot simpler

136
00:06:55.519 --> 00:07:00.199
<v Speaker 2>because each part has a single well defined responsibility. Seaking

137
00:07:00.199 --> 00:07:03.079
<v Speaker 2>of well defined responsibilities. The book finally dives into the

138
00:07:03.160 --> 00:07:08.279
<v Speaker 2>clus plus specific aspects of software architecture, starting with the

139
00:07:08.319 --> 00:07:09.279
<v Speaker 2>solid principles.

140
00:07:09.600 --> 00:07:13.560
<v Speaker 1>Ah. Yes, the solid principles. Those are classic guidelines for

141
00:07:13.600 --> 00:07:17.839
<v Speaker 1>writing object oriented code that's maintainable and flexible. All right, right, okay,

142
00:07:17.920 --> 00:07:19.439
<v Speaker 1>let's see if I can remember what they stand for.

143
00:07:19.839 --> 00:07:25.519
<v Speaker 1>Single responsibility principle, open closed principle, lisk of substitution principle,

144
00:07:26.000 --> 00:07:29.560
<v Speaker 1>interface segregation principle, and dependency in version principle.

145
00:07:29.720 --> 00:07:30.319
<v Speaker 2>That's all of them.

146
00:07:30.560 --> 00:07:32.759
<v Speaker 1>It's a mouthful, though. Can you break down what each

147
00:07:32.800 --> 00:07:36.000
<v Speaker 1>of these principles actually means in practice, especially for someone

148
00:07:36.079 --> 00:07:36.800
<v Speaker 1>working with C.

149
00:07:36.879 --> 00:07:40.360
<v Speaker 2>Plus plus using sure So, the single responsibility principle states

150
00:07:40.360 --> 00:07:44.839
<v Speaker 2>that every class or module should have only one specific

151
00:07:45.000 --> 00:07:48.600
<v Speaker 2>reason to change, keep things focused, you know, and avoid

152
00:07:48.639 --> 00:07:52.240
<v Speaker 2>those massive god objects that try to do everything. They

153
00:07:52.279 --> 00:07:54.600
<v Speaker 2>give some really good examples of how to refactor C

154
00:07:54.720 --> 00:07:56.959
<v Speaker 2>plus plus code to follow this principle.

155
00:07:57.000 --> 00:07:59.279
<v Speaker 1>Okay, and what about the open closed principle.

156
00:07:59.519 --> 00:08:02.519
<v Speaker 2>So, the op close principle encourages you to design classes

157
00:08:02.519 --> 00:08:06.160
<v Speaker 2>that are open for extension but closed for modification. Okay,

158
00:08:06.360 --> 00:08:09.439
<v Speaker 2>you should be able to add new functionality without having

159
00:08:09.439 --> 00:08:10.680
<v Speaker 2>to change existing code.

160
00:08:10.800 --> 00:08:11.160
<v Speaker 1>I see.

161
00:08:11.199 --> 00:08:15.240
<v Speaker 2>They demonstrate this using C plus plus interfaces and abstract classes.

162
00:08:15.639 --> 00:08:18.639
<v Speaker 2>They show how you can add new implementations without breaking

163
00:08:18.680 --> 00:08:19.519
<v Speaker 2>existing clients.

164
00:08:19.560 --> 00:08:21.759
<v Speaker 1>It's like adding a new room to a house without

165
00:08:21.800 --> 00:08:23.000
<v Speaker 1>tearing down any walls.

166
00:08:23.240 --> 00:08:25.800
<v Speaker 2>Yeah, that's a great analogy. And then there's the lisk

167
00:08:25.839 --> 00:08:29.040
<v Speaker 2>of substitution principle. Right, this one make sure that subtypes

168
00:08:29.040 --> 00:08:33.039
<v Speaker 2>can be used interchangeably with their base types without causing

169
00:08:33.039 --> 00:08:36.279
<v Speaker 2>any problems in the program. It's about ensuring your inheritance

170
00:08:36.320 --> 00:08:39.440
<v Speaker 2>hierarchy makes sense and avoids unexpected behavior.

171
00:08:39.600 --> 00:08:42.960
<v Speaker 1>They give C plus plus examples of how violating this

172
00:08:43.039 --> 00:08:46.440
<v Speaker 1>principle can introduce those subtle bugs that make the code

173
00:08:46.559 --> 00:08:47.919
<v Speaker 1>really hard to understand.

174
00:08:48.360 --> 00:08:51.399
<v Speaker 2>Yeah, exactly. It seems like all these solid principles are

175
00:08:51.440 --> 00:08:54.559
<v Speaker 2>really about making the code easier to maintain and adapt

176
00:08:54.600 --> 00:08:55.080
<v Speaker 2>over time.

177
00:08:55.600 --> 00:08:58.759
<v Speaker 1>For sure. It's all about building a solid foundation exactly.

178
00:08:58.840 --> 00:09:01.320
<v Speaker 2>So next we have the interface aggregation principle. It basically

179
00:09:01.360 --> 00:09:05.320
<v Speaker 2>says it's better to have smaller, more specific interfaces than big,

180
00:09:05.399 --> 00:09:06.320
<v Speaker 2>monolithic ones.

181
00:09:06.399 --> 00:09:07.080
<v Speaker 1>Gotcha.

182
00:09:07.240 --> 00:09:10.039
<v Speaker 2>This way, clients only depend on the methods they actually use.

183
00:09:10.279 --> 00:09:10.639
<v Speaker 1>Okay.

184
00:09:10.879 --> 00:09:13.080
<v Speaker 2>The book has this fun example with a C plus

185
00:09:13.080 --> 00:09:16.320
<v Speaker 2>plus food processor showing how to break down a complex

186
00:09:16.320 --> 00:09:19.320
<v Speaker 2>interface into smaller, more manageable ones.

187
00:09:19.480 --> 00:09:21.840
<v Speaker 1>Right, so, it's like having separate remotes for your TV,

188
00:09:22.080 --> 00:09:25.080
<v Speaker 1>DVD player and sound system instead of one giant one

189
00:09:25.120 --> 00:09:26.240
<v Speaker 1>with a button for everything.

190
00:09:26.360 --> 00:09:30.440
<v Speaker 2>Yeah, that's a perfect analogy. And finally, there's the dependency

191
00:09:30.480 --> 00:09:35.159
<v Speaker 2>inversion principle, which encourages you to depend on abstractions instead

192
00:09:35.159 --> 00:09:38.919
<v Speaker 2>of concrete implementations. Okay, it promotes loose coupling and makes

193
00:09:38.919 --> 00:09:41.039
<v Speaker 2>your code way easier to test and maintain.

194
00:09:41.360 --> 00:09:44.279
<v Speaker 1>They illustrate this with some C plus plus code using

195
00:09:44.320 --> 00:09:46.639
<v Speaker 1>abstract base classes and templates.

196
00:09:46.720 --> 00:09:49.600
<v Speaker 2>Right yep. They show how to decouple high level modules

197
00:09:49.639 --> 00:09:50.720
<v Speaker 2>from lower level ones.

198
00:09:50.919 --> 00:09:53.720
<v Speaker 1>It's like building a house with interchangeable parts, so you

199
00:09:53.720 --> 00:09:56.759
<v Speaker 1>can swap out the plumbing or electrical systems without affecting

200
00:09:56.759 --> 00:09:58.279
<v Speaker 1>the whole structure exactly.

201
00:09:58.519 --> 00:10:01.879
<v Speaker 2>All these solid principles, they really provide a strong foundation

202
00:10:02.000 --> 00:10:07.240
<v Speaker 2>for designing well structured, maintainable, and flexible C plus plus code.

203
00:10:07.720 --> 00:10:11.679
<v Speaker 1>So we've talked about the importance of architecture, different architectural styles,

204
00:10:11.720 --> 00:10:14.720
<v Speaker 1>and now the solid principles feels like we're building up

205
00:10:14.759 --> 00:10:18.679
<v Speaker 1>a pretty solid toolkit for CLUS plus software design.

206
00:10:18.840 --> 00:10:21.840
<v Speaker 2>I think, so, where do we go from here? From here,

207
00:10:22.240 --> 00:10:25.600
<v Speaker 2>the book shifts its focus to the real world challenges

208
00:10:25.720 --> 00:10:30.039
<v Speaker 2>of building robust and scalable systems. It starts by debunking

209
00:10:30.080 --> 00:10:34.799
<v Speaker 2>some common fallacies about distributed computing, assumptions that can lead

210
00:10:34.840 --> 00:10:38.960
<v Speaker 2>to some pretty disastrous results if you're not careful.

211
00:10:39.039 --> 00:10:41.720
<v Speaker 1>Oh yeah, those assumptions that seem so obvious in theory

212
00:10:41.840 --> 00:10:44.840
<v Speaker 1>but can cause big problems in the real world exactly. Like.

213
00:10:44.879 --> 00:10:47.720
<v Speaker 2>The first one they tackle is the assumption of network reliability.

214
00:10:48.039 --> 00:10:50.960
<v Speaker 2>Oh right, just because something works perfectly on your local

215
00:10:51.000 --> 00:10:53.000
<v Speaker 2>machine doesn't mean it will behave the same way in

216
00:10:53.039 --> 00:10:57.840
<v Speaker 2>a distributed environment. Network kickups, latency issues, and even complete

217
00:10:57.879 --> 00:11:00.360
<v Speaker 2>failures are bound to happen for sure, So you have

218
00:11:00.399 --> 00:11:02.759
<v Speaker 2>to design for fault tolerance right from the start.

219
00:11:02.919 --> 00:11:05.559
<v Speaker 1>Yeah, you can't just add it as an afterthought exactly.

220
00:11:05.960 --> 00:11:09.679
<v Speaker 2>They also debunk the fallacy of assuming zero latency. Okay,

221
00:11:09.799 --> 00:11:15.000
<v Speaker 2>communication between distributed systems always takes time, and ignoring that

222
00:11:15.360 --> 00:11:19.440
<v Speaker 2>can lead to like performance bottlenecks and sluggish.

223
00:11:18.919 --> 00:11:22.559
<v Speaker 1>Applications, and of course, the fallacy of assuming infinite bandwidth.

224
00:11:22.879 --> 00:11:26.159
<v Speaker 2>Right, you can't just send unlimited amounts of data between

225
00:11:26.279 --> 00:11:29.840
<v Speaker 2>systems without considering the cost and the potential for congestion.

226
00:11:30.159 --> 00:11:33.399
<v Speaker 1>It's all about designing for the real world where networks

227
00:11:33.399 --> 00:11:38.960
<v Speaker 1>are unreliable, communication takes time and resources are limited, exactly,

228
00:11:39.000 --> 00:11:41.240
<v Speaker 1>and they even point out how these fallacies apply to

229
00:11:41.320 --> 00:11:44.159
<v Speaker 1>mobile app development, where you might be dealing with weak

230
00:11:44.240 --> 00:11:46.279
<v Speaker 1>signals or limited data plans.

231
00:11:46.559 --> 00:11:49.320
<v Speaker 2>Yeah, it's a good reminder that the environment your software

232
00:11:49.360 --> 00:11:52.559
<v Speaker 2>runs in can really impact the architecture for sure. And

233
00:11:52.600 --> 00:11:55.440
<v Speaker 2>this leads to the discussion of the CAAP theorem, a

234
00:11:55.519 --> 00:11:58.080
<v Speaker 2>fundamental concept in distributed systems.

235
00:11:58.200 --> 00:12:01.200
<v Speaker 1>Okay, the CAAP theorem, I've definitely heard of it before,

236
00:12:01.240 --> 00:12:03.200
<v Speaker 1>but honestly, I'm a little fuzzy on the details.

237
00:12:03.320 --> 00:12:06.320
<v Speaker 2>Oh okay, Well, the CIP theorem states that in a

238
00:12:06.360 --> 00:12:09.200
<v Speaker 2>distributed system, you can only have two out of three

239
00:12:09.240 --> 00:12:13.840
<v Speaker 2>guarantees consistency, availability, and partition tolerance.

240
00:12:14.039 --> 00:12:16.080
<v Speaker 1>You can't have it all. Nope, Well that makes sense,

241
00:12:16.120 --> 00:12:18.279
<v Speaker 1>but can you remind me what those guarantees actually mean.

242
00:12:18.440 --> 00:12:21.399
<v Speaker 2>Sure, consistency means that all the nodes in the system

243
00:12:21.480 --> 00:12:24.600
<v Speaker 2>see the same data at the same time. Availability means

244
00:12:24.639 --> 00:12:28.440
<v Speaker 2>the system stays operational even if some nodes fail, right,

245
00:12:28.960 --> 00:12:32.000
<v Speaker 2>And partition tolerance means that the system can keep working

246
00:12:32.480 --> 00:12:35.759
<v Speaker 2>even if the network connection between nodes is lost. Uh.

247
00:12:35.919 --> 00:12:37.840
<v Speaker 1>Okay, that's starting to come back to me now, So

248
00:12:37.879 --> 00:12:40.799
<v Speaker 1>how do you decide which two guarantees are the most important?

249
00:12:41.080 --> 00:12:44.720
<v Speaker 2>Well, it really depends on the specific application and its requirements. Okay,

250
00:12:45.000 --> 00:12:47.720
<v Speaker 2>And they go into different strategies for handling these trade offs,

251
00:12:47.720 --> 00:12:50.039
<v Speaker 2>like replication and eventual consistency.

252
00:12:50.159 --> 00:12:54.159
<v Speaker 1>So it's like choosing between a perfectly synchronized dance routine

253
00:12:54.159 --> 00:12:57.120
<v Speaker 1>where everyone moves in unison. One misstep and the whole

254
00:12:57.120 --> 00:13:00.639
<v Speaker 1>thing falls apart, versus a more flexible routine where everyone

255
00:13:00.679 --> 00:13:03.519
<v Speaker 1>can improvise a bit but might be slightly out of

256
00:13:03.559 --> 00:13:04.360
<v Speaker 1>sync at times.

257
00:13:04.480 --> 00:13:07.919
<v Speaker 2>That's a great analogy. And within replication they explore different

258
00:13:07.919 --> 00:13:12.200
<v Speaker 2>approaches like master, slave and multi master. Okay, they explain

259
00:13:12.240 --> 00:13:14.679
<v Speaker 2>the proth and cons of each, gotcha. They also talk

260
00:13:14.720 --> 00:13:17.440
<v Speaker 2>about que based load leveling as a way to handle

261
00:13:17.480 --> 00:13:21.679
<v Speaker 2>those spikes in traffic and prevent individual services from getting overwhelmed.

262
00:13:21.840 --> 00:13:24.919
<v Speaker 1>Right. It's all about distributing the workload effectively and making

263
00:13:24.919 --> 00:13:28.960
<v Speaker 1>sure the system stays responsive even under heavy load.

264
00:13:29.120 --> 00:13:32.879
<v Speaker 2>Exactly. They even describe this back pressure technique where a

265
00:13:33.080 --> 00:13:37.320
<v Speaker 2>service can signal its upstream dependencies to slow down if

266
00:13:37.360 --> 00:13:38.600
<v Speaker 2>it's starting it to overload it.

267
00:13:38.840 --> 00:13:41.039
<v Speaker 1>Oh wow, it's like a traffic light system for.

268
00:13:41.039 --> 00:13:43.759
<v Speaker 2>Your software exactly, prevents a total meltdown.

269
00:13:44.000 --> 00:13:46.799
<v Speaker 1>I love these real world analogies. They really help make

270
00:13:46.840 --> 00:13:50.000
<v Speaker 1>these concepts easier to understand. So what else do they

271
00:13:50.000 --> 00:13:52.879
<v Speaker 1>cover in terms of building those robust and scalable systems.

272
00:13:52.960 --> 00:13:57.039
<v Speaker 2>They dive into fold detection and mitigation strategies, emphasizing how

273
00:13:57.080 --> 00:14:00.039
<v Speaker 2>important it is to design for failure. Makes sense to

274
00:14:00.080 --> 00:14:04.480
<v Speaker 2>talk about techniques like the heartbeat mechanism, where services periodically

275
00:14:04.600 --> 00:14:06.639
<v Speaker 2>check in with each other to make sure they're still alive.

276
00:14:07.360 --> 00:14:10.519
<v Speaker 2>And then they introduce the sidecar pattern, where a separate

277
00:14:10.559 --> 00:14:14.279
<v Speaker 2>process runs alongside your main service. Okay, the sidecar handles

278
00:14:14.279 --> 00:14:16.759
<v Speaker 2>things like logging, monitoring, and networking.

279
00:14:16.879 --> 00:14:19.759
<v Speaker 1>The sidecar pattern sounds interesting. Why is it so beneficial?

280
00:14:20.000 --> 00:14:22.440
<v Speaker 2>Well, the really cool thing about the sidecar pattern is

281
00:14:22.440 --> 00:14:25.879
<v Speaker 2>that it lets you separate those infrastructure concerns from your

282
00:14:25.879 --> 00:14:29.039
<v Speaker 2>core application logic. Oh see, it's like having a copilot

283
00:14:29.200 --> 00:14:32.559
<v Speaker 2>that handles all the navigation and communication while you focus

284
00:14:32.600 --> 00:14:33.360
<v Speaker 2>on flying.

285
00:14:33.039 --> 00:14:35.759
<v Speaker 1>The plane right, So it keeps the core application lean

286
00:14:35.919 --> 00:14:37.320
<v Speaker 1>and focused exactly.

287
00:14:37.960 --> 00:14:40.919
<v Speaker 2>And they even mention tools like envoy Proxy, which can

288
00:14:40.919 --> 00:14:44.159
<v Speaker 2>act as a sidecar. It gives you features like load balancing,

289
00:14:44.200 --> 00:14:47.360
<v Speaker 2>circuit braking, and tracing without you having to write all

290
00:14:47.360 --> 00:14:48.240
<v Speaker 2>that code yourself.

291
00:14:48.360 --> 00:14:51.879
<v Speaker 1>That's pretty handy. It sounds like leveraging existing tools and

292
00:14:51.960 --> 00:14:54.600
<v Speaker 1>frameworks is a key part of being an effective C

293
00:14:54.759 --> 00:14:58.480
<v Speaker 1>plus plus architect, absolutely so, building on that idea, they

294
00:14:58.519 --> 00:15:02.960
<v Speaker 1>shift gears to talk about mod architectural approaches, specifically cloud

295
00:15:03.039 --> 00:15:06.000
<v Speaker 1>native design. They say you should treat the cloud like

296
00:15:06.039 --> 00:15:10.200
<v Speaker 1>an operating system, abstracting away all the underlying infrastructure. Right.

297
00:15:10.600 --> 00:15:14.360
<v Speaker 1>That sounds like a really powerful way to simplify development

298
00:15:14.399 --> 00:15:15.000
<v Speaker 1>and deployment.

299
00:15:15.320 --> 00:15:18.279
<v Speaker 2>It is, and they explain the different cloud service models

300
00:15:18.320 --> 00:15:22.960
<v Speaker 2>like ii PIA, SAWS, and figs, giving some real world

301
00:15:23.039 --> 00:15:26.039
<v Speaker 2>use cases for each. They also go into techniques like

302
00:15:26.159 --> 00:15:30.720
<v Speaker 2>load balancing and service discovery, highlighting how reverse proxies work.

303
00:15:30.759 --> 00:15:34.000
<v Speaker 1>And what about containers and container orchestration. Those seem to

304
00:15:34.039 --> 00:15:35.320
<v Speaker 1>be all the rage these days.

305
00:15:35.399 --> 00:15:38.399
<v Speaker 2>They cover those too. Really yeah. They introduce the concepts

306
00:15:38.440 --> 00:15:43.159
<v Speaker 2>of containers and orchestration, mentioning popular tools like Docker, Kubernetes,

307
00:15:43.480 --> 00:15:46.559
<v Speaker 2>and Docker Swarm. It's like having a bunch of tiny,

308
00:15:46.919 --> 00:15:50.639
<v Speaker 2>self contained servers that you can easily deploy and manage.

309
00:15:50.720 --> 00:15:53.200
<v Speaker 1>That's a great way to visualize it, like packing up

310
00:15:53.200 --> 00:15:55.799
<v Speaker 1>your application with all its dependencies into a neat little

311
00:15:55.799 --> 00:15:58.120
<v Speaker 1>box that you can ship anywhere exactly. I love it.

312
00:15:58.159 --> 00:16:01.039
<v Speaker 2>But they also point out some of the downside of containers. Oh,

313
00:16:01.440 --> 00:16:05.639
<v Speaker 2>like security concerns for example, and limited portability for applications

314
00:16:05.639 --> 00:16:08.759
<v Speaker 2>that aren't designed for Linux. It's important to know that

315
00:16:08.840 --> 00:16:11.480
<v Speaker 2>trade offs before you go all in on containers.

316
00:16:11.559 --> 00:16:14.200
<v Speaker 1>Yeah, like anything else in software development, there's no one

317
00:16:14.240 --> 00:16:16.840
<v Speaker 1>size fits all solution. You have to pick the right

318
00:16:16.919 --> 00:16:20.360
<v Speaker 1>tools and approaches for what you're trying to build exactly.

319
00:16:20.799 --> 00:16:23.240
<v Speaker 2>And that brings us to another important point. They raise

320
00:16:23.919 --> 00:16:26.279
<v Speaker 2>the danger of premature optimization.

321
00:16:26.480 --> 00:16:27.679
<v Speaker 1>Oh yeah, I've heard of that.

322
00:16:27.960 --> 00:16:31.879
<v Speaker 2>Well. Performance is definitely important. They warn against getting too

323
00:16:31.919 --> 00:16:34.399
<v Speaker 2>bogged down in it early in the development process.

324
00:16:34.519 --> 00:16:35.000
<v Speaker 1>Makes sense.

325
00:16:35.279 --> 00:16:38.720
<v Speaker 2>It's usually better to focus on writing clear, correct, and

326
00:16:38.799 --> 00:16:43.279
<v Speaker 2>maintainable code first and then only optimize the parts that

327
00:16:43.320 --> 00:16:44.080
<v Speaker 2>actually need it.

328
00:16:44.320 --> 00:16:48.960
<v Speaker 1>So find that sweet spot between performance and maintainability right now.

329
00:16:49.000 --> 00:16:51.000
<v Speaker 2>Before we move on to some of the practical C

330
00:16:51.159 --> 00:16:55.279
<v Speaker 2>plus plus techniques for memory management and performance optimization. There

331
00:16:55.320 --> 00:16:58.639
<v Speaker 2>are two other crucial aspects of software development that they highlight,

332
00:16:59.200 --> 00:17:00.919
<v Speaker 2>documentation and API design.

333
00:17:01.080 --> 00:17:03.720
<v Speaker 1>Those are often overlooked, but they're so important for any

334
00:17:03.720 --> 00:17:07.119
<v Speaker 1>successful project, especially as the codebase grows and more people

335
00:17:07.119 --> 00:17:09.480
<v Speaker 1>get involved. Absolutely, so what do they have to say

336
00:17:09.519 --> 00:17:10.000
<v Speaker 1>about those?

337
00:17:10.119 --> 00:17:12.880
<v Speaker 2>They emphasize how critical it is to have well documented

338
00:17:12.920 --> 00:17:17.759
<v Speaker 2>code and well designed APIs, especially for complex C plus

339
00:17:17.799 --> 00:17:19.279
<v Speaker 2>plus projects.

340
00:17:18.839 --> 00:17:19.319
<v Speaker 1>Makes sense.

341
00:17:19.400 --> 00:17:23.680
<v Speaker 2>They introduce tools like doxygen they can automatically generate documentation

342
00:17:23.799 --> 00:17:26.039
<v Speaker 2>from your code comments. Oh cool, it makes it so

343
00:17:26.119 --> 00:17:29.160
<v Speaker 2>much easier to keep your documentation up to date. Yeah.

344
00:17:29.200 --> 00:17:32.319
<v Speaker 2>They also highlight some best practices for API design, you know,

345
00:17:32.359 --> 00:17:37.079
<v Speaker 2>like using clear naming conventions, handling errors consistently, and really

346
00:17:37.119 --> 00:17:39.599
<v Speaker 2>thinking about how developers are actually going to use your code.

347
00:17:39.759 --> 00:17:42.759
<v Speaker 1>So it's all about making the code easier to understand,

348
00:17:43.039 --> 00:17:46.200
<v Speaker 1>use and maintain, not just for yourself but for anyone

349
00:17:46.279 --> 00:17:47.640
<v Speaker 1>who might work with it in the future.

350
00:17:47.880 --> 00:17:48.359
<v Speaker 2>Exactly.

351
00:17:48.480 --> 00:17:51.480
<v Speaker 1>That's great. And finally we come to a topic that's

352
00:17:51.599 --> 00:17:57.319
<v Speaker 1>super important these days, security considerations for C plus plus applications.

353
00:17:58.119 --> 00:18:01.400
<v Speaker 1>It's not enough to bitter and systems that a fast

354
00:18:01.440 --> 00:18:04.000
<v Speaker 1>and efficient hope. They need to be secure as well.

355
00:18:04.079 --> 00:18:08.880
<v Speaker 2>Definitely. Security breaches can be devastating for companies and individual users. Absolutely,

356
00:18:09.000 --> 00:18:11.359
<v Speaker 2>So what are some key takeaways from the book on

357
00:18:11.440 --> 00:18:11.960
<v Speaker 2>this front?

358
00:18:12.200 --> 00:18:15.759
<v Speaker 1>Well, they cover a whole bunch of common vulnerabilities buffer overflows,

359
00:18:16.200 --> 00:18:18.680
<v Speaker 1>SEQL injection, cross site scripting.

360
00:18:19.079 --> 00:18:21.480
<v Speaker 2>They explain how to avoid these in your C plus

361
00:18:21.480 --> 00:18:25.480
<v Speaker 2>plus code and introduce some tools and techniques for secure coding.

362
00:18:26.000 --> 00:18:28.839
<v Speaker 2>They talk about static analysis tools, which help you find

363
00:18:28.880 --> 00:18:33.240
<v Speaker 2>potential vulnerabilities early on nice. They also discuss fuzz testing,

364
00:18:33.640 --> 00:18:37.039
<v Speaker 2>which basically tries to break your code by feeding at

365
00:18:37.160 --> 00:18:42.240
<v Speaker 2>unexpected inputs. Interesting, and sandboxing, which isolates your code from

366
00:18:42.279 --> 00:18:44.519
<v Speaker 2>the rest of the system to limit the damage if

367
00:18:44.519 --> 00:18:45.119
<v Speaker 2>there's an attack.

368
00:18:45.240 --> 00:18:47.839
<v Speaker 1>So it sounds like a multi layered approach to security

369
00:18:47.920 --> 00:18:51.599
<v Speaker 1>is essential, from secure coding practices to using tools and

370
00:18:51.640 --> 00:18:54.240
<v Speaker 1>techniques to find and fix vulnerabilities.

371
00:18:54.400 --> 00:18:57.000
<v Speaker 2>Absolutely, and they even point out how important it is

372
00:18:57.079 --> 00:19:00.559
<v Speaker 2>to manage your dependency securely. You could write perfect secure

373
00:19:00.640 --> 00:19:03.920
<v Speaker 2>code yourself, but if you include a third party library

374
00:19:03.920 --> 00:19:07.039
<v Speaker 2>that has a vulnerability, it can compromise your whole system.

375
00:19:07.079 --> 00:19:09.240
<v Speaker 1>Oh right, So it's like making sure the foundation of

376
00:19:09.240 --> 00:19:12.119
<v Speaker 1>your house is solid. If there are cracks in the foundation,

377
00:19:12.160 --> 00:19:13.920
<v Speaker 1>it doesn't matter how nice the rest of the house is.

378
00:19:14.160 --> 00:19:14.680
<v Speaker 2>Exactly.

379
00:19:14.839 --> 00:19:17.200
<v Speaker 1>So, we've covered a lot of ground here. Where do

380
00:19:17.279 --> 00:19:18.039
<v Speaker 1>we go from here?

381
00:19:18.240 --> 00:19:20.960
<v Speaker 2>Well, from here, the book actually dives into some of

382
00:19:20.960 --> 00:19:25.359
<v Speaker 2>the more practical C plus plus techniques.

383
00:19:25.680 --> 00:19:27.720
<v Speaker 1>Oh perfect. I was hoping we'd get to the nuts

384
00:19:27.720 --> 00:19:29.799
<v Speaker 1>and bolts, you know, stuff.

385
00:19:29.559 --> 00:19:34.720
<v Speaker 2>For building efficient, robust c plus plus applications exactly. And

386
00:19:34.799 --> 00:19:37.440
<v Speaker 2>earlier you mentioned that you were intrigued by that winking

387
00:19:37.480 --> 00:19:39.039
<v Speaker 2>out memory technique.

388
00:19:38.599 --> 00:19:41.160
<v Speaker 1>Right, yeah, it really caught my attention. It sounds like

389
00:19:41.200 --> 00:19:44.359
<v Speaker 1>something straight out of like a magic show or something.

390
00:19:44.519 --> 00:19:47.319
<v Speaker 2>Right. Well, it's definitely an interesting technique, Okay, especially for

391
00:19:47.400 --> 00:19:51.680
<v Speaker 2>performance critical applications. I see. So, imagine you have a

392
00:19:51.680 --> 00:19:54.920
<v Speaker 2>block of memory, right, and you've created a bunch of

393
00:19:54.920 --> 00:19:58.559
<v Speaker 2>objects in it. Traditionally, you'd have to call the destructor

394
00:19:58.640 --> 00:20:02.599
<v Speaker 2>on each object one by one before you could release.

395
00:20:02.359 --> 00:20:04.279
<v Speaker 1>The memory, right Okay, yeah, that makes sense.

396
00:20:04.359 --> 00:20:07.880
<v Speaker 2>Well, winking out memory basically lets you skip all those

397
00:20:07.960 --> 00:20:11.400
<v Speaker 2>individual destructions. You just release the whole block at once. Wow,

398
00:20:11.960 --> 00:20:13.799
<v Speaker 2>And that can save a lot of time potentially.

399
00:20:13.880 --> 00:20:16.440
<v Speaker 1>So it's like hitting the reset button on the whole

400
00:20:16.519 --> 00:20:20.319
<v Speaker 1>block of memory instead of carefully cleaning up each individual

401
00:20:20.359 --> 00:20:21.680
<v Speaker 1>item exactly.

402
00:20:22.200 --> 00:20:25.000
<v Speaker 2>But you know there's a trade off. This approach works

403
00:20:25.039 --> 00:20:28.240
<v Speaker 2>best when the objects are pretty simple and don't have

404
00:20:28.319 --> 00:20:30.519
<v Speaker 2>to manage any resources other than memory.

405
00:20:30.640 --> 00:20:33.839
<v Speaker 1>Okay, So if an object is holding onto something like

406
00:20:33.880 --> 00:20:37.000
<v Speaker 1>a file handle or a network connection, you can't just

407
00:20:37.119 --> 00:20:39.319
<v Speaker 1>wink out the memory, right.

408
00:20:39.319 --> 00:20:42.480
<v Speaker 2>Because those resources wouldn't be released properly, right, They give

409
00:20:42.519 --> 00:20:47.839
<v Speaker 2>an example of using monotonic buffer resource and polymorphical locator.

410
00:20:48.279 --> 00:20:50.839
<v Speaker 2>It shows you how to manage objects safely within a

411
00:20:50.839 --> 00:20:53.440
<v Speaker 2>pre allocated buffer and use this technique.

412
00:20:53.640 --> 00:20:55.559
<v Speaker 1>That's cool. It sounds like a powerful tool, but like

413
00:20:55.640 --> 00:20:58.720
<v Speaker 1>any tool, it needs to be used correctly. What about

414
00:20:58.720 --> 00:21:02.160
<v Speaker 1>more general advice from memory management in C plus plus work, Like,

415
00:21:02.559 --> 00:21:04.480
<v Speaker 1>what are some key principles to keep in mind?

416
00:21:04.920 --> 00:21:08.480
<v Speaker 2>Well, the book emphasizes RAII as a fundamental principle in

417
00:21:08.599 --> 00:21:13.480
<v Speaker 2>C plus plus RIII. Okay, resource acquisition is initialization right right.

418
00:21:13.599 --> 00:21:15.559
<v Speaker 2>The idea is to tie the life span of a

419
00:21:15.640 --> 00:21:18.759
<v Speaker 2>resource like a file handle or a network connection to

420
00:21:18.880 --> 00:21:20.920
<v Speaker 2>the life span of an object. Okay, So when the

421
00:21:20.920 --> 00:21:24.279
<v Speaker 2>object goes out of scope, its destructor will automatically clean

422
00:21:24.359 --> 00:21:25.200
<v Speaker 2>up the resource for you.

423
00:21:25.440 --> 00:21:29.000
<v Speaker 1>That's really clever. So it prevents those nasty memory leaks exactly.

424
00:21:29.039 --> 00:21:31.200
<v Speaker 2>It makes resource management much more robust.

425
00:21:31.480 --> 00:21:31.680
<v Speaker 1>Yeah.

426
00:21:31.839 --> 00:21:35.720
<v Speaker 2>They also talk about minimizing dynamic memory allocations whenever possible.

427
00:21:36.200 --> 00:21:39.240
<v Speaker 2>One example they gave is the small string optimization or

428
00:21:39.400 --> 00:21:43.400
<v Speaker 2>SSO SSO Okay, it basically stores short strings directly inside

429
00:21:43.440 --> 00:21:46.400
<v Speaker 2>the string object itself, instead of allocating separate memory on

430
00:21:46.400 --> 00:21:46.720
<v Speaker 2>the heat.

431
00:21:46.799 --> 00:21:49.039
<v Speaker 1>So it's like having a little pocket built into the

432
00:21:49.039 --> 00:21:51.359
<v Speaker 1>string object to hold the commonly used ones.

433
00:21:51.440 --> 00:21:53.759
<v Speaker 2>Yeah, something like that, and it saves you the overhead

434
00:21:53.759 --> 00:21:54.720
<v Speaker 2>of a separate allocation.

435
00:21:54.839 --> 00:21:57.240
<v Speaker 1>I like it. Efficiency is key, definitely.

436
00:21:57.839 --> 00:22:02.640
<v Speaker 2>They also discuss techniques like polymorphicalators and memory arenas which

437
00:22:02.680 --> 00:22:06.279
<v Speaker 2>can really help optimize memory usage in certain situations.

438
00:22:06.440 --> 00:22:11.559
<v Speaker 1>Interesting. So, moving beyond memory management, what about performance optimization

439
00:22:11.680 --> 00:22:15.519
<v Speaker 1>more generally? Any insights from the C plus plus trenches.

440
00:22:15.759 --> 00:22:19.000
<v Speaker 2>Oh yeah, definitely. They start by stressing how important it

441
00:22:19.039 --> 00:22:22.880
<v Speaker 2>is to measure performance accurately. They talk about profiling, tracing,

442
00:22:23.160 --> 00:22:27.039
<v Speaker 2>and micro benchmarking. They even mentioned the Google Benchmark Library,

443
00:22:27.079 --> 00:22:30.319
<v Speaker 2>which is a tool specifically for writing and running those

444
00:22:30.359 --> 00:22:33.960
<v Speaker 2>micro benchmarks. Think of it like a stopwatch for your code.

445
00:22:34.119 --> 00:22:37.319
<v Speaker 2>Oh cool, you can pinpoint exactly how long those critical

446
00:22:37.359 --> 00:22:38.359
<v Speaker 2>operations are taking.

447
00:22:38.680 --> 00:22:41.359
<v Speaker 1>That sounds super helpful, especially when you're trying to squeeze

448
00:22:41.400 --> 00:22:42.680
<v Speaker 1>out every bit of performance.

449
00:22:42.880 --> 00:22:46.319
<v Speaker 2>Right Once you've figured out where the bottlenecks are, the

450
00:22:46.319 --> 00:22:49.000
<v Speaker 2>book gives some strategies for actually making the code faster.

451
00:22:49.079 --> 00:22:49.920
<v Speaker 1>Okay, let's see them.

452
00:22:50.319 --> 00:22:53.079
<v Speaker 2>They show you how to use the standard library algorithms,

453
00:22:53.720 --> 00:22:57.039
<v Speaker 2>the ranges library, and other features of modern C plus

454
00:22:57.039 --> 00:22:59.440
<v Speaker 2>plus to write really efficient code.

455
00:22:59.680 --> 00:23:00.119
<v Speaker 1>Nice.

456
00:23:00.279 --> 00:23:04.200
<v Speaker 2>They even touch on techniques for parallelizing computations using threads,

457
00:23:04.559 --> 00:23:07.480
<v Speaker 2>processes and frameworks like open MP and MPI.

458
00:23:07.880 --> 00:23:11.400
<v Speaker 1>Now parallelization that sounds really powerful but also quite complex.

459
00:23:11.599 --> 00:23:13.920
<v Speaker 1>Is there any way to estimate how much of a

460
00:23:14.000 --> 00:23:16.440
<v Speaker 1>speed up you might get from parallelizing your code?

461
00:23:16.880 --> 00:23:20.960
<v Speaker 2>Actually? Yeah. They introduce Amdhl's law, which helps you understand

462
00:23:21.000 --> 00:23:23.920
<v Speaker 2>the limitations of parallelization. It shows you how much of

463
00:23:24.000 --> 00:23:26.839
<v Speaker 2>your code can actually be run concurrently.

464
00:23:26.440 --> 00:23:28.680
<v Speaker 1>So it's like a reality check before you go crazy

465
00:23:28.759 --> 00:23:30.839
<v Speaker 1>trying to multi thread everything exactly.

466
00:23:31.279 --> 00:23:34.119
<v Speaker 2>It helps you be more strategic about when and how

467
00:23:34.200 --> 00:23:36.400
<v Speaker 2>you apply these parallelization techniques.

468
00:23:36.799 --> 00:23:39.279
<v Speaker 1>Makes sense, So it sounds like the key takeaway is

469
00:23:39.319 --> 00:23:43.519
<v Speaker 1>to measure, analyze, and then optimize strategically exactly.

470
00:23:43.559 --> 00:23:47.039
<v Speaker 2>And throughout their discussion of optimization, they keep reminding us

471
00:23:47.079 --> 00:23:50.599
<v Speaker 2>that clarity and correctness come first. Don't fall into that

472
00:23:50.680 --> 00:23:54.960
<v Speaker 2>trap of premature optimization. Get the code working right and

473
00:23:55.000 --> 00:23:57.839
<v Speaker 2>clean it up, and then focus on optimizing the parts

474
00:23:57.839 --> 00:23:58.960
<v Speaker 2>that really need it right.

475
00:23:59.079 --> 00:24:03.519
<v Speaker 1>It's all about that balance between performance and maintainability. Speaking

476
00:24:03.519 --> 00:24:06.720
<v Speaker 1>of maintainability, what do they have to say about documentation

477
00:24:06.839 --> 00:24:07.920
<v Speaker 1>and API design?

478
00:24:08.319 --> 00:24:08.839
<v Speaker 2>Good point?

479
00:24:09.079 --> 00:24:12.240
<v Speaker 1>Those often feel like afterthoughts, but they're super critical for

480
00:24:12.359 --> 00:24:14.480
<v Speaker 1>any long lived software.

481
00:24:14.079 --> 00:24:17.960
<v Speaker 2>Project, right, absolutely. They really emphasize that well documented code

482
00:24:18.680 --> 00:24:22.839
<v Speaker 2>and well designed APIs are crucial for any complex C

483
00:24:22.839 --> 00:24:24.000
<v Speaker 2>plus plus project.

484
00:24:24.160 --> 00:24:24.920
<v Speaker 1>Yeah for sure.

485
00:24:24.960 --> 00:24:27.200
<v Speaker 2>And you know they bring up tools like Oxygen again,

486
00:24:27.359 --> 00:24:27.920
<v Speaker 2>oh right.

487
00:24:27.880 --> 00:24:29.880
<v Speaker 1>For generating documentation automatically.

488
00:24:30.079 --> 00:24:32.359
<v Speaker 2>Yeah, it makes it so much easier to keep the

489
00:24:32.400 --> 00:24:35.920
<v Speaker 2>documentation in sync with the code. They also spend some

490
00:24:36.039 --> 00:24:41.759
<v Speaker 2>time on best practices for API design, using clear naming conventions,

491
00:24:42.079 --> 00:24:46.079
<v Speaker 2>handling errors consistently, and really putting yourself in the shoes

492
00:24:46.119 --> 00:24:48.599
<v Speaker 2>of the developer who will be using your code.

493
00:24:48.680 --> 00:24:51.119
<v Speaker 1>So it's all about making the code easier to understand

494
00:24:51.160 --> 00:24:53.559
<v Speaker 1>and use, not just for yourself but for anyone who

495
00:24:53.680 --> 00:24:54.880
<v Speaker 1>might work with it later on.

496
00:24:55.119 --> 00:24:58.359
<v Speaker 2>Exactly, it's about thinking long term. And actually I think

497
00:24:58.400 --> 00:25:00.680
<v Speaker 2>that leads nicely into the final topic they cover one

498
00:25:00.680 --> 00:25:04.839
<v Speaker 2>that's absolutely essential these days, security considerations for C plus

499
00:25:04.839 --> 00:25:05.799
<v Speaker 2>plus applications.

500
00:25:05.880 --> 00:25:08.160
<v Speaker 1>Oh right, security, We can't forget about that.

501
00:25:08.160 --> 00:25:10.839
<v Speaker 2>Definitely not. It's not enough to build systems that are

502
00:25:10.880 --> 00:25:13.680
<v Speaker 2>fast and efficient, they also need to be secure, that's

503
00:25:13.680 --> 00:25:14.079
<v Speaker 2>for sure.

504
00:25:14.160 --> 00:25:18.160
<v Speaker 1>Security breaches can be devastating both for companies and individual users.

505
00:25:18.319 --> 00:25:20.920
<v Speaker 1>Absolutely so What are some of the key takeaways from

506
00:25:20.920 --> 00:25:21.880
<v Speaker 1>the book on this front.

507
00:25:22.240 --> 00:25:25.039
<v Speaker 2>Well, they covered a wide range of those common vulnerabilities,

508
00:25:25.559 --> 00:25:30.200
<v Speaker 2>things like buffer overflows, sequel injection, cross site scripting. Yeah,

509
00:25:30.240 --> 00:25:32.519
<v Speaker 2>I've heard of those, and they explain how to avoid

510
00:25:32.559 --> 00:25:35.279
<v Speaker 2>these pitfalls in your C plus plus code. And they

511
00:25:35.319 --> 00:25:38.559
<v Speaker 2>introduce some tools and techniques for secure coding. Okay, Like

512
00:25:38.720 --> 00:25:41.839
<v Speaker 2>they mentioned static analysis tools which can help you catch

513
00:25:41.880 --> 00:25:44.640
<v Speaker 2>potential vulnerabilities early on in the development.

514
00:25:44.240 --> 00:25:46.160
<v Speaker 1>Process, right, those are really helpful.

515
00:25:46.480 --> 00:25:49.599
<v Speaker 2>They also talk about fuss testing. It's a technique for

516
00:25:49.640 --> 00:25:54.440
<v Speaker 2>finding bugs by feeding your program all sorts of unexpected inputs,

517
00:25:54.839 --> 00:25:56.680
<v Speaker 2>you know, to see if you can make a break. Interesting,

518
00:25:56.799 --> 00:25:59.759
<v Speaker 2>and then there's sandboxing, which isolates your code from the

519
00:26:00.200 --> 00:26:03.359
<v Speaker 2>the system. It can help limit the damage if an

520
00:26:03.359 --> 00:26:07.960
<v Speaker 2>attacker does manage to exploit a vulnerability.

521
00:26:06.839 --> 00:26:10.079
<v Speaker 1>Smart So it sounds like a multi layered approach to

522
00:26:10.359 --> 00:26:14.559
<v Speaker 1>security is essential. Secure coding practices, tools and techniques to

523
00:26:14.680 --> 00:26:17.880
<v Speaker 1>catch and fix vulnerabilities, and then ways to minimize the

524
00:26:17.960 --> 00:26:21.480
<v Speaker 1>damage if something does slip through the cracks exactly.

525
00:26:21.480 --> 00:26:25.319
<v Speaker 2>And they also emphasize the importance of secured dependency management.

526
00:26:26.160 --> 00:26:29.200
<v Speaker 2>You might write perfectly secure code yourself, but if you

527
00:26:29.240 --> 00:26:32.319
<v Speaker 2>include a third party library that has a security hole,

528
00:26:32.839 --> 00:26:36.759
<v Speaker 2>it can compromise your entire system, So keeping those libraries

529
00:26:36.880 --> 00:26:38.599
<v Speaker 2>up to date is really important.

530
00:26:38.960 --> 00:26:42.279
<v Speaker 1>It's like making sure the foundation of your house is solid.

531
00:26:42.720 --> 00:26:45.400
<v Speaker 1>If the foundation is cracked, it doesn't matter how beautiful

532
00:26:45.440 --> 00:26:47.720
<v Speaker 1>the rest of the house is, It's still vulnerable.

533
00:26:47.839 --> 00:26:48.759
<v Speaker 2>A perfect analogy.

534
00:26:49.519 --> 00:26:52.559
<v Speaker 1>So we've covered a ton of ground here, from high

535
00:26:52.640 --> 00:26:57.359
<v Speaker 1>level architectural principles to practical C plus plus techniques and

536
00:26:57.440 --> 00:27:01.000
<v Speaker 1>even security considerations. What is your I feel like I've

537
00:27:01.039 --> 00:27:03.359
<v Speaker 1>gained a much deeper understanding of what it takes to

538
00:27:03.400 --> 00:27:05.400
<v Speaker 1>build great C plus plus software.

539
00:27:05.440 --> 00:27:07.119
<v Speaker 2>Me too. It's been a great deep dive.

540
00:27:07.079 --> 00:27:09.039
<v Speaker 1>It really has, and I'm definitely gonna keep all this

541
00:27:09.079 --> 00:27:11.240
<v Speaker 1>in mind as I move forward with my own projects.

542
00:27:11.279 --> 00:27:14.240
<v Speaker 2>That's great to hear and remember. C plus plus is

543
00:27:14.279 --> 00:27:16.720
<v Speaker 2>always evolving, so keep learning and exploring.

544
00:27:16.839 --> 00:27:19.160
<v Speaker 1>I will thanks again for walking me through all this.

545
00:27:19.279 --> 00:27:20.240
<v Speaker 1>I really appreciate it.

546
00:27:20.319 --> 00:27:21.920
<v Speaker 2>You're very welcome. It was my pleasure.

547
00:27:22.240 --> 00:27:24.039
<v Speaker 1>So where do we go from here? It feels like

548
00:27:24.079 --> 00:27:28.440
<v Speaker 1>we've built this solid understanding of like the principles of

549
00:27:28.759 --> 00:27:32.839
<v Speaker 1>C plus plus software architecture. You know, yeah, definitely, But

550
00:27:32.880 --> 00:27:36.119
<v Speaker 1>what about the h the actual details the practical stuff

551
00:27:36.119 --> 00:27:40.599
<v Speaker 1>for building those efficient and robust C plus plus applications. Right.

552
00:27:40.759 --> 00:27:43.559
<v Speaker 1>You mentioned you were intrigued by the winking out memory

553
00:27:43.599 --> 00:27:46.079
<v Speaker 1>technique earlier. Oh yeah, can you tell me a little

554
00:27:46.119 --> 00:27:48.400
<v Speaker 1>more about what that actually is and when you might

555
00:27:48.519 --> 00:27:48.799
<v Speaker 1>use it?

556
00:27:49.000 --> 00:27:54.359
<v Speaker 2>Yeah, So it's it's really intriguing technique, especially when you're

557
00:27:54.359 --> 00:27:57.880
<v Speaker 2>working on those you know, performance critical applications. Okay, So

558
00:27:58.839 --> 00:28:01.799
<v Speaker 2>imagine you've got this block of memory, right, and you've

559
00:28:01.839 --> 00:28:05.319
<v Speaker 2>created all these objects in it. Traditionally, you would need

560
00:28:05.359 --> 00:28:08.799
<v Speaker 2>to call the destructor on each object one by one

561
00:28:08.880 --> 00:28:11.519
<v Speaker 2>before you could release the memory, right, Yeah, But winking

562
00:28:11.519 --> 00:28:15.599
<v Speaker 2>out memory basically lets you just bypass all those individual destructions.

563
00:28:15.640 --> 00:28:17.640
<v Speaker 2>You just release the entire block all at once.

564
00:28:17.799 --> 00:28:18.240
<v Speaker 1>Wow.

565
00:28:18.440 --> 00:28:20.400
<v Speaker 2>And potentially you can save a lot of time doing that.

566
00:28:20.640 --> 00:28:22.759
<v Speaker 1>So it's like just hitting the reset button on that

567
00:28:22.839 --> 00:28:25.640
<v Speaker 1>whole block of memory instead of you know, carefully cleaning

568
00:28:25.680 --> 00:28:27.920
<v Speaker 1>up each item one by one exactly.

569
00:28:28.160 --> 00:28:31.519
<v Speaker 2>But there is a trade off. Okay, This approach really

570
00:28:31.559 --> 00:28:35.119
<v Speaker 2>only works well when your objects are relatively simple and

571
00:28:35.160 --> 00:28:38.440
<v Speaker 2>they don't have to manage any resources other than memory.

572
00:28:38.720 --> 00:28:41.599
<v Speaker 1>So if an object is like holding a file handle

573
00:28:41.720 --> 00:28:45.160
<v Speaker 1>or a network connection, you can't just wink out the memory.

574
00:28:45.279 --> 00:28:48.200
<v Speaker 2>Right, you can't because those resources wouldn't get released properly.

575
00:28:48.319 --> 00:28:49.279
<v Speaker 1>Right, Yeah, makes sense.

576
00:28:49.359 --> 00:28:52.920
<v Speaker 2>Now the book is a good example using monotonic buffer

577
00:28:53.000 --> 00:28:56.720
<v Speaker 2>resource and polymorphical locator to manage objects within a pre

578
00:28:56.759 --> 00:28:59.839
<v Speaker 2>allocated buffer. They show how you can safely apply this

579
00:29:00.079 --> 00:29:01.200
<v Speaker 2>leaning out technique.

580
00:29:01.359 --> 00:29:03.480
<v Speaker 1>Okay, that makes sense. It sounds like a powerful tool,

581
00:29:03.559 --> 00:29:05.640
<v Speaker 1>but like any tool, you need to use it in

582
00:29:05.640 --> 00:29:10.400
<v Speaker 1>the right situation. What about some more general advice for

583
00:29:10.640 --> 00:29:14.880
<v Speaker 1>memory management in C plus plus applications? Sure, what are

584
00:29:14.880 --> 00:29:16.599
<v Speaker 1>some key principles to keep in mind?

585
00:29:16.680 --> 00:29:22.160
<v Speaker 2>Well, they really highlight RAII resource acquisition is initialization as

586
00:29:22.200 --> 00:29:25.839
<v Speaker 2>this fundamental principle in C plus plus plan. The idea

587
00:29:25.960 --> 00:29:28.920
<v Speaker 2>is to connect the life span of a resource like

588
00:29:29.000 --> 00:29:32.240
<v Speaker 2>say a file handle or a network connection, to the

589
00:29:32.240 --> 00:29:34.759
<v Speaker 2>life span of an object. Okay, so when the object

590
00:29:34.759 --> 00:29:37.839
<v Speaker 2>goes out of scope, its destructor will automatically clean up

591
00:29:37.880 --> 00:29:38.759
<v Speaker 2>the resource for you.

592
00:29:38.839 --> 00:29:41.559
<v Speaker 1>Oh nice, So you don't have to worry about memory leaks.

593
00:29:41.359 --> 00:29:44.480
<v Speaker 2>Right exactly. It makes resource management a lot more robust.

594
00:29:44.920 --> 00:29:48.519
<v Speaker 2>They also talk about minimizing those dynamic memory allocations whenever

595
00:29:48.559 --> 00:29:48.839
<v Speaker 2>you can.

596
00:29:49.000 --> 00:29:49.599
<v Speaker 1>Okay, yeah.

597
00:29:49.759 --> 00:29:52.480
<v Speaker 2>One example they give is the small string optimization or

598
00:29:52.599 --> 00:29:56.720
<v Speaker 2>sso sso okay, which stores those short strings directly inside

599
00:29:56.759 --> 00:29:59.359
<v Speaker 2>the string object instead of allocating separate memory.

600
00:29:59.559 --> 00:30:02.319
<v Speaker 1>Oh okay, So it's like having a little built in pocket.

601
00:30:02.079 --> 00:30:04.720
<v Speaker 2>Right exactly, And that saves you the overhead of having

602
00:30:04.720 --> 00:30:06.200
<v Speaker 2>to do a separate allocation each time.

603
00:30:06.279 --> 00:30:07.200
<v Speaker 1>Efficiency for the win.

604
00:30:07.799 --> 00:30:10.799
<v Speaker 2>Right. They also go over things like polymorphic allocators in

605
00:30:10.839 --> 00:30:13.880
<v Speaker 2>memory arenas. Those can be really helpful for optimizing memory

606
00:30:13.960 --> 00:30:15.279
<v Speaker 2>use in certain situations.

607
00:30:15.519 --> 00:30:19.359
<v Speaker 1>Interesting, okay, So moving on from memory management, what about

608
00:30:19.440 --> 00:30:23.279
<v Speaker 1>performance optimization more broadly? Any good tips from the C

609
00:30:23.359 --> 00:30:24.200
<v Speaker 1>plus plus world.

610
00:30:24.480 --> 00:30:29.599
<v Speaker 2>Yeah, for sure. They emphasize the importance of measuring performance accurately,

611
00:30:29.920 --> 00:30:33.400
<v Speaker 2>you know, things like profiling, tracing, and micro benchmarking. And

612
00:30:33.440 --> 00:30:36.559
<v Speaker 2>they even mentioned the Google Benchmark Library, which is a

613
00:30:36.559 --> 00:30:40.279
<v Speaker 2>specific tool for writing and running those micro benchmarks. You

614
00:30:40.279 --> 00:30:42.279
<v Speaker 2>can think of it like a stopwatch for your code.

615
00:30:42.559 --> 00:30:43.319
<v Speaker 1>Oh that's cool.

616
00:30:43.400 --> 00:30:47.079
<v Speaker 2>Let's you pinpoint exactly how long those critical operations are taking.

617
00:30:47.279 --> 00:30:49.880
<v Speaker 1>That's a must have when you're trying to optimize for performance.

618
00:30:50.480 --> 00:30:53.880
<v Speaker 1>So once you've identified where those bottlenecks are, what are

619
00:30:53.920 --> 00:30:57.359
<v Speaker 1>some of their strategies for actually making the code run faster.

620
00:30:57.720 --> 00:31:01.640
<v Speaker 2>Well, they give a bunch of practical examples, standard library algorithms,

621
00:31:01.640 --> 00:31:05.200
<v Speaker 2>the ranges library, and other features of modern C plus

622
00:31:05.200 --> 00:31:07.359
<v Speaker 2>plus from Okay, they show you how to use all

623
00:31:07.440 --> 00:31:10.799
<v Speaker 2>these to write really efficient code. Nice. And they also

624
00:31:10.839 --> 00:31:15.440
<v Speaker 2>talk about parallelizing computations oh right, using threads, processes and

625
00:31:15.519 --> 00:31:17.599
<v Speaker 2>frameworks like open MP and MPI.

626
00:31:17.880 --> 00:31:23.799
<v Speaker 1>Parallelization sounds pretty powerful, but also pretty complex to get right.

627
00:31:23.720 --> 00:31:24.160
<v Speaker 2>It can be.

628
00:31:24.240 --> 00:31:26.119
<v Speaker 1>Yeah, is there any way to tell how much of

629
00:31:26.119 --> 00:31:29.599
<v Speaker 1>a speed up you might get from parallelizing your cone?

630
00:31:30.039 --> 00:31:31.880
<v Speaker 2>Actually, they talk about Amdall's law.

631
00:31:32.039 --> 00:31:32.400
<v Speaker 1>Okay.

632
00:31:32.640 --> 00:31:36.000
<v Speaker 2>It helps you figure out the limits of parallelization based

633
00:31:36.039 --> 00:31:37.920
<v Speaker 2>on how much of your code can actually run at

634
00:31:37.920 --> 00:31:38.480
<v Speaker 2>the same time.

635
00:31:38.799 --> 00:31:41.000
<v Speaker 1>So it's a good reality check before you try to

636
00:31:41.119 --> 00:31:42.079
<v Speaker 1>multi thread everything.

637
00:31:42.160 --> 00:31:45.039
<v Speaker 2>Right exactly. It helps you be more strategic about how

638
00:31:45.079 --> 00:31:46.240
<v Speaker 2>you use those techniques.

639
00:31:46.480 --> 00:31:50.319
<v Speaker 1>Awesome. So it seems like the key takeaway is to measure, analyze,

640
00:31:50.359 --> 00:31:52.799
<v Speaker 1>and then optimize strategically.

641
00:31:52.279 --> 00:31:55.960
<v Speaker 2>Exactly, and throughout the whole optimization discussion, they remind us

642
00:31:56.000 --> 00:31:59.559
<v Speaker 2>that clarity and correctness are the most important things. Don't

643
00:31:59.559 --> 00:32:02.759
<v Speaker 2>fall into the trap of premature optimization.

644
00:32:02.400 --> 00:32:06.039
<v Speaker 1>Right, get it working, write first, then make it fast exactly.

645
00:32:06.400 --> 00:32:10.079
<v Speaker 1>Speaking of maintainability, what do they say about documentation and

646
00:32:10.200 --> 00:32:13.440
<v Speaker 1>API design. Those can feel like afterthoughts sometimes, but they're

647
00:32:13.480 --> 00:32:15.759
<v Speaker 1>really important for any long term project, right.

648
00:32:15.960 --> 00:32:19.519
<v Speaker 2>Absolutely. They stress that having well documented code and well

649
00:32:19.559 --> 00:32:24.400
<v Speaker 2>designed APIs is essential for any complex C plus plus project,

650
00:32:24.880 --> 00:32:28.839
<v Speaker 2>and they bring up those tools like Oxygen again, which

651
00:32:29.119 --> 00:32:33.880
<v Speaker 2>automatically generate documentation from your code comments, right, which makes

652
00:32:33.880 --> 00:32:37.000
<v Speaker 2>it so much easier to keep the documentation updated as

653
00:32:37.039 --> 00:32:37.839
<v Speaker 2>the code changes.

654
00:32:37.960 --> 00:32:38.400
<v Speaker 1>It does.

655
00:32:38.559 --> 00:32:41.799
<v Speaker 2>They also dive into those best practices for API design,

656
00:32:42.079 --> 00:32:46.440
<v Speaker 2>like clear naming conventions, consistent error handling, and really thinking

657
00:32:46.480 --> 00:32:48.759
<v Speaker 2>about how other developers will use your code.

658
00:32:48.799 --> 00:32:52.319
<v Speaker 1>So it's all about making your code easier for other

659
00:32:52.400 --> 00:32:55.160
<v Speaker 1>people to understand and work with, not just for yourself, right.

660
00:32:55.200 --> 00:32:57.880
<v Speaker 2>It's all about taking that long term view. And you

661
00:32:57.880 --> 00:33:00.400
<v Speaker 2>know that actually leads nicely into the last topic they cover,

662
00:33:00.440 --> 00:33:02.039
<v Speaker 2>which is security considerations.

663
00:33:02.119 --> 00:33:04.200
<v Speaker 1>Right. Security can't forget about.

664
00:33:04.000 --> 00:33:07.240
<v Speaker 2>That, definitely not. It's not enough to just build systems

665
00:33:07.240 --> 00:33:09.559
<v Speaker 2>that are fast and efficient. They need to be secure

666
00:33:09.599 --> 00:33:10.680
<v Speaker 2>to absolutely.

667
00:33:10.720 --> 00:33:13.960
<v Speaker 1>Security breaches can be really damaging for both companies and

668
00:33:14.160 --> 00:33:15.279
<v Speaker 1>individual users.

669
00:33:15.359 --> 00:33:18.480
<v Speaker 2>They can, so they cover a bunch of common vulnerabilities

670
00:33:18.519 --> 00:33:23.720
<v Speaker 2>like buffer overflows, sequel injection, cross site scripting, all that stuff.

671
00:33:23.799 --> 00:33:25.079
<v Speaker 1>Yep. Those are the big ones.

672
00:33:25.039 --> 00:33:28.039
<v Speaker 2>And they explain how to avoid these pitfalls in your

673
00:33:28.079 --> 00:33:31.960
<v Speaker 2>C plus plus code. Plus, they introduce some tools and

674
00:33:32.000 --> 00:33:35.119
<v Speaker 2>techniques for writing secure code. What kind of tools, Well,

675
00:33:35.160 --> 00:33:38.240
<v Speaker 2>like static analysis tools which help you catch those potential

676
00:33:38.319 --> 00:33:42.119
<v Speaker 2>vulnerabilities early on. Oh that's then there's fuzz testing, which

677
00:33:42.160 --> 00:33:44.839
<v Speaker 2>basically throws all sorts of random inputs at your program

678
00:33:44.920 --> 00:33:46.000
<v Speaker 2>to see if you can make a break.

679
00:33:46.079 --> 00:33:46.920
<v Speaker 1>That's a cool idea.

680
00:33:47.119 --> 00:33:50.400
<v Speaker 2>And sandboxing, which isolates your code from the rest of

681
00:33:50.440 --> 00:33:52.519
<v Speaker 2>the system to try and limit the damage if an

682
00:33:52.559 --> 00:33:55.559
<v Speaker 2>attacker does find a way in smart and they also

683
00:33:55.880 --> 00:34:00.359
<v Speaker 2>highlight secure dependency management because you know, you could rite

684
00:34:00.359 --> 00:34:03.000
<v Speaker 2>perfectly secure code yourself, but if you include a third

685
00:34:03.000 --> 00:34:06.720
<v Speaker 2>party library that has a vulnerability, it can compromise everything.

686
00:34:07.079 --> 00:34:09.480
<v Speaker 1>Oh right, It's like making sure the foundation of your

687
00:34:09.480 --> 00:34:12.320
<v Speaker 1>house is solid. Right. If the foundation is weak, the

688
00:34:12.360 --> 00:34:13.360
<v Speaker 1>whole house is at risk.

689
00:34:13.480 --> 00:34:16.440
<v Speaker 2>A perfect analogy. So yeah, it looks like we've covered

690
00:34:16.480 --> 00:34:18.599
<v Speaker 2>a ton of ground in this deep dive, from those

691
00:34:18.679 --> 00:34:22.280
<v Speaker 2>high level architectural principles to those practical C plus plus

692
00:34:22.360 --> 00:34:25.559
<v Speaker 2>techniques and those super important security considerations.

693
00:34:26.159 --> 00:34:28.440
<v Speaker 1>What a journey it really has been. I feel like

694
00:34:28.440 --> 00:34:32.039
<v Speaker 1>I've learned so much about what it takes to build

695
00:34:32.199 --> 00:34:35.840
<v Speaker 1>really great C plus plus software, and I'm definitely going

696
00:34:35.880 --> 00:34:37.480
<v Speaker 1>to keep all of this in mind as I work

697
00:34:37.519 --> 00:34:38.480
<v Speaker 1>on my own projects.

698
00:34:38.719 --> 00:34:42.599
<v Speaker 2>That's awesome and a remember C plus plus is always evolving,

699
00:34:43.119 --> 00:34:46.400
<v Speaker 2>so keep learning, keep exploring. There's always something new to discover.

700
00:34:46.760 --> 00:34:49.239
<v Speaker 1>I will thanks again for guiding me through this deep dive.

701
00:34:49.280 --> 00:34:50.199
<v Speaker 1>I really appreciate it.

702
00:34:50.239 --> 00:34:51.679
<v Speaker 2>You're very welcome. It's been my pleasure
