1
00:00:01,080 --> 00:00:03,000
Speaker 1: How'd you like to listen to dot net rocks with

2
00:00:03,040 --> 00:00:07,879
no ads? Easy? Become a patron for just five dollars

3
00:00:07,919 --> 00:00:10,800
a month. You get access to a private RSS feed

4
00:00:10,839 --> 00:00:14,240
where all the shows have no ads. Twenty dollars a month,

5
00:00:14,279 --> 00:00:16,920
we'll get you that and a special dot net Rocks

6
00:00:16,960 --> 00:00:21,000
patron mug. Sign up now at Patreon dot dot NetRocks

7
00:00:21,120 --> 00:00:38,240
dot com. Happy Thanksgiving all our US people. It's dot

8
00:00:38,320 --> 00:00:40,280
net rocks. I'm Carl Franklin and.

9
00:00:40,240 --> 00:00:42,719
Speaker 2: I'm Richard Campbell. And it's not Thanksgiving in Canada. That

10
00:00:42,880 --> 00:00:48,960
was last month, right, yep, yep? So yeah, what can

11
00:00:49,000 --> 00:00:51,240
we say, Richard? I mean I had a I did

12
00:00:51,240 --> 00:00:53,359
my Thanksgiving last night. Oh nice.

13
00:00:53,560 --> 00:00:54,479
Speaker 1: Yeah, we're recording this.

14
00:00:54,600 --> 00:00:58,479
Speaker 2: Yeah, we're actually recording this on the Thursday, so on Thanksgiving.

15
00:00:58,600 --> 00:01:01,840
Yeah in the US. But we did it yesterday. I

16
00:01:01,880 --> 00:01:03,159
think that's clever. Smart.

17
00:01:03,280 --> 00:01:08,200
Speaker 1: Yeah. I'm going to share my turkey recipe in the Lynx.

18
00:01:08,359 --> 00:01:11,879
Basically what I did is I used a SOUVD preparation

19
00:01:12,599 --> 00:01:15,439
for the turkey breast. Oh really on a turkey, Well,

20
00:01:15,519 --> 00:01:18,200
just for the turkey breasts. Oh okay, so you dismantled

21
00:01:18,239 --> 00:01:20,879
the turkey dismantled. It took out all the bones and

22
00:01:20,959 --> 00:01:24,359
roasted those for gravy and took off the breast and

23
00:01:24,519 --> 00:01:26,200
so those just get a little salt and pepper and

24
00:01:26,239 --> 00:01:28,959
go in a in a you know, sealed.

25
00:01:28,560 --> 00:01:30,879
Speaker 2: Bag to maximize moisture, right yep.

26
00:01:31,159 --> 00:01:33,920
Speaker 1: And it was one hundred and forty five degrees for

27
00:01:34,000 --> 00:01:39,239
two hours and it came out just perfect, that soft,

28
00:01:39,439 --> 00:01:42,879
you know, tender. And then the legs I did. I

29
00:01:42,920 --> 00:01:45,200
took out the bones. I can't believe we're talking about this,

30
00:01:45,280 --> 00:01:48,159
but took out the femurs and then you know, salt

31
00:01:48,200 --> 00:01:52,079
and pepper and little sage and those went in the oven.

32
00:01:52,400 --> 00:01:56,120
So yeah, so those were my turkey parts.

33
00:01:56,239 --> 00:01:56,799
Speaker 2: That's awesome.

34
00:01:56,920 --> 00:01:57,400
Speaker 1: It was good.

35
00:01:57,400 --> 00:01:59,359
Speaker 2: Hey, you know, turkey recipes are a thing this time

36
00:01:59,400 --> 00:02:01,239
of year. What can I say the one time anybody

37
00:02:01,280 --> 00:02:02,840
cares about turkey really well.

38
00:02:02,640 --> 00:02:06,000
Speaker 1: In at least in North America and you're in Europe, like, yeah, well.

39
00:02:05,879 --> 00:02:09,240
Speaker 2: Not so much. No, Turkey's in North American phenomenon very much.

40
00:02:09,680 --> 00:02:09,879
Speaker 3: Yeah.

41
00:02:10,120 --> 00:02:12,599
Speaker 1: I was listening to an interview with Eric Prepare from

42
00:02:12,719 --> 00:02:17,560
La Bernadine, famous chef. He's like, the turkey is to

43
00:02:17,879 --> 00:02:22,759
drive for me, I must have duck fat and you know,

44
00:02:22,919 --> 00:02:24,360
goose liver. Pete.

45
00:02:24,560 --> 00:02:26,800
Speaker 2: Yeah, listen, the right The only reason to cook a

46
00:02:27,240 --> 00:02:30,439
cook duc is so that you have duck fat for potatoes. Exactly,

47
00:02:30,639 --> 00:02:31,479
it's the only reason.

48
00:02:31,560 --> 00:02:34,000
Speaker 1: All right, let's get started with better know framework?

49
00:02:34,039 --> 00:02:35,919
Speaker 2: Hang on, you should we do the nineteen twenty seven

50
00:02:35,960 --> 00:02:37,360
Things Is episode ninety twenty seven.

51
00:02:37,439 --> 00:02:39,840
Speaker 1: Hey, you know that's a great idea. Yeah, I don't

52
00:02:39,840 --> 00:02:41,199
have anything prepared? What do you have?

53
00:02:41,879 --> 00:02:44,599
Speaker 2: Nineteen twenty seven was the year that Charles Limberg flew

54
00:02:44,680 --> 00:02:48,919
solo across the Atlantic. Oh yeah, yeah, New York to Paris.

55
00:02:48,960 --> 00:02:50,240
Speaker 1: Man, lucky, Lindy.

56
00:02:50,479 --> 00:02:53,280
Speaker 2: He made it, and then he celebrated the snot out

57
00:02:53,280 --> 00:02:56,000
of it. He didn't immediately on a tour won medals

58
00:02:56,039 --> 00:02:58,159
like the whole nine yards, so he knew what he

59
00:02:58,199 --> 00:03:02,199
was doing. Tried to run for president too, right, I think? Yeah, anyway,

60
00:03:02,240 --> 00:03:03,599
there you go. That's what I happened to nine. That's

61
00:03:03,599 --> 00:03:04,960
the best thing I have a nine twenty seven. There's

62
00:03:04,960 --> 00:03:06,000
all kinds of crazy that I said.

63
00:03:06,199 --> 00:03:08,560
Speaker 1: Okay, all right, good, all right, so better no framework?

64
00:03:08,639 --> 00:03:09,240
Roll the music?

65
00:03:09,360 --> 00:03:18,039
Speaker 2: All right? All right, man? What do you got?

66
00:03:18,080 --> 00:03:18,159
Speaker 3: Well?

67
00:03:18,159 --> 00:03:21,199
Speaker 1: I don't know if you've seen this, but some guys

68
00:03:21,280 --> 00:03:23,879
to Avalonia, you know, which.

69
00:03:23,680 --> 00:03:26,199
Speaker 2: Is the UI framework.

70
00:03:25,919 --> 00:03:31,159
Speaker 1: UI framework that goes multiplatform and they recreated visual Basic six.

71
00:03:31,360 --> 00:03:34,719
What and you can even run it in your browser.

72
00:03:34,840 --> 00:03:36,319
Speaker 2: Oh my goodness, that's hilarious.

73
00:03:36,400 --> 00:03:40,759
Speaker 1: Okay, so some caveats that the language support is limited,

74
00:03:40,840 --> 00:03:43,639
but you get the visual Designer. You can save in

75
00:03:43,719 --> 00:03:47,199
load projects in VB six format MDI interface.

76
00:03:47,240 --> 00:03:48,039
Speaker 2: I'm excited.

77
00:03:48,800 --> 00:03:53,479
Speaker 1: Yeah, right, it's really funny.

78
00:03:53,719 --> 00:03:56,520
Speaker 2: I mean it is really awesome. I just couldn't remember

79
00:03:56,840 --> 00:04:00,240
how to write VB six code, so, of course not.

80
00:04:00,319 --> 00:04:01,919
It's been twenty years.

81
00:04:01,840 --> 00:04:04,759
Speaker 1: And the compiler was ruthless, Like, you know, hey, if

82
00:04:04,759 --> 00:04:06,680
you don't fix this problem, I'm gonna pop up a

83
00:04:06,719 --> 00:04:09,840
dialogue like every five seconds and tell you to fix it,

84
00:04:09,960 --> 00:04:12,159
tell you how wrong you yeah, and not give you

85
00:04:12,199 --> 00:04:13,960
an opportunity to fix it.

86
00:04:13,960 --> 00:04:16,720
Speaker 2: It's just funny, you know, fix it faster. You're not

87
00:04:16,720 --> 00:04:18,920
fixing it fast enough. Get fixing what's wrong with you?

88
00:04:19,079 --> 00:04:21,240
Speaker 1: Yeah? I guess if you know what code you're going

89
00:04:21,319 --> 00:04:23,319
to put in there and copy and paste it, it's

90
00:04:23,360 --> 00:04:25,639
probably gonna be a lot better your experience.

91
00:04:25,720 --> 00:04:26,040
Speaker 2: Maybe.

92
00:04:26,120 --> 00:04:26,800
Speaker 1: Yeah.

93
00:04:27,000 --> 00:04:28,600
Speaker 2: I don't know if you have any old VB six

94
00:04:28,639 --> 00:04:30,720
code around. I bet I do. I don't sit in

95
00:04:30,759 --> 00:04:33,480
a volder somewhere. Goodness knows, maybe we'll have to.

96
00:04:33,439 --> 00:04:36,680
Speaker 1: Go on you know, the wayback Machine.

97
00:04:37,480 --> 00:04:39,319
Speaker 2: There was a website. What was it called? Was it

98
00:04:39,399 --> 00:04:40,399
Carl and Gary?

99
00:04:40,800 --> 00:04:44,000
Speaker 1: Yeah, that's right, Yeah, probably find some stuff there a.

100
00:04:43,920 --> 00:04:46,680
Speaker 2: Few years ago. You know that would be a thing. Okay,

101
00:04:46,759 --> 00:04:49,600
well that's what I got. Richard, who's talking to us today? Thanks,

102
00:04:50,040 --> 00:04:52,439
grabbed a comment. I went to the Wayback Machine to

103
00:04:52,480 --> 00:04:55,240
show nine to nine six one we did with old

104
00:04:55,279 --> 00:04:57,839
Doc Norton. Remember Doc Norton in a while, Oh yeah,

105
00:04:58,000 --> 00:05:02,439
we saw him on the twenty anniversary show talking about

106
00:05:02,439 --> 00:05:05,160
agile metrics back then I was twenty fourteen. Lots of

107
00:05:05,160 --> 00:05:08,560
comments on this show, and Mattias Carlo had this comment.

108
00:05:08,560 --> 00:05:10,399
Admittedly it's from ten years ago. He says, I believe

109
00:05:10,399 --> 00:05:13,680
there are a couple of flaws on some of the argumentation.

110
00:05:14,000 --> 00:05:15,879
So that was the debate that Doc and you and

111
00:05:15,920 --> 00:05:18,360
I were happy about this about setting goals on metrics.

112
00:05:18,680 --> 00:05:20,759
While they can be good, the way they're described could

113
00:05:20,800 --> 00:05:23,240
make it horrible. The reason why is that if you

114
00:05:23,240 --> 00:05:25,279
take any measurement by itself, it has no meaning and

115
00:05:25,319 --> 00:05:30,160
therefore can cause problems, like people gamify the metric. What

116
00:05:30,240 --> 00:05:32,759
actually has to be done is to measure multiple points

117
00:05:32,800 --> 00:05:35,560
and make sense of it all. So not one set goal,

118
00:05:35,600 --> 00:05:38,600
but many, and so that would be goals for Velocity,

119
00:05:38,759 --> 00:05:41,759
goals for bugs, goals for tech deck. Really the more

120
00:05:41,800 --> 00:05:44,160
the merrier. Then you slowly start adjusting them all as

121
00:05:44,199 --> 00:05:46,680
the team allows. So don't let any one goal be

122
00:05:46,759 --> 00:05:49,480
the focus. But you left the tide of all these

123
00:05:49,480 --> 00:05:54,720
different kinds of metricis. This idea has been proved many times. Example,

124
00:05:54,759 --> 00:05:56,560
the whole IQ thing. There are people that have very

125
00:05:56,800 --> 00:05:58,399
high IQ as we know, but not all of them

126
00:05:58,399 --> 00:06:00,839
have other measures that are high like emotion que, social

127
00:06:00,879 --> 00:06:03,560
que and so on, that are actually needed for things

128
00:06:03,560 --> 00:06:05,959
to happen, and therefore lots of things never happen.

129
00:06:06,279 --> 00:06:09,199
Speaker 1: And you've got to measure for brain damage. Yeah, brain damage,

130
00:06:09,519 --> 00:06:12,800
brain damage, brain damage.

131
00:06:13,839 --> 00:06:16,439
Speaker 2: So first you get to measure one measure with a

132
00:06:16,519 --> 00:06:18,480
goal and see where's impacted. And you start measuring all

133
00:06:18,519 --> 00:06:19,800
of them, and you try to get goals to all

134
00:06:19,839 --> 00:06:22,399
of them like levers, and there's an optimal performance sitting

135
00:06:22,399 --> 00:06:25,120
in there somewhere, just like an engine. Yeah, I can't

136
00:06:25,199 --> 00:06:28,720
argue with that. I'm interested in getting more metrics, and

137
00:06:28,800 --> 00:06:32,279
certainly the challenge is applying them well, not trying to

138
00:06:32,319 --> 00:06:35,519
create problems, you're trying to solve them. So Mateias, thank

139
00:06:35,560 --> 00:06:36,839
you so much for your comment and a copy of

140
00:06:36,879 --> 00:06:38,319
music Coby. It's on its way to you. And if

141
00:06:38,319 --> 00:06:40,000
you'd like a comic of music, codbe I write a

142
00:06:40,000 --> 00:06:42,240
comment on the website at dot net Rock's com or

143
00:06:42,279 --> 00:06:44,160
on the facebooks. We publish every show there, and if

144
00:06:44,160 --> 00:06:45,519
you comment there and I read on the show, we'll

145
00:06:45,560 --> 00:06:46,839
send you a copy of music go by.

146
00:06:46,920 --> 00:06:49,439
Speaker 1: And you could follow us on social media. Richard and

147
00:06:49,519 --> 00:06:53,560
I have been on x Twitter for many, many, many years.

148
00:06:53,839 --> 00:06:56,519
Speaker 2: Although it clearly seems to be collapsing now, like the

149
00:06:56,839 --> 00:06:59,639
followers are dropped by, people are deleting accounts.

150
00:06:59,759 --> 00:07:03,560
Speaker 1: Yeah, yep, so a lot of us are on blue Sky.

151
00:07:03,879 --> 00:07:07,560
I'm Carl Franklin b sky dot social.

152
00:07:07,240 --> 00:07:09,120
Speaker 2: And I'm rich Campbell dot b Sky dot social.

153
00:07:09,160 --> 00:07:12,079
Speaker 1: And we're also on mastadon I'm at Carl Franklin at

154
00:07:12,079 --> 00:07:15,040
techhub dot social, and I'm rich Campbell at mass Social.

155
00:07:15,160 --> 00:07:17,800
All right, now we got that out of the way. Yeah,

156
00:07:17,920 --> 00:07:22,120
let's introduce Richard. The other Richard in the room, Richard Gross.

157
00:07:22,759 --> 00:07:26,600
He's an it archaeologist at my Born Wolf. Did I

158
00:07:26,600 --> 00:07:29,480
say that right? Richard you did all right, with more

159
00:07:29,519 --> 00:07:33,279
than ten years of modernization experience. I love that an

160
00:07:33,279 --> 00:07:37,040
it archaeologist, that's really cool, speaking.

161
00:07:36,680 --> 00:07:38,720
Speaker 2: Of a lot of the heck were you thinking?

162
00:07:38,800 --> 00:07:46,000
Speaker 1: Kind right, let's examine the ruins of this project. His

163
00:07:46,120 --> 00:07:51,839
focus is on hexagonal architectures, hypermedia APIs, test dsls, and

164
00:07:51,879 --> 00:07:56,199
the expressive and unambiguous modeling of the domain as code.

165
00:07:56,759 --> 00:08:01,279
He enjoys mastering TDD bdd d Ddungeons and Dragons D

166
00:08:01,439 --> 00:08:04,600
coupled design. I made that up that Dungeons and Dragons

167
00:08:04,639 --> 00:08:09,000
part D and D. Yeah, decoupled design and even practices

168
00:08:09,040 --> 00:08:12,759
that don't include two d's. He's also shaped the open

169
00:08:12,839 --> 00:08:18,319
source project code Charta, which lets even non developers grasp

170
00:08:18,519 --> 00:08:21,360
the quality of their software. Now I got to ask Richard,

171
00:08:22,600 --> 00:08:23,480
do you play D and D?

172
00:08:24,279 --> 00:08:28,720
Speaker 3: I did? I was actually a dungeon master for How

173
00:08:28,759 --> 00:08:29,480
did I know that?

174
00:08:29,879 --> 00:08:30,439
Speaker 1: Two years?

175
00:08:30,480 --> 00:08:31,120
Speaker 2: So somew.

176
00:08:32,559 --> 00:08:35,159
Speaker 1: Wow, okay, so the d's follow you wherever you go.

177
00:08:36,480 --> 00:08:38,799
Speaker 3: Yeah, actually I'm a bit said that. I'm not in

178
00:08:38,879 --> 00:08:42,720
tenacious D. But you know it's a two main group.

179
00:08:42,559 --> 00:08:48,360
Speaker 2: Right, Yeah, let's see those guys are squabbling too, aren't

180
00:08:48,360 --> 00:08:49,240
they If there's.

181
00:08:49,279 --> 00:08:51,679
Speaker 3: Yeah, yeah, but I don't I don't think they have

182
00:08:51,759 --> 00:08:53,480
a place for me. I cannot play guitar and I

183
00:08:53,480 --> 00:08:54,039
cannot sing.

184
00:08:54,360 --> 00:08:56,360
Speaker 1: Yeah, I think you know, if there was going to

185
00:08:56,399 --> 00:09:00,120
be a Tenacious d dot Net Rocks guest band, and

186
00:09:00,279 --> 00:09:03,000
it would probably be added up by Dylan Betty, don't

187
00:09:03,039 --> 00:09:03,519
you think.

188
00:09:03,480 --> 00:09:05,399
Speaker 2: Yeah, that would be pretty obvious.

189
00:09:05,399 --> 00:09:09,000
Speaker 1: He is the Jack Black of dot I mean that's fair,

190
00:09:10,879 --> 00:09:12,919
all right. So what are we talking about today, Richard?

191
00:09:13,279 --> 00:09:17,279
Speaker 3: Well, I would say, let's talk about a bit about

192
00:09:18,159 --> 00:09:20,679
modernization and code Carter.

193
00:09:21,039 --> 00:09:23,840
Speaker 1: I would think, okay, so I called it code Charter,

194
00:09:24,080 --> 00:09:26,559
But what is code? That's what is code Carter?

195
00:09:26,960 --> 00:09:31,679
Speaker 3: Yeah, it's uh my when we named it, I asked today,

196
00:09:32,480 --> 00:09:35,080
we just wanted to have two c's, so we just

197
00:09:35,279 --> 00:09:38,399
picked a name which starts with a CNN. And then,

198
00:09:39,559 --> 00:09:42,879
as it turns out, Carter apparently is Latin and it

199
00:09:42,960 --> 00:09:46,960
means document or papyrus or something like this. Pyrus yea,

200
00:09:48,000 --> 00:09:51,679
And yeah, it's just you know map, right, yeah, document

201
00:09:52,159 --> 00:09:53,279
a code map. Yeah.

202
00:09:54,639 --> 00:09:58,080
Speaker 1: Lunking in the caves of code archaeology, you come up, yeah,

203
00:09:59,279 --> 00:10:03,200
virus where somebody has attempted to describe some code.

204
00:10:03,679 --> 00:10:08,360
Speaker 3: Yeah, and I call myself that because I do a

205
00:10:08,399 --> 00:10:14,960
thing called health check software health check. And you know

206
00:10:15,480 --> 00:10:18,399
when you have an old code base and someone asks you, hey,

207
00:10:18,879 --> 00:10:20,679
this is five million lines of code. Can you figure

208
00:10:20,720 --> 00:10:24,240
out what's wrong? You immediately be like, okay, yeah, sure,

209
00:10:24,320 --> 00:10:27,320
give me two years and they're like, how about three weeks.

210
00:10:27,919 --> 00:10:28,200
Speaker 2: Nice?

211
00:10:29,039 --> 00:10:31,519
Speaker 3: And that's where where the code carter comes in.

212
00:10:32,320 --> 00:10:34,120
Speaker 2: Well, and I guess the question is why do they

213
00:10:34,120 --> 00:10:35,120
think anything's wrong.

214
00:10:37,200 --> 00:10:42,440
Speaker 3: Usually someone is like, oh, hey, I wanted this feature

215
00:10:42,559 --> 00:10:45,080
like yesterday and I got it six months later.

216
00:10:46,320 --> 00:10:48,759
Speaker 2: Why yeah, why is it taking a so long to

217
00:10:48,799 --> 00:10:50,879
modify code? But boy, we've heard this theme over and

218
00:10:50,919 --> 00:10:54,639
over again, right that applications build up craft and it

219
00:10:54,840 --> 00:10:56,799
just gets harder and harder to make changes.

220
00:10:57,399 --> 00:10:59,879
Speaker 1: And when you want to change something, well let's add this,

221
00:11:00,080 --> 00:11:02,480
you get packaged oh that requires this, which requires this.

222
00:11:02,559 --> 00:11:05,840
It's kind of like tugging on a thread in your sweater, right,

223
00:11:05,919 --> 00:11:08,480
I mean, pretty soon the whole thing unravels and you're like, ah,

224
00:11:08,600 --> 00:11:10,000
screw it, We're just going to rewrite it.

225
00:11:10,519 --> 00:11:15,519
Speaker 3: Yeah. I think in science they call this the ripple effect. Yeah,

226
00:11:15,960 --> 00:11:17,840
so you kind of throw a stone into the water

227
00:11:17,879 --> 00:11:20,799
and then ripples and it creates other ripples, and you know,

228
00:11:21,200 --> 00:11:24,840
it's not like one stone and then it's over, immediately

229
00:11:24,960 --> 00:11:27,679
spawns new stones and they just ripple all across the

230
00:11:27,720 --> 00:11:28,200
code base.

231
00:11:28,360 --> 00:11:30,879
Speaker 1: So I know that you're a fan of ports and

232
00:11:30,919 --> 00:11:37,600
adapters and hexagonal architecture and when you do health checks

233
00:11:37,639 --> 00:11:39,240
and stuff like this. It just kind of brought to

234
00:11:39,320 --> 00:11:44,039
mind that whole diagram. Do you try to when you're

235
00:11:44,039 --> 00:11:47,399
trying to modernize something, do you immediately go for that

236
00:11:47,480 --> 00:11:51,399
tool this is how we're going to redo things, or

237
00:11:51,399 --> 00:11:52,960
for that pattern, I should say.

238
00:11:52,879 --> 00:11:56,720
Speaker 3: I usually go for for mapping the code base first. Sure,

239
00:11:56,840 --> 00:12:01,960
But yeah, when I when I have so see parts

240
00:12:02,000 --> 00:12:03,799
and adapters, I love. I love the pattern, and yes,

241
00:12:03,840 --> 00:12:05,759
I use it, and I use it in legacy code.

242
00:12:06,879 --> 00:12:11,200
The problem I have is I don't know where to

243
00:12:11,279 --> 00:12:15,240
start and where to apply it because the customer wants,

244
00:12:15,399 --> 00:12:17,440
you know, new features, and he doesn't want me to

245
00:12:17,480 --> 00:12:21,080
fix all the code. He wants me to fix a

246
00:12:21,120 --> 00:12:24,679
specific part because that's where the feature comes in. And

247
00:12:25,279 --> 00:12:29,759
when I know that part, yes, I usually do put

248
00:12:29,799 --> 00:12:34,840
in ports, not like in a nice way, just put

249
00:12:34,840 --> 00:12:38,600
in the ports. So I don't so when I write

250
00:12:38,600 --> 00:12:42,480
a test, it doesn't touch the outside world. And because

251
00:12:42,480 --> 00:12:47,159
that's sometimes way deep in the application, I don't like

252
00:12:47,279 --> 00:12:49,840
inject it in there. I just put in some form

253
00:12:49,879 --> 00:12:53,480
of configuration there so I can change it for my tests.

254
00:12:54,320 --> 00:12:58,960
And yeah, definitely all ports of and adapters amazing, amazing

255
00:12:59,200 --> 00:13:00,360
architecture style.

256
00:13:00,960 --> 00:13:01,360
Speaker 2: Mm hmm.

257
00:13:02,519 --> 00:13:05,039
Speaker 1: So the first step is to figure out what the

258
00:13:05,080 --> 00:13:09,360
heck is this new relic we've discovered, and how does it?

259
00:13:09,480 --> 00:13:11,519
You know, what are the component parts and how do

260
00:13:11,600 --> 00:13:14,519
they interact with each other? And you know, maybe we

261
00:13:14,600 --> 00:13:20,720
could avoid pulling out the entire sweater with one thread

262
00:13:22,399 --> 00:13:24,679
to kill this metaphor to death.

263
00:13:25,240 --> 00:13:29,720
Speaker 3: Yeah, And I mean that's not easy obviously, because like

264
00:13:29,759 --> 00:13:34,480
you said, you know, it's it's it's tangled, so you

265
00:13:34,600 --> 00:13:37,320
want to have it decaped. You want to be like, okay,

266
00:13:37,320 --> 00:13:40,399
I just need to change this one. But the whole

267
00:13:40,639 --> 00:13:43,639
point of why it takes so long is because, yeah,

268
00:13:43,759 --> 00:13:46,279
this one thing is tangled to that other thing over there,

269
00:13:46,360 --> 00:13:48,440
and it you know, it becomes like a like a

270
00:13:48,480 --> 00:13:52,120
wacka mole game. And I think that the first step

271
00:13:52,159 --> 00:13:56,000
is always to to have some form of observable observables

272
00:13:56,120 --> 00:14:01,120
is wrong him because it's tied to operations, some overview.

273
00:14:02,759 --> 00:14:06,440
And this is where we where we put in code cutter,

274
00:14:06,480 --> 00:14:10,960
because it's a very very simple idea. When you when

275
00:14:10,960 --> 00:14:14,639
you have something like like sonar or or I don't know,

276
00:14:14,679 --> 00:14:17,559
independent going on or something like this that analyzes your

277
00:14:17,559 --> 00:14:21,399
code base, it will it will give you metrics like

278
00:14:21,679 --> 00:14:25,960
cyclomatic complexity or or code smells per file and everything,

279
00:14:26,519 --> 00:14:30,120
and it will be kind of like like your email inbox.

280
00:14:30,399 --> 00:14:34,159
It will say nine thousand issues or something.

281
00:14:34,440 --> 00:14:37,360
Speaker 2: And you will give me, give me my compiler, nine

282
00:14:37,360 --> 00:14:38,480
thousand warnings.

283
00:14:39,240 --> 00:14:42,840
Speaker 1: Yeah, and go yeah, work in coffee.

284
00:14:42,840 --> 00:14:46,320
Speaker 3: First, The interesting part is now, how can I how

285
00:14:46,360 --> 00:14:50,440
can I like make this viewable in some form that

286
00:14:50,440 --> 00:14:52,200
that I can digest it and I can say, okay,

287
00:14:52,240 --> 00:14:56,279
this is the most important part. And we we we

288
00:14:56,360 --> 00:15:01,320
stumbled more or less stumbled across a science tool that

289
00:15:02,720 --> 00:15:07,960
mapped files to buildings. And these buildings have properties three.

290
00:15:08,960 --> 00:15:11,879
One is the area, meaning how big is the building,

291
00:15:12,440 --> 00:15:16,879
the height, and the color, and they just map the

292
00:15:16,960 --> 00:15:20,159
whole code base one. One file is one building, and

293
00:15:20,200 --> 00:15:23,320
then you can put different metrics on these buildings. And

294
00:15:23,399 --> 00:15:25,440
when you when you view it from the top, you

295
00:15:25,440 --> 00:15:27,879
can see something like lines of code. That's a very

296
00:15:27,919 --> 00:15:32,480
typical lines of code. Well it could be, but right

297
00:15:32,480 --> 00:15:34,080
now I'm just talking about the area.

298
00:15:34,279 --> 00:15:35,000
Speaker 1: The size.

299
00:15:35,360 --> 00:15:38,759
Speaker 3: Okay, that would be lines of code because then you see, okay,

300
00:15:38,799 --> 00:15:40,919
it's a very large building when you when you view

301
00:15:40,960 --> 00:15:43,799
it from the birdeye view. And then you can put

302
00:15:43,919 --> 00:15:47,679
psychlomatic complexity on the height. And then the more business

303
00:15:47,679 --> 00:15:52,919
logic is in the file, the higher the psychlematic complexity becomes,

304
00:15:53,000 --> 00:15:55,440
the higher is actually the building. And then you have

305
00:15:55,960 --> 00:15:59,120
large and tall buildings. And now you can can tweak

306
00:15:59,120 --> 00:16:01,120
it a bit. Now it can be like okay, where

307
00:16:01,879 --> 00:16:05,000
you can you can look at GET for example, you

308
00:16:05,000 --> 00:16:10,440
can look at which file receives the most changes, and

309
00:16:10,480 --> 00:16:13,039
then you can color this building for that file. You

310
00:16:13,039 --> 00:16:15,360
can color it red and say like, okay, the thing

311
00:16:15,440 --> 00:16:17,840
that has the most changes, make it red.

312
00:16:18,240 --> 00:16:20,600
Speaker 1: And also I imagine which one is the most popular.

313
00:16:21,320 --> 00:16:24,039
How often does it get used versus these other ones

314
00:16:24,039 --> 00:16:24,759
on the periphery?

315
00:16:24,919 --> 00:16:29,039
Speaker 3: Right yeah, yeah, right now we're we are a bit

316
00:16:29,120 --> 00:16:31,960
in in the in the static territory where it can

317
00:16:32,039 --> 00:16:35,120
just extract stuff from from from the code and extract

318
00:16:35,120 --> 00:16:38,879
stuff from the from the GET history. It's a it's

319
00:16:38,879 --> 00:16:42,320
a big focus in in Adam Thornhill's book, Your code

320
00:16:42,399 --> 00:16:44,799
is a crime scene? How can you how can you

321
00:16:44,840 --> 00:16:48,879
extract all this information it's a it's a great book.

322
00:16:50,600 --> 00:16:55,440
He builds he builds his own tool called code scene,

323
00:16:55,720 --> 00:17:00,080
which is based on the the work he did in

324
00:17:00,559 --> 00:17:03,519
his book. Your Conde is a crime scene. Nice anyway,

325
00:17:04,559 --> 00:17:10,480
So code cut now maps all of these files to buildings,

326
00:17:10,519 --> 00:17:12,400
and then you can see like, Okay, this file is

327
00:17:12,559 --> 00:17:16,119
very large, meaning lots of lines of code, it's very

328
00:17:16,160 --> 00:17:19,480
high meaning lots of psychnomatic complexity, and it's very red

329
00:17:19,559 --> 00:17:23,599
meaning it's changed all the time. And now you can

330
00:17:23,799 --> 00:17:27,359
start doing a dialogue because people don't realize that they're

331
00:17:27,440 --> 00:17:29,720
changing this file all the time, and they don't realize

332
00:17:29,720 --> 00:17:32,240
how complex it is. And now you can have this

333
00:17:32,319 --> 00:17:36,319
dialogue also not only with the developers, but also with

334
00:17:37,559 --> 00:17:40,640
the stakeholders. It can be like, oh, look, we should

335
00:17:40,640 --> 00:17:42,839
tackle this one. Because you change it every week or

336
00:17:42,880 --> 00:17:43,599
you change.

337
00:17:43,319 --> 00:17:47,000
Speaker 2: It to day. So by looking back through the GitHub history,

338
00:17:47,000 --> 00:17:49,839
you're seeing where the resonance is in this code, where

339
00:17:49,880 --> 00:17:52,920
everybody's working on it, where it's getting the most change.

340
00:17:53,279 --> 00:17:57,240
Speaker 3: Yeah, but that's only only part of what I mean

341
00:17:57,279 --> 00:18:01,039
when I say map map your code. That's that's one

342
00:18:01,480 --> 00:18:04,880
one you just can You can go further. You can

343
00:18:04,920 --> 00:18:07,359
be like, okay, so let's look at the code and

344
00:18:07,440 --> 00:18:09,519
let's see which file only has one.

345
00:18:09,400 --> 00:18:12,680
Speaker 2: Author, right, and then touch code.

346
00:18:13,000 --> 00:18:15,759
Speaker 3: Yeah, and that's a that's a knowledge silo, right, it's

347
00:18:15,799 --> 00:18:16,920
just one person who knows it.

348
00:18:16,960 --> 00:18:20,160
Speaker 2: I mean, you know, doesn't win anymore.

349
00:18:22,359 --> 00:18:23,880
Speaker 1: Given a vulnerability score.

350
00:18:24,000 --> 00:18:25,519
Speaker 2: Really yeah, precisely.

351
00:18:25,839 --> 00:18:27,720
Speaker 3: And then you can then you can also be like, okay,

352
00:18:28,079 --> 00:18:31,920
who's still here or who's about to leave? Yeah, And

353
00:18:31,960 --> 00:18:34,720
you can be like, okay, well, okay, two people are

354
00:18:34,759 --> 00:18:36,960
about to leave, and they know the most complex part

355
00:18:37,000 --> 00:18:37,920
of my code base.

356
00:18:38,119 --> 00:18:40,160
Speaker 2: And they're the only ones you've ever touched it. Yes, right,

357
00:18:40,160 --> 00:18:42,279
because you have all that information now, so you know

358
00:18:42,519 --> 00:18:43,839
this is what you need to focus on.

359
00:18:44,039 --> 00:18:46,240
Speaker 1: Yeah, you know, it's pretty powerful. Is they say where

360
00:18:46,240 --> 00:18:51,039
I come from? That's wicked smat. It's very new England

361
00:18:51,680 --> 00:18:52,480
wicked smat.

362
00:18:54,640 --> 00:18:56,599
Speaker 3: The The fun part is you can also do the inverse.

363
00:18:57,319 --> 00:19:01,279
You can be like, okay, so which buildings have like

364
00:19:01,599 --> 00:19:04,920
the most authors? Yeah, and which is kind of the

365
00:19:04,960 --> 00:19:07,920
inverse smell because now it's no longer knowledge silo. Now

366
00:19:07,920 --> 00:19:11,599
it's probably a coordination bottleneck, right, yeah, because if you

367
00:19:11,680 --> 00:19:14,839
have like eighteen people working on the same file, yeah,

368
00:19:14,880 --> 00:19:16,559
that might also be a.

369
00:19:16,559 --> 00:19:18,039
Speaker 2: Problem for you for sure.

370
00:19:18,160 --> 00:19:22,640
Speaker 3: Yeah, in the end, I should probably put a disclaimer here,

371
00:19:25,039 --> 00:19:28,400
you you know, a good Heart's law probably which says like,

372
00:19:28,720 --> 00:19:31,279
when a metric becomes a target, it ceases to be

373
00:19:31,319 --> 00:19:32,240
a good metric.

374
00:19:33,480 --> 00:19:35,880
Speaker 2: Right, yeah, And I thought that was the comment I

375
00:19:35,920 --> 00:19:37,559
had at the beginning of the show. Right, It's like

376
00:19:37,920 --> 00:19:41,039
if you created a standalone metric and then every game

377
00:19:41,319 --> 00:19:44,359
now it's you make it into a target. Now it's useless,

378
00:19:44,400 --> 00:19:46,440
it becomes weaponized. Yeah yeah.

379
00:19:46,720 --> 00:19:49,400
Speaker 3: Yeah. So so when we do the health check, we're

380
00:19:49,599 --> 00:19:53,359
very clear as we want we want to help the people.

381
00:19:53,400 --> 00:19:55,599
We don't want to be like, okay, you need to

382
00:19:55,839 --> 00:19:58,519
I don't know, destroy this metric, drive it to zero.

383
00:19:58,680 --> 00:19:58,759
Speaker 4: No.

384
00:19:59,799 --> 00:20:02,240
Speaker 3: The the way we use code kata is just as

385
00:20:02,400 --> 00:20:05,160
the start of a conversation. We don't want to end

386
00:20:05,160 --> 00:20:07,920
the conversation. We don't to be like finger pointing everything.

387
00:20:08,720 --> 00:20:10,839
We will to know where to start and then we

388
00:20:10,880 --> 00:20:12,880
can have the dialogue right, and then we can figure

389
00:20:12,920 --> 00:20:16,319
out I mean, there could be a billion reasons why

390
00:20:16,440 --> 00:20:19,200
it's not bad. You know, it looks it looks bad,

391
00:20:19,240 --> 00:20:22,359
it looks red and everything. Then you get to start.

392
00:20:22,640 --> 00:20:24,559
Then you start talking to them and they're like, oh yeah,

393
00:20:24,680 --> 00:20:27,599
well this one we don't really use that often. Or

394
00:20:27,759 --> 00:20:30,759
you know, it's very complex, but we don't have to

395
00:20:30,839 --> 00:20:32,440
change it at all, or something like this.

396
00:20:32,680 --> 00:20:35,759
Speaker 2: I saw this with psychomatic complexity too, Like being complex

397
00:20:35,880 --> 00:20:40,240
isn't automatically a sin. Being unnecessarily complex is kind is

398
00:20:40,279 --> 00:20:44,160
a waste, But sometimes that complexity is essential. It's just

399
00:20:44,160 --> 00:20:46,200
a place to look. It doesn't mean it's a place

400
00:20:46,240 --> 00:20:47,160
to change.

401
00:20:47,079 --> 00:20:51,160
Speaker 1: Right, Yeah, but it could certainly be a target. Makes

402
00:20:51,200 --> 00:20:54,440
something an obvious target for refactoring. Yeah, you know, which

403
00:20:54,480 --> 00:20:56,400
is one of the things, one of the tools that

404
00:20:56,440 --> 00:20:59,920
you can make complex things easier to understand precisely.

405
00:21:00,079 --> 00:21:01,519
Speaker 2: Yeah, it's just a question of do you need to

406
00:21:02,000 --> 00:21:03,720
like if this doesn't go under a lot of change,

407
00:21:03,720 --> 00:21:04,960
and it hasn't got a lot of problems, and it

408
00:21:05,000 --> 00:21:08,680
happens to be complex. It's like, although you're talking about

409
00:21:08,680 --> 00:21:11,920
the classic, right, it's complicated and only one person's ever

410
00:21:11,960 --> 00:21:12,279
touched it.

411
00:21:16,160 --> 00:21:19,039
Speaker 3: Yeah, and this this person is about to win the lottery.

412
00:21:18,799 --> 00:21:21,440
Speaker 2: Right, that's right. I like your positive version. I was

413
00:21:21,480 --> 00:21:22,839
supposed to being hit by a bus.

414
00:21:25,279 --> 00:21:28,400
Speaker 3: Yeah, I call it. I don't call it the bus factor.

415
00:21:28,400 --> 00:21:29,799
I call it a lot of factor.

416
00:21:29,599 --> 00:21:30,359
Speaker 2: A lot of factory.

417
00:21:30,400 --> 00:21:33,960
Speaker 3: Yeah I do, I do use the the inverse bus

418
00:21:33,960 --> 00:21:34,839
factor though.

419
00:21:34,920 --> 00:21:36,599
Speaker 2: Inverse bus do you know that one?

420
00:21:36,680 --> 00:21:36,880
Speaker 1: No?

421
00:21:36,880 --> 00:21:39,039
Speaker 2: No is the one where we where the bus missed you?

422
00:21:39,039 --> 00:21:39,440
Speaker 1: No.

423
00:21:39,440 --> 00:21:42,680
Speaker 3: No. The bus factor is you know how many people

424
00:21:44,640 --> 00:21:47,000
or how many people can get hit by a bus

425
00:21:47,000 --> 00:21:50,119
before the project stops? Right? Or how many people oh right,

426
00:21:50,640 --> 00:21:55,559
I don't know, get married, win the lottery, whatever. You know,

427
00:21:55,599 --> 00:21:59,160
there are billion possible things that very positively can tell

428
00:21:59,200 --> 00:22:03,319
them they would leave. Inverse bus factor is how many

429
00:22:03,359 --> 00:22:06,200
people need to get hit by the bus before the

430
00:22:06,240 --> 00:22:07,079
project can start?

431
00:22:07,559 --> 00:22:07,720
Speaker 2: Right?

432
00:22:08,039 --> 00:22:12,000
Speaker 1: Hmm okay yeah. In other words, which people really need

433
00:22:12,039 --> 00:22:15,960
to take their hands off this code? Yeah we can. Yeah, yeah.

434
00:22:16,319 --> 00:22:19,160
Speaker 2: If these people weren't here, then things would be better.

435
00:22:20,240 --> 00:22:22,119
Speaker 1: Richard. That was your career, wasn't it.

436
00:22:22,920 --> 00:22:26,160
Speaker 2: Yeah, the old bulldog line. But well, the line I

437
00:22:26,279 --> 00:22:28,200
use is like sitting around a table on the Monday

438
00:22:28,200 --> 00:22:30,839
morning as the consultant thinking who do I have to kill?

439
00:22:31,759 --> 00:22:34,279
Just trying to figure it out, Like nobody calls me

440
00:22:34,319 --> 00:22:36,960
for good news, then call me because they need some

441
00:22:37,039 --> 00:22:37,839
bad news to.

442
00:22:37,839 --> 00:22:40,119
Speaker 1: Feel like a bad reality show. I'm not here to

443
00:22:40,119 --> 00:22:46,920
make friends. Yes, inverse bus rule. I like that.

444
00:22:46,920 --> 00:22:49,160
Speaker 2: That is interesting. How many people have to be removed

445
00:22:49,200 --> 00:22:53,240
before progress can be made. Yeah, but I do like

446
00:22:53,759 --> 00:22:56,880
this core idea of before I go messing with your code,

447
00:22:56,920 --> 00:22:58,839
can we get a good look at it? And it's

448
00:22:58,880 --> 00:23:02,880
not reading lines of code, it's these visualizations that show

449
00:23:02,960 --> 00:23:08,680
you low ki of change, you know, low ki of inertia.

450
00:23:08,799 --> 00:23:11,799
Like there's a lot of interesting parts there that you

451
00:23:11,839 --> 00:23:15,440
can you can look at. I presume code Karta has

452
00:23:15,880 --> 00:23:18,640
like a standard set of profiles that it can run

453
00:23:18,720 --> 00:23:18,960
for you.

454
00:23:20,240 --> 00:23:25,000
Speaker 3: Ah, that's a tricky one. So we we built cold

455
00:23:25,039 --> 00:23:29,559
Kata in twenty seventeen, and we made its open source

456
00:23:29,559 --> 00:23:33,400
from the beginning. Why because while we're not the product house,

457
00:23:33,680 --> 00:23:38,240
we wanted to give back to the community. The tool

458
00:23:38,359 --> 00:23:42,279
is not the thing we sell. We simply work in

459
00:23:42,519 --> 00:23:44,720
health checks. And you know everyone is free to use

460
00:23:44,720 --> 00:23:45,039
the tool.

461
00:23:45,519 --> 00:23:48,279
Speaker 2: Yeah, because in the end, the tool is not is

462
00:23:48,319 --> 00:23:50,799
not the skill set doing something about what the tool

463
00:23:50,880 --> 00:23:52,359
tells you is the skill set.

464
00:23:52,480 --> 00:23:52,759
Speaker 1: Yeah.

465
00:23:52,799 --> 00:23:58,640
Speaker 3: And we split the tool into two parts. There's a

466
00:23:58,759 --> 00:24:03,200
there's a shell or analysis part. And this analysis part

467
00:24:03,559 --> 00:24:08,160
creates from different sources a file which we call the

468
00:24:08,200 --> 00:24:11,960
c C Jason, the Code Karta Jason, and it has

469
00:24:12,000 --> 00:24:16,440
a very specific file. It's it's it's a it's just

470
00:24:17,039 --> 00:24:22,440
file name and then these are the metrics. And we

471
00:24:22,440 --> 00:24:25,640
we have multiple importers for for different sources. So we

472
00:24:25,680 --> 00:24:30,079
have sonar in there, we just have CSV in there,

473
00:24:31,079 --> 00:24:33,839
we just have GET in there, we have SVN in there,

474
00:24:33,839 --> 00:24:36,519
and you know, we can extract metrics from different sources.

475
00:24:36,640 --> 00:24:36,759
Speaker 1: Right.

476
00:24:36,960 --> 00:24:40,519
Speaker 3: And the idea was everyone can create their own parser

477
00:24:40,680 --> 00:24:45,440
for anything they want, and if they don't want to

478
00:24:45,559 --> 00:24:48,519
directly pipe it into the c C Jason, they can

479
00:24:48,720 --> 00:24:51,480
just create a CSV and we have a CCV importer

480
00:24:51,599 --> 00:24:57,359
for that. Now that is awesome from a flexibility standpoint

481
00:24:57,680 --> 00:25:00,440
because you can visualize much more than CO. You can

482
00:25:00,519 --> 00:25:05,400
be like, how let's visualize the population of America mm hmm,

483
00:25:05,880 --> 00:25:10,000
every every file in quotations as a person, and this

484
00:25:10,079 --> 00:25:13,920
person has different metrics, and you can visualize the whole

485
00:25:13,960 --> 00:25:17,079
of us A with code kater and you know it

486
00:25:17,119 --> 00:25:19,680
says code kanter, but you can't just you know, it's

487
00:25:19,759 --> 00:25:24,480
just metrics in the end. So that's super that's flexible.

488
00:25:24,559 --> 00:25:27,240
It's awesome, and you can also use it for for

489
00:25:27,240 --> 00:25:32,680
for example, performance testing, you can you can map your

490
00:25:32,680 --> 00:25:35,119
performance test. You can be like each test becomes a

491
00:25:35,160 --> 00:25:38,359
file and the execution time is this long and so on,

492
00:25:38,599 --> 00:25:41,799
and then you can even maybe compare different execution execution

493
00:25:41,880 --> 00:25:45,079
times between the same tests and everything, because we have

494
00:25:45,119 --> 00:25:50,440
a delta mode in there. And this is the amazing part.

495
00:25:52,000 --> 00:25:57,400
The problem is that means it's generic, and that means

496
00:25:57,920 --> 00:26:04,000
when you say execution profiles and everything, theoretically anything could

497
00:26:04,000 --> 00:26:06,559
be in there. It doesn't have to be code metrics.

498
00:26:08,000 --> 00:26:12,920
So we do have some profiles for the metrics that

499
00:26:13,000 --> 00:26:16,720
we create. Because we know we don't call it lines

500
00:26:16,759 --> 00:26:20,160
of code. We call it real lines of code because

501
00:26:20,200 --> 00:26:22,160
we don't count the comments and we don't count the

502
00:26:22,160 --> 00:26:27,079
empty lines. We just count well the code the compiler understands,

503
00:26:28,279 --> 00:26:32,680
and that one part of the default profile. Our tool

504
00:26:33,119 --> 00:26:36,200
just calls it cyclomatic complexity. You might decide to call

505
00:26:36,240 --> 00:26:40,400
it something else, right, and then you know the tool

506
00:26:40,400 --> 00:26:42,279
wouldn't be able to know that's the same.

507
00:26:42,079 --> 00:26:44,279
Speaker 2: Thing, and it doesn't really matter, right, It.

508
00:26:44,200 --> 00:26:49,359
Speaker 3: Doesn't really matter. It just matters for things like default profiles.

509
00:26:50,720 --> 00:26:55,720
Because in the cord cutter you have each each property

510
00:26:55,720 --> 00:26:57,880
of the building, you can just select whatever metric you

511
00:26:57,880 --> 00:27:00,640
want for that. If you want, you can on size,

512
00:27:00,680 --> 00:27:05,160
you can put the code coverage, the line coverage. If

513
00:27:05,200 --> 00:27:06,880
you want to you can on the height, you can

514
00:27:06,920 --> 00:27:12,680
put something completely different, you can put I don't know comments, right, sure,

515
00:27:12,759 --> 00:27:16,400
and that's the power of the tools, but that's also

516
00:27:16,440 --> 00:27:19,319
the dropping. Yeah, yeah, I'm explaining how generics make it

517
00:27:19,400 --> 00:27:20,720
trouble some I'm sorry.

518
00:27:21,640 --> 00:27:24,599
Speaker 1: Right, because if everybody can assign different properties to different

519
00:27:25,240 --> 00:27:27,240
aspects and you don't have any kind of standards, then

520
00:27:27,240 --> 00:27:28,519
you really don't know what you're looking at.

521
00:27:28,599 --> 00:27:28,640
Speaker 3: No.

522
00:27:28,839 --> 00:27:31,640
Speaker 2: I mean, a given team needs to agree on a

523
00:27:31,640 --> 00:27:34,440
set of configurations and then stick to them, but at

524
00:27:34,519 --> 00:27:39,200
least have some flexibility from team team. I'm thinking about

525
00:27:39,720 --> 00:27:41,759
a show we did about a month or so ago

526
00:27:41,799 --> 00:27:45,839
with lad Kunenoff where we're talking about balance coupling, and

527
00:27:45,880 --> 00:27:47,759
he really got to the point where it's like, there's

528
00:27:47,759 --> 00:27:49,839
a point where you can recognize there's enough coupling here

529
00:27:49,880 --> 00:27:52,480
that maybe we should actually split this team up like

530
00:27:52,519 --> 00:27:55,200
that they pull their files part so forth, and this

531
00:27:55,240 --> 00:27:58,119
looks like a visualization where you could actually so, hey,

532
00:27:58,400 --> 00:28:01,680
there's too many people working on on this, and they're

533
00:28:01,680 --> 00:28:03,599
not necessarily working on the same area. So if we

534
00:28:03,720 --> 00:28:06,599
split this class and then you know, have an interface

535
00:28:06,640 --> 00:28:10,359
between them that's a fairly narrow one. Now, the complexity

536
00:28:10,400 --> 00:28:13,200
goes down and the resonance goes down. So you know,

537
00:28:13,359 --> 00:28:15,640
you made more files, but you may have made your

538
00:28:15,640 --> 00:28:18,400
life better. And this actually might be able way to

539
00:28:18,519 --> 00:28:21,559
visualize the difference. It's like, now we do a sprint

540
00:28:21,559 --> 00:28:23,240
where we pull it apart and work through these things

541
00:28:23,319 --> 00:28:26,039
and so forth. Now what does the visualization look like?

542
00:28:26,039 --> 00:28:28,640
Like have we improved this is the tension down there

543
00:28:29,039 --> 00:28:32,400
and then over time actually gets better. Like that's one

544
00:28:32,400 --> 00:28:34,799
of the ways you would have unstuck the inertia. Going

545
00:28:34,839 --> 00:28:37,559
back to you know, the original question here, which is

546
00:28:37,559 --> 00:28:40,279
why can't I get a new feature out? It's like, hey,

547
00:28:40,319 --> 00:28:42,640
if we build this other thing to pull this apart,

548
00:28:43,039 --> 00:28:45,960
that frees us to move faster on this feature. In

549
00:28:46,000 --> 00:28:47,839
some ways, it's like you've kicked some people off the

550
00:28:47,880 --> 00:28:49,440
boat here, but you didn't really kick them out of

551
00:28:49,480 --> 00:28:51,720
the company. They just took their piece of code and

552
00:28:52,440 --> 00:28:55,759
isolated it so they can they can resonate separately from

553
00:28:55,759 --> 00:28:56,720
the rest of the group.

554
00:28:56,799 --> 00:28:58,160
Speaker 1: And that, guys, I'm going to ask you to hold

555
00:28:58,200 --> 00:29:00,839
it right there while we pause for these very important messages.

556
00:29:00,880 --> 00:29:04,839
We'll be right back. Did you know you can run

557
00:29:04,880 --> 00:29:08,400
dot net nine on aws take advantage of dot net

558
00:29:08,440 --> 00:29:13,000
nine's performance enhancements, dot net Aspire for Cloud native development,

559
00:29:13,279 --> 00:29:16,880
and improvements to ASP, dot net and Blazer. Visit the

560
00:29:16,920 --> 00:29:21,000
dot net nine on AWS support guide at aws dot

561
00:29:21,039 --> 00:29:27,839
Amazon dot com, slash dot net. And we're back. It's

562
00:29:27,839 --> 00:29:30,680
dot NetRocks. I'm Carl Franklin. That's my friend Richard Campbell. Hey,

563
00:29:30,920 --> 00:29:34,160
and this is our friend Richard Gross. We're talking about

564
00:29:34,920 --> 00:29:38,440
metrics and software getting better metrics. I wanted to give you,

565
00:29:38,559 --> 00:29:42,440
Richard Gross, a chance to respond to Richard Campbell his

566
00:29:42,559 --> 00:29:47,680
comment that he just made. If any I believe he'd

567
00:29:47,960 --> 00:29:51,759
you agreed with, Yeah, all right, yeah, let me let

568
00:29:51,799 --> 00:29:52,720
me elaborate bit on this.

569
00:29:53,039 --> 00:29:56,519
Speaker 3: So the whole thing is exactly like you said, Richard.

570
00:29:56,599 --> 00:30:03,960
It's you know, creating some disparency. Code is as immaterial.

571
00:30:04,880 --> 00:30:06,599
You cannot touch it, you cannot see it, you cannot

572
00:30:06,599 --> 00:30:11,480
feel it. We need tools to really understand it because

573
00:30:11,480 --> 00:30:13,720
no one can keep that much complexity in their own head.

574
00:30:15,960 --> 00:30:19,799
And one way it helps is definitely you can you

575
00:30:19,799 --> 00:30:22,680
can see, Okay, this file has too many authors or

576
00:30:22,720 --> 00:30:24,759
two little authors or whatever. We should split it apart

577
00:30:24,799 --> 00:30:27,119
for you know, you have the metrics to prove Okay,

578
00:30:27,119 --> 00:30:29,720
we should definitely split it apart it's a hot spot

579
00:30:29,799 --> 00:30:31,759
and the next it's a hot spot.

580
00:30:31,839 --> 00:30:33,920
Speaker 2: Yeah, lots of changes, lots of people.

581
00:30:34,839 --> 00:30:39,920
Speaker 3: Yeah. And the cool part now is you can create

582
00:30:40,000 --> 00:30:43,400
these before and after maps, so you can be like, Okay,

583
00:30:43,519 --> 00:30:45,759
we're going to do a snapshot now, and we're going

584
00:30:45,799 --> 00:30:48,759
to a snapshot in I don't know, two months or something,

585
00:30:50,400 --> 00:30:52,599
and then you have a delta mode in there. You

586
00:30:52,680 --> 00:30:55,160
just load two files and you say, okay, correct me.

587
00:30:55,240 --> 00:30:58,039
The delta between that and that will show you the

588
00:30:58,160 --> 00:31:02,880
change in either green or red meaning and then that

589
00:31:02,920 --> 00:31:04,640
one is also configurable, so it can be like.

590
00:31:04,640 --> 00:31:06,720
Speaker 2: Okay, there's a yellow in there too, right.

591
00:31:08,640 --> 00:31:09,799
Speaker 3: You mean it say it's the same.

592
00:31:10,279 --> 00:31:13,400
Speaker 2: Well, I would also think, like, you know, this was

593
00:31:13,519 --> 00:31:16,720
this hotspot was red. Now we've done this pull apart,

594
00:31:16,839 --> 00:31:19,799
like I'm hoping for two yellows at that point. Be nice.

595
00:31:19,799 --> 00:31:21,839
It was like a yellow and a green like that.

596
00:31:22,119 --> 00:31:23,960
I know, I've like at least turned the heat down

597
00:31:23,960 --> 00:31:24,640
in that location.

598
00:31:25,240 --> 00:31:28,319
Speaker 3: Ah, that's not what it does. It does. It looks

599
00:31:28,319 --> 00:31:33,160
at the metric. So if youremetric before was cyclomatic complexity

600
00:31:34,000 --> 00:31:38,759
and it says something like one hundred the yeah, one

601
00:31:38,799 --> 00:31:41,960
hundred cyclomatic complexity. I don't think it has a unit.

602
00:31:42,440 --> 00:31:46,000
I think it's just one hundred. If it has one

603
00:31:46,079 --> 00:31:48,720
hundred before and now in the second file it has fifty,

604
00:31:49,319 --> 00:31:52,319
it means you have a delta fifty, right, and it's

605
00:31:52,359 --> 00:31:59,160
going to color the delta fifteen in whatever color you want,

606
00:31:59,640 --> 00:32:04,400
usually red or green. For cyclomatic complexity, it makes sense

607
00:32:04,400 --> 00:32:07,079
to color it green because it's usually a positive thing

608
00:32:07,559 --> 00:32:11,880
if you reduce complexity. However, if on the height you

609
00:32:11,960 --> 00:32:17,799
put code coverage, you want to color it. You want

610
00:32:17,799 --> 00:32:21,599
to color it red if the coverage decreases, right, Yeah,

611
00:32:22,319 --> 00:32:24,839
well no, it decreases specifically in the in the delta.

612
00:32:25,240 --> 00:32:25,480
Speaker 2: Yeah.

613
00:32:26,079 --> 00:32:28,400
Speaker 3: So again this one is again configurable. You can say, like,

614
00:32:29,039 --> 00:32:31,640
so you need to be careful what you want to visualize.

615
00:32:31,720 --> 00:32:35,319
Speaker 2: Yeah. I think the unit for cyclomatic complexity is paths, right,

616
00:32:35,480 --> 00:32:38,960
because it's the number of it's it's an expression of

617
00:32:38,960 --> 00:32:41,400
the number of unique executing paths through the code, and

618
00:32:41,440 --> 00:32:43,000
the higher number, the more complex in it.

619
00:32:43,599 --> 00:32:45,799
Speaker 1: Yeah. Yeah, so makes sense.

620
00:32:45,960 --> 00:32:47,880
Speaker 2: Yeah. Now, of course, what I was describing is this

621
00:32:47,920 --> 00:32:50,920
is probably a class that's been built that has different

622
00:32:50,960 --> 00:32:53,519
areas of function, but they're colliding with each other and

623
00:32:53,519 --> 00:32:57,440
they should probably be cut apart. But it is interesting

624
00:32:57,480 --> 00:33:02,440
to think with their cycloamatic comy decrease when we pull that. Yes,

625
00:33:02,480 --> 00:33:04,200
because you're taking a certain number of the paths and

626
00:33:04,240 --> 00:33:07,920
putting them in a different class, so that the numbers down,

627
00:33:07,960 --> 00:33:10,960
But the total number of paths probably isn't going to

628
00:33:10,960 --> 00:33:13,960
go down between the two classes. The original class will

629
00:33:14,000 --> 00:33:16,480
be a high number. Now we have two classes that

630
00:33:16,519 --> 00:33:20,480
actually have a total number that's larger, but not much larger,

631
00:33:20,599 --> 00:33:23,000
but overall lower per class.

632
00:33:24,599 --> 00:33:26,680
Speaker 3: Might Yeah that makes sense.

633
00:33:27,119 --> 00:33:29,480
Speaker 2: I mean, so you know, the original class had a

634
00:33:29,480 --> 00:33:33,880
psychomatic complexity path of like two hundred. I pull it apart.

635
00:33:33,960 --> 00:33:35,759
Now one of them is one hundred and twenty five

636
00:33:36,240 --> 00:33:39,720
and one of them is eighty. So the total number

637
00:33:39,759 --> 00:33:42,519
is slightly larger, but because each of the numbers are lower,

638
00:33:42,599 --> 00:33:44,480
it's easier to work on that code.

639
00:33:44,480 --> 00:33:49,039
Speaker 3: Now. Yeah, I mean, in theory, you're completely right, it

640
00:33:49,079 --> 00:33:54,759
shouldn't change. Then amount of paths shouldn't change. No, the

641
00:33:55,400 --> 00:33:56,720
in some cases it.

642
00:33:56,640 --> 00:33:59,759
Speaker 2: Does, however, Well, because there's a concept here of intended

643
00:33:59,759 --> 00:34:02,480
path an unintended path. This is why we create air

644
00:34:02,519 --> 00:34:04,799
messages like you should never get here.

645
00:34:05,279 --> 00:34:13,840
Speaker 3: Yeah, yeah, I mean even further, you have what's it

646
00:34:13,880 --> 00:34:17,119
called accidental and incidental complexity.

647
00:34:16,679 --> 00:34:20,079
Speaker 2: Exactly, and so the number ship could go down because

648
00:34:20,079 --> 00:34:22,280
you're limiting paths that should never have occurred in the

649
00:34:22,280 --> 00:34:22,920
first place.

650
00:34:23,519 --> 00:34:28,639
Speaker 3: And even for incidental complexity, you can decrease the path

651
00:34:30,119 --> 00:34:33,880
by using by by replacing an if statement with the

652
00:34:34,039 --> 00:34:38,559
polymorphic dispatch. Right, So instead of instead of on having

653
00:34:38,719 --> 00:34:42,599
if to if, that that you just call the method

654
00:34:42,800 --> 00:34:47,519
on whatever class implements the interface. And honestly, I haven't

655
00:34:48,679 --> 00:34:51,159
I should probably look this up, but in my head,

656
00:34:51,360 --> 00:34:52,960
that would decrease the path.

657
00:34:53,800 --> 00:34:57,519
Speaker 2: Yeah, you're going from two or more possible paths to one.

658
00:34:57,719 --> 00:34:59,800
Speaker 1: But you aren't you just sort of moving the if

659
00:34:59,800 --> 00:35:02,199
state into that implementation.

660
00:35:02,000 --> 00:35:07,360
Speaker 3: Yes, and no, you're you're moving the if if statements

661
00:35:07,480 --> 00:35:11,599
to the initialization of the class that implements the interface.

662
00:35:13,400 --> 00:35:16,719
So let's say you have two if statements and different

663
00:35:16,719 --> 00:35:20,199
points and they all both your place, both with the

664
00:35:20,280 --> 00:35:24,719
same interface. Then you would decrease your complexity by one

665
00:35:24,960 --> 00:35:28,079
because before your two if statements and afterwards you have

666
00:35:28,280 --> 00:35:30,559
just the if statements in the place where you create

667
00:35:30,599 --> 00:35:33,320
the class. And you know, one place has to decide

668
00:35:33,360 --> 00:35:34,800
do I go left or do I go right?

669
00:35:35,000 --> 00:35:37,559
Speaker 2: Right? Okay, all right, now I'm having way too much

670
00:35:37,559 --> 00:35:40,559
fun with this because and it's all abstract conversation, like

671
00:35:40,599 --> 00:35:44,079
you'd want to look at some code on this yes, right,

672
00:35:44,119 --> 00:35:47,280
because the and the answer is it depends. But I

673
00:35:47,320 --> 00:35:52,039
do like the you know, I come from performance testing background,

674
00:35:52,039 --> 00:35:56,239
where it's like you test, you make changes, you test again,

675
00:35:57,280 --> 00:36:01,440
is it improved? If not, you reverse ur right, like

676
00:36:01,480 --> 00:36:04,760
you back that code out, So it's like you've now

677
00:36:05,000 --> 00:36:08,840
used code card as to say, here's this point of friction.

678
00:36:09,599 --> 00:36:12,920
I hypothesize that if we pull this apart like this

679
00:36:13,039 --> 00:36:15,320
is one possible solution to this problem is that we

680
00:36:15,360 --> 00:36:18,079
split this class. We argue about ways to do it,

681
00:36:18,079 --> 00:36:20,480
we take a spike to do it, and then we

682
00:36:21,079 --> 00:36:24,480
run the We run the code, we we do evaluate,

683
00:36:24,719 --> 00:36:27,719
make sure it's still functional, then run the run the

684
00:36:27,760 --> 00:36:31,000
tests again. Is it less complicated? And then the longer

685
00:36:31,079 --> 00:36:33,960
term thing, given it is less complicated, are we able

686
00:36:34,000 --> 00:36:34,599
to move faster?

687
00:36:34,719 --> 00:36:34,880
Speaker 3: Now?

688
00:36:35,039 --> 00:36:38,119
Speaker 2: Yes? Right, which was to ask at the very beginning,

689
00:36:38,559 --> 00:36:40,239
can we get these features out faster?

690
00:36:40,519 --> 00:36:40,760
Speaker 1: Yeah?

691
00:36:40,800 --> 00:36:43,000
Speaker 3: And I can. I can promise you if you do this,

692
00:36:43,199 --> 00:36:45,599
if you if you reduce the complexity, if you make

693
00:36:46,039 --> 00:36:49,639
smaller fis I make smaller functions, you would get tested.

694
00:36:49,360 --> 00:36:55,920
Speaker 2: And fewer people but not but more than one.

695
00:36:54,440 --> 00:36:57,599
Speaker 3: I don't know. They are develops that are very very fast,

696
00:36:59,480 --> 00:37:02,480
and some of them are a bit of a team hazard.

697
00:37:03,119 --> 00:37:05,960
They are called they are more of a technical tornado.

698
00:37:06,400 --> 00:37:07,960
Speaker 2: Ye I like that too.

699
00:37:08,199 --> 00:37:12,440
Speaker 3: Yeah, you deploy them and like a tornado, they run

700
00:37:12,480 --> 00:37:15,440
through it and after what it's finished, just don't go

701
00:37:15,559 --> 00:37:16,239
back there again.

702
00:37:16,760 --> 00:37:19,920
Speaker 2: Well, because there's a whole separate subtext here that I

703
00:37:19,960 --> 00:37:23,039
would use code Cardiphora as a PM, which is what

704
00:37:23,079 --> 00:37:25,840
are my risky code here, which is only one person

705
00:37:25,920 --> 00:37:28,440
knows about it. So it's like where I want to

706
00:37:28,440 --> 00:37:31,519
do code reviews and where I want is to get

707
00:37:31,719 --> 00:37:33,639
coverage on some of this code so that other people

708
00:37:33,679 --> 00:37:36,320
are aware of it. But that is not the problem

709
00:37:36,400 --> 00:37:39,280
that was presented as at the beginning, right of the

710
00:37:39,320 --> 00:37:41,679
presenters at the beginning is I can't get new features out.

711
00:37:42,000 --> 00:37:46,440
Speaker 3: Yeah, yeah, I mean the reason you might not get

712
00:37:46,440 --> 00:37:48,920
many features out is because it's all tied to one person.

713
00:37:49,280 --> 00:37:52,840
So it could be related, but it could be a

714
00:37:52,840 --> 00:37:54,920
completely different and separate business risk.

715
00:37:55,039 --> 00:37:58,679
Speaker 2: You're right, And again the code now manifestation of the

716
00:37:59,559 --> 00:38:04,159
organized that this person touches so many things. They are

717
00:38:04,199 --> 00:38:06,519
a gatekeeper to all change Yeah.

718
00:38:06,360 --> 00:38:09,719
Speaker 1: I've been sitting here thinking of ways in which, you know,

719
00:38:10,039 --> 00:38:12,639
problems can arise when when you use this tool, and

720
00:38:12,679 --> 00:38:14,480
what you can do to minimize them. And one of

721
00:38:14,519 --> 00:38:16,920
the things that hits me is, all right, let's say

722
00:38:17,039 --> 00:38:21,199
run code Karta on your your solutions and your projects

723
00:38:21,199 --> 00:38:23,000
and all that stuff, and you come up with what

724
00:38:23,119 --> 00:38:25,920
looks like a city map. Now, have you ever seen

725
00:38:25,920 --> 00:38:28,880
a situation where the aerial view looks like all of

726
00:38:28,960 --> 00:38:35,760
Los Angeles versus a little rural you know, intersection and

727
00:38:35,800 --> 00:38:39,400
a country pub and a couple other buildings, Right, I mean,

728
00:38:41,239 --> 00:38:43,679
what do you do when it's just so big that

729
00:38:43,719 --> 00:38:47,519
the visualization becomes meaningless? Can you like zoom in on

730
00:38:47,599 --> 00:38:50,639
a particular part of it or group them group the

731
00:38:50,639 --> 00:38:52,880
buildings together in some way so that you I mean,

732
00:38:53,599 --> 00:38:56,119
where do you start when it's Los Angeles?

733
00:38:57,559 --> 00:38:59,760
Speaker 3: So I would say it doesn't look like like Los

734
00:38:59,760 --> 00:39:08,519
angel It looks more like the city from Judge Dread. Yeah,

735
00:39:08,719 --> 00:39:11,960
I sorry, I haven't read the comics, but I I've

736
00:39:12,039 --> 00:39:14,400
seen the movie with the color urban.

737
00:39:14,559 --> 00:39:17,119
Speaker 1: So what do you what do you mean? Yeah?

738
00:39:17,159 --> 00:39:20,119
Speaker 3: For those two so in Judge Drat they have this

739
00:39:20,599 --> 00:39:23,039
the city are just called mega city one two three okay,

740
00:39:23,559 --> 00:39:29,000
and they have these huge skyscrapers, but they are not

741
00:39:29,039 --> 00:39:32,840
like a skyscrapers like the complete city block. Yeah, and

742
00:39:33,000 --> 00:39:34,880
what do you mean by that is, yes, you will

743
00:39:34,920 --> 00:39:38,039
find large buildings that but they will usually also have

744
00:39:38,320 --> 00:39:43,079
lots of lines of code and like these huge blocks

745
00:39:43,079 --> 00:39:47,639
in there and not small skyscrapers, but blocks tall as hell,

746
00:39:47,719 --> 00:39:49,079
but blocks.

747
00:39:49,400 --> 00:39:52,119
Speaker 2: Right, But in between there are the smaller ones, right,

748
00:39:52,239 --> 00:39:56,119
Like it's it's a handful of mega structures and then

749
00:39:56,480 --> 00:39:58,320
lots of littler structures. Yeah.

750
00:39:58,360 --> 00:40:00,760
Speaker 1: So is there some city planning that needs to happen

751
00:40:00,800 --> 00:40:03,400
where we put all the big ones together and at

752
00:40:03,400 --> 00:40:06,840
the core of the city and then sort of spiral

753
00:40:06,960 --> 00:40:09,559
out to the smaller and smaller and smaller ones or

754
00:40:09,639 --> 00:40:11,840
is it strictly there next to each other because of

755
00:40:12,159 --> 00:40:14,960
how they're inter how they interact with each other.

756
00:40:15,199 --> 00:40:19,159
Speaker 3: Oh, that's a different topic. Let me just go through

757
00:40:19,159 --> 00:40:22,039
my process because you said, okay, what do you do

758
00:40:22,079 --> 00:40:25,039
when you have all these big buildings? Yeah, yeah, yeah,

759
00:40:25,639 --> 00:40:31,639
I I do a deep dive. I always start with

760
00:40:31,880 --> 00:40:35,519
the map and the high level view and it scales

761
00:40:35,599 --> 00:40:38,639
great to about four or five million lines of code.

762
00:40:39,519 --> 00:40:44,239
That's it's good for that. I haven't tried ten million,

763
00:40:44,320 --> 00:40:48,320
but it should also be able to scale to that now. Anyway,

764
00:40:48,679 --> 00:40:52,079
when I see something large and red, and I usually

765
00:40:52,599 --> 00:40:55,159
look at it from different perspectives, I'm like, okay, this

766
00:40:55,239 --> 00:40:57,800
is large and red. Is it large and red here?

767
00:40:57,840 --> 00:40:59,960
Meaning it's changed all the time, it has high complexity.

768
00:41:00,360 --> 00:41:02,480
I'm looking at it from different view how many code

769
00:41:02,480 --> 00:41:05,039
smells are in there? How many authors? And then I

770
00:41:05,079 --> 00:41:08,559
sort of collect all the buildings that are interesting, and

771
00:41:08,599 --> 00:41:11,000
then I deep dive, meaning I opened the file and

772
00:41:11,239 --> 00:41:14,960
I try to understand, Okay, is it just a false

773
00:41:15,000 --> 00:41:18,840
positive or is it really a true positive? True positive

774
00:41:18,880 --> 00:41:20,800
meaning this case I found something I should be changed.

775
00:41:22,519 --> 00:41:27,639
And at that point I yeah. In the end, experience

776
00:41:27,679 --> 00:41:32,519
takes over things like how many code smells do I

777
00:41:32,559 --> 00:41:33,039
find there?

778
00:41:33,159 --> 00:41:33,920
Speaker 1: How many.

779
00:41:35,239 --> 00:41:39,960
Speaker 3: IOSP violations do I find? And so on and so on?

780
00:41:41,880 --> 00:41:47,559
Sorry iosph got integration operation separation principle. There we go.

781
00:41:48,760 --> 00:41:53,079
The idea of this principle is you have a function

782
00:41:53,199 --> 00:41:58,119
and this function is either integrating functions other functions, or

783
00:41:58,159 --> 00:42:00,360
you have a function that is actually doing an option.

784
00:42:01,239 --> 00:42:03,840
You cannot have both in the same or you cannot

785
00:42:03,880 --> 00:42:08,760
have integration operation in the same place. The benefit is

786
00:42:10,400 --> 00:42:13,400
Usually it leads to much more readable code and much

787
00:42:13,440 --> 00:42:17,320
smaller code because if you cannot in an operation, you

788
00:42:17,360 --> 00:42:20,760
cannot call another function. You always have to return to

789
00:42:20,880 --> 00:42:26,719
the integrating function. And there's even architecture based on this,

790
00:42:27,239 --> 00:42:30,400
but I forgot the name of that where you don't

791
00:42:30,519 --> 00:42:33,119
only apply to functions in a class, you apply.

792
00:42:33,000 --> 00:42:34,840
Speaker 2: To the whole class.

793
00:42:35,079 --> 00:42:41,639
Speaker 3: And from there I usually start the conversation with existing developers.

794
00:42:42,159 --> 00:42:46,119
If they are still there, doesn't have to be the case,

795
00:42:47,039 --> 00:42:52,760
and if not, I first or I found targets that

796
00:42:52,800 --> 00:42:56,400
I should look at, maybe maybe change. But from there

797
00:42:56,440 --> 00:42:59,960
I also need to find out what do you want

798
00:43:00,039 --> 00:43:01,719
to do in the future, you know, what are the

799
00:43:01,760 --> 00:43:06,000
next targets? And maybe that leads to this large red

800
00:43:06,000 --> 00:43:08,639
building that which I did a deep dive into, being like, okay, well,

801
00:43:09,119 --> 00:43:11,559
I don't have to change this now. I have to

802
00:43:11,639 --> 00:43:14,960
change this in six months or so, right, and yeah,

803
00:43:15,360 --> 00:43:19,960
now now it's all NITTI pretty details. Now it becomes

804
00:43:20,599 --> 00:43:23,360
can I do an early return or a guard statement

805
00:43:23,679 --> 00:43:29,239
instead of having deeply nested IF statements. Can I abstract

806
00:43:29,280 --> 00:43:35,280
away some domain model in there? Can I extract some

807
00:43:35,320 --> 00:43:37,679
form of units, some form of ID and make it

808
00:43:37,679 --> 00:43:41,880
a domain model, and that yeah, also hard to talk

809
00:43:41,920 --> 00:43:44,960
about when you don't have code in front of you.

810
00:43:46,840 --> 00:43:50,239
Actually talked a bit about this whole process in my

811
00:43:50,800 --> 00:43:56,280
in my target at build stuff, domain rediscovery patterns or

812
00:43:56,360 --> 00:43:57,039
legacy code.

813
00:43:57,119 --> 00:44:00,280
Speaker 1: So what about the other question of how are buildings

814
00:44:00,320 --> 00:44:03,800
grouped together and separated in the map?

815
00:44:04,199 --> 00:44:07,519
Speaker 3: In the map they are just separated or grouped together

816
00:44:07,559 --> 00:44:09,280
based on package structure.

817
00:44:09,239 --> 00:44:11,480
Speaker 1: So how close together they are?

818
00:44:11,679 --> 00:44:17,199
Speaker 3: Essentially where where developers thought they should fit. And if

819
00:44:17,199 --> 00:44:21,239
you in the name space, you know where if someone

820
00:44:21,239 --> 00:44:22,800
put in the same name space, it's going to be

821
00:44:22,920 --> 00:44:26,079
right next to the other thing. But we always had

822
00:44:26,119 --> 00:44:31,320
this idea of putting sort of this belongness indicator in there,

823
00:44:34,760 --> 00:44:37,559
give it, give it a color on we We didn't

824
00:44:37,559 --> 00:44:42,880
implement this, but the the idea has to was you

825
00:44:42,960 --> 00:44:48,519
go either based on temporal coupling or change coupling, or

826
00:44:48,679 --> 00:44:52,920
which is easier to comprehent you go based on import

827
00:44:52,960 --> 00:44:57,599
statements and and just general dependencies. And then you say, okay,

828
00:44:57,719 --> 00:45:01,039
this file doesn't depend on any of the other files

829
00:45:01,079 --> 00:45:04,039
around it, but it depends on files in a completely

830
00:45:04,039 --> 00:45:06,039
different package. And then you mark that as read.

831
00:45:06,599 --> 00:45:08,880
Speaker 1: So a belongs percentage.

832
00:45:09,599 --> 00:45:12,800
Speaker 3: Yeah, how many classes does it interact with that are

833
00:45:12,800 --> 00:45:19,599
next to each other or one level below or versus?

834
00:45:19,639 --> 00:45:22,599
How many things does it depend on that are outside

835
00:45:22,840 --> 00:45:28,800
of its scope? And we we recently experimented a bit

836
00:45:28,840 --> 00:45:34,639
with this by putting architecture metrics into the map as well.

837
00:45:34,840 --> 00:45:37,320
Speaker 2: Interesting, So what's an architecture metric?

838
00:45:37,559 --> 00:45:42,199
Speaker 3: Have you heard of arc unit dot net? It's a

839
00:45:42,840 --> 00:45:45,719
I think it's not originally as a Java program or

840
00:45:45,760 --> 00:45:49,880
a Java tool. It got ported to dot net. The

841
00:45:49,960 --> 00:45:53,840
idea is just to write your architecture rules as code

842
00:45:54,760 --> 00:45:59,039
and then validate them with unit tests. So what do

843
00:45:59,079 --> 00:46:02,440
you mean by architecture. It provides a fluent DSL. It

844
00:46:02,480 --> 00:46:06,639
can be like anything with the ending service is only

845
00:46:06,679 --> 00:46:11,960
allowed to talk to something ending in repository or anything

846
00:46:12,119 --> 00:46:15,480
in this package, or anything in the domain logic package

847
00:46:15,519 --> 00:46:18,599
is only allowed to talk to other domain logic packages,

848
00:46:18,639 --> 00:46:20,280
but not on infrastructure packages.

849
00:46:20,519 --> 00:46:21,840
Speaker 2: Okay, yeah, and.

850
00:46:21,800 --> 00:46:26,519
Speaker 3: Then you can write rules and problems and lexi code.

851
00:46:26,559 --> 00:46:31,119
You well, you will have lots of violations. So that's

852
00:46:31,199 --> 00:46:35,079
when you go ahead and you freeze all those violations.

853
00:46:35,079 --> 00:46:38,639
Say okay, I will accept those, right, but they don't

854
00:46:38,639 --> 00:46:44,679
want any additional ones. And these frozen violations they usually

855
00:46:44,679 --> 00:46:47,599
come from files, and then you can make the building

856
00:46:47,920 --> 00:46:50,679
larger the more architecture violations it has, and you can

857
00:46:50,679 --> 00:46:53,519
be like, oh, okay, this one has lots of architecture violations.

858
00:46:54,199 --> 00:46:56,280
That is probably a good place to refector as well.

859
00:46:56,559 --> 00:47:00,880
Speaker 2: Right, yeah, interesting, and I include the LinkedIn unit net.

860
00:47:01,039 --> 00:47:01,280
Speaker 1: Yeah.

861
00:47:01,519 --> 00:47:04,320
Speaker 2: So just this idea of thinking about how well have

862
00:47:04,400 --> 00:47:07,159
I implument an architecture here and being able to test

863
00:47:07,199 --> 00:47:10,880
it and again it'll give me eyes on problematic code.

864
00:47:11,400 --> 00:47:12,519
Another way to find it.

865
00:47:12,599 --> 00:47:14,760
Speaker 1: Yeah, it would be fun is if you handed out

866
00:47:15,000 --> 00:47:20,280
violation tickets to those developers who have violations in architecture.

867
00:47:20,719 --> 00:47:24,639
It's like, okay, we're finding you, you know, so many dollars.

868
00:47:25,239 --> 00:47:30,199
Speaker 3: Yeah, that's not quite the positive vibe.

869
00:47:30,440 --> 00:47:31,960
Speaker 1: Oh, come on, you're no fun man.

870
00:47:36,199 --> 00:47:39,719
Speaker 3: I've been in this experience too many times myself. When

871
00:47:39,800 --> 00:47:42,639
you yeah, when you have a code base and in

872
00:47:42,679 --> 00:47:45,920
your head it just looks beautiful and everything and you're like, ah,

873
00:47:46,000 --> 00:47:49,000
this only depends on that, and then for the first

874
00:47:49,000 --> 00:47:53,360
time you put in arc unit right, wait, I'm not

875
00:47:53,400 --> 00:47:55,239
allowed to do that and that and that and that

876
00:47:55,360 --> 00:47:56,880
and ah what did I do?

877
00:47:57,199 --> 00:47:59,760
Speaker 2: Yeah, it's like turn that off. I don't want to

878
00:47:59,760 --> 00:48:02,360
look at that again, it makes me sad. I don't

879
00:48:02,400 --> 00:48:06,280
have the time to comprehend this right now. But again,

880
00:48:06,360 --> 00:48:08,800
it's like we should all be kind to each other.

881
00:48:08,920 --> 00:48:12,159
There's always you know, of course, again, like any of

882
00:48:12,199 --> 00:48:15,559
these tools, just because it puts a focal point on

883
00:48:15,599 --> 00:48:19,400
that doesn't mean it's incorrect, just that it should be scrutinized. Yeah,

884
00:48:19,599 --> 00:48:22,199
so it's like, yeah, we may have violated the principle there,

885
00:48:22,280 --> 00:48:25,239
but we violated for a good reason. Yeah, what was

886
00:48:25,239 --> 00:48:26,920
the line I used a while ago? You know, every

887
00:48:27,199 --> 00:48:29,599
every application has ugliness. It's just a question of do

888
00:48:29,639 --> 00:48:34,679
you know where yours is definitely, Yeah, it's largely unavoidable.

889
00:48:34,719 --> 00:48:36,599
You will have some ugly It's okay.

890
00:48:36,880 --> 00:48:40,280
Speaker 1: This conversation has made me go over in my mind

891
00:48:40,280 --> 00:48:42,320
the architecture of an app that I'm developing for a

892
00:48:42,360 --> 00:48:45,320
customer right now, and I've already figured out, you know,

893
00:48:46,400 --> 00:48:50,639
has actually happened before we started this conversation. But you know,

894
00:48:51,480 --> 00:48:55,320
a refactoring that's going to be painful, which is usually

895
00:48:55,360 --> 00:49:01,840
involving the creation of several interfaces, just saying but.

896
00:49:01,960 --> 00:49:04,519
Speaker 2: You know, any it's one of those things where you

897
00:49:04,559 --> 00:49:07,039
know you should do it. Yeah, like that's going to.

898
00:49:07,119 --> 00:49:10,199
Speaker 1: And you should do it before another feature comes along

899
00:49:10,239 --> 00:49:12,480
where you have to continue along the same path.

900
00:49:13,159 --> 00:49:16,440
Speaker 2: Keep doing now, keep putting duct tape and baling wire

901
00:49:16,519 --> 00:49:18,599
on the thing. It's like I could fix this thing

902
00:49:18,840 --> 00:49:22,400
or I could duct tape. It's some more right, Yeah,

903
00:49:22,639 --> 00:49:23,360
been there? Sure?

904
00:49:23,400 --> 00:49:27,159
Speaker 1: Yeah so Richard Gross, what's next for you? What's in

905
00:49:27,199 --> 00:49:27,840
your inbox?

906
00:49:28,280 --> 00:49:34,960
Speaker 3: In my inbox is Christmas? Yeah? Yeah?

907
00:49:35,079 --> 00:49:37,840
Speaker 2: Yeah? Yeah? It is upon us, isn't it? Without a doubt?

908
00:49:38,800 --> 00:49:41,119
I noticed. I just was looking at the contributor list, like,

909
00:49:41,159 --> 00:49:43,599
lots of people have contributed to code Karda. I mean,

910
00:49:43,639 --> 00:49:47,559
obviously there's a handful of key people, but you've got

911
00:49:47,599 --> 00:49:49,360
a long list. So how do you have so many

912
00:49:49,360 --> 00:49:50,599
people involved in the project.

913
00:49:51,039 --> 00:49:55,920
Speaker 3: Yeah? We that's the interesting part. It's it's one it's

914
00:49:55,960 --> 00:49:59,480
like our most crucial tool for health checks because five

915
00:49:59,480 --> 00:50:03,840
million lines code without tool not at all, and it's

916
00:50:03,840 --> 00:50:05,159
mostly done by working students.

917
00:50:05,440 --> 00:50:07,599
Speaker 2: Oh okay, where do the students come from?

918
00:50:07,719 --> 00:50:13,480
Speaker 3: Yeah? We we are very very fortunate to work together

919
00:50:13,559 --> 00:50:17,760
with with local universities and they they journals and become

920
00:50:17,800 --> 00:50:23,559
working students. And I was I was like, really like

921
00:50:23,840 --> 00:50:26,320
giving their opportunity to work on this because it's it's

922
00:50:26,360 --> 00:50:29,039
open source they can show to anyone else. There's no

923
00:50:29,320 --> 00:50:30,679
NDAs or something in the way.

924
00:50:30,800 --> 00:50:33,639
Speaker 2: Sure. Yeah, it's a good resume piece because it doesn't

925
00:50:33,679 --> 00:50:35,760
have proprietary secrets and stuff in it.

926
00:50:35,880 --> 00:50:41,239
Speaker 3: Yeah and I yeah, basically they can also play around

927
00:50:41,239 --> 00:50:43,239
with it a bit because it's it's it's life, it's

928
00:50:43,239 --> 00:50:48,760
in production. They they can learn a lot about about

929
00:50:48,880 --> 00:50:53,039
what quality and about working on a on a true piece,

930
00:50:53,079 --> 00:50:55,719
and they they mostly do it by themselves.

931
00:50:55,760 --> 00:50:57,480
Speaker 2: Interesting, and you do you have a I mean, how

932
00:50:57,559 --> 00:50:59,719
much supervision do you need to give them? Really? Just

933
00:50:59,760 --> 00:51:03,559
get them sort of into a buildable state, take a

934
00:51:03,559 --> 00:51:05,639
look at the issue list that's sitting there for the

935
00:51:05,719 --> 00:51:08,519
project and take one on kind of thing.

936
00:51:08,719 --> 00:51:14,400
Speaker 3: Well, it depends on the developer. Usually you have you know,

937
00:51:14,480 --> 00:51:17,360
in the beginning, when your junior developer comes on on

938
00:51:17,360 --> 00:51:19,719
your team, you you are more and more specific about

939
00:51:19,760 --> 00:51:22,679
what you what you tell them, and later on you're like, yeah,

940
00:51:23,000 --> 00:51:29,280
go to town with it. Actually, that's that's where our

941
00:51:29,360 --> 00:51:31,159
three D printing feature came from.

942
00:51:31,360 --> 00:51:35,559
Speaker 2: Oh yeah, you can actually three D print a model

943
00:51:35,679 --> 00:51:36,400
of your code?

944
00:51:36,920 --> 00:51:42,079
Speaker 1: Yeah, yeah, this is yeah, why not you can only

945
00:51:42,159 --> 00:51:45,079
visualize three D so much? Yeah on a two D space?

946
00:51:45,199 --> 00:51:49,840
Speaker 3: I I I like to say, code kata. Finally you

947
00:51:49,880 --> 00:51:52,400
can grasp your code.

948
00:51:51,880 --> 00:51:54,639
Speaker 2: Literally physically grab onto it. But I would also imagine

949
00:51:54,679 --> 00:51:59,960
if we had a year long making the code better initiative. Yeah, yeah,

950
00:51:59,960 --> 00:52:01,920
idea that you would print a model at the beginning

951
00:52:01,960 --> 00:52:04,800
of that, a fortam model at the end of it. Yeah,

952
00:52:05,239 --> 00:52:07,880
because every you know, the terrible thing about performance tuning

953
00:52:08,039 --> 00:52:12,199
is when the code performs well, nobody notices. They only

954
00:52:12,239 --> 00:52:14,639
notice when it doesn't, So the moment you fixed it,

955
00:52:15,039 --> 00:52:18,840
they forget about it. At least, this would be tangible.

956
00:52:19,119 --> 00:52:21,039
Remember that ugly red tower we used to have in

957
00:52:21,079 --> 00:52:23,920
the middle of our code, It's not there anymore. Yeah,

958
00:52:24,039 --> 00:52:27,599
very very true. Yeah, I really appreciate that. That's a

959
00:52:27,639 --> 00:52:28,079
great idea.

960
00:52:28,159 --> 00:52:30,960
Speaker 3: It's a it's a really interesting experience because when you

961
00:52:31,000 --> 00:52:33,039
when you print the first model, you will have lots

962
00:52:33,079 --> 00:52:37,440
of tall, large and fat buildings, and then two years

963
00:52:37,480 --> 00:52:40,559
later or something they would be tiny building. I mean

964
00:52:40,599 --> 00:52:42,840
some of them are still large, yeah, but you know

965
00:52:42,880 --> 00:52:45,559
they're much tinier. They have much more, much less lines

966
00:52:45,599 --> 00:52:47,920
of code, and you would really see how how the

967
00:52:47,960 --> 00:52:50,800
same map now suddenly it's much more divided into into

968
00:52:50,840 --> 00:52:51,639
smaller pieces.

969
00:52:52,960 --> 00:52:54,800
Speaker 2: It's really compelling. I like that a lot.

970
00:52:54,920 --> 00:52:59,159
Speaker 1: It's just great stuff. And you know, wow, I love

971
00:52:59,199 --> 00:53:03,000
hearing about tools this and I'm sure our listeners did too.

972
00:53:03,079 --> 00:53:05,719
So thank you very much, Richard Gross for telling us

973
00:53:05,719 --> 00:53:06,159
about it.

974
00:53:06,360 --> 00:53:09,800
Speaker 3: Welcome. Hey, also thank you for having me on board.

975
00:53:10,039 --> 00:53:12,760
Speaker 1: Happy to have you, absolutely Yeah. All right, and we'll

976
00:53:12,800 --> 00:53:26,800
talk to you, dear listener next time on dot net rocks.

977
00:53:37,119 --> 00:53:39,800
Dot net Rocks is brought to you by Franklin's Net

978
00:53:39,920 --> 00:53:43,920
and produced by Pop Studios, a full service audio, video

979
00:53:43,960 --> 00:53:48,039
and post production facility located physically in New London, Connecticut,

980
00:53:48,280 --> 00:53:53,079
and of course in the cloud online at pwop dot com.

981
00:53:53,280 --> 00:53:55,400
Speaker 4: Visit our website at d O t N E t

982
00:53:55,639 --> 00:54:01,239
R O c k S dot com for RSS feeds, downloads, apps, comments,

983
00:54:01,559 --> 00:54:04,079
and access to the full archives going back to show

984
00:54:04,159 --> 00:54:06,159
number one, recorded.

985
00:54:05,679 --> 00:54:08,440
Speaker 1: In September two thousand and two. And make sure you

986
00:54:08,519 --> 00:54:11,639
check out our sponsors. They keep us in business. Now,

987
00:54:11,679 --> 00:54:14,159
go write some code. See you next time.

988
00:54:14,800 --> 00:54:23,840
Speaker 3: You got Jas middle Vans. Then I'm

