Latest / North Meets South Web Podcast / Flavours of busy, restrained features, and variable static views
Transcript
- 0:00Hi. I'm Michael Dyrynda.
- 0:01And I'm Jake Bennett.
- 0:03And welcome to episode 178 of the North Meets South Web Podcast. [rock music]
- 0:08Nailed it. Good job, dude. How's it going?
- 0:11Nice. Going well. Going, uh, yeah. Going well.
- 0:14-Busy- -Good
- 0:15-... but but well. How about you? -Great. Yeah. No. Same. Same. I [sighs]
- 0:20I've tried recently.
- 0:22I I catch myself saying the same answer that you just gave a lot, which is busy,
- 0:26-right? -Mm-hmm.
- 0:26And and i- it's true. Like, it's not a lie. I mean, we are. We are busy.
- 0:30-We're all busy. -But I realized after a while that I would
- 0:33ask people the same question, they would say the same thing. And it's like, you
- 0:36know what? We're all busy. All of us, we're all busy.
- 0:38-Yeah. -Like, so-
- 0:39All busy all the time.
- 0:40Yeah. I tried to stop saying that, but it doesn't work very well 'cause it's still
- 0:43typically my answer. "How are things going?"
- 0:45-Yeah. -"Oh, you know, bus- pretty busy. But busy
- 0:46work, but the good. Things are good. Things are good." You know, so whatever.
- 0:49-So- -I mean, I don't, I don't know how else to
- 0:50-answer the question because that's- -I know.
- 0:53-That's how I am. -There's so many things going on. It's like
- 0:54-I have to pick one thing to talk about. -Mm-hmm.
- 0:56Uh, it's like I I could talk about a lot of things, but there's a lot of things
- 0:59-going on, so I'm busy. -Yeah.
- 1:00-There's a lot, you know? -Yeah.
- 1:02-We all are. -Busy.
- 1:03-We all- -Busy, busy
- 1:04... are.
- 1:05You reach that certain stage in life where you, you think... Uh, I remember thinking
- 1:09when our kids were little, like, "Man, once my kids can feed themselves and tie
- 1:12their own shoes, then things will probably slow down." And it's like and then they
- 1:16get older, and it's like then it's friends-
- 1:18-Gets harder -... and sports.
- 1:19-Yeah. -And you're like, "Man, after basketball
- 1:20season is over, then then things are gonna slow down a little bit." And it doesn't.
- 1:24-It just keeps going faster- -Yeah
- 1:27-... and faster and faster and faster. -We're we're just moving into that phase
- 1:30-now with Eli playing sport and soccer. -Mm-hmm.
- 1:33-And now it's- -Mm-hmm
- 1:35Liv has decided that she doesn't always want to... I think more often than not,
- 1:39she doesn't want to go to the soccer games, which is fair enough-
- 1:41-Mm-hmm -... 'cause it's cold-
- 1:42-Yes -... and she's sitting around and she's
- 1:43-bored. And- -Sure. Yeah. Yeah
- 1:45... she's not really interested in it. So because she's not participating, she
- 1:47doesn't doesn't really wanna be involved. And so one week, I'll take Eli to soccer.
- 1:52-One week, Ria will take him. And so- -Oh, nice. There you go
- 1:55... it's back and forth, and then, like, figuring out who's going where. And and
- 1:58now that the kids are a little bit more independent and it's a bit easier to do
- 2:01things. Like, before, when we'd, like, bath the kids, we want all hands on deck
- 2:06'cause someone will be washing one, someone will be drying the other one,
- 2:09-getting them ready for bed- -Yep.
- 2:10-And all that kind of stuff. -Yep. [laughs]
- 2:12Now
- 2:12now both of them can basically wash themselves, except when it comes time to
- 2:16washing their hair. And Eli can dress himself, so it's like you... Uh, we just
- 2:20watch them get in and out to make sure that they don't-
- 2:23-Get in there -... slip on the bath.
- 2:24-Yep. Yep. -You know, so that makes it easier to,
- 2:27like, go out during the week so that, you know, Mum can put one of them to bed or I
- 2:32-can put one of them to bed, feed them- -Yeah
- 2:33... all that kind of stuff. And and it's not like this overwhelming chore of of
- 2:38having to do all of that stuff because they're quite independent
- 2:42already. Um, and so that that makes life a lot easier, so that we don't have to have
- 2:46two people here all the time. It makes it easier for for Rhea to go to the gym or
- 2:50for me to go out and and grab a bite or something like that, so-
- 2:53-Yeah. Yeah. Very true. -It's just a-
- 2:55-That is true. -But it's a different kind of busy, as you
- 2:57-say. -It is different.
- 2:57-You know? -Yeah. That's right.
- 2:58-It's just phases- -Yep
- 2:58... of busy. And then, you know, once they get to-
- 3:01-Exactly -... the age of your kids, at at the other
- 3:03end, it's, like, more professional sport kind of commitments. Not not professional,
- 3:07-but, like, higher level of of sport- -Yeah
- 3:09... commitments, where
- 3:11it's training multiple times a week. It's playing multiple times a week. It's all of
- 3:14-this kind of moving around- -Right. Right
- 3:16-... where we now- -They're trying to get better. Like, when
- 3:18they're younger, it's like they're just trying to play. They just, they're happy
- 3:21-to just play. -Yeah. Mm-hmm.
- 3:22And, like, at this level, they have to kinda decide if they wanna be... If this
- 3:26-is what they wanna do, if they don't. -Yeah.
- 3:27And if they do, it's like they've gotta commit to practicing outside of the
- 3:30-practices and games and stuff. -Yeah. That's right. Yeah.
- 3:32And so it's like if you actually wanna get playing time and be good, you gotta do
- 3:35stuff outside.
- 3:36-Mm-hmm. -So coordinating those times as well and
- 3:38-whatever. So... -Yeah.
- 3:39It's all lots of fun, man. It is all lots of fun.
- 3:43-It's good though. -But those, for like, for Graham right now,
- 3:44he's 14, so it feels like the clock is starting.
- 3:47-Mm-hmm. -The countdown is on. You know what I mean?
- 3:48-It's kinda- -The countdown to college because it's very
- 3:50-different for- -Give as much time as we can with him
- 3:52-... for you guys over there. Mm-hmm. -Yeah.
- 3:53-'Cause what's- -Yep.
- 3:54Over there, very, very common for, you know, um, kids to to pack up and go off to
- 4:00-college and not- -Yep. Yep
- 4:01-... not stay at home and- -Totally
- 4:03... and be away for for months at a time between breaks and things like that.
- 4:07Whereas here, they, they, generally, people will still go to university
- 4:12where they grew up.
- 4:14-Mm-hmm. -And and it's like you'll catch a bus to
- 4:16the city to, like, go, and then you'll come back home at the end of the day. So
- 4:19it's it's very different, you know, hearing those perspectives. I see Abigail,
- 4:24you know, tweeting about it, that they're they're running out of summers with the
- 4:27kids at home and the kids being around and all that kind of stuff. And it's just not
- 4:30something that really
- 4:31crosses our... my mind because
- 4:34short of going to the
- 4:37join the army, you know, like my my nephew did, you don't really... Like, most
- 4:41people kind of tend to stay where they are until they finish study. Not a lot of
- 4:44people will travel interstate for study. Um, I think that's fairly uncommon here.
- 4:49-Interesting. Yeah. -Yeah.
- 4:51-Yeah. That is a cultural thing. -Or is this, like-
- 4:52-I think- -... part of the course for you guys?
- 4:53I think... Very, very common. Yeah. Exactly.
- 4:56-Mm-hmm. -And a lot of kids see it as their first
- 4:57opportunity to sort of escape their hometown. You know what I mean? It's like
- 5:00-they wanna get outta here. -Mm-hmm.
- 5:01They wanna go experience the world, live somewhere different, live apart from their
- 5:05parents and family. Kinda have their their leap into adulthood, if you will. So-
- 5:09-Yeah -... which comes with the pros and cons,
- 5:10you know, because they're only 18, so they're still kids, man.
- 5:12-Yeah. -It's like-
- 5:13-Yeah. -... you can make really stupid decisions
- 5:14as 18-year-olds. You can make really stupid decisions as a 40-year-old too.
- 5:17-But- -Yeah
- 5:18... got a little bit more life experience behind you. So, anyway, yeah. It's, uh,
- 5:22it's fun, man. It's, it's been a good start to the summer, and
- 5:25things are going good.
- 5:27Um,
- 5:28last show, when we were talking, um, we came up with, like, a bunch of things that
- 5:35we wanted to talk about, and so I wrote them down. And we talked about how we
- 5:40wanted to sort of have a little bit more... What did you call it? Like, not
- 5:45-consistency, but, like- -Continuity.
- 5:47-Continuity. That's it. -Yeah.
- 5:49That's the word. Continuity between the shows. And so last time, we were talking
- 5:53about
- 5:55Wistia, talked about the new Wilber Jobs website and how-
- 5:57-Mm-hmm -... that w- that was pretty cool. Um, I've
- 6:00got a couple things we could talk about with that. Staggered CSS animations, live
- 6:04photos, we could talk about that. Or we could talk about where to store values for
- 6:09templates in static sites. That's an interesting one.
- 6:12-Mm-hmm. -Or defensive programming.... or time
- 6:16bombed feature flags. All right, which one sounds the most interesting to you?
- 6:20Hmm. Time bomb feature flags I've played with in the past, and they've bitten me-
- 6:24-Yes -... because they don't, they don't work-
- 6:26-Ooh -... quite as, quite the way that I thought
- 6:28they would.
- 6:30All right, let's dive in. Let's dive into time bomb feature flags. Okay.
- 6:33-Should I set the stage real quick? -Mm-hmm.
- 6:35You wanna tell me what Pennant is? Tell us, tell all the people what Pennant is.
- 6:38Pennant is a Laravel first party implementation for f- feature flagging,
- 6:44uh, in, in your Laravel apps, right? So Tim McDonald-
- 6:47-Yeah -... built, built that one out, hmm, not
- 6:49last year, the year before, I think. So it's a couple of, couple of years-
- 6:52-Yeah -... it's been around now. And, yeah, it's
- 6:54a, it's a first, first party, you know, it, it feels like a Laravel implementation
- 6:59of feature flags.
- 7:01Yeah, it's, um, it's a really good,
- 7:05um, it's a really good library, and it's very simple. Um, so it's,
- 7:10you know, it's basically the minimum amount of code that you would need in
- 7:14order to be able to run feature flags is kinda how I think of it. So
- 7:18it's really, um,
- 7:20wonderfully simple. Uh, the couple of things that we, the way that we use it is
- 7:26you have...
- 7:28You can either have a closure
- 7:30that helps to give it a name. You can name the feature and then have a function that
- 7:35accepts a scope and then resolves the truthiness of that feature.
- 7:41So
- 7:42you say, let's say, um, the feature is,
- 7:47I don't know,
- 7:49Ken Call Michael. It's Ken Call Michael. The, you know, one of our support people
- 7:53gets a emergency button on their dashboard, which if they need help, they
- 7:57can call Michael. And only certain people get access to this because, you know,
- 8:01there's people who have abused this in the past. And so we wanna start out with only
- 8:05giving it to managers, because managers are the ones who, uh, can escalate calls
- 8:08to Michael. So what we're gonna do is we're going to thi- name this feature Ken
- 8:12Call Michael, and, uh, the way that I'm going to do it is I'm going to implement
- 8:16it inside of a class called Ken Call Michael Feature. And, um, inside of that,
- 8:21I have a resolve function, or sorry, resolve method, which accepts a scope, and
- 8:26I think typically that's just a generic, it's mixed $scope. But you can specify
- 8:31things like user. So I know that I'm passing a user into that scope, and it
- 8:35will fail if I pass anything else. So I'll pass a user in as that scope, and then I
- 8:40can say user hasRole manager, something like that. And I return that, return the
- 8:46truthiness of that statement. So if that statement returns as true, when that
- 8:50person visits the page that, uh, checks that feature, right, where that feature is
- 8:56actually on the page, it will grab that class. It will resolve that feature,
- 9:01resolve that method, and then it will return a truthy or falsey, um, value. And
- 9:06then that will get stored. Depending on what driver you're using for Pennant,
- 9:09it'll either get stored in the database, or it'll get stored, you know, in Redis or
- 9:13other places, wherever you might have it.
- 9:15-Mm-hmm. -And then at that point, it is resolved. It
- 9:16is not stored. It will not ever resolve again unless you delete or, or, uh, purge
- 9:21that feature for that person, which is great.
- 9:24So that's the idea, right? I can turn features on or off. I can also launch it
- 9:28as, like, nobody gets it. I can just, from that resolve function, return false. And
- 9:32then I can go into the database, and I can say only I get it, right? Or I can
- 9:36release it to a beta group of users. So I can test it in production without having
- 9:40any fear of breakages occurring because nobody can see it except for me. So if it
- 9:45breaks, it's only gonna break for me, or it's gonna break for a very small group of
- 9:47users. So really, really nice. Now,
- 9:50after having explained that, Michael, I want to hear your idea or explanation of
- 9:56time bombs,
- 9:57why you might use them, and how you implemented them and how they bit you.
- 10:01Mm-hmm.
- 10:02Yeah. Well, I think it's, it's the, the fact that they are resolved once and
- 10:07persisted that has bitten me because-
- 10:10-Mm-hmm -... the, the time bomb nature is that I
- 10:13would expect that a feature flag applies or doesn't apply depending on how you've
- 10:18got your code wrapped by that feature flag at some point in the future.
- 10:23-Mm-hmm. -So the way that I wanted to use them,
- 10:26rightly or wrongly, last year when, when I looked at it, was to time bomb the
- 10:30-display of speakers for Laricon AU. -Hmm.
- 10:33So, like, on some day in the future, we want this speaker to appear on the
- 10:36-website. -Yeah, yeah.
- 10:37So I don't have to remember to do it. So I don't have to be at the computer to, you
- 10:41know, tick a box or whatever. So I thought, yes, I will, I will time bomb
- 10:44that feature flag,
- 10:46uh, so that that speaker appears at some point in the future.
- 10:50Now, the problem with that was, because that was resolved once, when it resolved
- 10:54-the first time that it was loaded- -Mm-hmm.
- 10:57-It was false -... it was like... It was false. So it
- 10:59went into the database, and that was it. It was just false forever. So I would have
- 11:03to then go in, [laughs] on that time, on that day, to then remove that flag, which-
- 11:10Yeah
- 11:10-... kind of defeated the purpose of it. -Defeats the purpose.
- 11:12-So that's- -Totally.
- 11:13That's where, that's where I got bitten by them. Other than that-
- 11:16-So- -... I think they work fantastic.
- 11:18Okay. So, so
- 11:20it's probably helpful to talk about definitions of what a time bomb is. So
- 11:26what you've explained there is not necessarily a time bomb. A time bomb, as
- 11:32Martin Fowler describes it when he's talking about features and toggling, is a
- 11:36way for you to make sure that feature flags don't stick around for forever,
- 11:42-right? -Mm-hmm.
- 11:43So you could think of a time bomb more as an expiration date than a... Only to show
- 11:50-it at this time. Now- -Mm-hmm
- 11:51... I think it's worth discussing how we would actually approach your particular
- 11:56-problem that you're talking about. -Mm-hmm.
- 11:58And
- 12:00maybe,
- 12:02I don't know. I- I'm actually not sure how I would solve that with Pennant. I think
- 12:05I would honestly, in that instance, I would literally just put a
- 12:09timestamp check or something [laughs] like that.
- 12:11-Yeah. All right. -I would wrap it with a conditional if that
- 12:13-says- -Yeah
- 12:14... if, if, uh, now is passed and then pass in the date-
- 12:19-Mm-hmm. Yeah -... and then I would... Then that's how I
- 12:20-would do that probably. -... yeah, this year. This year, we put all
- 12:23of the, the speakers into the database, so now we just have a, like, publish date
- 12:26-is in the past. -Ah, so- oh, perfect
- 12:28-That works fine this time -... there you go.
- 12:29Yeah. Which is the sensible way of doing it, but last year, we kind of... The, it
- 12:33was all static HTML really, so we, we put all the spon- uh, the, all the speakers on
- 12:37-the page that way. And so we're- -Yeah
- 12:40... just expecting, like, for each one to then,
- 12:43t-to, to appear effectively when, when the time is in the past, but didn't work out
- 12:47that way. Uh, but this year, yeah. It's just a, just a field on the database
- 12:51that's an announced at or something like that, and we just return all of the
- 12:54speakers where announced at is less than or equal to now, which is much-
- 12:58-That makes sense -... easier way of doing it.
- 13:00-Great way to do that -Don't use feature flags for that. Yeah,
- 13:01-no. -Absolutely. Great way to do that. So,
- 13:04so if we're approaching this idea of time bombs as this, as more of, like, an
- 13:08expiration date, um, I, I would love to talk about that just for a little bit.
- 13:12And, and essentially, I'll give you the scenario that
- 13:15we faced that had me looking back into this, which was we had a feature flag that
- 13:20was,
- 13:22you know, gate, gating a feature that we had written
- 13:26and I pushed it out on a Friday
- 13:29-and promptly forgot. -It's time to push down
- 13:31-About that feature. -Yeah. Just want to push down
- 13:32Totally forgot about it. It didn't matter. It was like, "Okay, hey, whatever." So,
- 13:37uh, I enabled it for a couple users and
- 13:40the users of us who had it just
- 13:43looked at it and figured, "Well, everybody must have this," right? We totally forgot
- 13:46-that we did not release it for everyone. -Yeah.
- 13:49And so six months later, somebody's like, "Yeah, I don't know how to see, like, if
- 13:54this file is timed up or not." Like, well, just use the, you know, just use the
- 13:58-timed up, you know, thing at the top. -Yeah.
- 14:00They're like, "I've never seen that." And they're like, "Well, like, certainly.
- 14:04Like, it's right up here. Here's where you should see it." Go into the features
- 14:07table. Yup, not enabled for anybody except for us. Like, ah, crap. And so what
- 14:13happened is
- 14:15we had this feature flag that was not supposed to be around forever. It was only
- 14:18supposed to be for this beta testing sort of idea. And once it was good, then we
- 14:23needed to remove it. So the question is, how do you inform yourself when
- 14:29you should, you know, how do you basically put an expiration date and say, "Hey, by
- 14:33the time a month has passed, we should have figured out if we want this feature
- 14:38-or not for everybody." -Mm-hmm.
- 14:39It should be general release to everybody, or it shouldn't be.
- 14:43-Yeah. -And, you know, we kinda need to pull the
- 14:45trigger on one way or the other.
- 14:46So I asked Tim McDonald. I was like, "How would you do this?" We had a couple ideas
- 14:50for how we would do it, but the way that he did it was very, uh, clever. And so I
- 14:55wanted to share the idea that he had, which is,
- 14:59uh, to put on each one of your feature classes, which again, is the way that I
- 15:04really prefer to do it, is to use a class-based resolution because you get all
- 15:07the other things you can do, this behavior, these traits that you can put on
- 15:10it and whatnot. But you make a trait called is, like, concerned with
- 15:14expiration, you know, maybe something like that. And inside of there, um, you have a
- 15:19contract essen- or sorry, maybe it's a contract, not a trait. But it's, uh, a
- 15:23contract that specifies that you need to have a
- 15:25is expired
- 15:27method that returns a Boolean.
- 15:29And then what you can do is, uh, in that is expired, you can do a date. You could
- 15:34say now is past a particular time, or you can do other things, right? You can,
- 15:39there's other things you could do. It doesn't have to just be a date, but you
- 15:41just return a Boolean from there.
- 15:43And then what you can do
- 15:45is
- 15:46you can, in your service provider, you can say there's an event that says feature
- 15:52resolved, I think is what it is. So what this does is any time that a feature gets
- 15:56resolved, even if it's out of the database, if it's grabbing it,
- 16:00it will look and say,
- 16:02um, is this an instance of,
- 16:05you know, or does this extend the contract or implement the contract of, uh,
- 16:10you know, can expire or something, whatever. Like, what, you know, I'm using
- 16:13bad names here, but that's the idea, right?
- 16:15-Sure. Yeah, yeah, yeah. -And if it is, if it does extend that
- 16:18contract or implement that contract, then what you do is you check to see is it
- 16:22-expired. -Yeah.
- 16:23And if it is expired, then you can do a couple things. So, um,
- 16:28you know, you could log, warn yourself, something like that. Um, but the thing
- 16:32that Tim did, which I thought was really cool, is there's this way that you can
- 16:35check to see if you're running tests currently. Have you ever seen this before?
- 16:42-So it's like- -The other container that's, like, is
- 16:43-running- -Yeah
- 16:44... running unit tests or something like that.
- 16:46Yeah. If app dot op running unit tests. So you can do this conditional. You should
- 16:52say, "If we're running tests
- 16:54and it's expired,
- 16:56then we want to throw a runtime exception that says feature has expired." So what
- 17:02that does then is if you're ever running a test that encounters this feature, and
- 17:08the feature is expired, it's going to force you to make a decision one way or
- 17:12-the other. -Yeah.
- 17:12-You either need to extend- -Extend it
- 17:14... the amount of time that you have until it expires.
- 17:16-Or remove it. Mm-hmm. -Or get rid of it. And I love that because
- 17:19it does... It's not destructive. It doesn't ever mess you up in production.
- 17:23Uh, you can have it log if it's in production if you want.
- 17:26-Mm-hmm. -Instead of throwing that runtime
- 17:27exception. Um, but it's a great way to ensure that any of your features that
- 17:33you're putting in place have a reasonable expira- uh, expiration timestamp on them
- 17:38and that you're forced to deal with them at some point in the future.
- 17:41-Um, so I thought that was pretty cool. -I like that.
- 17:44-Yeah. -That is a very Tim thing to do. [laughs]
- 17:47Mm-hmm.
- 17:48To put a thing in there. I've,
- 17:50-I've- -So he wa- so he did... So here's the deal.
- 17:52He hasn't actually, like, this is not...
- 17:55This does not exist. You have to just add it on yourself.
- 17:58-Yeah. -Right?
- 17:59-Yeah, exactly. Yeah. -That's why I was like, "It would be cool
- 18:01if it was first party." He's like, "I mean,
- 18:04I didn't feel like there was a good..." He said, "I didn't feel like there was a
- 18:06good generic option to put on top of it." So-
- 18:09-Yeah -... I built the tools. A lot of the users
- 18:10to decide how they wanna handle it, but it's not, it's not difficult to implement
- 18:14-it. -Yeah.
- 18:14-Right? You could see how you would do so. -Yeah. It demonstrates a lot of restraint
- 18:18on, on his part and on, I suppose, on Laravel's part in general about where you
- 18:22draw the line in the sand for, for what you do offer as part of the library and
- 18:27for what you say, "The tools are there. Go and implement it."And, and I think this
- 18:31is, this is a fairly good
- 18:34case, use case of the tools that go and implement it yourself. I've, I've gone
- 18:39back and forth over the years about whether or not
- 18:44using those kind of conditionals in application code is a good idea or a bad
- 18:49-idea, you know? -Mm-hmm.
- 18:50Doing an, like an environment check or doing a, are we running unit tests? Or, or
- 18:54that kinda stuff to then trigger things because you're, you're putting
- 18:59test logic inside of your application code to do this kind of stuff.
- 19:05Erm,
- 19:06I think it's fine, in general. I don't, I don't really see any reason to do that. I
- 19:10know that in parallel testing and things like that, we will have all kinds of
- 19:14conditionals that check, like, if the parallel testing token is set, then we
- 19:17need to go and do this stuff. And then somewhere else we go, "Okay, don't do this
- 19:21stuff because we are parallel testing," and, and things like that. So
- 19:25there's definitely cases, I think, where
- 19:28doing that kind of runtime, testing time logic is good. I think
- 19:34forcing you to, you know, blow up your... [sighs] It depends on how strict you are
- 19:39on your continuous integration. Like, if you're running this in CI and it fails
- 19:44because somewhere between where you pushed a pull request
- 19:47-into GitHub and some- -Mm-hmm.
- 19:49And, and when the CI ran, your, your test suite is now failing
- 19:55because of this expired token or this expired check,
- 19:59but it's unrelated to the pull request
- 20:02that, that was pushed up. So I think
- 20:04that's, like,
- 20:06that's the one thing that, that sticks to me. It's like, okay, yes, we need to do
- 20:09something about it. It is now impacting on this unrelated thing,
- 20:14and it's, you know, a team decision. What do you do with that? Is someone now tasked
- 20:17with going immediately and, and updating that? Do we... You know, it, it may not be
- 20:21a decision that gets resolved straight away, depending on the size of the
- 20:25organization. It, it might be, like, you as a developer or as a founder, you can go
- 20:29like, "Yeah, I'll just kick that can down the road a week," or, "I'll go and remove
- 20:33all of those feature flags, and this is now just a feature that's part of the
- 20:36platform." So yes, it does prompt you to do that, but sometimes that decision
- 20:40-involves committees. It involves- -Yeah
- 20:42... product teams, product managers, things like that. You've gotta go ask.
- 20:45You've gotta go wait. They don't have an answer. They've gotta go chase it up with
- 20:47-someone else. -So now you have a blocked PR, yeah.
- 20:50And meanwhile you've got a blocked PR and a failing test suite, and all of that
- 20:52-kinda stuff. So, you know- -In fact, every PR is blocked, right? If
- 20:57you had multiple PRs out there, all of them are blocked.
- 20:59-Mm-hmm. Yeah. -And every single person is trying to
- 21:01scramble to figure out what do we need to do with this.
- 21:03Yeah, yeah. And everyone's going, "Oh, this is failing. Retry fail tests." Like,
- 21:06'cause they're like, "Oh, this wasn't supposed to fail," you know? Es-
- 21:09especially, like, we get into situations at work where the, the test suite will
- 21:13just be flaky.
- 21:14Erm,
- 21:16and it's just over time, the, the construct of, of the application has
- 21:20changed where, you know, you've got factories that, that are resolved in a
- 21:23certain way. Which is okay when you've got 100 tests, but when you've got 500 tests
- 21:26or 1,000 tests, those factories can, like, step on each other. You might not have
- 21:31something that's unique, so
- 21:33over
- 21:34enough iterations, you end up with collisions and things because you don't
- 21:38have the, like, fake, faker Unique applied in there. So there's, like, all these
- 21:43different
- 21:44cascading
- 21:46arbitrary failures that you might not even look at it for a couple of days-
- 21:49-Yep -... until someone goes, "Hey, this is,
- 21:50this is failing." So
- 21:52I like the idea in
- 21:54theory.
- 21:55-Mm-hmm. -I think
- 21:57whether or not it works depends on
- 22:00the kind of company that you're in and how quickly they respond to that. Like, if
- 22:04you,
- 22:05and, like, whether you put that in there at all,
- 22:08uh, really comes down to how quickly someone is going to respond
- 22:12when... It may be a case that you log,
- 22:15you know, for two weeks or something before the failure,
- 22:18erm, even if you are running in test so that something bubbles up somewhere that
- 22:22hopefully someone would see.
- 22:24Erm,
- 22:26but yeah.
- 22:27-That's a l- -Yeah, you're, you're-
- 22:27... long-winded way of saying that, like, I think in general, I agree with the idea.
- 22:31I like, I like the idea of putting something [laughs] that explodes in, in
- 22:34test. Because that's something that
- 22:36at some point in your release cycle, whether it's during development locally or
- 22:40as part of CI or deployments, like, something will blow up because of that.
- 22:44-Yeah. -Erm, and, and what you have in place to
- 22:47work around it. You know, okay, we can just merge this PR anyway knowing that
- 22:50this is,
- 22:52erm,
- 22:52-unrelated to that pull request. -Yeah.
- 22:55If you do, if you do automated deploys, it's a bit trickier. Erm,
- 22:59it depends on, like, if you do... I know with, erm, Laravel's testing stuff, you
- 23:04-can --fail on your test. -Mm-hmm, mm-hmm.
- 23:07And, like, it will f- after the first fail- like, if that's the first failure
- 23:10and it doesn't get to something else-
- 23:12-There's just stuff there. -Yeah. Yeah, okay, so this is unrelated to,
- 23:15to my failure. I'm gonna, you know, ship this anyway. Oh, whoops. There was a, some
- 23:19error further down in the test suite that didn't get picked up 'cause we bailed out
- 23:22on this thing. So...
- 23:24-Yeah. -You know?
- 23:25-I'll say that the- -Rest reward, I guess.
- 23:27Yeah. The,
- 23:28the concerns that you bring up are the s- very same concerns that Andy Hinkle had
- 23:33when we were going to implement this. He was like, "I don't like the fact that
- 23:36other developers are gonna have to deal with a feature flag before they can merge
- 23:40their stuff." So we came up with some ideas and some solutions. The one thing I
- 23:43will say too, though, is that this, I feel like, follows the convention that has
- 23:47been brought about in many
- 23:50different... You know, like we talked about Nuno's, um, thing where it's, like,
- 23:54just here's the best practices applied to the app service provider.
- 23:58-Mm-hmm. -Where it's like, disallow n+1 queries or
- 24:00disallow lazy loading or, you know, those assignment overflow things or whatever.
- 24:04Like, those, those sorts of things that only fail if you're in local, if you're in
- 24:09your local environment. You know what I'm talking about?
- 24:11-Yeah. Yeah, yeah. -So, like, it'll check those things. It's
- 24:13not gonna blow up in production. It's not gonna blow up in your face. If you happen
- 24:15to ship it to production, it's gonna be like, "Eh, okay. Just let it go." But if
- 24:20you're in local dev or in testing, it's gonna blow up in your face and say like,
- 24:23"Yeah, you can't do that." You, you can't-
- 24:25-Mm-hmm -... you know, do that lazy load stuff. So
- 24:27this sort of falls in line with that to me. Um...However, it's not a
- 24:34yes or a no, or an always or a never. It's, it's only based on some time-based
- 24:39thing a lot of times, which is... So it's not a right or wrong. It's just like if
- 24:42you happen to be the guy who runs it just before it expires, or right after it
- 24:45expires, then you're screwed. You're the one who has to deal with it. So
- 24:49okay, so how do we address this? Well,
- 24:51two couple... Two, two different ways I think we could deal with it. Um, one is
- 24:56that you could, if you're running,
- 25:00uh, your CI on a regular enough basis, you could start dropping warnings a month in
- 25:05advance of the expiration, right? So you could say, "If it expires in the next 30
- 25:10days, throw a warning on the tests. If it expires in the next..." You know, if it's,
- 25:16if it's in the past, then go ahead and throw a failure. You know, something like
- 25:20that. So that would allow you to be notified of it ahead of it actually
- 25:24expiring, so that you could fix it. Um, and like, you know, you see it, it's, it's
- 25:29erroring, or not erroring but it's throwing a warning, and you're like, "Oh,
- 25:31okay. I should probably make an issue for that so somebody can fix that or make a
- 25:34decision." We have 30 days to do so. The other thing that we talked about is making
- 25:40a command that runs once a day at like 6:00 AM, something like that, that runs
- 25:44through the features, checks if any of them are expired and if they are, sends
- 25:48off an email or sends it or creates an issue, or whatever you might have that
- 25:52says, "Hey by the way, these features are expiring within the next 30 days or the
- 25:56next 7 days," or whatever. Uh, or they are expired and these need to be addressed,
- 26:00and that's it. You know, so there was... That was, there was a couple options
- 26:04there. You could say it doesn't ever fail tests, it just sends out a warning to let
- 26:09somebody know that this needs to be addressed. Um, so there's a couple
- 26:12different ways you could do that there that I could see being effective that
- 26:15would not necessarily block the team, but could inform a project manager that these
- 26:19are something that we need to prioritize within the next cycle.
- 26:22Kind of, you know, deprecation warnings I guess for features.
- 26:24Yes, exactly that.
- 26:26-Mm-hmm. -Yes, correct. Yep, yep.
- 26:28Yeah, and I think realistically that's the only way to, to deal with it. And if, if
- 26:33no one's gonna pick up the deprecation warnings
- 26:36for the feature flags like that
- 26:38on a, you know, across a team, across an organization, you know, if you're
- 26:42involving all these different p-
- 26:44all these different people, then
- 26:46probably have bigger concerns to, to worry about. You know, at least sending that
- 26:51email or that notification in Dislike or whatever else
- 26:54that happens to be from that scheduled job, scheduled task, is...
- 26:59You know, you've got to address it in some way. Um, and if it goes to enough people,
- 27:04someone... Well actually, if it goes to too many people everyone's gonna be like,
- 27:07"I thought someone else was gonna deal with it," and then you've got to be
- 27:09-careful there as well. -Yeah.
- 27:10So
- 27:11yeah, keep the, keep the list small but make sure it gets actioned, I guess is the
- 27:14-main thing. -Exactly.
- 27:15But again, comes down to the team and, like, someone actually taking ownership o-
- 27:19over that. So
- 27:20-yeah. -Yep.
- 27:22-Good, uh- -Yep, you got it.
- 27:22Good, good problem. Um, I think good, good solution to that problem as well.
- 27:29Awesome. Yeah, thanks. I, it was, it was a fun one to kind of run down and it was...
- 27:33Uh, yeah. A couple different approaches there, a couple different concerns, but I
- 27:36was happy with where we landed on it, so yeah. Stoked about that.
- 27:39-Mm-hmm. -Okay. Since you talked about your, um,
- 27:43your speakers on Laracon, um, I think this is a good transition into this other part
- 27:49which is this,
- 27:51where do you store values
- 27:54for
- 27:55templates in a static
- 27:58view? Okay, so let me pitch it to you this way. Let's say you didn't have a database
- 28:03for those team members, or not another team members, for those speakers, right?
- 28:09Um, because locally you are going to do it and you don't want to have to like... How
- 28:14do you, how do you populate your database locally and then push that up to
- 28:19production without having to have access to the production database? You can't
- 28:22really do that. It's like I know what the values need to be, they're not necessarily
- 28:26dynamic, it's just I- I don't... Where do I store them, right? Do I... What are my
- 28:31options? If I, if I can't put them in a database, where are the other places that
- 28:35I could put them? So I actually came up with one just as we were talking here, but
- 28:38there was a couple options here that, that were thought about, right?
- 28:43One is you could literally just dre- like
- 28:46create a component and then in Blade, just
- 28:49you don't even bother doing a loop. You just put in the values.
- 28:52-Yeah. -Right? That's it. Create a component, put
- 28:54the values in, that is your database essentially, right? You just-
- 28:58-Mm-hmm -... write them all out in the blade, and
- 29:00that works. That's fine. Like you just basically, your component is going to have
- 29:06locations or values, like the values that you would normally store in the database
- 29:10are gonna be essentially like arguments to that component, right? So like name,
- 29:15image source, um,
- 29:19title, announcement date, right, all those things.
- 29:22Right? Those are gonna be, those are gonna be stored like in the Blade file.
- 29:25-Yeah. -That's one way to put it.
- 29:26-Yeah. -That's one spot to put it.
- 29:28-Yeah. -Um, can you think of any other spots you
- 29:29might, you might put these things?
- 29:32I can because this is what we did last year was-
- 29:35Ooh, okay. I wanna hear, I wanna hear. I want wrong answers only.
- 29:38-We, uh- -Wrong answers only.
- 29:38-Wrong answers only [laughs]. Yeah. -Yes. What were the other places you could
- 29:41-put it? -We created, we created a YAML file that we
- 29:43-hosted in GitHub that you had to- -Okay
- 29:45... in a JS, it was a secret JS... No [laughs], I'm joking.
- 29:48-I was gonna say, oh dang. Okay. -You said wrong answers only.
- 29:51-That's crazy [laughs]. -You said wrong answers only.
- 29:53I- I, at first I thought you were being serious. I was like wait a second, do you
- 29:55really? Okay. All right, all right. A YAML file in-
- 29:58-No, we- -... a JS that you were pulling in R.
- 29:59-In a JS. -Fair enough.
- 30:00-That's right, yeah. -Yeah.
- 30:00-So if anyone wants to go and- -And then you used Sushi.
- 30:02... uh, and scan. Sushi. Yeah, to use as an-
- 30:03Used, uh, Caleb Porzio's Sushi package, yeah.
- 30:05... eloquent database. That's right. Uh, no we just, I just put all that stuff
- 30:09-inside of like a config Laracon.php. -Okay.
- 30:12And it was just an array of speakers which was keyed by...
- 30:17Actually, I don't think it was keyed. I think it was just an, an array that we
- 30:19then pulled out and we, you know, we collected it. We put it in a collection.
- 30:23We sorted it by announced. We filtered ones that were not, you know, didn't have
- 30:27an announced in the, in the past and that was it. That's, that's how we did it.
- 30:32-Yeah. -Um, and then I think w- we just used, you
- 30:35know, Cloudflare to cache that so we didn't... Well, you know, obviously the
- 30:37page gets cached so it doesn't have to hit the origin server to, to resolve that in
- 30:41the future. So yeah, that was, that was it really.
- 30:44Yeah. Uh, that works pretty good. So, like, you could put it in the config. You
- 30:48also, if you're being a little bit crazy, you could just chuck it into the
- 30:50-controller. Like, if you wanted to- -Mm-hmm. Yeah
- 30:52... just inline an array in the controller, you-
- 30:53-Yeah. Sure -... could kinda put it in there. Uh,
- 30:55that's one way to do it as well. Um, so, uh, my,
- 30:59my junior-ish developer, he's actually... He's Landon. Landon is his name. Um, he
- 31:05played basketball a little bit last year at Laracon with me right afterwards. There
- 31:08was a couple dudes that we all played. Me, David, Hemphill, Landon, and then
- 31:12three other dudes that absolutely smoked us. It was really fun, but kinda crazy.
- 31:15-[laughs] -Landon's a great basketball player, junior
- 31:18developer though, and he's, he's figuring stuff out. And so for him, he ini- or
- 31:22initially just put it, like, in the controller. Like, he actually had
- 31:26a method for each. Like, so we had, like, four locations that we were trying to,
- 31:30like, you know, deal with. And so what he did is he put,
- 31:35uh, a method in, in the controller.
- 31:39So you would have, like, a, a value being passed into the controller, um,
- 31:43like, uh, you know, in the, like, the array that gets passed in to the, to the
- 31:47-view. I'm sorry, to the view. -Yep. Mm-hmm.
- 31:49And he would say, like, "Location one, Fat Arrow,
- 31:53this.get('location1')." And then say, "Location two-"
- 31:56-Yep. -"... this.FatArrow.get('location2')." So
- 31:58he was just calling private methods inside the controller that were sort of then
- 32:01-returning these arrays. And I was like- -Yep
- 32:03..." Hmm,
- 32:04that is fin-" Like, it works. It's probably not how I would do it, but it
- 32:08-works. And so I- -Yeah
- 32:09... was like, "I'm wondering..." You know, config file is the first thing that came
- 32:13to mind. But for some reason, I remember when looking at it, there were some
- 32:15reasons why it wouldn't have really worked in a config file. And I think partly
- 32:19because he was doing some PHP stuff inside of that config file, and, like, it
- 32:24would've been weird to do it there. Um,
- 32:27but
- 32:28the other thing that I'm wondering here is this. If you didn't want to store it in a
- 32:31config, what if you just put it in a SQLite database and then shipped the
- 32:34-database up? -Yeah. Yeah,
- 32:36-totally. -If you put that in somewhere? Like, could
- 32:38you... Where would you put that, though? Would you... You'd put it in the storage
- 32:41file or something? I don't know how that typically works. If you put it in the
- 32:44storage, you have to, like, symlink it or something weird like that if you're using
- 32:47-Envoyer. -Yeah. I would just, just put it in the
- 32:48database, 'cause that's, that's where the SQL files go by default.
- 32:53-If- -Okay
- 32:53... you know, if you, if you, if you do a Laravel new and you say you wanna use
- 32:56SQLite, it will create a database/database.sqlite file inside of
- 33:01storage. Uh, inside of the database folder, and then you just commit that to
- 33:04-version control and off you go. -Yeah, 'cause I'm... As, I'm sure initially
- 33:07it's probably.gitignored maybe?
- 33:09Hmm, not a... Oh, yeah, maybe database.sqlite specifically, but you
- 33:13-could just remove it from there, like- -Totally. You could.
- 33:14Just because Laravel puts it there by default doesn't mean you can't change it.
- 33:17-Um- -Absolutely.
- 33:18Yeah. Yeah, shipping, shipping sqlite is fine. Um, who, who was it? Like, was it
- 33:23Aaron Francis was talking about that for,
- 33:26for, um...
- 33:28I think for his aaronfrancis.com. He's, he ships an sqlite file or something like
- 33:31-that, so. -It seems like the right place to do it,
- 33:33-right? I mean, like- -[laughs]
- 33:34... you literally have, you have the structure in there. You can pull it using
- 33:37-your, uh, you know, using models and- -Mm-hmm
- 33:41-... all that good stuff. -And, you know-
- 33:42So it's like, I don't really see a reason why you wouldn't or why you couldn't.
- 33:44SQLite is, is made to be small and portable like that.
- 33:47-Every, you know- -Mm-hmm
- 33:48-... the, these things, every- -I mean, the problem is it can fill up
- 33:51-... everyone's iPhones- -It's just a flat file, yeah.
- 33:52Everyone's Android file. Yeah, it's just, just shove it all in there. Yeah.
- 33:55-Yeah. -Um-
- 33:56-Yeah, so I think- -I mean, the other thing you could probably
- 33:57-do is like a- -... that's, that's an interesting third
- 33:58-option. Yeah -... a document store. You know, something
- 34:00that writes JSON to a file, and
- 34:03-do that, I guess, with, like- -Yeah, but the SQLite thing seems way
- 34:05better to me. Yeah, as long as you have... I mean, as long as you can set up... You
- 34:08know, you just have to make sure that every person, each person that's looking
- 34:11at it,
- 34:12uh, when they're trying to develop stuff, uh, that they map... Uh, you know, they
- 34:16can open TablePlus to that sqlite file or whatever, right? So-
- 34:19Yeah. Yep.
- 34:21Yeah, that seems like a good way to do it though. Seems like a pretty good way to do
- 34:24it. Um, portable, light. It's still a mi- it's still a, uh, you know, queryable
- 34:29-entity. Um, you don't have to write- -You could be-
- 34:32You don't have to write, like, factories or anything for it. You could just... You
- 34:34know, you just ship it. You ship the actual data up.
- 34:37-Yeah. -Yeah.
- 34:38You could open up TablePlus and use that as your, you know-
- 34:41-Totally -... as your admin interface-
- 34:42-Yeah -... to put stuff in there.The only-
- 34:44-Absolutely, and you've got- -... the only other thing that, th-
- 34:45... version control on and everything, you know?
- 34:47Yeah, yeah. I mean, the only other thing that you might do that's probably a little
- 34:50bit more approachable in terms of version control is just a, like, a CSV file,
- 34:55-and then use- -Yeah
- 34:56... Switchy to, to, to manage that.
- 34:59-Yeah. But I like the- -Because then-
- 35:00-... SQLite. I like the SQLite option. -Yeah. The ISQL-
- 35:02-And I, I'm not pushing that direction -... is definitely nicer from a, from a dev
- 35:04perspective. If, if you needed, like, someone else,
- 35:08you know, someone from product or someone from sales or marketing, whatever, to be
- 35:11putting data in their CSV would be fine. And just like, "Here's the updated file."
- 35:16Yeah.
- 35:17-Yeah. -"Drop it in, overwrite, replace it." You
- 35:19-know? -Yeah, it's only developers working on this
- 35:21one, so I think SQLite's gonna be the solution there. And I think that's, um,
- 35:24that's a really great way to do that. So, uh, we're gonna move towards that,
- 35:28actually. That's w- exactly what we're gonna do. We're gonna end up doing that
- 35:31precisely.
- 35:32Love it.
- 35:34Love it. Awesome.
- 35:37Okay, um, what else we have here?
- 35:41Live photos, staggered CSS animation, defensive programming.
- 35:47What do you think? Hmm.
- 35:50So, uh, Matias...
- 35:53I can't say his last name. Starts with a G. Guimaraes, I think. Uh, he's got a
- 35:57defensive Laravel
- 35:59course coming to Laracasts at some point, so it should be cool.
- 36:02I saw Jeffrey tweeted about that, like, today, I think. Yeah.
- 36:04Yeah. Yeah, he, um... De- definitely check that out if you're a Laracasts
- 36:07subscriber. I, uh, I watched his...
- 36:10-It was Event Sourcing Tour- uh, series- -Mm, yes
- 36:14... that he had on Screencast. That was, that was really good. He did a, a good job
- 36:16of that, so I'm, uh, I'm keen to see
- 36:19his, um,
- 36:22his defensive Laravel stuff. Because he, he works at, like, a payment provider or
- 36:25-something over, over there- -Oh, interesting
- 36:27... where he lives in,
- 36:29pretty sure, Brazil.
- 36:31-One of the- -Okay
- 36:31... Portuguese slash and/or Spanish-speaking nations. Sorry, Matias.
- 36:36-But, uh, yeah, he, um- -That's right, that's Portuguese, right?
- 36:38-Yeah. I- -Yeah, he's a-
- 36:39Did I tell you about that, right? When I said-
- 36:41-Yeah, yeah -... when I thought
- 36:42But I couldn't remember if he was from Spain or from Brazil. But I know in
- 36:45-Brazil- -Oh, gotcha
- 36:45-... they speak Portuguese. Yeah. So- -Yes, indeed.
- 36:47Um,
- 36:49yeah, he...So, he does some very intense things, uh, in terms of, like, the
- 36:55extremes of what you can do with Laravel, so I can't... You know, he'd be a, he'd be
- 36:59a... You'd be hard-pressed to find a better teacher for that kind of Laravel at
- 37:04scale type of thing. So, yeah, keen to check-
- 37:07-Yeah -... that one out when it drops.
- 37:08That'll be really good. I'm sure he'll have some excellent sort of tips on using
- 37:13Laravel tools in order to be sure that you can catch things if they happen terribly,
- 37:19if they happen to go terribly wrong.
- 37:21We had something today where,
- 37:25um,
- 37:27it was, it was the sequence in which something was working, so we were reading
- 37:31an email from an email inbox,
- 37:34we were creating a record for it, and on that database we had a unique column for
- 37:40the ID of that item from that inbox. So that item from that inbox was given a
- 37:45unique, like, Outlook message ID.
- 37:47And so it's, you know, it's a GUID. And so it's, it's unique. You cannot create
- 37:51another one with that same GUID.
- 37:53However, the step after we created it was to move it from that location, that
- 37:58folder, to another location.
- 38:00If that failed,
- 38:02right? So you'd move it from the inbox to a folder called Processing or something
- 38:06like that, right? So we create the record, and then we start to process that email.
- 38:09We read the body. We read the subject. We do some, you know,
- 38:12guessing as to where we think it needs to go and basically have our own really
- 38:16intelligent rule system that we can build up off of that database record, right? So
- 38:21you create the record, and then you send it to processing. Well, if that sending to
- 38:25processing fails for some reason, which sometimes is this weird race, race
- 38:29condition, if it fails, then the email doesn't move, and when the inbox gets
- 38:35scanned in the next minute, it tries to pick that up again and create the record.
- 38:38Well, since you have a unique ID, it fails. So
- 38:42yeah. It, it's like just using simple things like a database transaction around
- 38:47those two pieces, right? Create it, and then move it. And if it fails while
- 38:51moving, roll back the creation so that it can try it again next time without hitting
- 38:56a unique constraint. So those are the sorts of things that we're talking about
- 38:59here, right? These, you can't anticipate everything that's going to happen. You
- 39:03don't know all the different failure points, but you can certainly wrap
- 39:06something into database transaction and roll back if something fails. You can do
- 39:10that. And that's, you don't have to know everything. You just have to know if
- 39:13anything fails in here, roll back. Don't leave this unfinished, weird state, um,
- 39:19that you're gonna have to contend with later, especially if you have-
- 39:22-Yeah -... constraints around unique values. So I
- 39:24hope in, in, you know, in his course he, he covers some of those things or, you
- 39:28know, like the rescue function in Laravel is so insanely awesome. Where if there is
- 39:32a failure while you're attempting to do something, you can provide a default
- 39:35return value and just continue the program running as if nothing failed, right?
- 39:40Those, that's incredibly helpful. So Laravel has a ton of tools to help make it
- 39:44more resilient and more bulletproof if you know they exist. So I'm sure he'll-
- 39:48-Yeah -... cover all that stuff and do a great
- 39:50-job doing so. -Yeah. One, one thing I've been caught out
- 39:54with by that Rescue helper in the past is typically I'm wrapping something in Rescue
- 39:58because I don't wanna know about it, and I always-
- 40:00-Yeah -... I, I have on more than one occasion
- 40:02forgotten to set the report flag to, to false.
- 40:06Uh-huh.
- 40:07So I still, I still get the exception to bubble up, and then I go like, "What is
- 40:10this?" And then I, I, like, I put the Rescue in there, and I go, "Ah, I forgot,
- 40:12forgot the, to report." Because the, the place that we mainly use it is when we are
- 40:16trying to parse dates using Carbon or the-
- 40:19-Oh -... or the date facade. Because, you know,
- 40:22you guys use, um, month, day, year, and we use day, month, year.
- 40:27-But- -Ah, yes. Right
- 40:27... if you take something that's day/month/year
- 40:34and you throw that at date parse, because that's how we would re-enter it into a UI.
- 40:38Yeah.
- 40:38When you take day/month/year and put it into PHP, PHP assumes that it is
- 40:43-month/day/year. -Yeah.
- 40:45And so what you end up with is something that's, like, 13/3/25.
- 40:50-Yeah. -And then Carbon goes, "Thanks."
- 40:53Freaks out.
- 40:54Um, so yeah. We, we've got in a number of places where we're handling that, you
- 40:58know, a date create from format, and then we explicitly tell it, like, "This is
- 41:02-day/month/year." So that- -Yeah
- 41:05... it goes, "All right. Yeah, this is, this is the right way round." Um,
- 41:09and then we fall back to just doing, like, a date pass in case something comes
- 41:13through as year-month-day or whatever else and then, then gets picked up that way.
- 41:17But yeah. When it, when it hits that first Rescue, uh, callable
- 41:22and you don't have the report, then we still get the exception bubble up into,
- 41:26um, our observability tooling. And it's like, "Oh, yep. I don't really care about
- 41:30-that," because- -Yeah
- 41:31... it's, it's... Like, it will, it will catch the exception from the Rescue,
- 41:35report it, and then go to the f- the fallback, so you're, like-
- 41:38-Then it'll continue on, but yeah -But, and then you go, "But this worked.
- 41:40Why am I...? Oh, okay. Yep. Gotcha."
- 41:43-So don't, uh- -Yeah, exactly
- 41:44-... don't miss that one. [laughs] -I'm surprised that there's no, like,
- 41:47localization thing for Carbon where you can basically just tell it at the top
- 41:51level, "Hey, we're in Australia. Please handle dates accordingly."
- 41:54Yeah, yeah.
- 41:56Probably. Probably is and we just miss it, but, um-
- 41:59-Yeah. Maybe -... no, 'cause this is an underlying PHP
- 42:00thing as well.
- 42:02-Like- -Oh, gotcha
- 42:02... if you were to do... Yeah, if you were to do, like, a create, whatever the
- 42:05underlying
- 42:07PHP function is, it will do the same thing.
- 42:10-Got it. -The, the-
- 42:10-Yeah -... the correct approach for that is to
- 42:13-use hyphens instead of slashes. -Ah, interesting.
- 42:16But no one, no one here is going to enter the dates with hyphens instead of slashes,
- 42:20-because that's just not what we do, so. -Yeah.
- 42:25-Like, that is- -Yeah
- 42:25-... I mean, I assume that's- -We don't, we don't do hyphens either.
- 42:28Yeah. I assume that's, like, the workaround in, at the language level. To
- 42:31be like, "Oh, yeah, you can do this as long..." But you, you're not gonna tell,
- 42:35you know, users of your platform who have
- 42:38become accustomed to using slashes to use hyphens in your application wherever else
- 42:43-it's just handled, so. -Yeah.
- 42:45Yeah.
- 42:46Absolutely.
- 42:48Well, hey, dude. I think we have a couple things left to talk about next time. Um,
- 42:53we could probably talk a little bit more about defensive programming and some
- 42:55examples that we have. We could talk about...... staggered CSS animations,
- 43:00which is
- 43:01interesting to me. This is when you go onto a page and you want, like, this
- 43:05effect of when you hit a certain observability point, and there's a, what's
- 43:10that called?
- 43:12Interaction observer? It will animate something in into view.
- 43:17But if you have, like, three paragraphs of text or something like that right
- 43:20following each other and you scroll down really fast, you don't want that whole
- 43:24block to animate and at the same time. You want them to animate in, like, a
- 43:28-PowerPoint- -One after, yeah
- 43:29-... like, one, two, three. Yeah. -Mm-hmm.
- 43:31Which is a little bit tricky to do. And so, um, I think, uh, motion.dev allows you
- 43:37to do that. We figured out how to do that. I still have to implement it. Uh,
- 43:41and then this idea of how do we, how do we accomplish live photos on the web, where
- 43:47if you roll over something, it kind of moves the photo. It kind of gives you this
- 43:51motion, where it changes from a photo to a video while you're rolled over it, and
- 43:56-then- -Yeah
- 43:56... and then when you roll off it, it, it stops doing that.
- 43:58-Interesting. -So found some interesting stuff about
- 44:00that. It'd be, uh, I'd love to kind of talk that through with you and see what
- 44:04-your thoughts are- -Mm-hmm
- 44:04... on that. So
- 44:06-next show, folks. Come on back and- -Sure
- 44:08... um,
- 44:09you know, hey, uh, to go along with the, uh, the news of, uh, Steve and Erin
- 44:14breaking up, I, I gotta let you guys know that, um, Michael said he's leaving the
- 44:18podcast, and it's, he's just leaving it to me. He said, he said he's giving me
- 44:22-everything. Just take it. -[laughs]
- 44:24I'm paying, I'm paying him 50% of what it's worth.
- 44:28-So [laughs]- -50% on anything is nothing.
- 44:32-Since we haven't had a sponsor. -[laughs] Sorry.
- 44:33-[laughs] -We are, we-
- 44:34-Since we haven't had a sponsor in, like- -[laughs]
- 44:36... years, I'm getting a steal on this thing.
- 44:38-That's right. I said, I said to Aaron- -Oh, man
- 44:40... that, uh, that the, the unsponsorable, the unsponsorable comment was ruthless.
- 44:45It was fair, but it was ruthless. [laughs]
- 44:47-Oh, so funny. So funny. Oh, my. -He'll be fine.
- 44:51-Well, anyway. -I think, I think he's for himself.
- 44:52Yeah, I agree. I agree. No, totally, totally. He'll do great. And I think Steve
- 44:56will do well too. I mean, I think people knowing that he's available, I mean, heck,
- 44:59when I heard that he was available, I'm like, "Oh, geez. I have a couple things I
- 45:02could have him do actually." Like, actually-
- 45:04-I said how- -... one specific thing that I thought of
- 45:06that I was like, "I would love for Steve to do this," but I knew he wouldn't have
- 45:08-time. -Yeah.
- 45:09-So maybe now he does. -Maybe. Get into it. 'Cause I said, "How
- 45:12long before he'll... How, how long before he lands on the Lara ship?" So...
- 45:16-[laughs] Right. -Get him before it's too late.
- 45:18May- Who knows? Maybe that was, uh, maybe that was part of his, his calculation.
- 45:23Maybe he was like, "You know what?
- 45:25I can have a job over here if I really wanted one."
- 45:27-Mm-hmm. -"So maybe I'll just do the job thing for a
- 45:28-bit." Who knows? -Yeah.
- 45:30Not making any, uh, assumptions here. Hey, folks, also if you have not bought your
- 45:34Laracon tickets yet, it's might be too late. But if it's not, you should
- 45:37definitely go buy them because Michael and I would love to see you there. We're
- 45:41gonna doing some interviews there. We're gonna be enjoying the show, watching all
- 45:45the talks, and we would love for you to say hi. So please stop by and say hey.
- 45:50Look for, uh, the really tall guy and look for the handsome Australian with the, uh,
- 45:56other cursing Australian next to him. That will be Aaron. Uh, OG, OG Aaron.
- 46:02-[laughs] -OG Aaron.
- 46:03[laughs] OG Aaron making an appearance again at Laracon US.
- 46:08-Yeah. -He's gonna be a riot. I can't wait to see
- 46:09him.
- 46:10Fun.
- 46:11-It'll be good fun. -Awesome.
- 46:13Episode 178, folks. Thanks for tuning in. You can find us at North Meets
- 46:16South.audio/178. Hit us up on X or on BlueSky at Jacob Bennett, at Michael
- 46:21Dorando, or at North South Audio. And, uh, if you liked the show, rate it up in your
- 46:25podcast app of choice. Five stars would be amazing. Thanks, folks. If you'd like
- 46:28to sponsor us,
- 46:30also talk to us on those channels. It won't happen. But if you'd like to, we'd
- 46:34love for you to. But until next time, we'll see you.
- 46:38Oh.