WEBVTT

1
00:00:05.320 --> 00:00:09.880
<v Speaker 1>Hello everybody, and welcome to another exciting episode of JavaScript Jabber.

2
00:00:10.439 --> 00:00:14.480
<v Speaker 1>Today on our panel, we've got a j O'Neil how aj.

3
00:00:15.359 --> 00:00:18.640
<v Speaker 2>Yo yo yo, coming at you live from the Shed.

4
00:00:19.160 --> 00:00:22.600
<v Speaker 1>The Purple Room, the Purple Room, and.

5
00:00:22.559 --> 00:00:26.719
<v Speaker 3>Steve Edwards yo coming at you from a how's always

6
00:00:26.719 --> 00:00:28.480
<v Speaker 3>cool and cloudy Portland this time of year?

7
00:00:29.480 --> 00:00:29.800
<v Speaker 4>Wow?

8
00:00:30.000 --> 00:00:33.439
<v Speaker 1>Here in tel Aviv it's well, it's effectively summer really,

9
00:00:35.439 --> 00:00:39.119
<v Speaker 1>So we've got two great guests with us this week.

10
00:00:39.479 --> 00:00:43.640
<v Speaker 1>We've got Ariel Schulmann and we've got Liran Tal Say

11
00:00:43.679 --> 00:00:45.799
<v Speaker 1>hi to our listeners please.

12
00:00:46.640 --> 00:00:51.119
<v Speaker 5>Hey, how's everybody going live from Tel Aviv? Which is

13
00:00:51.560 --> 00:00:52.840
<v Speaker 5>again summer here now?

14
00:00:53.799 --> 00:00:54.399
<v Speaker 4>So jealous?

15
00:00:55.280 --> 00:00:59.560
<v Speaker 3>Yeah, we got like really want we got to tease

16
00:00:59.679 --> 00:01:02.200
<v Speaker 3>really two really warm days last week during the kids

17
00:01:02.200 --> 00:01:04.560
<v Speaker 3>spring break, and then went back to the cool and rainy,

18
00:01:04.599 --> 00:01:07.200
<v Speaker 3>which it's great for skiing, didn't snow up on the mountain,

19
00:01:07.239 --> 00:01:08.959
<v Speaker 3>but not so much for everybody else.

20
00:01:09.719 --> 00:01:13.799
<v Speaker 5>We had two rainy days.

21
00:01:13.200 --> 00:01:18.519
<v Speaker 1>Yeah, this year we hardly had any any winter really,

22
00:01:19.760 --> 00:01:22.200
<v Speaker 1>it was mostly summer all year long.

23
00:01:22.480 --> 00:01:24.200
<v Speaker 4>This year. I'm kind of springish.

24
00:01:24.680 --> 00:01:27.280
<v Speaker 5>Just the best part of global warming. When the winter

25
00:01:27.439 --> 00:01:29.120
<v Speaker 5>is warm, it's enjoy.

26
00:01:30.480 --> 00:01:35.760
<v Speaker 1>Yeah, so putting the weather aside, Uh, we are here

27
00:01:35.799 --> 00:01:37.959
<v Speaker 1>to talk about typescript.

28
00:01:38.079 --> 00:01:42.120
<v Speaker 4>I guess in the context of oh no.

29
00:01:42.120 --> 00:01:45.280
<v Speaker 5>Already we're already going to start fighting.

30
00:01:45.599 --> 00:01:46.599
<v Speaker 4>Yeah, typescript.

31
00:01:46.640 --> 00:01:48.840
<v Speaker 1>But I guess in the in general or in the

32
00:01:48.879 --> 00:01:55.359
<v Speaker 1>context of security, maybe both, maybe both. So I think

33
00:01:55.599 --> 00:02:00.439
<v Speaker 1>like everybody knows what typescript is, and from what I've

34
00:02:00.480 --> 00:02:05.719
<v Speaker 1>been experiencing and seeing, everybody is more or less using typescript.

35
00:02:06.719 --> 00:02:11.360
<v Speaker 1>I'm hard pressed to think about projects that don't use

36
00:02:11.400 --> 00:02:16.680
<v Speaker 1>typescript unless they're really legacy projects. Any new projects seems

37
00:02:16.719 --> 00:02:21.240
<v Speaker 1>to be written in typescript. Does anybody disagree with this statement?

38
00:02:21.919 --> 00:02:24.439
<v Speaker 5>Absolutely secure standard.

39
00:02:25.159 --> 00:02:28.960
<v Speaker 4>Please in the enterprise space, even not in.

40
00:02:28.919 --> 00:02:33.520
<v Speaker 5>The enterprise base, I would say that even small projects

41
00:02:33.719 --> 00:02:36.719
<v Speaker 5>tend to start with typescript now for the sake of

42
00:02:36.719 --> 00:02:38.240
<v Speaker 5>the developer experience.

43
00:02:38.439 --> 00:02:41.680
<v Speaker 1>Well, for the sake of AI, because you use an

44
00:02:41.719 --> 00:02:45.560
<v Speaker 1>AI tool to generate your code and it generates it

45
00:02:45.599 --> 00:02:46.280
<v Speaker 1>in typescript.

46
00:02:47.280 --> 00:02:51.159
<v Speaker 6>I think before that, though, like you had, like even

47
00:02:51.199 --> 00:02:53.840
<v Speaker 6>starter projects, like the default for like astro, if you

48
00:02:53.879 --> 00:02:57.039
<v Speaker 6>wanted a blog would be like defaulting to typescript, and

49
00:02:57.280 --> 00:03:00.879
<v Speaker 6>you know things like that. So you'd think a framework

50
00:03:00.960 --> 00:03:03.639
<v Speaker 6>or some library and like it would default you to typescript,

51
00:03:03.639 --> 00:03:06.080
<v Speaker 6>and I think it would be if you weren't doing

52
00:03:06.199 --> 00:03:09.599
<v Speaker 6>typscript before, you'd like have to mess around with it

53
00:03:09.639 --> 00:03:12.240
<v Speaker 6>to figure out how to like don add to typescript here,

54
00:03:14.479 --> 00:03:19.120
<v Speaker 6>which maybe I know because I'm not naturally a typescript

55
00:03:19.520 --> 00:03:22.960
<v Speaker 6>but yeah, I also do agree like the typescript that's

56
00:03:23.039 --> 00:03:24.800
<v Speaker 6>kind of like taken over the system, and I think

57
00:03:24.800 --> 00:03:25.240
<v Speaker 6>that's okay.

58
00:03:26.080 --> 00:03:27.919
<v Speaker 4>Oh yeah, by the way, it just said that you

59
00:03:28.080 --> 00:03:31.879
<v Speaker 4>switched audio devices for some reason, do you hear me?

60
00:03:32.520 --> 00:03:36.000
<v Speaker 1>Yeah, yeah, yeah, it seems it's not coming through your

61
00:03:36.159 --> 00:03:42.879
<v Speaker 1>microphone anyway. Uh. Probably the only scenario where I'm probably

62
00:03:43.000 --> 00:03:47.280
<v Speaker 1>unlikely to use typescript would be if I'm doing something

63
00:03:47.360 --> 00:03:51.919
<v Speaker 1>like a lead code interview. Uh, and then I you know,

64
00:03:52.560 --> 00:03:55.240
<v Speaker 1>in that type of a situation, I probably just.

65
00:03:56.240 --> 00:03:59.000
<v Speaker 6>Use photo, which is JavaScript essentially.

66
00:03:59.159 --> 00:04:04.840
<v Speaker 1>Yeah, like you you're going for speed rather than for

67
00:04:06.039 --> 00:04:06.800
<v Speaker 1>type safety.

68
00:04:07.360 --> 00:04:09.439
<v Speaker 6>I mean, I can I can tell you why some

69
00:04:09.479 --> 00:04:14.439
<v Speaker 6>of us maintainers hate the divescript part, which is for debugging,

70
00:04:15.039 --> 00:04:18.639
<v Speaker 6>which was a long time pain for debugging like currently

71
00:04:18.680 --> 00:04:23.600
<v Speaker 6>installed libraries like they're already like you know, went through

72
00:04:23.639 --> 00:04:27.439
<v Speaker 6>like the build phase and they're electron spiled and it's

73
00:04:27.480 --> 00:04:31.399
<v Speaker 6>it's a mess debugging it. So that was something that

74
00:04:31.519 --> 00:04:34.759
<v Speaker 6>was like, I mean, it's still kind of painful, but

75
00:04:34.800 --> 00:04:37.480
<v Speaker 6>as a maintainer or as a as a dev have

76
00:04:37.560 --> 00:04:41.160
<v Speaker 6>to maintain within the note modules package for older you,

77
00:04:41.319 --> 00:04:44.079
<v Speaker 6>you'd kind of get lost and really want to reap

78
00:04:44.959 --> 00:04:47.000
<v Speaker 6>all your herd out just because of it.

79
00:04:47.160 --> 00:04:48.680
<v Speaker 5>Even though now everything changes.

80
00:04:49.199 --> 00:04:49.879
<v Speaker 4>Yeah, yeah, I.

81
00:04:49.879 --> 00:04:52.439
<v Speaker 1>Think we're on a better trajectory now a real We're

82
00:04:52.480 --> 00:04:55.240
<v Speaker 1>still not on your microphone though, I think I.

83
00:04:55.199 --> 00:04:56.439
<v Speaker 5>Need to lock out and knock back, and.

84
00:04:56.639 --> 00:04:58.680
<v Speaker 6>It's the JavaScript microphone.

85
00:04:59.759 --> 00:05:02.839
<v Speaker 5>See see typescript bug. And I'm gonna log out and

86
00:05:02.839 --> 00:05:03.399
<v Speaker 5>log back in.

87
00:05:03.759 --> 00:05:11.079
<v Speaker 1>No problem, We'll be waiting for you. So yeah, I guess.

88
00:05:11.160 --> 00:05:19.240
<v Speaker 1>I guess that's true in in the sense that whenever

89
00:05:19.319 --> 00:05:22.279
<v Speaker 1>you like, I think we had guilta yao on the

90
00:05:22.319 --> 00:05:25.439
<v Speaker 1>show like a long time ago, speaking about that very

91
00:05:25.519 --> 00:05:30.399
<v Speaker 1>fact about why he actually used to prefer jas doc

92
00:05:31.639 --> 00:05:40.399
<v Speaker 1>over over you know, using typescript because he wanted to

93
00:05:40.439 --> 00:05:45.120
<v Speaker 1>avoid the transpilation on the note side. His argument was

94
00:05:45.160 --> 00:05:48.560
<v Speaker 1>that on the browser side, you're going to have transpilation

95
00:05:48.720 --> 00:05:53.240
<v Speaker 1>anyway because of the bundling, because of JSX, so you

96
00:05:53.319 --> 00:05:55.759
<v Speaker 1>might as well do typescript as well. But on the

97
00:05:55.800 --> 00:05:58.639
<v Speaker 1>note side, where you could have just run the code

98
00:05:58.680 --> 00:06:03.120
<v Speaker 1>as you wrote it, Transpiling never adds value in that sense,

99
00:06:03.240 --> 00:06:04.759
<v Speaker 1>and I totally agree with that.

100
00:06:05.040 --> 00:06:06.560
<v Speaker 3>Well, I don't know if you remember the whole big

101
00:06:06.600 --> 00:06:10.279
<v Speaker 3>stink that's Vell basically did that exact same thing, where

102
00:06:10.319 --> 00:06:13.079
<v Speaker 3>they've had a whole big announcement about we're getting rid

103
00:06:13.120 --> 00:06:16.160
<v Speaker 3>of typescript and what they started doing with jastocks, and

104
00:06:16.199 --> 00:06:17.600
<v Speaker 3>we talked to Rich Harris about them.

105
00:06:18.759 --> 00:06:23.240
<v Speaker 5>I think we can maybe draw the line because jstocks

106
00:06:23.319 --> 00:06:26.959
<v Speaker 5>is still typescript. Okay, there's typescript as a language as

107
00:06:27.000 --> 00:06:30.839
<v Speaker 5>a developer tool, and there's Typescript as the transpiler, and

108
00:06:31.120 --> 00:06:36.399
<v Speaker 5>you can enjoy typescript on your ID even without transpiling,

109
00:06:36.439 --> 00:06:39.519
<v Speaker 5>which is what j stocks does, you're still writing Typescript.

110
00:06:40.079 --> 00:06:43.600
<v Speaker 2>They are fundamentally different languages. JavaScript has a type system.

111
00:06:43.680 --> 00:06:45.759
<v Speaker 2>It has a finite set of types, and there's things

112
00:06:45.759 --> 00:06:48.800
<v Speaker 2>that you can and cannot do with those types. Typescript

113
00:06:48.959 --> 00:06:52.000
<v Speaker 2>as a version five has become much better at dealing

114
00:06:52.040 --> 00:06:55.120
<v Speaker 2>with JavaScript types. But Typescript was designed to deal with

115
00:06:55.199 --> 00:06:57.959
<v Speaker 2>C sharp types and to apply them to a browser,

116
00:06:58.399 --> 00:07:01.399
<v Speaker 2>and so the pattern of code that you get with

117
00:07:01.480 --> 00:07:07.519
<v Speaker 2>Typescript versus JavaScript is radically and wildly different. You cannot

118
00:07:07.800 --> 00:07:11.199
<v Speaker 2>easily write simple programs and typescripts, certainly not with AI,

119
00:07:11.839 --> 00:07:15.079
<v Speaker 2>but you can write simple programs in JavaScript because JavaScript

120
00:07:15.120 --> 00:07:20.439
<v Speaker 2>does not require complex type hierarchies and JavaScript type system

121
00:07:20.600 --> 00:07:21.759
<v Speaker 2>is not turing complete.

122
00:07:22.639 --> 00:07:25.639
<v Speaker 5>But wouldn't you say that large systems have large type

123
00:07:25.680 --> 00:07:29.480
<v Speaker 5>hierarchies and require applications contexts.

124
00:07:29.720 --> 00:07:33.120
<v Speaker 2>Why would they? Why would you need to have large

125
00:07:33.160 --> 00:07:37.120
<v Speaker 2>type hierarchies. That's the design flaw, that's not something inherent

126
00:07:37.199 --> 00:07:38.839
<v Speaker 2>of the system.

127
00:07:39.160 --> 00:07:39.800
<v Speaker 4>I mean, look at GO.

128
00:07:40.720 --> 00:07:45.120
<v Speaker 1>I think the large type hierarchies were an attribute of

129
00:07:45.279 --> 00:07:51.959
<v Speaker 1>Typescript in the early days, where indeed the language was

130
00:07:52.319 --> 00:07:56.519
<v Speaker 1>kind of directing you toward building class hierarchies. All the

131
00:07:56.560 --> 00:07:59.240
<v Speaker 1>examples at least were written that way. But I think

132
00:07:59.639 --> 00:08:02.680
<v Speaker 1>people are not have not been writing Typescript in this

133
00:08:02.759 --> 00:08:06.759
<v Speaker 1>way for a while now. Most of the typescript code

134
00:08:06.800 --> 00:08:11.560
<v Speaker 1>that I'm seeing can be thought of as JavaScript with

135
00:08:11.680 --> 00:08:17.279
<v Speaker 1>static types. People are not building these huge collections of classes,

136
00:08:17.879 --> 00:08:25.600
<v Speaker 1>and then with implementing interfaces and building Typescript that way.

137
00:08:25.959 --> 00:08:28.759
<v Speaker 1>I'm just not seeing it now. It might be because

138
00:08:28.759 --> 00:08:32.840
<v Speaker 1>of React, because React went with hooks rather than with classes,

139
00:08:33.639 --> 00:08:36.960
<v Speaker 1>or it might be that people just discover that they

140
00:08:37.000 --> 00:08:41.080
<v Speaker 1>could use typescript in a more JavaScript sort of way.

141
00:08:41.240 --> 00:08:41.840
<v Speaker 4>I don't know.

142
00:08:41.879 --> 00:08:44.759
<v Speaker 1>Maybe it's a combination of both, but that's the reality

143
00:08:44.799 --> 00:08:45.600
<v Speaker 1>that I'm seeing.

144
00:08:47.000 --> 00:08:49.720
<v Speaker 5>I think there are also two like there are many

145
00:08:49.759 --> 00:08:52.159
<v Speaker 5>ways to use typescript. Yeah, you can take it in

146
00:08:52.240 --> 00:08:57.000
<v Speaker 5>the very c sharp like old schoolp way, but you

147
00:08:57.039 --> 00:09:01.279
<v Speaker 5>can also use typescript as just a tract maker, just

148
00:09:01.759 --> 00:09:05.759
<v Speaker 5>to define a contract that a function expects some contract

149
00:09:05.799 --> 00:09:10.000
<v Speaker 5>as an input and expects to return some other type

150
00:09:10.000 --> 00:09:12.600
<v Speaker 5>as an output, which is like defining contracts. And you

151
00:09:12.600 --> 00:09:15.080
<v Speaker 5>can also use typescripting like in a higher level, which

152
00:09:15.120 --> 00:09:17.720
<v Speaker 5>is to create an applications context. So if I have

153
00:09:17.759 --> 00:09:20.440
<v Speaker 5>a function that accepts a name and an ID and

154
00:09:20.519 --> 00:09:22.720
<v Speaker 5>another function that accepts an object with a name and

155
00:09:22.759 --> 00:09:25.960
<v Speaker 5>an ID, I can say that both functions accept the

156
00:09:26.000 --> 00:09:29.360
<v Speaker 5>type of person. And by doing this, I created a

157
00:09:29.519 --> 00:09:33.759
<v Speaker 5>context between these two functions. And I think that is

158
00:09:34.000 --> 00:09:38.840
<v Speaker 5>kind of what's big about typescript. And do you know,

159
00:09:39.240 --> 00:09:41.840
<v Speaker 5>do you guys know how typescript like, how did it start?

160
00:09:43.200 --> 00:09:44.519
<v Speaker 5>How did that start?

161
00:09:44.559 --> 00:09:47.279
<v Speaker 4>It? I will let you talk about that.

162
00:09:47.399 --> 00:09:49.759
<v Speaker 1>And by the way, there's a documentary about that but

163
00:09:49.840 --> 00:09:52.960
<v Speaker 1>before that, I do have to mention that these days

164
00:09:53.000 --> 00:09:57.279
<v Speaker 1>in Node we do have a building support for type stripping,

165
00:09:57.720 --> 00:10:01.320
<v Speaker 1>which effectively just erases the type out. So that means

166
00:10:01.799 --> 00:10:07.960
<v Speaker 1>that we can now use typescript files without transpilation with Node.

167
00:10:08.080 --> 00:10:11.799
<v Speaker 1>We don't have to use js doc for that purpose anymore.

168
00:10:12.320 --> 00:10:17.240
<v Speaker 5>It's transpiled internally like it is still transpiled. It uses

169
00:10:17.240 --> 00:10:21.039
<v Speaker 5>an SWC plug in like it just transpis it internally

170
00:10:21.240 --> 00:10:23.519
<v Speaker 5>inside notes. The code has.

171
00:10:23.399 --> 00:10:26.240
<v Speaker 1>Transponed obviously because at the end of the day, Node

172
00:10:26.360 --> 00:10:30.480
<v Speaker 1>is using v eight, which is a JavaScript engine.

173
00:10:30.519 --> 00:10:32.320
<v Speaker 4>It's not a typescript engine.

174
00:10:32.320 --> 00:10:36.000
<v Speaker 1>So it needs But it still means first of all,

175
00:10:36.039 --> 00:10:40.440
<v Speaker 1>the transpilation is basically just erasing the types. It replaces

176
00:10:40.519 --> 00:10:47.399
<v Speaker 1>the type declarations with white spaces, and the as I said,

177
00:10:47.399 --> 00:10:50.960
<v Speaker 1>the interesting or the useful aspect of it is that

178
00:10:51.039 --> 00:10:54.080
<v Speaker 1>you can use the same source files. You don't need

179
00:10:54.159 --> 00:10:59.399
<v Speaker 1>to go through a transpilation step before loading the files

180
00:10:59.440 --> 00:11:02.279
<v Speaker 1>into Node. What you used to need something like tis

181
00:11:02.240 --> 00:11:04.600
<v Speaker 1>snowed for in the past. You can just do it

182
00:11:04.639 --> 00:11:07.279
<v Speaker 1>with Node itself now. And obviously you can do the

183
00:11:07.320 --> 00:11:11.120
<v Speaker 1>same things with bun and Dino, So it means that

184
00:11:11.639 --> 00:11:15.639
<v Speaker 1>you don't need that the source maps to be able

185
00:11:15.639 --> 00:11:19.120
<v Speaker 1>to single step to the files anymore. You can just

186
00:11:19.320 --> 00:11:22.639
<v Speaker 1>use those files as is the same way that you

187
00:11:22.679 --> 00:11:25.759
<v Speaker 1>would with let's say, Jase doc. I'm just putting that

188
00:11:25.919 --> 00:11:29.000
<v Speaker 1>up out there. But now going back to your point

189
00:11:29.000 --> 00:11:32.320
<v Speaker 1>about that history of typescript that you were alluding.

190
00:11:31.919 --> 00:11:37.120
<v Speaker 5>To just then, because for the haters, So the reason

191
00:11:37.159 --> 00:11:40.240
<v Speaker 5>why typescript was even a thing, Anders was supposed to

192
00:11:40.399 --> 00:11:44.360
<v Speaker 5>be joining the vis Co team that they were developing

193
00:11:44.440 --> 00:11:48.159
<v Speaker 5>viskode in JavaScript, and the moment he joined the team

194
00:11:48.200 --> 00:11:51.759
<v Speaker 5>and joined the effort, the first thing he suffered from

195
00:11:52.120 --> 00:11:57.960
<v Speaker 5>was it's impossible to really refractor without the context. And

196
00:11:58.000 --> 00:12:01.000
<v Speaker 5>he was like, guys, we haven't much bigger problem here,

197
00:12:01.480 --> 00:12:04.919
<v Speaker 5>and that's kind of how we started off building typescript

198
00:12:05.159 --> 00:12:08.240
<v Speaker 5>in order to help developers develop and out of his

199
00:12:08.360 --> 00:12:14.600
<v Speaker 5>own pain as as a developer. So like these days,

200
00:12:14.240 --> 00:12:17.840
<v Speaker 5>it is a human tendency when when we have something

201
00:12:18.679 --> 00:12:22.159
<v Speaker 5>to be when we have a pain, so to be

202
00:12:22.279 --> 00:12:24.000
<v Speaker 5>focusing on the pain. But there are a lot of

203
00:12:24.039 --> 00:12:28.000
<v Speaker 5>things that we do get a lot of value from typescript,

204
00:12:28.080 --> 00:12:31.559
<v Speaker 5>and there are trends, it's true, but I do think

205
00:12:31.600 --> 00:12:34.799
<v Speaker 5>that there is a reason why this is an industry standard.

206
00:12:35.159 --> 00:12:38.759
<v Speaker 1>I think the bottom line I think is that to

207
00:12:38.799 --> 00:12:41.440
<v Speaker 1>the great to a great extent from again, from what

208
00:12:41.600 --> 00:12:46.559
<v Speaker 1>I'm seeing, but I'm the simple size is relatively large,

209
00:12:47.279 --> 00:12:52.440
<v Speaker 1>is the typescript one. I'm seriously not seeing any significant

210
00:12:53.000 --> 00:12:56.440
<v Speaker 1>new projects being started in JavaScript.

211
00:12:56.799 --> 00:12:57.200
<v Speaker 4>None.

212
00:12:57.320 --> 00:13:00.000
<v Speaker 1>It's not like one or two or here or there,

213
00:13:00.080 --> 00:13:03.799
<v Speaker 1>truly none. Every new project that I'm seeing is starting

214
00:13:04.039 --> 00:13:05.799
<v Speaker 1>being started in typescript.

215
00:13:06.320 --> 00:13:09.639
<v Speaker 6>That's great, even more of a case to talk about

216
00:13:09.679 --> 00:13:11.240
<v Speaker 6>the security aspects of it.

217
00:13:11.720 --> 00:13:14.679
<v Speaker 1>Okay, then do we want to talk to switch talk

218
00:13:14.720 --> 00:13:17.440
<v Speaker 1>about that. By the way, I didn't introduce you to

219
00:13:17.639 --> 00:13:21.200
<v Speaker 1>but because I forgot, but I think you both of

220
00:13:21.240 --> 00:13:24.440
<v Speaker 1>you are coming kind of from the security space, right.

221
00:13:26.080 --> 00:13:28.799
<v Speaker 5>No, no, no, not from the security space.

222
00:13:29.159 --> 00:13:31.879
<v Speaker 1>Okay, then correct then please correct me? What space are

223
00:13:31.919 --> 00:13:34.159
<v Speaker 1>you coming from.

224
00:13:34.200 --> 00:13:38.679
<v Speaker 5>I'm a full sex developer. Typescript is my bread and butter,

225
00:13:39.159 --> 00:13:41.799
<v Speaker 5>so I've been talking about typescript quite a lot and

226
00:13:42.080 --> 00:13:45.600
<v Speaker 5>in the past two years. And it's also very exciting

227
00:13:45.639 --> 00:13:49.240
<v Speaker 5>to see the massive shift that is happening now in

228
00:13:49.320 --> 00:13:54.519
<v Speaker 5>typescript because the performance of Typescript has been a pain

229
00:13:54.600 --> 00:14:00.559
<v Speaker 5>point in many projects for the past two years, and

230
00:14:00.679 --> 00:14:03.639
<v Speaker 5>so it's just a topic that I really like, and

231
00:14:03.799 --> 00:14:06.759
<v Speaker 5>I teach and I give workshops about so that's kind

232
00:14:06.759 --> 00:14:10.559
<v Speaker 5>of why Duran invited me as the TS expert here.

233
00:14:12.120 --> 00:14:14.480
<v Speaker 4>Okay, cool, and now about ju Leian.

234
00:14:16.200 --> 00:14:18.919
<v Speaker 6>I'm a develop product at for Snake, so basically doing

235
00:14:18.919 --> 00:14:22.639
<v Speaker 6>a lot of education and security research in the node

236
00:14:22.799 --> 00:14:27.679
<v Speaker 6>and the travelscript space, I guess now effectively maybe officially

237
00:14:28.080 --> 00:14:31.159
<v Speaker 6>in the typescript space as well. But the Areela helped

238
00:14:31.159 --> 00:14:33.320
<v Speaker 6>me kind of like I think, sharpened some of these

239
00:14:33.360 --> 00:14:38.360
<v Speaker 6>ideas and really try to frame them for tiptream developerss.

240
00:14:38.720 --> 00:14:40.919
<v Speaker 6>I'm not, naturally, like I said, a type ship dev

241
00:14:41.519 --> 00:14:43.840
<v Speaker 6>obviously going to adopt this more and more with the

242
00:14:43.879 --> 00:14:48.559
<v Speaker 6>tooling and everything else. But it's it's been fun looking

243
00:14:48.600 --> 00:14:51.159
<v Speaker 6>at it coming from I think fresh eyes to look

244
00:14:51.200 --> 00:14:53.879
<v Speaker 6>at these problems. And I've had some which we'll talk

245
00:14:53.919 --> 00:14:57.320
<v Speaker 6>about here, I think, but I've had like my journey

246
00:14:57.360 --> 00:15:00.240
<v Speaker 6>into this really started with sharing something on social well,

247
00:15:00.279 --> 00:15:02.759
<v Speaker 6>and then like it got blown up as like a

248
00:15:02.799 --> 00:15:05.200
<v Speaker 6>really long tread with like what's they dodge from express

249
00:15:05.240 --> 00:15:08.440
<v Speaker 6>and stuff like that, and people lurking and asking questions afterwards,

250
00:15:08.679 --> 00:15:12.240
<v Speaker 6>and it became clear, like very evidently clear. Also by

251
00:15:12.960 --> 00:15:16.360
<v Speaker 6>doing a bunch of like social media polls that devs

252
00:15:16.480 --> 00:15:19.639
<v Speaker 6>view typescript in a very specific way, yet use it

253
00:15:19.840 --> 00:15:24.120
<v Speaker 6>in different ways. And the whole security part is it's

254
00:15:24.200 --> 00:15:26.879
<v Speaker 6>kind of meshed in between, but not in a really

255
00:15:26.919 --> 00:15:30.000
<v Speaker 6>good way. And that's kind of like I think the

256
00:15:30.039 --> 00:15:32.200
<v Speaker 6>premise for a lot of this discussion here.

257
00:15:32.639 --> 00:15:34.159
<v Speaker 4>So can you elaborate please.

258
00:15:35.080 --> 00:15:39.799
<v Speaker 6>Yeah, So it's basically started. I obviously share like a

259
00:15:39.840 --> 00:15:42.879
<v Speaker 6>lot of security related stuff and most of them is

260
00:15:42.960 --> 00:15:45.480
<v Speaker 6>like snippets and kind of like say, hey, this is

261
00:15:45.519 --> 00:15:47.799
<v Speaker 6>like there's a security issue here, can you spot it?

262
00:15:47.840 --> 00:15:50.759
<v Speaker 6>And stuff like that. And while we're on a medium

263
00:15:50.799 --> 00:15:54.240
<v Speaker 6>that's like not really easy to share a code snippet,

264
00:15:54.279 --> 00:15:57.320
<v Speaker 6>I can very clearly explain it. You don't have to guess,

265
00:15:57.320 --> 00:16:01.039
<v Speaker 6>so we can fucture it together. But it basically a

266
00:16:01.080 --> 00:16:05.759
<v Speaker 6>function for a template engine on a node not not

267
00:16:05.840 --> 00:16:07.759
<v Speaker 6>in Typescript at that time. This is like ten years

268
00:16:07.759 --> 00:16:12.600
<v Speaker 6>old or so. But it's basically something that escape htmls

269
00:16:13.080 --> 00:16:17.360
<v Speaker 6>HTML characters. And the function has this type guard where

270
00:16:17.360 --> 00:16:20.600
<v Speaker 6>it starts with like if type of you know some

271
00:16:20.720 --> 00:16:24.159
<v Speaker 6>string that I'm getting equals a string, then do something

272
00:16:24.399 --> 00:16:27.879
<v Speaker 6>and replace the characters, like basically turning them into HTML entities.

273
00:16:28.240 --> 00:16:31.120
<v Speaker 6>So it's effectively doing a sort of output encoding like

274
00:16:31.519 --> 00:16:36.879
<v Speaker 6>your favorite you know, react a framework would do. And

275
00:16:36.919 --> 00:16:40.679
<v Speaker 6>then there's like there's no else but but outside of

276
00:16:40.720 --> 00:16:43.759
<v Speaker 6>the conditional. So if if it's not a string, it

277
00:16:43.960 --> 00:16:46.279
<v Speaker 6>just exits it, and it's like, you know, returns the

278
00:16:46.279 --> 00:16:50.879
<v Speaker 6>string itself without sanitizing it or escaping it properly. And

279
00:16:50.960 --> 00:16:53.399
<v Speaker 6>so that's the that's the that's the that's the quiz. Basically,

280
00:16:53.440 --> 00:16:56.120
<v Speaker 6>that's the challenge. So I was posting that picture and

281
00:16:56.399 --> 00:17:00.679
<v Speaker 6>someone replied like typescript would have got this, and I

282
00:17:00.720 --> 00:17:04.480
<v Speaker 6>was like immediately like I don't think so, like why

283
00:17:04.480 --> 00:17:07.279
<v Speaker 6>would it have got this? And you know our social

284
00:17:07.319 --> 00:17:09.480
<v Speaker 6>media and internet goes or like yes it would, and

285
00:17:09.519 --> 00:17:12.160
<v Speaker 6>I was like, no, it wouldn't. And it became like

286
00:17:12.200 --> 00:17:14.880
<v Speaker 6>a long tread on blue sky, and you know, Wesley

287
00:17:14.880 --> 00:17:17.880
<v Speaker 6>thought was started. We discussed that, and I think that's

288
00:17:17.920 --> 00:17:19.480
<v Speaker 6>kind of like the promise, Like that's how it got me,

289
00:17:19.559 --> 00:17:21.759
<v Speaker 6>like why would it? And I was like actually testing,

290
00:17:21.839 --> 00:17:24.400
<v Speaker 6>like let's let's say, let's let's get a nice vulnerable

291
00:17:24.400 --> 00:17:26.799
<v Speaker 6>project up and running, run divecrip on it and see

292
00:17:26.839 --> 00:17:27.680
<v Speaker 6>if it works.

293
00:17:28.200 --> 00:17:29.920
<v Speaker 4>And the real.

294
00:17:29.799 --> 00:17:32.440
<v Speaker 6>Premise for like what's going on under is, which I

295
00:17:32.480 --> 00:17:36.519
<v Speaker 6>think it's it's an interesting think talking through the security

296
00:17:36.720 --> 00:17:40.559
<v Speaker 6>kind of like landscape or surface of developers using divescripts

297
00:17:40.720 --> 00:17:43.720
<v Speaker 6>and the actual real world vulnerabilities that come from it.

298
00:17:44.119 --> 00:17:47.319
<v Speaker 6>Also ZOD related to it as as a building block

299
00:17:48.000 --> 00:17:52.000
<v Speaker 6>is interesting. But my I think, I think what kind

300
00:17:52.000 --> 00:17:54.559
<v Speaker 6>of like hits it on the nail. And that's something

301
00:17:54.559 --> 00:17:58.759
<v Speaker 6>that's been very i think, very resonating with both me

302
00:17:58.839 --> 00:18:03.799
<v Speaker 6>and Wesley, was that if it seems that developers kind

303
00:18:03.799 --> 00:18:07.960
<v Speaker 6>of like you know, feel about typescript and put misplaced

304
00:18:08.000 --> 00:18:10.880
<v Speaker 6>trust on typescript in the same way that they put

305
00:18:10.960 --> 00:18:14.839
<v Speaker 6>misplaced trust on code coverage, meaning they think of it

306
00:18:14.880 --> 00:18:17.480
<v Speaker 6>more than it should they should, and they think of

307
00:18:17.519 --> 00:18:21.039
<v Speaker 6>it as a security tool. And I think that by

308
00:18:21.079 --> 00:18:25.480
<v Speaker 6>itself is while touchscript is, you know, like any strongly

309
00:18:25.519 --> 00:18:29.559
<v Speaker 6>type language is helpful, it's not a security tool by itself,

310
00:18:29.599 --> 00:18:32.359
<v Speaker 6>and that creates a fallicy and that is something that

311
00:18:32.400 --> 00:18:35.200
<v Speaker 6>I would like to to change and maybe should do

312
00:18:35.319 --> 00:18:38.240
<v Speaker 6>this conversation on this, you know, on this session, I

313
00:18:38.279 --> 00:18:41.119
<v Speaker 6>can give you several examples of why that happens and

314
00:18:41.599 --> 00:18:43.279
<v Speaker 6>how that fails developers.

315
00:18:43.480 --> 00:18:46.920
<v Speaker 1>The fact that you said that people put trust in

316
00:18:47.160 --> 00:18:50.319
<v Speaker 1>code coverage in the context of security reminds me of

317
00:18:50.359 --> 00:18:55.559
<v Speaker 1>that old joke about QA and engineer working for a

318
00:18:55.640 --> 00:19:01.119
<v Speaker 1>bar and ordering one beer, ordering zero beers, ordering million beers,

319
00:19:01.359 --> 00:19:07.599
<v Speaker 1>ordering a hammer, ordering a ray, ordering yeah. And then

320
00:19:08.039 --> 00:19:11.000
<v Speaker 1>and then the first customer walking in asking where the

321
00:19:11.039 --> 00:19:14.799
<v Speaker 1>toilet is, the bar blows up and kills everybody inside.

322
00:19:16.039 --> 00:19:17.599
<v Speaker 4>And the one yeah.

323
00:19:17.680 --> 00:19:21.079
<v Speaker 1>So so that that grows to show like.

324
00:19:22.160 --> 00:19:24.559
<v Speaker 4>The value of unit testing.

325
00:19:24.640 --> 00:19:28.960
<v Speaker 1>Let's say, in the context of app of application security.

326
00:19:29.559 --> 00:19:32.000
<v Speaker 1>I mean, I guess it's it's better than nothing, but

327
00:19:32.000 --> 00:19:32.960
<v Speaker 1>but not by much.

328
00:19:35.559 --> 00:19:39.720
<v Speaker 5>There are a lot of controversial posts about I wouldn't

329
00:19:39.759 --> 00:19:43.119
<v Speaker 5>mention the name, but how teams replaced a lot of

330
00:19:43.200 --> 00:19:45.400
<v Speaker 5>unit tests because they have typescript.

331
00:19:45.440 --> 00:19:46.640
<v Speaker 4>Now, m.

332
00:19:48.440 --> 00:19:49.880
<v Speaker 5>On that.

333
00:19:50.319 --> 00:19:52.759
<v Speaker 4>If the unit test is there, why replace it?

334
00:19:53.480 --> 00:19:58.200
<v Speaker 6>I mean time, I'll give you no better. Let me

335
00:19:58.279 --> 00:20:02.640
<v Speaker 6>like you build another one on our else. Take. Now

336
00:20:03.000 --> 00:20:05.279
<v Speaker 6>we said like if you have a typescript, then you

337
00:20:05.279 --> 00:20:09.680
<v Speaker 6>maybe don't need tests. Well how about this. I have

338
00:20:09.759 --> 00:20:13.200
<v Speaker 6>a take where someone said we don't need zoo if

339
00:20:13.240 --> 00:20:17.359
<v Speaker 6>we have typescript and stuff like that. That's that's you

340
00:20:17.400 --> 00:20:20.799
<v Speaker 6>know that, that is where this is happening. And this

341
00:20:21.039 --> 00:20:24.079
<v Speaker 6>isn't like a random person, you know, getting pulled out

342
00:20:24.079 --> 00:20:28.440
<v Speaker 6>of like ten thousand. There's a lot of confusion. Let me,

343
00:20:28.559 --> 00:20:31.960
<v Speaker 6>let me pull up something. Wait, let me So I've

344
00:20:32.079 --> 00:20:34.799
<v Speaker 6>pulled and I was was asking, when do you work

345
00:20:34.839 --> 00:20:38.160
<v Speaker 6>on typescript code base? What is your level of ecosystem depth?

346
00:20:38.559 --> 00:20:42.000
<v Speaker 6>And I gave three options. One is just typescript and TSC.

347
00:20:42.200 --> 00:20:43.960
<v Speaker 6>The way that, for example, maybe I would use it

348
00:20:44.000 --> 00:20:47.480
<v Speaker 6>as like a beginner you mean for type checking the man, yes,

349
00:20:47.720 --> 00:20:49.680
<v Speaker 6>just type checking. You just you know me as a

350
00:20:49.680 --> 00:20:52.839
<v Speaker 6>bit like I said, I'm beginner developer with typescript easy

351
00:20:52.920 --> 00:20:55.839
<v Speaker 6>you know, you know, adapter for it. And the way

352
00:20:55.839 --> 00:20:58.119
<v Speaker 6>that I would just like, you know, type my of course,

353
00:20:58.200 --> 00:21:01.160
<v Speaker 6>have like a typing system type my data parameters and

354
00:21:01.240 --> 00:21:04.759
<v Speaker 6>run a typescript checker compiler for it. So this is

355
00:21:04.759 --> 00:21:08.839
<v Speaker 6>option one, and like fifty four percent of developers chose

356
00:21:08.880 --> 00:21:12.400
<v Speaker 6>that one. The other two options was typescript and type

357
00:21:12.480 --> 00:21:16.079
<v Speaker 6>narrowing also known as type cards, And the third option

358
00:21:16.240 --> 00:21:20.720
<v Speaker 6>was typescript and narrowing and ZOD. And obviously, I think,

359
00:21:20.799 --> 00:21:23.960
<v Speaker 6>like among the other experts here on typescripts like maybe

360
00:21:24.160 --> 00:21:27.519
<v Speaker 6>more that you could pull into the ecosystem. But I've

361
00:21:27.519 --> 00:21:30.440
<v Speaker 6>read this pollic quite a few times and it's always

362
00:21:30.440 --> 00:21:32.640
<v Speaker 6>the same answer, like at least half of the people,

363
00:21:32.680 --> 00:21:36.519
<v Speaker 6>if not more, really just us typescript as the compiler

364
00:21:36.599 --> 00:21:38.079
<v Speaker 6>and the checker, nothing beyond it.

365
00:21:38.640 --> 00:21:41.480
<v Speaker 1>Look putting ZOD for a site for a minute, and

366
00:21:42.400 --> 00:21:45.039
<v Speaker 1>I think that would actually be the crux of our discussion.

367
00:21:45.160 --> 00:21:49.559
<v Speaker 1>But before we dive there, type narrowing to me is

368
00:21:50.359 --> 00:21:53.920
<v Speaker 1>part and parcel of typescript. I don't see the exact

369
00:21:54.000 --> 00:21:56.720
<v Speaker 1>difference between number one and option number one and option

370
00:21:56.799 --> 00:22:00.319
<v Speaker 1>number two, like you said, just typescript versus types of

371
00:22:00.480 --> 00:22:04.319
<v Speaker 1>the type narrowing. How is type narrowing not just part

372
00:22:04.319 --> 00:22:04.960
<v Speaker 1>of typescript?

373
00:22:05.079 --> 00:22:08.759
<v Speaker 5>It means if you do runtime checks about the times, Yeah.

374
00:22:08.599 --> 00:22:11.799
<v Speaker 1>I understand, I understand what oh you mean, like specifically

375
00:22:11.880 --> 00:22:17.160
<v Speaker 1>doing lots of tests using type of exactly constructor equals

376
00:22:17.200 --> 00:22:21.640
<v Speaker 1>and stuff like that exactly and which.

377
00:22:20.160 --> 00:22:22.839
<v Speaker 6>Is not dipescript, you will even if you just do

378
00:22:22.920 --> 00:22:25.160
<v Speaker 6>pure JavaScript. But I think that's you see, But that's

379
00:22:25.279 --> 00:22:28.920
<v Speaker 6>that's the exact fallacy. Like developers don't they think they

380
00:22:28.960 --> 00:22:31.920
<v Speaker 6>don't need to do this runtime security of type of

381
00:22:32.480 --> 00:22:34.920
<v Speaker 6>even before we go to that, like you said, because

382
00:22:34.920 --> 00:22:37.440
<v Speaker 6>they use a type system, because the compiler is fine.

383
00:22:37.559 --> 00:22:40.839
<v Speaker 6>And someone gave me a screenshot where they show me that, uh,

384
00:22:41.160 --> 00:22:44.160
<v Speaker 6>the request imagine like let's talk let's talk back end

385
00:22:44.200 --> 00:22:46.319
<v Speaker 6>and servers and express and typescript, okay, because that's like

386
00:22:46.359 --> 00:22:49.880
<v Speaker 6>the easiest uh you know attack surface here. So if

387
00:22:49.880 --> 00:22:52.079
<v Speaker 6>you use that, you have a type request, right, and

388
00:22:52.160 --> 00:22:55.480
<v Speaker 6>the request may get like requests or filter strings and

389
00:22:55.480 --> 00:22:57.799
<v Speaker 6>stuff like that, like maybe a filter and maybe that

390
00:22:58.279 --> 00:23:00.039
<v Speaker 6>is typed as a string or something like that, and

391
00:23:00.079 --> 00:23:02.920
<v Speaker 6>then all the types that kind of like you know

392
00:23:03.240 --> 00:23:05.400
<v Speaker 6>that string is is flowing through the code flow to

393
00:23:05.440 --> 00:23:08.000
<v Speaker 6>the code path in different functions. And they show me

394
00:23:08.119 --> 00:23:10.200
<v Speaker 6>and they say, hey, you know what, I can't even

395
00:23:10.319 --> 00:23:14.039
<v Speaker 6>write a vulnerable function because it only accepts types and

396
00:23:14.079 --> 00:23:16.799
<v Speaker 6>typescript safety because of the compiler, and I would find

397
00:23:16.839 --> 00:23:19.319
<v Speaker 6>it on CI and I was like, no, it's won't

398
00:23:19.440 --> 00:23:22.799
<v Speaker 6>because like runtime is not dev time. You can't make

399
00:23:22.839 --> 00:23:23.519
<v Speaker 6>that assumption.

400
00:23:24.359 --> 00:23:26.640
<v Speaker 4>Even dev time is not dev time.

401
00:23:26.680 --> 00:23:29.839
<v Speaker 1>And I'll touch on that in a second, but yeah,

402
00:23:29.920 --> 00:23:32.599
<v Speaker 1>I think that's the key point that we need to

403
00:23:32.640 --> 00:23:37.400
<v Speaker 1>explicitly make. In case it's unclear to anybody who's actually

404
00:23:37.440 --> 00:23:42.200
<v Speaker 1>listening to the podcast, pypescript type checking is done only

405
00:23:42.640 --> 00:23:47.759
<v Speaker 1>at build time. It is it has zero impact on

406
00:23:48.160 --> 00:23:53.359
<v Speaker 1>runtime Pipescript does not do any type checking at runtime.

407
00:23:53.559 --> 00:23:58.119
<v Speaker 1>And that's an intentional feature of Typescript. It's not a bug,

408
00:23:58.480 --> 00:24:02.359
<v Speaker 1>it's a feature. That's how Typescript is built intentionally. So

409
00:24:02.680 --> 00:24:05.640
<v Speaker 1>anybody disagrees with this statement.

410
00:24:06.400 --> 00:24:09.240
<v Speaker 5>I like it. When I give talks about Typescript, I

411
00:24:09.319 --> 00:24:12.279
<v Speaker 5>like to talk about the development space, and I call

412
00:24:12.319 --> 00:24:16.920
<v Speaker 5>it the development matrix because in run time, which is

413
00:24:17.119 --> 00:24:22.079
<v Speaker 5>the real world, like, the types don't exist. And it's

414
00:24:22.160 --> 00:24:24.599
<v Speaker 5>kind of because a lot of us are really as

415
00:24:24.640 --> 00:24:27.960
<v Speaker 5>we said, it's standard, and projects start off with Typescript,

416
00:24:28.000 --> 00:24:32.400
<v Speaker 5>and people that are beginner developers they see that you

417
00:24:32.519 --> 00:24:35.480
<v Speaker 5>can define what shape of an argument it's going to be.

418
00:24:36.680 --> 00:24:40.519
<v Speaker 5>It is quite confusing at the beginning to make the

419
00:24:40.559 --> 00:24:43.759
<v Speaker 5>difference that the code that you see as the developer

420
00:24:44.119 --> 00:24:47.599
<v Speaker 5>is not the code that would run. And that confusion,

421
00:24:47.640 --> 00:24:50.720
<v Speaker 5>that matrix is really the root of all of it.

422
00:24:50.759 --> 00:24:53.440
<v Speaker 5>And we can even take it to many other spaces

423
00:24:53.440 --> 00:24:56.240
<v Speaker 5>in development these days, when things are layers over layers

424
00:24:56.400 --> 00:24:59.759
<v Speaker 5>over layers, develop beginner developers see the upper layers and

425
00:25:00.119 --> 00:25:05.559
<v Speaker 5>not everything that composes underneath. So I think this podcast

426
00:25:05.599 --> 00:25:10.319
<v Speaker 5>is finally important for any beginner developer listening that might

427
00:25:10.359 --> 00:25:11.480
<v Speaker 5>be confused about it.

428
00:25:13.079 --> 00:25:20.000
<v Speaker 6>I think experience developers who are like fifty typescript poll, well.

429
00:25:20.400 --> 00:25:24.559
<v Speaker 1>You know, whenever we whenever anybody speaks about experience or

430
00:25:25.319 --> 00:25:29.000
<v Speaker 1>senior developers versus junior developers, I'm reminded of the fact

431
00:25:29.039 --> 00:25:34.240
<v Speaker 1>that every like poll about JavaScript shows that the Java

432
00:25:34.319 --> 00:25:38.319
<v Speaker 1>the median experience the JavaScript developer has is something.

433
00:25:38.079 --> 00:25:39.119
<v Speaker 4>Like three years.

434
00:25:39.359 --> 00:25:42.559
<v Speaker 1>So half the developers have less than three years experience.

435
00:25:42.759 --> 00:25:46.599
<v Speaker 1>So half the developers would be considered junior, I guess,

436
00:25:47.039 --> 00:25:50.519
<v Speaker 1>but at least half. But going back to the key

437
00:25:50.559 --> 00:25:55.160
<v Speaker 1>point is we were talking about how Node now supports typescript.

438
00:25:55.200 --> 00:25:59.920
<v Speaker 1>It supports Typescript by type stripping, So I think that's

439
00:26:00.000 --> 00:26:03.079
<v Speaker 1>the best way to think about it. The run time

440
00:26:03.279 --> 00:26:08.160
<v Speaker 1>of typescript is just all the types gone. That's the

441
00:26:08.279 --> 00:26:12.240
<v Speaker 1>run time of typescript. It's that's the JavaScript that comes out,

442
00:26:14.640 --> 00:26:19.119
<v Speaker 1>and that's key to understanding this aspect. But going back

443
00:26:19.160 --> 00:26:22.440
<v Speaker 1>to what you said about the developed the safety at

444
00:26:22.440 --> 00:26:26.200
<v Speaker 1>the time of development, if that's a bit of a fallacy,

445
00:26:26.599 --> 00:26:29.119
<v Speaker 1>or let's put it differently, it's a fallacy if you

446
00:26:29.200 --> 00:26:33.880
<v Speaker 1>have any any in the code, because once you've got

447
00:26:34.480 --> 00:26:37.880
<v Speaker 1>even a single any in the code, anything that goes

448
00:26:37.960 --> 00:26:41.319
<v Speaker 1>through that comes out of the other side without that

449
00:26:41.640 --> 00:26:45.079
<v Speaker 1>type context, and then it might have been a string

450
00:26:45.160 --> 00:26:47.400
<v Speaker 1>coming in, but it can be a number coming out

451
00:26:48.559 --> 00:26:53.160
<v Speaker 1>and that kind of propagates throughout the code like a

452
00:26:53.200 --> 00:26:57.039
<v Speaker 1>single any can have a wide ranging impact across your

453
00:26:57.079 --> 00:26:59.319
<v Speaker 1>code based depending on where it is in the code.

454
00:27:00.200 --> 00:27:02.279
<v Speaker 6>Taught because I was doing the exact same thing in

455
00:27:02.319 --> 00:27:04.240
<v Speaker 6>my in my slides for I have like an upcoming

456
00:27:04.319 --> 00:27:06.839
<v Speaker 6>talk on this. So I was doing the same thing

457
00:27:06.880 --> 00:27:08.400
<v Speaker 6>and I was like, oh, rel, I need your help

458
00:27:08.440 --> 00:27:12.640
<v Speaker 6>reviewing this our dipecript expert, and she was like, Okay,

459
00:27:12.640 --> 00:27:14.400
<v Speaker 6>you're using any here. You know, like a lot of

460
00:27:14.440 --> 00:27:18.240
<v Speaker 6>beginners and sorry, a lot of experienced users of typescript developers.

461
00:27:18.440 --> 00:27:21.000
<v Speaker 6>We'll see it and we'll tell you it's it's it's

462
00:27:21.039 --> 00:27:22.400
<v Speaker 6>like a basic problem.

463
00:27:22.400 --> 00:27:23.359
<v Speaker 5>It's a bad practice.

464
00:27:23.440 --> 00:27:25.920
<v Speaker 6>Yeah, like don't do it. And I was like, okay, fine,

465
00:27:25.960 --> 00:27:28.279
<v Speaker 6>let's not do it. Let's I'll put I'll put string

466
00:27:28.759 --> 00:27:31.440
<v Speaker 6>and I'll use the I've used requests, you know, request

467
00:27:31.440 --> 00:27:35.920
<v Speaker 6>body or request quarry. That's that filter as string too,

468
00:27:36.559 --> 00:27:39.200
<v Speaker 6>But that fails too, Like that will not save you either.

469
00:27:39.680 --> 00:27:40.799
<v Speaker 6>Whatever you type it.

470
00:27:41.079 --> 00:27:45.759
<v Speaker 1>That's when you say, as you're basically telling typescript. Trust me,

471
00:27:46.960 --> 00:27:49.400
<v Speaker 1>you don't, you can't figure out what the type is.

472
00:27:50.000 --> 00:27:53.119
<v Speaker 1>Then consequently I have to tell you, and I'm telling

473
00:27:53.119 --> 00:27:55.519
<v Speaker 1>you that it's this, and you've got to trust me

474
00:27:55.559 --> 00:27:58.119
<v Speaker 1>on that, and maybe you're right and maybe you're wrong.

475
00:27:59.640 --> 00:28:03.359
<v Speaker 1>But but it's kind of like sort of a it's

476
00:28:03.640 --> 00:28:07.200
<v Speaker 1>it's time. It's typecasting, and typecasting is unsafe in every

477
00:28:07.279 --> 00:28:11.400
<v Speaker 1>language that supports it, but not just not just typescript.

478
00:28:12.000 --> 00:28:16.599
<v Speaker 5>And it's also inevitable, like because the alternative would mean

479
00:28:16.960 --> 00:28:20.240
<v Speaker 5>that you don't have a way to when it is

480
00:28:20.359 --> 00:28:23.079
<v Speaker 5>necessary to detail typescript. What is it?

481
00:28:23.759 --> 00:28:24.480
<v Speaker 4>Yeah, for sure.

482
00:28:24.559 --> 00:28:27.880
<v Speaker 1>I recently I'm working on we were talking about existing

483
00:28:27.920 --> 00:28:31.000
<v Speaker 1>code bases that are in JavaScript. I'm one of the

484
00:28:31.039 --> 00:28:34.440
<v Speaker 1>projects that we have at work is a fairly large

485
00:28:34.559 --> 00:28:38.920
<v Speaker 1>legacy JavaScript code base, but it's still under development. So

486
00:28:39.039 --> 00:28:41.559
<v Speaker 1>there's value in migrating it to typescript, but it's going

487
00:28:41.599 --> 00:28:45.240
<v Speaker 1>to take a long time. I was looking at a

488
00:28:45.279 --> 00:28:47.519
<v Speaker 1>piece of code and I was kind of forced to

489
00:28:47.519 --> 00:28:49.359
<v Speaker 1>do as are known as X.

490
00:28:50.000 --> 00:28:50.400
<v Speaker 4>So I have a.

491
00:28:50.440 --> 00:28:52.680
<v Speaker 6>Question, is that is that a bad thing? Like should

492
00:28:52.720 --> 00:28:55.039
<v Speaker 6>I not use as string for example?

493
00:28:56.119 --> 00:28:58.240
<v Speaker 4>Well, so here's the story.

494
00:28:58.519 --> 00:29:01.400
<v Speaker 1>So I was I was want to do something, and

495
00:29:01.519 --> 00:29:03.680
<v Speaker 1>the only way I could get the code to compile

496
00:29:04.119 --> 00:29:07.759
<v Speaker 1>was doing something like as a known asterisk, which annoyed

497
00:29:07.799 --> 00:29:11.000
<v Speaker 1>the heck out of me because why do I have

498
00:29:11.200 --> 00:29:13.480
<v Speaker 1>Because when I do something as unknown.

499
00:29:13.160 --> 00:29:14.799
<v Speaker 4>It feels like I feel like dirty.

500
00:29:15.319 --> 00:29:18.359
<v Speaker 1>So I reached out to the number one typescript expert

501
00:29:18.440 --> 00:29:20.160
<v Speaker 1>that I know, which is Matt Pocock.

502
00:29:20.519 --> 00:29:21.640
<v Speaker 4>I assume you've heard.

503
00:29:21.440 --> 00:29:25.079
<v Speaker 1>Of him, and I told him I'm doing this disgusting

504
00:29:25.160 --> 00:29:27.440
<v Speaker 1>thing in this code snippet over here. Do you have

505
00:29:27.480 --> 00:29:31.960
<v Speaker 1>a suggestion for you know, something nicer than I could do?

506
00:29:32.200 --> 00:29:35.160
<v Speaker 1>And he said, if that, what, if that, what's work?

507
00:29:35.680 --> 00:29:40.920
<v Speaker 1>Just go with it? Because because he said, don't don't

508
00:29:40.960 --> 00:29:44.440
<v Speaker 1>overthink it. If it's localized, if it's small, if it

509
00:29:44.480 --> 00:29:47.359
<v Speaker 1>gets you, if it gets a job done, just go

510
00:29:47.480 --> 00:29:51.079
<v Speaker 1>with it. So so, yeah, sometimes you know it exists

511
00:29:51.119 --> 00:29:55.119
<v Speaker 1>for a reason. The language supports this idiom because it's needed.

512
00:29:55.640 --> 00:29:59.640
<v Speaker 5>There are no way bad practices, there's only a context.

513
00:29:59.240 --> 00:30:01.960
<v Speaker 6>For sure, well kidding.

514
00:30:02.319 --> 00:30:05.240
<v Speaker 2>The typescript checker does get better, Like version four was

515
00:30:05.400 --> 00:30:10.160
<v Speaker 2>very very bad at understanding JavaScript types. Version five is

516
00:30:11.039 --> 00:30:14.799
<v Speaker 2>incredibly improved and understanding those And I think that as

517
00:30:14.799 --> 00:30:18.000
<v Speaker 2>it goes forward, I would hope that there will be

518
00:30:18.039 --> 00:30:21.079
<v Speaker 2>a point when the idea of typescript would just be

519
00:30:21.200 --> 00:30:24.079
<v Speaker 2>redundant because if the Typescript checker gets better and better

520
00:30:24.079 --> 00:30:28.519
<v Speaker 2>and better at doing JavaScript, then you wouldn't need something

521
00:30:28.599 --> 00:30:31.680
<v Speaker 2>like any because it would just be able to introspect

522
00:30:31.720 --> 00:30:34.000
<v Speaker 2>and look at the code. See what she returned.

523
00:30:34.480 --> 00:30:35.079
<v Speaker 4>See.

524
00:30:35.359 --> 00:30:37.559
<v Speaker 2>You know, there are some idioms you have to follow,

525
00:30:37.640 --> 00:30:40.519
<v Speaker 2>Like you can't just willy nilly add a property on something.

526
00:30:40.559 --> 00:30:43.000
<v Speaker 2>You need to use object out a sign if you

527
00:30:43.039 --> 00:30:45.079
<v Speaker 2>want to add a new property that didn't exist before.

528
00:30:45.359 --> 00:30:47.200
<v Speaker 2>But if you use object out a sign, for example,

529
00:30:47.200 --> 00:30:48.839
<v Speaker 2>whatever comes out on the other end of that. If

530
00:30:48.839 --> 00:30:52.839
<v Speaker 2>you add something with name, age, and birthday on one

531
00:30:52.920 --> 00:30:56.680
<v Speaker 2>side and you do object out of sign social security number,

532
00:30:57.000 --> 00:30:59.640
<v Speaker 2>the object you get out on the other side now

533
00:30:59.920 --> 00:31:02.799
<v Speaker 2>is correct and it will have all four properties on it.

534
00:31:02.839 --> 00:31:05.359
<v Speaker 2>So there's a lot of stuff that that as as

535
00:31:05.440 --> 00:31:09.559
<v Speaker 2>time goes on. I think that the reason ay exists

536
00:31:09.759 --> 00:31:13.279
<v Speaker 2>is I believe just because Typescript started out not to

537
00:31:13.359 --> 00:31:16.480
<v Speaker 2>be a JavaScript type checker, but to be a new language.

538
00:31:16.720 --> 00:31:20.759
<v Speaker 2>And and as that gets closer and closer to how

539
00:31:20.880 --> 00:31:24.880
<v Speaker 2>JavaScript works, yes, you'll still need to do annotations, and

540
00:31:25.880 --> 00:31:27.799
<v Speaker 2>you know to some degree, but I think it it

541
00:31:27.839 --> 00:31:30.160
<v Speaker 2>could get. It could get as good as zig Let's

542
00:31:30.160 --> 00:31:30.480
<v Speaker 2>say that.

543
00:31:31.119 --> 00:31:36.279
<v Speaker 1>Yeah, but here here, here's the thing, though, I agree

544
00:31:36.519 --> 00:31:40.799
<v Speaker 1>in the sense that the basically what I understand that

545
00:31:40.839 --> 00:31:46.799
<v Speaker 1>you mean by Typescript understanding JavaScript types is that the

546
00:31:46.839 --> 00:31:51.279
<v Speaker 1>static analysis mechanism has become much better. It can track

547
00:31:51.880 --> 00:31:58.759
<v Speaker 1>the type. You know, JavaScript has very dynamic and malleable types.

548
00:31:59.200 --> 00:32:03.079
<v Speaker 1>It can track these things and figure out what's going

549
00:32:03.119 --> 00:32:09.039
<v Speaker 1>on and basically assign the accurate type at build time

550
00:32:09.480 --> 00:32:11.759
<v Speaker 1>based on what it figures out that the run time

551
00:32:11.799 --> 00:32:14.599
<v Speaker 1>will be. But there's a limit to how much you

552
00:32:14.640 --> 00:32:17.880
<v Speaker 1>can figure out with static analysis. It's not my area

553
00:32:17.920 --> 00:32:23.640
<v Speaker 1>of expertise. I'm not a compiler or type system expert.

554
00:32:24.039 --> 00:32:27.559
<v Speaker 1>I think what the people at working on typescript have

555
00:32:27.640 --> 00:32:32.839
<v Speaker 1>achieved is pretty remarkable, a lot more so than people

556
00:32:32.839 --> 00:32:35.640
<v Speaker 1>give them credit for. It's much more sophisticated than the

557
00:32:35.759 --> 00:32:39.559
<v Speaker 1>type analysis that's built into a lot of typed programming

558
00:32:39.680 --> 00:32:43.240
<v Speaker 1>languages statically type programming languages. But there's still a limit,

559
00:32:43.759 --> 00:32:47.759
<v Speaker 1>especially given that JavaScript itself is like the poster child

560
00:32:48.319 --> 00:32:53.039
<v Speaker 1>for dynamic types. It's like everything in JavaScript is as

561
00:32:53.119 --> 00:32:57.319
<v Speaker 1>dynamic as it can be. So what Typescript does I

562
00:32:57.519 --> 00:33:00.480
<v Speaker 1>like to The analogy that I like to use is

563
00:33:00.480 --> 00:33:03.799
<v Speaker 1>that it's like hurting cats, and there's a limit to

564
00:33:03.920 --> 00:33:09.200
<v Speaker 1>how much the cats will respond to your your instructions.

565
00:33:10.119 --> 00:33:10.559
<v Speaker 4>Exactly.

566
00:33:11.400 --> 00:33:14.319
<v Speaker 2>But it's kind of like JavaScript the good parts, right,

567
00:33:14.359 --> 00:33:17.680
<v Speaker 2>Maybe we need a JavaScript the type parts, because certainly

568
00:33:17.680 --> 00:33:20.680
<v Speaker 2>you can't use every feature of the language and have

569
00:33:22.440 --> 00:33:25.559
<v Speaker 2>a coherent type system.

570
00:33:25.839 --> 00:33:29.599
<v Speaker 1>It's kind of happening. It's kind of happening naturally, because

571
00:33:29.599 --> 00:33:33.240
<v Speaker 1>what I've seen, what I'm saying is that certain JavaScript

572
00:33:33.359 --> 00:33:37.400
<v Speaker 1>idioms that were really, you know, fairly commonplace when people

573
00:33:37.440 --> 00:33:42.200
<v Speaker 1>were writing in straight on JavaScript, were less typescript friendly.

574
00:33:42.680 --> 00:33:46.640
<v Speaker 1>And now these days, where everybody is essentially writing typescript,

575
00:33:47.079 --> 00:33:52.160
<v Speaker 1>these idioms are not being used anymore, or alternative idioms

576
00:33:52.160 --> 00:33:58.319
<v Speaker 1>that are more typescript friendly are coming along and replacing them.

577
00:33:58.960 --> 00:34:02.920
<v Speaker 1>I'll give an example. In the past, we will you

578
00:34:02.920 --> 00:34:05.759
<v Speaker 1>would create an object and then you would do if

579
00:34:06.160 --> 00:34:09.760
<v Speaker 1>if something, then add property X to it. If some

580
00:34:09.800 --> 00:34:13.760
<v Speaker 1>other things add property why to it, And typescript doesn't

581
00:34:13.840 --> 00:34:16.800
<v Speaker 1>really like that. It doesn't like the fact that you're

582
00:34:16.800 --> 00:34:20.199
<v Speaker 1>adding a new property to something that is considered as

583
00:34:20.239 --> 00:34:23.880
<v Speaker 1>a mpotent close kind of closed type. So people are

584
00:34:23.880 --> 00:34:31.000
<v Speaker 1>starting to do things like they're spreading objects into the

585
00:34:31.039 --> 00:34:36.960
<v Speaker 1>initialization just so that Typescript can better figure out the

586
00:34:37.000 --> 00:34:41.800
<v Speaker 1>actual properties and type the actual properties that are associated

587
00:34:41.840 --> 00:34:46.920
<v Speaker 1>with that particular type. It's kind of difficult to explain,

588
00:34:47.639 --> 00:34:51.639
<v Speaker 1>you know, without actually showing code. Hopefully I've kind of

589
00:34:51.800 --> 00:34:57.519
<v Speaker 1>made it clear. But when types are modified in run

590
00:34:57.559 --> 00:35:02.440
<v Speaker 1>time using imperative code, it can be fairly difficult and

591
00:35:02.519 --> 00:35:07.800
<v Speaker 1>sometimes impossible for typescript to properly track the type.

592
00:35:08.960 --> 00:35:12.840
<v Speaker 5>The way the typeescript handles these things, by the way,

593
00:35:12.880 --> 00:35:17.039
<v Speaker 5>the terminology for the static analysis is inferring when we

594
00:35:17.079 --> 00:35:20.880
<v Speaker 5>talk about type the types of how typescript analyzed like

595
00:35:21.199 --> 00:35:27.320
<v Speaker 5>does the setic analysis. So the terminology is inferring. But

596
00:35:27.360 --> 00:35:32.360
<v Speaker 5>the thing about the way typescript handles types, it kind

597
00:35:32.360 --> 00:35:36.639
<v Speaker 5>of takes the safe way. Okay, So let's say I

598
00:35:36.719 --> 00:35:41.760
<v Speaker 5>have an If something happens, then add property A, and

599
00:35:41.840 --> 00:35:45.840
<v Speaker 5>if something help else happens, then add property B. So

600
00:35:45.880 --> 00:35:49.320
<v Speaker 5>the way type stript would infer this thing is that

601
00:35:50.000 --> 00:35:53.880
<v Speaker 5>this object has both A and B like. I like

602
00:35:53.960 --> 00:35:57.599
<v Speaker 5>to call it the shreddingers union. So it's both A

603
00:35:57.800 --> 00:36:00.840
<v Speaker 5>and B like with only with the and the only

604
00:36:00.880 --> 00:36:05.159
<v Speaker 5>way for you to narrow this down is within a

605
00:36:05.199 --> 00:36:09.119
<v Speaker 5>certain scope to make an assumption. And that's also the

606
00:36:09.199 --> 00:36:13.960
<v Speaker 5>reason for the pattern discriminated union. It maybe you guys know,

607
00:36:14.280 --> 00:36:19.320
<v Speaker 5>so for the listeners that don't know what discriminated union is.

608
00:36:19.639 --> 00:36:22.480
<v Speaker 5>So because of what I just explained, that types will

609
00:36:22.519 --> 00:36:26.519
<v Speaker 5>take the widest type possible because in development time, it

610
00:36:26.639 --> 00:36:30.119
<v Speaker 5>can't really know what would happen. There's a pattern called

611
00:36:30.159 --> 00:36:33.239
<v Speaker 5>discriminated union. So if I have a union of types,

612
00:36:33.280 --> 00:36:37.079
<v Speaker 5>so let's say I have a property or the property,

613
00:36:37.639 --> 00:36:40.679
<v Speaker 5>the way for me to help type script and help

614
00:36:40.719 --> 00:36:43.960
<v Speaker 5>it narrow it down is by adding an extra key

615
00:36:44.079 --> 00:36:46.760
<v Speaker 5>that the key would not overlap any other keys in

616
00:36:46.800 --> 00:36:50.360
<v Speaker 5>the union. So let's say, for example, I have property

617
00:36:50.440 --> 00:36:52.880
<v Speaker 5>A is something, and then I would have key is

618
00:36:52.920 --> 00:36:57.320
<v Speaker 5>true and then the other type I'm merging into I'm saying,

619
00:36:57.440 --> 00:37:00.639
<v Speaker 5>or other types of property B, and I would say

620
00:37:00.719 --> 00:37:04.199
<v Speaker 5>that the key is false. True and false don't overlap.

621
00:37:04.559 --> 00:37:07.920
<v Speaker 5>So I can when whenever I check this object, and

622
00:37:07.960 --> 00:37:11.199
<v Speaker 5>I would say if key is true within that scope,

623
00:37:11.280 --> 00:37:15.239
<v Speaker 5>typescript knows the type narrow down. Typestrip knows which which

624
00:37:15.239 --> 00:37:17.280
<v Speaker 5>type it isn't. That is kind of maybe like a

625
00:37:17.320 --> 00:37:19.719
<v Speaker 5>new idiom for handling.

626
00:37:21.000 --> 00:37:23.840
<v Speaker 1>Yeah, so That's one example. There are several such examples.

627
00:37:23.840 --> 00:37:27.719
<v Speaker 1>The bottom line is that I'm saying that, especially again

628
00:37:27.760 --> 00:37:32.920
<v Speaker 1>when I'm looking at older JavaScript code bases and I'm

629
00:37:33.000 --> 00:37:37.320
<v Speaker 1>moving them to typescript. Ideally it should be just about

630
00:37:37.360 --> 00:37:41.039
<v Speaker 1>adding types. In reality, what I am saying in that

631
00:37:41.280 --> 00:37:43.840
<v Speaker 1>is that in a lot of cases, I, in order

632
00:37:43.920 --> 00:37:48.039
<v Speaker 1>to add types in a way that is actually useful

633
00:37:48.360 --> 00:37:53.320
<v Speaker 1>or sufficient, I end up massaging the code. It doesn't

634
00:37:53.400 --> 00:37:54.840
<v Speaker 1>stay exactly the same.

635
00:37:55.119 --> 00:37:57.280
<v Speaker 5>You can say the same thing about tests. How do

636
00:37:57.320 --> 00:38:01.880
<v Speaker 5>you mean that sometimes you might find yourself changing the

637
00:38:01.920 --> 00:38:03.039
<v Speaker 5>code to make it testable.

638
00:38:03.280 --> 00:38:06.599
<v Speaker 1>Yes, although a lot of times when it happens, I'm

639
00:38:06.639 --> 00:38:09.360
<v Speaker 1>really annoyed with it because it usually means that people

640
00:38:09.360 --> 00:38:13.760
<v Speaker 1>are testing internal things that and then are exposing them

641
00:38:13.760 --> 00:38:16.519
<v Speaker 1>to the outside just so that they can test them.

642
00:38:16.440 --> 00:38:17.920
<v Speaker 5>Or just bad dependencies.

643
00:38:18.159 --> 00:38:23.519
<v Speaker 2>Yeah, but the correct to the point earlier of the

644
00:38:24.840 --> 00:38:28.960
<v Speaker 2>I already forgot how you called it that guards or

645
00:38:29.400 --> 00:38:35.679
<v Speaker 2>the union, the discriminate discriminated union. So obviously this is

646
00:38:35.679 --> 00:38:37.880
<v Speaker 2>something that people want to do. It's not something you're

647
00:38:37.880 --> 00:38:41.559
<v Speaker 2>going to beat out of people. But metaprogramming is a

648
00:38:41.559 --> 00:38:45.719
<v Speaker 2>code smell. There's a certain I don't know, I guess

649
00:38:45.880 --> 00:38:49.440
<v Speaker 2>I'm not really a fan of dynamic programming. The way

650
00:38:49.440 --> 00:38:51.679
<v Speaker 2>that I program JavaScript is the way that I program

651
00:38:51.719 --> 00:38:55.119
<v Speaker 2>go And if you need something to return a different type,

652
00:38:55.159 --> 00:38:57.719
<v Speaker 2>then you should just have a different function, you know, if,

653
00:38:58.119 --> 00:39:01.519
<v Speaker 2>rather than have one function that handles many different cases

654
00:39:01.559 --> 00:39:05.480
<v Speaker 2>and then have metaprogramming inside of the function, just split

655
00:39:05.519 --> 00:39:07.719
<v Speaker 2>it out into separate functions.

656
00:39:07.800 --> 00:39:09.079
<v Speaker 4>I'll give you an example, though.

657
00:39:09.840 --> 00:39:15.239
<v Speaker 1>The common example, where the canonical example almost of where

658
00:39:15.280 --> 00:39:17.960
<v Speaker 1>you see this sort of thing is where you have

659
00:39:18.440 --> 00:39:21.320
<v Speaker 1>a function that has a success It returns either a

660
00:39:21.360 --> 00:39:25.679
<v Speaker 1>success value or an error value with an explanation, and

661
00:39:25.760 --> 00:39:29.360
<v Speaker 1>you've decided not to use exceptions, so you're actually returning

662
00:39:29.719 --> 00:39:33.519
<v Speaker 1>an object that either has the result or has the error.

663
00:39:33.800 --> 00:39:34.679
<v Speaker 4>So you would have a.

664
00:39:34.639 --> 00:39:40.039
<v Speaker 1>Discriminating field saying that success or failure, and then based

665
00:39:40.079 --> 00:39:42.320
<v Speaker 1>on whether it's success or failure, you would have the

666
00:39:42.400 --> 00:39:45.840
<v Speaker 1>fields that are associated with the success in the object,

667
00:39:46.400 --> 00:39:48.679
<v Speaker 1>or you would have the fields that are associated with

668
00:39:48.800 --> 00:39:51.519
<v Speaker 1>the error, like the error code or the error text

669
00:39:52.599 --> 00:39:55.599
<v Speaker 1>in that object, and you would use that discriminating field

670
00:39:55.599 --> 00:39:58.280
<v Speaker 1>of success or failure to know what the other fields

671
00:39:58.320 --> 00:39:58.960
<v Speaker 1>in there are.

672
00:39:59.599 --> 00:40:02.000
<v Speaker 2>This is already been solved, though, Like we already have

673
00:40:02.039 --> 00:40:04.599
<v Speaker 2>a tupule pattern for this, where the first element in

674
00:40:04.639 --> 00:40:07.320
<v Speaker 2>the tupole is your success object and the second element

675
00:40:07.360 --> 00:40:10.760
<v Speaker 2>in the tupol is your air object. So and you

676
00:40:10.760 --> 00:40:12.320
<v Speaker 2>can return toopoles in JavaScript.

677
00:40:12.960 --> 00:40:16.320
<v Speaker 1>Yeah, but again the reality is that in many cases

678
00:40:17.079 --> 00:40:20.719
<v Speaker 1>you first of all, you're first of all you're correct,

679
00:40:21.679 --> 00:40:24.440
<v Speaker 1>and also, like I said, you could just use exceptions instead.

680
00:40:24.960 --> 00:40:27.320
<v Speaker 2>Yeah, and I think that that that's why I'd say

681
00:40:27.400 --> 00:40:30.280
<v Speaker 2>that to me, sounds like an anti pattern. I know

682
00:40:30.320 --> 00:40:32.960
<v Speaker 2>why people use the tuple, especially if they're coming from

683
00:40:33.079 --> 00:40:36.519
<v Speaker 2>go or or Rust or another language where it's common

684
00:40:36.559 --> 00:40:44.559
<v Speaker 2>to use tupuls to to emulate option types or result types.

685
00:40:45.440 --> 00:40:49.599
<v Speaker 2>But yeah, I my my biggest question to be why

686
00:40:49.599 --> 00:40:52.519
<v Speaker 2>aren't you using air handling to your best advantage.

687
00:40:52.639 --> 00:40:54.199
<v Speaker 4>I'll give another example though.

688
00:40:54.440 --> 00:40:57.920
<v Speaker 1>Suppose you have a reducer and you have the action

689
00:40:58.280 --> 00:41:01.840
<v Speaker 1>and the data and data that you pass in varies

690
00:41:01.880 --> 00:41:05.079
<v Speaker 1>based on the action. So again you would use the

691
00:41:05.159 --> 00:41:10.079
<v Speaker 1>action field as a discriminator and then the other field

692
00:41:10.119 --> 00:41:12.440
<v Speaker 1>and the object depends on the action that you're doing.

693
00:41:12.519 --> 00:41:15.440
<v Speaker 1>There are a lot of situations in which this kind

694
00:41:15.440 --> 00:41:18.280
<v Speaker 1>of in JavaScript, you would just pass an object in

695
00:41:18.719 --> 00:41:22.800
<v Speaker 1>and then you would effectively do runtime introspection. To figure

696
00:41:22.800 --> 00:41:26.440
<v Speaker 1>out what it contains. Typescript tries to add static type

697
00:41:26.519 --> 00:41:31.840
<v Speaker 1>checking on top of that, and in JavaScript you could

698
00:41:31.920 --> 00:41:36.719
<v Speaker 1>often make do without that discriminating field because you would

699
00:41:36.800 --> 00:41:40.800
<v Speaker 1>just check whether particular property exists or not, like you

700
00:41:40.840 --> 00:41:45.199
<v Speaker 1>know has on property, et cetera. Typescript encourages you to

701
00:41:45.280 --> 00:41:48.639
<v Speaker 1>have this kind of discriminating field that is more explicit

702
00:41:48.679 --> 00:41:49.199
<v Speaker 1>about it.

703
00:41:49.280 --> 00:41:54.360
<v Speaker 5>Also, a question like the tuple has a lot of

704
00:41:54.679 --> 00:41:59.039
<v Speaker 5>advantages to it. But wouldn't you say that if success true,

705
00:41:59.280 --> 00:42:03.480
<v Speaker 5>like is a bit more readable than in place zero

706
00:42:03.840 --> 00:42:04.880
<v Speaker 5>or in index one?

707
00:42:05.119 --> 00:42:07.639
<v Speaker 2>No, Because you mean, if you're going to do that,

708
00:42:07.679 --> 00:42:10.519
<v Speaker 2>you're going to do the deconstruction, right, So you're going

709
00:42:10.559 --> 00:42:18.039
<v Speaker 2>to do let bracket result common error bracket equals. So

710
00:42:18.559 --> 00:42:22.840
<v Speaker 2>from a readability perspective, I I don't know how it

711
00:42:22.880 --> 00:42:25.400
<v Speaker 2>makes a difference, because I mean I have not seen

712
00:42:25.440 --> 00:42:29.119
<v Speaker 2>anybody do it without deconstructing, right. So, first of all,

713
00:42:29.119 --> 00:42:31.159
<v Speaker 2>it's not a pattern. It's not a pattern that's widely used.

714
00:42:31.199 --> 00:42:35.920
<v Speaker 2>It's interesting, I there's a now they've got there's something

715
00:42:36.000 --> 00:42:40.800
<v Speaker 2>in the pipeline for this pattern. I don't remember what

716
00:42:40.800 --> 00:42:43.679
<v Speaker 2>it's called. But in the JavaScript standards right now, there's

717
00:42:43.679 --> 00:42:48.800
<v Speaker 2>something in the pipeline for this, but it so that

718
00:42:48.880 --> 00:42:51.760
<v Speaker 2>you don't have to do the square brackets and it's

719
00:42:51.840 --> 00:42:54.360
<v Speaker 2>like it's like a special I don't remember what the

720
00:42:54.400 --> 00:42:56.400
<v Speaker 2>syntax is, but it's like a special type of a

721
00:42:56.440 --> 00:42:59.400
<v Speaker 2>weight where you where you get the ghost style slash,

722
00:42:59.480 --> 00:43:00.840
<v Speaker 2>rust style old slash.

723
00:43:00.920 --> 00:43:04.199
<v Speaker 6>You can just distract the error without the whole try

724
00:43:04.199 --> 00:43:04.760
<v Speaker 6>catch block.

725
00:43:05.440 --> 00:43:08.800
<v Speaker 2>Well, you can do that. You can still do that anyway,

726
00:43:09.039 --> 00:43:11.119
<v Speaker 2>because you could just put a dot catch on there

727
00:43:11.199 --> 00:43:14.320
<v Speaker 2>and then you can do if type of error.

728
00:43:14.719 --> 00:43:17.039
<v Speaker 6>Yeah, that that proposal isn't Yeah.

729
00:43:16.880 --> 00:43:17.440
<v Speaker 4>I know what you mean.

730
00:43:17.559 --> 00:43:19.159
<v Speaker 6>I know that proposal is.

731
00:43:19.159 --> 00:43:19.679
<v Speaker 2>It is it?

732
00:43:19.800 --> 00:43:23.599
<v Speaker 6>And I think it's it's coloring that practice with the

733
00:43:23.679 --> 00:43:27.280
<v Speaker 6>dot catch as as not a fancy one either, which

734
00:43:27.280 --> 00:43:29.039
<v Speaker 6>is why it's proposing that you could like do the

735
00:43:29.039 --> 00:43:30.119
<v Speaker 6>ghostyle for a bit.

736
00:43:30.840 --> 00:43:33.159
<v Speaker 2>Well, I definitely hope that it fails because I don't

737
00:43:33.199 --> 00:43:34.840
<v Speaker 2>think that's an idiom that we need to bring in

738
00:43:34.880 --> 00:43:40.159
<v Speaker 2>the JavaScript amazing. I think we have the problem with

739
00:43:40.239 --> 00:43:44.719
<v Speaker 2>JavaScript is it's everything to everyone and nothing for no

740
00:43:44.800 --> 00:43:46.199
<v Speaker 2>one to.

741
00:43:46.320 --> 00:43:48.480
<v Speaker 4>Be fair, and it's hard to get right.

742
00:43:48.920 --> 00:43:52.800
<v Speaker 1>It's it's kind of it's kind of we're digressing, we're

743
00:43:52.800 --> 00:43:55.239
<v Speaker 1>going down a rabbit hole. But I sent you brought

744
00:43:55.320 --> 00:43:59.480
<v Speaker 1>us there. So I'm in contact on on X with

745
00:43:59.599 --> 00:44:00.239
<v Speaker 1>one of.

746
00:44:02.760 --> 00:44:04.159
<v Speaker 4>The with Rob Palmer.

747
00:44:04.599 --> 00:44:08.480
<v Speaker 1>He's one he's like the co chair of the TC

748
00:44:08.679 --> 00:44:12.760
<v Speaker 1>thirty nine. And he was talking about and he regularly

749
00:44:12.920 --> 00:44:17.079
<v Speaker 1>posts about new things being added into into JavaScript, and

750
00:44:17.159 --> 00:44:19.800
<v Speaker 1>he like titles it JavaScript excitement.

751
00:44:20.599 --> 00:44:20.960
<v Speaker 4>Uh.

752
00:44:21.000 --> 00:44:25.199
<v Speaker 1>And the last so I was kind of being intense

753
00:44:25.360 --> 00:44:28.480
<v Speaker 1>intentionally facetious when the last time that he did it

754
00:44:28.559 --> 00:44:31.679
<v Speaker 1>about like the entire year, and I said, and he said,

755
00:44:31.760 --> 00:44:34.400
<v Speaker 1>like typescript excitement. And I said, I'm looking at your

756
00:44:34.440 --> 00:44:38.840
<v Speaker 1>proposals and there's nothing much exciting here. And he was

757
00:44:38.880 --> 00:44:41.679
<v Speaker 1>going like, like, how do you mean, And I said,

758
00:44:41.719 --> 00:44:46.079
<v Speaker 1>because these are all like these are all like library functions,

759
00:44:46.119 --> 00:44:50.239
<v Speaker 1>like you now have this extra method on type of

760
00:44:50.280 --> 00:44:53.320
<v Speaker 1>string or this extra method on type of array. There's

761
00:44:53.400 --> 00:44:58.639
<v Speaker 1>nothing like sorry left bad, left bad exactly. Uh.

762
00:44:58.679 --> 00:45:00.360
<v Speaker 4>There's there's nothing like.

763
00:45:01.920 --> 00:45:05.159
<v Speaker 1>Similar to when you added a sinka weight, or when

764
00:45:05.159 --> 00:45:09.159
<v Speaker 1>you added constant let or when you added erow functions.

765
00:45:09.400 --> 00:45:13.519
<v Speaker 1>And he basically responded seriously by saying, yes, we are

766
00:45:14.559 --> 00:45:18.800
<v Speaker 1>intentionally winding down the amount of syntactical changes to the

767
00:45:18.880 --> 00:45:21.559
<v Speaker 1>language that we are making. We are at this point

768
00:45:21.599 --> 00:45:24.159
<v Speaker 1>in time of the maturity of the language where we

769
00:45:24.480 --> 00:45:28.800
<v Speaker 1>really hesitant about adding new stuff into the actual syntax

770
00:45:28.840 --> 00:45:29.079
<v Speaker 1>of the.

771
00:45:29.079 --> 00:45:31.000
<v Speaker 5>Language, and they have Typescript now.

772
00:45:32.639 --> 00:45:35.920
<v Speaker 1>Yeah, but look, there are certain proposals that a lot

773
00:45:35.960 --> 00:45:39.719
<v Speaker 1>of people are pushing for and are still stuck maybe

774
00:45:39.760 --> 00:45:44.199
<v Speaker 1>because of that stuff like the pipeline operator, which has

775
00:45:44.239 --> 00:45:47.000
<v Speaker 1>been kind of waiting in purgatory for something like three,

776
00:45:47.079 --> 00:45:51.840
<v Speaker 1>four or five years because it requires a significant change

777
00:45:51.920 --> 00:45:55.719
<v Speaker 1>the syntax of the language. People have been talking about

778
00:45:55.760 --> 00:45:59.920
<v Speaker 1>all sorts of pattern matching capabilities that aren't happening, again

779
00:46:00.159 --> 00:46:03.159
<v Speaker 1>related to actually changing the syntax of the language. But

780
00:46:03.239 --> 00:46:07.239
<v Speaker 1>again we really digressed, going back to your pointly run

781
00:46:07.679 --> 00:46:10.480
<v Speaker 1>about the fact that the majority of the people assumed

782
00:46:11.000 --> 00:46:17.000
<v Speaker 1>that not necessarily made it conscious assumption, but based on

783
00:46:17.079 --> 00:46:20.039
<v Speaker 1>the way in which they write their code, assume that

784
00:46:20.159 --> 00:46:25.159
<v Speaker 1>Typescript provides them with type security run type type security

785
00:46:25.480 --> 00:46:29.079
<v Speaker 1>that it does not. And we talked about one fact,

786
00:46:29.199 --> 00:46:32.360
<v Speaker 1>which is if you're using any in your code, and

787
00:46:32.400 --> 00:46:36.519
<v Speaker 1>it's not such a weird pattern because again, if you're

788
00:46:36.559 --> 00:46:39.599
<v Speaker 1>taking an existing code base and you're moving it from

789
00:46:39.679 --> 00:46:43.320
<v Speaker 1>JavaScript to typescript, it's really hard to get rid of

790
00:46:43.360 --> 00:46:44.480
<v Speaker 1>all the nis.

791
00:46:46.039 --> 00:46:48.559
<v Speaker 5>It's also what it's for I must say that's what

792
00:46:48.639 --> 00:46:51.360
<v Speaker 5>the type trip team. I say any is for.

793
00:46:51.559 --> 00:46:54.519
<v Speaker 6>I will, yeah, but I will. I actually don't want

794
00:46:54.559 --> 00:46:57.679
<v Speaker 6>to give people like a discount and say Okay, if

795
00:46:57.679 --> 00:46:59.719
<v Speaker 6>you use any, then you get it. It's not that

796
00:47:00.079 --> 00:47:03.800
<v Speaker 6>if you use as string, the same problem. If you

797
00:47:03.920 --> 00:47:07.719
<v Speaker 6>use interfaces and you infer data or the aque you

798
00:47:08.960 --> 00:47:12.159
<v Speaker 6>point to data from an interface, exactly the same problem.

799
00:47:12.559 --> 00:47:15.119
<v Speaker 6>So I want to I'm here to like raise the

800
00:47:15.119 --> 00:47:18.400
<v Speaker 6>awareness of typescript and its follicy and security. And if

801
00:47:18.400 --> 00:47:20.920
<v Speaker 6>we just say that it's because you use any or unknown,

802
00:47:21.239 --> 00:47:24.519
<v Speaker 6>then we fail that because whatever you use to type

803
00:47:24.519 --> 00:47:28.039
<v Speaker 6>it on the typescript side of things. If you use interfaces,

804
00:47:28.360 --> 00:47:31.639
<v Speaker 6>I don't know all your Union stuff, branded types whatever.

805
00:47:31.960 --> 00:47:36.760
<v Speaker 6>Actually wait, Brando types has a in which this actually

806
00:47:36.960 --> 00:47:38.960
<v Speaker 6>does work if you can like assert it on run time.

807
00:47:39.039 --> 00:47:41.599
<v Speaker 6>But if you don't do that, and you'd still use

808
00:47:41.639 --> 00:47:44.320
<v Speaker 6>interfaces and everything else, and you use as string and whatever,

809
00:47:44.719 --> 00:47:47.400
<v Speaker 6>all of that fancy typing does not save you from

810
00:47:47.480 --> 00:47:51.400
<v Speaker 6>having runtime security issues and type juggling vulnerabilities.

811
00:47:52.239 --> 00:47:56.559
<v Speaker 1>Does that have to do only with when you're sending

812
00:47:58.440 --> 00:48:03.119
<v Speaker 1>information over a medium like you know the network, or

813
00:48:03.159 --> 00:48:08.039
<v Speaker 1>does it also just happen in your in the code itself,

814
00:48:08.239 --> 00:48:11.159
<v Speaker 1>Like what's this sort of problem associated with?

815
00:48:11.360 --> 00:48:15.159
<v Speaker 6>So obviously like the easy use case here, you can

816
00:48:15.239 --> 00:48:17.679
<v Speaker 6>of like simulate this is where you want. And this

817
00:48:17.800 --> 00:48:20.400
<v Speaker 6>is like a general concept in application and security, right

818
00:48:20.480 --> 00:48:25.599
<v Speaker 6>like you whatever you put as as like your own

819
00:48:25.679 --> 00:48:28.639
<v Speaker 6>data or you know you're trusted data, that that's fine.

820
00:48:28.679 --> 00:48:31.159
<v Speaker 6>Like I can like as an attacker, as an external

821
00:48:31.239 --> 00:48:33.559
<v Speaker 6>entity to the system, maybe I can truly manipulate it

822
00:48:33.599 --> 00:48:35.719
<v Speaker 6>and do anything with it. Which is why I'm kind

823
00:48:35.719 --> 00:48:38.280
<v Speaker 6>of like taking the example to what is the most

824
00:48:38.320 --> 00:48:42.320
<v Speaker 6>common scenario with application development, which is you're having servers

825
00:48:42.360 --> 00:48:45.360
<v Speaker 6>and servers get data from somewhere and that's usually data

826
00:48:45.440 --> 00:48:49.199
<v Speaker 6>that flows over HTP requests, okay, and so that is

827
00:48:49.199 --> 00:48:51.599
<v Speaker 6>where data comes in. And that data can come in there,

828
00:48:51.679 --> 00:48:54.039
<v Speaker 6>but it doesn't have to come in there. For example,

829
00:48:54.119 --> 00:48:58.519
<v Speaker 6>maybe you save user names sorry, file names and I

830
00:48:58.519 --> 00:49:00.920
<v Speaker 6>don't know, in the cloud somewhere, okay, a very strict

831
00:49:01.000 --> 00:49:04.119
<v Speaker 6>way without pat reversal, without anything else. But that data,

832
00:49:04.320 --> 00:49:07.079
<v Speaker 6>you don't manage it in any other way like you've

833
00:49:07.159 --> 00:49:10.480
<v Speaker 6>you've saved it in some way it doesn't impact the application.

834
00:49:11.000 --> 00:49:13.320
<v Speaker 6>But then in some other place in your application you

835
00:49:13.360 --> 00:49:16.280
<v Speaker 6>actually use it and trust it, but that file name

836
00:49:16.480 --> 00:49:18.800
<v Speaker 6>was saved by you don't know it at that point,

837
00:49:18.840 --> 00:49:21.639
<v Speaker 6>right that imagine the developer working on that other system

838
00:49:21.920 --> 00:49:24.559
<v Speaker 6>or other component of the system. They treat the data

839
00:49:24.599 --> 00:49:27.440
<v Speaker 6>from the database or from like a bucket name as

840
00:49:27.599 --> 00:49:31.039
<v Speaker 6>potentially safe, but it's not. I can give the exact

841
00:49:31.039 --> 00:49:33.559
<v Speaker 6>example with Git branches. Do you know that you can

842
00:49:33.599 --> 00:49:37.400
<v Speaker 6>actually have a semicolon in a Git branch name, which

843
00:49:37.480 --> 00:49:39.880
<v Speaker 6>imagine now that I'm telling you go ahead and get

844
00:49:39.960 --> 00:49:44.880
<v Speaker 6>clone or get checkout to my leran semicolon rm you know,

845
00:49:45.719 --> 00:49:50.760
<v Speaker 6>percent twenty whatever to your ref your entire directory. You

846
00:49:50.800 --> 00:49:53.119
<v Speaker 6>will actually if you run this on a shell, you

847
00:49:53.199 --> 00:49:56.559
<v Speaker 6>actually have shell meta character interpolated, and you will not

848
00:49:56.800 --> 00:49:59.559
<v Speaker 6>just do a Git clone or get checkout actually, because

849
00:49:59.599 --> 00:50:03.119
<v Speaker 6>that wuch name is valid by GitHub, will actually run

850
00:50:03.159 --> 00:50:07.159
<v Speaker 6>a command. So this is where the typing system kind

851
00:50:07.199 --> 00:50:09.920
<v Speaker 6>of like you know, it stays on the development side,

852
00:50:09.920 --> 00:50:13.360
<v Speaker 6>and it's easiest to give you those by juggling.

853
00:50:13.760 --> 00:50:16.960
<v Speaker 4>Yeah, little Bobby tables.

854
00:50:16.599 --> 00:50:19.800
<v Speaker 6>Yes in different ways and unexpected ways, which is why

855
00:50:20.079 --> 00:50:23.119
<v Speaker 6>I'm kind of like wanting to hit that with a

856
00:50:23.159 --> 00:50:25.320
<v Speaker 6>hammer and say, like type scrift is not a security

857
00:50:25.320 --> 00:50:28.800
<v Speaker 6>at all. Like, I appreciate it, but I don't want

858
00:50:28.840 --> 00:50:33.320
<v Speaker 6>you even though it gives you strongly typed security benefits,

859
00:50:33.400 --> 00:50:35.159
<v Speaker 6>if you want to take it there, I am happy

860
00:50:35.199 --> 00:50:38.679
<v Speaker 6>to give you that concept, but I don't want you

861
00:50:38.719 --> 00:50:40.559
<v Speaker 6>to think of it as a security tool because the

862
00:50:40.559 --> 00:50:43.679
<v Speaker 6>moment you did, you'll have those mistakes done, like not

863
00:50:43.800 --> 00:50:46.079
<v Speaker 6>understanding that it's not on run time and all of

864
00:50:46.119 --> 00:50:46.880
<v Speaker 6>these other issues.

865
00:50:46.960 --> 00:50:49.760
<v Speaker 5>So if it makes fun of type scriptures not being

866
00:50:49.880 --> 00:50:54.880
<v Speaker 5>strongly typed, quality, weekly typed, or strongly typed, that's my favorite.

867
00:50:55.400 --> 00:50:58.320
<v Speaker 4>Awesome extremely typed. Had to hear that.

868
00:50:58.519 --> 00:51:02.239
<v Speaker 5>Strangly type because US trends are equal, because it's it's

869
00:51:02.280 --> 00:51:04.920
<v Speaker 5>an because it's a duct type, it's not a phenomenal

870
00:51:04.960 --> 00:51:07.119
<v Speaker 5>type system. Well.

871
00:51:07.360 --> 00:51:09.760
<v Speaker 1>I think the bigger issue though, is the fact that

872
00:51:09.840 --> 00:51:14.440
<v Speaker 1>we're we're kind of used from JavaScript of working with

873
00:51:15.039 --> 00:51:21.519
<v Speaker 1>data in kind of blobs like you've got to json,

874
00:51:22.199 --> 00:51:27.199
<v Speaker 1>and the JSON is effectively a JavaScript object and it

875
00:51:27.239 --> 00:51:30.559
<v Speaker 1>can have any structure in any fields, and anything can

876
00:51:30.599 --> 00:51:32.719
<v Speaker 1>be hung on it, and the strings can be any

877
00:51:32.840 --> 00:51:35.360
<v Speaker 1>and can be anything, and so on and so forth.

878
00:51:36.079 --> 00:51:39.599
<v Speaker 1>But to be fair, this is not just a typescript thing.

879
00:51:39.679 --> 00:51:42.039
<v Speaker 1>I mean the amount of times that have written type

880
00:51:42.079 --> 00:51:47.119
<v Speaker 1>safe C plus plus code and have run into situations

881
00:51:47.159 --> 00:51:50.360
<v Speaker 1>where the bits and bites didn't exactly match what I

882
00:51:50.440 --> 00:51:51.480
<v Speaker 1>expected them to be.

883
00:51:52.000 --> 00:51:53.960
<v Speaker 4>You know that that happens.

884
00:51:53.920 --> 00:51:57.760
<v Speaker 6>Yes, But there's a there's a big difference between like

885
00:51:57.920 --> 00:52:01.519
<v Speaker 6>if you'll malock for whatever, like any bytes versus forty bytes,

886
00:52:01.599 --> 00:52:04.519
<v Speaker 6>or you forget or not do it correctly versus you

887
00:52:04.559 --> 00:52:08.000
<v Speaker 6>actually interpret a string as an array or an object

888
00:52:08.280 --> 00:52:10.960
<v Speaker 6>because that flows through the systems and can wreck havoc.

889
00:52:11.039 --> 00:52:13.599
<v Speaker 6>And we have like this, this is this literally has

890
00:52:13.679 --> 00:52:18.360
<v Speaker 6>like its own vulnerability class called type juggling, which PAHP

891
00:52:18.480 --> 00:52:21.480
<v Speaker 6>developers know it because you know PAHP, but also JavaScript

892
00:52:21.480 --> 00:52:23.960
<v Speaker 6>developers should know it because also JavaScript.

893
00:52:24.280 --> 00:52:27.119
<v Speaker 1>So can you again elaborate a little bit about type juggling.

894
00:52:28.119 --> 00:52:31.719
<v Speaker 6>Yes, So let's take let's go back to like our

895
00:52:31.800 --> 00:52:35.320
<v Speaker 6>simple case. We have an Express server running with typescript okay,

896
00:52:35.679 --> 00:52:38.119
<v Speaker 6>and we only use type twitter. I'm not even going yet.

897
00:52:38.159 --> 00:52:41.199
<v Speaker 6>We haven't crossed that phase of using type know ring,

898
00:52:41.199 --> 00:52:43.599
<v Speaker 6>which we should probably get through and then zod, but

899
00:52:43.639 --> 00:52:46.360
<v Speaker 6>we haven't crossed to that part. And imagine we're building

900
00:52:46.440 --> 00:52:50.239
<v Speaker 6>something as simple as like a React like a poor

901
00:52:50.280 --> 00:52:54.559
<v Speaker 6>man's React server component sort of things So imagine you're

902
00:52:54.599 --> 00:52:57.920
<v Speaker 6>having a request coming in. You want to take the request,

903
00:52:58.000 --> 00:53:00.559
<v Speaker 6>you want to check that, maybe call a function as well.

904
00:53:01.000 --> 00:53:03.320
<v Speaker 6>If it's sanitized, everything is a string, you know, the

905
00:53:03.639 --> 00:53:06.840
<v Speaker 6>username is a string whatever, and then that that server

906
00:53:06.920 --> 00:53:10.519
<v Speaker 6>response is basically an HTML object back to you that says,

907
00:53:10.880 --> 00:53:13.400
<v Speaker 6>you know, hello world or hell low arel or whatever,

908
00:53:14.119 --> 00:53:15.679
<v Speaker 6>and you type it all the way and you do

909
00:53:15.719 --> 00:53:19.000
<v Speaker 6>the sanitization. But if I'm sending you, if I'm sending

910
00:53:19.079 --> 00:53:22.159
<v Speaker 6>you now like the in the Corey string, I'm doing

911
00:53:22.320 --> 00:53:27.679
<v Speaker 6>name square, brackets equals and then start an image tag

912
00:53:27.760 --> 00:53:31.280
<v Speaker 6>like an actual HTML image tag. Because of the way

913
00:53:31.360 --> 00:53:35.000
<v Speaker 6>that express is set up, what you'll actually get is

914
00:53:35.079 --> 00:53:38.079
<v Speaker 6>an array interpreted there and then all of your typing

915
00:53:38.119 --> 00:53:41.559
<v Speaker 6>systems within your express and touch tip doesn't help because

916
00:53:41.599 --> 00:53:47.400
<v Speaker 6>now the system, the application itself, interprets this name as

917
00:53:47.480 --> 00:53:50.679
<v Speaker 6>an array and not as a string, and that is

918
00:53:50.760 --> 00:53:53.440
<v Speaker 6>type job. That's like the pure example of from an

919
00:53:53.440 --> 00:53:57.480
<v Speaker 6>attacker perspective, that's called HTP parameter pollution. Because we're able

920
00:53:57.559 --> 00:54:00.199
<v Speaker 6>to kind of like you know, fuzzy test, create kind

921
00:54:00.199 --> 00:54:03.400
<v Speaker 6>of like a mutation testing sort of on the request itself,

922
00:54:03.440 --> 00:54:07.039
<v Speaker 6>but to the application itself, it is actually being being

923
00:54:07.119 --> 00:54:10.360
<v Speaker 6>juggled from one type to a different one. And that's

924
00:54:10.360 --> 00:54:12.360
<v Speaker 6>a very classic one that happens a lot of time,

925
00:54:12.480 --> 00:54:12.960
<v Speaker 6>a lot of time.

926
00:54:13.039 --> 00:54:17.599
<v Speaker 1>So basically, just to clarify, you were using typescript typecasting,

927
00:54:17.679 --> 00:54:21.079
<v Speaker 1>which is the as key word to tell typescript, trust me,

928
00:54:21.559 --> 00:54:25.360
<v Speaker 1>this is a string, because you assumed that it's a string,

929
00:54:25.920 --> 00:54:28.480
<v Speaker 1>but in reality and run time, it was actually an

930
00:54:28.639 --> 00:54:32.199
<v Speaker 1>array rather than a string. So you were telling typescript

931
00:54:33.320 --> 00:54:35.199
<v Speaker 1>this is a string, but it actually turned out to

932
00:54:35.239 --> 00:54:38.440
<v Speaker 1>be an array. And then from that point on, flowing

933
00:54:38.840 --> 00:54:43.400
<v Speaker 1>throughout your entire code base, it's trying it, it's treating

934
00:54:44.440 --> 00:54:47.840
<v Speaker 1>it's it's the assumption is that it's a string, but

935
00:54:47.920 --> 00:54:49.039
<v Speaker 1>it is it correct?

936
00:54:49.079 --> 00:54:52.199
<v Speaker 6>And now and now imagine that your sanitized function to

937
00:54:52.320 --> 00:54:54.559
<v Speaker 6>this controller or whatever you want.

938
00:54:54.719 --> 00:54:56.119
<v Speaker 4>And again, oh, one more thing.

939
00:54:56.199 --> 00:55:00.800
<v Speaker 1>And of course typescript does automatic jobscript does automatic conversions,

940
00:55:01.199 --> 00:55:03.320
<v Speaker 1>so that when you actually try to use it as

941
00:55:03.320 --> 00:55:07.440
<v Speaker 1>a string, it will be transformed into a string. But

942
00:55:08.199 --> 00:55:11.519
<v Speaker 1>if you do certain sanitation functions that will only sanitize

943
00:55:11.519 --> 00:55:14.840
<v Speaker 1>the first part rather than the entire thing, maybe.

944
00:55:14.719 --> 00:55:18.599
<v Speaker 6>Yeah, yeah, you don't have to cast it. That's where

945
00:55:18.599 --> 00:55:20.880
<v Speaker 6>I'm at. So you imagine that that sanitized function again,

946
00:55:20.960 --> 00:55:23.960
<v Speaker 6>have the function signature says as string and everything, so

947
00:55:24.039 --> 00:55:28.239
<v Speaker 6>that shit goes fine. But now that array flows through

948
00:55:28.280 --> 00:55:31.159
<v Speaker 6>the system function as an array. But when it hits

949
00:55:31.280 --> 00:55:35.480
<v Speaker 6>something like you know your your disallow list or the

950
00:55:35.639 --> 00:55:40.599
<v Speaker 6>name the data itself that includes, and then you give

951
00:55:40.639 --> 00:55:45.280
<v Speaker 6>it that input, that actually will get coerced from from

952
00:55:45.519 --> 00:55:48.159
<v Speaker 6>with a two string function from an array to a string,

953
00:55:48.480 --> 00:55:50.280
<v Speaker 6>and you will get the first element because that's just

954
00:55:50.320 --> 00:55:52.840
<v Speaker 6>how it works, and you don't know this ahead of time.

955
00:55:53.199 --> 00:55:55.880
<v Speaker 6>And worse than that, if you type check the system,

956
00:55:56.239 --> 00:55:58.840
<v Speaker 6>everything will be will match just fine, and your units

957
00:55:58.920 --> 00:56:02.000
<v Speaker 6>will work just fine because it's typed throughout the system

958
00:56:02.440 --> 00:56:04.559
<v Speaker 6>as a string. And I want to also correct on

959
00:56:04.679 --> 00:56:07.119
<v Speaker 6>because it doesn't matter that you lie to job to

960
00:56:07.199 --> 00:56:09.519
<v Speaker 6>typescript and tell it as a string. Because if you

961
00:56:09.559 --> 00:56:13.519
<v Speaker 6>define an interface or you rely on the the query

962
00:56:13.559 --> 00:56:17.079
<v Speaker 6>parameters of the interfaces as exported by by Express or

963
00:56:17.119 --> 00:56:20.280
<v Speaker 6>any other framework, that will also not save you because

964
00:56:20.320 --> 00:56:22.320
<v Speaker 6>you will get to the exact same problem we're talking

965
00:56:22.320 --> 00:56:23.039
<v Speaker 6>about front time.

966
00:56:24.519 --> 00:56:27.159
<v Speaker 5>Let me maybe help sharpen this up a bit. An

967
00:56:27.159 --> 00:56:30.400
<v Speaker 5>Express for example, so the data that you accept from

968
00:56:30.440 --> 00:56:33.440
<v Speaker 5>a request, you don't have to like cast it that

969
00:56:33.559 --> 00:56:35.519
<v Speaker 5>cast is known as like a bad practice where you

970
00:56:35.639 --> 00:56:38.480
<v Speaker 5>tell it as a string, like if you just type

971
00:56:38.559 --> 00:56:43.119
<v Speaker 5>the argument of the function like requests expresses request, the

972
00:56:43.159 --> 00:56:45.480
<v Speaker 5>type is a generic type, so you can be like

973
00:56:45.599 --> 00:56:50.119
<v Speaker 5>request should accept a user of some interface. Like you

974
00:56:50.159 --> 00:56:52.480
<v Speaker 5>don't even see the bad practice here, it's just like

975
00:56:53.000 --> 00:56:55.599
<v Speaker 5>you're actually doing a good practice. You know, you have

976
00:56:55.960 --> 00:56:59.280
<v Speaker 5>you type the argument of your function. But on this

977
00:56:59.519 --> 00:57:02.519
<v Speaker 5>entry point of the application where you just accept the

978
00:57:02.599 --> 00:57:06.199
<v Speaker 5>request for type stript it's any and that's where type

979
00:57:06.239 --> 00:57:09.880
<v Speaker 5>shrip expects you to type it. But this is where

980
00:57:09.960 --> 00:57:12.880
<v Speaker 5>like it gets confusing because you think you're going on

981
00:57:13.000 --> 00:57:15.480
<v Speaker 5>press practice because you type your argument. But on the

982
00:57:15.480 --> 00:57:20.239
<v Speaker 5>other hand, typing a request without actually doing some run

983
00:57:20.239 --> 00:57:24.079
<v Speaker 5>time validation is a bad practice and it's not very common.

984
00:57:25.519 --> 00:57:28.199
<v Speaker 6>I don't actually want to cross that chasm. Like let's

985
00:57:28.000 --> 00:57:30.320
<v Speaker 6>let's cross and say let's go to like that phase

986
00:57:30.320 --> 00:57:33.880
<v Speaker 6>and say if we did if if the run time

987
00:57:33.920 --> 00:57:38.039
<v Speaker 6>type checking is the type narring okay, or that what's

988
00:57:38.039 --> 00:57:39.719
<v Speaker 6>so so known as like the type cards that if

989
00:57:39.760 --> 00:57:42.039
<v Speaker 6>type of Like what do you think of that? Because

990
00:57:42.039 --> 00:57:43.840
<v Speaker 6>I have my own opinions, but what do you think

991
00:57:43.840 --> 00:57:44.039
<v Speaker 6>of that?

992
00:57:44.880 --> 00:57:47.039
<v Speaker 1>Well, first of all, there are a couple of issues

993
00:57:47.039 --> 00:57:51.440
<v Speaker 1>with that. First of all, it's unfortunate. First of all,

994
00:57:52.360 --> 00:57:56.679
<v Speaker 1>it's kind of bad practice in JavaScript, again, putting typescript aside.

995
00:57:56.719 --> 00:58:00.920
<v Speaker 1>In JavaScript, I always considered it kind of bad practice

996
00:58:01.000 --> 00:58:03.840
<v Speaker 1>to have to do to write this type of code,

997
00:58:04.519 --> 00:58:09.960
<v Speaker 1>because the whole concept of JavaScript was about duck typing

998
00:58:10.480 --> 00:58:16.039
<v Speaker 1>about how something behaves rather than exactly what it is.

999
00:58:16.719 --> 00:58:24.199
<v Speaker 1>So creating these kind of switch statements or if if

1000
00:58:24.320 --> 00:58:26.559
<v Speaker 1>l if l if ls based on the type of

1001
00:58:26.599 --> 00:58:30.920
<v Speaker 1>a thing basically kind of indicated that it was. I

1002
00:58:31.000 --> 00:58:33.719
<v Speaker 1>kind of thought of it as a cod small. But

1003
00:58:34.039 --> 00:58:39.119
<v Speaker 1>that being said, stuff coming in over the wire cannot

1004
00:58:39.159 --> 00:58:42.920
<v Speaker 1>be trusted. So there are certain points on the edges

1005
00:58:43.159 --> 00:58:47.559
<v Speaker 1>of the system where I feel that type these type

1006
00:58:47.599 --> 00:58:52.599
<v Speaker 1>of type guards are a must within the application itself.

1007
00:58:53.159 --> 00:58:55.880
<v Speaker 1>I would strive to avoid the need for them as

1008
00:58:56.000 --> 00:58:58.320
<v Speaker 1>much as I possibly can in terms of just the

1009
00:58:58.360 --> 00:58:59.519
<v Speaker 1>way that I write the code.

1010
00:58:59.880 --> 00:59:02.760
<v Speaker 6>I resonate with that, and I'll just add another clarification here,

1011
00:59:03.119 --> 00:59:07.320
<v Speaker 6>because I see how like, how like some security some

1012
00:59:07.480 --> 00:59:10.239
<v Speaker 6>security aspects are kind of like creeping in here and there,

1013
00:59:10.280 --> 00:59:13.079
<v Speaker 6>Like you're very concerned about something that's on the wire,

1014
00:59:13.239 --> 00:59:14.920
<v Speaker 6>and I want to give you an example of a system.

1015
00:59:15.239 --> 00:59:17.920
<v Speaker 6>Imagine you're building the WebAPI for things and you're typing

1016
00:59:18.000 --> 00:59:20.599
<v Speaker 6>everything and it goes through the schema and everything is perfect,

1017
00:59:20.840 --> 00:59:25.159
<v Speaker 6>not cynically, it is perfect, and you're saving something and

1018
00:59:25.199 --> 00:59:27.599
<v Speaker 6>you're putting that data into a message bus. Okay, it's

1019
00:59:27.599 --> 00:59:30.239
<v Speaker 6>going into a queue, and some other system gets it,

1020
00:59:30.599 --> 00:59:33.920
<v Speaker 6>and that system could say something that got into the

1021
00:59:34.000 --> 00:59:36.960
<v Speaker 6>queue is our internal system. That user name or that

1022
00:59:37.119 --> 00:59:40.679
<v Speaker 6>email or something, that file name is a trusted data

1023
00:59:40.719 --> 00:59:42.800
<v Speaker 6>because it's not over the wire. I'm actually getting it

1024
00:59:42.800 --> 00:59:45.159
<v Speaker 6>from like my own rabbit and qure whatever. And that

1025
00:59:45.320 --> 00:59:48.440
<v Speaker 6>is exactly where things fall apart because if you're not

1026
00:59:48.559 --> 00:59:52.000
<v Speaker 6>using any actual security controls and measures on that end

1027
00:59:52.039 --> 00:59:54.840
<v Speaker 6>as well, and you're having that concept of it's not

1028
00:59:54.880 --> 00:59:57.960
<v Speaker 6>over HTP, it's not over API. No one is sending this.

1029
00:59:57.960 --> 01:00:00.400
<v Speaker 6>This is not user input. I'm literally taking off of

1030
01:00:00.440 --> 01:00:02.760
<v Speaker 6>the file system, off of the message queue, off of

1031
01:00:02.800 --> 01:00:06.320
<v Speaker 6>you know, something that I presume as trusted because it's

1032
01:00:06.320 --> 01:00:08.639
<v Speaker 6>our I don't know, internal thing, it's an internal service.

1033
01:00:09.079 --> 01:00:13.760
<v Speaker 6>That is where things also, you know, break apart. Why

1034
01:00:13.960 --> 01:00:18.280
<v Speaker 6>the same thing because that data flowed in my file

1035
01:00:18.400 --> 01:00:21.199
<v Speaker 6>name flowed into the system, and you could have typed

1036
01:00:21.199 --> 01:00:23.440
<v Speaker 6>it and said okay, it's supposed to be a string,

1037
01:00:23.480 --> 01:00:25.239
<v Speaker 6>and you saved it as like an image that you

1038
01:00:25.280 --> 01:00:30.559
<v Speaker 6>will manipulate later and find like it. There's no sco injection.

1039
01:00:30.719 --> 01:00:32.880
<v Speaker 6>When you save the file name, whatever you put it,

1040
01:00:33.000 --> 01:00:35.840
<v Speaker 6>you put it in the database. You also created a

1041
01:00:35.920 --> 01:00:38.760
<v Speaker 6>queue on You started the que with the event over there,

1042
01:00:39.320 --> 01:00:41.800
<v Speaker 6>and that system gets it and does something with it.

1043
01:00:41.840 --> 01:00:45.039
<v Speaker 6>Imagine that's like a worker and asking worker offline. Worker

1044
01:00:45.079 --> 01:00:47.280
<v Speaker 6>that takes that data and now it's it needs to

1045
01:00:47.360 --> 01:00:49.679
<v Speaker 6>do something with your image, like manipulate it, like recize

1046
01:00:49.679 --> 01:00:51.960
<v Speaker 6>it or whatever. So maybe it goes off and does

1047
01:00:52.039 --> 01:00:54.400
<v Speaker 6>and does something like you know, an OS command to

1048
01:00:54.639 --> 01:00:57.400
<v Speaker 6>run something like image magic or something to convert it.

1049
01:00:57.599 --> 01:00:59.519
<v Speaker 6>Then it takes that file name and puts it on

1050
01:00:59.599 --> 01:01:02.599
<v Speaker 6>this and the moment it did that, it trusted the system.

1051
01:01:02.840 --> 01:01:05.320
<v Speaker 6>What if my file name is literally called they run

1052
01:01:05.440 --> 01:01:09.360
<v Speaker 6>that jpeg semicolon rmnus r F exact same problem.

1053
01:01:09.519 --> 01:01:10.960
<v Speaker 4>So it's still it's still a.

1054
01:01:10.960 --> 01:01:14.000
<v Speaker 6>String, but it's now in a different context abusing you.

1055
01:01:14.480 --> 01:01:18.599
<v Speaker 1>So I want to verify that I understand what you're saying.

1056
01:01:18.639 --> 01:01:25.519
<v Speaker 1>What you're saying is anytime code, anytime I put data

1057
01:01:25.639 --> 01:01:30.119
<v Speaker 1>outside the direct control of my own code to an extent,

1058
01:01:30.400 --> 01:01:35.760
<v Speaker 1>my ability to trust that data goes away. It's because

1059
01:01:35.800 --> 01:01:39.159
<v Speaker 1>if some other part of the system gets compromised, now

1060
01:01:39.280 --> 01:01:41.079
<v Speaker 1>I'm vulnerable to that compromise.

1061
01:01:42.239 --> 01:01:44.079
<v Speaker 6>There's just like a lot of a lot in play here,

1062
01:01:44.119 --> 01:01:46.639
<v Speaker 6>Like this isn't type juggling. This is I was just

1063
01:01:46.679 --> 01:01:51.000
<v Speaker 6>like specifically like going with a needle on what you

1064
01:01:51.039 --> 01:01:54.400
<v Speaker 6>said were like you were like very concerned and conscience

1065
01:01:54.599 --> 01:01:58.519
<v Speaker 6>on the transport like the htplay. But from saying it's

1066
01:01:58.559 --> 01:02:00.760
<v Speaker 6>more than that. So I mean the way you probably

1067
01:02:00.800 --> 01:02:03.639
<v Speaker 6>have done it better is you have like proper security

1068
01:02:03.639 --> 01:02:05.840
<v Speaker 6>controls and secure coding. So the way that you would

1069
01:02:06.199 --> 01:02:09.719
<v Speaker 6>do an OS command, like an operating system command, we

1070
01:02:09.920 --> 01:02:12.480
<v Speaker 6>just need to be in a more secure way and

1071
01:02:12.480 --> 01:02:16.400
<v Speaker 6>then whatever the data is, it wouldn't impact you. So

1072
01:02:16.440 --> 01:02:19.360
<v Speaker 6>there's like a bunch of things in play here. What

1073
01:02:19.400 --> 01:02:22.000
<v Speaker 6>you said is not incorrect. It's just like there's a

1074
01:02:22.000 --> 01:02:24.559
<v Speaker 6>complete answer. There's more than just one thing that needs

1075
01:02:24.559 --> 01:02:27.440
<v Speaker 6>to go and that is that's like that's related also

1076
01:02:27.480 --> 01:02:30.679
<v Speaker 6>to a lot of concept in security, like defense in depth,

1077
01:02:30.719 --> 01:02:33.199
<v Speaker 6>you have to like have several layers of defense and

1078
01:02:33.239 --> 01:02:36.480
<v Speaker 6>security controls and security measures, and for example, a lot

1079
01:02:36.519 --> 01:02:39.719
<v Speaker 6>of people think, hey, let's just sanitize all the data. Well,

1080
01:02:39.760 --> 01:02:42.199
<v Speaker 6>that doesn't that's not how you know, real world works.

1081
01:02:42.199 --> 01:02:44.519
<v Speaker 6>You don't really have to sanitize all the data. For example,

1082
01:02:44.800 --> 01:02:48.679
<v Speaker 6>when you put user input as like an image, you know,

1083
01:02:48.760 --> 01:02:51.760
<v Speaker 6>and a very bad like xtmil image tag, and you

1084
01:02:51.800 --> 01:02:54.360
<v Speaker 6>give it to react, it doesn't sanitize the data for you.

1085
01:02:54.719 --> 01:02:57.360
<v Speaker 6>It does something else that's called output encoding. It converts

1086
01:02:57.400 --> 01:03:00.119
<v Speaker 6>the data into xtamil entities. That's a whole different and

1087
01:03:00.199 --> 01:03:03.280
<v Speaker 6>concept from sanitizing the data. The data remains the same,

1088
01:03:03.599 --> 01:03:06.000
<v Speaker 6>but the way that it gets interpreted on the dome,

1089
01:03:06.079 --> 01:03:09.679
<v Speaker 6>the way it's sweetened to it changes. It's not sanitization

1090
01:03:09.840 --> 01:03:12.199
<v Speaker 6>because the source of the data remains the same.

1091
01:03:12.400 --> 01:03:15.119
<v Speaker 1>Do want to move on because we're starting to run

1092
01:03:15.119 --> 01:03:18.320
<v Speaker 1>out of time. I do want to touch on the

1093
01:03:19.239 --> 01:03:20.920
<v Speaker 1>type cards and on those.

1094
01:03:20.760 --> 01:03:23.079
<v Speaker 6>Dog let's talk about zod okay. I have nothing else

1095
01:03:23.079 --> 01:03:25.480
<v Speaker 6>on type pards like this is I was curious about

1096
01:03:25.519 --> 01:03:27.719
<v Speaker 6>your opinion. I, by the way, resonate the same. I

1097
01:03:28.559 --> 01:03:30.440
<v Speaker 6>love the duct taping, but I just feel that it's

1098
01:03:30.440 --> 01:03:32.360
<v Speaker 6>like it's really hard to maintain a lot of type

1099
01:03:32.599 --> 01:03:35.239
<v Speaker 6>if type of and I can't like agree with that.

1100
01:03:35.519 --> 01:03:37.599
<v Speaker 1>And and By the way, type off is not enough

1101
01:03:37.639 --> 01:03:40.760
<v Speaker 1>because type off is like a very rough knowledge.

1102
01:03:41.159 --> 01:03:44.519
<v Speaker 4>It's a snedgehammer. You need. Probably you need instance off.

1103
01:03:44.400 --> 01:03:47.559
<v Speaker 1>As well, and from what I know, like half the

1104
01:03:47.719 --> 01:03:50.840
<v Speaker 1>JavaScript developers at least don't really understand how instance off

1105
01:03:50.880 --> 01:03:55.719
<v Speaker 1>actually works. But putting that aside, that's a different discussion.

1106
01:03:55.760 --> 01:03:56.760
<v Speaker 1>Let's talk about zode.

1107
01:03:56.880 --> 01:03:59.000
<v Speaker 6>Amazing, Let's talk about zode.

1108
01:04:01.920 --> 01:04:04.440
<v Speaker 5>It's one of my faves, and I talk about this

1109
01:04:05.159 --> 01:04:09.199
<v Speaker 5>quite often, so for the listeners that don't know ZOD.

1110
01:04:09.760 --> 01:04:13.239
<v Speaker 5>ZOD is a very cool way to kind of bridge

1111
01:04:13.320 --> 01:04:17.199
<v Speaker 5>between the development time and the run time. So it's

1112
01:04:17.280 --> 01:04:20.480
<v Speaker 5>kind of a bridge between typescript and jobscript. So it's

1113
01:04:20.480 --> 01:04:25.719
<v Speaker 5>basically a schema validation library that is what's called typescript first.

1114
01:04:26.199 --> 01:04:29.599
<v Speaker 5>So the idea is that you define a run time schema,

1115
01:04:29.679 --> 01:04:33.239
<v Speaker 5>so you're defining a schema that would check the object

1116
01:04:33.480 --> 01:04:37.519
<v Speaker 5>in run time, and ZOD exposes a method called infer

1117
01:04:37.880 --> 01:04:41.000
<v Speaker 5>which allows you to create a type out of your

1118
01:04:41.159 --> 01:04:44.559
<v Speaker 5>run time validation. So basically you kind of have a

1119
01:04:44.960 --> 01:04:49.719
<v Speaker 5>single source of truth primarily define your run time validation,

1120
01:04:50.400 --> 01:04:53.079
<v Speaker 5>and you also get the type inferred out of it.

1121
01:04:54.239 --> 01:04:56.760
<v Speaker 5>The reason why SOD is called typescript. First, it's kind

1122
01:04:56.760 --> 01:04:59.039
<v Speaker 5>of because it's kind of leading in the industry in

1123
01:04:59.159 --> 01:05:03.239
<v Speaker 5>terms of how handling more complex types, so beyond the

1124
01:05:03.280 --> 01:05:07.239
<v Speaker 5>basic adjacent ZOD is very good at inferring union types

1125
01:05:07.280 --> 01:05:08.719
<v Speaker 5>and et cetera.

1126
01:05:10.199 --> 01:05:13.920
<v Speaker 1>But also not familiar with ZOD, but maybe familiar with React.

1127
01:05:14.559 --> 01:05:17.880
<v Speaker 1>ZOD in a certain to extent is kind of reminiscent

1128
01:05:18.039 --> 01:05:20.480
<v Speaker 1>of the prop types that we used to have in

1129
01:05:20.480 --> 01:05:25.480
<v Speaker 1>in in React that that also did run time type

1130
01:05:25.519 --> 01:05:29.199
<v Speaker 1>validation when you were running in developed in development mode.

1131
01:05:29.559 --> 01:05:32.320
<v Speaker 1>So it's not exactly the same, but there were a

1132
01:05:32.400 --> 01:05:34.639
<v Speaker 1>lot of similarities in the way in which it's kind

1133
01:05:34.639 --> 01:05:35.079
<v Speaker 1>of written.

1134
01:05:35.280 --> 01:05:37.559
<v Speaker 5>You mean that did infer that the typescript from the

1135
01:05:37.639 --> 01:05:38.000
<v Speaker 5>right time.

1136
01:05:38.639 --> 01:05:41.880
<v Speaker 1>No, No, not that, I'm talking about how you literally

1137
01:05:42.880 --> 01:05:50.119
<v Speaker 1>write the ZOD run schemaema. You used to do the same.

1138
01:05:50.280 --> 01:05:53.760
<v Speaker 1>You have this kind of schema definition language that gets

1139
01:05:54.280 --> 01:05:57.719
<v Speaker 1>executed at run time, and you kind of had a

1140
01:05:57.760 --> 01:06:03.360
<v Speaker 1>similar thing with the now precated React prop types that

1141
01:06:03.440 --> 01:06:08.800
<v Speaker 1>you used to put on on React class components in

1142
01:06:08.920 --> 01:06:12.400
<v Speaker 1>order to specify before we had typescript, we used to

1143
01:06:12.480 --> 01:06:15.880
<v Speaker 1>use that to specify the types and it would actually

1144
01:06:16.119 --> 01:06:20.119
<v Speaker 1>get checked at run time rather than a bill time,

1145
01:06:20.159 --> 01:06:23.000
<v Speaker 1>because there was necessarily an actual bill time to test

1146
01:06:23.039 --> 01:06:27.599
<v Speaker 1>it in, but it would only be tested in developer mode,

1147
01:06:27.639 --> 01:06:28.840
<v Speaker 1>in development mode.

1148
01:06:28.559 --> 01:06:31.400
<v Speaker 6>Not in So what's the issue with D you're wondering?

1149
01:06:32.960 --> 01:06:36.440
<v Speaker 1>No, First of all, I hope everybody is clear. Ah,

1150
01:06:38.280 --> 01:06:41.760
<v Speaker 1>Steve was Ariel's explanation. It seemed to me it was

1151
01:06:41.760 --> 01:06:44.039
<v Speaker 1>an excellent explanation. But I was wondering if you have

1152
01:06:44.039 --> 01:06:45.079
<v Speaker 1>any questions about that?

1153
01:06:45.199 --> 01:06:46.880
<v Speaker 4>Okay, it was excellent.

1154
01:06:50.039 --> 01:06:53.159
<v Speaker 1>So basically what it means, though, is that by adding

1155
01:06:53.239 --> 01:06:56.679
<v Speaker 1>in ZOD we can do run time type checking. We

1156
01:06:56.719 --> 01:06:59.960
<v Speaker 1>can say that what I'm getting over the wire supposed

1157
01:06:59.960 --> 01:07:04.320
<v Speaker 1>to have this exact structure. It gets checked at run time.

1158
01:07:04.400 --> 01:07:07.039
<v Speaker 1>If it passes, then great. If it fails, we get

1159
01:07:07.039 --> 01:07:07.599
<v Speaker 1>an exception.

1160
01:07:08.519 --> 01:07:11.360
<v Speaker 5>Excellent, you can handle it. You can choose whether you

1161
01:07:11.480 --> 01:07:13.039
<v Speaker 5>raise an exception or I love.

1162
01:07:12.920 --> 01:07:16.519
<v Speaker 6>That you use the structure because it's a good segue.

1163
01:07:17.280 --> 01:07:20.519
<v Speaker 4>Yeah. So given that problem solved, no.

1164
01:07:21.760 --> 01:07:26.519
<v Speaker 6>Yeah, almost, yes or no, kind of It depends which

1165
01:07:26.519 --> 01:07:30.119
<v Speaker 6>problems are solved. So here's the thing. Now, let's forget

1166
01:07:29.760 --> 01:07:34.239
<v Speaker 6>that the site you do use. Imagine you're using something

1167
01:07:34.639 --> 01:07:38.559
<v Speaker 6>like your use case, being like there's a notification system

1168
01:07:38.639 --> 01:07:40.840
<v Speaker 6>and you have to update a bunch of stuff related

1169
01:07:40.840 --> 01:07:43.760
<v Speaker 6>to like a notification systems or it's like notification type

1170
01:07:43.840 --> 01:07:47.159
<v Speaker 6>and mode and you know the value of it and whatever,

1171
01:07:47.239 --> 01:07:49.599
<v Speaker 6>like an email daily and is it disabled or enable?

1172
01:07:49.639 --> 01:07:51.599
<v Speaker 6>Just like a bunch of stuff. That's an object that

1173
01:07:51.599 --> 01:07:55.119
<v Speaker 6>flows into the system. Your API on you know, on

1174
01:07:55.320 --> 01:07:58.800
<v Speaker 6>this server side uses ODD it says, okay, my notification

1175
01:07:58.920 --> 01:08:01.360
<v Speaker 6>schema is is an object that is made up of

1176
01:08:01.480 --> 01:08:03.920
<v Speaker 6>notification type, which is supposed to be, like you said,

1177
01:08:03.960 --> 01:08:07.199
<v Speaker 6>done a structure of a string. So that's fine, that's

1178
01:08:07.199 --> 01:08:08.840
<v Speaker 6>a string, and the mode is a string, and everything

1179
01:08:08.840 --> 01:08:11.400
<v Speaker 6>else is maybe a string or a poollyon it depends.

1180
01:08:12.119 --> 01:08:14.960
<v Speaker 6>So far, so good. And if I try to send

1181
01:08:15.000 --> 01:08:18.439
<v Speaker 6>you something like to try to like do type juggling

1182
01:08:18.439 --> 01:08:21.920
<v Speaker 6>and send you an array in the notification type so

1183
01:08:22.000 --> 01:08:23.920
<v Speaker 6>it's not just email as a string, but you know,

1184
01:08:23.960 --> 01:08:25.800
<v Speaker 6>I don't know email and something else as an array,

1185
01:08:26.079 --> 01:08:28.439
<v Speaker 6>it will get rejected and you think you've kind of

1186
01:08:28.479 --> 01:08:32.079
<v Speaker 6>like solved the problem, except there are more sort of

1187
01:08:32.159 --> 01:08:37.199
<v Speaker 6>vulnerabilities that can flow in indeed not directly related to ZOD,

1188
01:08:37.239 --> 01:08:40.199
<v Speaker 6>but just that using ZOD is potentially a policy that

1189
01:08:40.239 --> 01:08:43.439
<v Speaker 6>wouldn't save you from it. So my use case for

1190
01:08:43.479 --> 01:08:47.279
<v Speaker 6>that is imagine that now I'm sending in a string,

1191
01:08:47.720 --> 01:08:52.079
<v Speaker 6>but that string for notification type is underscore underscore proto

1192
01:08:52.199 --> 01:08:54.560
<v Speaker 6>underscore underscore. I won't do the whole underscore again, but

1193
01:08:54.680 --> 01:08:56.720
<v Speaker 6>just know that when I say proto, that's what I mean.

1194
01:08:57.079 --> 01:08:59.159
<v Speaker 6>And my notification mode is going to be a string

1195
01:08:59.239 --> 01:09:03.359
<v Speaker 6>also now as adamin identification mode value is going to

1196
01:09:03.359 --> 01:09:06.479
<v Speaker 6>be true. Okay, so I'm giving you all of those strings.

1197
01:09:06.960 --> 01:09:11.840
<v Speaker 6>ZODD has no issues and it works towards your defined schema.

1198
01:09:12.000 --> 01:09:14.000
<v Speaker 6>Of all of them have to be strings, so it

1199
01:09:14.079 --> 01:09:17.119
<v Speaker 6>flows in. But if all of them you have a

1200
01:09:17.199 --> 01:09:20.199
<v Speaker 6>question there no, okay. So if all of them flow

1201
01:09:20.279 --> 01:09:24.640
<v Speaker 6>into the app itself and the application does something one

1202
01:09:24.680 --> 01:09:29.159
<v Speaker 6>of two things with the data incorrectly in an insecure manner,

1203
01:09:29.399 --> 01:09:31.840
<v Speaker 6>then you now have a prototype pollution vulnerability.

1204
01:09:32.199 --> 01:09:35.800
<v Speaker 1>Basically, if you're using that field as a key on

1205
01:09:35.960 --> 01:09:41.520
<v Speaker 1>an object and you're now accessing that object's prototype instead

1206
01:09:41.640 --> 01:09:43.600
<v Speaker 1>of one of the fields on the object.

1207
01:09:43.880 --> 01:09:47.319
<v Speaker 6>Correct, that is one, so you could insecurely use it

1208
01:09:47.359 --> 01:09:53.159
<v Speaker 6>directly with what is not a literal string. But actually, and.

1209
01:09:53.079 --> 01:09:56.079
<v Speaker 1>You know what the lesson is, don't use JavaScript object

1210
01:09:56.119 --> 01:09:57.119
<v Speaker 1>as dictionaries.

1211
01:09:57.239 --> 01:09:58.239
<v Speaker 4>Use the map instead.

1212
01:09:58.520 --> 01:10:01.399
<v Speaker 6>There we go. But there's another way where it can

1213
01:10:01.960 --> 01:10:04.279
<v Speaker 6>it can bite you, which is if you don't do that,

1214
01:10:04.640 --> 01:10:08.239
<v Speaker 6>but instead you do something like let's say you work

1215
01:10:08.319 --> 01:10:11.680
<v Speaker 6>with a nasted data structure. Imagine like address, and then

1216
01:10:11.720 --> 01:10:14.520
<v Speaker 6>there's like a business address and office address, and maybe

1217
01:10:14.520 --> 01:10:17.680
<v Speaker 6>there's like nested data structures there. And sometimes what people

1218
01:10:17.760 --> 01:10:21.079
<v Speaker 6>do is recursive Jason parts the data and set it

1219
01:10:21.159 --> 01:10:23.359
<v Speaker 6>like that if you do so. Actually, that is the

1220
01:10:23.399 --> 01:10:27.600
<v Speaker 6>canonical example of prototype pollution vulnerabilities. So many, many, many,

1221
01:10:27.640 --> 01:10:31.159
<v Speaker 6>many libraries, like Lowdash, like object path, like so many

1222
01:10:31.239 --> 01:10:35.680
<v Speaker 6>others that's been used like prototype pollution has been found

1223
01:10:36.560 --> 01:10:40.720
<v Speaker 6>to be impacting many kinds of vulnerability of libraries in

1224
01:10:40.800 --> 01:10:44.079
<v Speaker 6>different ways, but they all basically do the exact same

1225
01:10:44.159 --> 01:10:47.880
<v Speaker 6>insecure issue, which is an insecure way of doing a

1226
01:10:47.920 --> 01:10:50.920
<v Speaker 6>recursive Jason merge. And if you do that and you're

1227
01:10:50.920 --> 01:10:54.159
<v Speaker 6>not aware of prototype pollution, then that can crawl in.

1228
01:10:54.399 --> 01:10:57.600
<v Speaker 6>And then again, using ZA doesn't help you unless you

1229
01:10:57.680 --> 01:11:01.319
<v Speaker 6>do something else, which is using ring literals in ZOD,

1230
01:11:01.399 --> 01:11:04.359
<v Speaker 6>but that's not always possible, not always. That data is

1231
01:11:04.399 --> 01:11:07.760
<v Speaker 6>hardly typed in advance, like type email or type digest.

1232
01:11:07.760 --> 01:11:10.720
<v Speaker 6>Maybe your user data is user name or an address

1233
01:11:10.800 --> 01:11:13.600
<v Speaker 6>or something like that and you can't confine it to

1234
01:11:13.640 --> 01:11:14.600
<v Speaker 6>a literal schema.

1235
01:11:16.800 --> 01:11:17.039
<v Speaker 4>Fat.

1236
01:11:18.199 --> 01:11:20.960
<v Speaker 6>Oh my god, we did not open that door. That's

1237
01:11:20.960 --> 01:11:21.680
<v Speaker 6>a different topic.

1238
01:11:22.359 --> 01:11:28.920
<v Speaker 1>The fact the fact that typeescript can you in certain situations,

1239
01:11:28.960 --> 01:11:31.840
<v Speaker 1>like everybody goes to evail, but evail is like the

1240
01:11:31.920 --> 01:11:36.399
<v Speaker 1>extreme situation. But the fact that even without evil, typescript

1241
01:11:36.439 --> 01:11:42.640
<v Speaker 1>can sometimes consider strings as code can introduce certain vulnerabilities

1242
01:11:42.840 --> 01:11:46.000
<v Speaker 1>because just looking at the type of the thing is

1243
01:11:46.039 --> 01:11:47.680
<v Speaker 1>not sufficient, is what you're saying.

1244
01:11:47.960 --> 01:11:49.000
<v Speaker 4>Do I understand? Correct?

1245
01:11:49.279 --> 01:11:53.079
<v Speaker 6>Correct, It's it's not I mean, yeah, it's not sufficient

1246
01:11:53.119 --> 01:11:56.000
<v Speaker 6>because this vulnerability can impact you. And there's another actually

1247
01:11:56.039 --> 01:11:58.159
<v Speaker 6>issue with ZOD, so I don't know if you know

1248
01:11:58.359 --> 01:12:01.800
<v Speaker 6>you knew this. Another one that's related to a mass

1249
01:12:01.840 --> 01:12:05.399
<v Speaker 6>assignment vulnerability that would happen with God is if you

1250
01:12:05.439 --> 01:12:08.039
<v Speaker 6>define a schema and let's say my schema is like

1251
01:12:08.119 --> 01:12:12.159
<v Speaker 6>my name and my email, and that's what you define

1252
01:12:12.159 --> 01:12:13.640
<v Speaker 6>and that's what I send in and you do, like

1253
01:12:13.680 --> 01:12:15.920
<v Speaker 6>you know, ZOD, you know schema safe parts and all

1254
01:12:15.920 --> 01:12:17.800
<v Speaker 6>of this thing, and it doesn't throw it's all success

1255
01:12:17.800 --> 01:12:20.439
<v Speaker 6>blah blah blah. You push it down the wire to

1256
01:12:20.479 --> 01:12:23.800
<v Speaker 6>your services and repository pattern and you normally do like

1257
01:12:23.840 --> 01:12:26.880
<v Speaker 6>you know, user dot save and that user data comes

1258
01:12:26.920 --> 01:12:29.800
<v Speaker 6>from the request because you already invalidated it with the schema,

1259
01:12:30.239 --> 01:12:33.279
<v Speaker 6>and so that gets persistent on the database. That's a

1260
01:12:33.399 --> 01:12:37.880
<v Speaker 6>very common pattern also with ORMs. But if I send

1261
01:12:38.079 --> 01:12:42.640
<v Speaker 6>another string with the data in the schema, like is

1262
01:12:42.720 --> 01:12:47.600
<v Speaker 6>admin or role equals admin, that will also satisfy ZOD

1263
01:12:47.920 --> 01:12:51.880
<v Speaker 6>because by default it doesn't have any issue with data

1264
01:12:51.920 --> 01:12:53.960
<v Speaker 6>that is not on the schema. So if I add

1265
01:12:54.000 --> 01:12:57.760
<v Speaker 6>fifty fields and your schema has two fields, your schema

1266
01:12:57.840 --> 01:13:00.920
<v Speaker 6>parsing will still say that it's valid. Schema okay, And

1267
01:13:00.960 --> 01:13:02.479
<v Speaker 6>that's that the ending.

1268
01:13:02.239 --> 01:13:05.239
<v Speaker 1>Of JavaScript objects are open by.

1269
01:13:05.159 --> 01:13:08.439
<v Speaker 6>Default because well because you haven't used I mean, the

1270
01:13:08.479 --> 01:13:11.039
<v Speaker 6>correct pattern would be to create a new object or

1271
01:13:11.079 --> 01:13:13.079
<v Speaker 6>like you said, like map it to a new object

1272
01:13:13.319 --> 01:13:15.920
<v Speaker 6>that takes fields one by one that you trust. But

1273
01:13:15.960 --> 01:13:18.520
<v Speaker 6>if you just take you know, user equals request by

1274
01:13:18.600 --> 01:13:21.560
<v Speaker 6>the user you say I validated it, it's fine. But

1275
01:13:21.600 --> 01:13:23.880
<v Speaker 6>then you pass that user from the from their request

1276
01:13:23.920 --> 01:13:26.560
<v Speaker 6>which comes from the user input, and pass it all around,

1277
01:13:26.800 --> 01:13:30.119
<v Speaker 6>you have again that fallacy as if that schema was

1278
01:13:30.319 --> 01:13:31.600
<v Speaker 6>checking it and it's valid.

1279
01:13:31.399 --> 01:13:33.720
<v Speaker 5>Well you can you can strict par it.

1280
01:13:34.159 --> 01:13:37.640
<v Speaker 1>Yeah, it doesn't has the ability to say only these

1281
01:13:37.680 --> 01:13:38.680
<v Speaker 1>fields and no more.

1282
01:13:39.079 --> 01:13:41.800
<v Speaker 5>I think it does. It's called strict mode. It's strict

1283
01:13:42.600 --> 01:13:45.920
<v Speaker 5>parsing and by default. But when ZOE just started it

1284
01:13:45.960 --> 01:13:48.319
<v Speaker 5>was actually the other way around. So the default was

1285
01:13:48.399 --> 01:13:51.560
<v Speaker 5>too strict parts and obviously it's not that comfortable for

1286
01:13:51.680 --> 01:13:55.159
<v Speaker 5>many use cases, so they change the default behavior. But

1287
01:13:55.359 --> 01:13:57.800
<v Speaker 5>I think that ran like what we really want to

1288
01:13:57.920 --> 01:14:01.079
<v Speaker 5>bring out here for the listeners is that even if

1289
01:14:01.119 --> 01:14:06.840
<v Speaker 5>you're using ZOD, try to consider understand that if you're

1290
01:14:06.880 --> 01:14:10.319
<v Speaker 5>not strict parsing, it could be larger, and that there

1291
01:14:10.359 --> 01:14:13.119
<v Speaker 5>is the ability to strict pars it, and we need

1292
01:14:13.359 --> 01:14:15.760
<v Speaker 5>to wisely choose it when it's needed.

1293
01:14:16.199 --> 01:14:19.159
<v Speaker 6>Exactly, it's just not the default. And when you don't

1294
01:14:19.159 --> 01:14:21.920
<v Speaker 6>have defaults, you're going to have adopters who use the

1295
01:14:22.000 --> 01:14:25.399
<v Speaker 6>system by the reading or whatever in an insecure way

1296
01:14:25.439 --> 01:14:27.000
<v Speaker 6>by default. That's not what you want to do.

1297
01:14:27.279 --> 01:14:32.600
<v Speaker 1>And then somebody does Jason stringify or two string or whatever,

1298
01:14:32.720 --> 01:14:35.399
<v Speaker 1>and they get something that's different than what they expected.

1299
01:14:35.800 --> 01:14:40.279
<v Speaker 1>Correct understood. We're starting to run really short on time.

1300
01:14:40.439 --> 01:14:43.119
<v Speaker 1>Is there anything else especially that we want to touch

1301
01:14:43.159 --> 01:14:45.279
<v Speaker 1>on that we haven't talked about so far.

1302
01:14:45.439 --> 01:14:47.720
<v Speaker 6>We're going to do rejects next time, right, Reel.

1303
01:14:48.800 --> 01:14:50.479
<v Speaker 1>I would love to have you on again to talk

1304
01:14:50.520 --> 01:14:53.439
<v Speaker 1>about redis everybody's favorite topics.

1305
01:14:53.840 --> 01:14:57.319
<v Speaker 5>Recently I've been writing, I've been developing only parsers, so

1306
01:14:57.760 --> 01:15:00.359
<v Speaker 5>I've a vote. Like I started off my EXPERI as

1307
01:15:00.399 --> 01:15:03.399
<v Speaker 5>a Cobal developer and the Army, and then i moved

1308
01:15:03.439 --> 01:15:06.760
<v Speaker 5>to web development, so react and now I'm doing backhand,

1309
01:15:06.800 --> 01:15:10.920
<v Speaker 5>so it's pipe and now that's it. I'm a Regicks developer.

1310
01:15:11.279 --> 01:15:13.319
<v Speaker 5>Like the next level is pure energy.

1311
01:15:14.279 --> 01:15:18.319
<v Speaker 6>Your pyramid right now looking.

1312
01:15:18.079 --> 01:15:21.560
<v Speaker 1>Down with all of you lots, you're actually one of

1313
01:15:21.600 --> 01:15:25.279
<v Speaker 1>my picks will have to do with parsing, but we'll

1314
01:15:25.279 --> 01:15:31.760
<v Speaker 1>get there. So so before we finish and we go

1315
01:15:31.840 --> 01:15:34.960
<v Speaker 1>to picks, if anybody wants to get in touch with you,

1316
01:15:35.079 --> 01:15:37.399
<v Speaker 1>what would be the best way, especially you are, Reel

1317
01:15:37.439 --> 01:15:40.600
<v Speaker 1>as you are have like no presence on the interwebs.

1318
01:15:41.760 --> 01:15:42.600
<v Speaker 5>I have LinkedIn.

1319
01:15:44.000 --> 01:15:50.199
<v Speaker 1>Oh yeah, everybody's favorite social network, the social net to die.

1320
01:15:51.880 --> 01:15:54.840
<v Speaker 5>I'm protecting my soul for now, so no X. Yes,

1321
01:15:55.000 --> 01:15:58.119
<v Speaker 5>but you can reach me on LinkedIn and I'm very

1322
01:15:58.880 --> 01:16:00.359
<v Speaker 5>polite and I will answer you all.

1323
01:16:01.840 --> 01:16:04.039
<v Speaker 1>So it's Aariel Schulman on LinkedIn?

1324
01:16:04.640 --> 01:16:10.239
<v Speaker 4>Yes, are you the only? Ariel Shulman on LinkedIn, and I'm.

1325
01:16:10.000 --> 01:16:13.800
<v Speaker 5>The how many girls are there with the profile picture

1326
01:16:13.880 --> 01:16:16.560
<v Speaker 5>of them on a stage called Aeriel Shulman on LinkedIn.

1327
01:16:16.640 --> 01:16:18.159
<v Speaker 5>Let's let's research this thing.

1328
01:16:18.399 --> 01:16:20.359
<v Speaker 1>Okay, cool?

1329
01:16:20.439 --> 01:16:20.720
<v Speaker 4>Cool.

1330
01:16:20.920 --> 01:16:25.079
<v Speaker 1>That's another thing about both of you that your conference speakers,

1331
01:16:25.119 --> 01:16:28.079
<v Speaker 1>and that also goes to one of the picks that

1332
01:16:28.079 --> 01:16:31.920
<v Speaker 1>I'll have today. But anyway, and how about Julian. If

1333
01:16:31.920 --> 01:16:35.439
<v Speaker 1>anybody wants to contact you, what's the best way For.

1334
01:16:35.520 --> 01:16:38.000
<v Speaker 6>People outside of Israel? You can just google le Rantel

1335
01:16:38.000 --> 01:16:40.600
<v Speaker 6>and you'll find me on x or whatever. Inside Israel,

1336
01:16:40.600 --> 01:16:46.640
<v Speaker 6>there is a famous famous Israeli singer called me Randal.

1337
01:16:46.920 --> 01:16:50.680
<v Speaker 6>That's not me, it's a very it's it's a very

1338
01:16:51.840 --> 01:16:55.640
<v Speaker 6>crude music style here. So I don't know. I won't

1339
01:16:55.640 --> 01:16:56.439
<v Speaker 6>ope any more than that.

1340
01:16:56.600 --> 01:17:02.279
<v Speaker 1>Cool cool, Okay, let's uh, let's move on to pics then, ah,

1341
01:17:02.560 --> 01:17:04.479
<v Speaker 1>do you want to start us off with picks?

1342
01:17:04.560 --> 01:17:11.239
<v Speaker 2>So I went through the Proxmocks Advanced training with Wihui,

1343
01:17:11.399 --> 01:17:14.560
<v Speaker 2>which is the Canadian company that does the training. And

1344
01:17:15.119 --> 01:17:19.680
<v Speaker 2>not that I regularly do trainings, but it was the

1345
01:17:19.720 --> 01:17:24.680
<v Speaker 2>best training experience that I've ever had. Everything if you've

1346
01:17:24.720 --> 01:17:28.079
<v Speaker 2>ever done a workshop, you know the first part of

1347
01:17:28.119 --> 01:17:31.079
<v Speaker 2>the workshop, because this training had both educational material and

1348
01:17:31.159 --> 01:17:35.199
<v Speaker 2>labs and whatnot that like everything just worked. There was

1349
01:17:35.319 --> 01:17:38.399
<v Speaker 2>there was no there was nothing that didn't work except

1350
01:17:38.439 --> 01:17:43.439
<v Speaker 2>for things that were common user error that were part

1351
01:17:43.479 --> 01:17:46.039
<v Speaker 2>of what was going to be covered in the material anyway,

1352
01:17:47.279 --> 01:17:51.520
<v Speaker 2>and I just thought that that was really really great.

1353
01:17:52.000 --> 01:17:56.039
<v Speaker 2>So I am myself working on some proxmox material, which

1354
01:17:56.079 --> 01:17:58.600
<v Speaker 2>is why I part of the well. I took the

1355
01:17:58.680 --> 01:18:04.039
<v Speaker 2>training primarily to become proxmox certified, but also because I

1356
01:18:04.199 --> 01:18:05.520
<v Speaker 2>you know, I wanted to learn, and I wanted the

1357
01:18:05.520 --> 01:18:08.039
<v Speaker 2>material that I create to match the same quality that

1358
01:18:08.079 --> 01:18:12.960
<v Speaker 2>you get from the official training, and hopefully even I'd

1359
01:18:13.000 --> 01:18:14.640
<v Speaker 2>like to be on the path to become an official

1360
01:18:15.079 --> 01:18:20.560
<v Speaker 2>trainer with Proxmox. But anyway, uh, if you if you

1361
01:18:21.520 --> 01:18:24.600
<v Speaker 2>want to have the official Proxmox training, the wee Hui

1362
01:18:24.800 --> 01:18:27.960
<v Speaker 2>is probably a better bet from from some of the

1363
01:18:27.960 --> 01:18:30.840
<v Speaker 2>things I came to understand then even getting it from

1364
01:18:30.840 --> 01:18:34.880
<v Speaker 2>Proxmox themselves, just in terms of the way that that

1365
01:18:35.279 --> 01:18:38.640
<v Speaker 2>we Hui's business works and how that drove them to

1366
01:18:38.640 --> 01:18:41.000
<v Speaker 2>create the course content because there's a lot of leeway

1367
01:18:41.039 --> 01:18:44.399
<v Speaker 2>and how to present it. So anyway, and for people

1368
01:18:44.399 --> 01:18:45.960
<v Speaker 2>that don't know proxmox is.

1369
01:18:47.680 --> 01:18:48.720
<v Speaker 4>It's for co.

1370
01:18:48.760 --> 01:18:52.359
<v Speaker 2>Location or for on prem So if you want to

1371
01:18:52.359 --> 01:18:55.359
<v Speaker 2>save a ton of money, then you can. You can

1372
01:18:55.439 --> 01:18:57.880
<v Speaker 2>use proxmox and have you know, as many nines as

1373
01:18:57.880 --> 01:19:03.039
<v Speaker 2>you want up time without without having a cloud bill

1374
01:19:03.119 --> 01:19:05.000
<v Speaker 2>that costs you the same amount per month that it

1375
01:19:05.000 --> 01:19:07.039
<v Speaker 2>would cost to by the servers out right. And that's

1376
01:19:07.119 --> 01:19:10.000
<v Speaker 2>that's all. That's all I got. That's that's my that's

1377
01:19:10.039 --> 01:19:10.640
<v Speaker 2>that's my thing.

1378
01:19:12.760 --> 01:19:14.600
<v Speaker 1>See if I wonder what you want to tell us

1379
01:19:14.880 --> 01:19:16.960
<v Speaker 1>talk to us about today in your picks.

1380
01:19:18.239 --> 01:19:22.239
<v Speaker 3>Uh, let's see, Well, I suppose we could try something

1381
01:19:22.279 --> 01:19:23.319
<v Speaker 3>new like dad jokes.

1382
01:19:23.479 --> 01:19:25.760
<v Speaker 1>I love the one about the half brother by the way,

1383
01:19:25.800 --> 01:19:26.319
<v Speaker 1>the one that you.

1384
01:19:28.479 --> 01:19:30.960
<v Speaker 3>Yeah, that was good for those who aren't familiar with

1385
01:19:30.960 --> 01:19:34.239
<v Speaker 3>the one. It's a very short conversation tweening myself and

1386
01:19:34.239 --> 01:19:36.319
<v Speaker 3>our friend, and I said, I have a couple, I

1387
01:19:36.359 --> 01:19:39.319
<v Speaker 3>have a half brother, and he says different. Mother said,

1388
01:19:39.359 --> 01:19:44.960
<v Speaker 3>no shark attacks. But now I'll do some new ones

1389
01:19:45.000 --> 01:19:46.119
<v Speaker 3>this week.

1390
01:19:46.239 --> 01:19:47.680
<v Speaker 6>The question why.

1391
01:19:47.560 --> 01:19:52.560
<v Speaker 3>Shouldn't they dentist marry a manicurist because they'll fight nail

1392
01:19:52.720 --> 01:19:56.359
<v Speaker 3>well desert drums? What do you call what do you

1393
01:19:56.359 --> 01:19:59.880
<v Speaker 3>call cheese that isn't yours not.

1394
01:20:02.920 --> 01:20:03.880
<v Speaker 5>I knew that one.

1395
01:20:04.319 --> 01:20:06.520
<v Speaker 3>Yes, well, you should have jumped in and answered it.

1396
01:20:06.560 --> 01:20:07.640
<v Speaker 3>I would have taken an answer.

1397
01:20:08.199 --> 01:20:08.760
<v Speaker 2>I was on you.

1398
01:20:09.479 --> 01:20:10.039
<v Speaker 4>Oh okay.

1399
01:20:11.199 --> 01:20:13.960
<v Speaker 3>And then finally, this is just more of an observation

1400
01:20:14.079 --> 01:20:18.640
<v Speaker 3>that Bigfoot is sometimes confused with sasquatch, yet he never complains,

1401
01:20:18.800 --> 01:20:22.560
<v Speaker 3>you know, yedi y e t I yi. Anyway, those

1402
01:20:22.560 --> 01:20:23.119
<v Speaker 3>are the jokes.

1403
01:20:23.479 --> 01:20:25.600
<v Speaker 5>You can tell the jokes work because I was like

1404
01:20:26.239 --> 01:20:27.279
<v Speaker 5>grasping my hand.

1405
01:20:27.399 --> 01:20:30.439
<v Speaker 3>You know, it's more like it's usually the moan and

1406
01:20:30.479 --> 01:20:34.720
<v Speaker 3>oh my god, I can't believe he said, Dad, yes, yes,

1407
01:20:35.119 --> 01:20:37.119
<v Speaker 3>and when I said it. Sometimes I'll try to work

1408
01:20:37.159 --> 01:20:41.000
<v Speaker 3>those in as as you know, real stories, and my

1409
01:20:41.039 --> 01:20:43.079
<v Speaker 3>family has gotten wise to it after so many years.

1410
01:20:43.119 --> 01:20:45.039
<v Speaker 3>Their first thing out of the mouth, Dad, is this

1411
01:20:45.079 --> 01:20:45.399
<v Speaker 3>a joke?

1412
01:20:45.439 --> 01:20:46.159
<v Speaker 6>Are you serious?

1413
01:20:47.680 --> 01:20:50.520
<v Speaker 3>I just listen, okay, anyway.

1414
01:20:50.920 --> 01:20:53.880
<v Speaker 1>Okay, So now it's my turn, and I've not been

1415
01:20:54.000 --> 01:20:57.039
<v Speaker 1>on the show for a while. I've I've had various things,

1416
01:20:57.119 --> 01:20:59.760
<v Speaker 1>actually a lot of them fun things, but they've kept

1417
01:20:59.760 --> 01:21:02.600
<v Speaker 1>me away from the podcast recording. So I've got a

1418
01:21:02.640 --> 01:21:09.840
<v Speaker 1>bunch of picks that have accumulated. I'm hoping I'm making

1419
01:21:09.840 --> 01:21:11.800
<v Speaker 1>the right choice of using them all now and not

1420
01:21:11.960 --> 01:21:14.720
<v Speaker 1>saving some for next week, but we'll see. So anyway,

1421
01:21:14.960 --> 01:21:18.439
<v Speaker 1>one thing is I was doing this thing. It was

1422
01:21:18.760 --> 01:21:21.479
<v Speaker 1>really fun. You reminded me when you were talking about parsing.

1423
01:21:23.680 --> 01:21:27.279
<v Speaker 1>We had a certain idiom in again going back to

1424
01:21:27.439 --> 01:21:30.520
<v Speaker 1>existing legacy code. We had a certain idiom in the

1425
01:21:30.600 --> 01:21:37.199
<v Speaker 1>code which was bad performance wise, and I wanted to

1426
01:21:37.239 --> 01:21:39.239
<v Speaker 1>fix it. And it was really just, you know, a

1427
01:21:39.439 --> 01:21:44.399
<v Speaker 1>very localized rewriting of the code. Now, initially I thought

1428
01:21:44.399 --> 01:21:47.359
<v Speaker 1>about using some sort of regular expression and doing a

1429
01:21:47.399 --> 01:21:52.119
<v Speaker 1>global search and replaced across the entire project, but that

1430
01:21:52.119 --> 01:21:54.159
<v Speaker 1>that kind of turned out to be a bit messy

1431
01:21:55.600 --> 01:22:01.720
<v Speaker 1>and kind of what I But I'll get to that.

1432
01:22:02.520 --> 01:22:05.079
<v Speaker 1>The other thing was that I was worried that, you know,

1433
01:22:05.319 --> 01:22:08.159
<v Speaker 1>it fixes the situation as it currently is, but there's

1434
01:22:08.199 --> 01:22:12.239
<v Speaker 1>nothing preventing anybody from using that the same poor edium

1435
01:22:12.279 --> 01:22:15.239
<v Speaker 1>in the future. So I wanted to safeguard against that

1436
01:22:15.319 --> 01:22:17.119
<v Speaker 1>as well. So what I came up with in the

1437
01:22:17.199 --> 01:22:20.199
<v Speaker 1>end was a custom EA slint rule with a fixer,

1438
01:22:21.920 --> 01:22:25.800
<v Speaker 1>And so I actually had built an E slint rule

1439
01:22:25.840 --> 01:22:31.239
<v Speaker 1>that analyzed the ASD, identified that kind of localized bad idiom,

1440
01:22:31.760 --> 01:22:34.720
<v Speaker 1>and then had the fixer which actually fixed it to

1441
01:22:34.760 --> 01:22:39.319
<v Speaker 1>the correct code. And then I basically told the slint

1442
01:22:39.359 --> 01:22:43.920
<v Speaker 1>to fix that thing across the entire project, which fixed

1443
01:22:43.920 --> 01:22:47.640
<v Speaker 1>all existing occurrences. But now I also had it as

1444
01:22:47.680 --> 01:22:50.680
<v Speaker 1>a custom rule going forward, so if anybody ever uses

1445
01:22:50.800 --> 01:22:53.119
<v Speaker 1>that bad edium in the future, they will get it

1446
01:22:53.159 --> 01:22:56.840
<v Speaker 1>reads quickly and they can even you know, right click

1447
01:22:56.920 --> 01:22:59.600
<v Speaker 1>and request a fix and it will automatically fix that

1448
01:22:59.680 --> 01:23:02.640
<v Speaker 1>code for them. So it's a safeguard. It both fixed

1449
01:23:02.680 --> 01:23:05.479
<v Speaker 1>the existing problem and is a safeguard for the future.

1450
01:23:05.840 --> 01:23:07.359
<v Speaker 1>And it was a lot of fun to write and

1451
01:23:07.399 --> 01:23:11.399
<v Speaker 1>I really enjoyed it. So that was point number one.

1452
01:23:13.039 --> 01:23:19.079
<v Speaker 1>Point number two, there's a Last year, I actually did

1453
01:23:19.079 --> 01:23:24.520
<v Speaker 1>not participate in any conference, which was really depressing in

1454
01:23:24.560 --> 01:23:26.640
<v Speaker 1>a way because I'm kind of an extrovert and i

1455
01:23:26.760 --> 01:23:30.720
<v Speaker 1>like speaking at conferences. But this year I'm already speaking

1456
01:23:30.720 --> 01:23:32.880
<v Speaker 1>at three so I'm really happy about that.

1457
01:23:32.960 --> 01:23:33.279
<v Speaker 5>Yay.

1458
01:23:33.520 --> 01:23:33.840
<v Speaker 6>Nice.

1459
01:23:34.279 --> 01:23:39.239
<v Speaker 1>So so I'll be speaking at the JS Heroes conference

1460
01:23:39.520 --> 01:23:45.920
<v Speaker 1>in uh Coclues in Romania. Yeah, it's I think they've

1461
01:23:45.960 --> 01:23:48.680
<v Speaker 1>still got tickets. So if you're in Europe and you

1462
01:23:48.720 --> 01:23:52.479
<v Speaker 1>want to attend a really top notch JavaScript conference, and

1463
01:23:52.520 --> 01:23:54.920
<v Speaker 1>it's top notched despite the fact that I'm speaking there,

1464
01:23:55.279 --> 01:23:59.600
<v Speaker 1>it's because it's got some amazing speakers on the list.

1465
01:24:00.239 --> 01:24:03.760
<v Speaker 1>I highly recommend attending inclusions of Lovely City, although I've

1466
01:24:03.800 --> 01:24:05.680
<v Speaker 1>not been, but I've been told I've been to other

1467
01:24:05.720 --> 01:24:08.359
<v Speaker 1>parts of Romania they're also lovely. But I've been told

1468
01:24:08.359 --> 01:24:10.920
<v Speaker 1>that Clusures Lovely as well. I'm looking forward to it.

1469
01:24:11.479 --> 01:24:14.199
<v Speaker 1>So that's conference number one, and then in Tel Aviv,

1470
01:24:14.239 --> 01:24:17.159
<v Speaker 1>I'll be speaking both that react next and at No TLV,

1471
01:24:17.640 --> 01:24:19.199
<v Speaker 1>back to back, day after.

1472
01:24:19.039 --> 01:24:21.199
<v Speaker 5>Day, sharing the stage with us two.

1473
01:24:22.239 --> 01:24:25.119
<v Speaker 1>Yeah, both of you are speaking at both conferences.

1474
01:24:25.159 --> 01:24:27.840
<v Speaker 5>Just one of you this year. Last year I did

1475
01:24:28.359 --> 01:24:29.439
<v Speaker 5>never again good luck.

1476
01:24:32.680 --> 01:24:37.119
<v Speaker 1>Just so, just so you know that, like a couple

1477
01:24:37.119 --> 01:24:40.720
<v Speaker 1>of years back, I gave two talks at the same

1478
01:24:40.800 --> 01:24:42.600
<v Speaker 1>conference back to back.

1479
01:24:42.840 --> 01:24:43.520
<v Speaker 4>I wasn't.

1480
01:24:45.319 --> 01:24:45.680
<v Speaker 5>Isn't it?

1481
01:24:45.720 --> 01:24:46.520
<v Speaker 6>That's true?

1482
01:24:46.920 --> 01:24:48.279
<v Speaker 4>I yeah, kind of.

1483
01:24:48.359 --> 01:24:51.039
<v Speaker 1>But I spoke in one room, finished, wrapped up, went

1484
01:24:51.079 --> 01:24:51.760
<v Speaker 1>to another room.

1485
01:24:51.840 --> 01:24:56.359
<v Speaker 4>I gave another talk there, changed out. Yeah.

1486
01:24:56.600 --> 01:25:01.920
<v Speaker 1>No, anyway, and uh, the other pick that I wanted,

1487
01:25:01.960 --> 01:25:04.159
<v Speaker 1>My final pick is a really funny story.

1488
01:25:04.199 --> 01:25:06.359
<v Speaker 4>Did you hear that one about in the.

1489
01:25:06.520 --> 01:25:11.359
<v Speaker 1>New interview Interview Coder story?

1490
01:25:11.520 --> 01:25:12.960
<v Speaker 4>That's so funny?

1491
01:25:13.359 --> 01:25:21.279
<v Speaker 1>So yeah, yeah, So basically, these two well ex Columbia students,

1492
01:25:22.640 --> 01:25:24.199
<v Speaker 1>they were looking they were.

1493
01:25:24.239 --> 01:25:29.000
<v Speaker 4>They were like in the what's it called? They were?

1494
01:25:29.039 --> 01:25:32.000
<v Speaker 1>They were like in the They had the mind the

1495
01:25:32.119 --> 01:25:35.319
<v Speaker 1>entrepreneur mindset, and they were looking for an application to develop.

1496
01:25:35.840 --> 01:25:38.600
<v Speaker 1>So what they created is an application that allows you

1497
01:25:38.640 --> 01:25:43.479
<v Speaker 1>to cheat on lead code interviews. It basically, per my understanding,

1498
01:25:43.520 --> 01:25:47.159
<v Speaker 1>I've not ever tested it. I'm not interviewing. But anyway,

1499
01:25:47.640 --> 01:25:49.640
<v Speaker 1>what it does I understand that it does is that

1500
01:25:49.840 --> 01:25:53.520
<v Speaker 1>creates an invisible It's a local desktop application that you install.

1501
01:25:53.600 --> 01:25:59.479
<v Speaker 1>It creates this kind of invisible window, but but it's

1502
01:25:59.520 --> 01:26:03.319
<v Speaker 1>not reflected through Zoom or whatever you're using.

1503
01:26:04.039 --> 01:26:07.079
<v Speaker 4>And it shows you answers using AI.

1504
01:26:08.319 --> 01:26:10.880
<v Speaker 1>And and it shows you though in a sort of

1505
01:26:11.199 --> 01:26:14.079
<v Speaker 1>progressive way, so you kind of it seems like you're

1506
01:26:14.159 --> 01:26:16.960
<v Speaker 1>thinking about the answer and coming up with the answer

1507
01:26:17.640 --> 01:26:20.920
<v Speaker 1>as it goes along. And it also moves the windows

1508
01:26:21.199 --> 01:26:23.920
<v Speaker 1>around so that your eyes aren't always focused on the

1509
01:26:23.960 --> 01:26:26.279
<v Speaker 1>same point in the screen, and it does all sorts

1510
01:26:26.319 --> 01:26:31.000
<v Speaker 1>of magic. And then they use that program to interview

1511
01:26:31.199 --> 01:26:34.600
<v Speaker 1>for basically all the fang companies and got offers from

1512
01:26:34.640 --> 01:26:38.720
<v Speaker 1>all them. And then they after they got the offers,

1513
01:26:38.840 --> 01:26:41.960
<v Speaker 1>they advertised the story and showed the images of all

1514
01:26:42.000 --> 01:26:46.840
<v Speaker 1>the offers that they got and apparently somebody from Amazon

1515
01:26:47.000 --> 01:26:50.760
<v Speaker 1>got really really upset about it, contact Columbia and had

1516
01:26:50.800 --> 01:26:51.399
<v Speaker 1>them expelled.

1517
01:26:52.880 --> 01:26:54.239
<v Speaker 4>But I think they're amazing.

1518
01:26:54.319 --> 01:26:58.720
<v Speaker 5>Let's hire them now. I think they're jumps.

1519
01:26:59.119 --> 01:27:01.000
<v Speaker 4>Yeah, I think they're good for jobs.

1520
01:27:01.000 --> 01:27:04.720
<v Speaker 5>Now sounds like overqualified. I would even say.

1521
01:27:05.560 --> 01:27:08.920
<v Speaker 2>Yeah, that's that's There was something else like this that

1522
01:27:09.239 --> 01:27:11.399
<v Speaker 2>came out a couple of years ago. There was a

1523
01:27:11.600 --> 01:27:17.960
<v Speaker 2>United States state government website that put something I mean,

1524
01:27:17.960 --> 01:27:21.560
<v Speaker 2>it was ridiculous, like social Security numbers were rendered into

1525
01:27:21.640 --> 01:27:25.239
<v Speaker 2>the HTML for It's like they were rendering out their

1526
01:27:25.399 --> 01:27:28.199
<v Speaker 2>entire database into the HTML. So when you just search

1527
01:27:28.800 --> 01:27:31.600
<v Speaker 2>I was doing that way. It was something just absolutely

1528
01:27:31.720 --> 01:27:35.560
<v Speaker 2>ridiculously stupid. And then when the person points it out,

1529
01:27:35.680 --> 01:27:39.840
<v Speaker 2>then they they you know, trump up these charges of

1530
01:27:41.000 --> 01:27:44.640
<v Speaker 2>cybercrime and hacking. It's come on, you know, he right

1531
01:27:44.720 --> 01:27:49.000
<v Speaker 2>clicked inspect. So I think that that sounds so overblown

1532
01:27:49.119 --> 01:27:51.800
<v Speaker 2>from the perspective that they're just pointing out a flaw

1533
01:27:51.840 --> 01:27:54.520
<v Speaker 2>in the system. You know, I don't know whether or

1534
01:27:54.560 --> 01:27:58.720
<v Speaker 2>not they actually helped people to get the.

1535
01:28:00.479 --> 01:28:01.640
<v Speaker 6>Call on browser.

1536
01:28:02.760 --> 01:28:08.600
<v Speaker 1>Yeah that's uh. Who likes to use that term a lot,

1537
01:28:10.439 --> 01:28:13.199
<v Speaker 1>like Yeah, that incredible tool, the view source and the

1538
01:28:13.239 --> 01:28:16.600
<v Speaker 1>browser that incredible hacking tool. By the way, there's the

1539
01:28:16.720 --> 01:28:21.319
<v Speaker 1>old story about the person who who uh decoded the

1540
01:28:21.399 --> 01:28:25.079
<v Speaker 1>code for DVD coding I think it was, and then

1541
01:28:25.720 --> 01:28:29.880
<v Speaker 1>some young guy from Norway or or Icelander somewhere, and

1542
01:28:29.920 --> 01:28:33.560
<v Speaker 1>they tried to hit him with the DMCA violation or something.

1543
01:28:34.199 --> 01:28:36.920
<v Speaker 1>So he basically the way that he got around it

1544
01:28:37.000 --> 01:28:40.279
<v Speaker 1>was that he printed the code on the T shirts.

1545
01:28:40.680 --> 01:28:40.880
<v Speaker 4>Yeah.

1546
01:28:41.159 --> 01:28:44.560
<v Speaker 1>Anyway, by the way, talking about T shirts, somebody might

1547
01:28:44.720 --> 01:28:47.159
<v Speaker 1>you might have noticed if you when I got up

1548
01:28:47.680 --> 01:28:51.319
<v Speaker 1>that I'm actually wearing the T shirt for a different podcast.

1549
01:28:51.600 --> 01:28:54.039
<v Speaker 1>It's the shirt that I got when I was a

1550
01:28:54.079 --> 01:28:57.560
<v Speaker 1>guest on JS party. And the reason that I'm wearing

1551
01:28:57.600 --> 01:29:02.520
<v Speaker 1>it is because that, unfortunately JAS parties ended. Now you

1552
01:29:02.640 --> 01:29:05.800
<v Speaker 1>might think that podcasts compete with each other. No, I

1553
01:29:05.840 --> 01:29:09.520
<v Speaker 1>think it's certainly a case of rising tie lifts all ship.

1554
01:29:09.560 --> 01:29:15.439
<v Speaker 1>I'm really saddened whenever something like whenever a podcast just stops.

1555
01:29:15.960 --> 01:29:19.319
<v Speaker 1>I know that change log now has like general podcasts,

1556
01:29:19.399 --> 01:29:22.560
<v Speaker 1>but the fact that they had a dedicated JavaScript podcast

1557
01:29:22.600 --> 01:29:24.520
<v Speaker 1>was great. I enjoyed listening to it. As I said,

1558
01:29:24.560 --> 01:29:27.399
<v Speaker 1>I was a guest on it. I'm sadden that it ended,

1559
01:29:27.960 --> 01:29:30.720
<v Speaker 1>and I'm happy that we're continuing, so you know, if

1560
01:29:30.720 --> 01:29:35.239
<v Speaker 1>you're looking for your JavaScript fix, then stay with us.

1561
01:29:35.760 --> 01:29:39.199
<v Speaker 1>And those would be my picks. Reel Iran who wants

1562
01:29:39.239 --> 01:29:46.159
<v Speaker 1>to go Firstran goes first.

1563
01:29:42.439 --> 01:29:46.560
<v Speaker 4>You don't have to.

1564
01:29:46.640 --> 01:29:55.399
<v Speaker 1>You don't have to give picks. It's it's it's a nice.

1565
01:29:53.039 --> 01:29:54.479
<v Speaker 5>I'm not ruining my reputation.

1566
01:29:54.600 --> 01:29:56.560
<v Speaker 6>Then I'll go quick on them.

1567
01:29:56.600 --> 01:29:56.800
<v Speaker 4>Though.

1568
01:29:57.279 --> 01:30:02.039
<v Speaker 6>TV shows, I'll go for Arcane and Blue Eye Samurai,

1569
01:30:02.359 --> 01:30:06.279
<v Speaker 6>which are masterpieces. You have to watch them if you're

1570
01:30:06.279 --> 01:30:08.520
<v Speaker 6>into and if even if you're not into like anime

1571
01:30:08.640 --> 01:30:10.119
<v Speaker 6>and stuff like that, they're like amazing.

1572
01:30:10.600 --> 01:30:12.439
<v Speaker 4>They're not exactly animated though.

1573
01:30:12.359 --> 01:30:14.840
<v Speaker 6>Not exactly animate though, but it's also not like live

1574
01:30:14.880 --> 01:30:19.560
<v Speaker 6>action and stuff, so I highly recommend watching them. Arcane

1575
01:30:19.560 --> 01:30:27.239
<v Speaker 6>specifically has an incredible soundtrack which is very emotional. It's

1576
01:30:27.319 --> 01:30:31.439
<v Speaker 6>it's yeah yeah. Video game book wise, I'll go with

1577
01:30:32.199 --> 01:30:35.399
<v Speaker 6>sand Worm by Andy Green. If you like the kind

1578
01:30:35.399 --> 01:30:38.199
<v Speaker 6>of like how cyber security kind of like started, you know,

1579
01:30:38.279 --> 01:30:42.159
<v Speaker 6>all the things like you know, Russian hacking groups and

1580
01:30:42.199 --> 01:30:45.800
<v Speaker 6>stuff like that, everything that started in Ukraine like over

1581
01:30:45.840 --> 01:30:48.600
<v Speaker 6>a decade ago. It's super cool. It goes and analysis

1582
01:30:48.720 --> 01:30:51.640
<v Speaker 6>like why in the politics and how security researchers go

1583
01:30:51.760 --> 01:30:56.760
<v Speaker 6>at it incidents and stuff like that podcast go with Starduk.

1584
01:30:57.159 --> 01:30:59.840
<v Speaker 6>I love like space and astronomy and stuff like that,

1585
01:31:00.079 --> 01:31:01.960
<v Speaker 6>and it has niled the grass dison and it's like

1586
01:31:02.000 --> 01:31:07.840
<v Speaker 6>a super fun space and time and everything around this

1587
01:31:08.399 --> 01:31:12.760
<v Speaker 6>physics stuff is super fun to watch events. Sorry to

1588
01:31:12.800 --> 01:31:15.479
<v Speaker 6>listen if you go to events and you like that.

1589
01:31:15.520 --> 01:31:18.279
<v Speaker 6>I'm actually going to recommend everyone here who are developers

1590
01:31:18.560 --> 01:31:22.239
<v Speaker 6>to go to def Con, which is super weird hacker

1591
01:31:22.439 --> 01:31:27.560
<v Speaker 6>kind of like underground punk style hacking conference in Vegas

1592
01:31:27.600 --> 01:31:30.840
<v Speaker 6>in the summer in August. You'll get a definitely a

1593
01:31:30.880 --> 01:31:33.119
<v Speaker 6>good taste of what the culture is like.

1594
01:31:33.960 --> 01:31:35.840
<v Speaker 4>Would you also get hacked while you're there?

1595
01:31:36.560 --> 01:31:39.479
<v Speaker 6>So for a long time actually that was a thing

1596
01:31:39.520 --> 01:31:43.000
<v Speaker 6>where you would be recommended to go without any mobile

1597
01:31:43.000 --> 01:31:46.239
<v Speaker 6>devices or mobile devices turned off, never connect to any

1598
01:31:46.239 --> 01:31:49.079
<v Speaker 6>Wi Fi whatever you think that is, mobile devices off,

1599
01:31:49.119 --> 01:31:52.680
<v Speaker 6>louted off everything else. Wow, But yeah, it had that

1600
01:31:52.800 --> 01:31:56.399
<v Speaker 6>reputation for a long time, definitely since like the early days,

1601
01:31:56.439 --> 01:31:59.920
<v Speaker 6>like like nineties and stuff like that. But it's far

1602
01:32:00.079 --> 01:32:02.760
<v Speaker 6>more mature now like that it's people like, don't do

1603
01:32:02.840 --> 01:32:05.000
<v Speaker 6>those things anymore. And I mean, if you do care

1604
01:32:05.039 --> 01:32:09.960
<v Speaker 6>about your privacy and devices anyway, don't culture with your

1605
01:32:09.960 --> 01:32:15.439
<v Speaker 6>phone and laptop and just work off those are my.

1606
01:32:15.479 --> 01:32:19.279
<v Speaker 5>Picks greatly, like all of the above.

1607
01:32:20.359 --> 01:32:21.880
<v Speaker 4>No problem.

1608
01:32:21.920 --> 01:32:26.760
<v Speaker 1>Just having you here is good enough. Okay then, everybody,

1609
01:32:26.840 --> 01:32:29.399
<v Speaker 1>thank you for participating on our show. Steve had to

1610
01:32:29.479 --> 01:32:31.920
<v Speaker 1>drop off, but you know we are still here and

1611
01:32:31.960 --> 01:32:35.319
<v Speaker 1>hopefully so are you. So thank you all, Thank you Ariel,

1612
01:32:35.479 --> 01:32:37.680
<v Speaker 1>thank you Leroan, and see you all next time.

1613
01:32:38.119 --> 01:32:39.239
<v Speaker 5>Thank you for having us
