Mostly Technical

Ian & Aaron are back(!) to discuss whatever happened with Ian's DB woes, what it's like to parent two sets of twins, the brand new PlanetScale Studio, & more.

Sponsored by LaraJobs & Screencasting.com.

Sent questions or feedback to mostlytechnicalpodcast@gmail.com.

  • (00:00) - From Zero To 6 Weeks
  • (10:10) - Model Should Be Strict
  • (18:53) - Don’t Muck Around With Select
  • (23:35) - Gotta Have a Morph Map
  • (27:45) - Huge Fan of the Enums
  • (32:46) - Shedquarters?
  • (38:46) - I’ve Got an Apartment Now!
  • (51:17) - Aaron’s Static Site Package
  • (54:39) - Update on Ian’s DB Woes
  • (58:03) - Taking a Page From DHH
  • (01:00:47) - Ian Gives Some Feedback

Links:

Creators & Guests

Host
Aaron Francis
Educator at @PlanetScale. Into Laravel, MySQL, and building things. Building https://helloquery.com/
Host
Ian Landsman
Founder HelpSpot, LaraJobs, and Laracon Online.
Producer
Dave Hicking
@UserScape Product Manager. Previously at @TightenCo, @BeineckeLibrary, & @uconnlibrary. 1/2 of @CRSPodcast (I'm @doc_beats). 1/3 of @cheese_weather.

What is Mostly Technical?

Hosted by Ian Landsman and Aaron Francis, Mostly Technical is a lively discussion on Laravel, business, and an eclectic mix of related topics.

Dave:

You're listening to Mostly Technical, which is brought to you by Lara Jobs, the official Laravel job board, and Screencasting .com, where you can learn how to create high quality screencasts Faster than ever. Now, Ian and Aaron.

Ian:

Welcome back.

Aaron:

We are back. Finally. It's been a few been a few weeks.

Ian:

Yeah. Longer than I thought, actually. I'm back. What's going We both had a lot going on, but but I think you a lot more than me.

Aaron:

So Yeah. So many so many directions to take this. So I'm back at work. PTO Oh. PTO is over for now.

Aaron:

Oh.

Ian:

I didn't realize

Aaron:

that. So, yeah, we have, we have 12 weeks of PTO, and I'm splitting mine 7 and 5. So we just have to take it all within 1 year of the baby or, in our case, babies Oh.

Ian:

Being born. That's awesome.

Aaron:

Yeah. It's really good. So, I got us through, you know, the break where the kids had the The big kids had no school and the holidays and all of that, and the big kids went back to school this week. And so I decided, all right, let's, you know, go back to work this week. And then later on, I'll take I'll take the next 5, and that'll be that'll be good.

Aaron:

So We made it through, you know, we made it over the 1st hump, which is kids are little kids are I think they're sleeping like 4 to 5 hours a stretch right now, so no longer up this is better. No longer up every, you know, every 3 hours for an hour, which is just a beating.

Ian:

How old are they now? How many weeks here?

Aaron:

So November 22nd is when they were born. So Oh. December 22nd. So not yet 2 months.

Ian:

Oh, yeah.

Aaron:

So just maybe, like, 6 weeks 7 weeks. Yeah. Something like that. Yeah. So That's

Ian:

huge though. From 0 to 6 weeks. They're total they're totally different at 6 weeks than 0. Like, they're much more real. Like, they're solidifying.

Aaron:

Yeah. So we still have we still have the night nurse coming maybe, like, 3 or 4 nights a week, and so we do get that kind of break every now and then. But when, you know, the night nurse isn't here, yeah, god, just twins are so different than having a singleton, I would imagine. I've never had a single baby. But twin are so different in that both parents are required every every time, the babies need to eat.

Aaron:

And so there is no, like, There's no, like, I'll feed them at 3 o'clock, and you feed them at 6 o'clock.

Ian:

It's

Aaron:

Yeah. You know, we're both feeding at 12, 3, and 6. So having those hours get stretched out has been super duper helpful. Still brutal. You know, still a kick in the face, but Right.

Aaron:

Getting a lot better. So that much is good. Everybody's healthy, which is you know? That's the number one thing. Important.

Aaron:

Yep. Yes. Just a close second after that is is Aaron tired, and it's like, yeah. I'm sleepy. So what's what's the deal there?

Ian:

We've been loving these photos, though, of you, like, sleeping

Aaron:

in random

Ian:

places. Yeah. Yeah. Those have been keeping everyone quite entertained.

Aaron:

Yeah. That accidentally became a thing, because I guess I've just fallen asleep a lot. Yeah. My wife I think my wife finds it funny to take pictures of me, you know, asleep at random places. And then the funniest one by Far was when I fell asleep at the gym.

Aaron:

And my sister-in-law was there, and she took the picture and texted it to Jennifer Vern said, I think your husband's having a hard time.

Ian:

Yeah. She, like, come and do like, just Check you to see if you're alive. She's like, oh, man.

Aaron:

She scared the bejesus out of

Ian:

me because she woke me up.

Aaron:

And I was you know, I had kind of, like I took my computer because I was, like, I'm gonna, like, freaking do some stuff, like free time, baby. And then I fell asleep. And so it was kinda accidental, and then I got woken up and it just I did the jump scare thing where I, like, woke up with a start. I don't know if, like, first

Ian:

6 weeks of the I don't know if 1st would 6 weeks of the new babies is Pete, go go back to the gym time, I think.

Aaron:

Oh, no. I only went to the gym because they had childcare. Oh, okay. I wasn't planning I wasn't planning on out. I was like, oh, maybe I'll work on my computer finally.

Aaron:

Like, I've got a free moment.

Ian:

There we go. No. No.

Aaron:

Are you kidding me?

Ian:

Just activity for the little kids.

Aaron:

No. I haven't worked out in years. Why start now?

Ian:

Well, we talked about this, I think, like, on one of the last podcasts, so I was wondering about that. But okay. It was Was this

Aaron:

a nice quietish place? It was purely YMCA offers an hour and a half of of childcare, so I took the big kids to to the childcare there.

Ian:

Right.

Aaron:

Yeah. And then, you know, I fell asleep off eating and fell asleep next to a crib and just all sorts of good you know, when you don't sleep, Anywhere is a good place to sleep. Yeah. So, yeah, kids are good. Family's good.

Aaron:

Life is good. Holidays were great. Yeah. We're making it.

Ian:

There we go. 4 kids. No biggie.

Aaron:

Four kids. Lot of kids. Lot of lot of kids under lot of kids under 3 turns out.

Ian:

Excited. Hopefully, the podcast is still going when you get to 6. When you get the next round of twins Yeah. Gonna be very exciting. Exciting.

Ian:

See what car you acquire then to fit everybody. It's gonna be awesome.

Aaron:

But one of the things about having having like, being a parent of is people will stop you while you're out and about and be like, oh, I know somebody that and so we've heard a couple stories, and one of them is, Somebody stopped us at a restaurant the other day and was like, are they are they all twins? I'm like, yeah. They're all twins. She said, I have friends that had twins and then got pregnant with, Quadruplets. What?

Aaron:

So they they had a set of 2 and a set of 4, and somebody stopped Jennifer, I think, at the hair salon or no because she didn't have the kids there. Maybe it was the grocery store And, said that they knew a family that had 2 sets of twins and then a singleton and then 2 more sets of twins. They ended up with 9 kids.

Ian:

I don't know. I I get the a lot of kids thing in the old days. It's like, whatever. A couple are gonna die right off the bat. Have, like, a bar or whatever.

Ian:

Yeah. Like alright. Yeah. Whatever. The older ones are raised, the younger ones.

Ian:

But in modern society, it's like, Oh, man. Having, like, 6, 7 kids, all the expectations on you as a parent, all the expectations on the kid, all the lack of Expectations on the kids helping each other. Like, there's just a whole different world that is just not set up for, like, you have 6, 7, 8 kids. I don't know. And and just doing it in the world, obviously, impossible.

Aaron:

I'm already nervous about, like, having enough quality time with 4 children. Man. And imagine there are 9 of them. It's like, I don't know how you Get to know them each individually. So

Ian:

I don't think yeah. That's why it's a whole different thing. Right? Like, I don't know if you do. I feel like you can.

Ian:

Yeah. Yeah. I don't feel like I get enough time in, like, 3. I'm like, how I don't even know do I do? Like I

Aaron:

haven't I haven't gone to the doctor yet, but we're done at 4.

Ian:

Right. Yeah. Lock locking it up. Yeah. For sure.

Ian:

Yeah. Yeah. Well oh, when you go out with all the kids, now do you have a quad like Stroller, or is it 2 double strollers? Or what's the play there?

Aaron:

I think in technical terms, we would call that sharding. So each each parent each parent gets 22 kids, so we have 2 double strollers.

Ian:

Okay.

Aaron:

Now importantly, Importantly, they're all interoperable. We have, like, a set of adapters that take, that, like so we have a jogger, and it was just, like, a more normal walking stroller. And we've bought adapters for the jogger that allow The big kids' seats to go on either stroller, and the little kids' car seats, you can take directly out of the car and put on either stroller.

Ian:

But, man,

Aaron:

I know. Can't afford you just can't afford to have individual strollers for every set of twins. Everything everything has to be multipurpose.

Ian:

You gotta be able to hot swap. Right? Yeah. Yes. You don't wanna have to move the special stroller around.

Ian:

No. No. No. No. No.

Aaron:

So the mini like, in In the same way, car seats all have to be uniform. So in the minivan, we've got 2 big kids and 2 little kids. In the au pair's car, we've got the 2 big kids, and then my forerunner, we've got the 2 little kids.

Ian:

Right.

Aaron:

So no matter who's going who's going where, it's like, alright. Is that the car you taking? Yeah. Like, Mom can take either set. Dad can only take the youngest.

Aaron:

Jasmine can only take the oldest. It's like, good lord.

Ian:

Man, when you get to switching out the car seats too, like, when they Wire and stuff like that. Oh, man. That's a whole scam, man. Yeah. Inspiring tar seeds.

Aaron:

Some bullshit. My I think I I got my hand slapped a little bit when my mother-in-law was like, you know, the car seats expire. And I was like, car seats don't expire. And she was like, Aaron, yes, they do. And I was like, oh, oh, oops.

Aaron:

Sure. Definitely, they do.

Ian:

But wait. What do you

Aaron:

freaking mean car seats Buyer.

Ian:

I don't buy. I'm not

Aaron:

It's not a it's not a can of beans. It's gonna it's plastic.

Ian:

It's not like it's getting thrown from the car and rolling on the grass. Like, It should still be within the safety cage of the car. Like, I mean

Aaron:

I'm fine expiring a car seat once per Catastrophic crash. Sure.

Ian:

I thought once you crash, you should get rid of it. Yes.

Aaron:

Get a new one. I'm fine with that.

Ian:

When it crosses over the little stamped on the I I don't know. I'm so glad we're out of car seats, man. Wait till you're out of car seats. You got a long way to go, but it's nice to talk.

Aaron:

And then and then the whole, like, who's allowed to buckle the Toddlers in not not just like based on the toddler's preference alone. Like, which parent is she going to say, you know, you have to buckle me in? And it's like, well, you know, that person's not here right now. Right. That person's inside feeding other babies, so you get dad.

Aaron:

That's all you get.

Ian:

Yeah. When they So anyway. They get that opinionated age, it gets tricky.

Aaron:

Don't they? Yep. Yeah.

Ian:

Alright. Well, that all sounds good. Yeah. Yeah. So that's I mean, I don't really have any news other than I was, fixed my database issue, which we can talk about.

Ian:

Yeah.

Aaron:

I wanna talk about that for sure.

Ian:

And then I just had a little round of COVID, so I'm just coming over that, but, just about we're covered. So yeah. So it actually kinda worked out Our little hiatus here anyway. Yeah. But, yeah, nothing too exciting.

Ian:

So let me just jump into some stuff. We are I will apologize. I'm gonna apologize right at the top that There was, like, 5 or 6 people who emailed us, which we didn't get back to, and a lot of it's getting into old stuff. So we're clean slate in the email, But I didn't read them all.

Aaron:

No. I know about that.

Ian:

Appreciate them. Yeah. Thanks for

Aaron:

your emails. Ian, this is the reason you didn't get one back. I just I'm just finding out about it, so this is all I need. Yeah. Like, through through your emails.

Aaron:

Yeah.

Ian:

Totally my fault. So, but thank you very much. So, Alright. What should we start with? What do you wanna do?

Aaron:

Let's start with, we could either start with the new shed quarters Or, model should be strict. I think I'm I'm primed on both of those.

Ian:

Let's go let's go model should be strict, And then we'll be

Aaron:

A Lev Lev model should be strict, so hit us with your tweets. Yeah.

Ian:

Yeah. So model should be strict. For those who don't know, is a Laravel, configuration option that you can put in your app service provider, that basically forces models, A few different things on the models forces them to not ever lazy load, and if you try to lazy load, it'll throw an error. And then it also prevents you from accessing attributes that don't exist and Setting attributes that don't exist, on the models, and it'll throw an error, I believe, in those cases. Mhmm.

Ian:

Mhmm. Mhmm. And yeah. So to me, when starting a new project, I throw that in there, because I'm not a lazy loading believer. I am very much anti the a the lazy loading.

Ian:

And so if you just have it in there from the start, I think that's perfect because you can just never do it. You're just gonna get errors, and then you can fix those errors. Obviously, if you're going to existing application, that's all different, and you might not be able to just throw that in, on full strictness. But for a new app, I feel like strict is the way to go. And you've I know you said you had some nuanced thoughts here, so I will be excited.

Aaron:

Love the nuance. Have the nuance. Alright. Okay. So you you tweeted a picture of your app service provider, which was interesting.

Aaron:

I do I I liked that. I wanna see more app

Ian:

service provider. Not many people. But come on, people. Get out there, find my tweet, and post your app service provider. There's all kinds of fun stuff with the app service provider.

Aaron:

There really is. So you posted model should be strict as enabled. Model should be strict does accept an argument, And you can set that to, like, basically, is the app running locally? And so you can say, when when I'm local, Let it be strict or make it strict, and when I'm in production, we'll let it be looser. So model should be strict wraps up 3 different Static flags, I guess, static pieces of configuration, model prevent lazy loading, and then prevent silently discarding attributes, and prevent accessing missing attributes.

Aaron:

And so my nuance is I think some of those should be enabled in production and some of them shouldn't, So I don't think

Ian:

You can individually do them too.

Aaron:

So can individually do it, and so I don't think model should be strict. I don't think it should be used, frankly. So here's here's my, here's here's my opinion.

Ian:

Hot take.

Aaron:

Hot take. So I think the difference is, Preventing lazy loading is primarily an application performance issue. Right. Right? So if, You know, basically, prevent lazy loading is, like, protecting you from an n plus one thing.

Aaron:

And If you have an n plus one in production, it's like, that's not great, but it's not technically wrong. You should fix it, But your application still works. Your users don't get errors. Everything is still, like, technically correct. Right?

Ian:

Potentially. Yes.

Aaron:

No. Definitely. Why potentially?

Ian:

Well, because, I mean, it can be so slow that it doesn't work, or it takes a second to load or whatever. Like, you know, there. Yes. In your most Within just general use case, that's

Aaron:

Within the bounds of normal distribution, it's still gonna work. It's just gonna be slow. Right?

Ian:

Yeah.

Aaron:

So that's primarily an application performance concern. However, prevent silently discarding attributes and prevent accessing missing attributes are totally application correctness concerns. Right.

Ian:

Those are bugs.

Aaron:

Yes. Those are issues. Those are behavior will go wrong is to prevent accessing missing attributes. And this is I I feel like Taylor regrets putting this one in because It's been removed from the docs, and it's kinda hard to find anything about. And it caused a lot of problems with, like, first party packages Because they were doing some accessing and missing attributes.

Ian:

Assume it's there. Right?

Aaron:

Yeah. Exactly. And so what this method does is, like, if you Partially hydrate your model. So let's say your database table's, like, a 150 columns wide, which can happen. You know, if you've been running an app for 20 years, it can happen.

Aaron:

And you're like, actually, I only need these 4 columns from my users table. And you pull those 4 columns back, and, like, Those 4 columns are first name, last name, email, and is admin or whatever. And then in your application, you try to go access, like, a a column that you didn't pull back from the database, Laravel's not gonna tell you, hey. You didn't pull it back. It's just gonna say, oh, that That value is null.

Ian:

Right.

Aaron:

And so to turn like, to prevent that behavior, you turn this, you know, you turn this method on. And If you accidentally don't pull back the column that it says, like, is blocked or something, and then you go check to see, is this user blocked? And it says, well, I don't know. It it you know, it's null, so they must not be blocked. That's a total application correctness problem, and that's like, That's a big, big deal, and I think people are like, ah, you know, I don't wanna throw an error in production if I access a missing attribute.

Aaron:

I'm like, yeah. You absolutely do Because that's a catastrophic failure if your if statement is checking for something that you didn't even pull out of a database. Right. And so I think those 2, prevent silently discarding, and that's where you're like, hey. I'm gonna set is admin, but I'm accidentally gonna typo it, And Laravel is just gonna say, oh, that column doesn't exist.

Aaron:

I'll just silently discard that. It's like, no. No. No. You don't wanna do that either.

Ian:

Right. So

Aaron:

I think prevent silently discarding and prevent accessing Missing attributes are application correctness and can totally hose you, so those need to be on in production and then prevent lazy loading as like a performance thing, and that should be off in production. Because if one sneaks through, it's not a bad thing. And you can also log if you turn it off, you can log Missed lazy loads or, like, when a lazy load violation occurs, you can log it. And so you still get the benefit of, like, It's showing up in the logs in production in this weird dark corner that you didn't test locally.

Ian:

So you're

Aaron:

not you're not missing the information. You're just not blowing up your application without without need. So

Ian:

Yeah.

Aaron:

That's my nuance. What do you

Ian:

think? It is a it is a weird grouping probably to some degree. Like, this this flag Handling all 3 of those is maybe a little bit weird because Yeah. They're not related, really. So, yeah, that is true.

Ian:

I I don't know. I think I I mean, I don't really have a hard disagree with you there. Definitely existing projects, you have to you Can't do the strict lazy loading thing.

Aaron:

I think that's a good nuance too.

Ian:

For that, that's for sure. But I just feel like from a new project, I just feel like It's very un I'd rather just have it on in the beginning. How am I gonna miss a corner? It's gonna be very hard for me to miss a corner if I have it on from the beginning. That's true.

Ian:

Some code that's, like, buried in a bunch of ifs, and somehow I never get down to it or whatever.

Aaron:

Run it locally?

Ian:

Yeah. Somehow I never run it even when I'm building the feature. Like, it somehow gets gets through, but so I don't know. I feel like if

Aaron:

you're starting to clash, it's like dynamic loading of relations, that could happen.

Ian:

Yeah. Yeah. Potentially. And then Yep. You know, I guess there is some nuances here of, like, is this a Worthwhile thing to be worried about.

Ian:

Right? For most people, probably not necessarily if you're just building, like, a side project thing and, Like or even an internal app where the load and Mhmm. Such is not significant. I think in my case where I'm doing this kind of next generation help Spot. I know a lot about the load characteristics.

Ian:

I know a lot about how many customers we have and how much it's gonna have to deal with. And so I'm being quite, persnickety about performance, and so I definitely don't want any lazy loading, but, This is out. So here's a side a little side quest based on what you brought up, which I think is quite interesting. What's your thoughts on, Defining the select and what you return versus just letting Eloquent star all always, And I don't know. What what do you think about that?

Aaron:

I think in 98% of use cases, you should just run uservare Get and not muck around with the select at all. Honestly, like and this is this is where I straddle, like Actually, this is where I'm an application developer and not a DBA, because which is weird because I work at a database company and teach for the database company, but I'm not a DBA, and I think that gives me a superpower that most people in the world aren't DBAs, and I don't, like

Ian:

I don't get lost in the weeds.

Aaron:

All DBAs will say, don't ever use select star. Only select what you need. Right. And it's like, yeah. I mean yeah.

Aaron:

Like, don't we have more don't we have more important stuff to worry about? Like, I don't super care about that. I think the difference is In the case where you do end up with a really wide table that does have a lot of blobby columns, so you've got, like, A bio and a, you know, last whatever that's 50,000 characters and all of this stuff or a JSON column that's a megabyte.

Ian:

Right. The baseline columns are big. Now that everybody uses baseline columns, that's a lot of

Aaron:

get really bad.

Ian:

More data, you know Yes.

Aaron:

Than people expect. The problem the problem is not Even or rather it's not only pulling the data back over the wire. It's also the database, at least MySQL, puts those really big blobby columns in a different Spot logically.

Ian:

Right.

Aaron:

And so, like, the row can only be so big in MySQL. And so if the column gets too big, that column is, like, reduced to a pointer, And the big blobby stuff is stored elsewhere. Yeah. And so my my point of view is if you're doing just like a CRUD app with normal stuff, just don't even think about Changing the select because you do end up getting hosed potentially, but if you have a long running app with huge tables and blobby columns, and You're like, man, I only need the first name and the email here. What am I doing?

Aaron:

Definitely, definitely change it. And then You must, turn on prevent, silent Accessing. Accessing missing,

Ian:

for sure.

Aaron:

So Yeah. I'm not a purist on select star at all by any means.

Ian:

Yeah. I'm sort of, like, on small things where you know It's a minor difference. Like, yeah, you're returning the created at time stamp. You're not gonna use it. Whatever.

Ian:

Exactly. Whatever. I'm not gonna worry about it too much. But, Like, for the main tables that are getting tons of action, I do return it. And, this is really only for help Spot, like, in other smaller things I've built, I don't worry about it, and I just whatever.

Ian:

Yeah. Who cares? But, for something where I know there's just gonna be tremendous implications. Like, it actually does add up when you're running hundreds of millions of queries, like

Aaron:

Oh, yeah.

Ian:

Because, you know, the network latency is always the worst part database lookup. Yep. And like you said, the disks. And then if you're on cloud infrastructure where the disk isn't your nice, fast, super on the server SSD, but it's, You know, a a network's hop of its own away from the server. Right.

Ian:

So now you're going to the disk, and then you gotta go to the special spot to get the blob and the whole thing. Like, And if your database is,

Aaron:

you know, if your database is, you know, 10 milliseconds away from your app server and now So in 40 minutes, I

Ian:

could put 1 query, and now you've got more queries and like And

Aaron:

you're throwing this huge amount of data across a longer wire because it's not on the same box. It's like, yeah. It is you know, you gotta decide. Is it worth it for you?

Ian:

Yeah. So there is, I think, some use cases where it's important to think about, and I think people don't ever think about it now. It just never comes up. Right? No.

Ian:

It's like nothing ever talks about that anywhere.

Aaron:

Yeah.

Ian:

And, obviously, for, like, 95% of the time, it's yeah. You probably don't need to worry about it, but I think it is important to be aware of and think about at least that key Key queries in your application where they're gonna get run a ton, where they're already maybe heavier, and things like that. Like, do you actually need to return Those 4 JSON columns every time Totally. That you're not even using

Aaron:

And things like that. Another factor is numb like, how large is The result set. If you're returning 2 rows every time, it's like, ah, who cares? If you're returning, you know, 35 100 rows

Ian:

Right.

Aaron:

Because you have to do some sort of post, You know, result aggregation on the app side or something, and you're just gonna ditch, you know, 35100. You're just gonna ditch, like, Thirty meg of JSON once you get it back. It's like, what are you doing?

Ian:

Right. Yeah. So Those things add up. So, think we're mostly on the same page there.

Aaron:

I think while we're here while we're here talking about your app service provider Yeah. You have a morph map set up.

Ian:

Yes. Yes.

Aaron:

Love a morph map.

Ian:

You're hot to have a morph map. This is what happy people have a morph map. Without the morph map

Aaron:

have it.

Ian:

It's chaos without the morph map.

Aaron:

I will say if we're if we're persnicketing Yeah. I would love to see you use enforce morph map.

Ian:

Yeah. I I wanted I don't know why I didn't do that. Think I had a reason, but now I don't know what it is. So I should switch it to enforced morph map, I think. I do want

Aaron:

it enforced.

Ian:

I want it enforced. I think there was a

Aaron:

weird We need it. We need it enforced.

Ian:

I wanna say I always feel like there was some kind of bug I hit or something weird like that, but maybe I have to go back and look at it. But I do want it to

Aaron:

be a podcast.

Ian:

I don't ever want it to accidentally shove in a pool

Aaron:

Class path. And then have to undo that somehow. So for the edification of the listener, the the the the morph map is when you have, like, a polymorphic relationship. And By default, Laravel will put the fully qualified namespace in the database. So you'll look in your database and be like, what does this image belong to?

Aaron:

And it'll say, like, app models comment, App models blog post, and you're like, man, guess I can't refactor those class names anymore because it's now, you know, it's now hard coded in my database. And so the morph map will say, hey, instead of putting the fully qualified class name in there, why don't you just put the word image or the word comment? And then you're free you've now broken that association. You're free to, like, change it. Enforce morph map says, Hey.

Aaron:

If I don't have a map for this model, I'm not gonna just fall back to putting the fully qualified class name in. I'm actually gonna throw an exception, and you're host. That's what you want for sure. That is a 100% what you want. Yeah.

Ian:

And then there is another element since we're on our performance kick. If you use the morph map, then you can potentially

Aaron:

Oh, yeah.

Ian:

Store that in a character, a defined length character column, like maybe 8 characters or something As opposed to just a bar car. And then again, you it'll stay on the on the page in the database, so it doesn't have to make a separate call out over to the blobby area where it just shoves random strings, and so that then will increase your performance on those queries too, and again, if it's, like, in a high performance location Yep. Where you're gonna have a 1,000,000,000 rows or whatever, like, Having only 8 characters there instead of undefined long characters that always has to go grab actually adds up. So

Aaron:

Okay. While we're volleying while we're just bat

Ian:

Back and forth,

Aaron:

let's Volley away. I enforce morph maps with tiny integers, unsigned tiny ints.

Ian:

That I I like your style, sir. I like your style.

Aaron:

So I map I map, you know, app models comments to number 1. App models blog post to the number 2. Then what that also so everything you said is correct. Also, additionally, you get smaller indexes. Because the whole point is The whole point is Laravel is gonna put an index over the type and the ID, and you want your indexes to be as small as possible so you get more and more and more into memory as possible.

Aaron:

Yep. And so if you have a tiny integer that ranges from 0 to 255, which means you can have 255 models, which you will never have. Right. You can fit all of that in a in an even more compact index. So enforce morph map with an integer instead, and You may see potentially microseconds of improvement in your Well

Ian:

but I so think about this, though. People don't realize that, a tiny integer is a single bite. Okay. And, even, 8 character long car column is 8 times 4. It's a 32 bytes.

Ian:

Then usually an extra for this for something overhead or something. So, like, 34, 35 bytes verse 1.

Aaron:

Verse 1. Yes.

Ian:

35 times bigger to have that string.

Aaron:

Yes.

Ian:

And that's 35 times more data in your indexes and everywhere else. So

Aaron:

should be in memory where where

Ian:

Would you want to in the buffer pool if you're in my metro land?

Aaron:

Does matter. Yes. So I'm not talking about saving disk. Yeah. Talking about memory.

Ian:

Very, very important type of everything. All the indexes at least fit in the buffer pool. Yes. Yeah. And then so this is a I go back and forth on this.

Ian:

Let's I'm gonna I'm gonna throw 1 back over the over the net where

Aaron:

Volleyed. Ping pong.

Ian:

Let's go. Right along these lines so I'm a huge fan of the Nooms. I love the new PHP Nooms stuff. Like, it's so good. I have Nooms everywhere.

Ian:

And it's like, do I want though they're all backed because they have to go to

Aaron:

the database. Gotta be backed. Yep.

Ian:

But are they back to a number or are they back to a string? The numbers say, I mean, just Tons of bytes saved, especially in, like, our main the main table has, like, a whole bunch of things that are nooms Yeah. And, it could be a tiny in, and it would be 1 little bite Yep. Or it's gonna be, you know but obviously, it hurts the readability in some places, sometimes to have it that way. I don't know.

Ian:

What are you thinking? Right now, I have them as string backed, but I'm I'm teetering. I'm probably gonna move it to into Jirbag because it's so much more efficient. But

Aaron:

I think my my first my first thought is I've never in my life heard it called an Enoom. Oh, wow. I don't know that I've I've never said it out without it.

Ian:

I don't know if I've ever said it out loud.

Aaron:

In my head, I'm just now realizing

Ian:

your head.

Aaron:

Know that I've enum.

Ian:

An Enum? Enum. Is it the Enum?

Aaron:

So I put it on the e, and you put it on the num. So I'm Enum, and you're Enum. Alright. So people have to

Ian:

tell us. Comment down below. Subscribe and comment. And when you do, let us know.

Aaron:

Boost boost that engagement. Tell me what it is. Yeah. Okay. So I just

Ian:

I know you're distracted now. You have no idea what I even said. Yeah.

Aaron:

I don't know. It was great. Enums are awesome. Next topic. Okay.

Aaron:

So, I think, Yeah. It's a trade off. So for the, for the user who is listening, we're only talking about PHP enums. I don't use database enums because I find them annoying.

Ian:

Not a believer.

Aaron:

Not a believer. They actually the database enums Solve this problem in that you get the readability of the string. Oh, okay. The underlying storage is actually an integer. But the huge drawback is you have to alter the table, To add a new option, which is like,

Ian:

you want to freeze

Aaron:

and waste. So I I think I personally prefer, shoving it all in there as an integer and dealing with the readability thing. But that's just so personal because I'm not, Like if I'm, you know, I don't code at PlanetScale, so I don't have to I I'm not on a team. Anytime I'm doing stuff like this, I'm just doing it myself. And I don't have a huge habit of like doing, a lot of reporting or an anal Analytics analysis, that's the word, analysis, just like from TablePlus.

Aaron:

Right? And so if I were, you know, if I were Doing a ton of raw SQL analysis, and I'm always like, Well, f, like, what does 1 mean here and what does 2 mean there? I would get Probably frustrated, but most of the time, it's the application that's talking to it, and so I don't super care.

Ian:

Yeah. I mean, we're not in the database that much. You know? Sometimes you're in there to help customer or something or whatever, but most of the time, and even that I'll oftentimes there's like some admin panel or whatever you're interacting with. So it doesn't, it still doesn't matter.

Ian:

And it's just so huge because it's like, if you have 5 of those columns and each one's taking 40 bytes when they could take 5 bytes. So if 200 bytes instead of 5, that's a lot of memory, and memory is expensive. That's what you're paying for. That's the big dollars just to get the memory.

Aaron:

Yep. I mean, there are I don't know. I don't know if at this point it's worth it, but you could do a strict 4 character column with A care set or char set or car set that is Right. That is, less expensive than UTF 8 multibyte? Because those are 4 bytes per character.

Aaron:

Right. But there are some that are 3.

Ian:

I think with I think with single store, it's all UTF 8, but maybe in my sequel, it's not. I don't call.

Aaron:

Correct. Yeah.

Ian:

I guess I guess we can change the car set, but I can you change the car set on just a column? I guess you can.

Aaron:

You can. Mhmm. Okay. Because you could have a binary you could have a binary car set on column, and that's just raw raw bias.

Ian:

Also get into, like, yeah, flip flipping flags on bit

Aaron:

Hell yeah.

Ian:

Or whatever. I don't know. I don't know how that stuff works. That other stuff that's all is too bad.

Aaron:

I got a video on that. Go to PlanetScale channel. I got a video on storing Storing flags in a single integer column using bit masks.

Ian:

Right.

Aaron:

Totally unhinged, completely unreadable. You wanna talk about unreadable?

Ian:

Yeah. That's weird.

Aaron:

When you go to a column and you look at it and it says 17, and the row below it says 16, and the row below that says, Like, what's another one? 9? And you're like, what do any of these numbers mean?

Ian:

It's not

Aaron:

That's really interesting. So, yeah, the PlanetScale channel has a A video on that that I find very interesting and probably a a bad idea

Ian:

was Yeah. That might be that might be a step too far in the maximum efficiency I think it is. Direction?

Aaron:

If you're doing that, you better have a good reason. Right. And at that point, I'm just trusting that, like, you know exactly what you're doing because you're reaching for a really esoteric solution.

Ian:

Right. Yeah. You're at some very crazy scale where you you're you're trying to eke out every little Minutiae ounce of

Aaron:

performance. Exactly.

Ian:

I'm not all the way to that. Alright. Shedquarters. If we don't have another database column back and forth here. Shedquarters.

Ian:

Alright.

Aaron:

Should we

Ian:

do it? Let's do it.

Aaron:

Ian. 4 kids.

Ian:

Yes.

Aaron:

It's a lot of kids.

Ian:

Yes. It's too many. A lot of kids.

Aaron:

Too many. It's just enough. Just enough, but it's too many.

Ian:

It's gonna be okay.

Aaron:

So, you know, when we found out we were having another set of twins, we moved out of the house, sold the house, to which the shed quarters had become fundamentally attached. Right? There's a world in which I move it, but I think we got more value from selling it than we did Right. I would ever get from moving it.

Ian:

Yeah.

Aaron:

So we moved into the rental where we currently live right now. Mhmm. And, I am in a 9 by 9 room that, directly through these glass doors, is

Ian:

I've made that decision too. Glass doors. Terrible idea. Terrible.

Aaron:

Like, our our single we don't have, like, a formal dining and a normal dining. Not the the Vanderbilts. We have 1 dining room. Yeah. So the kids sit right there, you know, when they're eating, and they're, you know, screaming at the toys and stuff like that.

Aaron:

It's like Not optimal. Not optimal. And now there's 2 more of them that, you know, she's out here in the living room feeding, and I don't wanna be like, hey. You gotta go in the back where you know, darks because I'm I'm working out. I was like, no.

Aaron:

That's

Ian:

Let me interject here for one second. So when we Okay. Started HubSpot and the company, we had a condo I mean, no kids. And it's 2 level, nice little condo. And my office was, like, in what?

Ian:

The dining room. So it's like Yep. In the dining room and then the little 4, like, dining room table thing. And we had our 1st kid, and Jamie be in the living room, which is right next to all this, like, playing with the kid, doing whatever. And then if I had a phone call I was just doing support too, and I was answering the phone.

Ian:

And we'd have this thing where we I don't know how we got calling at this, but we started calling it illegitimate family. And so I'd be like, a legitimate family. And she'd be like, okay. She'd scoop up the kid and, like, run upstairs to, like, the farthest away bedroom so that, like, he's

Aaron:

Crying or yelling or whatever, and

Ian:

I'm like, I'm on the phone. And this is all, like, a 1000000 years before COVID, and everybody works from home, and you just expect

Aaron:

people

Ian:

to have people in the background. Like, You know, it's like a business. I'm being formal and business y. Right? And it's like, no.

Ian:

We gotta, like, run away with the child because there's, like, not enough room in this Please stop stealing.

Aaron:

Illegitimate family. History. Family.

Ian:

Yeah. It was very Yeah. Anyway, continue on. So you got, glass doors.

Aaron:

Yeah. Glass doors, I've done the best I can

Ian:

with treatment,

Aaron:

people yelling, people screaming. Also, like, it's very, very nice to be able to walk out and, like, Say hi to kids and play and laugh, but they're also getting the big ones are getting to the age where it's, like, oh, dad's out. Come jump on the bed with us. I'm, like Right. I really I can't do that right now.

Ian:

Yeah. That's its own issue. Yeah.

Aaron:

Yeah. And that, like yeah. So, We, Jennifer and I, started talking, and I was like, I don't think I can work in the in the house anymore. And she was like, I think it would probably be Better for you to not, because part of the problem is if I'm gonna record videos, my windows are so small, like, while they're napping, if they nap, And then at night. And it a lot of it, frankly, has become record at night, and that's just I don't have the same energy to do that now that I have These other 2 that I'm feeding at night.

Aaron:

Right?

Ian:

Yeah. So I

Aaron:

gotta get my work done during the day like a normal person. Yeah. And so I started thinking, like, why What what could I do here? Like, what what are the what are what are the common solutions? Like, what is common to man?

Aaron:

I would go get an office. Right? That

Ian:

Right.

Aaron:

Very normal. I I would be so boring if I did that. Right? So I went and looked at, a few offices and emailed some people. Office space is expensive.

Aaron:

Yeah. It's very expensive.

Ian:

Nearby? Or, like, sometimes there's coworking.

Aaron:

Yeah. There's co working, and there are offices in co working. The problem is, the problem is I need a lot of space. Right? Because I've got I've got to set up cameras, and I've got to set up lights, and I've got, a bunch of very expensive equipment that I need to keep in this and so that's an issue on its own.

Aaron:

And so I'm, you know, I'm emailing, like, like, Regis as a big, like, rent your own office Kinda conglomerate. And they're like, you need an office for 1 person? Great. We have a, you know, an 8 by 10 office. I'm like, no, that's What what I'm in now, and I'm barely, like, I'm barely making it.

Aaron:

Tell me, like, tell me what a 10 by 20 is. And they're like, oh, so you want 6 desks in there. What? No. And, of course, you know, they price it out for a company that's trying to house 6 people.

Ian:

Right.

Aaron:

This is stupid. I don't need to do this. I'm a I'm a very I'm a very creative person. So I started looking at apartments.

Ian:

Oh, I would've thought that.

Aaron:

Look at that. Looking at apartments Near Hi. Nearby our house. So the closest office was, like, 15 to 20, 25 minutes away. Very expensive.

Aaron:

The closest apartments, Ian, are 3 minutes from our house, literally. 3 minutes. Dallas is blessed We're cursed with an abundance of apartments. We got apartments everywhere.

Ian:

Like a little politicalist. It's like Pierre de Tete or whatever. It's like when you have a Yeah. House in the city and your house in the

Aaron:

I don't know what that means, but I think that is actually exactly what it's called. Yeah. And so I started I went and toured a bunch of apartments, and I was like, hey, Apartment guy. Here's the deal. I want a studio apartment because I'm not gonna I'm not gonna live here, man.

Ian:

Yeah. And he

Aaron:

was like, what do you mean you're not gonna live here? I'm like, I

Ian:

I'm gonna be the best neighbor ever.

Aaron:

Yeah. Exactly. I'm gonna be here from 9 to 5 when everyone is gone. And then when everyone's home, I'm gone. So I told him like, Hey, I make a lot of I'll make a lot of YouTube videos.

Aaron:

I have, you know, a full time job. It's not like I'm going to be bringing, you I'm not going to be holding meetings here. It's literally just me, but I need a big space, a safe space. I need like a place where I can set everything up and leave it. And so I toured I toured maybe 6 different apartment complexes.

Ian:

Thing.

Aaron:

And I signed a lease For an apartment. I've got an apartment now.

Ian:

You know, I love that you the a huge upside, though, is, like, you got your own kitchen. You got your Bathroom, like Dude very nice.

Aaron:

Yes. Yes. Versus the co working. The apartment, and I, I'm I'm gonna Tweet this today. And so by the time people are hearing this, hopefully, they've seen it on Twitter.

Aaron:

The apartment is going to be called the PlanetScale Studios.

Ian:

So There we go.

Aaron:

It it's gonna be a it's gonna be a permanent video setup in so it's this is actually a 1 bedroom, Because at this complex, it was cheaper to do a 1 bedroom than the studio at the other complex, and I was like, what do I care? I just want the cheaper one. So it is a 1 bedroom, and so I'm gonna set up every all the lights, and I got a new camera, I got some different lights.

Ian:

What camera? I'm like

Aaron:

upping upping the production

Ian:

Paulie, I

Aaron:

got I got a, I got a Canon r six.

Ian:

No Sony? You didn't go Sony?

Aaron:

No. I'm saying Canon family. So new camera, bigger lights, better lights, better desk, better backdrop. So I'm upping the hold.

Ian:

You gotta set up the bed.

Aaron:

There's no bed. I'm not gonna have a bed.

Ian:

You gotta have a bed.

Aaron:

No. There's no bed.

Ian:

A bedroom. The bedroom is for the bed.

Aaron:

No. The bedroom is for the studio.

Ian:

Way Either one of you could go bail and crash at at this place.

Aaron:

That's actually that's actually one of the rules is, was like, I think this is a great idea. You can't leave me alone and go nap. And I was like, yes.

Ian:

She can go she can be the one who who goes with these alone.

Aaron:

Okay. We'll talk about yeah. We'll talk about But but, typically, a nap couch. There's there's a room

Ian:

for a bed. The whole What's in the living room?

Aaron:

I don't know. 2nd set or something. I don't know. We'll see. We'll see.

Aaron:

That?

Ian:

Oh, man. Alright.

Aaron:

Yeah. Yeah. Yeah. We're doing the whole thing. So Alright.

Aaron:

At the PlanetScale Studios, I'm gonna Is this corporate

Ian:

sponsored here? Is this is this, like, official, or is it something

Aaron:

This is this is official. This is the official planet scale studio.

Ian:

I like it.

Aaron:

Yeah. I like it. And so I'm building out a new set, and I'm gonna set you know? So I'm gonna, like, try to hang the lights from the ceiling. It's gonna be kind of fun because it's like, you can't really do a lot in an apartment.

Aaron:

Like, you're not allowed to, like Totally. Screw stuff to the wall. Right. So it is gonna be a fun a fun project. But so benefits are it's gonna be so quiet.

Aaron:

It's gonna be so quiet. You know, everybody Everybody's at work during the day. I'm gonna be at the apartment during the day. The good news is I was completely forthright with the leasing agent, and he was like, yeah. I don't that's fine.

Aaron:

I don't care. Like, you're gonna be a you're gonna be a good tenant. That's fine. In the lease, it says you can, like, perform business out of there provided it is like a work From home business, and you're not having people come. And I imagine they added that once, you know, COVID hit.

Aaron:

That was like, yeah. You all work from home.

Ian:

Right.

Aaron:

So I'm I'm well within my lease rights. It's gonna be very quiet. And then, yeah, I've got my own bathroom. I've got my own kitchen, and so this is gonna unlock this is gonna unlock, A new, like, a new vector for healthy living for me because, you know, I tweeted about it, but I've been in a lot of physical pain recently, which we can talk about later. But This is gonna be like, okay, instead of leaving the house every day because you want to get out of the freaking house and going to pick up, You know, Chipotle, Chick Fil A, McDonald's, just because you you need an excuse to get

Ian:

out. Right.

Aaron:

You can, like, you can, like, Make lunches in in the quiet kitchen where you're not feeling like, I've got to get out of this house. Yeah. And so, For for a future show, I'm I'm gonna be a smoothie guy. I'm becoming smoothie guy.

Ian:

I've done some rounds on the smoothie,

Aaron:

fun fact. I I eat kinda like, You know, if you have a 12 year old nephew, that's basically how I eat. Like, I I kinda just wanna handle

Ian:

her for some chicken yes.

Aaron:

Chicken nuggets, like maybe some pizza. That's basically what I wanna eat all the time.

Ian:

Probably not all the time.

Aaron:

Like, you you give me an avocado, and I'm like, I'm not touching that. Can you send it back? I got I got some Avocado on my on my quesadilla. Can you send it back? Yeah.

Aaron:

And so, you know, I've started doing these smoothies over the break as a way to, like, Hopefully, change my diet a little bit to decrease Mhmm. Maybe pain in inflammation a little bit.

Ian:

Yeah. And you can find a lot of stuff in there.

Aaron:

Yeah. You can put anything in there.

Ian:

Spinach. Always put spinach is just baseline. You always put

Aaron:

spinach. Spinach. Avocado.

Ian:

All kinds of stuff.

Aaron:

All kinds of random crap. You can just, like, put it in there, and you put a glob of peanut butter, and you're like, peanut butter smoothie. You can't? I will say just away.

Ian:

You do have to be a little bit careful if if you have a weight loss goal. I don't know if you have weight loss goal, but if you have weight loss goal, you can make a smoothie that's, like, 1500 calories, and you're still hungry at the end. You're like, okay. I have the smoothie. Because, yeah, like, once you put a bunch of peanut butter and avocado into this and that, like Yeah.

Ian:

Totally. It's super calorie filled, but they're yeah. I love smoothies. They're awesome. Get some good protein I like the naked Protein powder?

Ian:

Naked something.

Aaron:

I think we actually got that. Yeah. I got some unflavored protein powder for it. Yeah. My wife has been running the show on that.

Aaron:

She's the boss, and she just, like, Hands me a smoothie, and I'm like, what's in here? And she just drink it. And it's great, and

Ian:

I love it. Yeah. I

Aaron:

like that as well. That's gonna that's gonna open up because I'm gonna have a refrigerator there. Where where am I gonna oh, what am I gonna put in? I'm just gonna put, you know, bags of frozen fruits and veggies in the in the freezer.

Ian:

That's perfect. So it can just sit there. It doesn't go bad and all that stuff.

Aaron:

You just

Ian:

need, like, some milk or almond milk or whatever you're gonna put as a liquid, and that's it. Or water even.

Aaron:

So And then this is this is just I I'm I'm blowing my own mind here. Apartments have gyms.

Ian:

Oh, free gym membership.

Aaron:

Apart apartments have gyms.

Ian:

Genius.

Aaron:

I'm gonna I'm just gonna be able to walk downstairs, so I'm gonna take, you know, 10 minutes to make a smoothie at lunch. What if I take another 20 to walk downstairs, do a little bit of workout, come back, Crush some videos.

Ian:

I think you should.

Aaron:

How's that sound?

Ian:

You should absolutely try to take lunch. I think taking lunch is underrated. Take lunch because you're going to work. You know, I know at least that you have been doing this. I assume you're going to continued somewhat like you're working at night.

Ian:

Yeah. After the kids go to bed, right? So, like, when you work straight through, and you don't even take lunch. And then, like, yeah, you get your couple hours at home with the kids, and then you go back to work after we're sleeping. Yeah.

Ian:

That lunch break is kinda huge. So, like, yeah, If you guys have a exercise in it. Yeah. Like, even just a walk, like, the the apartment complex will still be it'd be a good place just to even walk. Like, just literally take your smoothie And, like, go walk around the complex, like, for 30 minutes, listen to audiobook or whatever.

Ian:

That's the

Aaron:

price point.

Ian:

Yeah. So I would try to put some of that stuff in. But, yeah, that's I mean, it sounds I love this plan.

Aaron:

And it's cheaper than the office quotes that I got. It's cheaper the all of these amenities, and it's cheaper than getting an office in some boring soul sucking building.

Ian:

Yeah. Yeah. I don't think you'd wanna be on office on your own. I like my setup here is nice because I have my cousin and my brother, so it's like some human interaction, but just to, like, be Just to get an office office where you're just straight by yourself, I think is pointless. The you know, in a co working space is At least adds a little human interaction, which is probably good, but at the same time, you're at a point where, like, your time for human interaction right now is limited, in terms of, like, making new friends and stuff like that.

Ian:

So I've I've no I'm probably not

Aaron:

all the way to this point. New friend. What do I need a new friend for?

Ian:

So Yeah. It's probably not a huge concern right now. So, no, what's your plan gonna be? Are you trying to go there all day? Are you gonna do half days?

Aaron:

No. It's all day.

Ian:

Okay. All day.

Aaron:

Yeah. This is like I I leave the house to go to work like it's the 19 fifties.

Ian:

Okay. What, I guess you still have the au pair at home, right, during the day?

Aaron:

We do. Correct. Yes.

Ian:

So that's good. So you have there's there's some help there, and you're only 3 minutes away if you needed to.

Aaron:

I'm only 3 minutes away provided everything melts down or whatever.

Ian:

Or come back home.

Aaron:

And maybe, you know, maybe I do come home for lunch. Yeah.

Ian:

Right. Yeah. That's a huge thing too. Like, eating at home It's always better. But so I'm a big eat out guy too, but,

Aaron:

you know, you're

Ian:

always better when you're eating at home.

Aaron:

You're always just For sure.

Ian:

Better in every way. Yeah. Well, I like this plan. I think people are gonna be surprised. So I

Aaron:

think so. I'm I'm so excited. It's it is just like It just is it's just got my name all over it. It's just, like, weird enough that people are like, what are you you're doing what, man?

Ian:

Right.

Aaron:

But it's just like it's It's Giga Brain. It's like, oh, dude. And we didn't even cover the last amenity. Apartments have pools.

Ian:

Oh, yes. That's you could bring your crew there and boom.

Aaron:

I could bring my crew there in the summer.

Ian:

I love this idea.

Aaron:

I basically I basically Just got a country club membership.

Ian:

I just can't say it's a country club. Yeah. I like this

Aaron:

stuff. If I were if I were a wealthy man, I would have an office and be a member of a country club. Instead, I have an apartment.

Ian:

But it's just as good. It's better.

Aaron:

It's just as

Ian:

a country club, you don't have a private area all to yourself anywhere. You're in the locker room or whatever. Like I know. Like, you got your own space here. So, Yeah.

Ian:

So I I kinda

Aaron:

I kinda freaked out and was like, I gotta get out of here. I'm gonna go look at offices. Was disappointed by the price and the the benefits and then was driving actually, was driving home and thought, oh, there's 6 apartment complexes right there. I wonder what I can pull off there. And it was cheaper.

Ian:

So So do you have it? Are you in, or are

Aaron:

you walking yet? The lease has started. After we get off this call, I'm going to get the keys.

Ian:

Oh, man. Wow.

Aaron:

Today is literally the day. Yeah.

Ian:

We're gonna have update images. Oh, there's gonna be

Aaron:

so many updates. There's gonna be so many pictures. It's gonna be great.

Ian:

I wasn't It's gonna be in the Aaron Francis Band Club for the original Shedquarters build out.

Aaron:

The Shedquarters Stadium. Yeah.

Ian:

For to to get to experience this now.

Aaron:

Yeah. This is this it's content, baby. It's such good content.

Ian:

Everybody loves the home office. People love the home office story.

Aaron:

Yes. And it's gonna be great it's gonna be great for PlanetScale because it's literally gonna be you know, when I announce it on Twitter, this is the new PlanetScale Studios. Yeah. It's like, how cool is that?

Ian:

Oh, I know what you need to get if since you have corporate sponsorship, you need to get one of those custom, Like, LED neon light things, like the Planet Hill Studios or something? Okay. Yeah. Yeah. Yeah.

Aaron:

We're doing it. That.

Ian:

Yep. I love it. Gonna be Yep.

Aaron:

We're doing it, and that's gonna be an ever present fixture in the backdrop is Right. A custom a custom planet scale LED. It's so cool.

Ian:

It's gonna be sweet.

Aaron:

I'm so freaking pumped.

Ian:

I like this. This is Yeah. This is great news.

Aaron:

In this wild, what did you expect? Did you expect apartment?

Ian:

No. I I figured I I wasn't sure. It seemed you seemed tricky about the talking about it. Right? So I was like, we can't just be like, I know you're renting, so you're not gonna build something.

Ian:

Like, maybe it's like a RV that you're gonna park back there or something. That's not really great for the video unless really got it. I mean, some probably would work, but I don't know.

Aaron:

Boy, that'd be expensive, but that would be

Ian:

a scary call. Some kinda, like, trailer that you can, like, move more easily with the idea that Gonna move it or, but, yeah, apartment, I like this. This is way better, I think. This is I think you nailed it. This seems Yep.

Ian:

Optimal. Hopefully, you have a good neighbor and not some some Crazy neighbor.

Aaron:

I know. Hopefully, I don't have a neighbor that's also home from 9 to 5.

Ian:

They have their loud or something during

Aaron:

the bed.

Ian:

Yeah. Something or they have they have 6 kids, and the walls are thins.

Aaron:

Exactly. There's a few

Ian:

risks here.

Aaron:

There are there are definitely a few risks.

Ian:

But I

Aaron:

think it should

Ian:

be fine.

Aaron:

When I when I told my, A few of my friends I was doing this, they were like, dude, have you ever been to an apartment? It's so loud. And I was like, okay. So hang on. First of all, This is a good like, it's a good apartment complex.

Aaron:

Right. Like, it's not it's not the cheapest one in Dallas, for sure.

Ian:

Right.

Aaron:

Also, I think I think I'm I'm basically working the reverse schedule as everyone else.

Ian:

Right.

Aaron:

So my my understanding or my my guess is that The frustration with apartments being loud is at night when people are watching TV and screaming at the TV or on the weekends when they're at the pool Dorking around and listening to muse music of the youths. Right? And so I'm I just don't think I'll be there during those So that's my hope. Yeah. I could be proven hysterically wrong, and that would be a good concept.

Ian:

Be a huge one too, but you're definitely most of the year, we'll have Kids will should hopefully be in school, and so that shouldn't be too much of an issue other than maybe summertime or whatever. So

Aaron:

Yes. Totally.

Ian:

Yeah. I think the risks are are low.

Aaron:

Yeah. So Alright.

Ian:

I like it.

Aaron:

So exciting. So, yeah, look forward, you, Ian, look forward to a tweet. Everyone else, hopefully, you saw my tweet,

Ian:

glad that you didn't hear this. Alright. So then during our hiatus here, you also said you're doing a static site Package? Like, what the hell is going on? Are you doing No.

Aaron:

Don't bring don't bring those curse words at me. I mean, you're so frustrated. What the hell? So here's the deal. I was on

Ian:

the How much stuff did you do?

Aaron:

No. Not it's not too much. Not not enough. I was on, it called? Overengineered with boss man Chris?

Ian:

Listen to that. She listened. How did

Aaron:

you know that I was doing this then?

Ian:

Oh, I think I saw it on Twitter. Yeah.

Aaron:

Oh, man. That's crazy. Yeah. Yeah. It's not it's it's really not.

Aaron:

One is it hasn't Been started besides, like, coming up with a dope name for it that I can't share now.

Ian:

Oh, boy.

Aaron:

So a dope name and some branding. And the the idea here is that, like, I think I can offer a way to build static sites with vanilla native full on Laravel, And then have, like, really strong first party integrations to the static site hosts such that, You're like, alright. I built my site. Now I wanna run it on Netlify, and you can just say deploy Netlify, and it'll handle, like, setting up, You know, redirects based on how the Netlify platform works. Maybe that's middleware, maybe that's a configuration file, maybe that's edge middleware, setting up, like, OG images and syntax highlighting and getting it all deployed, that kind of stuff, and, like, having it as a GitHub action as well.

Aaron:

And so it's really not It's not something like Nuxt or Next where it's this huge framework on its own. It's kind of this package that's like, hey. Build out everything you want with, you know, route model binding, and then we will figure out all of the final URLs, and we'll construct a package, that is conforming to any of these, you know, 10 different first party, static host from GitHub pages to Cloudflare pages to Netlify to Vercel, and then we'll just push it out there, and here's a GitHub action to do it. So It's not huge. I think it is pretty cool, and we'll see when it gets done.

Ian:

Could be something that goes back burner. I could foresee.

Aaron:

Oh, yeah. For sure. Yeah. And could be could be something that's, like, basically, I build it and use it myself, and then that's how anything ever gets pushed on it. It's like, oh, I need this now, and I'll build that out myself too.

Aaron:

I know you have you have so many problems with my static site that you're like, don't I don't think it's a good idea, but I think it's a great idea. No. I I

Ian:

don't think that. I think I don't know if it's a good idea from your time perspective. Like, I don't know if this, like, pushes screen cast thing forward? Does it push Yeah. Into channel forward?

Ian:

Like Probably not.

Aaron:

I think it will help. That's one of the things I'm discovering about, making YouTube videos is I need to personally, I feel like I need to have real projects from which to pull

Ian:

I was thinking about gives you something to do.

Aaron:

Yeah. And so this is like a this is like a content muse, kind of. So we'll see. But Like I said, I need to put a database project then.

Ian:

You need some kind of heavy database thing.

Aaron:

Well, yeah, for for the PlanetScale side, yes. But for the personal side, I need some Laravel stuff too.

Ian:

As much. Yeah.

Aaron:

So yeah. So like I said, I haven't actually started on it, but it's cool, and I took your name for it. It's kicking around.

Ian:

Name is important. You got the good the ring in your name. Yep. Yep. You're halfway there.

Aaron:

I'm halfway there, so look for it in 2025.

Ian:

Alright. So the other item we had on the list was my database woes of the MySQL and out of Control memory and all that stuff. Yeah.

Aaron:

And it sounds like you cracked it.

Ian:

8 weeks of that or 7 weeks of that or whatever, freaking insanity. This is the the sad part of SaaS where you think it's all happy and fun. It's not happy to babysit a database server for 2 months. Yeah. But we are over it.

Ian:

We figured it out. Yeah. I was basically We're gonna get super esoteric, but there's this thing called table open cash, which is probably

Aaron:

this in my life.

Ian:

So there's table open cash, which is how many tables you can put in the cash when like the table definitions, the database system stores.

Aaron:

Okay.

Ian:

And then There's you can have a set number of instances of that cache, and the recommended amount in the Documentation is 1 per CPU, which is what we had. So we had 10,000 tables set as the cache. We had 16 for the number of instances of that cache. We had tried making the the open table cash lower and higher down to, like, 500 up to 20,000, like, everything in between didn't impact anything. K.

Ian:

But the number of instances Apparently did because when we dropped it from 16 to 4, everything was perfect, and it all worked magically and everything's fine. To change that is not dynamic. Open table Cache is dynamic. Open table cache instances or table open cache instances is not dynamic, so you have to restart the server. We can actually do without downtime now because Amazon launches new thing, which is actually pretty cool called, blue green, migration.

Ian:

So you can Basically, build a clone of your environment, and then it'll just DNS switch over when you want, and the clone has different parameters set. So we were able to do it. It just costs money, but it doesn't Cost downtime, so we're able to do it with no downtime, but it was annoying. And something I didn't change initially because it was annoying, and the doc said you shouldn't really have to. We were set up appropriately, but my x, whatever.

Ian:

Nobody cares. So change this and it Memory's a flat line. Server's super stable. Everybody's happy. Everything's fast.

Ian:

Everything's wonderful.

Aaron:

So how in the world did you Did you find this? Was this Percona? Had they seen this before, or was this just like

Ian:

No. They hadn't seen it before. So the good The good news is Wow.

Aaron:

Good for them.

Ian:

It was for Kona. After paying them lots of money, they did fund it, which is good. And, yeah, he just taught us Change well, after, like, several I mean, we have been working with them for several weeks because the way they do it is, like, 4 hour chunks over different days Spread out. It's not like the guy just sits there with you for Right. 2 weeks straight.

Ian:

Like, it's all spread out, which I guess makes sense because sometimes you're changing something, and then you're gonna wait see 2 days. What happens? Right? So, like, they spread out when they

Aaron:

actually the old guess and check method.

Ian:

Right. Yeah. So so anyway, yeah, let's do this and, we did it over it was a pretty good time for downtime if we were gonna have any, which we didn't, but it was over Christmas or something like that or Yeah. Whatever. Anyway, we, We switched it over and it worked.

Ian:

So, yeah, the guy it wasn't the guy's recommendation. I had seen this. It is the only setting in the entire MySQL configuration Documentation that even talks about memory usage and that that this setting can impact memory usage. Yeah. It's a good one.

Ian:

Hint there.

Aaron:

Yeah.

Ian:

But So anyway so it fixed it, and we're back back online.

Aaron:

So you're back online and you're migrating to single store? Is this what I'm hearing?

Ian:

No. We're not migrating a single store, so I haven't talked about this on here much yet. But, yeah, next generation help spot, which is gonna be a clean slate, We'll use single store Ground

Aaron:

up rewrite?

Ian:

Yeah. Ground up rewrites. Oh.

Aaron:

Gotta cover that one day.

Ian:

Yeah. We'll be talking more about I'm sure over a time. It's gonna take, like, a year, so it's we got we can it'll be sprinkled in as I hit stop, and we'll

Aaron:

go a bit

Ian:

more, but, We are gonna pull we're gonna pull a page out of the DHL playbook, which is Ian. I know. It's crazy talk. Existing customers, which are on HubSpot 5. They can stay on there forever if they want to.

Ian:

So like, keep that stack up. That's that has this existing MySQL issue, like, whatever. That stock can just stay up. It gets down there. I think a lot of them will eventually want to move to the new version, and so we'll have a way to do that, of course.

Ian:

But, but this way, it also frees us up to do some different thing because it's just like a lot. We've learned in 24 years

Aaron:

and different products At that point

Ian:

I want stuff to work differently than it did Right. In the current help spot. And so this way is a little bit less pressure there. It's like, I think it's better this way, but if you don't like it or you don't wanna relearn it and you're very happy with current help spot, then you can just stay on current help spot, and you don't have to change at all, and that's fine, but if you wanna change, then if you like these new ideas, then, you know, we have the new platform that Yeah. And so it was so

Aaron:

yeah. And it's been crazy that you love d h e DHH so much now. That's wild.

Ian:

But he has some good ideas. It's not all that crazy. Too bad.

Aaron:

That's kinda interesting.

Ian:

So we'll see how that goes. That'll be a whole lot of interesting

Aaron:

That's a big that's a big move. Not only a ground up rewrite, but a different database technology.

Ian:

Yeah. A whole different database structure too because current I think we talked about this before, but we have a database per tenant now.

Aaron:

Right. Yeah.

Ian:

And it'll be, more traditional

Aaron:

Centralized.

Ian:

IDs. Yeah. Single tables. Right. So that'll be a whole thing.

Ian:

I mean, a single store does, like, shard it and all that stuff Yeah. For you. So it's a little bit kind of like the current setup in some ways, but it's managed by the database platform instead of Right. By us.

Aaron:

And if you if you use that single store Laravel driver, you'll be using my handiwork, a roadside.

Ian:

I do use it, so you have to use it. It's Spectacular. It's excellent work on your part. It's got everything you need in there. It's so good.

Ian:

I hopefully they, I don't think I think somebody's still maintaining. I don't think You sure

Aaron:

as heck is not me. Let's just make sure that's make sure that's on the record because in case Holly is listening. I haven't touched that since I got hired by PlanetScale. That is for Sure.

Ian:

Yeah. It's true. I guess we're in a little bit of a conflict of interest,

Aaron:

though. Yeah. I think so. Yeah.

Ian:

I don't know. It's not really true, though. It's sort of true. It's alright. I I had this on the on the list of things to talk about.

Ian:

I took it off, but I mean, put it back on. If We cannot talk about it if it's possible. I don't

Aaron:

know what's coming up with that clue.

Ian:

Reserve the right. But Okay. The planet scale pricing page k. To me Uh-oh. It's not it's very, very bad.

Ian:

It's a bad pricing.

Aaron:

Okay. Great feedback. Tell me. What do you what do you see? Plant scale dot com

Ian:

slash slash? Go because it's like what we're talking about now. Go. You're using single store and, like, to me, the plan scale pricing page, it's telling you that it's not For big use cases. Like if you have a 1000000000 rows, don't come here.

Ian:

Cause like the, the top tier is $39 right? And like, You can make it go up to 999. And even then you're only getting 8 CPUs. They do gigs ram. It just feels very focused on the, like, Side projects, small projects Really?

Ian:

Start up. It doesn't speak to me that, like, this is where you want your big, heavy enterprise use

Aaron:

Because of the pricing I

Ian:

mean, the maximum you can even define is 9.99. It's like I mean, nobody spends 9.99 on a database, like an enterprise scale. Right? Like, that's, like, very small amount of money.

Aaron:

Yeah. And our enterprise customers don't spend that, by the way. Of course.

Ian:

It's like I know there's the custom pricing. Right? And you can go talk to enterprise, And I'm a little bit more in the middle because it's like we have us an enterprise use case in terms of quantity of data to some degree, but we don't we're we're a very tiny company, so it's a little bit I'm the founder, so I'm looking at it like, what can I see on this pricing page versus, like, a middle manager or some other company that's like, oh, yeah? Contact them for enterprise support, and I'm sure they'll go And I know in PlanetScale does all this stuff. So I'm not even saying for me because I know that it's technically capable of a larger project.

Aaron:

Yeah. Yeah.

Ian:

Totally. I feel like this doesn't convey that. Like, if you go to the single store pricing page

Aaron:

Yeah. Let's see that.

Ian:

It's like I mean, it's not as nice a pricing page as this. So this

Aaron:

That's for the dang sure.

Ian:

Nicer pricing page. Right? But it's like, hey. You want terabytes of memory? Sure.

Ian:

We could do terabytes of memory, like, whatever you want.

Aaron:

Alright. So I'm looking at cloud. You're not doing self managed. You're doing cloud.

Ian:

Yeah. We're doing cloud. I mean, this kind I do have a potentially self managed use case, but I'm presuming I'm into your cloud. But the top price Model here has

Aaron:

Oh, they've got

Ian:

terabytes of RAM. Okay.

Aaron:

I see. They have a, see more want more detailed pricing and science Yeah.

Ian:

To go to the detailed pricing to break it all, and I Yeah. Yeah. Yeah. I'm pretty sure that this is negotiable, so I don't think those should, you know, when you're getting 24 terabytes of RAM

Aaron:

Yes. Those prices like this are. Yeah.

Ian:

But it does convey a certain amount of like, hey. Somebody's using this thing with 24 terabytes of memory. Like, that's a pretty huge database. Right? So

Aaron:

For sure. Yeah.

Ian:

And and basically infinite storage and Yeah. Yeah. Yeah. 3,000 CPUs. Right?

Ian:

So that is conveying that, like, you wanna shard it. You know you need a sharded Yeah. Large scale database. Yes. This is what we do here.

Aaron:

Good lord. They $1200 per hour.

Ian:

It's a little pricey at the top of it.

Aaron:

It's 3.84. Well, I have no idea. Like, this resources, we may charge something similar, but just seeing $1200 per hour is like, good God.

Ian:

Cool. That's a little pricey. I'm hoping that's why I'm gonna watch the size of my columns here. I can't be, like

Aaron:

Yes. Exactly right. Keep your noons. You gotta keep your noons Small.

Ian:

Keep my noobs in line. But, anyway

Aaron:

that's interesting. So what you're saying, if I can repeat it back to you, is that, The way that our pricing page is signaling is that, well, to rephrase, our pricing page signals That we don't have many really, really large workloads because we max out at 8 vCPUs and 32 gigs of RAM in the in the, like, self serve slider scale your own thing.

Ian:

Right. Yeah. I don't know. It just feels small. You know?

Ian:

It just feels like this is for smaller things. Like, I could have a smaller thing that fits in here, and that makes sense. Right? But, like Yep. Is it actually for if I need a terabyte of memory?

Ian:

Like, doesn't it doesn't feel that way. Like, even though I'm sure it can do it because I know you and I know the company more than the average person, but I'm just saying Sure. That's what strikes me when you see, like, 02939. Like, that's what you see on the pricing page. Right.

Ian:

Right. Right. Again, the for some customers, that's they wanna see. It's like, oh, great. This is like less expensive than Amazon or equivalent.

Ian:

I don't know. You know, it's a little hard to compare apple apples, but it's like reasonable. And But if I have a bigger project, I don't know. Yeah. Kinda feels like maybe it's not set up for that.

Ian:

So that's No. That's great. Yeah.

Aaron:

That's great. That's really helpful.

Ian:

Not getting it.

Aaron:

Fortunately, fortunately no. That's fine. Fortunately, pricing is not my, bailiwick, and it's not my area of expertise. And so it's, like, Great. I love that feedback.

Aaron:

I get to hand it on to somebody who

Ian:

will know what to

Aaron:

do with it. That's perfect.

Ian:

Maybe they test it all. It's like, no. We get 20 minutes to see that for this one. Right? Who knows?

Aaron:

Like Yeah.

Ian:

Just my off the cuff thing when it came up the other day, and I was looking at it. But, Yeah. The the single story is kinda interesting because and we'll we can talk about more, and it'll be cool to get some comparison with what PlanetScale does, but there is some interesting things that the, single store provides that's a little different My sequel because it's not my sequel.

Aaron:

Because it's not. Yeah. That's what I will be most curious to hear about as you go on is because it is I think it's MemSQL is the old name of it, because it is old name. Yeah. Not actually MySQL.

Aaron:

I'll be curious if you run into any, Like, any showstoppers or problems or something? Yeah. Because it it not in a, like, not in a derogatory way. It pretends to be MySQL, and so you, Like, you're kind of lulled into thinking this is MySQL. Right?

Aaron:

Because it's, like, wire compatible. It's very compatible with MySQL, but it's not actually MySQL. So that'll be Which

Ian:

is my which is my hope. Yeah. But I, that'll be some interesting edge things because, like, So MySQL's full text index Yep. Is not great. Yeah.

Ian:

Okay. I mean, it's fine, right, for small, but again, when you throw in Yep. Hundreds of gigabytes. It doesn't really like that too much.

Aaron:

No.

Ian:

Whereas, like, the single store full text, which is MySQL compatible In terms of syntax is built on Lucene. So Yeah. Presumably, it will be more performing. I'm sure it will have its own little things, but I'm hoping it's more performant, so this is actually based on Lucene, which is what even the last search is based everything is based on the pop of Lucene. So Will it be better?

Ian:

I don't know. So far, it's fine, but I haven't put 200,000,000 rows in there either, so we will see. So I'm guys like, that was that was actually in my app service provider. Nobody even brought up. I had the buildable

Aaron:

I I saw it.

Ian:

Single store search engine.

Aaron:

Oh, I definitely saw it. Yeah. Yeah. Yeah. I you know I saw that.

Ian:

Yeah. So, like, will we be able to push that really far, which is my hope, or will it be, like, no. We have to, like, offload this to A dedicated search service Right. At some point or whatever, which I'm looking for.

Aaron:

Search, whatever whatever it is.

Ian:

No. That thing is definitely can't handle it. That thing is like

Aaron:

I guess that's true. It's a little hobby for your scale.

Ian:

It's not built for any real data amounts. Like, as soon as you get to, like, even, like, 10 or 20 gigs of data, like, the index is, like, a 200 gigs or something. Holy. Yeah. It's not built for substantial workloads.

Ian:

It's for, like, ecommerce sites and things like that. But, yeah, it's not really built for heavy lifting of terabytes.

Aaron:

And Angola is just prohibitively expensive at that. I I like

Ian:

Yeah. It's insane. It's like, yeah, a $1,000,000,000 for Yes. Yeah. And I don't know how anybody use it.

Ian:

Again, it's like I don't know. If I have a ecommerce Platform, fine. It's like, here's my 1,000 products, and I get and that can maybe work. But

Aaron:

We used it at Resolute. That's a property tax firm I implemented. Okay. And we, you know, we paid handsomely, but at that stage, handsomely is, like, what, $200 a month?

Ian:

Yeah. I mean, that's And so for

Aaron:

us, handsome is like, yeah, that's a lot of money, but It's world class, and, like, we don't have that much data. And so I wonder, God, just I don't know. Yeah. They're they're prohibitively expensive once you once you get

Ian:

too far. That's great. I mean, you're $222,000 a month. I would be like, yeah. Great.

Ian:

Let's do it. But, like, It's not gonna be anywhere near that. At least last time I looked, which was only a few months back,

Aaron:

but You should call them. They do, like, you know

Ian:

I guess

Aaron:

I could This enterprise pricing is It's just like true. It's totally made up.

Ian:

It could be it does actually seem like a little bit it's sort of interesting. They do have a little bit even this pricing looks a little different than last I looked. It's 50¢ per 100,000

Aaron:

Goofy looking page.

Ian:

That's a little tricky to follow. I should give them another look just in case, but I think it does get to be pretty. Yeah. It's like 40¢ per oh, yeah. There you go.

Ian:

See, it's like the baseline's fine, but then it's 40¢ per 1,000 records. I mean, we customers who add a 1,000 records a day or more, like, so, Yeah.

Aaron:

And at that point, you really have to be careful what you're What you're running through Scout, like, what your index Laravel Scout, what you're indexing because you're just gonna end up getting totally hosed on Pricing. Right. Yeah. That all

Ian:

With that, I'm trying to be careful anyway, not I'm trying to really index just what has to be indexed. It's sorta weird. We get in this weird. A whole other thing we can talk about at some point, but like when you have a help desk ticket, like I'm sort of tempted to just index the initial request and the solving request And not the, like, 30 emails in between, which are just kind of old with a bunch of BS. And current helps a lot.

Ian:

It's all indexed. How often are people really searching for the 10th email in a thread from 4 years ago? Like, not that often before

Aaron:

the last year. Often. Like But From 6 months ago, maybe.

Ian:

Maybe. I know. And then you could get into the game of, like, well, do we have, like, a hot table with, like Yeah. More recent data, but then we Drop it off over time. Like so it does it gets complicated, but, my so the fall, I would like to just shove everything in there because That's simpler, but Right.

Ian:

Yeah. We'll see. Might not be optimal scale wise. Lots to talk about there. Well, lots of

Aaron:

That's a lot. Yeah. That's good content. I'm excited for that.

Ian:

Yeah. Anything else going on we need to cover?

Aaron:

I don't think so. Gonna go get the keys and go take a picture and start this whole, you know, playing scale studios era.

Ian:

I'm excited. Alright, man. We'll have fun with that. Thanks everybody for listening. Good to be back on the mic.

Ian:

Check us out at mostlytechnical.com. Mostly tech pod on Twitter. We'll be posting up sure video snippets and all that. And then mostly technical podcast at Gmail. You can email us, and we're we're starting fresh.

Ian:

We're checking new year.

Aaron:

This year this year, we'll read them.

Ian:

Well, we always read that, but we've we've addressed them before, but this last one is too big a gap. Like, everything's from, like I can't get into, like, d h h. And once again, we covered that enough. Like, we can't we can't get into that stuff. So Alright.

Ian:

Thanks, man. Have a good one.

Aaron:

Alright. See you.