1
00:00:01,080 --> 00:00:03,799
Speaker 1: How'd you like to listen to dot NetRocks with no ads?

2
00:00:04,440 --> 00:00:04,799
Speaker 2: Easy?

3
00:00:05,360 --> 00:00:08,560
Speaker 1: Become a patron for just five dollars a month. You

4
00:00:08,599 --> 00:00:11,320
get access to a private RSS feed where all the

5
00:00:11,359 --> 00:00:14,560
shows have no ads. Twenty dollars a month will get

6
00:00:14,599 --> 00:00:18,440
you that and a special dot NetRocks patron mug. Sign

7
00:00:18,519 --> 00:00:35,119
up now at Patreon dot dot NetRocks dot com. Hey

8
00:00:35,159 --> 00:00:38,479
guess what, it's dot net rocks all over again. I'm

9
00:00:38,520 --> 00:00:41,600
Carl Franklin, an amateur camp here for your geeking out

10
00:00:41,640 --> 00:00:46,079
and you know, all that pleasure. If you're dot NetRocks pleasure,

11
00:00:47,280 --> 00:00:48,679
I hope you're having a good week.

12
00:00:49,079 --> 00:00:49,479
Speaker 2: We are.

13
00:00:49,840 --> 00:00:53,880
Speaker 1: We're getting ready to head to Orlando for dev Intersection,

14
00:00:54,079 --> 00:00:55,320
which should be going on.

15
00:00:56,280 --> 00:00:59,119
Speaker 2: Yeah, yeah, this show will come out, This show will go,

16
00:00:59,320 --> 00:01:01,840
Will we go? Will be on when we're in Orlando.

17
00:01:01,960 --> 00:01:04,159
Speaker 1: Right right now, we're probably up on the stage giving

18
00:01:04,159 --> 00:01:05,120
prizes away.

19
00:01:04,920 --> 00:01:07,239
Speaker 2: Or doing something silly, which we are prone to doing.

20
00:01:07,359 --> 00:01:09,719
Speaker 1: Yeah, to do well. We've got a lot of interest

21
00:01:09,719 --> 00:01:13,000
stuff to get through. So let's talk about nineteen seventy one.

22
00:01:13,280 --> 00:01:16,239
Speaker 2: This is the all right you begin friend, because it's

23
00:01:16,280 --> 00:01:20,120
a big year. It's a big year. So let's see.

24
00:01:21,519 --> 00:01:23,480
Speaker 1: I'm going to talk about some of the cultural stuff

25
00:01:23,519 --> 00:01:26,480
like the rock bands formed in nineteen seventy one include

26
00:01:26,519 --> 00:01:30,879
The Eagles, Queen fog Hat, New York Dolls, and Roxy Music.

27
00:01:32,959 --> 00:01:36,879
Radio and TV advertisements for cigarettes were banned in the USA.

28
00:01:37,159 --> 00:01:37,400
Speaker 2: Yeah.

29
00:01:37,480 --> 00:01:42,000
Speaker 1: At the beginning of that, Rolls Royce went bankrupt again. Yeah,

30
00:01:42,040 --> 00:01:43,920
the first ever email.

31
00:01:43,599 --> 00:01:45,680
Speaker 2: Was sent up. I got a whole piece on that

32
00:01:45,879 --> 00:01:49,280
quirty IOP or something like that or test one two three,

33
00:01:49,959 --> 00:01:50,719
he doesn't remember.

34
00:01:50,879 --> 00:01:55,799
Speaker 1: Yeah. The Nastac made its debut on Wall Street. Evil

35
00:01:55,840 --> 00:01:58,599
Knievel set a world record. I can't remember if he

36
00:01:58,680 --> 00:02:01,239
actually crashed or not, but he probably did. That was

37
00:02:01,280 --> 00:02:05,519
his stick. Hey watch this hold my beer boom set

38
00:02:05,560 --> 00:02:07,840
a record, but I broke every bone in my body.

39
00:02:08,800 --> 00:02:11,439
Ed Sullivan Show aired its last episode.

40
00:02:11,680 --> 00:02:12,240
Speaker 2: End of an era.

41
00:02:12,560 --> 00:02:15,520
Speaker 1: The New York Times started publishing The Pentagon Papers.

42
00:02:15,960 --> 00:02:22,400
Speaker 2: Jim Morrison died. Yeah. Yeah, Tormented soul, Tormented soul. Yeah.

43
00:02:22,599 --> 00:02:29,039
Speaker 1: Four countries gained independence Bangladesh, Baja Rain, Qatar, and the

44
00:02:29,280 --> 00:02:35,120
United Arab Emirates. China was admitted the General Assembly at

45
00:02:35,159 --> 00:02:38,599
the United Nations. M you're going to talk about that.

46
00:02:38,759 --> 00:02:41,560
Let's see. Oh, Charles Manson and three of his followers

47
00:02:41,560 --> 00:02:46,039
were convicted. Starbucks opened their first store. Yeah, I mean

48
00:02:46,120 --> 00:02:49,879
became president of Uganda. Well, Disney World opened in Florida,

49
00:02:51,400 --> 00:02:54,599
and there's so many more, but I'm going to pass

50
00:02:54,639 --> 00:02:56,560
the baton over to you, my friend. What happened in

51
00:02:56,599 --> 00:02:59,000
science and space? Let's do space First.

52
00:03:00,240 --> 00:03:02,360
Speaker 2: Fourteen and PAULA fifteen are both in nineteen seventy one,

53
00:03:02,400 --> 00:03:05,800
and paul Of fourteen was the last of the original missions.

54
00:03:06,120 --> 00:03:08,800
That's Alan Shepard was the commander on it. It's the

55
00:03:08,840 --> 00:03:13,039
first American into space on Mercury. And of course he

56
00:03:13,159 --> 00:03:15,280
was a big golfer, so he brought a golf club

57
00:03:15,800 --> 00:03:19,120
and whacked a ball on the Moon. That ball has

58
00:03:19,159 --> 00:03:23,479
not been found. That kind of went far. It's been somewhere,

59
00:03:23,759 --> 00:03:27,919
went somewhere. PAULA fifteen was the first of the extended missions,

60
00:03:27,960 --> 00:03:30,520
so doubling the time on the Moon, plus when they

61
00:03:30,639 --> 00:03:32,759
introduced the rover so they were able to travel a

62
00:03:32,840 --> 00:03:36,759
lot farther on the Soviet side. Having lost the race

63
00:03:36,759 --> 00:03:39,520
to the Moon, they began on space stations and in

64
00:03:39,599 --> 00:03:44,280
nineteen seventy one lifted off with Salute one, only designed

65
00:03:44,280 --> 00:03:46,759
to function for six months, so it went up in

66
00:03:46,800 --> 00:03:50,159
April was deorbity in October. There were only two missions

67
00:03:50,159 --> 00:03:55,199
to it, so used ten soft docked but couldn't hard dock,

68
00:03:55,319 --> 00:03:57,560
so ultimately, after a few hours they had to give

69
00:03:57,639 --> 00:04:02,000
up and re enter, which unforture and the Soyu's eleven

70
00:04:02,159 --> 00:04:05,080
successfully docked and the crew spent twenty three days on

71
00:04:05,120 --> 00:04:10,560
the mission doing a bunch of experiments, and unfortunately on

72
00:04:10,759 --> 00:04:15,240
re entry the capsule depressurized and all three were assixiated,

73
00:04:15,280 --> 00:04:17,759
the first and only time that we actually had a

74
00:04:17,800 --> 00:04:21,759
crew die above the Carmen line versus been other astronauts

75
00:04:21,759 --> 00:04:26,759
lost at other times, but Georgie de belfe Ski, Vladislav Volkov,

76
00:04:26,839 --> 00:04:30,720
and Victor Patsayev were found dead in the capsule after

77
00:04:30,759 --> 00:04:35,720
re entry. But I would say that the Salute one

78
00:04:36,560 --> 00:04:40,199
is the core designed for every space station going forward,

79
00:04:40,279 --> 00:04:44,519
with the exception of Skylab the Chinese the space station

80
00:04:44,639 --> 00:04:48,759
is derived from Salute. All the salutes obviously ends and

81
00:04:49,360 --> 00:04:52,879
mirror and this Vezda module on the ISS. The core,

82
00:04:52,959 --> 00:04:55,319
which is the core control module for the International Space

83
00:04:55,319 --> 00:05:00,439
Station also derived from SCOT from Salute. On the computing side,

84
00:05:00,600 --> 00:05:03,120
Big Year this is the year that Intel ships the

85
00:05:03,160 --> 00:05:07,000
four thousand and four, the first CPU. It's an eighteen

86
00:05:07,079 --> 00:05:10,439
pin DIP twenty three hundred transistors on board. It's a

87
00:05:10,480 --> 00:05:12,600
four bit processor at one hundred and fifty killoer hurtz.

88
00:05:13,040 --> 00:05:14,759
It'll go on to be in a bunch of calculators,

89
00:05:14,759 --> 00:05:16,160
and of course they'll go on to go onto the

90
00:05:16,160 --> 00:05:21,879
eight thousand series and everything you're using right now. Yeah.

91
00:05:21,439 --> 00:05:25,439
The floppy disc is first developed at IBM by a

92
00:05:25,439 --> 00:05:28,560
guy named Alan Shugart. Although limittedly he led the project.

93
00:05:28,639 --> 00:05:30,759
He recognized that name if you remember the Shoeguart drive.

94
00:05:31,639 --> 00:05:34,079
That original floppy disk is an eight inch format. It's

95
00:05:34,079 --> 00:05:36,519
called the IBM twenty three FD and it is read

96
00:05:36,680 --> 00:05:40,079
only oh eighty K of data. There's a separate hardware

97
00:05:40,120 --> 00:05:42,800
to actually write on the disc. And these were meant

98
00:05:42,879 --> 00:05:45,519
for updates to the System three seventy, So you would

99
00:05:45,560 --> 00:05:47,800
get a twenty three FD as part of your System

100
00:05:47,839 --> 00:05:50,000
three seventy and do updates with eight inch discs. There'll

101
00:05:50,000 --> 00:05:51,480
be later versions that are rewrite.

102
00:05:51,680 --> 00:05:54,600
Speaker 1: I remember looking through the Radio Shack catalog when I

103
00:05:54,639 --> 00:05:58,120
was a kid, and there were computers that took the

104
00:05:58,240 --> 00:06:01,279
eight inch floppies of the model too, took the eight

105
00:06:01,319 --> 00:06:04,199
inge drive, yeah, and I thought that was like the stuff,

106
00:06:04,240 --> 00:06:06,560
you know, it's pretty cool. I just so wanted a

107
00:06:06,600 --> 00:06:08,839
computer when I was a kid, for sure. It wasn't

108
00:06:08,920 --> 00:06:11,360
until I was almost in high school that my father

109
00:06:11,399 --> 00:06:11,800
bought one.

110
00:06:11,839 --> 00:06:13,560
Speaker 2: But they only got better with time.

111
00:06:13,639 --> 00:06:17,600
Speaker 1: Here's another story, another story to interrupt. When I was eleven,

112
00:06:18,879 --> 00:06:21,439
nineteen seventy eight, there was a huge blizzard in New England,

113
00:06:22,040 --> 00:06:24,120
Blizzard of seventy eight. We got like four or five

114
00:06:24,120 --> 00:06:27,240
feet of snow and so there wasn't any school that day,

115
00:06:28,240 --> 00:06:32,759
and my friends and my brother and I we decided

116
00:06:32,800 --> 00:06:35,639
to build not just a snowman, but we built a

117
00:06:35,680 --> 00:06:37,839
space station and called it Skylab.

118
00:06:38,160 --> 00:06:38,480
Speaker 2: Nice.

119
00:06:38,720 --> 00:06:43,160
Speaker 1: Isn't that cool? Yeah? I was like, why Skylab? It

120
00:06:43,319 --> 00:06:46,720
had little shoots and stuff for snowballs running down it

121
00:06:46,800 --> 00:06:49,360
and it was one of the happiest days of my

122
00:06:49,399 --> 00:06:51,160
life in school, probably because there was no.

123
00:06:51,160 --> 00:06:56,519
Speaker 2: School, but snow days are always good days without a day. Yeah,

124
00:06:56,959 --> 00:06:59,759
last things In nineteen seventy one, the Arpanet stuff so

125
00:07:00,360 --> 00:07:02,759
went live the year before and now we're starting to

126
00:07:02,800 --> 00:07:05,439
build products on it. So Ray Tomlinson sends the very

127
00:07:05,439 --> 00:07:08,560
first email. This guy's from MIT, but he was working

128
00:07:08,600 --> 00:07:11,639
for BBN by them, which is both Barnic and Newman.

129
00:07:12,240 --> 00:07:13,879
Most people have a dot heard of BBM, but they

130
00:07:13,879 --> 00:07:17,000
were essential to the creation of the Internet. That very

131
00:07:17,000 --> 00:07:18,560
first email has a lot of the stuff you already

132
00:07:18,600 --> 00:07:22,639
recognize today. Uses the app notation for name and domain.

133
00:07:23,279 --> 00:07:25,240
It has to send her a subject, date, a body.

134
00:07:25,480 --> 00:07:28,480
There's an argument Tomlinson doesn't have the email anymore, so

135
00:07:28,600 --> 00:07:29,920
they asked him, well, what was in it? He says,

136
00:07:29,959 --> 00:07:32,240
I don't know test one, two three or the Cordy

137
00:07:32,319 --> 00:07:35,480
row like, I don't know something like that. It was

138
00:07:35,480 --> 00:07:39,199
a test email. Yeah, but over on the Berkeley side,

139
00:07:39,199 --> 00:07:41,519
so that's east coast. On the West coast side, Mary

140
00:07:41,560 --> 00:07:45,439
Turnoff of Berkeley, who works for the Office Emergency Preparedness,

141
00:07:45,560 --> 00:07:48,439
builds a system called the Emergency Management Information System and

142
00:07:48,480 --> 00:07:54,759
Reference index are IMASARI, which is real time Chat wow,

143
00:07:55,160 --> 00:07:57,959
and he has ten offices communicating in real time via

144
00:07:58,120 --> 00:07:59,079
nineteen seventy one.

145
00:07:59,279 --> 00:08:00,839
Speaker 1: The first time I said, I saw that at a

146
00:08:00,879 --> 00:08:04,319
friend's house who is connected over a modem to somebody.

147
00:08:05,279 --> 00:08:09,720
I was just amazed. It's stunning, right, So it's stunning,

148
00:08:10,120 --> 00:08:13,160
like that's somebody typing in real time. Yeah, on the

149
00:08:13,199 --> 00:08:14,480
other side of the world, potentially.

150
00:08:14,519 --> 00:08:16,279
Speaker 3: Yeah, I have a question, Richard.

151
00:08:16,519 --> 00:08:18,680
Speaker 2: Yes, hey, Egil, speak up.

152
00:08:18,720 --> 00:08:23,279
Speaker 3: Gil yeah, sorry, I'm really holding my breath yet. But no, like,

153
00:08:23,720 --> 00:08:26,560
did they actually have the at sign back when the

154
00:08:26,600 --> 00:08:27,759
first email was sent out?

155
00:08:27,879 --> 00:08:30,120
Speaker 2: Apparently? Yeah, they said the acts of what was included

156
00:08:30,120 --> 00:08:32,879
in the original email structure. So you know, I mean

157
00:08:32,879 --> 00:08:36,440
it's nineteen seventy one, so ASKI exists. It's just a

158
00:08:36,519 --> 00:08:39,000
question of this is mostly mainframe computers at this point,

159
00:08:39,000 --> 00:08:42,320
where there using ASCI, where they using embedict, there's a

160
00:08:42,360 --> 00:08:44,799
lot of IBM. Then, Yeah, so it could have been.

161
00:08:44,960 --> 00:08:49,600
Speaker 3: But it probably wasn't printed on the keyboard, I guess.

162
00:08:48,960 --> 00:08:52,559
Speaker 2: Yeah. Yeah, it's hard to get your head around what

163
00:08:52,600 --> 00:08:54,919
the hardware looked like back then. But then this was

164
00:08:55,000 --> 00:08:59,679
mostly universities and military labs on arpedet. Right, it's not

165
00:08:59,720 --> 00:09:06,279
inner yet, so they're all largely mainframe machines, PDPs and ibms.

166
00:09:06,360 --> 00:09:06,799
Very cool.

167
00:09:06,919 --> 00:09:10,120
Speaker 1: Yeah, so that's your list, Richard, that's my list. Well

168
00:09:10,159 --> 00:09:13,240
in that case, it's time for better no of framework.

169
00:09:13,440 --> 00:09:22,879
Speaker 2: Awesome rold of music. Man, what do you happen?

170
00:09:23,039 --> 00:09:26,159
Speaker 1: So, as you know, it's my moo to go looking

171
00:09:26,159 --> 00:09:28,799
for things that are training on GitHub and I found

172
00:09:28,840 --> 00:09:34,480
this Hardened Windows Security the new threat to malware. Hardened

173
00:09:34,480 --> 00:09:40,320
Windows Safely securely only with official Microsoft methods, So this

174
00:09:40,480 --> 00:09:46,080
is essentially training and it's a repository that the features

175
00:09:46,080 --> 00:09:48,879
have already been implemented by Microsoft and Windows to fine

176
00:09:48,919 --> 00:09:52,320
tune it towards the highest security and locked down state

177
00:09:52,799 --> 00:09:56,840
without relying on any third party component or dependency, using

178
00:09:56,840 --> 00:10:01,679
well documented, supported, recommended, and official methods. So I think

179
00:10:01,679 --> 00:10:03,799
this is really cool because one of the big problems

180
00:10:03,840 --> 00:10:08,720
in security, as you guys know, is the chain. You know,

181
00:10:08,799 --> 00:10:12,600
the supply chain, what dependency or are you using and

182
00:10:12,639 --> 00:10:15,240
what dependencies are they relying on, And if you draw

183
00:10:15,360 --> 00:10:18,919
graphs sometimes you can see the spokes go out in

184
00:10:19,000 --> 00:10:22,000
millions of directions and it's impossible to wrap your mind around.

185
00:10:22,960 --> 00:10:26,240
So I really like this for the fact that you know,

186
00:10:26,320 --> 00:10:29,120
you're not relying on some GitHub repo where somebody could

187
00:10:29,720 --> 00:10:31,960
come and do a pull request that isn't looked at

188
00:10:32,080 --> 00:10:35,720
carefully and it's got some malware in it, and that's

189
00:10:35,960 --> 00:10:39,960
that's a reality today. So yeah, I'm very much in

190
00:10:40,000 --> 00:10:43,200
favor of doing what's on the box. You know, what

191
00:10:43,240 --> 00:10:44,440
can I do that's right here.

192
00:10:44,600 --> 00:10:47,039
Speaker 2: So and to be clear, this is not an app

193
00:10:47,159 --> 00:10:50,080
in GitHub that you compile or anything. This is just

194
00:10:50,320 --> 00:10:55,799
a list of information and some scripts Power Show to guidance. Yeah,

195
00:10:55,879 --> 00:10:59,320
just guidance to implement features that already exist in Windows

196
00:10:59,440 --> 00:11:03,039
or perhaps have Microsoft based tools in some cases, to

197
00:11:03,159 --> 00:11:05,240
just turn up the security level on your machine. You know,

198
00:11:05,480 --> 00:11:09,879
Microsoft tends to default to everything works, it's easy to use, right,

199
00:11:09,879 --> 00:11:11,000
and then highly secure.

200
00:11:11,120 --> 00:11:14,320
Speaker 1: As we say on our show, security is the enemy

201
00:11:14,360 --> 00:11:19,279
of convenience and vice versa. And so if it's very convenient,

202
00:11:19,399 --> 00:11:22,480
the fact of the matter is, it's probably less secure

203
00:11:22,519 --> 00:11:24,960
than you wanted to. But there are ways to to,

204
00:11:25,720 --> 00:11:27,799
you know, get get as close as you can to

205
00:11:27,879 --> 00:11:30,080
convenient and be secure at the same time. And I

206
00:11:30,120 --> 00:11:33,440
think that's you know, it's a guidance like this that

207
00:11:33,519 --> 00:11:37,720
helps us with it. But you know, knowing what we know, Richard,

208
00:11:37,879 --> 00:11:41,679
when you come across people in your daily life who

209
00:11:42,799 --> 00:11:45,320
are asking you, you know, I got this text message

210
00:11:45,399 --> 00:11:47,840
or I got this email, what is that? And you

211
00:11:48,200 --> 00:11:50,240
know your answer is ignoring it and you're rolling your eyes.

212
00:11:50,279 --> 00:11:54,759
It's like most people out there are so vulnerable and

213
00:11:54,799 --> 00:11:59,720
susceptible to phishing attacks and yeah, dude, you don't know

214
00:11:59,759 --> 00:12:00,600
where to start.

215
00:12:00,919 --> 00:12:02,919
Speaker 2: It's worse than that. A friend of mine shows me

216
00:12:03,279 --> 00:12:06,600
as one of my neighbors shows me the out box

217
00:12:06,679 --> 00:12:09,360
on the email on his iPhone and it's full of

218
00:12:09,480 --> 00:12:13,200
spam sent through his account, and I'm like, dude, you

219
00:12:13,200 --> 00:12:15,759
need to change a password. He's like, oh, no, I

220
00:12:15,799 --> 00:12:19,120
can't do that. Yeah. Like, why I'm not changing my password.

221
00:12:19,200 --> 00:12:23,519
It's not hurting me. I'm like, you're sending spam mail.

222
00:12:23,960 --> 00:12:25,840
Speaker 3: Your reputation take a hits.

223
00:12:26,919 --> 00:12:31,039
Speaker 2: Yeah, Nope, not changing the password. Step too far, not

224
00:12:31,159 --> 00:12:32,279
a thing. Not going to do that.

225
00:12:32,559 --> 00:12:36,080
Speaker 1: Yeah, let me introduce you to a password manager, my friend.

226
00:12:36,919 --> 00:12:37,279
Speaker 2: Please.

227
00:12:38,159 --> 00:12:40,559
Speaker 1: Well, anyway, that's what I got. Richard, who's talking.

228
00:12:40,279 --> 00:12:42,200
Speaker 2: To us, grabbed a comment off of the show eighteen

229
00:12:42,279 --> 00:12:45,360
sixty eight when we did with one Eagle Hints and

230
00:12:45,440 --> 00:12:48,440
maybe you've heard of him talking a little bit about

231
00:12:48,440 --> 00:12:50,960
the updates around b unit. This is from twenty twenty three,

232
00:12:51,320 --> 00:12:52,919
and our friend Joe Finney had a comment on the

233
00:12:52,960 --> 00:12:54,759
show which I thought was very appropriate. He said, I

234
00:12:54,759 --> 00:12:57,559
really appreciated how Eagle made the distinction between different kinds

235
00:12:57,840 --> 00:13:00,879
of open source projects. I think in addition to having

236
00:13:00,919 --> 00:13:04,200
a licensed file in the REPO, maybe projects should have

237
00:13:04,240 --> 00:13:07,080
a goals file which states what the owners of the

238
00:13:07,120 --> 00:13:10,440
project would like to see it become. There's a little

239
00:13:10,480 --> 00:13:14,399
one off experiment, but a complete end user application looking

240
00:13:14,399 --> 00:13:17,960
to be improved but not really built upon. Is the

241
00:13:17,960 --> 00:13:20,559
project more of a framework supported by a business to

242
00:13:20,559 --> 00:13:23,360
help with integrations and so on? Like, what's the intent?

243
00:13:23,840 --> 00:13:26,320
I love it that would help consumers of the project

244
00:13:26,360 --> 00:13:28,759
know what to expect when opening issues. Prs are looking

245
00:13:28,799 --> 00:13:31,840
for support. As always, Thanks for the great show. It's

246
00:13:31,840 --> 00:13:35,000
all refreshing to hear smart people discussing hard problems.

247
00:13:35,600 --> 00:13:38,399
Speaker 1: Yep, even if the answer is how should we know?

248
00:13:40,559 --> 00:13:42,919
Speaker 2: Well? And we just had Joe on the show too, right,

249
00:13:43,120 --> 00:13:45,440
it was the previous week, so it's only coincidental that

250
00:13:46,480 --> 00:13:48,840
I happened to find a comment from them from eagles

251
00:13:48,919 --> 00:13:51,279
last show, which I thought was very relevant. So Joe,

252
00:13:51,279 --> 00:13:52,600
thank you so much for your comment in a copy

253
00:13:52,600 --> 00:13:53,840
of music. Co Buy is on its way to you,

254
00:13:53,879 --> 00:13:55,480
and ifew'd like a copy of music, go buy right

255
00:13:55,519 --> 00:13:57,600
a comment on the website at don arogs dot com

256
00:13:57,799 --> 00:13:59,519
or on the facebooks. We could publish every show there

257
00:13:59,559 --> 00:14:01,320
and if you come there and everything on the show,

258
00:14:01,360 --> 00:14:03,440
we'll send you a copy of music to Coba.

259
00:14:03,080 --> 00:14:06,120
Speaker 1: Music code by still going Strong and twenty two tracks.

260
00:14:06,200 --> 00:14:08,519
You can go to music too coode by dot net

261
00:14:08,600 --> 00:14:12,559
to purchase the collection in MP three wave or FLACK format.

262
00:14:13,120 --> 00:14:18,240
Go for it Flack. Okay, well, let's bring back Egil Hanson.

263
00:14:18,519 --> 00:14:21,200
Of course, he is the author and inventor of b

264
00:14:21,399 --> 00:14:27,039
unit for testing Blazer apps and components. So let me

265
00:14:27,080 --> 00:14:28,840
read his official bio.

266
00:14:29,519 --> 00:14:30,159
Speaker 2: Egil is a.

267
00:14:30,200 --> 00:14:34,799
Speaker 1: Dane chilling in Iceland. He's a developer at Delegate and

268
00:14:34,879 --> 00:14:39,200
a Microsoft MVP. He chats globally at conferences about nifty

269
00:14:39,240 --> 00:14:43,720
developer stuff and is all about that clean maintainable code.

270
00:14:43,879 --> 00:14:47,039
I love that song. I'm all about that clean maintainable code.

271
00:14:47,279 --> 00:14:51,360
That clean maintainable code. He's the creator behind b unit,

272
00:14:51,399 --> 00:14:54,720
as I said, for Blazer tests and angle sharp diffing

273
00:14:55,360 --> 00:14:59,480
think spot the HTML difference in c sharp. Though he's

274
00:14:59,639 --> 00:15:03,000
danced too many tech tunes, Eagle's current jam is everything

275
00:15:03,039 --> 00:15:05,559
dot net and cloud. Check out his repos at GitHub

276
00:15:05,600 --> 00:15:08,840
dot com slash Egle. Yes, this bio was written by

277
00:15:08,919 --> 00:15:09,960
chat GBT.

278
00:15:11,559 --> 00:15:14,360
Speaker 3: And it was written what was it three years ago?

279
00:15:14,720 --> 00:15:16,120
Last time I visited you too?

280
00:15:16,440 --> 00:15:18,720
Speaker 2: So yeah? Yeah? Nice? Uh?

281
00:15:20,080 --> 00:15:23,759
Speaker 3: Still still more today? Yeah? Well, in which you mentioned

282
00:15:23,759 --> 00:15:25,360
b unit, I have to give a shout out to

283
00:15:25,399 --> 00:15:28,200
my co maintainer Steve and Giselle who's really pulling a

284
00:15:28,200 --> 00:15:32,120
lot of the weight around that. These days, we are

285
00:15:32,240 --> 00:15:36,039
working heavily on a V two of that co mollis

286
00:15:36,039 --> 00:15:39,200
just simplified a PI is you remove some of the

287
00:15:39,240 --> 00:15:44,759
craft all of that, and especially removing the support for

288
00:15:44,960 --> 00:15:47,720
the older target frameworks that we have. We have we're

289
00:15:47,720 --> 00:15:50,799
still support back to free one dot net core days,

290
00:15:50,879 --> 00:15:53,120
so it will be nice to to clean that out

291
00:15:53,159 --> 00:15:55,799
a bit. But so try not to do braking changes.

292
00:15:55,840 --> 00:15:57,759
So we would have to do a V two to

293
00:15:57,840 --> 00:16:01,279
actually do that. So so that that will happen hopefully

294
00:16:01,399 --> 00:16:02,360
the end of this year.

295
00:16:02,559 --> 00:16:04,840
Speaker 2: Very good. Nice, we'll need to do another show. Then

296
00:16:04,919 --> 00:16:06,000
we talked about the new version.

297
00:16:06,080 --> 00:16:09,320
Speaker 3: Absolutely, yeah, absolutely, that would be good to do.

298
00:16:09,519 --> 00:16:11,480
Speaker 1: So what are you thinking about these days?

299
00:16:11,759 --> 00:16:11,879
Speaker 2: So?

300
00:16:12,200 --> 00:16:16,919
Speaker 3: I well, I, as my bio probably indicates, I used

301
00:16:16,919 --> 00:16:19,399
to be sort of the B unit guy and and

302
00:16:19,440 --> 00:16:21,840
there are a lot also conference talks on that, and

303
00:16:21,960 --> 00:16:24,320
I branched out a bit, so now I'm talking more

304
00:16:24,360 --> 00:16:29,559
about testing in general and have been double clicking a

305
00:16:29,559 --> 00:16:33,600
lot on what it means to write valuable tests. So

306
00:16:33,600 --> 00:16:37,919
so so so that that that's something you know that

307
00:16:38,080 --> 00:16:40,120
I'm really passionate about making sure that.

308
00:16:39,960 --> 00:16:45,080
Speaker 1: That indicates that there are mostly not valuable tests out there.

309
00:16:45,600 --> 00:16:47,840
Well exactly, so implies.

310
00:16:47,519 --> 00:16:51,360
Speaker 3: Well, no, not necessarily, not necessarily, But I think I've

311
00:16:51,399 --> 00:16:54,399
seen and I've certainly been guilty about myself at certain

312
00:16:54,440 --> 00:16:59,559
cyy st tendency too to not think, not not be

313
00:16:59,600 --> 00:17:02,440
explicit about what the what kind of test you write.

314
00:17:02,960 --> 00:17:06,799
So so some some types of tests have different benefits

315
00:17:06,799 --> 00:17:10,400
from others, and there's no silver bullet, so so be

316
00:17:11,119 --> 00:17:14,119
you know, be open to new ways of writing tests

317
00:17:14,440 --> 00:17:17,000
or write new styles of tests. So, I think the

318
00:17:18,079 --> 00:17:20,359
classic thing you really want from the test we is

319
00:17:20,359 --> 00:17:22,400
you bought the confidence to be able to say, well,

320
00:17:22,440 --> 00:17:24,400
all my tests passed, so I haven't made a mistake,

321
00:17:24,480 --> 00:17:27,079
and we can go straight to production or at least

322
00:17:27,160 --> 00:17:30,079
through a c c D pipeline where the quality gauge

323
00:17:30,160 --> 00:17:33,240
is the test among other things, and if all are green,

324
00:17:33,519 --> 00:17:37,599
well then you know it's it's good. And and for me,

325
00:17:38,000 --> 00:17:42,160
it's it's about having tests that really gives you the

326
00:17:42,559 --> 00:17:45,759
I think that's that's four pillars that I think that

327
00:17:46,240 --> 00:17:49,599
we're quite elegantly described in a book called I Think

328
00:17:49,839 --> 00:17:54,920
Unit Testing Principal Patterns and Practices by Vladimir Kolikov, which

329
00:17:54,960 --> 00:17:57,920
I often reference is his way of testing he describes

330
00:17:57,960 --> 00:17:59,599
in that book is very much aligned with how I

331
00:17:59,640 --> 00:18:01,559
do it. But he has four pillars sort of that

332
00:18:01,599 --> 00:18:04,519
indicates if you have a valuable test suite, and it's

333
00:18:04,680 --> 00:18:07,759
if you have good protection against regression, if you have

334
00:18:07,839 --> 00:18:12,359
resistance to refactoring, if you have fast feedback, and your

335
00:18:12,400 --> 00:18:18,680
tests are maintainable. So this is the top exactly. Well,

336
00:18:19,039 --> 00:18:22,160
so if we take the three first ones, right, protection

337
00:18:22,240 --> 00:18:24,240
against regressions, you get a lot of that if you

338
00:18:24,279 --> 00:18:29,079
write more into interests, because regressions is when something breaks

339
00:18:29,519 --> 00:18:33,039
that you didn't intend to break, or when you make

340
00:18:33,039 --> 00:18:39,279
a change. Well yeah, well so unintentional change is probably

341
00:18:39,279 --> 00:18:41,839
what I would call it. Right, And if you do

342
00:18:41,920 --> 00:18:45,480
into interesting, you're touching on your nukelet package. You're touching

343
00:18:45,559 --> 00:18:49,240
on all your external dependencies as well as your business logic. Right,

344
00:18:49,480 --> 00:18:53,480
so if you have good into Interests, you can also

345
00:18:53,559 --> 00:18:56,279
just upgrade to the data versions of all your external

346
00:18:56,279 --> 00:18:59,000
packages that you depend on on use and if your

347
00:18:59,039 --> 00:19:03,200
tests still go through, well you have probably a good way,

348
00:19:03,480 --> 00:19:06,640
Like it's probably safe to deploy, right, It's probably okay

349
00:19:06,720 --> 00:19:10,359
or great. But the downside is so the third third

350
00:19:10,359 --> 00:19:14,759
pillar was fast feedback and obviously, and to insists they

351
00:19:14,839 --> 00:19:17,680
runt quite a bit slower maintenance. Why is they also

352
00:19:18,920 --> 00:19:21,599
somewhat harder to maintain because there's usually way more things

353
00:19:21,640 --> 00:19:27,519
going on, so that does no you know, depending on

354
00:19:27,599 --> 00:19:31,400
the kind of application you're writing, you can choose to

355
00:19:31,480 --> 00:19:33,640
either go to integration testing or into interesting or have

356
00:19:33,680 --> 00:19:36,000
a mix of all of that, and that is usually

357
00:19:36,000 --> 00:19:39,880
my default is to start start with integration testing. And

358
00:19:39,920 --> 00:19:42,319
then if I find I have a lot of business

359
00:19:42,359 --> 00:19:46,880
logic letters annoying hard to test through the public surface

360
00:19:47,079 --> 00:19:50,079
of my way, if it's API I'm building, or product

361
00:19:50,119 --> 00:19:53,519
product on app or something like that, well then you know,

362
00:19:53,640 --> 00:19:57,440
you peel away the outer layers of your application and

363
00:19:57,880 --> 00:20:02,400
isolate your components are your units on the test, and

364
00:20:02,480 --> 00:20:05,720
test them in isolation, so you get both fast feedback.

365
00:20:06,640 --> 00:20:08,720
But there's there's no super bullet here.

366
00:20:08,920 --> 00:20:12,279
Speaker 1: I can think of a few situations in which refactoring

367
00:20:12,319 --> 00:20:15,640
can throw tests off. Say you have a method that

368
00:20:15,759 --> 00:20:19,240
takes I don't know, three parameters or something like that,

369
00:20:20,200 --> 00:20:22,640
and so therefore it's up to the calling code to

370
00:20:23,599 --> 00:20:26,759
have those parameters from wherever they come from, whether it's

371
00:20:26,759 --> 00:20:31,440
a user or something. And then instead of that you

372
00:20:31,920 --> 00:20:36,200
decide to you know, make some configuration and the configuration

373
00:20:36,359 --> 00:20:38,519
has those name value pairs in it now and they're

374
00:20:38,559 --> 00:20:42,559
not passed in. So you're like, okay, I'll just you know,

375
00:20:42,640 --> 00:20:46,039
remove these parameters from this method. We're going to assume

376
00:20:46,079 --> 00:20:50,559
that these two parameters are coming from configuration and blah

377
00:20:50,599 --> 00:20:54,519
blah blah. So there that'll break a test because oh well,

378
00:20:54,599 --> 00:20:59,119
I'm calling this still with my parameters, and now I

379
00:20:59,160 --> 00:21:01,519
have to decide whether I should get those values out

380
00:21:01,559 --> 00:21:04,079
of the configuration before I pass it in or do

381
00:21:04,880 --> 00:21:05,799
you know that kind of thing.

382
00:21:06,519 --> 00:21:09,000
Speaker 3: Well, so there's a whole bunch of patterns that you

383
00:21:09,000 --> 00:21:13,039
can lean into that will give you resistance to refacting,

384
00:21:13,039 --> 00:21:16,599
which was the second pillar, and really resistance to refacturing

385
00:21:16,720 --> 00:21:20,240
something that is valiable to aim for, independent of whether

386
00:21:20,240 --> 00:21:24,640
you're doing into interesting or union interesting. So I think

387
00:21:25,279 --> 00:21:28,880
the first thing is in general, to keep implementation details

388
00:21:28,960 --> 00:21:31,440
out of your test if you can. And that's sort

389
00:21:31,440 --> 00:21:33,359
of a high level. So what does that mean, Well,

390
00:21:33,359 --> 00:21:37,200
implementation detail is well, actually, okay, that's that's actually something

391
00:21:37,200 --> 00:21:39,799
I sometimes do when I do this. I do this

392
00:21:40,039 --> 00:21:43,279
presentation around this, so I ask what are implementation details?

393
00:21:43,759 --> 00:21:48,960
So an example, if you're building I don't know for

394
00:21:49,119 --> 00:21:52,039
a consumer phasing applications, so not not building a library,

395
00:21:52,039 --> 00:21:54,519
but you're building something that users will use. Right, if

396
00:21:54,559 --> 00:21:56,920
you have a database, would you con see that better

397
00:21:56,960 --> 00:22:00,480
implementation detail or would you say that that is you

398
00:22:00,519 --> 00:22:03,400
know something that I think the opposite of the implementation

399
00:22:03,440 --> 00:22:06,519
details is something that is externally observable. It's something that

400
00:22:06,680 --> 00:22:09,079
you know changes and that you can then have it's

401
00:22:09,079 --> 00:22:11,880
okay to have in your tests. So would a database

402
00:22:11,880 --> 00:22:14,279
be an implementation detail in your mind?

403
00:22:14,680 --> 00:22:17,359
Speaker 1: The database itself, the structure of the database.

404
00:22:17,559 --> 00:22:20,759
Speaker 3: Yeah, yeah, yeah. Could you have something of the database,

405
00:22:20,799 --> 00:22:22,920
could you have access, could you use could you have

406
00:22:23,079 --> 00:22:26,079
entity framework in your test, for example, to put some

407
00:22:26,160 --> 00:22:28,319
data into the database before you run the test, or

408
00:22:28,359 --> 00:22:31,440
could you acquiring the database and see did my changes

409
00:22:31,440 --> 00:22:32,680
act to get into the database?

410
00:22:32,960 --> 00:22:33,960
Speaker 2: That smells bad to me?

411
00:22:34,440 --> 00:22:39,000
Speaker 3: Yeah, well you would be right. So implementation details of

412
00:22:39,319 --> 00:22:42,400
things like that like databases and impliptation details in theory

413
00:22:42,599 --> 00:22:45,680
in your test or your test shouldn't care about what

414
00:22:45,759 --> 00:22:48,839
database you're using, because your test should focus on business

415
00:22:48,920 --> 00:22:50,680
value what you're trying to test.

416
00:22:50,759 --> 00:22:52,839
Speaker 1: You're introducing more complexity.

417
00:22:52,960 --> 00:22:55,480
Speaker 3: Yeah, but when another example could be, well, you have

418
00:22:55,559 --> 00:22:59,000
an app and it sends out emails whenever users do something. Well,

419
00:22:59,079 --> 00:23:02,799
you could actually take that, you could take a dependency

420
00:23:02,960 --> 00:23:06,000
on the email setting functionality in your test because it's

421
00:23:06,039 --> 00:23:09,680
externally observable. It's part of the external contract that you

422
00:23:09,720 --> 00:23:12,720
have with the users. So that's a whole host of

423
00:23:12,799 --> 00:23:14,880
things like this where you have to ask yourselves, is

424
00:23:14,880 --> 00:23:18,440
it actually something that viewed from the outside when they're

425
00:23:18,480 --> 00:23:21,039
looking at my application or looking at if you're building

426
00:23:21,079 --> 00:23:24,400
a component live or class library, is it something that

427
00:23:24,519 --> 00:23:28,279
is external to the library. And if it's. If it is,

428
00:23:28,559 --> 00:23:31,640
then it's typically okay because if you actually go and

429
00:23:31,759 --> 00:23:34,400
change the myth that you talked about before, change the

430
00:23:34,400 --> 00:23:36,920
parameters you're passed them in a different way, well, you

431
00:23:36,960 --> 00:23:39,079
actually want your test to break right because you have

432
00:23:39,240 --> 00:23:43,319
changed the public observable behavior of the whatever you were building.

433
00:23:44,079 --> 00:23:47,000
But if it's if it's just an internal thing, maybe

434
00:23:47,039 --> 00:23:49,319
you took a method or method and split it out,

435
00:23:49,480 --> 00:23:53,039
refractored into an internal class, or you took parts of

436
00:23:53,079 --> 00:23:55,119
a class that got too big and refactored it into

437
00:23:55,160 --> 00:23:59,039
a secondary class. Well, in that case, I wouldn't necessarily

438
00:23:59,039 --> 00:24:02,680
create a testsly for that refactor out class. I would

439
00:24:02,720 --> 00:24:05,160
just test it again through the public service. I have

440
00:24:05,400 --> 00:24:09,440
of whatever I'm creating, so so so thinking hard about

441
00:24:09,480 --> 00:24:12,440
how to keep implementation details out of test. But it's

442
00:24:12,440 --> 00:24:17,519
also the hardest problem, honestly, incurading good test suite. And

443
00:24:18,039 --> 00:24:21,519
usually when you have to, like if you have whatever

444
00:24:21,599 --> 00:24:25,400
you're testing the class, for example, if it takes a

445
00:24:25,440 --> 00:24:28,200
bunch of parameter as input and all the and you

446
00:24:28,279 --> 00:24:31,039
have a whole set of tests, but I actually need

447
00:24:31,079 --> 00:24:33,160
to do the same thing. Do that do that system

448
00:24:33,160 --> 00:24:36,480
montal test up and passing parameters to it. Well, you

449
00:24:36,519 --> 00:24:38,559
can refacture that into a small help me method that

450
00:24:38,640 --> 00:24:41,559
syst next to the test, and that instantiates the suster

451
00:24:41,599 --> 00:24:44,720
butter test for you. So when you actually have to

452
00:24:44,839 --> 00:24:46,920
change things, you have one place to go. You don't

453
00:24:46,920 --> 00:24:49,119
have to break all the tests.

454
00:24:48,960 --> 00:24:49,359
Speaker 2: Right.

455
00:24:50,839 --> 00:24:53,680
Speaker 3: Or at least when you do break them. I think.

456
00:24:54,680 --> 00:24:59,319
Another thing I have strong feelings about is if you

457
00:24:59,359 --> 00:25:03,680
are using generic marcking framework like EMQ or in substitute

458
00:25:03,759 --> 00:25:06,599
in your test. So maybe you decided you have some

459
00:25:06,720 --> 00:25:09,640
business logic and it's maybe talking to an API or

460
00:25:09,720 --> 00:25:11,759
back end, so you don't want to have that part

461
00:25:11,799 --> 00:25:13,400
of your test. You don't want to do intern testing,

462
00:25:13,400 --> 00:25:16,680
and in this scenario. So you have a surface an

463
00:25:16,680 --> 00:25:22,279
interface that you put that external communication behind. But if

464
00:25:22,319 --> 00:25:28,279
you then use MOQ or in substitute or other marking libraries, well,

465
00:25:28,720 --> 00:25:31,799
the way that you're the code that you are writing

466
00:25:31,839 --> 00:25:36,279
test for is interacting with that external dependency or out

467
00:25:36,279 --> 00:25:38,680
of process dependency, which is typically what you would use

468
00:25:38,720 --> 00:25:42,240
that for. That's an implementation detail most often than not,

469
00:25:42,440 --> 00:25:45,680
especially if it's a database or something that's internal application.

470
00:25:45,880 --> 00:25:47,839
If it's sending an email to an email server, that's

471
00:25:47,880 --> 00:25:49,680
a different story. But in the case where you have

472
00:25:49,759 --> 00:25:52,440
a database or an event top or some other internal

473
00:25:52,799 --> 00:25:55,799
out of process thing you have, if you use a

474
00:25:55,880 --> 00:25:58,880
marking framework, you're likely going to in every test to

475
00:25:58,920 --> 00:26:01,200
have that set up there. You say, well, when this

476
00:26:01,279 --> 00:26:03,200
method is called on my interface, I want you to

477
00:26:03,240 --> 00:26:05,200
respond with this, and I want you to do X,

478
00:26:05,279 --> 00:26:07,759
Y and z, And you might also want to asserte

479
00:26:07,880 --> 00:26:11,079
in your test on the MUG that it received a

480
00:26:11,119 --> 00:26:14,640
certain amount of course with specific input and output. All

481
00:26:14,680 --> 00:26:19,400
of that is implementation details. It's implementation details of how

482
00:26:19,599 --> 00:26:23,839
your system under test is using them using the dependency

483
00:26:23,839 --> 00:26:28,039
it has. So if you at some point change your

484
00:26:28,079 --> 00:26:30,720
logic so that you don't save to the database. Every

485
00:26:30,720 --> 00:26:33,519
time it gets a new thing in, it keeps it

486
00:26:33,519 --> 00:26:35,240
around the memory a little bit, and then it's saved

487
00:26:35,279 --> 00:26:37,559
maybe to you know, save one. Don't Well, if all

488
00:26:37,599 --> 00:26:40,079
your test assume that it's going to save one time

489
00:26:40,200 --> 00:26:42,359
every time it does a thing, now all your tests

490
00:26:42,359 --> 00:26:45,640
are broken, and they shouldn't be breaking because the functionality

491
00:26:45,680 --> 00:26:49,079
is still right, still right. The implementation details have changed,

492
00:26:49,079 --> 00:26:51,119
but not the functionality itself.

493
00:26:51,720 --> 00:26:57,079
Speaker 1: So let's talk about interfaces, shall we. As saying you

494
00:26:57,160 --> 00:27:00,319
and me, I'm saying, yeah, you know that's uh. An

495
00:27:00,359 --> 00:27:03,359
abstraction layer is critical when you're doing marking.

496
00:27:04,079 --> 00:27:06,359
Speaker 3: Well, yeah, right, Well you.

497
00:27:06,960 --> 00:27:09,240
Speaker 1: Just want to swap one service in for another.

498
00:27:09,200 --> 00:27:14,920
Speaker 3: So yes, and though well, in general design wise, I

499
00:27:14,960 --> 00:27:17,279
want to give a shout out to Mark Sieman as well.

500
00:27:17,319 --> 00:27:21,200
He has an actual book book called Code that Fits

501
00:27:21,240 --> 00:27:23,119
in New Head I believe actually did an interview with

502
00:27:23,240 --> 00:27:26,960
him on the podcast about that book and he in

503
00:27:27,000 --> 00:27:29,400
there for people who want to double click on this.

504
00:27:29,920 --> 00:27:33,440
He talks a us about, you know, keeping the abstractions

505
00:27:33,519 --> 00:27:37,319
or interfaces at the edge of the system, and especially

506
00:27:37,400 --> 00:27:39,599
at the edge where you maybe have some out of

507
00:27:39,640 --> 00:27:42,759
process communication going on, where you have something that doesn't

508
00:27:42,920 --> 00:27:47,160
that isn't easily h spun up during a test test

509
00:27:47,319 --> 00:27:51,519
unit test for example. So in general I am fine

510
00:27:51,559 --> 00:27:54,759
with introducing interfaces at the itch or if you know,

511
00:27:54,839 --> 00:27:58,880
things starts hurting. I don't introduce interfaces into my code

512
00:27:59,119 --> 00:28:02,640
just so I can not doing testing. Okay, if unless

513
00:28:02,720 --> 00:28:05,519
that is the pain point, I actually prefer the testing

514
00:28:05,519 --> 00:28:08,519
style I believe it's actually called, I think the Chicago

515
00:28:08,559 --> 00:28:11,599
school of testing or our classic school of testing, where

516
00:28:11,640 --> 00:28:15,599
you test from the outside in and you if you

517
00:28:15,640 --> 00:28:18,440
touch one to five ors in classes doesn't really matter.

518
00:28:19,160 --> 00:28:21,839
I don't want to test each class in isolation and

519
00:28:21,880 --> 00:28:24,640
put interfaces around all like every single class has an

520
00:28:24,640 --> 00:28:27,079
inservace in front of it so I can mark out

521
00:28:27,160 --> 00:28:29,920
it's if it's been used as a dependency somewhere else.

522
00:28:30,319 --> 00:28:32,000
I don't really see a lot of value in that.

523
00:28:32,240 --> 00:28:33,839
And again it also leads to just a lot of

524
00:28:33,880 --> 00:28:36,559
maintenance and maintainability of your test just goes down.

525
00:28:36,960 --> 00:28:40,279
Speaker 1: Mark Semen is one of our favorite and favorite smart people.

526
00:28:40,319 --> 00:28:42,119
He is a great Dane, isn't he he is?

527
00:28:43,039 --> 00:28:46,880
Speaker 3: He's frankly, he's he's quite a bit better at explaining

528
00:28:46,880 --> 00:28:48,480
some of these things that I feel I am. I

529
00:28:48,759 --> 00:28:50,720
really he's an expliration for sure.

530
00:28:50,799 --> 00:28:53,480
Speaker 1: So I have a little story here. I was working

531
00:28:53,519 --> 00:28:57,599
for a company that had some data that they were

532
00:28:57,680 --> 00:29:02,000
pulling from Oh let's just say it's stock data, and

533
00:29:02,279 --> 00:29:05,440
it was coming from a real time place, and they

534
00:29:05,480 --> 00:29:08,720
wanted to have this real time update of these tickers

535
00:29:08,759 --> 00:29:13,160
and stuff, right okay, But their secret sauce was secret,

536
00:29:13,440 --> 00:29:16,400
and I didn't want to be I didn't want to

537
00:29:16,559 --> 00:29:20,240
interface with it because that makes me liable in case

538
00:29:20,240 --> 00:29:22,680
of a data breach or something like that. So I said,

539
00:29:22,720 --> 00:29:25,880
look right up front, We're going to make an interface

540
00:29:25,920 --> 00:29:29,759
at this edge, and I'm going to write a little

541
00:29:30,000 --> 00:29:32,400
number generator with a timer or whatever to send me

542
00:29:32,640 --> 00:29:35,039
my data over and I'll pass that over to you

543
00:29:35,079 --> 00:29:37,039
when I'm done, and then you can wire up your

544
00:29:37,039 --> 00:29:38,640
back end stuff. I don't want anything to do with it.

545
00:29:38,680 --> 00:29:41,839
I'm a UI guy at this point, right. So that

546
00:29:41,960 --> 00:29:44,480
was I wasn't using any mocking framework or anything. We

547
00:29:44,640 --> 00:29:47,759
just created an interface and it was their interface, and

548
00:29:47,799 --> 00:29:49,839
I said, all right, here's the data that I'm going

549
00:29:49,880 --> 00:29:52,559
to give you, here's the method that i'm going to

550
00:29:52,599 --> 00:29:56,000
call when I have new data, and then and Bob's

551
00:29:56,039 --> 00:29:58,880
your uncle. So in that case, it was the it

552
00:29:58,920 --> 00:30:04,440
was the business agreement and that dictated that we use

553
00:30:04,559 --> 00:30:05,200
that method.

554
00:30:05,519 --> 00:30:08,640
Speaker 3: Well, I think so. I think that's a completely fair

555
00:30:08,720 --> 00:30:11,319
use of interfaces. So, if you have something that is

556
00:30:11,440 --> 00:30:15,000
external to your application, put an interface in front of that,

557
00:30:15,319 --> 00:30:18,759
or in domator and design we call that an inter

558
00:30:18,880 --> 00:30:22,240
corruption layer. You create a facade but sits in front

559
00:30:22,279 --> 00:30:24,640
of some external thing that you have to talk to

560
00:30:25,279 --> 00:30:29,039
or that talks to you. And and that is so

561
00:30:29,240 --> 00:30:32,200
that if they change whatever they're doing, it doesn't affect

562
00:30:32,240 --> 00:30:34,119
your cover. You have a facade.

563
00:30:34,160 --> 00:30:36,920
Speaker 1: So that and more importantly, I don't know the implementation

564
00:30:37,000 --> 00:30:39,559
details on the back end, and then that's a good thing.

565
00:30:39,680 --> 00:30:44,319
Speaker 3: They're not important to you exactly. And I'm so in

566
00:30:44,359 --> 00:30:46,799
general like those kinds of thing, and even when I'm

567
00:30:46,839 --> 00:30:50,200
using mocking framework, that's fine. My go to actually is

568
00:30:50,279 --> 00:30:53,039
if I have something out of process that is also

569
00:30:53,119 --> 00:30:58,039
externally observable, I would just handcode, you know, a custom

570
00:30:58,359 --> 00:31:03,680
mock or fake for that interface, because it's gonna instead

571
00:31:03,680 --> 00:31:07,680
of having repeated in every single test the setup code

572
00:31:07,720 --> 00:31:10,880
for my whatever what needs to do, I just have

573
00:31:11,079 --> 00:31:15,759
a generic fake implementation of the interface if it's repository

574
00:31:15,880 --> 00:31:18,920
or sending an email or something, and it will be

575
00:31:19,000 --> 00:31:22,119
using my domain language instead of the generic Marcking set

576
00:31:22,200 --> 00:31:24,799
up language, which is well, you learn to read it,

577
00:31:24,839 --> 00:31:27,400
but it's it's not the same language that the rest

578
00:31:27,400 --> 00:31:30,160
of your program is. It's the custom API, right, So

579
00:31:31,160 --> 00:31:35,279
I find that that is valuable and if you can,

580
00:31:35,359 --> 00:31:37,880
probably you can more often can you can reuse those

581
00:31:37,880 --> 00:31:41,440
handwritten marks of face throughout the different tests because you

582
00:31:41,519 --> 00:31:43,920
tend to make them just like they just immurate the

583
00:31:43,960 --> 00:31:47,559
behavior of whatever you're interfacing with. So the fake of

584
00:31:47,640 --> 00:31:50,599
the mark itself, the handwritten one, will also be a

585
00:31:50,640 --> 00:31:54,960
documentation for how you expect the the third party to behave.

586
00:31:55,480 --> 00:31:57,640
So if that changes, you go and update the fake,

587
00:31:58,200 --> 00:32:01,920
and then all the tests don't change because they still

588
00:32:01,920 --> 00:32:06,519
have the same surface and likely on this there's actually

589
00:32:06,599 --> 00:32:09,359
new behavior. Well the tests actually have to change. The

590
00:32:09,440 --> 00:32:11,200
test will still keep running, so you have a secret

591
00:32:11,200 --> 00:32:13,319
place you have to update instead of having you know,

592
00:32:13,400 --> 00:32:15,640
you change them something in one interface, and then all

593
00:32:15,680 --> 00:32:18,039
the tests break because all the bogs are now wrong

594
00:32:18,160 --> 00:32:20,240
and you need to do update the configurations all the

595
00:32:20,279 --> 00:32:23,000
tests that use the same interface or lock that interface out.

596
00:32:23,480 --> 00:32:26,400
So yeah, it's about spending a little bit of extra

597
00:32:26,400 --> 00:32:30,240
effort initially to create the fake versus just using the

598
00:32:30,440 --> 00:32:33,319
generic marcking library, and it will save a lot of

599
00:32:33,400 --> 00:32:36,480
time in the long run. I think in my experience.

600
00:32:36,039 --> 00:32:38,079
Speaker 1: That's very cool and it feels like a good place

601
00:32:38,079 --> 00:32:40,200
to take breaks. So we'll be right back after these

602
00:32:40,279 --> 00:32:46,200
very important messages stick around. Did you know you can

603
00:32:46,279 --> 00:32:49,519
lift and shift your dot net framework apps to virtual

604
00:32:49,559 --> 00:32:53,839
machines in the cloud. Use the elastic bean stock service

605
00:32:54,119 --> 00:32:57,839
to easily migrate to Amazon EC too with little or

606
00:32:57,880 --> 00:33:02,319
no changes. Find out more at aws dot Amazon dot

607
00:33:02,319 --> 00:33:05,039
com slash elastic beanstock.

608
00:33:09,079 --> 00:33:11,160
Speaker 2: And we're back. It's dot net rocks amateur Capbell. Let's

609
00:33:11,200 --> 00:33:13,960
call Franklin Yo. Yeah, I can do our friend Eagle

610
00:33:14,000 --> 00:33:17,240
Henson a bit about you know, making really valuable tests too.

611
00:33:18,400 --> 00:33:21,200
Recently we did a show with w O'Brien talking about

612
00:33:21,240 --> 00:33:24,759
the MCP for playwright Wonderful, and it made me start

613
00:33:24,799 --> 00:33:28,759
thinking about how we make more resilient tests by not

614
00:33:28,759 --> 00:33:30,680
writing the tests at all, but by writing prompts to

615
00:33:30,720 --> 00:33:34,720
generate tests so that we would be able to regenerate

616
00:33:34,799 --> 00:33:38,039
tests pretty quickly with those kinds of tools, Like how

617
00:33:38,079 --> 00:33:41,359
important is it to handwrite this test code versus using

618
00:33:41,400 --> 00:33:45,480
these generative tools for writing that kind of code. You

619
00:33:45,559 --> 00:33:47,480
knew we were going to get to add sooner or later.

620
00:33:47,720 --> 00:33:50,440
Speaker 3: Yeah, well we have to check that box. I think

621
00:33:50,440 --> 00:33:55,000
it's an excellent question, and I am using I'm playing

622
00:33:55,000 --> 00:33:59,519
around both of Claude and with all the OMII tools

623
00:34:00,200 --> 00:34:06,759
from GitHub as well. I think, you know, back to

624
00:34:06,799 --> 00:34:09,079
my original point, is a good test suite is something

625
00:34:09,119 --> 00:34:14,000
gives you confidence. I have tried to was it a

626
00:34:14,079 --> 00:34:17,159
vibe code or just have an agent code, you know,

627
00:34:18,159 --> 00:34:20,679
a library for me, something I needed for production app,

628
00:34:20,800 --> 00:34:24,360
something you know, a bit more complex, not just a

629
00:34:24,400 --> 00:34:29,039
simple thing. And it was a general a good experience,

630
00:34:29,079 --> 00:34:31,679
like we would go through all the things, and I

631
00:34:31,719 --> 00:34:34,840
told it to go in a very strict TDD fashion.

632
00:34:34,960 --> 00:34:38,639
So we brought brought down to this was carawed. I said,

633
00:34:38,840 --> 00:34:41,320
you know, we're going to do GDD and just break

634
00:34:41,320 --> 00:34:43,840
down and take the most simple thing we can build

635
00:34:43,840 --> 00:34:45,920
first and write a test for that, then write code

636
00:34:45,960 --> 00:34:49,199
and some back and forth. But at the end of

637
00:34:49,559 --> 00:34:52,679
you know, a long day of experimenting with that, that

638
00:34:52,920 --> 00:34:54,880
was quote and all the code passed or all the

639
00:34:54,920 --> 00:34:58,039
tests passed, and the production code was there. I wasn't

640
00:34:58,079 --> 00:35:03,639
sure if but honestly I didn't trust it because for me.

641
00:35:04,280 --> 00:35:07,480
The key part when I'm actually writing a test or

642
00:35:07,519 --> 00:35:12,000
writing production code is I am I'm thinking about like

643
00:35:12,079 --> 00:35:14,840
all the turns that I don't take during writing test,

644
00:35:14,960 --> 00:35:17,039
like thinking about, well can I do this? No, that

645
00:35:17,079 --> 00:35:18,960
doesn't work because X, Y and C. And then I

646
00:35:19,000 --> 00:35:21,079
discover something else I need to think about as well

647
00:35:21,159 --> 00:35:23,599
when I sort of problem solve go through it. I

648
00:35:24,199 --> 00:35:27,039
haven't found a way with AI agency yet to get

649
00:35:27,039 --> 00:35:29,360
that same experience where I know I've been through all

650
00:35:29,360 --> 00:35:32,000
the educases and I've thought about that because I know,

651
00:35:32,079 --> 00:35:32,599
go for one.

652
00:35:32,599 --> 00:35:35,920
Speaker 2: But you only see those educases by writing the primary

653
00:35:36,039 --> 00:35:39,480
case and bumping into them. So it's the thought exercise.

654
00:35:40,039 --> 00:35:43,119
It is, Yeah, that happens right right, the code that

655
00:35:43,239 --> 00:35:45,480
actually helps you find those edges.

656
00:35:45,599 --> 00:35:48,400
Speaker 3: It helps. So one thing I have done is I

657
00:35:48,519 --> 00:35:53,239
have either tried to write the production code, the code

658
00:35:53,239 --> 00:35:55,480
that needs to some testing at some point, write that

659
00:35:55,559 --> 00:36:01,199
by hand without tests first, and then tell, you know,

660
00:36:01,360 --> 00:36:04,039
a AI agent of choice to go look at the

661
00:36:04,119 --> 00:36:07,800
changes I have here and write tests that test these things. Right,

662
00:36:08,119 --> 00:36:11,159
and if I have existing tests already, you know, look

663
00:36:11,199 --> 00:36:13,679
at the existing tests, see how they're structured. Maybe I

664
00:36:13,719 --> 00:36:15,719
write one or two tests myself because I want it

665
00:36:15,760 --> 00:36:18,679
to be done in a specific way, and then it

666
00:36:18,760 --> 00:36:22,400
can typically iterate over it and figure out well, these

667
00:36:22,400 --> 00:36:24,559
are all the it's cases, these are all the branching

668
00:36:24,559 --> 00:36:26,440
got things we need to test for, and it will

669
00:36:26,519 --> 00:36:29,000
bid out a whole bunch of tests. But I've also

670
00:36:29,079 --> 00:36:31,119
seen when I looked at some of the code that

671
00:36:31,599 --> 00:36:34,039
has been generated sometimes that will be a test where

672
00:36:34,119 --> 00:36:38,440
that is a source just doesn't make sense. So I

673
00:36:38,519 --> 00:36:43,440
don't think it's a silver bullet. You definitely need to

674
00:36:44,320 --> 00:36:47,639
do a ferral review like you would with if you

675
00:36:47,639 --> 00:36:49,159
have an open source and you get a pro request

676
00:36:49,199 --> 00:36:51,239
in from somebody you don't know, you really have to

677
00:36:51,280 --> 00:36:54,800
read food very carefully, and at that point if it's

678
00:36:54,800 --> 00:36:59,400
something very deeply technical. I my experience is that the

679
00:36:59,440 --> 00:37:02,000
amountlets time it really takes to do a very ferl

680
00:37:02,119 --> 00:37:06,559
review of the code you have received from somewhere like

681
00:37:06,639 --> 00:37:08,960
it's almost as you could have just written it yourself.

682
00:37:09,079 --> 00:37:10,159
Like at that point, if you.

683
00:37:10,760 --> 00:37:13,239
Speaker 2: The energy to do that, reviews same energy as to

684
00:37:13,239 --> 00:37:13,639
write it.

685
00:37:13,760 --> 00:37:17,039
Speaker 3: So what I do like with alarms is that they

686
00:37:17,079 --> 00:37:20,599
are really really good at reviewing things though, so you

687
00:37:22,840 --> 00:37:26,320
so using them using them with githob assigning copilots as

688
00:37:26,320 --> 00:37:30,719
a reviewer, they usually always find something. Sometimes it's just nitpicking,

689
00:37:30,760 --> 00:37:33,119
like you spell this word wrong, or but sometimes that

690
00:37:33,280 --> 00:37:37,400
is actually think so elerms. I think much more valuable,

691
00:37:37,639 --> 00:37:40,880
at least in my workflows right now, in reviewing what

692
00:37:40,920 --> 00:37:43,960
I've done and giving me feedback or having that back

693
00:37:43,960 --> 00:37:47,320
and forth. Whether we are just iterating on ideas, sparring

694
00:37:47,400 --> 00:37:49,360
and what didn't I think about here? And there would

695
00:37:49,360 --> 00:37:52,599
be something? So that add lots.

696
00:37:52,639 --> 00:37:57,480
Speaker 1: So we're getting into using models to generate tests, and

697
00:37:57,519 --> 00:38:02,320
then using models another model perhaps to value and validate

698
00:38:02,400 --> 00:38:03,320
it and review it.

699
00:38:03,480 --> 00:38:05,480
Speaker 2: And software arguing with software.

700
00:38:05,519 --> 00:38:08,760
Speaker 1: Maybe maybe this is our future, you know, and we

701
00:38:08,840 --> 00:38:11,440
are layers of models.

702
00:38:12,000 --> 00:38:13,760
Speaker 2: But it speaks to and I know you're working on

703
00:38:13,800 --> 00:38:15,480
a B in a two point Oh, it's like, should

704
00:38:15,519 --> 00:38:18,400
there be an MCP for B unit just so that

705
00:38:19,039 --> 00:38:23,800
those features are easily exposed to a prompting system.

706
00:38:23,840 --> 00:38:27,800
Speaker 3: So I think it could be. I think our MCP.

707
00:38:28,079 --> 00:38:31,800
So what would be, you know, quite extensive documentation with

708
00:38:31,920 --> 00:38:35,079
examples so that say go and look at the documentation

709
00:38:35,239 --> 00:38:37,519
and figure out how to make this test work. I

710
00:38:37,559 --> 00:38:40,480
think that that is I think a difference with playwright

711
00:38:40,519 --> 00:38:42,480
and the MGP. So what they have is because you're

712
00:38:42,480 --> 00:38:46,719
actually running a browser that has words of API. So

713
00:38:46,719 --> 00:38:49,719
so it's it's a slightly different scenario.

714
00:38:49,760 --> 00:38:55,079
Speaker 2: I think one thing necessary abstraction, Yes.

715
00:38:55,679 --> 00:38:58,320
Speaker 3: And again. So now you can also say, well, if

716
00:38:58,320 --> 00:39:02,039
you have a generally a whole bunch of test cases

717
00:39:02,239 --> 00:39:06,880
for whatever you're building, well those are either another ELM

718
00:39:07,039 --> 00:39:09,840
or yourself that has to maintain those going forward. So

719
00:39:10,960 --> 00:39:14,519
there is a point to having, you know, slipping that

720
00:39:14,639 --> 00:39:17,599
down or at least looking critically at them and saying this,

721
00:39:17,599 --> 00:39:19,599
this is actually a valuable test. Does that actually test

722
00:39:19,599 --> 00:39:23,639
something that other tasts aren't testing already? Right? I did try,

723
00:39:23,880 --> 00:39:26,760
which is something I want to experiment more with. Have

724
00:39:26,840 --> 00:39:29,599
you heard about striker dot net it's a mutation testing

725
00:39:29,639 --> 00:39:32,800
framework from my yourself, Well, it's it's from different platforms.

726
00:39:33,280 --> 00:39:37,119
So is so with mutation testing? What it does? It

727
00:39:37,159 --> 00:39:39,960
takes your test suite and then it says your production code,

728
00:39:39,960 --> 00:39:43,199
and then find conditionals in your production code, and then

729
00:39:43,639 --> 00:39:46,719
and it flips flips that conditional at at a very

730
00:39:46,719 --> 00:39:49,239
basic level, and then it runs all your tests. If

731
00:39:49,280 --> 00:39:53,000
it all your tests pass with that flip conditional, well

732
00:39:53,039 --> 00:39:56,159
then you have they call it a mutant that survived

733
00:39:56,440 --> 00:39:59,360
it's you know, from the x N universe, and and

734
00:39:59,440 --> 00:40:02,000
it will you said it loose on your code base.

735
00:40:02,079 --> 00:40:04,440
You need to have everything building and compiling. I'm always

736
00:40:04,480 --> 00:40:06,599
just passing before you do that. But it will then

737
00:40:06,639 --> 00:40:09,400
spend ten minutes, fifteen minutes as long as you wanted

738
00:40:09,400 --> 00:40:11,960
to go, just going through all your production cont finding

739
00:40:12,079 --> 00:40:14,159
bits to flip. And it will do that, and it

740
00:40:14,159 --> 00:40:16,760
will run all your tests and if some tests, if

741
00:40:16,760 --> 00:40:20,239
that's test that doesn't fail, well then it reported back

742
00:40:20,280 --> 00:40:23,719
to you in a in a in a report you

743
00:40:23,719 --> 00:40:26,239
get after the run that tells you, well, I flipped

744
00:40:26,280 --> 00:40:28,920
these conditionals and there were no tests that broke when

745
00:40:28,960 --> 00:40:31,400
I did that. So I find that to be a

746
00:40:31,480 --> 00:40:33,840
much better metric for whether or not I have good

747
00:40:33,840 --> 00:40:37,400
code covers or not, because just going crossing over a

748
00:40:37,480 --> 00:40:40,159
line during a test doesn't mean you actually, you know,

749
00:40:41,800 --> 00:40:44,239
I'm sitting here on video doing the you know.

750
00:40:45,760 --> 00:40:47,239
Speaker 2: Podcast That doesn't work.

751
00:40:49,679 --> 00:40:52,719
Speaker 3: So I actually asked Claude to say go down too, Striker,

752
00:40:53,280 --> 00:40:55,119
because it claimed that it is done, it had done

753
00:40:55,119 --> 00:40:58,000
all what to do for that library, low level libry building,

754
00:40:58,039 --> 00:40:59,920
and then run this against it, and then it's spent

755
00:41:00,039 --> 00:41:02,559
two hours more just running Striker look at the report

756
00:41:02,599 --> 00:41:07,400
than adding more tests. So that is you know a

757
00:41:07,440 --> 00:41:10,119
way to go forward and find find the test that

758
00:41:10,159 --> 00:41:11,119
you haven't written yet.

759
00:41:11,639 --> 00:41:15,199
Speaker 2: Interesting, Yeah, because we're presuming all mutations are bad. You

760
00:41:15,239 --> 00:41:16,519
know that's this very x men.

761
00:41:16,679 --> 00:41:20,840
Speaker 3: Well no, so yeah, if you go this website striper

762
00:41:20,880 --> 00:41:22,519
dot net. But if you go and look there, you

763
00:41:22,519 --> 00:41:26,159
will see there will be mutations where you can see that.

764
00:41:26,880 --> 00:41:29,159
It's never it's like it's on reasonable code. As soon

765
00:41:29,159 --> 00:41:30,199
as they flip that bit.

766
00:41:31,079 --> 00:41:34,440
Speaker 2: You shared striker dot net, isn't it striker mutator dot io.

767
00:41:35,119 --> 00:41:36,519
Speaker 3: Maybe they changed the U own.

768
00:41:36,599 --> 00:41:39,280
Speaker 2: Yeah, because it's that that's the site with JavaScript, n C,

769
00:41:39,440 --> 00:41:40,280
sharp end Scala.

770
00:41:40,519 --> 00:41:43,800
Speaker 3: Yeah, yeah, it's it's uh yeah, you're right, Striker.

771
00:41:43,519 --> 00:41:46,119
Speaker 2: Mutata including the show notes for folks who want it

772
00:41:46,519 --> 00:41:48,559
helps you find the code that has leaked out of

773
00:41:48,599 --> 00:41:49,039
your head.

774
00:41:51,199 --> 00:41:55,440
Speaker 3: So it's it's a very It will also report things

775
00:41:55,480 --> 00:41:57,559
and obviously it can flip a bit and then the

776
00:41:57,599 --> 00:42:00,480
compiler doesn't it doesn't compile anymore, and that is also

777
00:42:00,519 --> 00:42:03,280
counted as you know, that's just stetic tybing.

778
00:42:03,519 --> 00:42:05,920
Speaker 2: That's easy to do. I do that all the time, exactly.

779
00:42:07,599 --> 00:42:10,280
But I love this idea that you it makes changes

780
00:42:10,320 --> 00:42:14,039
to code. It still pass. But still the question is

781
00:42:14,039 --> 00:42:15,599
is the code now incorrect?

782
00:42:16,360 --> 00:42:20,239
Speaker 3: Well, the point is it's about checking if your test

783
00:42:20,280 --> 00:42:22,880
tweet is giving your protection against your questions. Because if

784
00:42:22,880 --> 00:42:24,599
I can go and flip the bits and no, none

785
00:42:24,599 --> 00:42:27,000
of my test of breaking, I might it might just

786
00:42:27,039 --> 00:42:28,639
not be a nothing, but it might also be that

787
00:42:28,679 --> 00:42:31,440
I've broken the behavior of my application. Absolutely, So you

788
00:42:31,559 --> 00:42:34,840
want your test weite to capture or to catch those

789
00:42:34,880 --> 00:42:39,159
things if it's important. So, yeah, Typically when I run

790
00:42:39,320 --> 00:42:43,320
Striker on my code, that is quite a large list,

791
00:42:43,440 --> 00:42:45,480
and some of them you just say, well, that's not

792
00:42:45,519 --> 00:42:46,039
an issue.

793
00:42:46,119 --> 00:42:48,119
Speaker 2: I'm not going to do that. Yeah, Gail, do you

794
00:42:48,159 --> 00:42:49,480
hate nells as much as I do?

795
00:42:50,280 --> 00:42:53,920
Speaker 1: For testing? Aren't they like the worst? Do you like

796
00:42:53,960 --> 00:42:57,000
when you create a test, should you automatically should your

797
00:42:57,039 --> 00:43:02,119
framework automatically check for nolls before I actually add more tasks?

798
00:43:02,639 --> 00:43:07,159
Speaker 3: Well? I think we are. Well, we're talking dot Net.

799
00:43:07,239 --> 00:43:09,119
We have we have a compiler that will do that

800
00:43:09,159 --> 00:43:11,920
for us, so I will I.

801
00:43:11,840 --> 00:43:15,280
Speaker 1: Will use If they change it run time and you're

802
00:43:15,280 --> 00:43:18,320
not doing any null checking, there's a runtime error that

803
00:43:18,360 --> 00:43:20,239
can occur and often does.

804
00:43:20,320 --> 00:43:24,880
Speaker 3: So I think that's that's the things between what kind

805
00:43:24,920 --> 00:43:27,880
of things. You're if you're building a component, well at

806
00:43:28,039 --> 00:43:31,400
a reusable library that you probabish as a NUCAD, you

807
00:43:31,519 --> 00:43:35,639
would want even if you have noables enabled in your library.

808
00:43:35,639 --> 00:43:38,199
When you're building it out and you use all the

809
00:43:38,239 --> 00:43:42,159
right attributes, your in user, which is not in the

810
00:43:42,199 --> 00:43:46,320
same compile space as you are, can passing. Yeah, they could.

811
00:43:46,280 --> 00:43:49,199
They can pass in a all because they might have

812
00:43:49,239 --> 00:43:51,000
turned Dollible off in their compiler.

813
00:43:51,119 --> 00:43:51,280
Speaker 2: Right.

814
00:43:51,480 --> 00:43:54,280
Speaker 3: So on the so, if you're building a library, definitely

815
00:43:54,320 --> 00:43:58,000
on all your public GAPI surfaces, I add indult checks

816
00:43:58,119 --> 00:44:02,000
or in general, you know, just use the various arguments

817
00:44:02,280 --> 00:44:05,280
out of range and all of that checks. Because you

818
00:44:05,320 --> 00:44:07,039
can't will do that and bid units. You can't trust

819
00:44:07,079 --> 00:44:09,719
your users to do the right thing, or they might

820
00:44:09,800 --> 00:44:12,639
just have apology of not using nollible in their code base.

821
00:44:13,039 --> 00:44:15,920
If I'm building a line of business application or internal

822
00:44:15,920 --> 00:44:19,719
applications where everything that gets compilers compiled by my compiler,

823
00:44:19,760 --> 00:44:22,440
how I compuget it. I am much more inclient to

824
00:44:22,679 --> 00:44:27,239
just trust that. You know, if we've said that this

825
00:44:28,199 --> 00:44:30,719
object here can not when you pass it into this method,

826
00:44:31,320 --> 00:44:33,320
well the compiler will tell me if I'm trying to

827
00:44:33,360 --> 00:44:36,840
pass in an object. I think it's especially the later

828
00:44:36,920 --> 00:44:39,559
version of c Shop has gotten very good at basically

829
00:44:40,000 --> 00:44:42,239
understanding how objects flow and capture that.

830
00:44:42,639 --> 00:44:46,920
Speaker 1: Okay, it has, but when we turn nullible on now

831
00:44:46,960 --> 00:44:49,880
we see a lot of squiggles from the compiler and

832
00:44:49,960 --> 00:44:54,440
visual studio. Yes, and I think of them sometimes as

833
00:44:54,559 --> 00:44:58,199
noise because it's everywhere, and I know that could be

834
00:44:58,360 --> 00:45:00,559
no but it's not because I'm clearly looking at the

835
00:45:00,599 --> 00:45:04,360
code and so I'm probably not alone in that. A

836
00:45:04,400 --> 00:45:09,079
lot of developers so that out you know, I hear you.

837
00:45:09,199 --> 00:45:14,559
Speaker 3: I would strongly recommend that to really work well with

838
00:45:14,679 --> 00:45:18,000
notable enabled, you have to enable it. And then I

839
00:45:18,039 --> 00:45:21,559
also always enable three warnings as errors, at least in

840
00:45:21,639 --> 00:45:25,159
my release belts. And then we simply don't like I

841
00:45:25,199 --> 00:45:27,400
would if you have, for example, if you know you're

842
00:45:27,440 --> 00:45:29,679
talking to external things like it's not part of your

843
00:45:29,679 --> 00:45:33,280
internal business logic domain, where sometimes you can have an

844
00:45:33,280 --> 00:45:35,559
all come in or the library will tell you that

845
00:45:35,639 --> 00:45:38,000
this may be not even though you know in all

846
00:45:38,000 --> 00:45:40,079
my use cases it's never going to be all right. Well,

847
00:45:40,320 --> 00:45:43,079
I just put a guard in at the itches so

848
00:45:43,320 --> 00:45:47,840
I know that within my code everything is not knowable,

849
00:45:47,920 --> 00:45:50,760
and it's a bit annoying. Sometimes you have to add

850
00:45:51,159 --> 00:45:53,639
an additional check just because, right you can.

851
00:45:53,719 --> 00:45:55,199
Speaker 2: But but I do that all the time.

852
00:45:55,400 --> 00:45:59,360
Speaker 1: I'm it's in my DNA to put those centuries in

853
00:45:59,400 --> 00:46:00,239
place at the edge.

854
00:46:00,920 --> 00:46:05,440
Speaker 3: So but if you force yourself into not not accepting

855
00:46:05,480 --> 00:46:09,239
any normal warnings squigglies and simply deal with them at

856
00:46:09,280 --> 00:46:12,320
the ages where you are, then you are much less

857
00:46:12,440 --> 00:46:15,840
likely to have problems, at least in my experience.

858
00:46:15,840 --> 00:46:18,360
Speaker 1: But that's you know, except now you're going to spend

859
00:46:18,400 --> 00:46:21,599
an extra hour getting rid of those squiggles.

860
00:46:21,880 --> 00:46:23,440
Speaker 3: I'm sure co Pilot can help you with that.

861
00:46:23,760 --> 00:46:25,960
Speaker 2: I'm sure exactly.

862
00:46:26,400 --> 00:46:28,280
Speaker 1: That's a good use for a Hey, get rid of

863
00:46:28,320 --> 00:46:29,119
all them spriggs.

864
00:46:29,199 --> 00:46:32,039
Speaker 3: They are actually quite good at figuring something like that out.

865
00:46:32,239 --> 00:46:34,920
And obviously you have to do a bit of monitoring

866
00:46:35,239 --> 00:46:39,519
on on things as well afterwards, reviewing the changes.

867
00:46:39,599 --> 00:46:39,800
Speaker 2: Right.

868
00:46:40,639 --> 00:46:46,159
Speaker 3: Actually, speaking of Mark Semen, I wanted to call out

869
00:46:46,239 --> 00:46:50,440
something else which I find is right quite interesting, is

870
00:46:50,599 --> 00:46:55,519
naming of tests. So I want so because there's no

871
00:46:55,920 --> 00:46:57,960
right or wrong here. But he had a good blog

872
00:46:58,000 --> 00:47:00,480
post a while back, so let me let's me test

873
00:47:00,519 --> 00:47:05,280
out the scenario on YouTube. So imagine we have I

874
00:47:05,280 --> 00:47:08,519
don't know, a podcast met Ninja class and and we

875
00:47:08,559 --> 00:47:10,440
want to write it has a feature where you can

876
00:47:10,559 --> 00:47:12,480
upload a new podcast and it maybe have to go

877
00:47:12,639 --> 00:47:16,119
life time in the future, So we want to write

878
00:47:16,159 --> 00:47:20,599
a unit test for that feature. So just off the

879
00:47:20,599 --> 00:47:22,960
top of the head, what would you name that test?

880
00:47:23,239 --> 00:47:27,119
Like the test where we're just uploading a file call

881
00:47:27,519 --> 00:47:30,400
the surface of the API and say, oh, here's his

882
00:47:30,480 --> 00:47:32,480
new podcast and has a good life date and you

883
00:47:32,519 --> 00:47:37,000
know something, you know, some assertions should happen as well,

884
00:47:37,199 --> 00:47:39,280
what what what name would you give that test?

885
00:47:39,400 --> 00:47:43,440
Speaker 1: Well, if I worked for Microsoft, I'd call it uh

886
00:47:43,840 --> 00:47:50,440
foundation framework for testing podcast uploading and checking to see

887
00:47:50,480 --> 00:47:52,480
if it's valid.

888
00:47:52,679 --> 00:47:54,480
Speaker 2: Yes, something like that.

889
00:47:54,960 --> 00:48:00,639
Speaker 3: So something about something with the whatever you using, then

890
00:48:00,840 --> 00:48:06,519
maybe the action and then some expected outcome assertion. Right, yeah,

891
00:48:06,559 --> 00:48:12,360
and I so Mark had a really great point. Whenever, well,

892
00:48:12,360 --> 00:48:14,239
at least for my sake, I guess for Marks as well,

893
00:48:14,280 --> 00:48:16,320
whenever I read a test, when I come into a

894
00:48:16,320 --> 00:48:18,599
test I haven't seen before somebody else has written bad,

895
00:48:18,840 --> 00:48:21,400
I actually usually just skip over the name of the

896
00:48:21,440 --> 00:48:25,840
test and start reading the code because my experience is

897
00:48:25,880 --> 00:48:28,480
that you can't you can't fit all the details in

898
00:48:28,519 --> 00:48:33,239
the name anyway. So we'll just end up reading the test.

899
00:48:33,280 --> 00:48:36,400
And then the name is more of a mandatory comment

900
00:48:36,400 --> 00:48:41,199
because methods have to have a name in cl but

901
00:48:41,199 --> 00:48:43,760
but they can also contend to go stale like the name.

902
00:48:43,880 --> 00:48:46,280
Like I so many times I've seen a unit test

903
00:48:46,360 --> 00:48:50,239
where the name said that it included, for example, bessertion

904
00:48:50,599 --> 00:48:53,519
or expected outcome in the name, but the outcome changed

905
00:48:53,559 --> 00:48:56,639
because business requirements changed, right, but they forgot to update

906
00:48:56,679 --> 00:48:57,960
the name of the test. So now you have it.

907
00:48:58,039 --> 00:48:59,760
You're reading the code when you're looking at a test

908
00:48:59,840 --> 00:49:02,079
name and they don't match up, and you're going back

909
00:49:02,119 --> 00:49:03,519
and forth, what is the right thing here?

910
00:49:03,840 --> 00:49:06,480
Speaker 1: So usually they start with If I wasn't being flipped,

911
00:49:06,480 --> 00:49:08,079
I would say it's start with should.

912
00:49:07,960 --> 00:49:11,360
Speaker 3: Yeah, because that's another good word that explains exactly you know,

913
00:49:11,400 --> 00:49:13,760
filler words as well, well, that's another pet peeple. So

914
00:49:14,000 --> 00:49:17,199
I think were my recommendation, and what I learned from

915
00:49:17,199 --> 00:49:22,760
Mark as well, was to just use the business scenario

916
00:49:22,920 --> 00:49:24,880
in the description. So in this case, it might be

917
00:49:24,920 --> 00:49:29,880
something like uploading new podcast with future date future release date,

918
00:49:30,280 --> 00:49:32,800
So that is the scenario, that scenario. As long as

919
00:49:32,840 --> 00:49:34,239
you have that feature, it's not going to change. So

920
00:49:34,239 --> 00:49:36,400
the neighbor of test is not going to change, but

921
00:49:36,519 --> 00:49:40,760
then you fill out the breadth of the test method anyway.

922
00:49:41,039 --> 00:49:43,719
So again that makes it so that you have an easier,

923
00:49:43,760 --> 00:49:47,239
juddiestable test when you get back to it half a

924
00:49:47,280 --> 00:49:50,280
year later and figuring out why it's broken or it

925
00:49:50,400 --> 00:49:51,639
just won't to understand what's going on.

926
00:49:52,480 --> 00:49:52,880
Speaker 2: Very good.

927
00:49:53,119 --> 00:49:54,760
Speaker 3: Small details like that are important.

928
00:49:54,800 --> 00:49:57,880
Speaker 2: I think we tend to name the test to the

929
00:49:58,000 --> 00:50:02,000
class that you're testing and ending it with tests, so

930
00:50:02,079 --> 00:50:03,840
you can sort out the test if you want to,

931
00:50:03,920 --> 00:50:06,039
like I kind of want to. I guess I'm always

932
00:50:06,039 --> 00:50:08,199
thinking from a search perspective, like why am I going

933
00:50:08,239 --> 00:50:10,639
to find this where? You know? Where is this going

934
00:50:10,719 --> 00:50:12,360
to live? What is it related to?

935
00:50:12,679 --> 00:50:14,840
Speaker 3: Well, so I think in dot Net, or at least

936
00:50:14,840 --> 00:50:18,079
in my code, we have all the tests sit in

937
00:50:18,079 --> 00:50:23,840
the separate project test project, and I tend to have

938
00:50:24,159 --> 00:50:26,960
I don't tend to have a test class per class

939
00:50:27,000 --> 00:50:29,960
I have in my production code, but if it's like

940
00:50:30,079 --> 00:50:33,239
the if it's a public surface a p I, I

941
00:50:33,280 --> 00:50:35,599
will have a you know class named you know product

942
00:50:36,079 --> 00:50:41,000
or podcast upload manager tests and that is where all

943
00:50:41,039 --> 00:50:45,719
the tests belonging to that sits. That's one approach. You

944
00:50:45,760 --> 00:50:48,199
can also go full b d D and and and

945
00:50:48,840 --> 00:50:52,360
girking and all of that, and and have just different

946
00:50:52,400 --> 00:50:55,679
sets of tests, or if you are in a different

947
00:50:56,079 --> 00:50:58,360
coding environment where you can actually have test code sitting

948
00:50:58,440 --> 00:51:01,159
right next to the coded tests over classes just mixed

949
00:51:01,159 --> 00:51:04,719
to it, or whatever terminology they have for their you know,

950
00:51:04,800 --> 00:51:10,239
test code and production code, that that's also quite valuable.

951
00:51:10,360 --> 00:51:13,039
It's a bit leaning into the feature foldos concept where

952
00:51:13,039 --> 00:51:16,079
everything that that does belong together is sitting in the

953
00:51:16,079 --> 00:51:19,119
same area on disc so you can easily find everything

954
00:51:19,159 --> 00:51:23,039
that that that does something together. But I don't think

955
00:51:23,039 --> 00:51:25,360
that's a good option in the dot Ninity system at least.

956
00:51:25,440 --> 00:51:29,440
Speaker 1: So what's next for you? I know you said you're

957
00:51:29,920 --> 00:51:33,360
working on b UNIT two, yes, and is that taking

958
00:51:33,400 --> 00:51:35,320
all your time or I mean you're doing a lot

959
00:51:35,320 --> 00:51:37,679
of conference speaking and that kind of stuff.

960
00:51:38,159 --> 00:51:42,000
Speaker 3: Well, so b unit is taking a little bit of

961
00:51:42,039 --> 00:51:44,719
my free time. No writing books for me. I I've

962
00:51:44,760 --> 00:51:46,920
heard from from better folks than me that it's not

963
00:51:47,280 --> 00:51:50,159
you know, it's it's not a good idea to get

964
00:51:50,159 --> 00:51:53,320
into that too much. But no, Yeah, I have a

965
00:51:53,320 --> 00:51:56,639
conference coming up. I think Richard will also be there

966
00:51:56,679 --> 00:52:04,079
in Stavanna. Hello Stavana in Norway. And and hell was Yeah,

967
00:52:04,360 --> 00:52:08,679
I'm using the Norwegian pronunciation perhaps uh and but most

968
00:52:08,719 --> 00:52:12,000
of my days to day job, it's it's it's a

969
00:52:12,119 --> 00:52:15,480
full time in a little bit. So open source isn't

970
00:52:15,480 --> 00:52:17,599
getting a lot of attention these days, but we are

971
00:52:17,639 --> 00:52:20,079
trying to sneak in a few hours every week, me

972
00:52:20,119 --> 00:52:22,480
and Steven to just jump on a scream or jump

973
00:52:22,519 --> 00:52:25,400
on a call and get some work done. So so yeah,

974
00:52:25,440 --> 00:52:28,480
that that is. That is, you know, going back to

975
00:52:29,159 --> 00:52:32,360
the original comment that you read Richard in the start

976
00:52:32,360 --> 00:52:39,159
of the podcast from I forget the name, but yeah,

977
00:52:39,519 --> 00:52:42,679
open sources you know, the work that you do when

978
00:52:42,719 --> 00:52:45,480
you don't have work and you don't have family time.

979
00:52:46,079 --> 00:52:49,360
So yeah, so it's it's a big bit on the

980
00:52:49,360 --> 00:52:51,480
back burner. But I'm waiting for EA agents to come

981
00:52:51,519 --> 00:52:53,239
and take my open source job for me, and so

982
00:52:53,360 --> 00:52:55,800
I give it instructions and it will do all the

983
00:52:55,840 --> 00:52:58,519
right things. It happened, hasn't happened yet, but we might

984
00:52:58,559 --> 00:52:59,719
be lucky when.

985
00:52:59,639 --> 00:53:03,920
Speaker 1: Yeah, fantastic Ego Hanson, it's been pleasure talking to you

986
00:53:04,000 --> 00:53:07,039
this hour, and it's always interesting when we sit down

987
00:53:07,079 --> 00:53:10,599
and talk likewise, and we'll talk to you next time

988
00:53:10,800 --> 00:53:12,320
on dot net Bronx.

989
00:53:32,360 --> 00:53:32,800
Speaker 2: Dot Net.

990
00:53:32,880 --> 00:53:35,840
Speaker 1: Rocks is brought to you by Franklin's Net and produced

991
00:53:35,840 --> 00:53:39,599
by Pop Studios, a full service audio, video and post

992
00:53:39,679 --> 00:53:43,840
production facility located physically in New London, Connecticut, and of

993
00:53:43,880 --> 00:53:48,800
course in the cloud online at pwop dot com. Visit

994
00:53:48,840 --> 00:53:50,960
our website at d O T N E t R

995
00:53:51,000 --> 00:53:54,920
O c k S dot com for RSS feeds, downloads,

996
00:53:55,079 --> 00:53:58,760
mobile apps, comments, and access to the full archives going

997
00:53:58,800 --> 00:54:02,039
back to show number one, recorded in September two.

998
00:54:01,880 --> 00:54:02,480
Speaker 2: Thousand and two.

999
00:54:03,119 --> 00:54:05,440
Speaker 1: And make sure you check out our sponsors. They keep

1000
00:54:05,519 --> 00:54:08,719
us in business. Now go write some code. See you

1001
00:54:08,719 --> 00:54:09,159
next time.

1002
00:54:10,039 --> 00:54:12,440
Speaker 3: You got JAD Middle Vans the

1003
00:54:17,840 --> 00:54:18,119
Speaker 2: Home

