WEBVTT

1
00:00:01.080 --> 00:00:03.000
<v Speaker 1>How'd you like to listen to dot net rocks with

2
00:00:03.040 --> 00:00:07.879
<v Speaker 1>no ads? Easy? Become a patron for just five dollars

3
00:00:07.919 --> 00:00:10.800
<v Speaker 1>a month. You get access to a private RSS feed

4
00:00:10.839 --> 00:00:14.240
<v Speaker 1>where all the shows have no ads. Twenty dollars a month,

5
00:00:14.279 --> 00:00:17.679
<v Speaker 1>we'll get you that and a special dot NetRocks patron mug.

6
00:00:18.160 --> 00:00:34.479
<v Speaker 1>Sign up now at Patreon dot dot NetRocks dot com. Hey,

7
00:00:34.520 --> 00:00:39.039
<v Speaker 1>welcome back to dot net Rocks episode number nineteen forty three.

8
00:00:39.359 --> 00:00:42.560
<v Speaker 1>I'm Carl Franklin at amergri Gabel. How you doing, Richard?

9
00:00:42.719 --> 00:00:45.079
<v Speaker 1>What's up? I'm all right. This is weird to be

10
00:00:45.159 --> 00:00:47.920
<v Speaker 1>in the twentieth century of shows, but you know, yeah,

11
00:00:48.039 --> 00:00:50.560
<v Speaker 1>and so much happened during these years. Yeah, so we'll

12
00:00:50.560 --> 00:00:53.119
<v Speaker 1>talk about that in a minute. But uh, how's the

13
00:00:53.119 --> 00:00:57.320
<v Speaker 1>weather up there in otter Town? Yea, we gotta break today,

14
00:00:57.520 --> 00:01:01.359
<v Speaker 1>little suddy. You know it's it's definitely springtime. So yeah,

15
00:01:01.359 --> 00:01:02.679
<v Speaker 1>here too, things are changing.

16
00:01:02.920 --> 00:01:05.239
<v Speaker 2>We had one snowfall, which is kind of normal for

17
00:01:05.280 --> 00:01:08.120
<v Speaker 2>the coast, and now it's things are warming.

18
00:01:07.920 --> 00:01:10.719
<v Speaker 1>Up here too, and it's kind of nice. Yeah. I

19
00:01:10.799 --> 00:01:15.480
<v Speaker 1>install the camera right outside the studio nice and brought

20
00:01:15.519 --> 00:01:17.640
<v Speaker 1>the big screen TV and from the living room, which

21
00:01:17.680 --> 00:01:20.079
<v Speaker 1>we don't really use anymore and sort of mounted it

22
00:01:20.159 --> 00:01:22.239
<v Speaker 1>right in back of where the camera is, so I

23
00:01:22.280 --> 00:01:25.680
<v Speaker 1>have like a digital window out on my outside.

24
00:01:25.840 --> 00:01:27.840
<v Speaker 2>But you can control the amount of light, and so

25
00:01:28.120 --> 00:01:30.879
<v Speaker 2>you got control over your space till right, Yeah, exactly.

26
00:01:31.079 --> 00:01:33.560
<v Speaker 1>So it's fun. All right, it's good. Let's talk about

27
00:01:33.599 --> 00:01:35.959
<v Speaker 1>nineteen forty three before we do better. No framework going

28
00:01:36.040 --> 00:01:38.200
<v Speaker 1>to do that first, sure, all right, Well, from what

29
00:01:38.280 --> 00:01:40.680
<v Speaker 1>I know and what I read, nineteen forty three, the

30
00:01:40.799 --> 00:01:43.480
<v Speaker 1>tide of World War two began to turn against the

31
00:01:43.519 --> 00:01:47.840
<v Speaker 1>Axis powers, with significant events including the Soviet victory at

32
00:01:47.879 --> 00:01:51.879
<v Speaker 1>the Battle of Stalingrad, the Allied invasion of Sicily, and

33
00:01:51.920 --> 00:01:56.640
<v Speaker 1>the beginning of the Warsaw Ghetto uprising. The word ghetto

34
00:01:56.760 --> 00:01:59.480
<v Speaker 1>comes from Poland. Not a lot of people know that

35
00:01:59.560 --> 00:02:01.680
<v Speaker 1>in America anyway. And what's crazy when you go to

36
00:02:01.680 --> 00:02:04.480
<v Speaker 1>Warsaw is the chunks of it that are still there. Yeah,

37
00:02:04.599 --> 00:02:08.039
<v Speaker 1>the Polish are taken very seriously the ownership of those buildings,

38
00:02:08.120 --> 00:02:10.759
<v Speaker 1>and well, it's entirely likely there's no one left alive

39
00:02:10.879 --> 00:02:12.719
<v Speaker 1>that owned some of those buildings. They just won't do

40
00:02:12.719 --> 00:02:15.560
<v Speaker 1>anything about it. Yeah, they're holding off on the chance

41
00:02:15.599 --> 00:02:17.680
<v Speaker 1>that they could find some relations to the point now

42
00:02:17.680 --> 00:02:21.800
<v Speaker 1>where they've built these protective screens up one floor over

43
00:02:21.840 --> 00:02:24.319
<v Speaker 1>the sidewalk because there's Yeah, it's the building falling off.

44
00:02:24.319 --> 00:02:26.639
<v Speaker 1>They don't want to hurt anybody. Wow, there's still billet

45
00:02:26.639 --> 00:02:29.560
<v Speaker 1>holes in buildings in Warsaw from that. At that time,

46
00:02:30.400 --> 00:02:34.680
<v Speaker 1>Zootsuit riots happened in Los Angeles. White servicemen and police

47
00:02:34.680 --> 00:02:38.840
<v Speaker 1>officers attacked Mexican American youth, which turned that into the

48
00:02:38.919 --> 00:02:42.560
<v Speaker 1>Zootsuit riots. The Harlem race Riot occurred in Harlem, New

49
00:02:42.639 --> 00:02:45.680
<v Speaker 1>York after a white police officer shot in African American soldier.

50
00:02:46.599 --> 00:02:49.960
<v Speaker 1>In the good News section of nineteen forty three, the

51
00:02:50.000 --> 00:02:54.319
<v Speaker 1>Pentagon is completed, the Chinese exclusion acts are repealed. Actually

52
00:02:54.439 --> 00:02:56.800
<v Speaker 1>is that good news? Does sound like it? I'm not

53
00:02:56.879 --> 00:03:00.879
<v Speaker 1>so sure. But also two things were invented in nineteen

54
00:03:00.960 --> 00:03:04.479
<v Speaker 1>forty three that we need to thank the people for

55
00:03:04.879 --> 00:03:07.080
<v Speaker 1>duct tape, nice and LSD.

56
00:03:07.479 --> 00:03:13.800
<v Speaker 2>It's funny also when the Colossus computer, which arguably is

57
00:03:13.800 --> 00:03:20.639
<v Speaker 2>the first electronic programmable computing device, of course, built Blenchley

58
00:03:20.680 --> 00:03:24.840
<v Speaker 2>Park for cryptanalysis. Wow, although that's also the same. Forty

59
00:03:24.879 --> 00:03:27.240
<v Speaker 2>three is a year where the contract for ANIAC starts,

60
00:03:27.240 --> 00:03:28.960
<v Speaker 2>but they won't get finished until forty five.

61
00:03:29.120 --> 00:03:31.000
<v Speaker 1>Yeah, and I don't know.

62
00:03:31.080 --> 00:03:33.759
<v Speaker 2>This is also forty three was the era of the

63
00:03:33.800 --> 00:03:35.599
<v Speaker 2>first generation of antibiotics.

64
00:03:35.680 --> 00:03:36.159
<v Speaker 1>That's right.

65
00:03:36.319 --> 00:03:39.560
<v Speaker 2>Yeah, yeah, so, and there's some funny stories around that,

66
00:03:39.599 --> 00:03:45.919
<v Speaker 2>like they found the perfect bacterium for growing penicillin on

67
00:03:46.960 --> 00:03:47.599
<v Speaker 2>a cantalope.

68
00:03:47.719 --> 00:03:51.240
<v Speaker 1>I thought it was on an orange randomly. There were

69
00:03:51.240 --> 00:03:53.439
<v Speaker 1>are versions there, but the thing they call the golden mold,

70
00:03:53.560 --> 00:03:56.439
<v Speaker 1>it was actually on a canalope in Illinois. That's so cool,

71
00:03:56.520 --> 00:03:58.639
<v Speaker 1>and that maybe they already knew how to make penicill

72
00:03:58.639 --> 00:04:02.439
<v Speaker 1>at that point. But it became the master mechanism destructimyas

73
00:04:02.439 --> 00:04:05.280
<v Speaker 1>and was developed in forty three. I think that it

74
00:04:05.360 --> 00:04:07.400
<v Speaker 1>was really released in forty four, wasn't it.

75
00:04:07.479 --> 00:04:10.759
<v Speaker 2>Yeah, but that's when it was first developed and it

76
00:04:10.840 --> 00:04:13.360
<v Speaker 2>was the first treatment for tuberculosis.

77
00:04:13.439 --> 00:04:15.840
<v Speaker 1>Wow, take a lot of that stuff for granted, now,

78
00:04:15.840 --> 00:04:18.720
<v Speaker 1>don't we We share doom to the point where people forget. Yeah,

79
00:04:18.879 --> 00:04:20.959
<v Speaker 1>we used to have friends that died. He stepped on

80
00:04:20.959 --> 00:04:22.920
<v Speaker 1>a nail. You were going to die? Yeah, and you

81
00:04:23.160 --> 00:04:27.040
<v Speaker 1>everybody had somebody who died in tuberculosis. Many people oculosis.

82
00:04:27.120 --> 00:04:31.439
<v Speaker 1>It was untreatable, tetanus too. Yeah. Okay, so let's get

83
00:04:31.480 --> 00:04:42.399
<v Speaker 1>to better know a framework, roll the music. Awesome, A man,

84
00:04:42.439 --> 00:04:45.399
<v Speaker 1>what you got? This one comes from our friend Damian Edwards.

85
00:04:45.720 --> 00:04:48.160
<v Speaker 1>You know him. He's overdue for a show, isn't name?

86
00:04:48.199 --> 00:04:51.680
<v Speaker 1>We should totally is. Yeah, we need a little signal,

87
00:04:51.680 --> 00:04:56.079
<v Speaker 1>our reminiscence and all that good stuff. So he wrote

88
00:04:56.120 --> 00:05:00.519
<v Speaker 1>this tool. It's on GitHub called dot net purge. It's

89
00:05:00.519 --> 00:05:02.360
<v Speaker 1>a dot Net tool that runs dot net clean for

90
00:05:02.439 --> 00:05:07.319
<v Speaker 1>each target, framework and configuration and then deletes the output directories. Okay.

91
00:05:07.439 --> 00:05:10.079
<v Speaker 1>Can be run in a directory containing a solution or

92
00:05:10.120 --> 00:05:13.759
<v Speaker 1>project file because you know what disk space is low. No,

93
00:05:13.839 --> 00:05:17.319
<v Speaker 1>I'm kidding. I'm kidding, of course, Damien. That's not the point.

94
00:05:17.360 --> 00:05:21.000
<v Speaker 1>The point is you have all these dangling frameworks and

95
00:05:21.959 --> 00:05:25.399
<v Speaker 1>tools that you don't need anymore. Yeah, why confuse the issue?

96
00:05:25.639 --> 00:05:28.319
<v Speaker 1>Just clean them up, Just tidy stuff up. Yeah, so

97
00:05:28.399 --> 00:05:31.560
<v Speaker 1>that's cool. As you can see, it's a it's a

98
00:05:31.600 --> 00:05:33.600
<v Speaker 1>dot net tool. It's a command line thing. You can

99
00:05:33.639 --> 00:05:37.160
<v Speaker 1>add it to Windows Explore. There's a little registry hack

100
00:05:37.279 --> 00:05:40.000
<v Speaker 1>that you can add dot net purge to Explore a

101
00:05:40.040 --> 00:05:42.879
<v Speaker 1>context menu. Turn it into a shortcut. Yeah, very cool.

102
00:05:43.000 --> 00:05:45.439
<v Speaker 1>You know, at least it'll it'll it'll help with your

103
00:05:45.879 --> 00:05:48.120
<v Speaker 1>large lene you're programming large language model lature is not

104
00:05:48.199 --> 00:05:52.000
<v Speaker 1>navigating old files. Ooh, there you go. Yeah. And also

105
00:05:52.079 --> 00:05:56.279
<v Speaker 1>Simon Crop was a contributor to that. There's Damien and

106
00:05:56.319 --> 00:05:58.879
<v Speaker 1>Simon basically another guy you should probably be back on

107
00:05:58.920 --> 00:06:01.560
<v Speaker 1>the show. Yeah, so there you go. Clearly they both

108
00:06:01.639 --> 00:06:04.279
<v Speaker 1>had the problem and decided to fix it. Yeah. Maybe

109
00:06:04.279 --> 00:06:06.720
<v Speaker 1>it only happens in Australia, though I don't know. I

110
00:06:06.720 --> 00:06:10.360
<v Speaker 1>don't know the answer. Okay, he's talking to us today.

111
00:06:10.399 --> 00:06:12.600
<v Speaker 1>Richard grabbed a comment on a show eighteen eighty five,

112
00:06:12.639 --> 00:06:14.519
<v Speaker 1>the one we did with Martine back in February of

113
00:06:14.519 --> 00:06:18.600
<v Speaker 1>twenty four. We were talking about improving your CSS skills. Yeah,

114
00:06:18.879 --> 00:06:22.680
<v Speaker 1>and Vladimir Jirgov commented this about a year ago. Hees hi, guys,

115
00:06:22.680 --> 00:06:24.639
<v Speaker 1>long term listening to the show, writing in reference to

116
00:06:24.759 --> 00:06:28.680
<v Speaker 1>using chat GPT for creating CSS code. I found this

117
00:06:28.720 --> 00:06:31.360
<v Speaker 1>comment hilarious because it was a year ago when we

118
00:06:31.600 --> 00:06:34.480
<v Speaker 1>just didn't know. I've recently used the free version of

119
00:06:34.560 --> 00:06:38.600
<v Speaker 1>chat gpt for a small CSS h schmael and JavaScript project. Well,

120
00:06:38.600 --> 00:06:40.560
<v Speaker 1>I could say it's pretty good perspectives matter.

121
00:06:40.920 --> 00:06:43.680
<v Speaker 2>I'm an infrastructure engineer recently turned web developer, so my

122
00:06:43.680 --> 00:06:48.319
<v Speaker 2>appraisal of quote good CSS code is limited. Nevertheless, chat

123
00:06:48.399 --> 00:06:51.360
<v Speaker 2>GPD was able to produce clear, readable, almost eighty percent

124
00:06:51.560 --> 00:06:54.399
<v Speaker 2>accurate code. The other twenty percent I compensated by pointing

125
00:06:54.439 --> 00:06:55.920
<v Speaker 2>me to the right direction to fix it or just

126
00:06:55.959 --> 00:06:57.160
<v Speaker 2>it when I couldn't do it itself.

127
00:06:57.519 --> 00:07:00.199
<v Speaker 1>All this is good. It really blew me away a positively.

128
00:07:00.240 --> 00:07:02.319
<v Speaker 1>When I asked to refactor the code, it gave me

129
00:07:02.399 --> 00:07:05.959
<v Speaker 1>clear and concise, simplified Yeah, and ask it to comment

130
00:07:06.040 --> 00:07:09.519
<v Speaker 1>it as well, that's another trick. Yeah. Well, and again,

131
00:07:09.920 --> 00:07:13.279
<v Speaker 1>imagine this is a year ago, like so much has

132
00:07:13.319 --> 00:07:16.240
<v Speaker 1>happened in this space in a year. That's the problem

133
00:07:16.279 --> 00:07:20.000
<v Speaker 1>I find with chatchipt and things like CSS, because there's

134
00:07:20.079 --> 00:07:23.759
<v Speaker 1>so many posts like on stack overflow of people who

135
00:07:23.800 --> 00:07:27.800
<v Speaker 1>are posting bad CSS right and saying why is in

136
00:07:27.879 --> 00:07:29.839
<v Speaker 1>this work? And then their discussions and by the time

137
00:07:29.879 --> 00:07:32.560
<v Speaker 1>you get to the to the good one, you know,

138
00:07:32.639 --> 00:07:35.480
<v Speaker 1>to the solution, it might be three years old. And

139
00:07:35.600 --> 00:07:40.800
<v Speaker 1>so there's just a lot of confused CSS on the internet.

140
00:07:41.040 --> 00:07:44.279
<v Speaker 1>So I'm probably true for all code. But in general,

141
00:07:44.399 --> 00:07:48.079
<v Speaker 1>these tools have moved so quickly, and being aware that

142
00:07:48.120 --> 00:07:50.360
<v Speaker 1>we're coming up on a bills and there's some interesting

143
00:07:50.360 --> 00:07:53.800
<v Speaker 1>announcements coming, like you know, Microsoft's a tooling company first

144
00:07:53.839 --> 00:07:57.040
<v Speaker 1>and foremost, so expect amazing things in this space.

145
00:07:57.240 --> 00:07:59.360
<v Speaker 2>Yep, that's for sure, Vladimir, Thank you so much for

146
00:07:59.399 --> 00:08:01.279
<v Speaker 2>your comment, and a copy of music Cobey is on

147
00:08:01.319 --> 00:08:03.040
<v Speaker 2>its way to you. And if you'd like copy music Cobey,

148
00:08:03.040 --> 00:08:04.639
<v Speaker 2>I write a comment on the website at dot at

149
00:08:04.720 --> 00:08:07.120
<v Speaker 2>rocks dot com or on the facebooks. We publish every

150
00:08:07.120 --> 00:08:09.160
<v Speaker 2>show there and if I comment there or if you

151
00:08:09.240 --> 00:08:10.800
<v Speaker 2>comment there and I read it on the show, we'll

152
00:08:10.800 --> 00:08:11.920
<v Speaker 2>send you copy of music go bay.

153
00:08:11.959 --> 00:08:14.600
<v Speaker 1>And of course music to Code by born of a

154
00:08:14.639 --> 00:08:19.240
<v Speaker 1>conversation that we had on dot net rocks and it

155
00:08:19.319 --> 00:08:23.839
<v Speaker 1>turns out that music at a certain with certain attributes

156
00:08:23.879 --> 00:08:27.279
<v Speaker 1>really help you focus, and it's based on science. Was

157
00:08:27.279 --> 00:08:29.639
<v Speaker 1>that Dan North or was it Mark Semen? Mark Semen?

158
00:08:30.240 --> 00:08:32.879
<v Speaker 1>Was Mark Semen? Yeah? Yeah, So you know, we just

159
00:08:32.960 --> 00:08:35.679
<v Speaker 1>did track twenty two. So you can get that track

160
00:08:35.759 --> 00:08:38.960
<v Speaker 1>by itself, or you can get MP three flak or

161
00:08:39.039 --> 00:08:43.120
<v Speaker 1>wave collections. Go to music to Code by dot net. Okay, awesome,

162
00:08:43.240 --> 00:08:49.279
<v Speaker 1>Let's bring back Martine Dowdin, an award winning CTO ux

163
00:08:49.600 --> 00:08:54.639
<v Speaker 1>UI designer and developer, International speaker and author. Martin focuses

164
00:08:54.720 --> 00:08:59.360
<v Speaker 1>on web interfaces. That are beautiful, functional, accessible, and usable.

165
00:09:00.039 --> 00:09:03.000
<v Speaker 1>She approaches user experience from both art and science, drawing

166
00:09:03.039 --> 00:09:06.879
<v Speaker 1>from her degrees in psychology and visual communications. Martin has

167
00:09:06.919 --> 00:09:10.159
<v Speaker 1>worked as a developer, artist, educator, and consultants since two

168
00:09:10.240 --> 00:09:15.000
<v Speaker 1>thousand and five. Currently, she's the CTO at Andromeda Galactic

169
00:09:15.120 --> 00:09:19.879
<v Speaker 1>Solutions good name where she that's a great name as

170
00:09:19.919 --> 00:09:25.879
<v Speaker 1>opposed to like Minutia Incorporated right where she continues to

171
00:09:25.960 --> 00:09:28.559
<v Speaker 1>learn work on. Sorry, I didn't mean to make you laugh,

172
00:09:29.879 --> 00:09:32.320
<v Speaker 1>continues to learn work on and share her passion for

173
00:09:32.360 --> 00:09:34.480
<v Speaker 1>front end development. Welcome back, Martin.

174
00:09:34.279 --> 00:09:36.159
<v Speaker 3>Well glad to be back. Thank you for having me.

175
00:09:36.399 --> 00:09:36.679
<v Speaker 1>Sure.

176
00:09:36.879 --> 00:09:39.320
<v Speaker 2>Yeah, it's great to have you back, and I'm happy

177
00:09:39.360 --> 00:09:41.559
<v Speaker 2>to not be talking about CSS this time around. Not

178
00:09:41.600 --> 00:09:45.639
<v Speaker 2>that your conversation CSS aren't brilliant. Yeah, but admittedly I

179
00:09:45.639 --> 00:09:48.360
<v Speaker 2>think I pinged you saying it's been about a year

180
00:09:48.600 --> 00:09:51.600
<v Speaker 2>and I had been poking through your sessionized and saw

181
00:09:51.799 --> 00:09:55.039
<v Speaker 2>you doing a talk on promises and I'm like, you know,

182
00:09:56.039 --> 00:09:58.519
<v Speaker 2>those things have driven me crazy since they were first

183
00:09:58.600 --> 00:10:00.440
<v Speaker 2>talked about in the W three C.

184
00:10:01.759 --> 00:10:02.799
<v Speaker 1>I should talk to Martina.

185
00:10:03.200 --> 00:10:04.519
<v Speaker 2>It's like, as soon as I get that urge, like

186
00:10:04.559 --> 00:10:05.879
<v Speaker 2>I want to call you and talk about it we

187
00:10:05.879 --> 00:10:07.360
<v Speaker 2>should probably make a show.

188
00:10:10.399 --> 00:10:12.919
<v Speaker 1>So, Martine, what is on your mind these days?

189
00:10:13.759 --> 00:10:17.600
<v Speaker 3>Well, the I've been writing blog posts and one of

190
00:10:17.639 --> 00:10:20.559
<v Speaker 3>them that you mentioned was about promises and also made

191
00:10:20.559 --> 00:10:24.240
<v Speaker 3>it as a talk, and so I realized when I

192
00:10:24.320 --> 00:10:27.200
<v Speaker 3>was I was, I've been working with some junior devs

193
00:10:27.200 --> 00:10:31.159
<v Speaker 3>and some dot devs recently, and uh, we were arguing about,

194
00:10:31.480 --> 00:10:33.759
<v Speaker 3>you know, better ways to write code and how something

195
00:10:33.759 --> 00:10:36.759
<v Speaker 3>should be architected, because you know, de've never disagree on

196
00:10:36.799 --> 00:10:37.519
<v Speaker 3>such things.

197
00:10:37.320 --> 00:10:39.480
<v Speaker 1>Never, never, never, never.

198
00:10:40.000 --> 00:10:44.000
<v Speaker 3>And I realized that one one of the one of

199
00:10:44.000 --> 00:10:48.039
<v Speaker 3>the guys I was talking to, didn't actually understand what

200
00:10:48.159 --> 00:10:52.200
<v Speaker 3>promises did or how they worked. And so that's kind

201
00:10:52.200 --> 00:10:55.519
<v Speaker 3>of what prompted me to write that article because as

202
00:10:55.519 --> 00:10:58.320
<v Speaker 3>I did some digging, I realized that not only do

203
00:10:58.960 --> 00:11:01.200
<v Speaker 3>it's not as common knowledge as I originally thought it

204
00:11:01.320 --> 00:11:04.399
<v Speaker 3>was on how they work, but also that there's so

205
00:11:04.559 --> 00:11:07.440
<v Speaker 3>much with them that can be done that like, sure

206
00:11:07.519 --> 00:11:09.879
<v Speaker 3>people can remember how to do a dot then or

207
00:11:10.039 --> 00:11:12.399
<v Speaker 3>dot catch or maybe even in a sink away, but

208
00:11:12.399 --> 00:11:14.320
<v Speaker 3>there's so much more to them than those three things,

209
00:11:14.360 --> 00:11:16.480
<v Speaker 3>which is kind of what a lot of people think

210
00:11:16.519 --> 00:11:18.559
<v Speaker 3>of when they think promises, Right, you get your fetch

211
00:11:18.559 --> 00:11:20.919
<v Speaker 3>you get your then and go on and go forth

212
00:11:20.919 --> 00:11:22.919
<v Speaker 3>and conquer. But there's a lot more to it that

213
00:11:22.960 --> 00:11:26.000
<v Speaker 3>you can do in terms of parallelization or how you

214
00:11:26.039 --> 00:11:28.039
<v Speaker 3>want things to happen, or if you want, you know,

215
00:11:28.360 --> 00:11:30.320
<v Speaker 3>just give me the first response or things like that.

216
00:11:30.440 --> 00:11:32.919
<v Speaker 3>And so that's kind of what prompted me to write it.

217
00:11:33.000 --> 00:11:35.639
<v Speaker 1>And just to back up, we're talking about JavaScript here,

218
00:11:35.879 --> 00:11:38.360
<v Speaker 1>yes we are. You know, we didn't really introduce the

219
00:11:38.399 --> 00:11:40.679
<v Speaker 1>topic unless you read the title of the show, but

220
00:11:41.279 --> 00:11:44.399
<v Speaker 1>so we're talking JavaScript promises, and you know this is

221
00:11:44.440 --> 00:11:47.240
<v Speaker 1>the way to do one way to do things asynchronously.

222
00:11:47.360 --> 00:11:50.759
<v Speaker 1>Right you mentioned a sink a weight, which we do

223
00:11:50.799 --> 00:11:54.120
<v Speaker 1>and c sharp all the time, but turned into JavaScript as.

224
00:11:54.000 --> 00:11:56.919
<v Speaker 3>Well, yep, which is it's kind of cool. I just

225
00:11:57.000 --> 00:11:59.559
<v Speaker 3>I mean, the thing with them is the I found

226
00:11:59.559 --> 00:12:02.639
<v Speaker 3>that the ear handling becomes a little different if you're

227
00:12:02.679 --> 00:12:04.840
<v Speaker 3>doing the a a sek away where you have to

228
00:12:04.879 --> 00:12:07.799
<v Speaker 3>wrap the trycatch and so on, and then depending if

229
00:12:07.840 --> 00:12:09.759
<v Speaker 3>you want to where you want to catch your things

230
00:12:09.759 --> 00:12:12.519
<v Speaker 3>and how ends up being a little bit different. But oh,

231
00:12:12.559 --> 00:12:15.240
<v Speaker 3>in all, I find they I personally like it because

232
00:12:15.279 --> 00:12:17.360
<v Speaker 3>I find it more readable to just be able to go,

233
00:12:17.440 --> 00:12:19.799
<v Speaker 3>you know, especially if you have multiple private promises you're

234
00:12:19.799 --> 00:12:22.360
<v Speaker 3>doing in sequence to just be able to do a

235
00:12:22.399 --> 00:12:24.720
<v Speaker 3>weight one A wait two, a wait three, And it's

236
00:12:24.840 --> 00:12:27.519
<v Speaker 3>really instead of having to do the whole that then

237
00:12:27.639 --> 00:12:29.679
<v Speaker 3>that then that then that then I find it less worthy,

238
00:12:30.240 --> 00:12:32.120
<v Speaker 3>but it's a personal preference really.

239
00:12:32.080 --> 00:12:34.600
<v Speaker 1>So the whole dot then that that is that the

240
00:12:34.679 --> 00:12:37.679
<v Speaker 1>promise syntax like fluent. Is that how it works.

241
00:12:37.919 --> 00:12:41.799
<v Speaker 3>Yeah, So in JavaScript, fetch is a promise. I'm just

242
00:12:41.799 --> 00:12:43.320
<v Speaker 3>going to use that as the example because it's the

243
00:12:43.360 --> 00:12:45.080
<v Speaker 3>same one I have in the in the article. But

244
00:12:45.159 --> 00:12:48.159
<v Speaker 3>you would do like fetch whatever the U R L, right,

245
00:12:48.240 --> 00:12:51.639
<v Speaker 3>and then you would do after that you do dot

246
00:12:51.679 --> 00:12:53.840
<v Speaker 3>then and then you're going to get the results and

247
00:12:53.879 --> 00:12:55.799
<v Speaker 3>that that's that's going to be a function. So you

248
00:12:55.840 --> 00:12:58.039
<v Speaker 3>get your result and you can do whatever you want

249
00:12:58.039 --> 00:13:00.000
<v Speaker 3>with that result at that point, right, And you can

250
00:13:00.159 --> 00:13:02.799
<v Speaker 3>chain those dot dens, so if you get what you

251
00:13:02.960 --> 00:13:05.960
<v Speaker 3>sometimes see is like where it starts, people try to

252
00:13:06.080 --> 00:13:08.440
<v Speaker 3>nest the dot dens instead of chaining them, so you

253
00:13:08.519 --> 00:13:11.559
<v Speaker 3>get kind of that that Christmas tree pattern like that,

254
00:13:13.679 --> 00:13:16.840
<v Speaker 3>but you can just know and the fun thing with

255
00:13:16.919 --> 00:13:19.120
<v Speaker 3>that then and it doesn't actually require you to return

256
00:13:19.159 --> 00:13:22.279
<v Speaker 3>a promise. You can put promise one that then promise

257
00:13:22.320 --> 00:13:24.840
<v Speaker 3>you know, take my results and then put it in

258
00:13:24.879 --> 00:13:27.639
<v Speaker 3>for promise too and so on. But you can very easily,

259
00:13:28.080 --> 00:13:31.759
<v Speaker 3>very easily just do some kind of transformation on the

260
00:13:31.840 --> 00:13:34.159
<v Speaker 3>data and return that site. Once you're in that that

261
00:13:34.320 --> 00:13:37.720
<v Speaker 3>then sequence. It does not have to be a promise.

262
00:13:37.840 --> 00:13:40.600
<v Speaker 3>You can do then whatever you want to after that.

263
00:13:40.679 --> 00:13:42.960
<v Speaker 1>At that point it kind of sounds like a task

264
00:13:43.080 --> 00:13:47.360
<v Speaker 1>and see sharp the concept anyway, where you know, when

265
00:13:47.399 --> 00:13:50.519
<v Speaker 1>you have a promise, what do you do with it? Right?

266
00:13:50.919 --> 00:13:52.720
<v Speaker 1>That's yeah.

267
00:13:52.960 --> 00:13:57.240
<v Speaker 3>For JavaScript, the most common use would be for like

268
00:13:57.360 --> 00:14:01.480
<v Speaker 3>fetching data, like whether whether it's whether you're doing using

269
00:14:01.480 --> 00:14:04.919
<v Speaker 3>a framework or something or you're just doing raw JavaScript.

270
00:14:05.559 --> 00:14:08.279
<v Speaker 3>Most of the time it's because you're fetching data that's

271
00:14:08.440 --> 00:14:10.440
<v Speaker 3>ninety nine percent of the timeline, it's going to be

272
00:14:10.440 --> 00:14:11.000
<v Speaker 3>four and.

273
00:14:10.879 --> 00:14:12.440
<v Speaker 1>You're trying not to hang the UI.

274
00:14:12.600 --> 00:14:15.240
<v Speaker 2>Why you do it right that I send off the

275
00:14:15.320 --> 00:14:16.679
<v Speaker 2>fetch you can.

276
00:14:16.799 --> 00:14:21.240
<v Speaker 3>It doesn't matter that more depends on how you're calling

277
00:14:21.279 --> 00:14:25.240
<v Speaker 3>the function more than more and where more than the

278
00:14:25.320 --> 00:14:27.159
<v Speaker 3>fact that it's a promise. The other one would be

279
00:14:27.200 --> 00:14:29.279
<v Speaker 3>to turn that I use it a lot for is

280
00:14:29.320 --> 00:14:33.960
<v Speaker 3>to turn callbacks into a promise because they're easier to

281
00:14:34.000 --> 00:14:37.519
<v Speaker 3>chain and handle and deal with. I find so like

282
00:14:38.360 --> 00:14:41.399
<v Speaker 3>when you're doing an image upload or a file upload

283
00:14:41.399 --> 00:14:43.559
<v Speaker 3>and you want to do a preview for it, there's

284
00:14:43.600 --> 00:14:46.200
<v Speaker 3>the whole file reader thing, and that's always a that's

285
00:14:46.240 --> 00:14:47.840
<v Speaker 3>one of the common ones, or even the set time

286
00:14:47.879 --> 00:14:50.960
<v Speaker 3>out technically speaking, you know, is callback. So like those

287
00:14:50.960 --> 00:14:53.519
<v Speaker 3>sorts of things so that I can chain them easily

288
00:14:53.720 --> 00:14:56.559
<v Speaker 3>with other things. I'll tend to turn them into promises

289
00:14:56.600 --> 00:14:59.320
<v Speaker 3>because it makes my life a whole lot easier than

290
00:14:59.559 --> 00:15:01.960
<v Speaker 3>living in and trying to figure out which callback is

291
00:15:02.000 --> 00:15:05.399
<v Speaker 3>doing what and going where. And I find them gross personally,

292
00:15:05.480 --> 00:15:07.240
<v Speaker 3>But just.

293
00:15:07.159 --> 00:15:11.120
<v Speaker 1>A just a for full disclosure, It's been a long

294
00:15:11.120 --> 00:15:14.879
<v Speaker 1>time since I've looked at that kind of complexity in JavaScript.

295
00:15:14.879 --> 00:15:18.120
<v Speaker 1>I mean, ever since I found Blazer, I've been as

296
00:15:18.200 --> 00:15:21.240
<v Speaker 1>much c Sharp as possible and as little JavaScript as possible,

297
00:15:21.559 --> 00:15:24.279
<v Speaker 1>And usually the JavaScript that I'm calling is just something

298
00:15:24.360 --> 00:15:27.440
<v Speaker 1>to get something from the dom that I can't get

299
00:15:27.480 --> 00:15:28.080
<v Speaker 1>with sea Sharp.

300
00:15:28.159 --> 00:15:32.759
<v Speaker 3>Yeah, dumb manipulation doesn't have too much in terms of

301
00:15:32.879 --> 00:15:35.840
<v Speaker 3>callbacks or anything else. They have a couple, I guess,

302
00:15:35.960 --> 00:15:37.799
<v Speaker 3>especially when you're getting to events like.

303
00:15:38.039 --> 00:15:40.879
<v Speaker 1>Yeah, window do resize all that stuff.

304
00:15:41.440 --> 00:15:44.360
<v Speaker 3>Or even what a fun one. That's always a h

305
00:15:44.960 --> 00:15:47.200
<v Speaker 3>Be careful how you type that in your Google searches

306
00:15:47.240 --> 00:15:51.960
<v Speaker 3>everything related to drag and drop because dom drag events

307
00:15:52.000 --> 00:15:55.240
<v Speaker 3>can can make some fun fun Oh yeah, fun search

308
00:15:55.279 --> 00:15:56.480
<v Speaker 3>results if you're not careful.

309
00:15:56.799 --> 00:16:04.799
<v Speaker 1>Oh boy, yep, Tom drag pictures of Dom Delawi's. So

310
00:16:04.840 --> 00:16:07.039
<v Speaker 1>does the fetch approach have an advantage when you want

311
00:16:07.080 --> 00:16:09.720
<v Speaker 1>to call off like multiple data sets you want to

312
00:16:09.720 --> 00:16:11.480
<v Speaker 1>fetch and you don't really care what order they come

313
00:16:11.519 --> 00:16:14.360
<v Speaker 1>back in you're populating different divs kind of thing. Yes,

314
00:16:14.399 --> 00:16:15.840
<v Speaker 1>if that word shines.

315
00:16:16.679 --> 00:16:20.679
<v Speaker 3>So fetch literally just goes and gets the data. So

316
00:16:20.720 --> 00:16:23.399
<v Speaker 3>if you wanted to call multiples, what you might do

317
00:16:23.759 --> 00:16:26.759
<v Speaker 3>is do it in a You could do a promise

318
00:16:26.799 --> 00:16:29.279
<v Speaker 3>that all which you would put a series of fetches

319
00:16:29.320 --> 00:16:31.879
<v Speaker 3>in it, and it would only return the data once

320
00:16:32.000 --> 00:16:33.039
<v Speaker 3>all of them have returned.

321
00:16:33.960 --> 00:16:34.639
<v Speaker 1>That's convenient.

322
00:16:35.120 --> 00:16:37.840
<v Speaker 3>So if you had to get if you needed all

323
00:16:37.840 --> 00:16:41.159
<v Speaker 3>three sets of data in order to populate or do

324
00:16:41.240 --> 00:16:43.840
<v Speaker 3>whatever you were going to do, that wouldn't return until

325
00:16:43.879 --> 00:16:46.159
<v Speaker 3>all of them have returned. Now, the downside is if

326
00:16:46.200 --> 00:16:48.879
<v Speaker 3>one of it fails, it fails everything. So that can

327
00:16:48.919 --> 00:16:51.279
<v Speaker 3>be good or bad, right, It depends on your use case,

328
00:16:51.639 --> 00:16:51.919
<v Speaker 3>but it.

329
00:16:51.919 --> 00:16:53.879
<v Speaker 2>Is nice if you do need three sets and you

330
00:16:53.879 --> 00:16:55.840
<v Speaker 2>don't want to wait for each one to come back,

331
00:16:55.879 --> 00:16:57.960
<v Speaker 2>to do it that way and they run in parallel

332
00:16:57.960 --> 00:17:00.200
<v Speaker 2>and once they're all back, then you act. If you

333
00:17:00.279 --> 00:17:02.879
<v Speaker 2>got three different sets that just render in three different

334
00:17:02.879 --> 00:17:04.799
<v Speaker 2>dips and you don't care whatever that comes in, can

335
00:17:04.839 --> 00:17:05.519
<v Speaker 2>you still use it?

336
00:17:05.839 --> 00:17:10.400
<v Speaker 3>Then you would probably do three. You would do either

337
00:17:10.440 --> 00:17:13.119
<v Speaker 3>three functions or three fetches, and then in the response

338
00:17:13.160 --> 00:17:15.440
<v Speaker 3>from the that fetch. But what I wouldn't do is

339
00:17:15.480 --> 00:17:18.119
<v Speaker 3>try to go a sink a wait for a second

340
00:17:18.119 --> 00:17:20.559
<v Speaker 3>and third because then you're literally waiting for a second

341
00:17:20.640 --> 00:17:22.839
<v Speaker 3>and third. Right, So at that point I would probably

342
00:17:22.880 --> 00:17:25.799
<v Speaker 3>do either separated into three functions that I would call

343
00:17:25.960 --> 00:17:29.200
<v Speaker 3>and not wait on right, or if I wanted everything

344
00:17:29.240 --> 00:17:32.839
<v Speaker 3>in the same function, I would do, uh, fetch a dot,

345
00:17:32.880 --> 00:17:35.319
<v Speaker 3>then do whatever I'm gonna do, fetch b dot, then

346
00:17:35.359 --> 00:17:36.759
<v Speaker 3>do what I'm going to do and do it as

347
00:17:36.759 --> 00:17:39.759
<v Speaker 3>a dot. Then structure, because then they're not waiting on

348
00:17:39.839 --> 00:17:42.359
<v Speaker 3>each other because JavaScript is going to fire the first one,

349
00:17:42.400 --> 00:17:45.039
<v Speaker 3>the second one, the third one because it has the dot.

350
00:17:45.079 --> 00:17:47.519
<v Speaker 3>Then it's not waiting for that to be finished. It's

351
00:17:47.559 --> 00:17:49.400
<v Speaker 3>just going to fire and go and move on to

352
00:17:49.440 --> 00:17:53.599
<v Speaker 3>the next but it will wait. Where it will wait

353
00:17:53.720 --> 00:17:57.279
<v Speaker 3>is to do what's in that dot then then I'll

354
00:17:57.319 --> 00:17:59.119
<v Speaker 3>wait for that data to come in. So if I

355
00:17:59.160 --> 00:18:01.599
<v Speaker 3>wanted them in peril, well, i'd probably use and in

356
00:18:01.680 --> 00:18:04.160
<v Speaker 3>the same function, I'd use dot then and definitely not

357
00:18:04.240 --> 00:18:06.640
<v Speaker 3>a sync away because then you're forcing for the way.

358
00:18:06.759 --> 00:18:10.680
<v Speaker 1>How is one doesn't help that there's multiple JavaScript async

359
00:18:10.799 --> 00:18:15.319
<v Speaker 1>methods like call there's callbacks, there's promises, there's a sync away.

360
00:18:16.440 --> 00:18:17.680
<v Speaker 1>Is that all of them?

361
00:18:17.799 --> 00:18:19.680
<v Speaker 3>Well, if you get into some of the frameworks like

362
00:18:19.759 --> 00:18:23.200
<v Speaker 3>our XGS, and you have the entire observable game as well.

363
00:18:22.960 --> 00:18:26.359
<v Speaker 2>React right, yeah, yeah, then is what the other frames

364
00:18:26.440 --> 00:18:28.160
<v Speaker 2>will provide you on top of everything else.

365
00:18:28.680 --> 00:18:31.640
<v Speaker 3>And then there's a handful of listeners too, which I

366
00:18:31.680 --> 00:18:33.839
<v Speaker 3>think are just callbacks if I remember, well.

367
00:18:34.119 --> 00:18:36.559
<v Speaker 1>How does one do a resilient strategy like we do

368
00:18:36.640 --> 00:18:40.880
<v Speaker 1>with poly in c sharp, Like you know, if if

369
00:18:40.880 --> 00:18:43.400
<v Speaker 1>a service is down and you call it, how can

370
00:18:43.440 --> 00:18:48.720
<v Speaker 1>you do like easing, you know, back off multiple retries

371
00:18:48.799 --> 00:18:51.319
<v Speaker 1>that kind of thing. Is there such a thing like

372
00:18:51.359 --> 00:18:52.960
<v Speaker 1>that built into JavaScript?

373
00:18:53.960 --> 00:18:57.839
<v Speaker 3>So our XGS does have a if you're dealing with observables,

374
00:18:57.839 --> 00:19:01.359
<v Speaker 3>does have a retry function. But you can fairly easily

375
00:19:01.440 --> 00:19:04.720
<v Speaker 3>do or retribe, because what you're gonna you're gonna utilize

376
00:19:04.720 --> 00:19:06.839
<v Speaker 3>your catch for that, right, So we're either going to

377
00:19:06.920 --> 00:19:09.559
<v Speaker 3>do in a trycatch block or as a dot catch

378
00:19:09.799 --> 00:19:11.920
<v Speaker 3>you're gonna say, you're going to have a variable outside

379
00:19:11.920 --> 00:19:14.359
<v Speaker 3>of that how many times have I retried? And then

380
00:19:14.400 --> 00:19:17.039
<v Speaker 3>you can call itself again and increment your retry.

381
00:19:17.440 --> 00:19:17.640
<v Speaker 4>Right.

382
00:19:18.519 --> 00:19:20.880
<v Speaker 3>The other thing you can do in your catch is say, okay,

383
00:19:20.960 --> 00:19:24.559
<v Speaker 3>this one's down, give me a different one. There's promise

384
00:19:24.640 --> 00:19:26.960
<v Speaker 3>not all settled that you can use. So if you

385
00:19:27.079 --> 00:19:30.200
<v Speaker 3>have like say, three three different APIs that you want

386
00:19:30.240 --> 00:19:32.720
<v Speaker 3>to hit, but you know that one of them is

387
00:19:32.839 --> 00:19:35.720
<v Speaker 3>likely to fail. But if you can get the data, great,

388
00:19:35.839 --> 00:19:39.759
<v Speaker 3>If not, we'll move on, it's okay, situation. Or if

389
00:19:39.799 --> 00:19:42.039
<v Speaker 3>you want to handle depending on let's say you've got

390
00:19:42.079 --> 00:19:44.039
<v Speaker 3>your three calls, but you want to handle your failures

391
00:19:44.039 --> 00:19:46.720
<v Speaker 3>a little bit differently, you can do and all settled.

392
00:19:46.759 --> 00:19:49.519
<v Speaker 3>So what happens with the all settled is like, let's

393
00:19:49.519 --> 00:19:52.279
<v Speaker 3>say one of your three of them dies in the middle, right,

394
00:19:52.519 --> 00:19:55.559
<v Speaker 3>Unlike the promise at all, which goes ahead and and

395
00:19:55.720 --> 00:19:58.279
<v Speaker 3>will throw an error if any of them fail. What

396
00:19:58.359 --> 00:20:01.440
<v Speaker 3>they all settled does is it will return for all

397
00:20:01.519 --> 00:20:06.240
<v Speaker 3>three a status of either okay or there's been an error,

398
00:20:06.279 --> 00:20:08.519
<v Speaker 3>and then if there's an error reason so you can

399
00:20:08.599 --> 00:20:10.799
<v Speaker 3>get you can still get your data for say like

400
00:20:10.839 --> 00:20:13.359
<v Speaker 3>one in two and then you'll get your error for three.

401
00:20:13.720 --> 00:20:15.799
<v Speaker 3>But then you have to make sure in your once

402
00:20:15.799 --> 00:20:17.559
<v Speaker 3>you get the data that you realize that it's not

403
00:20:17.599 --> 00:20:20.359
<v Speaker 3>just the raw data. It's got like the value and

404
00:20:20.920 --> 00:20:23.599
<v Speaker 3>the status or the value or the status in error

405
00:20:23.599 --> 00:20:26.039
<v Speaker 3>depending on So you've got to remap that to whatever

406
00:20:26.079 --> 00:20:29.200
<v Speaker 3>you need. But that one's convenient if you have a

407
00:20:29.279 --> 00:20:32.240
<v Speaker 3>service that you know is maybe a little flaky, that

408
00:20:32.400 --> 00:20:34.559
<v Speaker 3>might but you still want to do whatever you're going

409
00:20:34.599 --> 00:20:36.839
<v Speaker 3>to do with the rest of the data, or if

410
00:20:36.839 --> 00:20:40.039
<v Speaker 3>you're okay with only partial information. That's one that's that's

411
00:20:40.119 --> 00:20:41.079
<v Speaker 3>pretty useful for that.

412
00:20:41.440 --> 00:20:42.799
<v Speaker 1>Yeah, yeah, you were talking about this.

413
00:20:42.880 --> 00:20:46.000
<v Speaker 2>Some of these more advanced features in jabscript promises like

414
00:20:46.119 --> 00:20:48.759
<v Speaker 2>all settled that this is where you get some power.

415
00:20:49.039 --> 00:20:52.000
<v Speaker 3>Yeah. The other one if you know you've got that's

416
00:20:52.039 --> 00:20:55.359
<v Speaker 3>that's part that I find particularly powerful. The only use

417
00:20:55.400 --> 00:20:58.799
<v Speaker 3>case I've ever really seen it used for networking type

418
00:20:58.839 --> 00:21:03.680
<v Speaker 3>of stuff, but is the race and where it's like

419
00:21:04.000 --> 00:21:06.240
<v Speaker 3>you just want the first one that can get me

420
00:21:06.279 --> 00:21:09.079
<v Speaker 3>an answer, get me that one nice. So you can

421
00:21:09.240 --> 00:21:12.279
<v Speaker 3>put like, let's say one, two, and three in there,

422
00:21:12.400 --> 00:21:14.400
<v Speaker 3>and once one of them fires, you're good. You've got

423
00:21:14.440 --> 00:21:16.599
<v Speaker 3>an answer. You run with it, right, and it's going

424
00:21:16.640 --> 00:21:18.640
<v Speaker 3>to give up on the other two, right, So from

425
00:21:18.640 --> 00:21:20.599
<v Speaker 3>a speed perspective, that's super nice.

426
00:21:20.640 --> 00:21:22.119
<v Speaker 2>Whether they come back or not, you're just going to

427
00:21:22.200 --> 00:21:26.200
<v Speaker 2>ignore the results, right. So, yeah, you've got multiple services

428
00:21:26.240 --> 00:21:27.880
<v Speaker 2>that can bring you the result. You just want the

429
00:21:27.920 --> 00:21:28.640
<v Speaker 2>fastest one.

430
00:21:28.720 --> 00:21:32.200
<v Speaker 3>Yeah, Now, raise will if one of them fails, it

431
00:21:32.240 --> 00:21:34.200
<v Speaker 3>will fail out the same way as promised at all.

432
00:21:34.799 --> 00:21:37.160
<v Speaker 3>If you do promise that any it will try until

433
00:21:37.160 --> 00:21:39.559
<v Speaker 3>it gets an answer, it will give you the fastest

434
00:21:39.559 --> 00:21:42.200
<v Speaker 3>answer that hasn't failed, and it won't fail until all

435
00:21:42.240 --> 00:21:44.519
<v Speaker 3>of them has failed. So if you really want, just

436
00:21:44.799 --> 00:21:48.200
<v Speaker 3>give me whatever as fast as humanly possible, ignore all

437
00:21:48.240 --> 00:21:52.039
<v Speaker 3>failures unless everything fails, obviously, but it's promised that any

438
00:21:52.319 --> 00:21:55.200
<v Speaker 3>which is kind of really powerful. I have not found

439
00:21:55.240 --> 00:21:58.240
<v Speaker 3>a use case for that one yet, but one day,

440
00:21:58.440 --> 00:21:59.200
<v Speaker 3>one day, I.

441
00:21:59.119 --> 00:22:03.319
<v Speaker 2>Will literally are you know, calling three different services from

442
00:22:03.319 --> 00:22:05.680
<v Speaker 2>three different places that are going to provide the same result,

443
00:22:06.119 --> 00:22:07.640
<v Speaker 2>and any of them will do.

444
00:22:07.680 --> 00:22:09.000
<v Speaker 1>And I don't care if any of them fail as

445
00:22:09.039 --> 00:22:11.559
<v Speaker 1>long as one of them doesn't, right, sure exactly. Yeah,

446
00:22:11.559 --> 00:22:14.319
<v Speaker 1>it's nice. Yeah, that is powerful. It's powerful and a

447
00:22:14.319 --> 00:22:16.559
<v Speaker 1>bit weird, but you know, well strange. I mean, I'm

448
00:22:16.559 --> 00:22:19.440
<v Speaker 1>thinking about the alternatives. The alternative is using sort of

449
00:22:19.519 --> 00:22:22.759
<v Speaker 1>round robin dns. You know, if you've got like three

450
00:22:22.799 --> 00:22:25.480
<v Speaker 1>services that are all trying to share the load or whatever.

451
00:22:25.559 --> 00:22:27.559
<v Speaker 1>But what you're doing is you're hitting all three of

452
00:22:27.640 --> 00:22:30.000
<v Speaker 1>them all at the same time rather than a round robin,

453
00:22:30.119 --> 00:22:33.039
<v Speaker 1>So may put a little more load on the network,

454
00:22:33.119 --> 00:22:35.920
<v Speaker 1>but you at least get the result that you want.

455
00:22:36.200 --> 00:22:36.359
<v Speaker 4>You know.

456
00:22:36.559 --> 00:22:39.839
<v Speaker 1>Yeah, first, first person to give me a chicken sandwich,

457
00:22:40.359 --> 00:22:40.920
<v Speaker 1>I'll eat it.

458
00:22:41.119 --> 00:22:43.480
<v Speaker 3>The other actually, the one of the US because I

459
00:22:43.480 --> 00:22:45.799
<v Speaker 3>could think for that would be if you're calling something

460
00:22:45.839 --> 00:22:48.519
<v Speaker 3>like from a CDN, so you could call multiple CDMs

461
00:22:48.519 --> 00:22:51.039
<v Speaker 3>so that if one of them is down right.

462
00:22:50.960 --> 00:22:54.759
<v Speaker 2>Yeah, yeah, sure you do want that any sense, because

463
00:22:54.759 --> 00:22:56.319
<v Speaker 2>I don't care if there's a failure as long as

464
00:22:56.319 --> 00:22:56.960
<v Speaker 2>there's one that.

465
00:22:56.920 --> 00:22:58.480
<v Speaker 3>Doesn't fail, right exactly.

466
00:22:58.839 --> 00:23:01.480
<v Speaker 1>Yeah, that's what's important. But you do have to throw

467
00:23:01.519 --> 00:23:03.759
<v Speaker 1>the other two chicken sandwiches away, I mean, there isn't

468
00:23:04.000 --> 00:23:04.839
<v Speaker 1>if they if you're.

469
00:23:04.680 --> 00:23:09.000
<v Speaker 3>Goin of like, well it would I'd have to double

470
00:23:09.119 --> 00:23:11.640
<v Speaker 3>check the network. But the network calls from the browser,

471
00:23:11.680 --> 00:23:13.839
<v Speaker 3>but I think it actually abandons the network call, like

472
00:23:13.920 --> 00:23:15.599
<v Speaker 3>it terminates.

473
00:23:15.200 --> 00:23:17.839
<v Speaker 1>If it always drops the connection. Well, that's good.

474
00:23:17.839 --> 00:23:20.440
<v Speaker 3>I think I'd have to double check that, and it

475
00:23:20.559 --> 00:23:23.680
<v Speaker 3>might that might even be browser specific, so that that

476
00:23:23.720 --> 00:23:26.000
<v Speaker 3>would be don't quote me on that one, because I'd

477
00:23:26.000 --> 00:23:26.759
<v Speaker 3>have to actually.

478
00:23:26.519 --> 00:23:28.759
<v Speaker 1>Look at that, But that would be smart. That would be,

479
00:23:29.200 --> 00:23:30.640
<v Speaker 1>you know, in a perfect world.

480
00:23:30.480 --> 00:23:33.559
<v Speaker 3>In a perfect world. Yeah, because the Internet is perfect,

481
00:23:33.559 --> 00:23:37.640
<v Speaker 3>it has yeah never never, and JavaScript is perfect, it

482
00:23:37.640 --> 00:23:38.680
<v Speaker 3>has no flaws.

483
00:23:38.960 --> 00:23:41.400
<v Speaker 1>It's the best language ever.

484
00:23:42.200 --> 00:23:46.079
<v Speaker 3>It was totally thought through when it was created, right.

485
00:23:45.920 --> 00:23:49.519
<v Speaker 1>Oh, definitely. I think it took a weekend, right, So

486
00:23:50.559 --> 00:23:56.200
<v Speaker 1>let's yeah, Well, let's talk about some challenges when approaching

487
00:23:57.000 --> 00:24:02.200
<v Speaker 1>acink JavaScript programming for the first time. What are people

488
00:24:02.359 --> 00:24:03.720
<v Speaker 1>getting hung up on?

489
00:24:04.319 --> 00:24:07.079
<v Speaker 3>One of the common one of the common things I've

490
00:24:07.119 --> 00:24:11.759
<v Speaker 3>seen when I'm teaching people how to use promises is

491
00:24:12.400 --> 00:24:14.880
<v Speaker 3>they'll learn a pattern and they'll try to use it everywhere,

492
00:24:14.880 --> 00:24:16.960
<v Speaker 3>no matter what. And I don't think this is specific

493
00:24:17.039 --> 00:24:17.839
<v Speaker 3>to promises.

494
00:24:18.240 --> 00:24:22.519
<v Speaker 1>Here's your hammer, find the nails exactly.

495
00:24:22.200 --> 00:24:22.960
<v Speaker 4>They'll learn I go.

496
00:24:23.039 --> 00:24:25.440
<v Speaker 3>Let's say they'll learn a sink await right, and they

497
00:24:25.480 --> 00:24:28.480
<v Speaker 3>will regardless of whether it needs to be parallel or not.

498
00:24:28.960 --> 00:24:32.720
<v Speaker 3>They'll just like await everything right. And so I mean,

499
00:24:32.759 --> 00:24:35.839
<v Speaker 3>in the end it works, and this is the piece. Right,

500
00:24:35.839 --> 00:24:37.839
<v Speaker 3>in the end, it works if even if you need

501
00:24:37.880 --> 00:24:40.559
<v Speaker 3>it technically to have them in parallel, you await everything

502
00:24:41.079 --> 00:24:44.799
<v Speaker 3>you you're gonna you're gonna take a performance hit, but

503
00:24:44.880 --> 00:24:48.599
<v Speaker 3>it'll work. Right. So I think those are the most

504
00:24:48.839 --> 00:24:52.000
<v Speaker 3>probably nefarious things because it's.

505
00:24:51.839 --> 00:24:54.799
<v Speaker 1>Not like it's broken, and we have the same problems

506
00:24:54.880 --> 00:24:57.839
<v Speaker 1>sea sharp Right. Once you learn a sync awight, you

507
00:24:57.880 --> 00:25:01.160
<v Speaker 1>want to do everything a sink and don't necessarily need

508
00:25:01.200 --> 00:25:05.359
<v Speaker 1>to a perfect example of this is data access right.

509
00:25:06.359 --> 00:25:10.279
<v Speaker 1>Data access can be completely done with adeo dot net,

510
00:25:10.359 --> 00:25:12.799
<v Speaker 1>which is sort of the lingua franca of dot net,

511
00:25:14.200 --> 00:25:19.319
<v Speaker 1>sql access or whatever, and it can all be done synchronously,

512
00:25:19.359 --> 00:25:21.880
<v Speaker 1>and it should be done synchronously because there isn't any

513
00:25:21.880 --> 00:25:27.319
<v Speaker 1>reason not to. When you add a sync to it,

514
00:25:27.480 --> 00:25:30.759
<v Speaker 1>even though you're not using it now, you're requiring the

515
00:25:30.799 --> 00:25:33.680
<v Speaker 1>method that calls it to be a sync. So property

516
00:25:33.720 --> 00:25:39.079
<v Speaker 1>getters and setters become more difficult, you know, just standard

517
00:25:39.079 --> 00:25:41.440
<v Speaker 1>events that aren't marked a sync that you don't want

518
00:25:41.440 --> 00:25:44.039
<v Speaker 1>to mark a sync that kind of stuff. So, yeah,

519
00:25:44.079 --> 00:25:45.400
<v Speaker 1>we have the same problem over here.

520
00:25:45.559 --> 00:25:49.359
<v Speaker 3>The other one I see, which is again is a

521
00:25:49.359 --> 00:25:52.000
<v Speaker 3>little bit more advanced, but it's the trying to mix

522
00:25:52.079 --> 00:25:55.039
<v Speaker 3>and match two things and make them work well together.

523
00:25:55.200 --> 00:26:00.000
<v Speaker 3>So like not realizing that you can fairly easily transform

524
00:26:00.119 --> 00:26:02.960
<v Speaker 3>a call back into a promise and then trying to

525
00:26:03.079 --> 00:26:05.720
<v Speaker 3>mix your callbacks and your promises and ending up in

526
00:26:05.799 --> 00:26:10.240
<v Speaker 3>some weird, kind of weird Christmas tree jumbold mess because

527
00:26:10.279 --> 00:26:14.279
<v Speaker 3>you're trying to mix the two or same with So

528
00:26:14.720 --> 00:26:18.839
<v Speaker 3>if you're using RXGS and you're using observables in an

529
00:26:18.920 --> 00:26:22.200
<v Speaker 3>RXGS chain, so let's say you have your first you know,

530
00:26:22.240 --> 00:26:25.000
<v Speaker 3>you get your your calling, your observable you get, and

531
00:26:25.000 --> 00:26:27.319
<v Speaker 3>then you're going to do a pipe with your maps

532
00:26:27.319 --> 00:26:30.079
<v Speaker 3>and your switch maps and your all of those things.

533
00:26:30.279 --> 00:26:32.880
<v Speaker 3>You can actually return as part of a switch map

534
00:26:32.920 --> 00:26:35.880
<v Speaker 3>a promise instead of an observable, and it'll take it

535
00:26:35.960 --> 00:26:38.920
<v Speaker 3>like a champion on the output return and observable. So

536
00:26:39.319 --> 00:26:41.440
<v Speaker 3>that's kind of but what I see is people not

537
00:26:41.519 --> 00:26:44.920
<v Speaker 3>realizing that they can do that and that that promise

538
00:26:45.200 --> 00:26:49.279
<v Speaker 3>as long as you're starting with an observable in RXGS,

539
00:26:49.319 --> 00:26:51.559
<v Speaker 3>you can stick and promise in the middle or call

540
00:26:51.640 --> 00:26:54.000
<v Speaker 3>that's actually to a promise in the middle, and it's fine,

541
00:26:54.079 --> 00:26:57.319
<v Speaker 3>and it'll take it. I mean, you're going to get

542
00:26:57.359 --> 00:27:00.440
<v Speaker 3>a one time value. It's not going to be a stream,

543
00:27:00.480 --> 00:27:04.039
<v Speaker 3>but it'll it'll work. And so I see some weirdnesses

544
00:27:04.039 --> 00:27:08.480
<v Speaker 3>in trying to like shoehorn in various often very creative

545
00:27:08.480 --> 00:27:13.680
<v Speaker 3>ways the pieces together with not not quite understanding where

546
00:27:13.680 --> 00:27:16.720
<v Speaker 3>they line up and how you can either turn one

547
00:27:16.759 --> 00:27:20.920
<v Speaker 3>into the other or where chaining can just work and

548
00:27:20.960 --> 00:27:23.519
<v Speaker 3>doesn't have to. And the other big one is like

549
00:27:23.559 --> 00:27:26.039
<v Speaker 3>the Christmas train I talked about before, or instead of

550
00:27:26.160 --> 00:27:28.480
<v Speaker 3>dot venning as a chain, they just kind of start

551
00:27:28.599 --> 00:27:31.759
<v Speaker 3>nesting the dot bens forever and ever amen, which again

552
00:27:31.920 --> 00:27:34.559
<v Speaker 3>works but not ideal and hard to read.

553
00:27:34.720 --> 00:27:37.680
<v Speaker 1>Right right, did you say forever and ever amen? Yes,

554
00:27:38.599 --> 00:27:41.400
<v Speaker 1>Hodding Randy Travis, there, I saw what you did there.

555
00:27:41.519 --> 00:27:44.039
<v Speaker 1>All right, let's take a break and when we get back,

556
00:27:44.079 --> 00:27:46.039
<v Speaker 1>we got some more questions from our tin doubt and

557
00:27:46.079 --> 00:27:49.559
<v Speaker 1>we'll be right back. Don't go away. Did you know

558
00:27:49.599 --> 00:27:53.000
<v Speaker 1>you can easily migrate asp net web apps to Windows

559
00:27:53.039 --> 00:27:57.480
<v Speaker 1>containers on aws. Use the app to container tool to

560
00:27:57.599 --> 00:28:02.440
<v Speaker 1>containerize your iis websites and deploy to aws Managed Container

561
00:28:02.519 --> 00:28:07.119
<v Speaker 1>services with or without Kubernetes. Find out more about app

562
00:28:07.160 --> 00:28:11.839
<v Speaker 1>to container at aws dot Amazon dot com, Slash dot net,

563
00:28:12.039 --> 00:28:19.079
<v Speaker 1>slash modernize, and we're back. It's dot net rock some

564
00:28:19.240 --> 00:28:22.079
<v Speaker 1>Carl Franklin. That's my friend Richard Campbell. Hey there, Martin

565
00:28:22.200 --> 00:28:26.519
<v Speaker 1>dubtny is here. We're talking javascripts and let's see if

566
00:28:26.519 --> 00:28:28.319
<v Speaker 1>you don't want ads. By the way, if you don't

567
00:28:28.359 --> 00:28:30.839
<v Speaker 1>want to hear these breakads, you can become a patron

568
00:28:30.920 --> 00:28:33.160
<v Speaker 1>at Patreon dot dot Nerocks dot com five bucks a

569
00:28:33.160 --> 00:28:35.839
<v Speaker 1>month and we'll give you an ad free feed. Uh okay, Richard,

570
00:28:35.839 --> 00:28:37.519
<v Speaker 1>you had a question, then I want to I have

571
00:28:37.599 --> 00:28:40.440
<v Speaker 1>a question to change course. Yeah, well, just before the

572
00:28:40.480 --> 00:28:43.359
<v Speaker 1>break Martine should have just dropped RxJS in our laps.

573
00:28:43.400 --> 00:28:44.559
<v Speaker 1>I'm like, wait what yeah?

574
00:28:45.319 --> 00:28:47.599
<v Speaker 2>Uh, Because I always thought that the reactive extensions were

575
00:28:47.640 --> 00:28:51.519
<v Speaker 2>important before promises had been standardizing the browsers, like reactive

576
00:28:51.559 --> 00:28:54.680
<v Speaker 2>js came along like twenty fifteen, twenty sixteen, and we

577
00:28:54.720 --> 00:28:58.920
<v Speaker 2>didn't get uniformity on promises to like twenty twenty one,

578
00:29:01.039 --> 00:29:03.799
<v Speaker 2>so it seemed like rxchas's a safe way to go.

579
00:29:03.759 --> 00:29:08.200
<v Speaker 3>Right, it's fairly recently. Yeah, well they have very different purposes,

580
00:29:08.519 --> 00:29:12.799
<v Speaker 3>So okay, like, can you do similar that you? So,

581
00:29:13.480 --> 00:29:16.960
<v Speaker 3>let me back up with rxs and the concept of observables,

582
00:29:17.200 --> 00:29:21.759
<v Speaker 3>assuming it's not an and and I think observable, which

583
00:29:21.799 --> 00:29:24.200
<v Speaker 3>is a whole different ballgame. Let's let's muddel the two

584
00:29:24.240 --> 00:29:27.160
<v Speaker 3>while we're at it, because of course we can't but

585
00:29:28.200 --> 00:29:32.319
<v Speaker 3>an observable, whether it's just a dumb subject, a behavior subject,

586
00:29:32.440 --> 00:29:35.359
<v Speaker 3>or a replace subject, is going to be a stream, right.

587
00:29:35.720 --> 00:29:39.119
<v Speaker 3>Promises are one and done. So the fact that you

588
00:29:39.119 --> 00:29:41.039
<v Speaker 3>can mix and match the two and the fact that

589
00:29:41.079 --> 00:29:44.160
<v Speaker 3>you can kind of make both of them work together

590
00:29:44.680 --> 00:29:48.240
<v Speaker 3>is a nice city. But they have a very different

591
00:29:49.480 --> 00:29:52.079
<v Speaker 3>purposes in the grand scheme of things, Like if I

592
00:29:52.160 --> 00:29:55.160
<v Speaker 3>want to continue listening to something, I can't use it.

593
00:29:55.400 --> 00:29:58.480
<v Speaker 3>I mean, I can do things with promises, but like

594
00:29:58.559 --> 00:30:02.400
<v Speaker 3>I still have to have my listener versus the observable

595
00:30:02.480 --> 00:30:05.319
<v Speaker 3>with Once you subscribe to the observable, you're going to

596
00:30:05.400 --> 00:30:09.279
<v Speaker 3>get that stream until you unsubscribe. Of course, because everything

597
00:30:09.400 --> 00:30:12.240
<v Speaker 3>JavaScript has to be complicated, We're going to add the

598
00:30:12.279 --> 00:30:15.000
<v Speaker 3>async subject in the mix, which is a one and done,

599
00:30:15.039 --> 00:30:17.440
<v Speaker 3>which is an observable you subscribe to as if it

600
00:30:17.559 --> 00:30:21.359
<v Speaker 3>was any other of the observable types, which but it's

601
00:30:21.400 --> 00:30:24.559
<v Speaker 3>not going to fire off the result until it's completed,

602
00:30:24.640 --> 00:30:26.359
<v Speaker 3>so it'll only ever have that one value.

603
00:30:26.440 --> 00:30:28.759
<v Speaker 1>The way I think of reactive extensions is a way

604
00:30:28.799 --> 00:30:32.799
<v Speaker 1>to turn event handling in the classic sense, where you

605
00:30:32.839 --> 00:30:34.960
<v Speaker 1>have event listeners and you do something in the event

606
00:30:35.000 --> 00:30:37.480
<v Speaker 1>handler and just turn that into like you said, a

607
00:30:37.559 --> 00:30:40.359
<v Speaker 1>stream or something that you can query, hey, how many

608
00:30:40.359 --> 00:30:42.920
<v Speaker 1>times did this event occur? And quantify that and give

609
00:30:42.920 --> 00:30:46.000
<v Speaker 1>me the data that was passed in. And that came

610
00:30:46.160 --> 00:30:49.759
<v Speaker 1>really into sharp focus when we interviewed remember Bjorn and

611
00:30:49.799 --> 00:30:55.480
<v Speaker 1>the guys that did the helicopter whatever the drone programs

612
00:30:56.039 --> 00:31:00.359
<v Speaker 1>at NDC, and they wrote a little tool to handle

613
00:31:00.759 --> 00:31:02.960
<v Speaker 1>those because there's a lot of events that come right

614
00:31:03.000 --> 00:31:06.160
<v Speaker 1>when they when they're flying around and they're moving, and

615
00:31:06.720 --> 00:31:11.160
<v Speaker 1>they use the reactive extensions to to manage that, which

616
00:31:11.200 --> 00:31:14.720
<v Speaker 1>would be absolutely impossible trying to do it with event handlers,

617
00:31:15.240 --> 00:31:19.000
<v Speaker 1>timers and things. So anyway, that's that's my understanding of

618
00:31:19.880 --> 00:31:22.519
<v Speaker 1>the reactive kind of observable model.

619
00:31:22.559 --> 00:31:26.640
<v Speaker 3>The I think the most the most. There's kind of

620
00:31:26.680 --> 00:31:30.039
<v Speaker 3>two places I use it a lot. I'm from going

621
00:31:30.079 --> 00:31:32.799
<v Speaker 3>to use observables. I would say one of them is

622
00:31:32.799 --> 00:31:34.640
<v Speaker 3>I do tend to work a lot with Firebase and

623
00:31:34.680 --> 00:31:38.319
<v Speaker 3>Firebase as a real time database and the fire store.

624
00:31:38.359 --> 00:31:40.720
<v Speaker 3>But either way it's it's a real time situation, right,

625
00:31:40.799 --> 00:31:44.960
<v Speaker 3>So I can subscribe to my data, and as data

626
00:31:45.039 --> 00:31:47.319
<v Speaker 3>changes in the database, I'm just going to get the

627
00:31:47.400 --> 00:31:50.640
<v Speaker 3>latest and greatest directly so to me using this, you know,

628
00:31:50.839 --> 00:31:54.160
<v Speaker 3>using the their system. So that's one of the ways

629
00:31:54.160 --> 00:31:57.359
<v Speaker 3>where it's legitimately a stream that I'm you know, connected

630
00:31:57.359 --> 00:32:00.480
<v Speaker 3>to my database directly and I want to get that

631
00:32:00.519 --> 00:32:02.400
<v Speaker 3>stream now. Where that gets interesting, and then you have

632
00:32:02.440 --> 00:32:04.440
<v Speaker 3>to worry about, Okay, I'm piping this to a form

633
00:32:04.759 --> 00:32:07.559
<v Speaker 3>I maybe don't want my form values to go ahead

634
00:32:07.599 --> 00:32:10.000
<v Speaker 3>and update just because somebody else updated the data day.

635
00:32:10.079 --> 00:32:12.720
<v Speaker 3>So there's use cases where you have to start thinking, okay,

636
00:32:12.759 --> 00:32:15.279
<v Speaker 3>where do I want it feeding me the stream or

637
00:32:15.319 --> 00:32:17.960
<v Speaker 3>where do I want it to get the stream? Call

638
00:32:18.000 --> 00:32:20.759
<v Speaker 3>it a one and done, and you know there's there's

639
00:32:20.839 --> 00:32:25.400
<v Speaker 3>months is there. And the other piece is let's say

640
00:32:25.400 --> 00:32:28.400
<v Speaker 3>I have a piece of data in a service, right

641
00:32:28.440 --> 00:32:30.160
<v Speaker 3>that I'm keeping up to date so that I can

642
00:32:30.200 --> 00:32:34.599
<v Speaker 3>potentially send to multiple components or multiple places in might UI, right,

643
00:32:34.720 --> 00:32:37.400
<v Speaker 3>and it might be something local too. I don't know,

644
00:32:37.799 --> 00:32:41.480
<v Speaker 3>let's say it's a let's do the number of visitor

645
00:32:41.519 --> 00:32:43.960
<v Speaker 3>tickers something dumb, right, it doesn't matter what it is.

646
00:32:45.119 --> 00:32:47.640
<v Speaker 3>And so that would be something where I can feed

647
00:32:47.720 --> 00:32:50.599
<v Speaker 3>whatever the latest value is and any component Okay, I

648
00:32:50.680 --> 00:32:53.480
<v Speaker 3>usually use Angular a lot, so any component would go

649
00:32:53.519 --> 00:32:56.359
<v Speaker 3>ahead and you know, get that value an automatically update

650
00:32:56.400 --> 00:32:58.359
<v Speaker 3>and automatically do what it needs to do in the

651
00:32:58.480 --> 00:33:01.720
<v Speaker 3>UI and update the UI according or do some math

652
00:33:01.920 --> 00:33:04.440
<v Speaker 3>or whatever. But those are kind of the two places.

653
00:33:04.559 --> 00:33:08.279
<v Speaker 3>Is either for uy stay in terms of or maybe

654
00:33:08.319 --> 00:33:10.519
<v Speaker 3>turning something off and on and being able to listen

655
00:33:10.559 --> 00:33:13.119
<v Speaker 3>to an action happening anywhere and turn something off and on,

656
00:33:13.400 --> 00:33:16.319
<v Speaker 3>or like dark mode is a good example that way

657
00:33:16.359 --> 00:33:20.319
<v Speaker 3>doesn't matter where the button is and then or because

658
00:33:20.359 --> 00:33:23.079
<v Speaker 3>then I can have the button trigger the update and

659
00:33:23.119 --> 00:33:26.279
<v Speaker 3>then whatever's list switching over the theme is listening to

660
00:33:26.319 --> 00:33:30.000
<v Speaker 3>that to that observable or connected to the database. But

661
00:33:30.039 --> 00:33:34.279
<v Speaker 3>that's a little bit different. Then let's say your your

662
00:33:34.319 --> 00:33:36.759
<v Speaker 3>promises where it's like a one and done. Once it's done,

663
00:33:36.799 --> 00:33:39.759
<v Speaker 3>it's done. It's not there's no continual listening. But it

664
00:33:39.759 --> 00:33:41.680
<v Speaker 3>also means that when you're dealing with the observables, you

665
00:33:41.759 --> 00:33:44.240
<v Speaker 3>have to make sure to stop listening to them at

666
00:33:44.240 --> 00:33:46.720
<v Speaker 3>some point, because otherwise you end up with them. Yeah,

667
00:33:46.960 --> 00:33:49.240
<v Speaker 3>there's a cleanup step that now needs to happen, which

668
00:33:49.359 --> 00:33:52.680
<v Speaker 3>doesn't happen in promises because obviously there were when I'm done.

669
00:33:52.759 --> 00:33:56.279
<v Speaker 2>Okay, so I'm preeting pretty clear on our xas is

670
00:33:56.319 --> 00:33:59.240
<v Speaker 2>for observers connecting to streams and being able to react

671
00:33:59.240 --> 00:34:01.920
<v Speaker 2>to them accordingly. Yeah, maybe I'm not a clear on

672
00:34:02.079 --> 00:34:05.119
<v Speaker 2>where i'd use promises versus async a weight and JavaScript,

673
00:34:05.160 --> 00:34:06.960
<v Speaker 2>because you know, when I look at the rafts to

674
00:34:07.039 --> 00:34:09.280
<v Speaker 2>async a weight, they basically say, hey, this is making

675
00:34:09.320 --> 00:34:10.400
<v Speaker 2>promises nicer.

676
00:34:10.679 --> 00:34:11.079
<v Speaker 1>Yeah.

677
00:34:11.119 --> 00:34:14.400
<v Speaker 3>So yeah, so acync await is just is just a

678
00:34:16.760 --> 00:34:21.239
<v Speaker 3>uh a way to do promises. It's not changing anything.

679
00:34:21.239 --> 00:34:26.360
<v Speaker 3>It's just a how do you want to think of it?

680
00:34:26.599 --> 00:34:29.280
<v Speaker 3>Maybe grammar like how do you want to structure your promise?

681
00:34:29.360 --> 00:34:31.480
<v Speaker 3>That's all that's all it is to It doesn't change

682
00:34:31.480 --> 00:34:33.639
<v Speaker 3>anything about the functionality. It's not do I want to

683
00:34:33.719 --> 00:34:37.039
<v Speaker 3>use asink or promises? It's like I'm using promises and

684
00:34:37.079 --> 00:34:40.039
<v Speaker 3>do I want to write do I wanted to you know,

685
00:34:40.400 --> 00:34:42.639
<v Speaker 3>write it this way or that way? Essentially, that's all.

686
00:34:42.639 --> 00:34:45.039
<v Speaker 3>It's just a syntactic sugar at that point.

687
00:34:44.880 --> 00:34:47.320
<v Speaker 1>And you mentioned that you prefer using asnk a weight

688
00:34:47.400 --> 00:34:50.880
<v Speaker 1>because you can do everything line by line rather than

689
00:34:51.000 --> 00:34:52.800
<v Speaker 1>having dot the n's all over the place.

690
00:34:53.199 --> 00:34:56.239
<v Speaker 3>Yeah, I just it's but it's not going to be.

691
00:34:56.400 --> 00:34:57.800
<v Speaker 3>It's not I'm not going to be able to write

692
00:34:57.840 --> 00:35:00.760
<v Speaker 3>it that way for everything because of the wholeation we

693
00:35:00.760 --> 00:35:03.440
<v Speaker 3>were talking about earlier. Right, it depends on. But if

694
00:35:03.480 --> 00:35:06.800
<v Speaker 3>I'm doing very much A, then B, then C very

695
00:35:06.920 --> 00:35:09.480
<v Speaker 3>programmatically one two, three, four five, then I find it

696
00:35:09.519 --> 00:35:12.559
<v Speaker 3>a lot easier to to handle, especially if I really

697
00:35:12.639 --> 00:35:15.119
<v Speaker 3>don't care about error handling outside of it worked or

698
00:35:15.159 --> 00:35:17.559
<v Speaker 3>it failed like my function worker failed, in which case

699
00:35:17.639 --> 00:35:20.320
<v Speaker 3>I track at the block and I'm done, right.

700
00:35:20.719 --> 00:35:23.199
<v Speaker 1>And you still have access to the ane and all

701
00:35:23.280 --> 00:35:26.519
<v Speaker 1>settled and all that stuff, whether you're using the ACN

702
00:35:27.000 --> 00:35:29.320
<v Speaker 1>syntax or just the promise intex Yeah.

703
00:35:29.159 --> 00:35:33.599
<v Speaker 3>Oh yeah, yeah, because instead of doing promise dot all,

704
00:35:33.960 --> 00:35:36.079
<v Speaker 3>you know, my array of promises dot done, I would

705
00:35:36.119 --> 00:35:41.360
<v Speaker 3>do my results equals away promised dot all, my array

706
00:35:41.440 --> 00:35:43.079
<v Speaker 3>of promises essentially.

707
00:35:43.280 --> 00:35:45.800
<v Speaker 1>Right. Okay, a while ago before the break, you brought

708
00:35:45.880 --> 00:35:49.119
<v Speaker 1>up map, and I'm not so sure many of our

709
00:35:49.119 --> 00:35:52.239
<v Speaker 1>listeners know what that is in another one map switch

710
00:35:52.320 --> 00:35:54.239
<v Speaker 1>or maple switch up.

711
00:35:55.000 --> 00:35:59.199
<v Speaker 3>So those are all various RXGS functions that do various things.

712
00:35:59.239 --> 00:36:02.480
<v Speaker 3>So in our which is okay, so map, there's your

713
00:36:02.599 --> 00:36:05.119
<v Speaker 3>XGS map and then there's map in terms of mapping

714
00:36:05.199 --> 00:36:08.480
<v Speaker 3>in arrays in JavaScript, so of course reduce the same name.

715
00:36:08.519 --> 00:36:10.239
<v Speaker 3>So it's great, and they do different things. It's great.

716
00:36:10.320 --> 00:36:12.800
<v Speaker 1>We'll be confusing at all, not at all, no.

717
00:36:12.559 --> 00:36:16.679
<v Speaker 3>Not at all, but no, those are just ways to

718
00:36:16.960 --> 00:36:24.079
<v Speaker 3>chain in ox in our XGS in order to do

719
00:36:24.199 --> 00:36:26.519
<v Speaker 3>things with the data once you subscribe, you know, once

720
00:36:26.559 --> 00:36:29.760
<v Speaker 3>you're doing something with your observable, right, So map would

721
00:36:29.800 --> 00:36:33.920
<v Speaker 3>allow you to just transform the data and return switch

722
00:36:34.000 --> 00:36:36.880
<v Speaker 3>map allows you to call another observable or promise and

723
00:36:36.920 --> 00:36:40.559
<v Speaker 3>then return that. It's just with various ways of chaining.

724
00:36:40.599 --> 00:36:44.480
<v Speaker 3>And there's I don't know how many, there's at least

725
00:36:44.519 --> 00:36:48.679
<v Speaker 3>twenty or so, if not more. Various ones won't bore

726
00:36:48.760 --> 00:36:51.480
<v Speaker 3>you with the details, really, people can read the dogs.

727
00:36:52.239 --> 00:36:54.840
<v Speaker 1>But yeah, yeah, no, I think the main thing to

728
00:36:54.880 --> 00:36:57.639
<v Speaker 1>know is there's a way to do this. Just go

729
00:36:57.719 --> 00:37:04.000
<v Speaker 1>look at the docks. Yeah, very good. Any other gotchas

730
00:37:04.000 --> 00:37:08.280
<v Speaker 1>that people find when they're starting the ACENC got down

731
00:37:08.320 --> 00:37:09.039
<v Speaker 1>the ACENC path.

732
00:37:09.119 --> 00:37:13.239
<v Speaker 3>I'd say where to put your catches, like where where,

733
00:37:13.280 --> 00:37:17.239
<v Speaker 3>and how to catch your errors, like because you can

734
00:37:17.599 --> 00:37:21.400
<v Speaker 3>say await my promise, dot catch and then return a

735
00:37:21.440 --> 00:37:24.400
<v Speaker 3>different value if it fails in a series of your

736
00:37:24.440 --> 00:37:26.400
<v Speaker 3>asinka weights and then still put it in a try

737
00:37:26.440 --> 00:37:29.159
<v Speaker 3>catch block, which so means that if anything else in

738
00:37:29.199 --> 00:37:31.599
<v Speaker 3>your function fails, then it would just go ahead and catch.

739
00:37:31.840 --> 00:37:34.760
<v Speaker 3>So I would say, think through where your catches are

740
00:37:34.840 --> 00:37:37.039
<v Speaker 3>and what they affect, so that you can know how

741
00:37:37.079 --> 00:37:40.960
<v Speaker 3>and where you're handling your errors, because you can't actually

742
00:37:41.000 --> 00:37:44.519
<v Speaker 3>do put a dot catch something dot catch inside of

743
00:37:44.519 --> 00:37:46.760
<v Speaker 3>a try catch block and then figure out where your

744
00:37:46.840 --> 00:37:49.719
<v Speaker 3>is being caught and by what and how right and

745
00:37:49.760 --> 00:37:53.280
<v Speaker 3>the fact that a trycatch block the catch doesn't return

746
00:37:53.320 --> 00:37:57.000
<v Speaker 3>a value. However, a dot if you do my promise

747
00:37:57.559 --> 00:38:00.519
<v Speaker 3>doc you know, fetch my url whatever, dot catch, so

748
00:38:00.719 --> 00:38:04.199
<v Speaker 3>my promise dot catch, you can actually take the air

749
00:38:04.280 --> 00:38:06.280
<v Speaker 3>or swallow the air and return it if a value

750
00:38:06.320 --> 00:38:09.679
<v Speaker 3>should at sale. So you could potentially have something where

751
00:38:09.960 --> 00:38:11.719
<v Speaker 3>if you can't get a value, you're going to return

752
00:38:11.800 --> 00:38:16.800
<v Speaker 3>some defult object. Right, you could totally do that or no, yeah,

753
00:38:17.119 --> 00:38:18.840
<v Speaker 3>but then what do you do with that air? Or

754
00:38:18.880 --> 00:38:21.079
<v Speaker 3>do you just swallow it and never know what happened?

755
00:38:21.119 --> 00:38:23.559
<v Speaker 3>Do you send it somewhere for air handling? What do

756
00:38:23.639 --> 00:38:26.480
<v Speaker 3>you like if you're going to swallow it, what are

757
00:38:26.519 --> 00:38:28.760
<v Speaker 3>you going to how do you want to handle that

758
00:38:28.800 --> 00:38:30.639
<v Speaker 3>in terms of you knowing it happened or do you

759
00:38:30.679 --> 00:38:31.159
<v Speaker 3>even care?

760
00:38:31.599 --> 00:38:35.360
<v Speaker 1>Right? So it's like, as long as something got returned, right, if.

761
00:38:35.679 --> 00:38:39.000
<v Speaker 3>My dude entered his wrong password, I don't really care

762
00:38:39.039 --> 00:38:40.639
<v Speaker 3>to send that to my server.

763
00:38:40.679 --> 00:38:44.039
<v Speaker 1>You know, right, Like yeah, and c sharp reez that

764
00:38:44.519 --> 00:38:49.320
<v Speaker 1>catch handlers for logging primarily and transforming whatever data is

765
00:38:49.360 --> 00:38:51.519
<v Speaker 1>going to be returned if it's in a method. Right,

766
00:38:51.559 --> 00:38:54.039
<v Speaker 1>If you have a method, you put the whole thing

767
00:38:54.039 --> 00:38:56.559
<v Speaker 1>in a try, but you put the return value up

768
00:38:56.599 --> 00:39:00.239
<v Speaker 1>the top before the try, and then modify it if

769
00:39:00.239 --> 00:39:03.320
<v Speaker 1>everything is fine and it's not all I fits if

770
00:39:03.320 --> 00:39:05.960
<v Speaker 1>you get an exception and return it at the bottom

771
00:39:05.960 --> 00:39:08.599
<v Speaker 1>no matter what, or in a finally. But you know,

772
00:39:08.639 --> 00:39:11.559
<v Speaker 1>that's just a pattern that I use a lot. I've

773
00:39:11.599 --> 00:39:16.800
<v Speaker 1>seen it abused. I've seen try catches nested within catches

774
00:39:17.599 --> 00:39:18.280
<v Speaker 1>for example.

775
00:39:18.440 --> 00:39:21.400
<v Speaker 3>Yep, I've seen those two not good. I've seen those

776
00:39:22.079 --> 00:39:22.599
<v Speaker 3>good or.

777
00:39:22.639 --> 00:39:25.199
<v Speaker 1>Hidden dependencies where every time you tested it, it loaded in

778
00:39:25.239 --> 00:39:28.119
<v Speaker 1>a particular order, so you never realize that actually it

779
00:39:28.159 --> 00:39:30.239
<v Speaker 1>had an order dependency that you weren't protecting yourself from.

780
00:39:30.320 --> 00:39:32.199
<v Speaker 1>Oh no, yeah, it's terrible. Yeah.

781
00:39:32.320 --> 00:39:35.239
<v Speaker 3>Race conditions are fun too, when you've forgotten away somewhere,

782
00:39:35.559 --> 00:39:36.480
<v Speaker 3>oh right, or.

783
00:39:36.440 --> 00:39:38.679
<v Speaker 1>You forgot yeah, oh yeah, that's right.

784
00:39:39.159 --> 00:39:42.320
<v Speaker 3>We do have finally as well. On javascripts we do

785
00:39:42.400 --> 00:39:44.679
<v Speaker 3>have finally as well. But finally in an observable one,

786
00:39:44.719 --> 00:39:46.679
<v Speaker 3>finally and I promise don't work the same, because of

787
00:39:46.719 --> 00:39:51.639
<v Speaker 3>course they don't. Course not, what do you want they

788
00:39:51.760 --> 00:39:54.559
<v Speaker 3>do when they they do when they don't. So finally

789
00:39:54.599 --> 00:39:57.320
<v Speaker 3>in a promise does exactly what you think it's going

790
00:39:57.400 --> 00:39:59.599
<v Speaker 3>to trigger, whether you've succeeded or failed.

791
00:40:00.159 --> 00:40:00.360
<v Speaker 1>Right.

792
00:40:00.440 --> 00:40:04.480
<v Speaker 3>Finally, in a stream will only hit when the stream completes,

793
00:40:04.880 --> 00:40:09.880
<v Speaker 3>so it's not after every successful value. Once the stream completes,

794
00:40:09.920 --> 00:40:13.519
<v Speaker 3>that means you've closed off, or you've said dot complete

795
00:40:13.760 --> 00:40:18.159
<v Speaker 3>or you've shut that down. Well that's once the stream complete. So,

796
00:40:18.400 --> 00:40:20.519
<v Speaker 3>but it's worth noting the difference that it's not going

797
00:40:20.559 --> 00:40:22.199
<v Speaker 3>to be every time you get a value.

798
00:40:22.440 --> 00:40:24.840
<v Speaker 2>Right, this is back to that stream versus one and

799
00:40:24.920 --> 00:40:29.719
<v Speaker 2>done mindset right, correct, It actually is the same. It

800
00:40:29.760 --> 00:40:32.159
<v Speaker 2>is actually I responded the same event it's the closing

801
00:40:32.320 --> 00:40:35.159
<v Speaker 2>of the socket that raises the event. It's just that

802
00:40:35.400 --> 00:40:38.239
<v Speaker 2>in an observable, it doesn't close to you complete exactly.

803
00:40:38.440 --> 00:40:41.000
<v Speaker 1>Can I just make an observation? What's really amazing to me?

804
00:40:41.679 --> 00:40:46.280
<v Speaker 1>We've been doing this show for how in years? Twenty

805
00:40:46.480 --> 00:40:49.760
<v Speaker 1>three something like that, all right, and you've been there

806
00:40:49.760 --> 00:40:51.679
<v Speaker 1>for most of them, Richard, So don't say you're the

807
00:40:51.760 --> 00:40:55.159
<v Speaker 1>new kid. But when I started it, I said, we

808
00:40:55.239 --> 00:40:59.960
<v Speaker 1>are never going to read code on this show, right, right,

809
00:41:00.079 --> 00:41:05.039
<v Speaker 1>But we're getting very close with this. We are well,

810
00:41:05.119 --> 00:41:08.719
<v Speaker 1>and I think we've been close before. I'm following it,

811
00:41:08.760 --> 00:41:11.519
<v Speaker 1>and I'm thinking that a lot of people are following

812
00:41:11.559 --> 00:41:12.400
<v Speaker 1>it too. Yeah, I know.

813
00:41:12.599 --> 00:41:14.760
<v Speaker 2>I appreciate that. I've never had this clearer in my

814
00:41:14.800 --> 00:41:15.800
<v Speaker 2>head than right now.

815
00:41:16.000 --> 00:41:17.880
<v Speaker 1>Yeah, right that. This is why I wanted to call

816
00:41:17.920 --> 00:41:20.280
<v Speaker 1>Martine in the first place. It's like, oh good, if

817
00:41:20.280 --> 00:41:22.639
<v Speaker 1>she's explaining it, I'll probably understand it.

818
00:41:23.039 --> 00:41:25.920
<v Speaker 2>So yes, now, now you see all the roles for

819
00:41:25.960 --> 00:41:29.199
<v Speaker 2>each of these pieces, So that's good. It just makes

820
00:41:29.199 --> 00:41:32.079
<v Speaker 2>sense to where and why you would use this but

821
00:41:32.159 --> 00:41:34.239
<v Speaker 2>don't use it everywhere all the time. Why is that

822
00:41:35.239 --> 00:41:35.760
<v Speaker 2>just complex?

823
00:41:35.800 --> 00:41:39.119
<v Speaker 3>Well, I don't know. You know, if you have a

824
00:41:39.119 --> 00:41:40.079
<v Speaker 3>hammer might as well.

825
00:41:40.199 --> 00:41:42.760
<v Speaker 1>No, here's a hammer.

826
00:41:43.559 --> 00:41:46.960
<v Speaker 3>Yeah, I can CSS important everything. It'll be fine.

827
00:41:47.480 --> 00:41:54.480
<v Speaker 1>No, I can't believe you said that. That's something i'd say.

828
00:41:54.840 --> 00:41:56.320
<v Speaker 3>I have to make fun of it. I have to

829
00:41:56.320 --> 00:41:57.880
<v Speaker 3>make fun of my own world a little bit.

830
00:41:58.360 --> 00:42:01.880
<v Speaker 2>Sure, I appreciate that, and we all do that, but

831
00:42:02.119 --> 00:42:05.559
<v Speaker 2>I do feel like it introduces complexity, and it's only

832
00:42:05.639 --> 00:42:08.360
<v Speaker 2>if you need it you should be asynchronous. That this

833
00:42:08.639 --> 00:42:11.840
<v Speaker 2>does delay the rendering of a page. This isn't essential

834
00:42:11.880 --> 00:42:14.320
<v Speaker 2>for people being able to do their work. Oh yeah,

835
00:42:14.719 --> 00:42:16.440
<v Speaker 2>I really like a web page.

836
00:42:16.440 --> 00:42:19.679
<v Speaker 1>I've that's crafted in a way where I'm still able

837
00:42:19.679 --> 00:42:21.239
<v Speaker 1>to click on what I need because I knew where

838
00:42:21.280 --> 00:42:23.000
<v Speaker 1>it was before the page was even finished loading. And

839
00:42:23.039 --> 00:42:26.039
<v Speaker 1>it'll continue. It's fine. And an ACYNC tolerates that.

840
00:42:26.280 --> 00:42:29.320
<v Speaker 3>Yeah, And that actually has more to do with how

841
00:42:29.360 --> 00:42:33.280
<v Speaker 3>the JavaScript is loaded into the I mean there's two

842
00:42:33.320 --> 00:42:35.639
<v Speaker 3>aspects to that. There's one, how are you loading that

843
00:42:35.760 --> 00:42:39.039
<v Speaker 3>JavaScript while into the browser? Right, because you you might

844
00:42:39.079 --> 00:42:42.119
<v Speaker 3>have browser you might have JavaScript that's needed immediately on

845
00:42:42.199 --> 00:42:45.239
<v Speaker 3>the page load, versus you can get there when it

846
00:42:45.320 --> 00:42:49.599
<v Speaker 3>gets there and then you can the actual the If

847
00:42:49.599 --> 00:42:53.280
<v Speaker 3>you're doing dumb HTML, you've got the source on the

848
00:42:53.320 --> 00:42:55.400
<v Speaker 3>source attribute. You can go ahead and put an acinc

849
00:42:55.440 --> 00:42:59.440
<v Speaker 3>decorator and go ahead and make that, I think. But

850
00:43:00.199 --> 00:43:03.079
<v Speaker 3>so that's part number one, and then part number two

851
00:43:03.199 --> 00:43:06.440
<v Speaker 3>is how did you structure your HTML and what not

852
00:43:06.599 --> 00:43:09.960
<v Speaker 3>to render based on when? When things load right? And

853
00:43:10.000 --> 00:43:12.280
<v Speaker 3>what data do you need to load? Wet But there's

854
00:43:12.320 --> 00:43:15.079
<v Speaker 3>two there's two aspects to that, which is also how

855
00:43:15.199 --> 00:43:18.920
<v Speaker 3>is this JavaScript itself being loaded into the browser that

856
00:43:18.960 --> 00:43:21.119
<v Speaker 3>may or may not block the rendering of the browser.

857
00:43:21.159 --> 00:43:23.320
<v Speaker 3>And now you're getting into the whole core web vitals

858
00:43:23.320 --> 00:43:24.880
<v Speaker 3>thing and all that fun stuff.

859
00:43:24.920 --> 00:43:27.599
<v Speaker 1>But yeah, just because I'm too impatient away for a

860
00:43:27.599 --> 00:43:30.119
<v Speaker 1>whole patient render. You know, a lot of these rules

861
00:43:30.159 --> 00:43:33.440
<v Speaker 1>that Martine is talking about also apply in Blazer programming. Yeah,

862
00:43:33.440 --> 00:43:36.960
<v Speaker 1>I mean it's basically web programming, you know, in web

863
00:43:37.039 --> 00:43:39.360
<v Speaker 1>is web. So that's a good if any of the

864
00:43:39.400 --> 00:43:42.840
<v Speaker 1>Blazer programmers listening too. It's a good rule to only

865
00:43:42.920 --> 00:43:45.719
<v Speaker 1>use a sink when you need a sinc. Very good rule. Yeah,

866
00:43:45.960 --> 00:43:48.639
<v Speaker 1>your environment's still the same, it's just the coding language chain,

867
00:43:48.679 --> 00:43:52.039
<v Speaker 1>that's right, because it presumably the user's needs are the same,

868
00:43:52.159 --> 00:43:53.440
<v Speaker 1>like users.

869
00:43:53.159 --> 00:43:58.039
<v Speaker 3>Are impatient presumably Yeah, yeah, yeah, one the faster you

870
00:43:58.159 --> 00:44:00.679
<v Speaker 3>get it up there too. I mean there's from a

871
00:44:00.719 --> 00:44:04.079
<v Speaker 3>pure marketing and se O. Your SEU has good. If

872
00:44:04.079 --> 00:44:06.320
<v Speaker 3>you've got a quicker to click time, your SEO is

873
00:44:06.360 --> 00:44:08.280
<v Speaker 3>going to go up. Your marketing people are going to

874
00:44:08.320 --> 00:44:10.599
<v Speaker 3>be happier, Like, there's all the reasons right right.

875
00:44:11.199 --> 00:44:14.840
<v Speaker 1>People are never happy happy? Did I say that out loud?

876
00:44:14.920 --> 00:44:19.880
<v Speaker 1>I feel bad. You want some fun when you're working

877
00:44:19.920 --> 00:44:22.440
<v Speaker 1>in a development shop, go talk to the sales guys.

878
00:44:22.519 --> 00:44:25.159
<v Speaker 1>Oh yeah, oh yeah, they don't like us. You know,

879
00:44:25.320 --> 00:44:27.679
<v Speaker 1>they do not like us in the end, and we

880
00:44:27.719 --> 00:44:30.480
<v Speaker 1>don't like them because they promise features you know that

881
00:44:31.079 --> 00:44:32.920
<v Speaker 1>you don't even know about. You don't even know about

882
00:44:33.000 --> 00:44:35.559
<v Speaker 1>much less know when you're delivered. Good idea to have

883
00:44:35.679 --> 00:44:37.679
<v Speaker 1>lunch with a sales guy once a week. What have

884
00:44:37.760 --> 00:44:41.920
<v Speaker 1>you promised this year? A good idea for the manager?

885
00:44:41.920 --> 00:44:43.400
<v Speaker 3>Where did you get your estimates?

886
00:44:43.639 --> 00:44:45.039
<v Speaker 1>Yeah? What lines have you told?

887
00:44:45.119 --> 00:44:45.280
<v Speaker 5>Oh?

888
00:44:45.360 --> 00:44:46.920
<v Speaker 3>You just rolled a handful of dies?

889
00:44:47.480 --> 00:44:52.880
<v Speaker 1>Got it? I remember working for a software company and

890
00:44:53.760 --> 00:44:59.199
<v Speaker 1>he basically used the word on all the time as

891
00:44:59.239 --> 00:45:02.559
<v Speaker 1>a verb. Something of part of his job description was

892
00:45:02.559 --> 00:45:06.679
<v Speaker 1>constantly unaff ing the things that need that were screwed up.

893
00:45:07.119 --> 00:45:08.239
<v Speaker 1>He was an angry man.

894
00:45:11.480 --> 00:45:17.639
<v Speaker 3>I've never used I've never used the F word in relationships,

895
00:45:17.719 --> 00:45:19.119
<v Speaker 3>my job, or anything I was doing.

896
00:45:19.199 --> 00:45:25.039
<v Speaker 1>Never, no, no, never never never. Okay, you heard it

897
00:45:25.119 --> 00:45:29.800
<v Speaker 1>here first, folks. It's actually not a bad job title,

898
00:45:29.960 --> 00:45:39.440
<v Speaker 1>you know, Carl Franklin. It's like, oh, you're the as man.

899
00:45:40.960 --> 00:45:43.000
<v Speaker 3>We had a q I person we called the Harborder

900
00:45:43.079 --> 00:45:44.199
<v Speaker 3>of Doom for a long time.

901
00:45:44.719 --> 00:45:49.400
<v Speaker 1>I like that the Arbor of Doom approaches.

902
00:45:50.920 --> 00:45:52.239
<v Speaker 3>In terms of fun titles.

903
00:45:54.280 --> 00:45:55.559
<v Speaker 1>Yeah, definitely.

904
00:45:55.599 --> 00:45:58.079
<v Speaker 2>When I was in my INFOSEC roles, it was like, oh,

905
00:45:58.159 --> 00:46:00.360
<v Speaker 2>here comes the business impediment off.

906
00:46:06.920 --> 00:46:08.639
<v Speaker 3>Now which role was that? Because I can think of

907
00:46:08.719 --> 00:46:09.599
<v Speaker 3>multiple roles for that.

908
00:46:09.719 --> 00:46:12.880
<v Speaker 1>Yeah. Yeah, there's a bunch of folks like that. You

909
00:46:12.880 --> 00:46:17.440
<v Speaker 1>could argue the QA guys that, but INFOSEC especially, Yeah. Yeah,

910
00:46:18.400 --> 00:46:22.760
<v Speaker 1>you will authenticate this person before anything proceeds. Sellers to that.

911
00:46:23.039 --> 00:46:24.639
<v Speaker 1>You know what though, I mean, you know, if you

912
00:46:24.719 --> 00:46:28.000
<v Speaker 1>have special roles in your database for users that they're

913
00:46:28.000 --> 00:46:29.559
<v Speaker 1>never going to see what they are, you can make

914
00:46:29.599 --> 00:46:36.480
<v Speaker 1>them whatever you want, right, So get creative. Some day

915
00:46:36.639 --> 00:46:40.119
<v Speaker 1>that person realizes you tag their role as Harborder of Doom.

916
00:46:41.000 --> 00:46:45.320
<v Speaker 1>Some day Harboringer of Doom.

917
00:46:49.280 --> 00:46:51.239
<v Speaker 4>I did have a client once. One of the first

918
00:46:51.239 --> 00:46:52.920
<v Speaker 4>things I had to do for them is they asked me.

919
00:46:52.920 --> 00:46:56.920
<v Speaker 4>They're like, okay, we've been laxed, but unfortunately now we're

920
00:46:56.960 --> 00:46:59.639
<v Speaker 4>shipping you know, this bundle to our clients, and so

921
00:46:59.679 --> 00:47:01.639
<v Speaker 4>they can see our code. You need to go through

922
00:47:02.360 --> 00:47:04.760
<v Speaker 4>and find all the profanity and.

923
00:47:04.719 --> 00:47:12.880
<v Speaker 1>Remove and also just like comments like wtf what was

924
00:47:12.920 --> 00:47:16.440
<v Speaker 1>I thinking? My family clearly wrote this because nobody else

925
00:47:16.480 --> 00:47:18.199
<v Speaker 1>could have No.

926
00:47:18.360 --> 00:47:20.719
<v Speaker 3>My favorite was the number of times I all because

927
00:47:20.760 --> 00:47:23.199
<v Speaker 3>I E. And I've written this in code basiness before.

928
00:47:23.280 --> 00:47:25.119
<v Speaker 3>So it made me double laugh because I was like,

929
00:47:25.199 --> 00:47:27.920
<v Speaker 3>I haven't touched this before. How is my comments in here?

930
00:47:28.480 --> 00:47:31.159
<v Speaker 3>Because I E. Is being a little sleep.

931
00:47:33.159 --> 00:47:37.000
<v Speaker 1>Yes, that's legit. They shouldn't even be removed. That's just

932
00:47:37.039 --> 00:47:46.400
<v Speaker 1>being honest, right right, I E. I E. Defect resistance requirements. Yep,

933
00:47:47.039 --> 00:47:50.079
<v Speaker 1>Like wtf I see that in code all the time?

934
00:47:51.960 --> 00:47:55.719
<v Speaker 1>Who wrote this crap? Well?

935
00:47:56.159 --> 00:47:58.840
<v Speaker 2>I had a standard tag, you know, like a paragraph

936
00:47:58.880 --> 00:48:00.760
<v Speaker 2>at the top of each of the perform misdoing things.

937
00:48:00.840 --> 00:48:02.360
<v Speaker 2>Just like if this doesn't make sense to you, do

938
00:48:02.480 --> 00:48:05.199
<v Speaker 2>not touch it. Yeah, ask someone else.

939
00:48:06.920 --> 00:48:09.679
<v Speaker 3>Yeah, yeah, I do have a I do have a

940
00:48:09.679 --> 00:48:12.960
<v Speaker 3>phone on a project. If you think about touching this file,

941
00:48:13.039 --> 00:48:13.800
<v Speaker 3>I will haunt you.

942
00:48:15.199 --> 00:48:19.639
<v Speaker 1>Yeah. The curse the curse, curse on your head comes

943
00:48:19.639 --> 00:48:22.440
<v Speaker 1>your Liam Neeson. I will find you and I will

944
00:48:22.519 --> 00:48:22.880
<v Speaker 1>kill you.

945
00:48:25.960 --> 00:48:26.360
<v Speaker 3>Yes.

946
00:48:27.199 --> 00:48:30.079
<v Speaker 1>Oh what the heck? Were we talking about JavaScript?

947
00:48:30.960 --> 00:48:32.400
<v Speaker 3>Of JavaScript and where we love it?

948
00:48:32.519 --> 00:48:35.039
<v Speaker 1>Yeah, the wonders. That's why we got to profanity. It

949
00:48:35.039 --> 00:48:42.840
<v Speaker 1>was inevitable. I mean, oh man, oh man. Well I'm

950
00:48:42.840 --> 00:48:46.639
<v Speaker 1>really grateful. This is a great explanation. It seems it

951
00:48:46.719 --> 00:48:48.760
<v Speaker 1>seems like you shouldn't be afraid of this stuff. It's

952
00:48:48.760 --> 00:48:50.760
<v Speaker 1>been and it's been true for a few years now.

953
00:48:50.800 --> 00:48:53.760
<v Speaker 1>Like I just double checked, and like since roughly twenty

954
00:48:53.760 --> 00:48:56.880
<v Speaker 1>twenty one, every browser responded more or less the same

955
00:48:56.920 --> 00:48:58.920
<v Speaker 1>to this, so you can count on it.

956
00:48:59.039 --> 00:49:01.599
<v Speaker 3>That's good and available in Node as well, so if

957
00:49:01.599 --> 00:49:03.440
<v Speaker 3>you're in you know, if you're in that side of

958
00:49:03.480 --> 00:49:07.440
<v Speaker 3>the universe, it does totally work there too, which is

959
00:49:07.480 --> 00:49:07.920
<v Speaker 3>super cool.

960
00:49:07.960 --> 00:49:10.639
<v Speaker 2>If you weren't frustrated enough with no JS, try ASNC

961
00:49:10.679 --> 00:49:11.280
<v Speaker 2>and no j as.

962
00:49:11.920 --> 00:49:13.039
<v Speaker 1>Yeah.

963
00:49:13.039 --> 00:49:15.280
<v Speaker 3>Well that's the thing though for a node for a

964
00:49:15.360 --> 00:49:17.719
<v Speaker 3>long time you had to have a package for doing

965
00:49:17.760 --> 00:49:22.840
<v Speaker 3>a sync and so now it's actually legitimately available in node.

966
00:49:23.159 --> 00:49:25.920
<v Speaker 1>They're using the engine. Yeah, because it's part of the language.

967
00:49:26.000 --> 00:49:30.320
<v Speaker 1>Yeah right, yeah, that's good. Uh well, Martine Is there

968
00:49:30.320 --> 00:49:32.840
<v Speaker 1>anything that we missed that you want to anything? You

969
00:49:32.880 --> 00:49:35.440
<v Speaker 1>want to plug or talk about your book? You said

970
00:49:35.440 --> 00:49:36.280
<v Speaker 1>you wrote a paper.

971
00:49:36.559 --> 00:49:40.960
<v Speaker 3>Oh, I'm I mean I have my blog articles up

972
00:49:40.960 --> 00:49:45.599
<v Speaker 3>on the blog for Andromeda Galactic dot com. I also twitch.

973
00:49:46.159 --> 00:49:50.159
<v Speaker 3>I'm working on moving my Twitch to Monday nights. So

974
00:49:50.519 --> 00:49:55.039
<v Speaker 3>definitely come look food, look for me there. Don't hesitate

975
00:49:55.079 --> 00:49:58.199
<v Speaker 3>to come say hi. It's kind of hip random what

976
00:49:58.280 --> 00:50:01.800
<v Speaker 3>will hit but it'll be front and dev something and you.

977
00:50:01.719 --> 00:50:04.440
<v Speaker 1>Have Martine dot dev. Can you code and chat at

978
00:50:04.480 --> 00:50:08.280
<v Speaker 1>the same time like that? I can't really challenge that's crazy.

979
00:50:08.039 --> 00:50:11.119
<v Speaker 3>As long as it's something like there's so much in

980
00:50:11.280 --> 00:50:15.960
<v Speaker 3>UI that's memorization, that's the same stuff no matter what.

981
00:50:16.039 --> 00:50:19.639
<v Speaker 3>Like yeah, I might do my column with's through my robe.

982
00:50:20.039 --> 00:50:22.960
<v Speaker 3>Height's a little bit different depending on the layout. But realistically,

983
00:50:23.000 --> 00:50:25.880
<v Speaker 3>writing a writing the CSS to write a great is

984
00:50:25.880 --> 00:50:27.440
<v Speaker 3>going to be more or less the same every time,

985
00:50:27.559 --> 00:50:29.920
<v Speaker 3>or a flex or whatever. Yeah, as long as I

986
00:50:29.960 --> 00:50:32.039
<v Speaker 3>figured out what I'm going to write most of the

987
00:50:32.079 --> 00:50:36.000
<v Speaker 3>actual typing it out, I can do well. Chatting nice,

988
00:50:36.119 --> 00:50:37.280
<v Speaker 3>not too difficultly.

989
00:50:37.440 --> 00:50:41.440
<v Speaker 1>And your your personal website is Martin dot dev right correct?

990
00:50:41.760 --> 00:50:44.239
<v Speaker 3>Yes, And all the links are all there.

991
00:50:44.360 --> 00:50:47.119
<v Speaker 1>Yeah, stream links there, the blog links there, like everything

992
00:50:47.159 --> 00:50:48.679
<v Speaker 1>you need is there. You told us the story, but

993
00:50:48.760 --> 00:50:50.199
<v Speaker 1>tell the users how you got that.

994
00:50:50.679 --> 00:50:54.159
<v Speaker 3>So when the dot dev extension came out for being

995
00:50:54.159 --> 00:50:56.599
<v Speaker 3>able to get domains, the first thing I did, and

996
00:50:56.679 --> 00:50:58.679
<v Speaker 3>like right came out. I want to look, I wanted

997
00:50:58.679 --> 00:51:01.679
<v Speaker 3>to get Martin dot dev and it was Bob, and

998
00:51:01.880 --> 00:51:08.280
<v Speaker 3>I cussed up because I never used the F word,

999
00:51:08.360 --> 00:51:10.760
<v Speaker 3>so it was definitely not used in this use case.

1000
00:51:11.360 --> 00:51:14.320
<v Speaker 3>Cursing of whoever might have bought it, et cetera, et cetera,

1001
00:51:14.400 --> 00:51:18.480
<v Speaker 3>et cetera. It turned out that my partner Michael had

1002
00:51:18.480 --> 00:51:21.239
<v Speaker 3>bought it for me, so so nice.

1003
00:51:21.079 --> 00:51:26.440
<v Speaker 2>A story from rage to delight exactly.

1004
00:51:26.519 --> 00:51:29.239
<v Speaker 1>I mean, that's that's like if I had Carl dot com.

1005
00:51:29.320 --> 00:51:33.000
<v Speaker 1>You know, that's really good Martin dot dev fantastic, really good.

1006
00:51:33.159 --> 00:51:34.920
<v Speaker 3>Yeah well, I mean it has the advantage of not

1007
00:51:34.960 --> 00:51:37.440
<v Speaker 3>being too common of a name, so got lucky.

1008
00:51:37.440 --> 00:51:40.480
<v Speaker 1>I'm not well, this has been great, Thank you very much, Martine.

1009
00:51:40.599 --> 00:51:43.000
<v Speaker 1>And uh, well we'll talk to you probably in a

1010
00:51:43.039 --> 00:51:44.840
<v Speaker 1>year or so, because we seem to be talking to

1011
00:51:44.880 --> 00:51:49.039
<v Speaker 1>you once a year. Yeah.

1012
00:51:47.760 --> 00:51:51.360
<v Speaker 3>Yeah, well, I'll be delighted to come back anytime you

1013
00:51:51.400 --> 00:51:51.719
<v Speaker 3>want me.

1014
00:51:52.000 --> 00:51:54.599
<v Speaker 1>Great, Thanks all right, and we'll talk to you next

1015
00:51:54.639 --> 00:52:18.840
<v Speaker 1>time on dot net rocks. Dot net rocks is brought

1016
00:52:18.840 --> 00:52:22.280
<v Speaker 1>to you by Franklin's Net and produced by Pop Studios,

1017
00:52:22.639 --> 00:52:26.679
<v Speaker 1>a full service audio, video and post production facility located

1018
00:52:26.719 --> 00:52:29.639
<v Speaker 1>physically in New London, Connecticut, and of course in the

1019
00:52:29.679 --> 00:52:33.599
<v Speaker 1>cloud online at pwop dot com.

1020
00:52:33.760 --> 00:52:35.920
<v Speaker 5>Visit our website at d O T N E t

1021
00:52:36.159 --> 00:52:40.159
<v Speaker 5>R O c k S dot com for RSS feeds, downloads,

1022
00:52:40.320 --> 00:52:44.000
<v Speaker 5>mobile apps, comments, and access to the full archives going

1023
00:52:44.039 --> 00:52:46.639
<v Speaker 5>back to show number one, recorded.

1024
00:52:46.159 --> 00:52:48.920
<v Speaker 1>In September two thousand and two. And make sure you

1025
00:52:49.000 --> 00:52:52.119
<v Speaker 1>check out our sponsors. They keep us in business. Now,

1026
00:52:52.159 --> 00:52:54.400
<v Speaker 1>go write some code, see you next time.

1027
00:52:55.280 --> 00:52:55.719
<v Speaker 5>You got you

1028
00:53:00.880 --> 00:53:06.079
<v Speaker 3>D that Bess home and my taxes a line d
