1
00:00:00,140 --> 00:00:01,179
Hi. I'm Michael Dyrynda.

2
00:00:01,959 --> 00:00:02,919
And I'm Jake Bennett.

3
00:00:03,519 --> 00:00:07,179
And welcome to episode 178 of the North
Meets South Web Podcast. [rock music]

4
00:00:08,659 --> 00:00:10,560
Nailed it. Good job, dude. How's it going?

5
00:00:11,279 --> 00:00:14,020
Nice. Going well. Going, uh, yeah. Going
well.

6
00:00:14,759 --> 00:00:15,060
-Busy-
-Good

7
00:00:15,060 --> 00:00:20,340
-... but but well. How about you?
-Great. Yeah. No. Same. Same. I [sighs]

8
00:00:20,340 --> 00:00:21,559
I've tried recently.

9
00:00:22,279 --> 00:00:26,099
I I catch myself saying the same answer
that you just gave a lot, which is busy,

10
00:00:26,099 --> 00:00:26,680
-right?
-Mm-hmm.

11
00:00:26,680 --> 00:00:30,739
And and i- it's true. Like, it's not a
lie. I mean, we are. We are busy.

12
00:00:30,739 --> 00:00:33,659
-We're all busy.
-But I realized after a while that I would

13
00:00:33,659 --> 00:00:36,520
ask people the same question, they would
say the same thing. And it's like, you

14
00:00:36,520 --> 00:00:38,700
know what? We're all busy. All of us,
we're all busy.

15
00:00:38,700 --> 00:00:39,360
-Yeah.
-Like, so-

16
00:00:39,360 --> 00:00:40,040
All busy all the time.

17
00:00:40,700 --> 00:00:43,979
Yeah. I tried to stop saying that, but it
doesn't work very well 'cause it's still

18
00:00:43,979 --> 00:00:45,579
typically my answer. "How are things
going?"

19
00:00:45,579 --> 00:00:46,979
-Yeah.
-"Oh, you know, bus- pretty busy. But busy

20
00:00:46,979 --> 00:00:49,200
work, but the good. Things are good.
Things are good." You know, so whatever.

21
00:00:49,200 --> 00:00:50,939
-So-
-I mean, I don't, I don't know how else to

22
00:00:50,939 --> 00:00:53,299
-answer the question because that's-
-I know.

23
00:00:53,299 --> 00:00:54,779
-That's how I am.
-There's so many things going on. It's like

24
00:00:54,779 --> 00:00:56,879
-I have to pick one thing to talk about.
-Mm-hmm.

25
00:00:56,879 --> 00:00:59,660
Uh, it's like I I could talk about a lot
of things, but there's a lot of things

26
00:00:59,660 --> 00:01:00,999
-going on, so I'm busy.
-Yeah.

27
00:01:00,999 --> 00:01:02,439
-There's a lot, you know?
-Yeah.

28
00:01:02,439 --> 00:01:03,140
-We all are.
-Busy.

29
00:01:03,140 --> 00:01:04,059
-We all-
-Busy, busy

30
00:01:04,059 --> 00:01:04,519
... are.

31
00:01:05,259 --> 00:01:09,260
You reach that certain stage in life where
you, you think... Uh, I remember thinking

32
00:01:09,260 --> 00:01:12,299
when our kids were little, like, "Man,
once my kids can feed themselves and tie

33
00:01:12,299 --> 00:01:16,380
their own shoes, then things will probably
slow down." And it's like and then they

34
00:01:16,380 --> 00:01:18,040
get older, and it's like then it's
friends-

35
00:01:18,040 --> 00:01:19,079
-Gets harder
-... and sports.

36
00:01:19,079 --> 00:01:20,359
-Yeah.
-And you're like, "Man, after basketball

37
00:01:20,359 --> 00:01:24,399
season is over, then then things are gonna
slow down a little bit." And it doesn't.

38
00:01:24,399 --> 00:01:27,159
-It just keeps going faster-
-Yeah

39
00:01:27,159 --> 00:01:30,759
-... and faster and faster and faster.
-We're we're just moving into that phase

40
00:01:30,759 --> 00:01:33,540
-now with Eli playing sport and soccer.
-Mm-hmm.

41
00:01:33,540 --> 00:01:34,359
-And now it's-
-Mm-hmm

42
00:01:35,900 --> 00:01:39,279
Liv has decided that she doesn't always
want to... I think more often than not,

43
00:01:39,279 --> 00:01:41,999
she doesn't want to go to the soccer
games, which is fair enough-

44
00:01:41,999 --> 00:01:42,599
-Mm-hmm
-... 'cause it's cold-

45
00:01:42,599 --> 00:01:43,880
-Yes
-... and she's sitting around and she's

46
00:01:43,880 --> 00:01:45,220
-bored. And-
-Sure. Yeah. Yeah

47
00:01:45,220 --> 00:01:47,939
... she's not really interested in it. So
because she's not participating, she

48
00:01:47,939 --> 00:01:52,279
doesn't doesn't really wanna be involved.
And so one week, I'll take Eli to soccer.

49
00:01:52,279 --> 00:01:55,659
-One week, Ria will take him. And so-
-Oh, nice. There you go

50
00:01:55,659 --> 00:01:58,399
... it's back and forth, and then, like,
figuring out who's going where. And and

51
00:01:58,399 --> 00:02:01,659
now that the kids are a little bit more
independent and it's a bit easier to do

52
00:02:01,659 --> 00:02:06,859
things. Like, before, when we'd, like,
bath the kids, we want all hands on deck

53
00:02:06,859 --> 00:02:09,919
'cause someone will be washing one,
someone will be drying the other one,

54
00:02:09,919 --> 00:02:10,819
-getting them ready for bed-
-Yep.

55
00:02:10,819 --> 00:02:12,079
-And all that kind of stuff.
-Yep. [laughs]

56
00:02:12,079 --> 00:02:12,359
Now

57
00:02:12,999 --> 00:02:16,699
now both of them can basically wash
themselves, except when it comes time to

58
00:02:16,699 --> 00:02:20,899
washing their hair. And Eli can dress
himself, so it's like you... Uh, we just

59
00:02:20,899 --> 00:02:23,299
watch them get in and out to make sure
that they don't-

60
00:02:23,299 --> 00:02:24,879
-Get in there
-... slip on the bath.

61
00:02:24,879 --> 00:02:27,379
-Yep. Yep.
-You know, so that makes it easier to,

62
00:02:27,379 --> 00:02:32,019
like, go out during the week so that, you
know, Mum can put one of them to bed or I

63
00:02:32,019 --> 00:02:33,779
-can put one of them to bed, feed them-
-Yeah

64
00:02:33,779 --> 00:02:38,659
... all that kind of stuff. And and it's
not like this overwhelming chore of of

65
00:02:38,659 --> 00:02:41,799
having to do all of that stuff because
they're quite independent

66
00:02:42,419 --> 00:02:46,879
already. Um, and so that that makes life a
lot easier, so that we don't have to have

67
00:02:46,879 --> 00:02:50,919
two people here all the time. It makes it
easier for for Rhea to go to the gym or

68
00:02:50,919 --> 00:02:53,739
for me to go out and and grab a bite or
something like that, so-

69
00:02:53,739 --> 00:02:55,299
-Yeah. Yeah. Very true.
-It's just a-

70
00:02:55,299 --> 00:02:57,059
-That is true.
-But it's a different kind of busy, as you

71
00:02:57,059 --> 00:02:57,439
-say.
-It is different.

72
00:02:57,439 --> 00:02:58,239
-You know?
-Yeah. That's right.

73
00:02:58,239 --> 00:02:58,799
-It's just phases-
-Yep

74
00:02:58,799 --> 00:03:01,179
... of busy. And then, you know, once they
get to-

75
00:03:01,179 --> 00:03:03,299
-Exactly
-... the age of your kids, at at the other

76
00:03:03,299 --> 00:03:07,579
end, it's, like, more professional sport
kind of commitments. Not not professional,

77
00:03:07,579 --> 00:03:09,639
-but, like, higher level of of sport-
-Yeah

78
00:03:09,639 --> 00:03:10,479
... commitments, where

79
00:03:11,139 --> 00:03:14,659
it's training multiple times a week. It's
playing multiple times a week. It's all of

80
00:03:14,659 --> 00:03:16,299
-this kind of moving around-
-Right. Right

81
00:03:16,299 --> 00:03:18,699
-... where we now-
-They're trying to get better. Like, when

82
00:03:18,699 --> 00:03:21,119
they're younger, it's like they're just
trying to play. They just, they're happy

83
00:03:21,119 --> 00:03:22,039
-to just play.
-Yeah. Mm-hmm.

84
00:03:22,039 --> 00:03:26,239
And, like, at this level, they have to
kinda decide if they wanna be... If this

85
00:03:26,239 --> 00:03:27,859
-is what they wanna do, if they don't.
-Yeah.

86
00:03:27,859 --> 00:03:30,499
And if they do, it's like they've gotta
commit to practicing outside of the

87
00:03:30,499 --> 00:03:32,579
-practices and games and stuff.
-Yeah. That's right. Yeah.

88
00:03:32,579 --> 00:03:35,019
And so it's like if you actually wanna get
playing time and be good, you gotta do

89
00:03:35,019 --> 00:03:35,779
stuff outside.

90
00:03:36,519 --> 00:03:38,459
-Mm-hmm.
-So coordinating those times as well and

91
00:03:38,459 --> 00:03:39,819
-whatever. So...
-Yeah.

92
00:03:39,819 --> 00:03:43,179
It's all lots of fun, man. It is all lots
of fun.

93
00:03:43,179 --> 00:03:44,759
-It's good though.
-But those, for like, for Graham right now,

94
00:03:44,759 --> 00:03:47,179
he's 14, so it feels like the clock is
starting.

95
00:03:47,179 --> 00:03:48,779
-Mm-hmm.
-The countdown is on. You know what I mean?

96
00:03:48,779 --> 00:03:50,219
-It's kinda-
-The countdown to college because it's very

97
00:03:50,219 --> 00:03:52,239
-different for-
-Give as much time as we can with him

98
00:03:52,239 --> 00:03:53,279
-... for you guys over there. Mm-hmm.
-Yeah.

99
00:03:53,279 --> 00:03:54,919
-'Cause what's-
-Yep.

100
00:03:54,919 --> 00:04:00,579
Over there, very, very common for, you
know, um, kids to to pack up and go off to

101
00:04:00,579 --> 00:04:01,719
-college and not-
-Yep. Yep

102
00:04:01,719 --> 00:04:03,539
-... not stay at home and-
-Totally

103
00:04:03,539 --> 00:04:07,079
... and be away for for months at a time
between breaks and things like that.

104
00:04:07,079 --> 00:04:11,419
Whereas here, they, they, generally,
people will still go to university

105
00:04:12,279 --> 00:04:13,579
where they grew up.

106
00:04:14,319 --> 00:04:16,859
-Mm-hmm.
-And and it's like you'll catch a bus to

107
00:04:16,859 --> 00:04:19,519
the city to, like, go, and then you'll
come back home at the end of the day. So

108
00:04:19,519 --> 00:04:23,619
it's it's very different, you know,
hearing those perspectives. I see Abigail,

109
00:04:24,439 --> 00:04:27,199
you know, tweeting about it, that they're
they're running out of summers with the

110
00:04:27,199 --> 00:04:30,239
kids at home and the kids being around and
all that kind of stuff. And it's just not

111
00:04:30,239 --> 00:04:31,239
something that really

112
00:04:31,979 --> 00:04:33,899
crosses our... my mind because

113
00:04:34,839 --> 00:04:36,219
short of going to the

114
00:04:37,159 --> 00:04:41,339
join the army, you know, like my my nephew
did, you don't really... Like, most

115
00:04:41,339 --> 00:04:44,879
people kind of tend to stay where they are
until they finish study. Not a lot of

116
00:04:44,879 --> 00:04:48,499
people will travel interstate for study.
Um, I think that's fairly uncommon here.

117
00:04:49,759 --> 00:04:51,459
-Interesting. Yeah.
-Yeah.

118
00:04:51,459 --> 00:04:52,519
-Yeah. That is a cultural thing.
-Or is this, like-

119
00:04:52,519 --> 00:04:53,879
-I think-
-... part of the course for you guys?

120
00:04:53,879 --> 00:04:56,019
I think... Very, very common. Yeah.
Exactly.

121
00:04:56,019 --> 00:04:57,479
-Mm-hmm.
-And a lot of kids see it as their first

122
00:04:57,479 --> 00:05:00,179
opportunity to sort of escape their
hometown. You know what I mean? It's like

123
00:05:00,179 --> 00:05:01,119
-they wanna get outta here.
-Mm-hmm.

124
00:05:01,119 --> 00:05:04,519
They wanna go experience the world, live
somewhere different, live apart from their

125
00:05:05,259 --> 00:05:09,159
parents and family. Kinda have their their
leap into adulthood, if you will. So-

126
00:05:09,159 --> 00:05:10,699
-Yeah
-... which comes with the pros and cons,

127
00:05:10,699 --> 00:05:12,859
you know, because they're only 18, so
they're still kids, man.

128
00:05:12,859 --> 00:05:13,459
-Yeah.
-It's like-

129
00:05:13,459 --> 00:05:14,879
-Yeah.
-... you can make really stupid decisions

130
00:05:14,879 --> 00:05:17,619
as 18-year-olds. You can make really
stupid decisions as a 40-year-old too.

131
00:05:17,619 --> 00:05:18,359
-But-
-Yeah

132
00:05:18,359 --> 00:05:22,399
... got a little bit more life experience
behind you. So, anyway, yeah. It's, uh,

133
00:05:22,399 --> 00:05:24,699
it's fun, man. It's, it's been a good
start to the summer, and

134
00:05:25,699 --> 00:05:26,679
things are going good.

135
00:05:27,279 --> 00:05:27,739
Um,

136
00:05:28,459 --> 00:05:35,159
last show, when we were talking, um, we
came up with, like, a bunch of things that

137
00:05:35,159 --> 00:05:40,419
we wanted to talk about, and so I wrote
them down. And we talked about how we

138
00:05:40,419 --> 00:05:45,459
wanted to sort of have a little bit
more... What did you call it? Like, not

139
00:05:45,459 --> 00:05:47,719
-consistency, but, like-
-Continuity.

140
00:05:47,719 --> 00:05:49,039
-Continuity. That's it.
-Yeah.

141
00:05:49,039 --> 00:05:53,639
That's the word. Continuity between the
shows. And so last time, we were talking

142
00:05:53,639 --> 00:05:54,319
about

143
00:05:55,059 --> 00:05:57,999
Wistia, talked about the new Wilber Jobs
website and how-

144
00:05:57,999 --> 00:06:00,379
-Mm-hmm
-... that w- that was pretty cool. Um, I've

145
00:06:00,379 --> 00:06:04,259
got a couple things we could talk about
with that. Staggered CSS animations, live

146
00:06:04,259 --> 00:06:09,399
photos, we could talk about that. Or we
could talk about where to store values for

147
00:06:09,399 --> 00:06:12,999
templates in static sites. That's an
interesting one.

148
00:06:12,999 --> 00:06:16,635
-Mm-hmm.
-Or defensive programming.... or time

149
00:06:16,635 --> 00:06:20,295
bombed feature flags. All right, which one
sounds the most interesting to you?

150
00:06:20,295 --> 00:06:24,575
Hmm. Time bomb feature flags I've played
with in the past, and they've bitten me-

151
00:06:24,575 --> 00:06:26,215
-Yes
-... because they don't, they don't work-

152
00:06:26,215 --> 00:06:28,895
-Ooh
-... quite as, quite the way that I thought

153
00:06:28,895 --> 00:06:29,315
they would.

154
00:06:30,016 --> 00:06:32,915
All right, let's dive in. Let's dive into
time bomb feature flags. Okay.

155
00:06:33,555 --> 00:06:35,135
-Should I set the stage real quick?
-Mm-hmm.

156
00:06:35,135 --> 00:06:38,175
You wanna tell me what Pennant is? Tell
us, tell all the people what Pennant is.

157
00:06:38,795 --> 00:06:43,735
Pennant is a Laravel first party
implementation for f- feature flagging,

158
00:06:44,455 --> 00:06:47,895
uh, in, in your Laravel apps, right? So
Tim McDonald-

159
00:06:47,895 --> 00:06:49,955
-Yeah
-... built, built that one out, hmm, not

160
00:06:49,955 --> 00:06:52,295
last year, the year before, I think. So
it's a couple of, couple of years-

161
00:06:52,295 --> 00:06:54,895
-Yeah
-... it's been around now. And, yeah, it's

162
00:06:54,895 --> 00:06:59,736
a, it's a first, first party, you know,
it, it feels like a Laravel implementation

163
00:06:59,736 --> 00:07:00,655
of feature flags.

164
00:07:01,915 --> 00:07:04,616
Yeah, it's, um, it's a really good,

165
00:07:05,475 --> 00:07:09,636
um, it's a really good library, and it's
very simple. Um, so it's,

166
00:07:10,375 --> 00:07:14,676
you know, it's basically the minimum
amount of code that you would need in

167
00:07:14,676 --> 00:07:17,895
order to be able to run feature flags is
kinda how I think of it. So

168
00:07:18,635 --> 00:07:19,955
it's really, um,

169
00:07:20,755 --> 00:07:26,475
wonderfully simple. Uh, the couple of
things that we, the way that we use it is

170
00:07:26,475 --> 00:07:27,435
you have...

171
00:07:28,035 --> 00:07:29,255
You can either have a closure

172
00:07:30,375 --> 00:07:35,195
that helps to give it a name. You can name
the feature and then have a function that

173
00:07:35,195 --> 00:07:40,455
accepts a scope and then resolves the
truthiness of that feature.

174
00:07:41,075 --> 00:07:41,395
So

175
00:07:42,195 --> 00:07:45,875
you say, let's say, um, the feature is,

176
00:07:47,535 --> 00:07:48,075
I don't know,

177
00:07:49,395 --> 00:07:53,415
Ken Call Michael. It's Ken Call Michael.
The, you know, one of our support people

178
00:07:53,415 --> 00:07:57,335
gets a emergency button on their
dashboard, which if they need help, they

179
00:07:57,335 --> 00:08:01,895
can call Michael. And only certain people
get access to this because, you know,

180
00:08:01,895 --> 00:08:05,555
there's people who have abused this in the
past. And so we wanna start out with only

181
00:08:05,555 --> 00:08:08,895
giving it to managers, because managers
are the ones who, uh, can escalate calls

182
00:08:08,895 --> 00:08:12,795
to Michael. So what we're gonna do is
we're going to thi- name this feature Ken

183
00:08:12,795 --> 00:08:16,615
Call Michael, and, uh, the way that I'm
going to do it is I'm going to implement

184
00:08:16,615 --> 00:08:21,775
it inside of a class called Ken Call
Michael Feature. And, um, inside of that,

185
00:08:21,775 --> 00:08:26,135
I have a resolve function, or sorry,
resolve method, which accepts a scope, and

186
00:08:26,135 --> 00:08:31,455
I think typically that's just a generic,
it's mixed $scope. But you can specify

187
00:08:31,455 --> 00:08:35,955
things like user. So I know that I'm
passing a user into that scope, and it

188
00:08:35,955 --> 00:08:40,055
will fail if I pass anything else. So I'll
pass a user in as that scope, and then I

189
00:08:40,055 --> 00:08:46,715
can say user hasRole manager, something
like that. And I return that, return the

190
00:08:46,715 --> 00:08:50,975
truthiness of that statement. So if that
statement returns as true, when that

191
00:08:50,975 --> 00:08:56,055
person visits the page that, uh, checks
that feature, right, where that feature is

192
00:08:56,055 --> 00:09:01,315
actually on the page, it will grab that
class. It will resolve that feature,

193
00:09:01,315 --> 00:09:06,155
resolve that method, and then it will
return a truthy or falsey, um, value. And

194
00:09:06,155 --> 00:09:09,975
then that will get stored. Depending on
what driver you're using for Pennant,

195
00:09:09,975 --> 00:09:13,615
it'll either get stored in the database,
or it'll get stored, you know, in Redis or

196
00:09:13,615 --> 00:09:15,475
other places, wherever you might have it.

197
00:09:15,475 --> 00:09:16,955
-Mm-hmm.
-And then at that point, it is resolved. It

198
00:09:16,955 --> 00:09:21,375
is not stored. It will not ever resolve
again unless you delete or, or, uh, purge

199
00:09:21,375 --> 00:09:23,395
that feature for that person, which is
great.

200
00:09:24,215 --> 00:09:28,795
So that's the idea, right? I can turn
features on or off. I can also launch it

201
00:09:28,795 --> 00:09:32,835
as, like, nobody gets it. I can just, from
that resolve function, return false. And

202
00:09:32,835 --> 00:09:36,215
then I can go into the database, and I can
say only I get it, right? Or I can

203
00:09:36,215 --> 00:09:40,515
release it to a beta group of users. So I
can test it in production without having

204
00:09:40,515 --> 00:09:45,295
any fear of breakages occurring because
nobody can see it except for me. So if it

205
00:09:45,295 --> 00:09:47,835
breaks, it's only gonna break for me, or
it's gonna break for a very small group of

206
00:09:47,835 --> 00:09:50,255
users. So really, really nice. Now,

207
00:09:50,855 --> 00:09:56,255
after having explained that, Michael, I
want to hear your idea or explanation of

208
00:09:56,255 --> 00:09:57,235
time bombs,

209
00:09:57,875 --> 00:10:01,895
why you might use them, and how you
implemented them and how they bit you.

210
00:10:01,895 --> 00:10:02,175
Mm-hmm.

211
00:10:02,835 --> 00:10:07,315
Yeah. Well, I think it's, it's the, the
fact that they are resolved once and

212
00:10:07,315 --> 00:10:10,135
persisted that has bitten me because-

213
00:10:10,915 --> 00:10:13,075
-Mm-hmm
-... the, the time bomb nature is that I

214
00:10:13,075 --> 00:10:18,495
would expect that a feature flag applies
or doesn't apply depending on how you've

215
00:10:18,495 --> 00:10:23,315
got your code wrapped by that feature flag
at some point in the future.

216
00:10:23,315 --> 00:10:25,355
-Mm-hmm.
-So the way that I wanted to use them,

217
00:10:26,055 --> 00:10:30,715
rightly or wrongly, last year when, when I
looked at it, was to time bomb the

218
00:10:30,715 --> 00:10:33,415
-display of speakers for Laricon AU.
-Hmm.

219
00:10:33,415 --> 00:10:36,775
So, like, on some day in the future, we
want this speaker to appear on the

220
00:10:36,775 --> 00:10:37,735
-website.
-Yeah, yeah.

221
00:10:37,735 --> 00:10:41,135
So I don't have to remember to do it. So I
don't have to be at the computer to, you

222
00:10:41,135 --> 00:10:44,655
know, tick a box or whatever. So I
thought, yes, I will, I will time bomb

223
00:10:44,655 --> 00:10:45,615
that feature flag,

224
00:10:46,455 --> 00:10:49,475
uh, so that that speaker appears at some
point in the future.

225
00:10:50,235 --> 00:10:54,975
Now, the problem with that was, because
that was resolved once, when it resolved

226
00:10:54,975 --> 00:10:56,875
-the first time that it was loaded-
-Mm-hmm.

227
00:10:57,495 --> 00:10:59,495
-It was false
-... it was like... It was false. So it

228
00:10:59,495 --> 00:11:03,675
went into the database, and that was it.
It was just false forever. So I would have

229
00:11:03,675 --> 00:11:10,075
to then go in, [laughs] on that time, on
that day, to then remove that flag, which-

230
00:11:10,075 --> 00:11:10,215
Yeah

231
00:11:10,215 --> 00:11:12,055
-... kind of defeated the purpose of it.
-Defeats the purpose.

232
00:11:12,055 --> 00:11:13,195
-So that's-
-Totally.

233
00:11:13,195 --> 00:11:16,435
That's where, that's where I got bitten by
them. Other than that-

234
00:11:16,435 --> 00:11:17,835
-So-
-... I think they work fantastic.

235
00:11:18,615 --> 00:11:19,875
Okay. So, so

236
00:11:20,495 --> 00:11:26,355
it's probably helpful to talk about
definitions of what a time bomb is. So

237
00:11:26,355 --> 00:11:32,395
what you've explained there is not
necessarily a time bomb. A time bomb, as

238
00:11:32,395 --> 00:11:36,855
Martin Fowler describes it when he's
talking about features and toggling, is a

239
00:11:36,855 --> 00:11:42,435
way for you to make sure that feature
flags don't stick around for forever,

240
00:11:42,435 --> 00:11:43,055
-right?
-Mm-hmm.

241
00:11:43,055 --> 00:11:50,015
So you could think of a time bomb more as
an expiration date than a... Only to show

242
00:11:50,015 --> 00:11:51,735
-it at this time. Now-
-Mm-hmm

243
00:11:51,735 --> 00:11:56,355
... I think it's worth discussing how we
would actually approach your particular

244
00:11:56,355 --> 00:11:58,895
-problem that you're talking about.
-Mm-hmm.

245
00:11:58,895 --> 00:11:59,375
And

246
00:12:00,995 --> 00:12:01,555
maybe,

247
00:12:02,155 --> 00:12:05,275
I don't know. I- I'm actually not sure how
I would solve that with Pennant. I think

248
00:12:05,275 --> 00:12:08,195
I would honestly, in that instance, I
would literally just put a

249
00:12:09,035 --> 00:12:11,075
timestamp check or something [laughs] like
that.

250
00:12:11,075 --> 00:12:13,475
-Yeah. All right.
-I would wrap it with a conditional if that

251
00:12:13,475 --> 00:12:14,255
-says-
-Yeah

252
00:12:14,255 --> 00:12:18,595
... if, if, uh, now is passed and then
pass in the date-

253
00:12:19,255 --> 00:12:20,295
-Mm-hmm. Yeah
-... and then I would... Then that's how I

254
00:12:20,295 --> 00:12:23,303
-would do that probably.
-... yeah, this year. This year, we put all

255
00:12:23,303 --> 00:12:26,903
of the, the speakers into the database,
so now we just have a, like, publish date

256
00:12:26,903 --> 00:12:28,203
-is in the past.
-Ah, so- oh, perfect

257
00:12:28,203 --> 00:12:29,344
-That works fine this time
-... there you go.

258
00:12:29,344 --> 00:12:33,103
Yeah. Which is the sensible way of doing
it, but last year, we kind of... The, it

259
00:12:33,103 --> 00:12:37,763
was all static HTML really, so we, we put
all the spon- uh, the, all the speakers on

260
00:12:37,763 --> 00:12:40,324
-the page that way. And so we're-
-Yeah

261
00:12:40,324 --> 00:12:42,723
... just expecting, like, for each one to
then,

262
00:12:43,423 --> 00:12:47,564
t-to, to appear effectively when, when the
time is in the past, but didn't work out

263
00:12:47,564 --> 00:12:51,243
that way. Uh, but this year, yeah. It's
just a, just a field on the database

264
00:12:51,243 --> 00:12:54,663
that's an announced at or something like
that, and we just return all of the

265
00:12:54,663 --> 00:12:58,463
speakers where announced at is less than
or equal to now, which is much-

266
00:12:58,463 --> 00:13:00,143
-That makes sense
-... easier way of doing it.

267
00:13:00,143 --> 00:13:01,843
-Great way to do that
-Don't use feature flags for that. Yeah,

268
00:13:01,843 --> 00:13:03,803
-no.
-Absolutely. Great way to do that. So,

269
00:13:04,603 --> 00:13:08,143
so if we're approaching this idea of time
bombs as this, as more of, like, an

270
00:13:08,143 --> 00:13:12,143
expiration date, um, I, I would love to
talk about that just for a little bit.

271
00:13:12,143 --> 00:13:14,584
And, and essentially, I'll give you the
scenario that

272
00:13:15,543 --> 00:13:20,343
we faced that had me looking back into
this, which was we had a feature flag that

273
00:13:20,343 --> 00:13:21,523
was,

274
00:13:22,144 --> 00:13:25,863
you know, gate, gating a feature that we
had written

275
00:13:26,543 --> 00:13:28,704
and I pushed it out on a Friday

276
00:13:29,624 --> 00:13:31,324
-and promptly forgot.
-It's time to push down

277
00:13:31,324 --> 00:13:32,963
-About that feature.
-Yeah. Just want to push down

278
00:13:32,963 --> 00:13:36,303
Totally forgot about it. It didn't matter.
It was like, "Okay, hey, whatever." So,

279
00:13:37,223 --> 00:13:39,783
uh, I enabled it for a couple users and

280
00:13:40,383 --> 00:13:42,584
the users of us who had it just

281
00:13:43,203 --> 00:13:46,403
looked at it and figured, "Well, everybody
must have this," right? We totally forgot

282
00:13:46,403 --> 00:13:49,343
-that we did not release it for everyone.
-Yeah.

283
00:13:49,343 --> 00:13:54,563
And so six months later, somebody's like,
"Yeah, I don't know how to see, like, if

284
00:13:54,563 --> 00:13:58,203
this file is timed up or not." Like, well,
just use the, you know, just use the

285
00:13:58,203 --> 00:14:00,983
-timed up, you know, thing at the top.
-Yeah.

286
00:14:00,983 --> 00:14:04,183
They're like, "I've never seen that." And
they're like, "Well, like, certainly.

287
00:14:04,183 --> 00:14:07,443
Like, it's right up here. Here's where you
should see it." Go into the features

288
00:14:07,443 --> 00:14:13,584
table. Yup, not enabled for anybody except
for us. Like, ah, crap. And so what

289
00:14:13,584 --> 00:14:14,404
happened is

290
00:14:15,404 --> 00:14:18,764
we had this feature flag that was not
supposed to be around forever. It was only

291
00:14:18,764 --> 00:14:23,543
supposed to be for this beta testing sort
of idea. And once it was good, then we

292
00:14:23,543 --> 00:14:28,483
needed to remove it. So the question is,
how do you inform yourself when

293
00:14:29,463 --> 00:14:33,923
you should, you know, how do you basically
put an expiration date and say, "Hey, by

294
00:14:33,923 --> 00:14:38,023
the time a month has passed, we should
have figured out if we want this feature

295
00:14:38,023 --> 00:14:39,563
-or not for everybody."
-Mm-hmm.

296
00:14:39,563 --> 00:14:43,583
It should be general release to everybody,
or it shouldn't be.

297
00:14:43,583 --> 00:14:45,123
-Yeah.
-And, you know, we kinda need to pull the

298
00:14:45,123 --> 00:14:46,203
trigger on one way or the other.

299
00:14:46,823 --> 00:14:50,983
So I asked Tim McDonald. I was like, "How
would you do this?" We had a couple ideas

300
00:14:50,983 --> 00:14:55,683
for how we would do it, but the way that
he did it was very, uh, clever. And so I

301
00:14:55,683 --> 00:14:58,703
wanted to share the idea that he had,
which is,

302
00:14:59,383 --> 00:15:04,043
uh, to put on each one of your feature
classes, which again, is the way that I

303
00:15:04,043 --> 00:15:07,583
really prefer to do it, is to use a
class-based resolution because you get all

304
00:15:07,583 --> 00:15:10,883
the other things you can do, this
behavior, these traits that you can put on

305
00:15:10,883 --> 00:15:14,883
it and whatnot. But you make a trait
called is, like, concerned with

306
00:15:14,883 --> 00:15:19,723
expiration, you know, maybe something like
that. And inside of there, um, you have a

307
00:15:19,723 --> 00:15:23,023
contract essen- or sorry, maybe it's a
contract, not a trait. But it's, uh, a

308
00:15:23,023 --> 00:15:24,983
contract that specifies that you need to
have a

309
00:15:25,763 --> 00:15:26,703
is expired

310
00:15:27,403 --> 00:15:29,103
method that returns a Boolean.

311
00:15:29,743 --> 00:15:34,703
And then what you can do is, uh, in that
is expired, you can do a date. You could

312
00:15:34,703 --> 00:15:39,103
say now is past a particular time, or you
can do other things, right? You can,

313
00:15:39,103 --> 00:15:41,243
there's other things you could do. It
doesn't have to just be a date, but you

314
00:15:41,243 --> 00:15:42,623
just return a Boolean from there.

315
00:15:43,323 --> 00:15:44,903
And then what you can do

316
00:15:45,623 --> 00:15:46,003
is

317
00:15:46,883 --> 00:15:52,563
you can, in your service provider, you can
say there's an event that says feature

318
00:15:52,563 --> 00:15:56,263
resolved, I think is what it is. So what
this does is any time that a feature gets

319
00:15:56,263 --> 00:15:59,403
resolved, even if it's out of the
database, if it's grabbing it,

320
00:16:00,263 --> 00:16:01,363
it will look and say,

321
00:16:02,023 --> 00:16:05,043
um, is this an instance of,

322
00:16:05,723 --> 00:16:10,143
you know, or does this extend the contract
or implement the contract of, uh,

323
00:16:10,823 --> 00:16:13,843
you know, can expire or something,
whatever. Like, what, you know, I'm using

324
00:16:13,843 --> 00:16:15,923
bad names here, but that's the idea,
right?

325
00:16:15,923 --> 00:16:18,303
-Sure. Yeah, yeah, yeah.
-And if it is, if it does extend that

326
00:16:18,303 --> 00:16:22,063
contract or implement that contract, then
what you do is you check to see is it

327
00:16:22,063 --> 00:16:23,123
-expired.
-Yeah.

328
00:16:23,123 --> 00:16:27,123
And if it is expired, then you can do a
couple things. So, um,

329
00:16:28,103 --> 00:16:32,583
you know, you could log, warn yourself,
something like that. Um, but the thing

330
00:16:32,583 --> 00:16:35,683
that Tim did, which I thought was really
cool, is there's this way that you can

331
00:16:35,683 --> 00:16:40,483
check to see if you're running tests
currently. Have you ever seen this before?

332
00:16:42,223 --> 00:16:43,963
-So it's like-
-The other container that's, like, is

333
00:16:43,963 --> 00:16:44,523
-running-
-Yeah

334
00:16:44,523 --> 00:16:46,483
... running unit tests or something like
that.

335
00:16:46,483 --> 00:16:52,043
Yeah. If app dot op running unit tests. So
you can do this conditional. You should

336
00:16:52,043 --> 00:16:53,423
say, "If we're running tests

337
00:16:54,143 --> 00:16:55,863
and it's expired,

338
00:16:56,503 --> 00:17:02,543
then we want to throw a runtime exception
that says feature has expired." So what

339
00:17:02,543 --> 00:17:08,143
that does then is if you're ever running a
test that encounters this feature, and

340
00:17:08,143 --> 00:17:12,603
the feature is expired, it's going to
force you to make a decision one way or

341
00:17:12,603 --> 00:17:12,983
-the other.
-Yeah.

342
00:17:12,983 --> 00:17:14,423
-You either need to extend-
-Extend it

343
00:17:14,423 --> 00:17:16,783
... the amount of time that you have until
it expires.

344
00:17:16,783 --> 00:17:19,943
-Or remove it. Mm-hmm.
-Or get rid of it. And I love that because

345
00:17:19,943 --> 00:17:23,003
it does... It's not destructive. It
doesn't ever mess you up in production.

346
00:17:23,623 --> 00:17:26,443
Uh, you can have it log if it's in
production if you want.

347
00:17:26,443 --> 00:17:27,623
-Mm-hmm.
-Instead of throwing that runtime

348
00:17:27,623 --> 00:17:33,203
exception. Um, but it's a great way to
ensure that any of your features that

349
00:17:33,203 --> 00:17:38,123
you're putting in place have a reasonable
expira- uh, expiration timestamp on them

350
00:17:38,123 --> 00:17:41,303
and that you're forced to deal with them
at some point in the future.

351
00:17:41,923 --> 00:17:44,703
-Um, so I thought that was pretty cool.
-I like that.

352
00:17:44,703 --> 00:17:47,763
-Yeah.
-That is a very Tim thing to do. [laughs]

353
00:17:47,763 --> 00:17:47,963
Mm-hmm.

354
00:17:48,583 --> 00:17:49,883
To put a thing in there. I've,

355
00:17:50,543 --> 00:17:52,443
-I've-
-So he wa- so he did... So here's the deal.

356
00:17:52,443 --> 00:17:54,763
He hasn't actually, like, this is not...

357
00:17:55,603 --> 00:17:58,803
This does not exist. You have to just add
it on yourself.

358
00:17:58,803 --> 00:17:59,303
-Yeah.
-Right?

359
00:17:59,303 --> 00:18:01,643
-Yeah, exactly. Yeah.
-That's why I was like, "It would be cool

360
00:18:01,643 --> 00:18:03,543
if it was first party." He's like, "I
mean,

361
00:18:04,283 --> 00:18:06,623
I didn't feel like there was a good..." He
said, "I didn't feel like there was a

362
00:18:06,623 --> 00:18:09,123
good generic option to put on top of it."
So-

363
00:18:09,123 --> 00:18:10,743
-Yeah
-... I built the tools. A lot of the users

364
00:18:10,743 --> 00:18:14,183
to decide how they wanna handle it, but
it's not, it's not difficult to implement

365
00:18:14,183 --> 00:18:14,343
-it.
-Yeah.

366
00:18:14,343 --> 00:18:18,183
-Right? You could see how you would do so.
-Yeah. It demonstrates a lot of restraint

367
00:18:18,183 --> 00:18:22,283
on, on his part and on, I suppose, on
Laravel's part in general about where you

368
00:18:22,283 --> 00:18:27,083
draw the line in the sand for, for what
you do offer as part of the library and

369
00:18:27,083 --> 00:18:31,655
for what you say, "The tools are there. Go
and implement it."And, and I think this

370
00:18:31,655 --> 00:18:32,975
is, this is a fairly good

371
00:18:34,675 --> 00:18:39,695
case, use case of the tools that go and
implement it yourself. I've, I've gone

372
00:18:39,695 --> 00:18:42,915
back and forth over the years about
whether or not

373
00:18:44,356 --> 00:18:49,395
using those kind of conditionals in
application code is a good idea or a bad

374
00:18:49,395 --> 00:18:50,356
-idea, you know?
-Mm-hmm.

375
00:18:50,356 --> 00:18:54,495
Doing an, like an environment check or
doing a, are we running unit tests? Or, or

376
00:18:54,495 --> 00:18:58,455
that kinda stuff to then trigger things
because you're, you're putting

377
00:18:59,715 --> 00:19:03,856
test logic inside of your application code
to do this kind of stuff.

378
00:19:05,175 --> 00:19:05,535
Erm,

379
00:19:06,516 --> 00:19:10,475
I think it's fine, in general. I don't, I
don't really see any reason to do that. I

380
00:19:10,475 --> 00:19:14,376
know that in parallel testing and things
like that, we will have all kinds of

381
00:19:14,376 --> 00:19:17,955
conditionals that check, like, if the
parallel testing token is set, then we

382
00:19:17,955 --> 00:19:21,315
need to go and do this stuff. And then
somewhere else we go, "Okay, don't do this

383
00:19:21,315 --> 00:19:24,435
stuff because we are parallel testing,"
and, and things like that. So

384
00:19:25,235 --> 00:19:27,835
there's definitely cases, I think, where

385
00:19:28,895 --> 00:19:32,635
doing that kind of runtime, testing time
logic is good. I think

386
00:19:34,015 --> 00:19:39,295
forcing you to, you know, blow up your...
[sighs] It depends on how strict you are

387
00:19:39,295 --> 00:19:44,035
on your continuous integration. Like, if
you're running this in CI and it fails

388
00:19:44,035 --> 00:19:46,735
because somewhere between where you pushed
a pull request

389
00:19:47,355 --> 00:19:49,495
-into GitHub and some-
-Mm-hmm.

390
00:19:49,495 --> 00:19:54,315
And, and when the CI ran, your, your test
suite is now failing

391
00:19:55,275 --> 00:19:59,075
because of this expired token or this
expired check,

392
00:19:59,775 --> 00:20:01,575
but it's unrelated to the pull request

393
00:20:02,415 --> 00:20:04,155
that, that was pushed up. So I think

394
00:20:04,895 --> 00:20:05,555
that's, like,

395
00:20:06,415 --> 00:20:09,895
that's the one thing that, that sticks to
me. It's like, okay, yes, we need to do

396
00:20:09,895 --> 00:20:13,495
something about it. It is now impacting on
this unrelated thing,

397
00:20:14,215 --> 00:20:17,515
and it's, you know, a team decision. What
do you do with that? Is someone now tasked

398
00:20:17,515 --> 00:20:21,875
with going immediately and, and updating
that? Do we... You know, it, it may not be

399
00:20:21,875 --> 00:20:25,775
a decision that gets resolved straight
away, depending on the size of the

400
00:20:25,775 --> 00:20:29,175
organization. It, it might be, like, you
as a developer or as a founder, you can go

401
00:20:29,175 --> 00:20:33,415
like, "Yeah, I'll just kick that can down
the road a week," or, "I'll go and remove

402
00:20:33,415 --> 00:20:36,455
all of those feature flags, and this is
now just a feature that's part of the

403
00:20:36,455 --> 00:20:40,775
platform." So yes, it does prompt you to
do that, but sometimes that decision

404
00:20:40,775 --> 00:20:42,775
-involves committees. It involves-
-Yeah

405
00:20:42,775 --> 00:20:45,395
... product teams, product managers,
things like that. You've gotta go ask.

406
00:20:45,395 --> 00:20:47,915
You've gotta go wait. They don't have an
answer. They've gotta go chase it up with

407
00:20:47,915 --> 00:20:50,395
-someone else.
-So now you have a blocked PR, yeah.

408
00:20:50,395 --> 00:20:52,955
And meanwhile you've got a blocked PR and
a failing test suite, and all of that

409
00:20:52,955 --> 00:20:57,155
-kinda stuff. So, you know-
-In fact, every PR is blocked, right? If

410
00:20:57,155 --> 00:20:59,475
you had multiple PRs out there, all of
them are blocked.

411
00:20:59,475 --> 00:21:01,015
-Mm-hmm. Yeah.
-And every single person is trying to

412
00:21:01,015 --> 00:21:03,115
scramble to figure out what do we need to
do with this.

413
00:21:03,115 --> 00:21:06,975
Yeah, yeah. And everyone's going, "Oh,
this is failing. Retry fail tests." Like,

414
00:21:06,975 --> 00:21:09,535
'cause they're like, "Oh, this wasn't
supposed to fail," you know? Es-

415
00:21:09,535 --> 00:21:13,255
especially, like, we get into situations
at work where the, the test suite will

416
00:21:13,255 --> 00:21:13,995
just be flaky.

417
00:21:14,775 --> 00:21:15,135
Erm,

418
00:21:16,055 --> 00:21:20,035
and it's just over time, the, the
construct of, of the application has

419
00:21:20,035 --> 00:21:23,475
changed where, you know, you've got
factories that, that are resolved in a

420
00:21:23,475 --> 00:21:26,635
certain way. Which is okay when you've got
100 tests, but when you've got 500 tests

421
00:21:26,635 --> 00:21:31,155
or 1,000 tests, those factories can, like,
step on each other. You might not have

422
00:21:31,155 --> 00:21:32,735
something that's unique, so

423
00:21:33,715 --> 00:21:33,995
over

424
00:21:34,735 --> 00:21:38,955
enough iterations, you end up with
collisions and things because you don't

425
00:21:38,955 --> 00:21:43,015
have the, like, fake, faker Unique applied
in there. So there's, like, all these

426
00:21:43,855 --> 00:21:44,175
different

427
00:21:44,815 --> 00:21:45,475
cascading

428
00:21:46,115 --> 00:21:49,035
arbitrary failures that you might not even
look at it for a couple of days-

429
00:21:49,035 --> 00:21:50,455
-Yep
-... until someone goes, "Hey, this is,

430
00:21:50,455 --> 00:21:51,435
this is failing." So

431
00:21:52,535 --> 00:21:54,155
I like the idea in

432
00:21:54,775 --> 00:21:55,215
theory.

433
00:21:55,895 --> 00:21:56,675
-Mm-hmm.
-I think

434
00:21:57,435 --> 00:21:59,555
whether or not it works depends on

435
00:22:00,935 --> 00:22:04,255
the kind of company that you're in and how
quickly they respond to that. Like, if

436
00:22:04,255 --> 00:22:04,555
you,

437
00:22:05,235 --> 00:22:07,075
and, like, whether you put that in there
at all,

438
00:22:08,175 --> 00:22:11,695
uh, really comes down to how quickly
someone is going to respond

439
00:22:12,475 --> 00:22:14,775
when... It may be a case that you log,

440
00:22:15,395 --> 00:22:17,875
you know, for two weeks or something
before the failure,

441
00:22:18,735 --> 00:22:22,675
erm, even if you are running in test so
that something bubbles up somewhere that

442
00:22:22,675 --> 00:22:23,755
hopefully someone would see.

443
00:22:24,495 --> 00:22:24,855
Erm,

444
00:22:26,095 --> 00:22:26,495
but yeah.

445
00:22:27,215 --> 00:22:27,975
-That's a l-
-Yeah, you're, you're-

446
00:22:27,975 --> 00:22:31,455
... long-winded way of saying that, like,
I think in general, I agree with the idea.

447
00:22:31,455 --> 00:22:34,455
I like, I like the idea of putting
something [laughs] that explodes in, in

448
00:22:34,455 --> 00:22:35,575
test. Because that's something that

449
00:22:36,435 --> 00:22:40,595
at some point in your release cycle,
whether it's during development locally or

450
00:22:40,595 --> 00:22:44,275
as part of CI or deployments, like,
something will blow up because of that.

451
00:22:44,275 --> 00:22:47,395
-Yeah.
-Erm, and, and what you have in place to

452
00:22:47,395 --> 00:22:50,815
work around it. You know, okay, we can
just merge this PR anyway knowing that

453
00:22:50,815 --> 00:22:51,395
this is,

454
00:22:52,015 --> 00:22:52,315
erm,

455
00:22:52,995 --> 00:22:55,355
-unrelated to that pull request.
-Yeah.

456
00:22:55,355 --> 00:22:58,895
If you do, if you do automated deploys,
it's a bit trickier. Erm,

457
00:22:59,555 --> 00:23:04,195
it depends on, like, if you do... I know
with, erm, Laravel's testing stuff, you

458
00:23:04,195 --> 00:23:07,095
-can --fail on your test.
-Mm-hmm, mm-hmm.

459
00:23:07,095 --> 00:23:10,115
And, like, it will f- after the first
fail- like, if that's the first failure

460
00:23:10,115 --> 00:23:11,695
and it doesn't get to something else-

461
00:23:12,735 --> 00:23:15,015
-There's just stuff there.
-Yeah. Yeah, okay, so this is unrelated to,

462
00:23:15,015 --> 00:23:19,575
to my failure. I'm gonna, you know, ship
this anyway. Oh, whoops. There was a, some

463
00:23:19,575 --> 00:23:22,475
error further down in the test suite that
didn't get picked up 'cause we bailed out

464
00:23:22,475 --> 00:23:23,395
on this thing. So...

465
00:23:24,515 --> 00:23:25,435
-Yeah.
-You know?

466
00:23:25,435 --> 00:23:27,115
-I'll say that the-
-Rest reward, I guess.

467
00:23:27,115 --> 00:23:27,975
Yeah. The,

468
00:23:28,695 --> 00:23:33,215
the concerns that you bring up are the s-
very same concerns that Andy Hinkle had

469
00:23:33,875 --> 00:23:36,895
when we were going to implement this. He
was like, "I don't like the fact that

470
00:23:36,895 --> 00:23:40,195
other developers are gonna have to deal
with a feature flag before they can merge

471
00:23:40,195 --> 00:23:43,235
their stuff." So we came up with some
ideas and some solutions. The one thing I

472
00:23:43,235 --> 00:23:47,375
will say too, though, is that this, I feel
like, follows the convention that has

473
00:23:47,375 --> 00:23:49,375
been brought about in many

474
00:23:50,675 --> 00:23:54,835
different... You know, like we talked
about Nuno's, um, thing where it's, like,

475
00:23:54,835 --> 00:23:58,155
just here's the best practices applied to
the app service provider.

476
00:23:58,155 --> 00:24:00,175
-Mm-hmm.
-Where it's like, disallow n+1 queries or

477
00:24:00,175 --> 00:24:04,815
disallow lazy loading or, you know, those
assignment overflow things or whatever.

478
00:24:04,815 --> 00:24:09,155
Like, those, those sorts of things that
only fail if you're in local, if you're in

479
00:24:09,155 --> 00:24:11,495
your local environment. You know what I'm
talking about?

480
00:24:11,495 --> 00:24:13,075
-Yeah. Yeah, yeah.
-So, like, it'll check those things. It's

481
00:24:13,075 --> 00:24:15,795
not gonna blow up in production. It's not
gonna blow up in your face. If you happen

482
00:24:15,795 --> 00:24:20,275
to ship it to production, it's gonna be
like, "Eh, okay. Just let it go." But if

483
00:24:20,275 --> 00:24:23,855
you're in local dev or in testing, it's
gonna blow up in your face and say like,

484
00:24:23,855 --> 00:24:25,535
"Yeah, you can't do that." You, you can't-

485
00:24:25,535 --> 00:24:27,935
-Mm-hmm
-... you know, do that lazy load stuff. So

486
00:24:27,935 --> 00:24:33,919
this sort of falls in line with that to
me. Um...However, it's not a

487
00:24:34,679 --> 00:24:39,339
yes or a no, or an always or a never.
It's, it's only based on some time-based

488
00:24:39,339 --> 00:24:42,199
thing a lot of times, which is... So it's
not a right or wrong. It's just like if

489
00:24:42,199 --> 00:24:45,899
you happen to be the guy who runs it just
before it expires, or right after it

490
00:24:45,899 --> 00:24:48,059
expires, then you're screwed. You're the
one who has to deal with it. So

491
00:24:49,000 --> 00:24:50,700
okay, so how do we address this? Well,

492
00:24:51,580 --> 00:24:56,139
two couple... Two, two different ways I
think we could deal with it. Um, one is

493
00:24:56,139 --> 00:24:59,359
that you could, if you're running,

494
00:25:00,000 --> 00:25:05,979
uh, your CI on a regular enough basis, you
could start dropping warnings a month in

495
00:25:05,979 --> 00:25:10,579
advance of the expiration, right? So you
could say, "If it expires in the next 30

496
00:25:10,579 --> 00:25:16,060
days, throw a warning on the tests. If it
expires in the next..." You know, if it's,

497
00:25:16,060 --> 00:25:20,500
if it's in the past, then go ahead and
throw a failure. You know, something like

498
00:25:20,500 --> 00:25:24,899
that. So that would allow you to be
notified of it ahead of it actually

499
00:25:24,899 --> 00:25:29,119
expiring, so that you could fix it. Um,
and like, you know, you see it, it's, it's

500
00:25:29,119 --> 00:25:31,459
erroring, or not erroring but it's
throwing a warning, and you're like, "Oh,

501
00:25:31,459 --> 00:25:34,679
okay. I should probably make an issue for
that so somebody can fix that or make a

502
00:25:34,679 --> 00:25:40,379
decision." We have 30 days to do so. The
other thing that we talked about is making

503
00:25:40,379 --> 00:25:44,779
a command that runs once a day at like
6:00 AM, something like that, that runs

504
00:25:44,779 --> 00:25:48,599
through the features, checks if any of
them are expired and if they are, sends

505
00:25:48,599 --> 00:25:52,059
off an email or sends it or creates an
issue, or whatever you might have that

506
00:25:52,059 --> 00:25:56,439
says, "Hey by the way, these features are
expiring within the next 30 days or the

507
00:25:56,439 --> 00:26:00,799
next 7 days," or whatever. Uh, or they are
expired and these need to be addressed,

508
00:26:00,799 --> 00:26:04,139
and that's it. You know, so there was...
That was, there was a couple options

509
00:26:04,139 --> 00:26:09,019
there. You could say it doesn't ever fail
tests, it just sends out a warning to let

510
00:26:09,019 --> 00:26:12,279
somebody know that this needs to be
addressed. Um, so there's a couple

511
00:26:12,279 --> 00:26:15,019
different ways you could do that there
that I could see being effective that

512
00:26:15,019 --> 00:26:19,119
would not necessarily block the team, but
could inform a project manager that these

513
00:26:19,119 --> 00:26:21,219
are something that we need to prioritize
within the next cycle.

514
00:26:22,199 --> 00:26:24,839
Kind of, you know, deprecation warnings I
guess for features.

515
00:26:24,839 --> 00:26:25,859
Yes, exactly that.

516
00:26:26,759 --> 00:26:28,599
-Mm-hmm.
-Yes, correct. Yep, yep.

517
00:26:28,599 --> 00:26:33,759
Yeah, and I think realistically that's the
only way to, to deal with it. And if, if

518
00:26:33,759 --> 00:26:35,679
no one's gonna pick up the deprecation
warnings

519
00:26:36,579 --> 00:26:38,119
for the feature flags like that

520
00:26:38,979 --> 00:26:42,239
on a, you know, across a team, across an
organization, you know, if you're

521
00:26:42,239 --> 00:26:43,319
involving all these different p-

522
00:26:44,339 --> 00:26:46,039
all these different people, then

523
00:26:46,999 --> 00:26:51,199
probably have bigger concerns to, to worry
about. You know, at least sending that

524
00:26:51,199 --> 00:26:54,019
email or that notification in Dislike or
whatever else

525
00:26:54,759 --> 00:26:58,899
that happens to be from that scheduled
job, scheduled task, is...

526
00:26:59,519 --> 00:27:04,039
You know, you've got to address it in some
way. Um, and if it goes to enough people,

527
00:27:04,039 --> 00:27:07,239
someone... Well actually, if it goes to
too many people everyone's gonna be like,

528
00:27:07,239 --> 00:27:09,519
"I thought someone else was gonna deal
with it," and then you've got to be

529
00:27:09,519 --> 00:27:10,559
-careful there as well.
-Yeah.

530
00:27:10,559 --> 00:27:10,739
So

531
00:27:11,479 --> 00:27:14,839
yeah, keep the, keep the list small but
make sure it gets actioned, I guess is the

532
00:27:14,839 --> 00:27:15,319
-main thing.
-Exactly.

533
00:27:15,319 --> 00:27:19,219
But again, comes down to the team and,
like, someone actually taking ownership o-

534
00:27:19,219 --> 00:27:20,219
over that. So

535
00:27:20,839 --> 00:27:22,059
-yeah.
-Yep.

536
00:27:22,059 --> 00:27:22,919
-Good, uh-
-Yep, you got it.

537
00:27:22,919 --> 00:27:27,659
Good, good problem. Um, I think good, good
solution to that problem as well.

538
00:27:29,019 --> 00:27:33,259
Awesome. Yeah, thanks. I, it was, it was a
fun one to kind of run down and it was...

539
00:27:33,259 --> 00:27:36,359
Uh, yeah. A couple different approaches
there, a couple different concerns, but I

540
00:27:36,359 --> 00:27:39,199
was happy with where we landed on it, so
yeah. Stoked about that.

541
00:27:39,199 --> 00:27:42,979
-Mm-hmm.
-Okay. Since you talked about your, um,

542
00:27:43,939 --> 00:27:49,579
your speakers on Laracon, um, I think this
is a good transition into this other part

543
00:27:49,579 --> 00:27:50,679
which is this,

544
00:27:51,839 --> 00:27:53,579
where do you store values

545
00:27:54,219 --> 00:27:54,699
for

546
00:27:55,659 --> 00:27:57,359
templates in a static

547
00:27:58,999 --> 00:28:02,759
view? Okay, so let me pitch it to you this
way. Let's say you didn't have a database

548
00:28:03,399 --> 00:28:08,259
for those team members, or not another
team members, for those speakers, right?

549
00:28:09,559 --> 00:28:14,259
Um, because locally you are going to do it
and you don't want to have to like... How

550
00:28:14,259 --> 00:28:19,619
do you, how do you populate your database
locally and then push that up to

551
00:28:19,619 --> 00:28:22,699
production without having to have access
to the production database? You can't

552
00:28:22,699 --> 00:28:26,319
really do that. It's like I know what the
values need to be, they're not necessarily

553
00:28:26,319 --> 00:28:31,779
dynamic, it's just I- I don't... Where do
I store them, right? Do I... What are my

554
00:28:31,779 --> 00:28:35,279
options? If I, if I can't put them in a
database, where are the other places that

555
00:28:35,279 --> 00:28:38,999
I could put them? So I actually came up
with one just as we were talking here, but

556
00:28:38,999 --> 00:28:42,039
there was a couple options here that,
that were thought about, right?

557
00:28:43,059 --> 00:28:45,519
One is you could literally just dre- like

558
00:28:46,199 --> 00:28:49,099
create a component and then in Blade, just

559
00:28:49,879 --> 00:28:52,699
you don't even bother doing a loop. You
just put in the values.

560
00:28:52,699 --> 00:28:54,619
-Yeah.
-Right? That's it. Create a component, put

561
00:28:54,619 --> 00:28:58,219
the values in, that is your database
essentially, right? You just-

562
00:28:58,219 --> 00:29:00,319
-Mm-hmm
-... write them all out in the blade, and

563
00:29:00,939 --> 00:29:06,499
that works. That's fine. Like you just
basically, your component is going to have

564
00:29:06,499 --> 00:29:10,099
locations or values, like the values that
you would normally store in the database

565
00:29:10,099 --> 00:29:15,639
are gonna be essentially like arguments to
that component, right? So like name,

566
00:29:15,639 --> 00:29:17,959
image source, um,

567
00:29:19,199 --> 00:29:21,679
title, announcement date, right, all those
things.

568
00:29:22,779 --> 00:29:25,779
Right? Those are gonna be, those are gonna
be stored like in the Blade file.

569
00:29:25,779 --> 00:29:26,619
-Yeah.
-That's one way to put it.

570
00:29:26,619 --> 00:29:28,279
-Yeah.
-That's one spot to put it.

571
00:29:28,279 --> 00:29:29,939
-Yeah.
-Um, can you think of any other spots you

572
00:29:29,939 --> 00:29:31,579
might, you might put these things?

573
00:29:32,199 --> 00:29:35,019
I can because this is what we did last
year was-

574
00:29:35,019 --> 00:29:38,479
Ooh, okay. I wanna hear, I wanna hear. I
want wrong answers only.

575
00:29:38,479 --> 00:29:38,519
-We, uh-
-Wrong answers only.

576
00:29:38,519 --> 00:29:41,579
-Wrong answers only [laughs]. Yeah.
-Yes. What were the other places you could

577
00:29:41,579 --> 00:29:43,359
-put it?
-We created, we created a YAML file that we

578
00:29:43,359 --> 00:29:45,679
-hosted in GitHub that you had to-
-Okay

579
00:29:45,679 --> 00:29:48,479
... in a JS, it was a secret JS... No
[laughs], I'm joking.

580
00:29:48,479 --> 00:29:51,639
-I was gonna say, oh dang. Okay.
-You said wrong answers only.

581
00:29:51,639 --> 00:29:53,179
-That's crazy [laughs].
-You said wrong answers only.

582
00:29:53,179 --> 00:29:55,659
I- I, at first I thought you were being
serious. I was like wait a second, do you

583
00:29:55,659 --> 00:29:58,139
really? Okay. All right, all right. A YAML
file in-

584
00:29:58,139 --> 00:29:59,539
-No, we-
-... a JS that you were pulling in R.

585
00:29:59,539 --> 00:30:00,019
-In a JS.
-Fair enough.

586
00:30:00,019 --> 00:30:00,839
-That's right, yeah.
-Yeah.

587
00:30:00,839 --> 00:30:02,979
-So if anyone wants to go and-
-And then you used Sushi.

588
00:30:02,979 --> 00:30:03,319
... uh, and scan. Sushi. Yeah, to use as
an-

589
00:30:03,319 --> 00:30:05,579
Used, uh, Caleb Porzio's Sushi package,
yeah.

590
00:30:05,579 --> 00:30:09,339
... eloquent database. That's right. Uh,
no we just, I just put all that stuff

591
00:30:09,339 --> 00:30:12,219
-inside of like a config Laracon.php.
-Okay.

592
00:30:12,219 --> 00:30:15,559
And it was just an array of speakers which
was keyed by...

593
00:30:17,199 --> 00:30:19,879
Actually, I don't think it was keyed. I
think it was just an, an array that we

594
00:30:19,879 --> 00:30:23,459
then pulled out and we, you know, we
collected it. We put it in a collection.

595
00:30:23,459 --> 00:30:27,739
We sorted it by announced. We filtered
ones that were not, you know, didn't have

596
00:30:27,739 --> 00:30:31,359
an announced in the, in the past and that
was it. That's, that's how we did it.

597
00:30:32,099 --> 00:30:35,259
-Yeah.
-Um, and then I think w- we just used, you

598
00:30:35,259 --> 00:30:37,959
know, Cloudflare to cache that so we
didn't... Well, you know, obviously the

599
00:30:37,959 --> 00:30:41,899
page gets cached so it doesn't have to hit
the origin server to, to resolve that in

600
00:30:41,899 --> 00:30:44,219
the future. So yeah, that was, that was it
really.

601
00:30:44,911 --> 00:30:48,071
Yeah. Uh, that works pretty good. So,
like, you could put it in the config. You

602
00:30:48,071 --> 00:30:50,551
also, if you're being a little bit crazy,
you could just chuck it into the

603
00:30:50,551 --> 00:30:52,431
-controller. Like, if you wanted to-
-Mm-hmm. Yeah

604
00:30:52,431 --> 00:30:53,811
... just inline an array in the
controller, you-

605
00:30:53,811 --> 00:30:55,732
-Yeah. Sure
-... could kinda put it in there. Uh,

606
00:30:55,732 --> 00:30:58,871
that's one way to do it as well. Um, so,
uh, my,

607
00:30:59,491 --> 00:31:05,652
my junior-ish developer, he's actually...
He's Landon. Landon is his name. Um, he

608
00:31:05,652 --> 00:31:08,711
played basketball a little bit last year
at Laracon with me right afterwards. There

609
00:31:08,711 --> 00:31:12,751
was a couple dudes that we all played.
Me, David, Hemphill, Landon, and then

610
00:31:12,751 --> 00:31:15,931
three other dudes that absolutely smoked
us. It was really fun, but kinda crazy.

611
00:31:15,931 --> 00:31:18,132
-[laughs]
-Landon's a great basketball player, junior

612
00:31:18,132 --> 00:31:22,951
developer though, and he's, he's figuring
stuff out. And so for him, he ini- or

613
00:31:22,951 --> 00:31:26,191
initially just put it, like, in the
controller. Like, he actually had

614
00:31:26,912 --> 00:31:30,711
a method for each. Like, so we had, like,
four locations that we were trying to,

615
00:31:30,711 --> 00:31:35,032
like, you know, deal with. And so what he
did is he put,

616
00:31:35,811 --> 00:31:38,051
uh, a method in, in the controller.

617
00:31:39,011 --> 00:31:42,651
So you would have, like, a, a value being
passed into the controller, um,

618
00:31:43,531 --> 00:31:47,111
like, uh, you know, in the, like, the
array that gets passed in to the, to the

619
00:31:47,111 --> 00:31:49,031
-view. I'm sorry, to the view.
-Yep. Mm-hmm.

620
00:31:49,031 --> 00:31:53,051
And he would say, like, "Location one, Fat
Arrow,

621
00:31:53,871 --> 00:31:56,911
this.get('location1')." And then say,
"Location two-"

622
00:31:56,911 --> 00:31:58,611
-Yep.
-"... this.FatArrow.get('location2')." So

623
00:31:58,611 --> 00:32:01,411
he was just calling private methods inside
the controller that were sort of then

624
00:32:01,411 --> 00:32:03,391
-returning these arrays. And I was like-
-Yep

625
00:32:03,391 --> 00:32:03,711
..." Hmm,

626
00:32:04,451 --> 00:32:08,711
that is fin-" Like, it works. It's
probably not how I would do it, but it

627
00:32:08,711 --> 00:32:09,851
-works. And so I-
-Yeah

628
00:32:09,851 --> 00:32:13,231
... was like, "I'm wondering..." You know,
config file is the first thing that came

629
00:32:13,231 --> 00:32:15,791
to mind. But for some reason, I remember
when looking at it, there were some

630
00:32:15,791 --> 00:32:19,111
reasons why it wouldn't have really worked
in a config file. And I think partly

631
00:32:19,111 --> 00:32:24,191
because he was doing some PHP stuff inside
of that config file, and, like, it

632
00:32:24,191 --> 00:32:26,371
would've been weird to do it there. Um,

633
00:32:27,031 --> 00:32:27,411
but

634
00:32:28,231 --> 00:32:31,031
the other thing that I'm wondering here is
this. If you didn't want to store it in a

635
00:32:31,031 --> 00:32:34,311
config, what if you just put it in a
SQLite database and then shipped the

636
00:32:34,311 --> 00:32:35,571
-database up?
-Yeah. Yeah,

637
00:32:36,351 --> 00:32:38,431
-totally.
-If you put that in somewhere? Like, could

638
00:32:38,431 --> 00:32:41,311
you... Where would you put that, though?
Would you... You'd put it in the storage

639
00:32:41,311 --> 00:32:44,071
file or something? I don't know how that
typically works. If you put it in the

640
00:32:44,071 --> 00:32:47,071
storage, you have to, like, symlink it or
something weird like that if you're using

641
00:32:47,071 --> 00:32:48,971
-Envoyer.
-Yeah. I would just, just put it in the

642
00:32:48,971 --> 00:32:52,651
database, 'cause that's, that's where the
SQL files go by default.

643
00:32:53,291 --> 00:32:53,851
-If-
-Okay

644
00:32:53,851 --> 00:32:56,671
... you know, if you, if you, if you do a
Laravel new and you say you wanna use

645
00:32:56,671 --> 00:33:01,131
SQLite, it will create a
database/database.sqlite file inside of

646
00:33:01,131 --> 00:33:04,431
storage. Uh, inside of the database
folder, and then you just commit that to

647
00:33:04,431 --> 00:33:07,051
-version control and off you go.
-Yeah, 'cause I'm... As, I'm sure initially

648
00:33:07,051 --> 00:33:08,351
it's probably.gitignored maybe?

649
00:33:09,411 --> 00:33:13,071
Hmm, not a... Oh, yeah, maybe
database.sqlite specifically, but you

650
00:33:13,071 --> 00:33:14,731
-could just remove it from there, like-
-Totally. You could.

651
00:33:14,731 --> 00:33:17,591
Just because Laravel puts it there by
default doesn't mean you can't change it.

652
00:33:17,591 --> 00:33:18,551
-Um-
-Absolutely.

653
00:33:18,551 --> 00:33:23,391
Yeah. Yeah, shipping, shipping sqlite is
fine. Um, who, who was it? Like, was it

654
00:33:23,391 --> 00:33:25,331
Aaron Francis was talking about that for,

655
00:33:26,051 --> 00:33:26,811
for, um...

656
00:33:28,011 --> 00:33:31,751
I think for his aaronfrancis.com. He's, he
ships an sqlite file or something like

657
00:33:31,751 --> 00:33:33,571
-that, so.
-It seems like the right place to do it,

658
00:33:33,571 --> 00:33:34,311
-right? I mean, like-
-[laughs]

659
00:33:34,311 --> 00:33:37,191
... you literally have, you have the
structure in there. You can pull it using

660
00:33:37,191 --> 00:33:41,191
-your, uh, you know, using models and-
-Mm-hmm

661
00:33:41,191 --> 00:33:42,091
-... all that good stuff.
-And, you know-

662
00:33:42,091 --> 00:33:44,411
So it's like, I don't really see a reason
why you wouldn't or why you couldn't.

663
00:33:44,411 --> 00:33:46,771
SQLite is, is made to be small and
portable like that.

664
00:33:47,991 --> 00:33:48,991
-Every, you know-
-Mm-hmm

665
00:33:48,991 --> 00:33:51,051
-... the, these things, every-
-I mean, the problem is it can fill up

666
00:33:51,051 --> 00:33:52,311
-... everyone's iPhones-
-It's just a flat file, yeah.

667
00:33:52,311 --> 00:33:55,391
Everyone's Android file. Yeah, it's just,
just shove it all in there. Yeah.

668
00:33:55,391 --> 00:33:56,231
-Yeah.
-Um-

669
00:33:56,231 --> 00:33:57,491
-Yeah, so I think-
-I mean, the other thing you could probably

670
00:33:57,491 --> 00:33:58,251
-do is like a-
-... that's, that's an interesting third

671
00:33:58,251 --> 00:34:00,031
-option. Yeah
-... a document store. You know, something

672
00:34:00,031 --> 00:34:02,031
that writes JSON to a file, and

673
00:34:03,491 --> 00:34:05,511
-do that, I guess, with, like-
-Yeah, but the SQLite thing seems way

674
00:34:05,511 --> 00:34:08,751
better to me. Yeah, as long as you have...
I mean, as long as you can set up... You

675
00:34:08,751 --> 00:34:11,471
know, you just have to make sure that
every person, each person that's looking

676
00:34:11,471 --> 00:34:11,811
at it,

677
00:34:12,471 --> 00:34:16,631
uh, when they're trying to develop stuff,
uh, that they map... Uh, you know, they

678
00:34:16,631 --> 00:34:19,571
can open TablePlus to that sqlite file or
whatever, right? So-

679
00:34:19,571 --> 00:34:20,351
Yeah. Yep.

680
00:34:21,031 --> 00:34:24,291
Yeah, that seems like a good way to do it
though. Seems like a pretty good way to do

681
00:34:24,291 --> 00:34:29,391
it. Um, portable, light. It's still a mi-
it's still a, uh, you know, queryable

682
00:34:29,391 --> 00:34:32,051
-entity. Um, you don't have to write-
-You could be-

683
00:34:32,051 --> 00:34:34,911
You don't have to write, like, factories
or anything for it. You could just... You

684
00:34:34,911 --> 00:34:37,811
know, you just ship it. You ship the
actual data up.

685
00:34:37,811 --> 00:34:38,271
-Yeah.
-Yeah.

686
00:34:38,271 --> 00:34:41,391
You could open up TablePlus and use that
as your, you know-

687
00:34:41,391 --> 00:34:42,851
-Totally
-... as your admin interface-

688
00:34:42,851 --> 00:34:44,331
-Yeah
-... to put stuff in there.The only-

689
00:34:44,331 --> 00:34:45,351
-Absolutely, and you've got-
-... the only other thing that, th-

690
00:34:45,351 --> 00:34:47,131
... version control on and everything, you
know?

691
00:34:47,131 --> 00:34:50,431
Yeah, yeah. I mean, the only other thing
that you might do that's probably a little

692
00:34:50,431 --> 00:34:54,531
bit more approachable in terms of version
control is just a, like, a CSV file,

693
00:34:55,371 --> 00:34:56,011
-and then use-
-Yeah

694
00:34:56,011 --> 00:34:58,031
... Switchy to, to, to manage that.

695
00:34:59,471 --> 00:35:00,691
-Yeah. But I like the-
-Because then-

696
00:35:00,691 --> 00:35:02,531
-... SQLite. I like the SQLite option.
-Yeah. The ISQL-

697
00:35:02,531 --> 00:35:04,791
-And I, I'm not pushing that direction
-... is definitely nicer from a, from a dev

698
00:35:04,791 --> 00:35:07,651
perspective. If, if you needed, like,
someone else,

699
00:35:08,291 --> 00:35:11,711
you know, someone from product or someone
from sales or marketing, whatever, to be

700
00:35:11,711 --> 00:35:15,471
putting data in their CSV would be fine.
And just like, "Here's the updated file."

701
00:35:16,211 --> 00:35:16,431
Yeah.

702
00:35:17,151 --> 00:35:19,251
-Yeah.
-"Drop it in, overwrite, replace it." You

703
00:35:19,251 --> 00:35:21,011
-know?
-Yeah, it's only developers working on this

704
00:35:21,011 --> 00:35:24,851
one, so I think SQLite's gonna be the
solution there. And I think that's, um,

705
00:35:24,851 --> 00:35:28,191
that's a really great way to do that. So,
uh, we're gonna move towards that,

706
00:35:28,191 --> 00:35:31,471
actually. That's w- exactly what we're
gonna do. We're gonna end up doing that

707
00:35:31,471 --> 00:35:32,171
precisely.

708
00:35:32,811 --> 00:35:33,211
Love it.

709
00:35:34,271 --> 00:35:35,931
Love it. Awesome.

710
00:35:37,171 --> 00:35:40,311
Okay, um, what else we have here?

711
00:35:41,851 --> 00:35:46,571
Live photos, staggered CSS animation,
defensive programming.

712
00:35:47,571 --> 00:35:49,491
What do you think? Hmm.

713
00:35:50,531 --> 00:35:52,531
So, uh, Matias...

714
00:35:53,591 --> 00:35:57,731
I can't say his last name. Starts with a
G. Guimaraes, I think. Uh, he's got a

715
00:35:57,731 --> 00:35:58,591
defensive Laravel

716
00:35:59,311 --> 00:36:02,131
course coming to Laracasts at some point,
so it should be cool.

717
00:36:02,131 --> 00:36:04,311
I saw Jeffrey tweeted about that, like,
today, I think. Yeah.

718
00:36:04,311 --> 00:36:07,351
Yeah. Yeah, he, um... De- definitely check
that out if you're a Laracasts

719
00:36:07,351 --> 00:36:10,171
subscriber. I, uh, I watched his...

720
00:36:10,891 --> 00:36:14,091
-It was Event Sourcing Tour- uh, series-
-Mm, yes

721
00:36:14,091 --> 00:36:16,471
... that he had on Screencast. That was,
that was really good. He did a, a good job

722
00:36:16,471 --> 00:36:18,971
of that, so I'm, uh, I'm keen to see

723
00:36:19,731 --> 00:36:20,571
his, um,

724
00:36:22,071 --> 00:36:25,751
his defensive Laravel stuff. Because he,
he works at, like, a payment provider or

725
00:36:25,751 --> 00:36:27,331
-something over, over there-
-Oh, interesting

726
00:36:27,331 --> 00:36:28,311
... where he lives in,

727
00:36:29,671 --> 00:36:30,731
pretty sure, Brazil.

728
00:36:31,511 --> 00:36:31,971
-One of the-
-Okay

729
00:36:31,971 --> 00:36:36,931
... Portuguese slash and/or
Spanish-speaking nations. Sorry, Matias.

730
00:36:36,931 --> 00:36:38,731
-But, uh, yeah, he, um-
-That's right, that's Portuguese, right?

731
00:36:38,731 --> 00:36:39,871
-Yeah. I-
-Yeah, he's a-

732
00:36:39,871 --> 00:36:41,271
Did I tell you about that, right? When I
said-

733
00:36:41,271 --> 00:36:42,031
-Yeah, yeah
-... when I thought

734
00:36:42,031 --> 00:36:45,171
But I couldn't remember if he was from
Spain or from Brazil. But I know in

735
00:36:45,171 --> 00:36:45,431
-Brazil-
-Oh, gotcha

736
00:36:45,431 --> 00:36:47,871
-... they speak Portuguese. Yeah. So-
-Yes, indeed.

737
00:36:47,871 --> 00:36:48,191
Um,

738
00:36:49,171 --> 00:36:55,904
yeah, he...So, he does some very intense
things, uh, in terms of, like, the

739
00:36:55,904 --> 00:36:59,944
extremes of what you can do with Laravel,
so I can't... You know, he'd be a, he'd be

740
00:36:59,944 --> 00:37:04,523
a... You'd be hard-pressed to find a
better teacher for that kind of Laravel at

741
00:37:04,523 --> 00:37:07,763
scale type of thing. So, yeah, keen to
check-

742
00:37:07,763 --> 00:37:08,664
-Yeah
-... that one out when it drops.

743
00:37:08,664 --> 00:37:13,963
That'll be really good. I'm sure he'll
have some excellent sort of tips on using

744
00:37:13,963 --> 00:37:19,643
Laravel tools in order to be sure that you
can catch things if they happen terribly,

745
00:37:19,643 --> 00:37:21,063
if they happen to go terribly wrong.

746
00:37:21,723 --> 00:37:24,003
We had something today where,

747
00:37:25,024 --> 00:37:25,503
um,

748
00:37:27,303 --> 00:37:31,803
it was, it was the sequence in which
something was working, so we were reading

749
00:37:31,803 --> 00:37:33,563
an email from an email inbox,

750
00:37:34,164 --> 00:37:40,523
we were creating a record for it, and on
that database we had a unique column for

751
00:37:40,523 --> 00:37:45,083
the ID of that item from that inbox. So
that item from that inbox was given a

752
00:37:45,083 --> 00:37:46,803
unique, like, Outlook message ID.

753
00:37:47,443 --> 00:37:51,463
And so it's, you know, it's a GUID. And so
it's, it's unique. You cannot create

754
00:37:51,463 --> 00:37:53,043
another one with that same GUID.

755
00:37:53,763 --> 00:37:58,143
However, the step after we created it was
to move it from that location, that

756
00:37:58,143 --> 00:37:59,703
folder, to another location.

757
00:38:00,923 --> 00:38:01,883
If that failed,

758
00:38:02,543 --> 00:38:06,303
right? So you'd move it from the inbox to
a folder called Processing or something

759
00:38:06,303 --> 00:38:09,003
like that, right? So we create the record,
and then we start to process that email.

760
00:38:09,003 --> 00:38:11,583
We read the body. We read the subject. We
do some, you know,

761
00:38:12,683 --> 00:38:16,583
guessing as to where we think it needs to
go and basically have our own really

762
00:38:16,583 --> 00:38:21,803
intelligent rule system that we can build
up off of that database record, right? So

763
00:38:21,803 --> 00:38:25,743
you create the record, and then you send
it to processing. Well, if that sending to

764
00:38:25,743 --> 00:38:29,143
processing fails for some reason, which
sometimes is this weird race, race

765
00:38:29,143 --> 00:38:35,383
condition, if it fails, then the email
doesn't move, and when the inbox gets

766
00:38:35,383 --> 00:38:38,723
scanned in the next minute, it tries to
pick that up again and create the record.

767
00:38:38,723 --> 00:38:41,963
Well, since you have a unique ID, it
fails. So

768
00:38:42,703 --> 00:38:47,243
yeah. It, it's like just using simple
things like a database transaction around

769
00:38:47,243 --> 00:38:51,543
those two pieces, right? Create it, and
then move it. And if it fails while

770
00:38:51,543 --> 00:38:56,023
moving, roll back the creation so that it
can try it again next time without hitting

771
00:38:56,023 --> 00:38:59,203
a unique constraint. So those are the
sorts of things that we're talking about

772
00:38:59,203 --> 00:39:03,183
here, right? These, you can't anticipate
everything that's going to happen. You

773
00:39:03,183 --> 00:39:06,503
don't know all the different failure
points, but you can certainly wrap

774
00:39:06,503 --> 00:39:10,023
something into database transaction and
roll back if something fails. You can do

775
00:39:10,023 --> 00:39:13,343
that. And that's, you don't have to know
everything. You just have to know if

776
00:39:13,343 --> 00:39:19,843
anything fails in here, roll back. Don't
leave this unfinished, weird state, um,

777
00:39:19,843 --> 00:39:22,163
that you're gonna have to contend with
later, especially if you have-

778
00:39:22,163 --> 00:39:24,543
-Yeah
-... constraints around unique values. So I

779
00:39:24,543 --> 00:39:28,623
hope in, in, you know, in his course he,
he covers some of those things or, you

780
00:39:28,623 --> 00:39:32,623
know, like the rescue function in Laravel
is so insanely awesome. Where if there is

781
00:39:32,623 --> 00:39:35,523
a failure while you're attempting to do
something, you can provide a default

782
00:39:35,523 --> 00:39:40,203
return value and just continue the program
running as if nothing failed, right?

783
00:39:40,203 --> 00:39:44,763
Those, that's incredibly helpful. So
Laravel has a ton of tools to help make it

784
00:39:44,763 --> 00:39:48,703
more resilient and more bulletproof if
you know they exist. So I'm sure he'll-

785
00:39:48,703 --> 00:39:50,843
-Yeah
-... cover all that stuff and do a great

786
00:39:50,843 --> 00:39:54,123
-job doing so.
-Yeah. One, one thing I've been caught out

787
00:39:54,123 --> 00:39:58,663
with by that Rescue helper in the past is
typically I'm wrapping something in Rescue

788
00:39:58,663 --> 00:40:00,563
because I don't wanna know about it, and
I always-

789
00:40:00,563 --> 00:40:02,983
-Yeah
-... I, I have on more than one occasion

790
00:40:02,983 --> 00:40:05,483
forgotten to set the report flag to, to
false.

791
00:40:06,183 --> 00:40:06,483
Uh-huh.

792
00:40:07,123 --> 00:40:10,043
So I still, I still get the exception to
bubble up, and then I go like, "What is

793
00:40:10,043 --> 00:40:12,783
this?" And then I, I, like, I put the
Rescue in there, and I go, "Ah, I forgot,

794
00:40:12,783 --> 00:40:16,643
forgot the, to report." Because the, the
place that we mainly use it is when we are

795
00:40:16,643 --> 00:40:19,783
trying to parse dates using Carbon or
the-

796
00:40:19,783 --> 00:40:22,783
-Oh
-... or the date facade. Because, you know,

797
00:40:22,783 --> 00:40:26,283
you guys use, um, month, day, year, and
we use day, month, year.

798
00:40:27,083 --> 00:40:27,563
-But-
-Ah, yes. Right

799
00:40:27,563 --> 00:40:32,863
... if you take something that's
day/month/year

800
00:40:34,303 --> 00:40:38,003
and you throw that at date parse, because
that's how we would re-enter it into a UI.

801
00:40:38,003 --> 00:40:38,383
Yeah.

802
00:40:38,383 --> 00:40:43,183
When you take day/month/year and put it
into PHP, PHP assumes that it is

803
00:40:43,183 --> 00:40:45,723
-month/day/year.
-Yeah.

804
00:40:45,723 --> 00:40:50,843
And so what you end up with is something
that's, like, 13/3/25.

805
00:40:50,843 --> 00:40:53,023
-Yeah.
-And then Carbon goes, "Thanks."

806
00:40:53,023 --> 00:40:53,563
Freaks out.

807
00:40:54,523 --> 00:40:58,503
Um, so yeah. We, we've got in a number of
places where we're handling that, you

808
00:40:58,503 --> 00:41:02,983
know, a date create from format, and then
we explicitly tell it, like, "This is

809
00:41:02,983 --> 00:41:05,263
-day/month/year." So that-
-Yeah

810
00:41:05,263 --> 00:41:08,563
... it goes, "All right. Yeah, this is,
this is the right way round." Um,

811
00:41:09,303 --> 00:41:13,503
and then we fall back to just doing, like,
a date pass in case something comes

812
00:41:13,503 --> 00:41:17,623
through as year-month-day or whatever else
and then, then gets picked up that way.

813
00:41:17,623 --> 00:41:21,783
But yeah. When it, when it hits that first
Rescue, uh, callable

814
00:41:22,543 --> 00:41:25,523
and you don't have the report, then we
still get the exception bubble up into,

815
00:41:26,203 --> 00:41:30,423
um, our observability tooling. And it's
like, "Oh, yep. I don't really care about

816
00:41:30,423 --> 00:41:31,303
-that," because-
-Yeah

817
00:41:31,303 --> 00:41:34,823
... it's, it's... Like, it will, it will
catch the exception from the Rescue,

818
00:41:35,443 --> 00:41:38,523
report it, and then go to the f- the
fallback, so you're, like-

819
00:41:38,523 --> 00:41:40,903
-Then it'll continue on, but yeah
-But, and then you go, "But this worked.

820
00:41:40,903 --> 00:41:42,923
Why am I...? Oh, okay. Yep. Gotcha."

821
00:41:43,543 --> 00:41:44,283
-So don't, uh-
-Yeah, exactly

822
00:41:44,283 --> 00:41:47,103
-... don't miss that one. [laughs]
-I'm surprised that there's no, like,

823
00:41:47,103 --> 00:41:51,063
localization thing for Carbon where you
can basically just tell it at the top

824
00:41:51,063 --> 00:41:54,923
level, "Hey, we're in Australia. Please
handle dates accordingly."

825
00:41:54,923 --> 00:41:55,723
Yeah, yeah.

826
00:41:56,603 --> 00:41:59,163
Probably. Probably is and we just miss it,
but, um-

827
00:41:59,163 --> 00:42:00,883
-Yeah. Maybe
-... no, 'cause this is an underlying PHP

828
00:42:00,883 --> 00:42:01,423
thing as well.

829
00:42:02,103 --> 00:42:02,423
-Like-
-Oh, gotcha

830
00:42:02,423 --> 00:42:05,743
... if you were to do... Yeah, if you were
to do, like, a create, whatever the

831
00:42:05,743 --> 00:42:06,303
underlying

832
00:42:07,103 --> 00:42:08,723
PHP function is, it will do the same
thing.

833
00:42:10,023 --> 00:42:10,663
-Got it.
-The, the-

834
00:42:10,663 --> 00:42:13,023
-Yeah
-... the correct approach for that is to

835
00:42:13,023 --> 00:42:16,723
-use hyphens instead of slashes.
-Ah, interesting.

836
00:42:16,723 --> 00:42:20,923
But no one, no one here is going to enter
the dates with hyphens instead of slashes,

837
00:42:20,923 --> 00:42:24,183
-because that's just not what we do, so.
-Yeah.

838
00:42:25,043 --> 00:42:25,703
-Like, that is-
-Yeah

839
00:42:25,703 --> 00:42:28,063
-... I mean, I assume that's-
-We don't, we don't do hyphens either.

840
00:42:28,063 --> 00:42:31,483
Yeah. I assume that's, like, the
workaround in, at the language level. To

841
00:42:31,483 --> 00:42:34,503
be like, "Oh, yeah, you can do this as
long..." But you, you're not gonna tell,

842
00:42:35,203 --> 00:42:37,363
you know, users of your platform who have

843
00:42:38,143 --> 00:42:43,043
become accustomed to using slashes to use
hyphens in your application wherever else

844
00:42:43,043 --> 00:42:45,103
-it's just handled, so.
-Yeah.

845
00:42:45,103 --> 00:42:45,343
Yeah.

846
00:42:46,463 --> 00:42:47,083
Absolutely.

847
00:42:48,303 --> 00:42:53,243
Well, hey, dude. I think we have a couple
things left to talk about next time. Um,

848
00:42:53,243 --> 00:42:55,923
we could probably talk a little bit more
about defensive programming and some

849
00:42:55,923 --> 00:43:00,827
examples that we have. We could talk
about...... staggered CSS animations,

850
00:43:00,827 --> 00:43:01,348
which is

851
00:43:01,967 --> 00:43:05,868
interesting to me. This is when you go
onto a page and you want, like, this

852
00:43:05,868 --> 00:43:10,647
effect of when you hit a certain
observability point, and there's a, what's

853
00:43:10,647 --> 00:43:11,367
that called?

854
00:43:12,047 --> 00:43:16,728
Interaction observer? It will animate
something in into view.

855
00:43:17,347 --> 00:43:20,708
But if you have, like, three paragraphs of
text or something like that right

856
00:43:20,708 --> 00:43:24,327
following each other and you scroll down
really fast, you don't want that whole

857
00:43:24,327 --> 00:43:28,487
block to animate and at the same time. You
want them to animate in, like, a

858
00:43:28,487 --> 00:43:29,327
-PowerPoint-
-One after, yeah

859
00:43:29,327 --> 00:43:31,087
-... like, one, two, three. Yeah.
-Mm-hmm.

860
00:43:31,087 --> 00:43:37,948
Which is a little bit tricky to do. And
so, um, I think, uh, motion.dev allows you

861
00:43:37,948 --> 00:43:41,667
to do that. We figured out how to do
that. I still have to implement it. Uh,

862
00:43:41,667 --> 00:43:47,388
and then this idea of how do we, how do we
accomplish live photos on the web, where

863
00:43:47,388 --> 00:43:51,967
if you roll over something, it kind of
moves the photo. It kind of gives you this

864
00:43:51,967 --> 00:43:56,208
motion, where it changes from a photo to
a video while you're rolled over it, and

865
00:43:56,208 --> 00:43:56,527
-then-
-Yeah

866
00:43:56,527 --> 00:43:58,807
... and then when you roll off it, it, it
stops doing that.

867
00:43:58,807 --> 00:44:00,647
-Interesting.
-So found some interesting stuff about

868
00:44:00,647 --> 00:44:04,147
that. It'd be, uh, I'd love to kind of
talk that through with you and see what

869
00:44:04,147 --> 00:44:04,667
-your thoughts are-
-Mm-hmm

870
00:44:04,667 --> 00:44:05,207
... on that. So

871
00:44:06,107 --> 00:44:08,167
-next show, folks. Come on back and-
-Sure

872
00:44:08,167 --> 00:44:08,467
... um,

873
00:44:09,367 --> 00:44:14,247
you know, hey, uh, to go along with the,
uh, the news of, uh, Steve and Erin

874
00:44:14,247 --> 00:44:18,867
breaking up, I, I gotta let you guys know
that, um, Michael said he's leaving the

875
00:44:18,867 --> 00:44:22,327
podcast, and it's, he's just leaving it to
me. He said, he said he's giving me

876
00:44:22,327 --> 00:44:24,867
-everything. Just take it.
-[laughs]

877
00:44:24,867 --> 00:44:27,487
I'm paying, I'm paying him 50% of what
it's worth.

878
00:44:28,427 --> 00:44:32,067
-So [laughs]-
-50% on anything is nothing.

879
00:44:32,067 --> 00:44:33,987
-Since we haven't had a sponsor.
-[laughs] Sorry.

880
00:44:33,987 --> 00:44:34,547
-[laughs]
-We are, we-

881
00:44:34,547 --> 00:44:36,447
-Since we haven't had a sponsor in, like-
-[laughs]

882
00:44:36,447 --> 00:44:38,607
... years, I'm getting a steal on this
thing.

883
00:44:38,607 --> 00:44:40,547
-That's right. I said, I said to Aaron-
-Oh, man

884
00:44:40,547 --> 00:44:45,387
... that, uh, that the, the unsponsorable,
the unsponsorable comment was ruthless.

885
00:44:45,387 --> 00:44:47,127
It was fair, but it was ruthless. [laughs]

886
00:44:47,127 --> 00:44:51,307
-Oh, so funny. So funny. Oh, my.
-He'll be fine.

887
00:44:51,307 --> 00:44:52,587
-Well, anyway.
-I think, I think he's for himself.

888
00:44:52,587 --> 00:44:56,427
Yeah, I agree. I agree. No, totally,
totally. He'll do great. And I think Steve

889
00:44:56,427 --> 00:44:59,467
will do well too. I mean, I think people
knowing that he's available, I mean, heck,

890
00:44:59,467 --> 00:45:02,187
when I heard that he was available, I'm
like, "Oh, geez. I have a couple things I

891
00:45:02,187 --> 00:45:04,127
could have him do actually." Like,
actually-

892
00:45:04,127 --> 00:45:06,187
-I said how-
-... one specific thing that I thought of

893
00:45:06,187 --> 00:45:08,707
that I was like, "I would love for Steve
to do this," but I knew he wouldn't have

894
00:45:08,707 --> 00:45:09,387
-time.
-Yeah.

895
00:45:09,387 --> 00:45:12,967
-So maybe now he does.
-Maybe. Get into it. 'Cause I said, "How

896
00:45:12,967 --> 00:45:16,227
long before he'll... How, how long before
he lands on the Lara ship?" So...

897
00:45:16,227 --> 00:45:18,367
-[laughs] Right.
-Get him before it's too late.

898
00:45:18,367 --> 00:45:23,347
May- Who knows? Maybe that was, uh, maybe
that was part of his, his calculation.

899
00:45:23,347 --> 00:45:24,567
Maybe he was like, "You know what?

900
00:45:25,327 --> 00:45:27,367
I can have a job over here if I really
wanted one."

901
00:45:27,367 --> 00:45:28,967
-Mm-hmm.
-"So maybe I'll just do the job thing for a

902
00:45:28,967 --> 00:45:30,527
-bit." Who knows?
-Yeah.

903
00:45:30,527 --> 00:45:34,527
Not making any, uh, assumptions here. Hey,
folks, also if you have not bought your

904
00:45:34,527 --> 00:45:37,807
Laracon tickets yet, it's might be too
late. But if it's not, you should

905
00:45:37,807 --> 00:45:41,587
definitely go buy them because Michael and
I would love to see you there. We're

906
00:45:41,587 --> 00:45:45,167
gonna doing some interviews there. We're
gonna be enjoying the show, watching all

907
00:45:45,167 --> 00:45:49,567
the talks, and we would love for you to
say hi. So please stop by and say hey.

908
00:45:50,547 --> 00:45:56,967
Look for, uh, the really tall guy and look
for the handsome Australian with the, uh,

909
00:45:56,967 --> 00:46:02,327
other cursing Australian next to him.
That will be Aaron. Uh, OG, OG Aaron.

910
00:46:02,327 --> 00:46:03,627
-[laughs]
-OG Aaron.

911
00:46:03,627 --> 00:46:08,087
[laughs] OG Aaron making an appearance
again at Laracon US.

912
00:46:08,087 --> 00:46:09,687
-Yeah.
-He's gonna be a riot. I can't wait to see

913
00:46:09,687 --> 00:46:09,947
him.

914
00:46:10,607 --> 00:46:10,887
Fun.

915
00:46:11,607 --> 00:46:12,547
-It'll be good fun.
-Awesome.

916
00:46:13,307 --> 00:46:16,787
Episode 178, folks. Thanks for tuning in.
You can find us at North Meets

917
00:46:16,787 --> 00:46:21,187
South.audio/178. Hit us up on X or on
BlueSky at Jacob Bennett, at Michael

918
00:46:21,187 --> 00:46:25,547
Dorando, or at North South Audio. And, uh,
if you liked the show, rate it up in your

919
00:46:25,547 --> 00:46:28,587
podcast app of choice. Five stars would
be amazing. Thanks, folks. If you'd like

920
00:46:28,587 --> 00:46:29,607
to sponsor us,

921
00:46:30,467 --> 00:46:34,847
also talk to us on those channels. It
won't happen. But if you'd like to, we'd

922
00:46:34,847 --> 00:46:37,967
love for you to. But until next time,
we'll see you.

923
00:46:38,767 --> 00:46:39,067
Oh.