North Meets South Web Podcast

In this episode, Jake and Michael discuss the line between soda and bubbly water, Laracon AU, two-way SMS conversations, and the implications of not knowing maths as a programmer.

Creators & Guests

Host
Jake Bennett
Christ follower, web dev designer @wilbergroup and @laravelphp fanboi. Co-host of @northsouthaudio and @laravelnews with @michaeldyrynda
Host
Michael Dyrynda
Dad. @laravelphp Artisan. @LaraconAU organiser. Co-host of @northsouthaudio, @laravelnews, @ripplesfm. Opinions are mine.

What is North Meets South Web Podcast?

Jake Bennett and Michael Dyrynda conquer a 14.5 hour time difference to talk about life as web developers

Michael:

Hey, I'm Michael Dyrynda.

Jake:

And I am Jake Bennett.

Michael:

And welcome to episode 159 of the North Meet South Web podcast.

Jake:

Intro music. Cue the intro music. Hey, everybody. How's it going? What

Michael:

are you There

Jake:

it is.

Michael:

What are you drinking over there? What's what's this?

Jake:

Oh, boy. I don't even I I literally my wife knows I'm not drinking soda this year. So she just buys random assortments of, like, bubbly drinks. I don't even know what they are. I'll just go I will go up and grab something.

Jake:

This one is Maison Perrier, France, forever strawberry Sparkling Water. 0 calories.

Michael:

Where are you so okay. So where are you drawing the line on, like, what is and isn't soda? Because, like, you're drinking bubbly water, which, like, yes, it's pure water, but

Jake:

Yeah. Yeah. Yeah. So let me let me talk about, like, my goals and and maybe my my reasoning for even starting this. So what it was is, you know, I don't take lunch with me most days because on Monday, Wednesday, Friday, I work, like, 5 minutes from home.

Jake:

And so I just come home for lunch. No big deal. But on Tuesday, Thursday, I'm not disciplined enough to take a lunch with me, and I'm 15 minutes from work. And I don't wanna come home for lunch and then drive back right back. So I just eat from somewhere around there.

Jake:

Well, for a while, it was this little gas station called Casey's, which actually has really good pizza, but I would inevitably end up getting like, a you know, they had a deal for, like, a pizza and a soda. Yeah. And so twice a week, I was getting, like, a soda, like, a soda, like, a 32 ounce or something like that.

Michael:

Yeah. Like an American soda. Yeah. Yeah.

Jake:

Yeah. Like an American correct. Correct. Not like

Michael:

a little baby baby. Complained about that when he was in Australia way back in Yeah. May. He's like, what is this large? Like, this is barely a a small American soda.

Jake:

So, like, a freaking soda. Right? And I'm like, you know, at some point, I was like, this probably isn't a great thing for me. I and so at the new year, I was like, I'm not going to drink soda anymore. And so I will say it is I have definitely net I have drank less sugary drinks than I had previously.

Jake:

However, that does not mean that I don't sometimes, like, substitute things that might even sometimes be worse. Like, like some, you know, drink lemonade. Lemonade has actually got more sugar than soda does. Like, it's not good for you. And so I'm trying to not drink any of that either now.

Jake:

I'm sort of just so I think really what it's helped me to do is just to be a little bit more intentional with my choices for what I'm drinking. And I know that soda isn't an option, so it's just not off it's that's completely off the table, and so it forces me to be a little bit more creative. I'll drink water a lot more now. I'll drink these. But these have 0 calories, 0 sweeteners.

Jake:

Like, it's just it's something to sip on. It's just something flavored, you know?

Michael:

But,

Jake:

yeah. Yeah. So I was just trying to trying to try something a little bit different. And I think I think it's working for the most part. It's it's allowed me to be successful in my quest of not actually drinking soda.

Jake:

And there have been a couple times where I'm like, oh, it's not a big deal. I'll just cheat. And then I'm like, no. I'm not going to do it. And so I don't.

Jake:

So, like, for example, last week when we were at the, theme park Mhmm. They had, like, unlimited soda. As much as you want for, like, what I didn't drink any. And so, like, that was like, I would have. For sure, I would have.

Jake:

But, yeah, I didn't drink any. So yeah. It's it's going

Michael:

okay. I'm all about the here we go. Pepsi Max or the

Jake:

Pepsi Max.

Michael:

Coke no Sugar, Coke 0. Like, I Coke 0.

Jake:

That's good stuff, dude. They've cracked the code. It used to be that crap, but Coke 0 is so good.

Michael:

It's funny because every now like, when my mom my my folks come around the the dinner on Friday night, we have McDonald's with the kids and

Jake:

Maccas.

Michael:

My mum Maccas. My my mum is still, like, full strength Coke. She won't won't drink Coke.

Jake:

Yep. And

Michael:

so every now and then every now and then they don't pop, you know, they got the little the little tabs on the top of the Sure.

Jake:

Sure. Cup

Michael:

that tells you, you know, is it soda or is it diet

Jake:

or whatever. Full strength. Yeah. Yeah.

Michael:

Right. So every now and then, they don't do that. And so you've got to sip them all. And we have been, on more than one occasion, foiled. Like, here you go.

Michael:

And, no, wrong one. That was not that was not the no sugar one. So one one night a few weeks ago, I I mixed it up. And so I gave mum the Coke no sugar, and I gave Rhee the full strength.

Jake:

Okay.

Michael:

Mum didn't notice. Like, for someone who's like, I hate the taste of it. I like, I just Alright.

Jake:

Fair. That's good. Drink it.

Michael:

Didn't recognize Rhee straight away what it was like.

Jake:

Yeah.

Michael:

They're they're really strong in the syrup this time. But no, she she got the full strong. I'm like, oh, yeah. I'm like, mom didn't notice. So we'll just leave that.

Jake:

But I'm

Michael:

like Yeah.

Jake:

So you're like, hey, mom, next time, why don't you get the no sugar one? See if you like it. You know? Yeah.

Michael:

Yeah. Yeah. If she knows it's it's the kind of thing that, like, if you know, then Right. Right. They've got it so close, and it like, I know in in that context of the, like, post mix stuff at at McDonald's, like, they've got, you know, it's easy enough to mix them up.

Michael:

But I think they've got it so close now. And I haven't had full strength Coke for years years now for for about 4 years, 5 years. But, yeah, I'll do I'll do the Pepsi Max. I'll do the the Coke no sugar. I'll do, Mountain Dew.

Michael:

If if I can find it's hard to find the no sugar Mountain Dew here, but they've got like a major melon one, which is pretty good. Okay.

Jake:

Yeah. So maybe that's what I'll do. Like, what if I if I sort of come back onto the soda thing at some point, maybe I'll just do some of those other ones where it's, like, a little bit less of the bad stuff for you, I guess. Yeah. Yeah.

Michael:

My my dentist is always, like, oh, this is too bad for you. I'm, like, yeah, but what are you gonna do?

Jake:

Right. Exactly. Yeah.

Michael:

I I still drink You gotta live my life. I I still drink 2 or 3 liters of water a day. So and I always try and, like, wash down the soft drink.

Jake:

Dang. That's a lot of that's a lot of water. 2 or 3 liters. Dang.

Michael:

Like, I've got this this 500 mil bottle, and I will fill it up. I'll sit down on my desk, and before I know it, it's empty. And I'm like, I I'm sure I just filled that up. So it's pretty When you

Jake:

make it up yeah. Yeah. When it's available, it's amazing how much water you will drink. Yeah. You know?

Jake:

So

Michael:

we've got, like, filtered water. I I drink 500 mil all the time. And I'm I'm back in the gym now as well. So, you know, protein protein shakes and things like that to to make up the the difference. So it's gone alright.

Jake:

Nice. Trying to get amped up for, Laracon AU speaking of.

Michael:

Laracon AU.

Jake:

So you gotta you gotta tell me what's up with the mask thing. What's I don't I've I've not I don't get it. So tell me tell me what's happening here. Is this supposed to be not getting it? Okay.

Michael:

So last year, last year, the the Laravel team had, like they launched Laravel Pulse at Laracon AU.

Jake:

Mhmm. Mhmm.

Michael:

And so we had the the beating heart emoji just like this is I I did I knew last year, I knew probably about a month or 2 before ARICON AU, what it was that they were launching. So, Jess Jess approached me probably about 2 or 3 months ago, and said, is there a spot on the schedule for us?

Jake:

I did see that she got

Michael:

to give it to me.

Jake:

Yeah. I I saw that she got kind of a she you just announced her today, or I saw a tweet about it today or something.

Michael:

Yes. Yep. So Jess Jess is the the last of our speaker announcements for this year, which I am very, very happy about. Because I I was saying this to the we have, like, a a chat for all the speakers. And I was saying yesterday that, like, it's it's the it's the best and worst part of of running the conference is, like, keeping the secret and then sharing the secret.

Michael:

But then it's also knowing who you've told what and who you can tell what at different times until it's all kind of public. So I I do not know what what Laravel team is working on, what they're going to be presenting. I just know that it has been told to me that it it will be it is the most ambitious project that the Laravel team have have undertaken to date. So if you want to know

Jake:

And they're doing it and they're announcing it at lareconau. Awesome.

Michael:

And yeah. And I'm I'm very appreciative of that to to have the opportunity to have, the team to to present it and to enter, you know, back to back years have a have a product, a Laravel product launch at Laracon AU is is pretty special for us from our, you know, humble beginnings. And so

Jake:

That's pretty cool.

Michael:

Yeah. Yeah. I've got some ideas now. Now that I just

Jake:

will be there. Kinda know that's what it is. I've got some ideas.

Michael:

So yeah. Yeah. We we put out the the the the emoji tees the essay, which was fun because I I gave the speakers, a bit of a tease. They're like, you really wanna see what the announcement is tomorrow for for yesterday's? And they're all like, you know, offering it ready for it.

Michael:

And, and then they saw I'm like they're like, what the hell is this? I'm like, I told you it was gonna be good. I didn't I didn't tell you it was gonna be a person. I I told you it was gonna be good. So

Jake:

That's funny.

Michael:

What? So, yeah. It's, yeah. We we we've got a bit of stuff going on. You know, the speakers are obviously preparing their talks.

Michael:

You know, we're we're 4 months out now from Laracon AU. We're doing we're doing the intro videos again that we did last year, which were a lot of fun. And I'm very appreciative about all of our speakers this year because they're they're humoring me with, what we're gonna do with the the announcement videos this year. So, I I very much appreciate them, and I can't can't wait to thank them in person in in November. It's it's gonna be good.

Michael:

Still still more secrets to come. Like, I'm not I'm not done, but the the speakers Get lots more up

Jake:

your sleeve. Yeah.

Michael:

Always yeah. Always keeping secrets on my sleeve. So I'm very, happy about that. To to have that all out, we'll we'll probably let it simmer for a week or 2. We'll publish, all of the talk titles at the beginning of August, so everyone will be able to start playing the game of, you know, which speaker is going to give which talk, and then probably about, or probably around the same time, we'll start putting out the speaker announcement videos as well.

Michael:

So it'll be we'll be drawing the the line between speaker and and topic pretty quickly, this year. But, yeah, we're we're tracking well for for early bird. That that runs until the end of August. You haven't haven't got a ticket. I don't know necessarily that all of those tickets will last to the end of August, but once they're gone, they're gone this year.

Michael:

So Yep. Get in if you wait on

Jake:

the day. Looks yeah. All the designers looking really good. The the slide the speaker slides or the speaker announcements are all looking great. Love the design.

Jake:

Everything looks awesome.

Michael:

I I love, you know, I

Jake:

used to work with Nucleus and they've just

Michael:

knocked it out of the park again for us this year.

Jake:

Yeah. Really really grateful to those guys. It makes a big difference. You know what I mean? It really that layer of polish, like, just really makes it so much more professional.

Jake:

And, like, you know, people take it seriously when it looks good, you know, as silly as that sounds. But it's true.

Michael:

We I mean, I you know, I've said before that that we have to kind of put in a little bit of effort because we're not, you know, we're not the flagship. Aragon, of course, but we're not a flagship size or, you know, that kind of event. So, you know, we put in a little bit more effort to, like, make it known that, you know, we're not we're not mucking around here. So

Jake:

Absolutely. Absolutely.

Michael:

Good fun. That's exciting, man.

Jake:

Good. All that hard work coming together. Yep.

Michael:

Yeah. Yep. Certainly certainly coming up on file. Certainly coming up on us quickly now as well. You know, thinking about it going, oh,

Jake:

it's only 4 months away. Yeah.

Michael:

We're gonna have to start thinking about different things, and speakers have been booking flights, and we've locked away all the accommodation for everyone and and all of that kind of stuff. So, yeah, just just excited to keep the ball rolling. And, you know, the closer we get to Laracon, the the closer we get to warm weather as well, which I'm not

Jake:

a

Michael:

fan of. And so

Jake:

Yeah. Exactly. Dude, so, last week last week, on 17th, I think, would have been a year ago that I arrived at Laracon US ready to go for my talk, but I believe that was like a Sunday or a Monday that I got in. Yeah. Maybe maybe Monday.

Jake:

In any case, I didn't speak until a couple days later, but, man, it was like, oh, boy. I think, it was a good choice to not speak this year. It's been a very, very, very, very, very busy year, and it would have been very difficult to fit in the time to put a talk together. And so, glad I didn't morning it, however, you know, just because it's like, oh, man. It would've been so fun to be able to do that.

Jake:

Yeah. So, it's gonna stink not being, like, at the speaker dinner and not being able to, like, you know, basically have that VIP pass, which is so fun. But we'll see. Maybe next year. I don't know.

Jake:

The thing is it's not like it's a guarantee. You know what I mean? Like, you put your talks thing in and, like, hopefully, Taylor likes it and, hopefully, he doesn't have a million other amazing submissions from other people who are really well known and really great speakers. And it's like I just happened to get on the list last year. I'm not sure.

Jake:

I don't know. I just it just worked out that way. But, you know, there's no guarantee that just because I'm putting a talk in next year that I'm gonna actually get on the list. So we will see. We will see.

Jake:

But looking forward to Lyric coming up. Yeah.

Michael:

We had, like, a 130, a 140 submissions. The end, like, even even a 140 getting that down to the the 17 that we have at the conference is, like, hard enough. I can imagine for, like, Europe and the US, the the volume of submissions that they get coming through and putting together, like, a really good comprehensive, you know, covering all the the topics and things like and it's always a balancing act between, you know, who is the audience, who who wants to see what, you know, where are the the levels at? How how do you balance, like, the the professional development talks with the technical talks? How how technical do you want those talks to be and things like that?

Michael:

And it and it's difficult as well from an abstract to tell all of that kind of stuff. So

Jake:

Yeah. That's the other thing. It's like you gotta do a really good job writing that abstract to the person who's looking through those excited. So it's like yep. Yeah.

Jake:

I'm sure as you looked through, like, a 140, I'm sure some of those abstracts really stood out and the others just were like, you know what I mean? Yeah. Like, I'm wondering

Michael:

Like, getting it down, it's like you you cut it in half, you know, there's there's the obvious one. There's so we we have, like, a limited budget for for the speakers. So, you know, we can cut out a whole bunch of, you know, people that we wanna get to speak, but we try and get first timers more from local Close

Jake:

to home. You know? Yeah. Right.

Michael:

Like first timers that are otherwise prominent. You know, Joe Tannenbaum speaking this year, prominent member of, the community, on the Laravel team as well. So, you know, there are there are certain things that kind of move you up and down the ranks, but we, you know, we as much as we would love to have 5050, we we do also need to be mindful that we're trying to focus on, you know, our local community as well. And so where we try and draw the majority of our speakers is from, you know, that local pool, that local community. We try and bring new speakers along for the ride and and help them out as much as possible.

Michael:

And and so, you know, getting it from a 140 to sort of 50 or 60 is pretty easy, realistically. But that last, you know, 50, 60 down to 30 down to, you know, agonizing up to, you know, an hour before I'm sending out the invitations to those 17. You know, it's Yeah.

Jake:

And hoping that they're all still able to do it and all that stuff. Yeah. Exactly. Yeah. Yep.

Michael:

Yep. It's it's definitely my, my least favorite part is is cutting that list down to 17, and then, like, hoping that the 17 that you pick are the are the ones. So I've Yeah.

Jake:

It's something I don't think about much, honestly. You know?

Michael:

I think I've had a good track record over the last, 3 events, you know.

Jake:

But,

Michael:

yeah, I think this year's gonna be really good.

Jake:

That's awesome. Very cool. Well, yeah. So Laracon is coming up for US, pretty quick here

Michael:

as well. End of next month as well? Well, 4 weeks away?

Jake:

Month away? Yep. Yep. Yep. So we gotta make sure I got everything squared away for that.

Jake:

And, you know, excited to kinda go get go get down there and see everybody, say hi, catch up with everyone. In the meantime, though, we've got some fun challenges we're working on here at work. The most recent one that we've been working on is Twilio conversations. So, this is like two way chat between, you know, our users and our internal team members. And so the cool thing about Twilio conversations is there's, like, multiple channels that you can use to kick off a conversation.

Jake:

So you could do, like, Facebook Messenger. You can do WhatsApp. You can do SMS. Right? And so they have a mechanism by which you can set up a number.

Jake:

Right? And then you can say, if anybody texts this number, automatically set up a conversation. But we would really like to use our short code in order to do that. So I'm not sure what the I'm not sure what you guys have in Australia. If you guys have so for us, we have, you know, plus 1 is our international code, and then we have a, 10 digit code after that.

Jake:

So it's like a 10 digit long code. We call it 10 DLC. Ten digit long code. And those 10 digit long codes are typically used for, person to person, p two p. Right?

Jake:

And so if you're trying to use a 10 digit long code for the purpose of engaging a user, like as a company, it's very frowned upon. There's that's not it's pretty much seen as spam almost always.

Michael:

Okay.

Jake:

Right. Unless you register a campaign with that 10 dlc. So it's a it's a bunch of red tape, all that stuff. However, we also have short codes, which short codes are like 5 digit 5 digit numbers. And they are sort of like they're seen as very trustworthy because they're difficult to get.

Jake:

And so years ago, we were able to secure a short code. And so what we wanted to do is we wanted to use conversations with our short code. Mhmm. However, the challenge is we've been using Twilio messaging with that short code for forever, which is just those API calls that you use to make a message, you know, to send a SMS to somebody. Yeah.

Jake:

Now what we have to do is we sort of have to integrate this conversation piece alongside of our messaging piece. And so we've been able to do that. What you have to do right now is you can manually set up a new conversation. So for example, if somebody hits a dead end, if they if they text us at our number and we have, like, an auto responder or some sort of chat bot that's listening for these special keywords. If they hit a dead end, we can say, you know, you can either call us or type an agent.

Jake:

And then they type an agent that will kick off a conversation. So was just able to get this working today, but the trick now is I have to be able to distinguish between, phone numbers that have started a conversation with us and phone numbers that have not started a conversation with us. And then I also have to manage the life cycle of that conversation, so I know when it's begun or when it's ended or when it's been archived or whatever so then I can kick them back to the old way of doing it. So, essentially, what I have to do is I have to put an interrupt at the very front of this, webhook that I'm receiving, which is, like, any incoming text to this phone number gets this webhook call. But the conversation, endpoint there's a new webhook conversation, endpoint.

Jake:

And now both of them what's happening is both of those webhooks are getting that call at the same time. And so I now have to sort of, like, massage this and figure out how exactly, that's going to work, which doesn't seem too terribly difficult when you just think to yourself, like, oh, I just created a database record. And that that's all true. But now what you have to do is you basically have to keep the Twilio conversations in sync with your local representation of those conversations, or you otherwise have to query out to their API every time you receive an incoming text message and to say, am I in a conversation with this phone number now right now? And if I am, don't respond on this messaging webhook over here.

Jake:

Only respond to the conversation webhook over here. So that's one challenge I'm facing. But then there's a whole host of other ones. And there are pre built solutions for this stuff. Right?

Jake:

That's the thing. It's like there are a 1,000,000 solutions out there that allow you to do, you know, two way messaging and things like that. But the problem is, in order to use those, if you wanna use some sort of, like, SMS thing, you have to port your shortcode over to them. And so we can't we can't really do that. So we kinda have to home roll this thing.

Michael:

Yeah.

Jake:

What that means is all the things like, who is the person assigned to this chat? If they haven't responded in a certain amount of time and the person is still trying to talk with somebody, how do I, you know, escalate it or roll it over to a manager so that somebody can see it? You know, how long do you wait before a conversation is seen as not active anymore? How long do you wait before you close a conversation? If you close a conversation and they reopen it, do you show the chat history or don't you?

Jake:

You know, all these sorts of things. If we had if we did do messaging outside of the conversation, like, if we previously sent them an automated message through an API, should we show that in the conversation view? And how do we do that? Right? There's all these new complicated problems that we're trying to solve.

Jake:

But today was just really exciting because was able to finally get a conversation started with our short code, which was back and forth with Twilio sending tickets, you know what I mean, with their support team. And you never really know what you're gonna get or which agent you're gonna get on the other side. Are they gonna be competent? Are they are they gonna be a newbie? And so thankfully, they

Michael:

can talk to the script where they actually

Jake:

get paid. Exactly. Yeah. Exactly. This is the 3rd ticket I've submitted.

Jake:

And this one, I got a really smart person. And, they were with by the 3rd message, they were like, try this. I was like, boom. Nailed it. Got it.

Jake:

It was it. That was all I needed to do. And so, yeah. Anyway, that's what we're working on right now. Really exciting, but also lots and lots of problems to solve, which I love.

Jake:

I love solving those those problems. It's fun. But just gotta spend a lot of time thinking through and discussing those things and making decisions about, about that stuff because, you know, when you're building it on your own, you gotta you gotta think through all those things. All the things that the other companies who have built it with a and team of engineers of, you know, 50, I gotta do it with a team of 5. So Yeah.

Jake:

It's it's fun.

Michael:

Yeah. I've, I've been working through amortization, schedule, like, calculator for the last week or so. Which you would think is fairly straightforward. But, there's there's, like, 10 or so, like, explicit inputs into this calculator. And then from those 10 explicit inputs, you then have all of these derived inputs for things like brokerage can be either a percentage or a dollar amount, or or balloon payment could be a percentage or a dollar amount.

Michael:

And then based on, you know, whether it is percentage or dollar amount, you have to then calculate the other value. So if you say, you know, this is $10,000, we have to figure out what $10,000 is as a percentage of the amount being funded and and vice versa. So there's just all of this kind of stuff, and it's and it looks very simple when you look at the spreadsheet that has been given to you that you like taking the spreadsheet and turning it into a web thing. It's like, yeah. Yeah.

Michael:

It is simple there because you can just, like, click around and do all this stuff. Whereas in code, you've got to think, okay, which things need to go in which order? You know, some things have to exist before other because there's, you know, there's there's dependent inputs and things like that. You have to figure out what is an input and what is a derived input. You have to then and the thing that's been really getting me tripped up is, okay, we've got the front end, which has a whole bunch of fields.

Michael:

The front end then comes in as a form request. The form request then gets converted into a DTO, which is the input DTO. And then you figure out, okay, how much of this is just like static values? How much then gets passed into the actual calculator to then calculate different bits and pieces? And then the results of the calculator gets spat out as another detail that is out

Jake:

Another detail.

Michael:

Which then which then gets sent back. Because we because we did this once before where, like, the form request kind of became went into the the DTO, and then the input kind of became the calculator, which also kind of became the output. And it makes it a little bit finicky to test to, you know, separate all the different bits and pieces and things like that. So we're trying really, really hard to, like, figure out where we draw the lines. So I haven't even touched the output yet while I'm trying to figure out the calculations.

Michael:

And then it's like, you know, this is a a 5 year term. Well, how many periods are in it? Will the periods change? Is it a weekly payment? Is it a fortnightly, you know, a 2 weekly payment, a monthly payment, a quarterly payment, a half yearly payment, a yearly payment?

Michael:

Like so then you gotta figure out the periods, and then the date math is funky. PHP has date period and date intervals.

Jake:

Yeah.

Michael:

So you can kind of say, like, how many date intervals do I have in a date period? So in this 5 year period, go and figure out all of the the the intervals within that. And then kind of working with all of this and then looping through that to then figure out, okay, what is the actual calculation to figure out the the the payment amounts of each each step. And then looking at, you know, the spreadsheet, it's I typed the formula into row 1, and then I click, you know, the little magic handle and I dragged it down. And so it just, like, increments everything by 1.

Michael:

So you go, you know, a 1, b 1, c 1, d 1, all the way down to wherever. And it's like, alright. That works in the spreadsheet. How do I turn this into a formula that I can, like, iterate over in, like, this calculator. So and we've got a fairly tight deadline on it.

Michael:

So it's like part of me wants to do it properly, so we don't get ourselves in trouble with it later. And part of me goes, you know, there is serious time constraints here that we we've got to get this out the door. So

Jake:

I just see that tweet the other day. Somebody said, like, like, basically didn't realize I needed to remember math in order to know how to do programming.

Michael:

Yeah. I did see that. Yeah.

Jake:

I'm sitting here re learning math. And then he said, like, do you need to know math in order to do programming? And then the next tweet, he said, no. No. You don't.

Jake:

And I'm like, you kinda do. But you you kinda do. Like To some extent. Don't have to know everything, but, like, you have to have a basic understanding of how these things work. Like, I remember at one point, I asked somebody, who was new on my team to do, like, an average.

Jake:

Mhmm.

Michael:

And they

Jake:

were like, okay. And then they they went away and did the thing. And I'm like, are you done with that, like, average thing? And they were like, well, I'm working on it. And I'm thinking, like, how long does it take to do an average?

Jake:

I mean, like, what are we what are we doing here? And then went in and realized, like, they don't know what an average is. They don't know the formula to find average. Now if you just go in an Excel sheet and see equals average and you'd sum a column and do the thing, then they could then it fine. Yeah.

Jake:

But they didn't know how to do an average. And I'm like, okay. There there is, like, this basic level of understanding that you kinda have to know in order to be able to operate in this. Like, you need to know percentage means, like, you know, you move the decimal over 2 if you're, you know and that's that's, you know, that's what you have. And so, like, if you don't know that, you're missing a big piece of how this works.

Jake:

And so you have to know some stuff. You don't know I don't know everything. But, man, the more you know, the more help

Michael:

There is a there is a level. Like, the stuff that yeah. The the stuff that I was looking at for this amortization stuff, there are some, like I was looking at the calculations, and I was like, that is the level of math I never thought I would see outside of, like, structured learning. And I was like, sure someone has written a library that does this for me. And and, like, it was a library that does

Jake:

this for me.

Michael:

Thank God. Yeah. Thank God. You know, there's like, the percentage thing is true. As humans, we look at percentage, and we say, like, 5.25.

Michael:

And in a spreadsheet, if you put 5.25%, Excel, Google Sheets, whatever, knows that you'd how to operate with that. When you're doing that in PHP and you wanna calculate, like, 5.25 percent of a 100

Jake:

Correct.

Michael:

It's not a 100 times 5.25%. It's a 100 times 0.0525. Exactly. At this guy and why am I off by oh, yeah. Okay.

Michael:

So then you have to decide, alright, at what point do I divide by a 100? Do I take the user input of 5.25 and immediately convert it to 0.0525? No. But at some point, I'm going to have to present that back to the user as 5.25. So I do do I leave it as 5.25 divided by a 100 when I need to do operations with it so that I all so that I don't have to remember, okay, I need to return this as 5.25 at the end or, like and so you've got to make all these decisions and you've got to keep this all in your head.

Michael:

You've got to make sure that, like, you do it all at the right time. So this is where testing is Yes. Very good because you write all the tests first. You say, okay. Given these inputs, these are the outputs that I expect.

Michael:

You know, if I wanna see 5.25 at the start and I wanna see 5.25 at the end, I know that somewhere in the middle there, I'm gonna have to divide by a 100 to to make sure that I get the correct value in there. Otherwise, you're gonna be off by a factor of a100. And then And you have

Jake:

to know enough. You have to know enough to be able to, like, have these things pass the smell test. Do you know what I mean when I say that? Like like, you look at that number and you're like, that's not right. That's not the right number.

Jake:

And if you don't know enough math to know that, then, yeah, you can get yourself into pretty big trouble pretty fast.

Michael:

And, you know, juggling with scale as well. So, fortunately, I have like, our product team was, like, here is the spreadsheet that we need to so I can look at that and say, these are all the inputs. And I I know, okay, when I write my tests, given this this set of inputs, these

Jake:

are the outputs. This is an Excel sheet they've been using for 5 years. They know Right. These this input, this is the output. I so I need to write a test that does that, make sure it matches, and then go from there.

Jake:

Yeah.

Michael:

And and I said to the the product team, I'm like, I don't know if what you have given me is correct. What I do know what I do

Jake:

Mine does what yours did. Yeah.

Michael:

What I do know is that what I give you is going to produce the same results as what you have

Jake:

given me. As what you gave me. Yeah. That's fine.

Michael:

You know, and then it's we're using the, the brick math library. So we've got things like rationals and big decimals and and all so it handles, like, rounding. But there are, like, certain situations where you can specify, you know, if you didn't do need to round round up or round down or round halves up or down and things like that. And there are other situations where if it cannot round it without losing precision, it will just throw an exception and there is nothing you can do about it.

Jake:

Correct. Yep. And I mean, it is. That's the thing. Like, the more times you lose precision by the time you get 3 steps later, you're way off way off.

Jake:

And, like, with these things, you gotta be penny perfect. I mean, you cannot be off when you're talking about banking stuff. Because like you said, at scale, you you slide it from $100 to $1,000,000 and now your mistake that was off by a dollar is now off by a lot more than that. And so you gotta be exactly perfect. And it is.

Jake:

I mean, that's why this is why you always store money in the smallest amount that you can. Right? So cents. Right? Lessons learned the hard way.

Jake:

If you can't store it in cents, you're in for a world of hurt because you're gonna have to start rounding sense in order to get there, and it's just not gonna work well. Yeah. And so it's it is a difficult beast to tame and, one that I think everybody should have to do at some point in their lives, in the program in their programming journey, dealing with percents and dealing with money. It's it's a fun one.

Michael:

And unfortunately, dealing with money in typical financial systems well, especially in, you know, US and Australia, we're dealing in up to 2 decimal places of precision. So if you're doing all of your work, the stuff we're doing is, like, 5 or 6 decimal places, and that's just because that was what the spreadsheet was set to. So that's what we've decided. We'll we'll work in 5 or 6. So that way, your loss of precision and your rounding errors are insignificant.

Jake:

Yeah. Yeah. Yeah.

Michael:

It's 5 or 6 decimal places down. You don't have to worry about it because you're just gonna chomp at 2,000 places and call it a day.

Jake:

At the very last second. It's like at the very last second

Michael:

Yeah.

Jake:

That's when we can actually do it. But, like, up to that point, you can't. You can't lose anything. You gotta keep it all there. Yep.

Jake:

Yep. And so good stuff to remember. And then, oh, I wanted to talk about one other thing, which is it's not super related, but I guess maybe a little bit, which is that when you're upgrading from Laravel 10 to Laravel 11, it's also upgrading from carbon 2 to carbon 3. Mhmm. Because this is the one other thing I was going to say, which is, like, you know, when you're dealing with money and and precision and floats and things like that, you gotta be careful.

Jake:

And then when you're dealing with, like, sub month, ad month and, you know, you have more than 28 days in a month and you do sub month and, like, skips of weird month, the overflow stuff. Yeah. All that. You gotta be really careful with that when you're dealing with those. And then this one other thing bit me, recently, which is the upgrading from carbon 2 to carbon 3 or actually Laravel 10 to Laravel 11.

Jake:

I should go look at the upgrade notes and see if it says anything about this. But one of the functions that we use in carbon all the time is diff in, and then there's a million other thing, you know, different seconds, different minutes, different hours, different time, you know, different weeks, different years. Yeah. Different anything like that. So what has happened is it used to give you an integer value always.

Jake:

So if I said, now add days 6 and then said, dip in time or sorry, dip in days now, it would give me, 6 or whatever. Right? Whatever it is. However, if there was a if the hours did not add up to exactly 20, you know, 6 24 hour periods, it would just give you 5. Well, now it actually gives you a float, not an integer.

Jake:

It gives you, like, 5 dot whatever. And if the time is not it's not giving you a absolute value of the difference in time, it's giving you the negative or positive version. Did you go backwards or did you go forwards? And so it's no longer just 5. Now it's negative 5.2.

Jake:

Right? Yeah. And so really goofy. And so if you're using that stuff, you have to intentionally make sure your code base is specifying, cast this to an integer, which will take care of the negative and will take care of rounding it. Not a problem.

Jake:

Or you can pass as a second argument. You pass true, which will take out it'll give you the absolute value version of it, but then you still have to take care of the integer portion of it. So it may be a positive that it's got more precision. It may be a negative. But what I will tell you is that if your test break verification.

Jake:

If your tests are not being careful about how that's being handled, you will end up with some pain. And that's exactly what happened to us. And we were dealing with payment stuff. And so, thankfully, it was just how often a type of payment was recurring. You know, it wasn't actually setting how often it was recurring.

Jake:

It was just basically trying to determine how often it was recurring based on the dates of the payment. So we didn't screw up anybody's stuff, but it was like the displays were weird because we were dipping in days and then it was not working the same as it used to. So just something to be aware of, upgrading from 10 to 11 or just from carbon 2 to carbon 3. Watch out for that one because it'll bite you.

Michael:

Yeah. Yeah. It is it is definitely in the in the upgrade guide. It says that Laravel 11 supports both carbon 2 and carbon 3, and then it talks about, the differences with the different methods that they now return floating point numbers, and they return negative values to indicate time direction, which is a significant change. So, the framework itself will support both.

Michael:

So if it's if if it's a big enough breaking change for you to upgrade to carbon 3 and you can't go through and realistically update all of your usage to account for the floats and the directional time values, then you can just use Carbon 2 and everything will just keep working as it is. If it's like a few things here and there, then, yeah, go ahead and upgrade. You know, keeping up to date is is generally the preferred mode of operation for Laravel. So yeah.

Jake:

I think I need to reset reach out to Jason McCoury on this one, mister Jmac, because I think this is I I I should have looked at the upgrade guide. I can't blame him because, like, he did all the work for me to to get the shift to 11. Mhmm. But I think that's I typically just sort of think, like, well, if there's anything worth knowing, he's gonna let me know. Yeah.

Jake:

Great. And then And and exactly. And he probably has updated it by now, but that's I didn't I didn't see it in there, in the upgrade guide. I should have looked there first. But that's that's what bit me.

Jake:

And so anyway, we're going back through our applications now. Anything that we upgraded to 11 and being, like, hey. Go look for anything that says diff in and then go check to see if it's working correctly because I wanna make sure there wasn't a bunch of other stuff that we missed, along the way, that was causing us some issues. So, anyway My last thing

Michael:

before we wrap up here, I have the pipeline has now finished running on a branch that I opened or a PR that I opened back in February, which haven't really had time to get around to it. But this is to upgrade dependencies to support PHP 8.3 in our application. So that's all shipped. We've been we've been running 8.3 in production. No.

Michael:

We've been running 8.3 in our new, like, containerized production environment for about a month even though we've been running, like, 8.2 dependencies. So now that that's available, we're just gonna merge that, send it to production, and then the next thing to do will be the Laravel 11 upgrade, which

Jake:

Nice. Should

Michael:

be mostly straightforward. I did it back when it was like a beta beta shift, and and worked through some things with JMac. But, yeah, it should be good to go now.

Jake:

There has been yeah. So I think maybe I shifted too soon. I say that. I don't know. Like, when they were when we were first talking about it on Laravel News and all that stuff, all the hotness was like, slim your application files.

Jake:

Like Mhmm. Delete all the configs. Like, condense everything into this one bootstrapapp.php.

Michael:

Mhmm.

Jake:

I don't know if that's the recommendation anymore. Honestly, I don't think they're slimming configs. I don't think they're necessarily doing all the removing of the service providers. I don't I'm not sure. At least when I've done it with Laravel new, I think for 11, it's got all the config files in there.

Jake:

They're all still there. Okay. And it's like, okay. It's interesting. So I think there's been a little bit of a change course on

Michael:

that one. Back and forth on that one. Yeah.

Jake:

Yeah. There was. There was. And so I, like, I went all in. I'm like, dude, let's freaking slim this thing down to nothing.

Jake:

And we did. I mean, we took ever all the config files are gone. Almost all the app service providers are gone or, you know, all of our service providers were gone. We slimmed everything into that bootstrap/app.php. It's fine.

Jake:

It's fine. It's just much different. And, you know much different.

Michael:

And when you got 10 years under your belt, you know, since the the version 5 days of the you know, this is where everything is. This is where providers are. This is how to manipulate things. This is where to change things when when you then get to this point of of 10 years of doing it like that. And, like, I don't think it's good or bad necessarily because I haven't used it one way or another.

Michael:

But I think the fact that it is drastically different means that you actually need to go and think, okay. How do I do this? And it's and it's not. Yeah. And I don't like I said, I don't think it's good or bad.

Michael:

It's just that you haven't learned how to do it in this new way yet. And so you do have to think about what you're doing a little bit more to figure out Yeah. Where is the appropriate place to do this place to do this stuff.

Jake:

For sure. Yeah. For sure. Like, when you're, like, hey, I need to register a new, like, routes thing. Like, you don't do that.

Jake:

Route service provider anymore. No. You know, you don't do that there. Like, I need to, you know, modify a global middleware. Well, you don't do it to the HTTP kernel anymore.

Jake:

It's not there. You know what I mean? So it's like Yeah. You just gotta know. It is a little bit of, like, moving around.

Jake:

It's not too bad now. Now that I've done it with we've probably got, like, 8 8 apps running a layer of 11. It's not too bad. I I typically could find exactly what I need, but there is sort of just, like I guess the other thing too is, like, sometimes sometimes it assumes you have it the new way. I think most of the time

Michael:

it does,

Jake:

But I don't know. When you're looking that's the other when you're looking at the old documentation, like, for 10 or something like that, you know, it's like, oh, yeah. It doesn't work like that anymore. Although, all the tutorials are out of date for, like, hey, here's how you added the middleware. So it doesn't stop there anymore.

Jake:

So that sort of sucks. Whatever. I'll get over it, But

Michael:

It'll be fine, Don't Don't anymore.

Jake:

It'll be fine. It'll be fine.

Michael:

Alright. Alright.

Jake:

What episode 159. Is that right?

Michael:

Yeah. It is.

Jake:

Thanks folks for hanging out with us. 159. Show notes at show notes at northmeetsouth.audio/159. Hit us up on Twitter at jacoben@michaeldwindor@northsouthaudio. And if you like the show, rate it up in your podcaster choice.

Jake:

5 stars would incredible, amazing, awesome, and wonderful. If you're gonna be at Laracon US, I will see you there in a few weeks. And if you're going to Laracon AU, you know, start buying your warm summer clothes because it's gonna be hot. Make sure you pack a large cup so that you can fill up your soda with American sized sodas, and, if you don't have tickets, you should certainly buy some. Alright, folks.

Jake:

Till next time. We'll see you.

Michael:

Bye, man.