Post-Laracon and co-located tests

Chris (00:01.699)
Hey, welcome back to the slightly caffeinated podcast. I'm Chris Gmyr.

TJ (00:05.727)
I'm TJ Miller.

Chris (00:07.981)
Hey TJ, and what's new in your world? we, yeah, well, we took that from the Bike Shed podcast by Thoughtbot. We talked about it earlier and love the podcast, love that intro. It's just super open -ended. can be work, could be personal, could be whatever. So hope that Thoughtbot and.

TJ (00:10.87)
Ooh, I like that.

Chris (00:33.943)
The Bike Shed podcast, don't mind too much if we borrow it, but it's a very strong hat tip towards them and the great podcast that they have over there.

TJ (00:44.67)
Yeah. Big time fan of, the bike shed podcast for sure. yeah, what's new in my world, man. you know, this is the first week back at school for my kiddo and a big sixth grader this year. lots, lots more responsibility. He, went into, he went into the year of, you know, he's top of the food chain at school. So.

what they, they have like a little program where the sixth graders will like mentor a fifth grader and his big goal for the year was to be the best mentor he could be and be better than the mentors he had last year. So yeah, he's, he's a, he's a big little dude. I'm very proud of him. So that's, that's been the big focus of the week is, is getting him back into the flow of things and certainly not used to waking up at a

Chris (01:25.601)
Yeah, that's awesome.

TJ (01:40.428)
reasonable hour. So, you know, sleeping in all summer. So, yeah, that's been pretty like all consuming this week. How about you, man? What's new in your world?

Chris (01:52.013)
Yeah, very much the same. was the first day of school for our oldest on Tuesday. So we got him off and running to school. Not as old as yours, but third grade. So kind of the middle of the road in elementary school world. But yeah, getting up a little bit earlier. He's making his own lunch this year and.

TJ (02:15.723)
Ooh.

Chris (02:17.315)
getting off and doing the whole carpool stuff, which is just crazy for the first couple of weeks. But yeah, then got some scout things kind of lined up for tonight. That's all getting kicked off with the new school year. It basically follows the school year for the most part. And we do some random activities over the summer. So lots of planning for that and kind of ramping that up as well as school and everything else. So yeah.

TJ (02:37.357)
Yeah.

TJ (02:44.714)
Ooh, carpool coordination, man. That sounds like a nightmare to get rolling. I'm sure you settle into it. I think the other big thing for my son this year is last year, he really wanted to walk to and from school by himself. And so I've been working up towards it. It gives me a little anxiety, but I know he can totally manage it.

figure the first week I can drop him off and then, you know, I'll probably wean into it, like walk him to school, him walk home on his own, and then eventually just total freedom for the little guy. it's nothing on him. He's totally capable. It's just me letting go as a parent is tough.

Chris (03:32.491)
Yep, totally. Some of the hardest parts right there, just letting go of those little things and yeah, getting through it. it's probably harder for us as parents compared to the kids doing it for sure.

TJ (03:44.63)
definitely. He was begging all last year. He's like, please, please. And there was one day last year that for whatever reason, I was running late to pick him up and he had managed to walk him, walk himself halfway home without a problem. So I know, I know he's got it in him. Just, yeah. Yeah. Tough, tough letting go.

Chris (04:04.845)
Yeah, for sure. Well, awesome.

TJ (04:06.434)
So yeah, dude, big stuff happening this week outside of that. Laricon was just wrapped up yesterday. Whew, that was a doozy.

Chris (04:17.945)
Yeah, it sounded like a great conference. We both, unfortunately, missed it because of various reasons and scheduling conflicts and things like that. But yeah, it seemed super awesome. It seemed like a great venue. There was around 950 people there, which is the biggest Laracon so far. And just awesome speakers, awesome just events.

TJ (04:37.271)
Wow.

Chris (04:46.829)
going on with it. So a lot of pictures from the after party, people connecting, networking, a bunch of my friends sent pictures or like through Twitter, like, hey, I met this person from last year and found him again this year and things like that. yeah, it's just awesome to get that networking piece in there too. And it seems like they totally nailed it as you would expect from Taylor and team and the Laracon crew.

TJ (04:55.042)
Yeah.

TJ (05:14.166)
Yeah, man, I think this I've missed Laracons before, but this was, think, maybe one of the most painful ones. I had so much FOMO. mean, I hats off to Taylor and team for live streaming the whole conference like that. It's been attempted before and they just knocked it out of the park. They live streamed the basketball game, the whole conference. So it was awesome to be able to like.

I mean, it sucked to miss it, but it was so awesome to still be able to catch like all the great talks. And I mean, I missed a whole bunch of the talks to just being busy throughout the day. But what I did catch was, it was absolutely amazing. But do let's, did you catch the basketball game at all?

Chris (06:00.929)
I caught most of the game. Yeah, and that was that was awesome. They found like a great gym between the terminal crew and a few other people from that community and the Laravel team. It was announced by the syntax guys. So West Boss and Scott Tolinski were doing like sports commentating. And yeah, it was just super just entertaining and funny to watch.

TJ (06:05.333)
So cool, right?

Chris (06:29.582)
a bunch of the people from the community and other devs just playing basketball and having a good time together. just the syntax guys commentating, it was super funny to watch, but it seems like everyone had a good time.

TJ (06:43.816)
Yeah. I had no idea that was coming either. So I like tuned in and I was like, my gosh, it's Scott and West. This is going to be great. And I am so, I want one of those syntax basketballs so bad. Like I'm not even like big into basketball and I just, feel like I need them, but I was just giggling the whole time at how like legit of a like basketball coach.

Chris (06:59.373)
Yeah, those were awesome.

TJ (07:09.726)
Aaron Francis was like, I don't know, the whole thing was put together so well and the jerseys were so legit. He looked at the part with it was hilarious. I enjoyed every minute of it. And like halftime, man, it was it was looking pretty even there. And I was I was pretty impressed how close the game was, but ended up in a little bit of a blowout, I think.

Chris (07:11.459)
Yeah.

Chris (07:14.967)
He looked apart.

Chris (07:34.625)
Yeah, totally. They could have got it. The Lerva team could have got it. the terminal team definitely took the lead and didn't let up towards the end. I don't know. Maybe they'll do it again or something similar next year. And there'll be a rematch. We'll have to see.

TJ (07:52.862)
Yeah, man. Yeah. So let's talk about a little bit of the talks that we did catch. know both of us got kind of busy throughout the two days and missed a handful, but, yeah. Did you catch a new, no, and in the Pest three announcements.

Chris (08:06.317)
Yeah, the Pest updates were just amazing, as you would expect from, you know, and the rest of past team. I think just the addition or the continuation of the architecture test and introducing the presets is huge because the architecture plugin was amazing when it came out and later like V2, I think. But then

TJ (08:21.358)
Hmm.

TJ (08:33.453)
Mm

Chris (08:35.331)
It was kind of hard to keep up with. Like a bunch of people were posting tweets and articles about like, hey, this is my flavor of architecture tests and this is how I do this and that. And you kind of had to compile your own set of options for those things. And if anyone introduced something else or you thought was a good idea, you had to then add that to your setup and different applications possibly.

TJ (09:00.908)
Mm

Chris (09:05.121)
So the introduction of these new presets, I think, are going to be a huge help because a lot of times it's just like, I want what you already think is a good idea and I want to use these things across all the projects that we have. So I think that is going to be huge.

TJ (09:20.49)
Yeah, like not only from a like community sharing perspective, which I think is awesome. I think it was amazing that like how well they catered to like different segments of like types of developers. And I loved that, you know, called that out and talking about like having the relaxed and like the strict presets available, but also from the perspective of, know, like we, we work at a company that's been moving from a monolith towards

you know, service oriented architecture and being able to spin up services and kind of like establish our own preset and be able to publish that. And when we spin up, you know, new projects from like our template repo, like being able to just have that preset ready to go and have that standardized across like every project and every new project, I think is going to be like a massive win.

Chris (10:14.873)
Yeah, 100%. I think the tooling is just getting better and better by the month, by the version. So I would definitely expect the greatness to continue. And I think the mutation testing is another huge addition to past that. I think we can definitely benefit from at work in the projects that we have. And also, of course, like many other.

companies and apps and even side projects is awesome for that.

TJ (10:47.958)
Yeah, I missed the mutation testing. I'm kind of bummed about that. I was really hoping that the live streams would still be kicking around on YouTube and I could play a little catch up, but unfortunately they're both down at the moment. I'm sure they'll make a resurgence and I'm sure they'll like chop them up and edit them out into individual talks from everybody. But I think open sourcing Pinkery was huge and I can't wait to spend a little time this weekend over

Chris (11:08.505)
Totally.

TJ (11:17.206)
over coffee just poking through the code base. Working on Sparkle and spending time just digging through and like source diving the open AI PHP package that Nuno put together. I picked up all sorts of like tips and tricks and looking at how he handled like streaming responses and everything was, I don't know, it changed the way that I thought about it and it definitely influenced the way that I've been building out different features of Sparkle. So I can't wait to dig through that code base.

Chris (11:46.285)
Yeah, source diving is a great way to pick up those little tips and tricks and things that you just might not even have thought about on your own. And you just look at something and it's like, wow, that is really smart or amazing and just clever, you know, even and it's like, I'm going to take that from here and put this over here and this other project. And it just makes everything better. And especially with Sparkle, where you're just putting it into

a different open source application that someone else can then source dive into and learn from the both of you or the changes that you might implement on your side to do slightly different things. And that's just one of the greatest ways to learn, especially nowadays as a engineer at any level really is just source diving.

TJ (12:35.542)
Yeah, think that that's such an important aspect of becoming really good and proficient with Laravel is spend time source diving the code. If you're implementing a command or you're working on a job or something, spend a little time bouncing through and deep diving how that job's actually getting dispatched and get an understanding of you end up getting a much

deeper understanding of how it works, but you get to see some really incredible code and architectural patterns. yeah, highly recommend for like anybody with any framework, just spend time source diving stuff. It's made me a significantly better developer and I definitely, like I said, I'm going to spend time this weekend over coffee, like an hour, maybe two and just pick through it. And I know that I'm going to walk away with something new and...

and ideas that I can pull on later.

Chris (13:36.789)
Yeah, 100%. I plan on doing the same thing, yeah.

TJ (13:37.888)
So, yeah man, so did you catch Caleb's talk on Flux?

Chris (13:44.473)
I did. It was really funny because at the beginning they were having technical difficulties. So it was probably about 20 minutes where him and Aaron got up on stage and they were doing this comedy bit and trying to keep things going while the tech people were trying to get everything back online. And it just took a really long time for that to happen. And then Caleb eventually did some Q &A about everything that

TJ (14:08.012)
Yeah.

Chris (14:13.293)
he's working on or whatever the audience wanted to shout out. But yeah, Flux is a new UI component library that will be paid per project and built on top of LiveWire. So he did all of the bits and pieces to make all these components, dropdowns and lists and button groups and flyout menus and all this stuff that is, should be easy, but is

very complicated and he did all the work and the designer that he had, Hugo, I believe, did all the work for us. So we'll be able to use these components in our applications and basically theme them however we like. There's dark mode already built into it and it just looks so amazing and easy to pop into any sort of application, LiveWire application that you have and be able to utilize these components right off the bat.

TJ (14:51.107)
Mm

TJ (15:12.822)
And not only just like, is it gorgeous and super functional, like you get all of the like difficult like ARIA labels and accessibility, that stuff that I care deeply about, but I don't know enough to like do it correctly. So like, I can't wait to like, I'll probably end up rebuilding my website in Flux just so that it like is highly accessible and

You know works well like I can't believe how much he sweat the like roving tab index for all of the different compilers that blew my mind but Like not only is Flux you know the announcement was super cool You know that was such an amazing like his presentation was just so high -energy

Chris (15:53.465)
Yeah, that was super awesome.

TJ (16:10.504)
so fluid, like it was just an amazing talk to watch. Like he could have talked about anything at that point and I was just engaged in like with it. So much talent. And I think the comedy bit was hilarious. They had a recent crossover episode. think Ian Landsman had some surgery and hasn't been able to record mostly tech pods. So they had a mashup of

Chris (16:21.817)
Yep, 100%.

TJ (16:38.278)
mostly tech with Aaron and then no plans to merge with Caleb and Daniel. And that was, I was in tears the whole time. It was fantastic. And I don't know if you've caught that Caleb's impression of Ian as Seinfeld. It was, think, maybe one of the funniest things I've heard this year. It was too good.

Chris (16:52.845)
Yep, I did. It's hilarious. Yes. Yep.

Chris (17:03.469)
Yeah, definitely. And I'll put the links in the show notes too for Bike Shed and also the Mostly Tech podcast if you're a level person and have not heard of those podcasts, which would be surprising if you didn't. But just in case, put the links in.

TJ (17:08.29)
Yeah.

TJ (17:22.294)
Yeah, I think maybe next episode or something we should run down like our podcast subscription list and talk a little bit about like the podcast that we, the other podcast that we listen to also, because I know both of us have a pretty big overlap, but there's some gold in there for sure.

Chris (17:38.413)
Yeah, totally. I think that's a great idea for a future podcast.

TJ (17:41.718)
So what do you use for an editor on the day -to -day basis writing code?

Chris (17:48.907)
I use PHP storm on a DGDB system.

TJ (17:51.458)
Yeah. Yeah, I'm a pretty diehard Vim and TMUX user. And I've been using that for eons. I think there's portions of my Vim config that have been around for eight, nine years at this point, maybe even a little longer. But the VS Code extension, the first party VS Code extension coming out, has got me kind of rethinking.

circling back around to VS code and giving that another firm shake. That looked really cool, man. Did you happen to catch that being dropped?

Chris (18:30.297)
Unfortunately, I missed that talk. I saw some of the screenshots and the general announcements for it. So I think that's going to be huge for the VS code portion of the community. And just from the bits that I got out of it, it seems like they're trying to match up what PHP Storm does with the Laravel IDEA plugin, which is amazing. If you use PHP Storm, you need to pay for that plugin.

TJ (18:52.738)
Mm -hmm.

TJ (18:58.392)
absolutely.

Chris (18:58.829)
down requirement. It's so amazing. So it's awesome that the Laravel team is picking up the VS code extension and making it similar and I don't know, maybe even better in different ways for VS code.

TJ (19:15.49)
Yeah, I was amazed. First party support for an editor extension. think, man, that was super cool to see. Because as much as I do love and have really refined my workflow with TMUX and NeoVim, there's a lot that's looking really pretty good about going back to VS Code. I did spend a...

I don't know, about a year and half, took a break from NeoVim and it was about the time that think Caleb published the, like his Make VS Code Awesome course. And I dove through that and made VS Code Awesome and wrote down those rails for, I think, like about a year, year and a half and then made my way back to Vim. But yeah, this is going to, I think, me give another pass at it.

Chris (20:11.011)
Yeah, totally. Going to have to keep us posted on how that goes.

TJ (20:14.734)
Yeah, for sure, dude. So I think we've got to talk a little bit about Laravel Cloud. Man, I feel like we've been, I feel like this has been kicking around since 2019 when Vapor was dropped. That we've been kind of teased about Cloud for a handful of years and I am so stoked to see it. And if you haven't caught it, Laravel Cloud is going to be

Chris (20:22.349)
Laravel Cloud, the biggest announcement.

TJ (20:44.378)
sort of similar to, to Vapor and to Forge, except it'll be fully managed and you're able to go from signup to rendered website in like a minute or less. Like that was, that was Taylor's goal. and it looks extremely impressive. and I love to see, like, one of the reasons I use Laravel is because I love the opinionation. Like I just, love not having to think about so many of these decisions.

And I can't wait to see that translated into managed hosting. And I have a good feeling that this is pretty strongly backed by a lot of opinions from Chris Fadau. And I've consumed, I think, every ops and server type course that Chris has put out. And I can't wait to use it. I'm going to be moving.

everything I've got off of my DigitalOcean instances and putting them in Laravel Cloud as soon as I can get my hands on it.

Chris (21:48.215)
Yep, totally same. And I'll be moving all my side projects on there. A lot of them, like most side projects, don't get a ton of traffic or just get like little bursts. So I think being able to basically scale these down to almost nothing or actually nothing and save that money compared to running all the droplets. And I have the managed database and managed Redis through

DigitalOcean, which has also been great, but it just is running all the time and you got to pay for it all the time. So if I can transfer everything over to Laravel Cloud and save, you know, a few bucks here and there and experience like all the other benefits that it offers and just some of the scalability for, you know, some of those spikes in traffic or other features, I think would be awesome and super helpful for some of these projects.

TJ (22:19.106)
Mm

TJ (22:23.65)
Yep, yep, and then you gotta...

TJ (22:46.55)
Yeah, man, I think that kind of rounds out most of what I caught. I would love to, once the videos are out, I'm definitely gonna sit down and make sure I catch all of them. Were there any other talks that you wanted to touch on?

Chris (23:01.541)
yeah, similarly, I think waiting until the other videos come out and just giving that a go through all of those. there's definitely a few that I want to reroute watch and a bunch that I didn't even get to. Usually the afternoons were a lot tougher for me, so I wasn't able to catch a lot of those, which is unfortunate. but yeah, I think we should circle back once we get caught up with the videos and kind of do, I don't know, top three moments or.

TJ (23:19.32)
Same.

Chris (23:30.723)
top talk or something like that. It would be pretty sweet in the next couple of weeks.

TJ (23:32.515)
Yeah.

TJ (23:35.884)
Yeah, man, I think that sounds great. moving on from Laracon, let's talk testing and kind of your approach and thoughts on writing tests and where those tests live inside of your code base.

Chris (23:53.571)
Yeah, so I wanted to talk a little bit today on co locating tests in Laravel apps and I haven't really seen too much mentioned or written about it or people doing it. And basically the idea is is that in a typical Laravel app we have our app directory right and then the test directory and tests are broken down into feature tests and unit tests and.

TJ (24:05.262)
same.

Chris (24:23.661)
The convention for all these Laravel applications is whatever your application structure is, you basically duplicate that in your test directory and then rate your tests there and it kind of expands from there. So as you add a application level folder or file, you basically have to add that connective test to that and try to mimic the same directory structure and file structure.

TJ (24:34.04)
Mm

Chris (24:53.473)
in the test. while that, personally, I think is fine for probably smaller apps or just side projects or something, as you have a much larger application and multiple people working on it and a larger team, that, at least for me, breaks down over time, especially in an app like ours at work, that is just massive. And if you open up, we have

TJ (24:53.645)
Yeah.

TJ (25:18.648)
Mm

Chris (25:23.618)
partially a more like typical Laravel of all structure. And then we have started converting things into modules. So doing like a more modular monolith approach. And that just introduces even more directories. So spreading out those directories between the application side and the test side gets really unmanageable really quick. And trying to open up like the sidebar and see everything all at once is

Impossible because you have so many files in each of these locations and it's it's you just don't know what's there and at a quick glance you don't even know if you have a test for the application file that you're working on. So what we've done at work and what I've also done at you know a few other side projects and basically anything that I work on from here on out is collocating test which.

basically just means you roll up the test files into the application directory. So where you have maybe like a my user controller, you would have my user controller test right next to it. And then once you open up that sidebar or use whatever sort of keyboard shortcuts that you have, you can see very quickly and easily with minimal to no cognitive overhead that you have a test there.

And then you can start either reading the test to see what the file, the application file does, or you can add on to those tests or change them however you need to from any sort of the application tests. So I think this has been a huge help in how we structure apps and maintain them over time. And also makes it so much easier for developers to move about the application and also keep those things in sync.

TJ (27:19.238)
Yeah, I think when I first landed at Curology, co -located tests were already a thing and I came in from a much more traditional side of things where I had the test directory and then just kind of remapped the entire tree structure and everything inside that test folder. And that works great, but yeah, said tests just aren't as discoverable and then you get an app as big as the one we're working on and

You start doing modular monolith and yeah, you need an ultra wide monitor just to expand the tree and see what's available. It gets kind of crazy. And at first I absolutely hated it. I was like, what is this pattern? Why aren't we using the test directory? This is non -standard. I don't like it. Like, I don't know, man. was, I really hated it when I started. over the last like four and a half years,

It didn't take that long, but I've really come to appreciate it. And driving out Sparkle, was... I still am waffling back and forth on what I want to do. The first couple initial versions, I did co -locating tests and I ended up going back to a test directory over a couple of the rewrites and I kind of still want to go back to co -located tests. It just...

It just seems like such a great way to reason about it. And it's so quick for me to discover like, I haven't written tests for this, especially like the way that like, I don't really TDD because I don't really know what, how I want things to be. When I get started, especially for a package, like I'm really sweating the, the user interface and like how the code flows. it's, I tend to be driving out that code first.

and then going back and writing tests. And I've found it really difficult to remember where I have tests and what I've tested and being able to co -locate those. Man, that'd be so great to just be like, yep, I've got a test for this. It's right here. It's right next to the file. It's easy to balance back and forth between the two as I'm writing tests. Yeah, I went from a place of really disliking it to a

TJ (29:39.748)
I kind of love it and I miss it now that I don't have it going on.

Chris (29:43.831)
Yeah, yeah, and very similarly when we implemented it, because I was here when we did a bunch of the changes for that and it seemed odd at first. I wasn't totally against it. It just looked and felt very different, right? Compared to your typical Laravel application. But after I don't know a few weeks, couple months, whatever, it was like a breath of fresh air. It was so easy.

to come into more of like an unknown feature or creating a new feature and just having the structure. And I like it because it elevates the importance of testing as well. And it makes the application code and test code equal pairs, right? If I add a new application file, I need to add a test file because that is going to show up very clearly.

TJ (30:26.893)
Mm -hmm.

Chris (30:43.153)
especially in an IDE that if you have a different icon set or something like that, the application code looks different than the PHP test code, right? So you can see visually and very easily that you either have a test or do not have a test for the paired up application code, which is great.

TJ (31:03.724)
Yeah, not only in your IDE while you're working, but from the perspective of doing PR review also, it's very clear that there's either a test file or not to go along with that. And honestly, it's not that hard to set up and do. just because they're co -located tasks doesn't mean that it's also all autoloaded along with your application files. You can control that inside of your Composer config where

your autoload and autoload dev, exclude and then re -include the test files based on what you're working in. So you don't have to be concerned with like, man, when I load my app up, it's also going to load all of my tests. Composer makes that really easy to configure.

Chris (31:46.455)
Yeah, totally. And I'm going to be working on a blog post of mapping this all out. Some examples, screenshots, and a few application changes that you need to make. So you already mentioned Composer. There's a few little changes in that. There's a few little changes in the PHP unit file. And then depending on how you load your artisan commands, there's another couple changes for that.

And optionally, if you use any additional tooling like Code Climate, there's some additional ignore config that you need to set up for tests. But it's super minimal. It will only take about three to five minutes to set those up. And then all you got to do is move the files, and you're good to go. So I'll finish that blog post up. It'll be live before.

this podcast episode drops and it'll be in the show notes below. So if you're having trouble visualizing the changes and the benefits of this, definitely check out the blog post and yeah, feel free to reach out if you have any questions or if you love it, if you hate it, would love to hear either side.

TJ (33:05.4)
Yeah, would love to hear other thoughts and opinions on it. And I'm looking forward to that blog post, man. Like, that's going to be a banger for sure. So before we wrap up, man, I'll drop a little bit of a Sparkle update. Yeah, man, so just before Laracon, I had an epiphany. And I can't believe that I didn't write Sparkle the way that it's written now.

Chris (33:19.501)
Yes, please.

TJ (33:32.93)
I decided to go back to the drawing board and rewrote the entire interface to be a fluent interface now. And I infinitely more happy with the way that it reads. It's much more, looks like it's coming out of what you would expect inside of Laravel and all of Laravel's fluent interfaces. Previously, it was all like, you know,

Chris (33:43.341)
big change.

TJ (34:02.456)
for an agent you'd have in the constructor properties, your LLM, you would have your prompting, everything that you would need to assemble your Sparkle agent was all really driven off of the constructor. And that's fine. It works great. But I don't know. It just doesn't read as well. I mean, I'm

I'm very concerned about how things look visually too. Like I just, like my code to look nice and beautiful and read fluently. And now it does. And it was, I don't know, just, I woke up one morning and went, you know, this, there's a better way of doing this and, decided to scrap it all and, started from scratch and, and honestly, everything's better for it. you know, and it took me.

Hmm, like two or three days, you know, mind you, I'm not working on this full time, but it only took me two or three days to get back to parity and I have better test coverage. My PHP Stan worked out so much better. Like every aspect of it improved on this rewrite. So at first I was just kind of kicking myself for basically deleting all the work that I had done for the most part and then kind of rewriting it. But

I can't believe it only took a couple days and gosh, I think it looks so much nicer.

Chris (35:31.875)
Yeah, it does. And like you said, not that it was bad before because it was functionally sound, right? It just didn't have that feel that you wanted and the ease of use for it. And I think especially with AI and the different LLMs and just the whole learning curve around AI and then how to use it in tooling and code and programming is already

possibly a steep learning curve for a lot of people and adding those like levels of complexity to figuring out what I need to use to create these objects to actually use them functionally in my app is could be perceived as like a bigger barrier to entry to using LLMs and AI and even the package. If I can't figure out how to

TJ (36:03.726)
Yeah.

Chris (36:31.225)
wire this up very easily so I can throw some commands at it and see the output. That's going to be a deterrent for a lot of engineers. So I think this was completely the right move and it looks amazing so far. And I think that's going to be a big improvement.

TJ (36:49.334)
Yeah, it just felt clunky and now it doesn't have that feel. But as part of it, a really big refactor is initially the way, I mean, it wasn't bad, but like I basically adopted a very similar workflow and like pattern to how like the cache and session drivers work inside of Laravel. So now it's even easier for other people to be able to

spin up their own drivers. You know, like I'm going to provide a handful of drivers out of the box. For example, I'm going to do OpenAI. I'm almost done with that. And then I'll be pivoting towards Anthropic and Olama. And like, those are the ones that I want to like definitely first party maintain and release with. But there's tons of other providers and, you know, models and everything out there. And now this will enable the community to be able to, you know,

come up with their own drivers and plug right into the system. So like in Laravel with the caching, if you wanted to extend cache with an additional storage driver, you can do that in the exact same way. I'm actually using Laravel's framework, the same manager base class. So it'll have all the same syntax. So you'll be able to go Sparkle, Extend, and then

and add in whatever driver you want. And I think that's going to be a massive improvement for people being able to extend and add their own stuff to the package. that was another big change that I'm super excited about. And I honestly was so excited about the new API that I put together an initial set of docs and published that out to the repo. And I've been starting to share that around.

Yeah, first, it feels good to finally get something out there other than like some screenshots or some video and teasing. There's actually some docs out there and so far it's been super positive feedback. So I'm going to keep my nose on the grindstone and get this, get this thing out there. But, man, it feels, it feels good to finally hit publish on something.

Chris (39:09.785)
Yeah, 100%. That's the hardest part. Sometimes it's just being okay with it and hit publish and going forward.

TJ (39:18.561)
Yeah, something just didn't sit right with me before. coming up with the new Fluent API was like, nope, I think this is the last piece of polish that it needed. Between the new Fluent API and the new way that the whole new driver and manager system, yeah, I'm more excited than ever to keep going and get it out there.

Chris (39:43.161)
Sure. Yeah, well you definitely have to keep us updated and we have the repo live even if there's only a readme on there with some docs but we'll keep an eye on that too.

TJ (39:53.974)
Yeah, man. So as we wrap up, the other big piece is we're fully published as a podcast now. yeah, man, massive thank you to you for setting everything up. But yeah, we're published. We've got a domain. We're set up on Transistor. And I think we're getting blasted out to just about every platform. So you'll be able to subscribe in your podcatcher of choice.

Chris (40:01.249)
Yes, we did it.

TJ (40:22.669)
I believe that's how you say it.

Chris (40:24.345)
Yes, would love for you all to subscribe. Keep an eye on the website. We have a Twitter or X handle as well. So if you'd like to interact with us on there, ask questions, or if you would like to email us, we have an email set up at hey at slightlycaffeinated .fm and the website is also slightlycaffeinated .fm.

double check the spelling on that because it always trips me up for sure.

TJ (40:55.244)
Yeah, spelling caffeinated is a doozy, but you type it out enough, you'll get the hang of it. And then on socials, we are slightly caff pod on Twitter.

Chris (41:00.771)
Yeah.

Chris (41:06.189)
Yeah, and all those will be in the show links. So feel free to share this out with your friends and other engineers who you might want to share the information with or talk about. And again, we'd love to hear any feedback or questions that you all have that we can discuss. Or even if you want to be a guest on future shows, we'd be totally open for that as well.

TJ (41:29.634)
Yeah, for sure. Well, on that note, until next time, we'll catch you then. See ya.

Chris (41:36.611)
Yeah, have a great one.

Creators and Guests

Chris Gmyr
Host
Chris Gmyr
Husband, dad, & grilling aficionado. Loves Laravel & coffee
TJ Miller
Host
TJ Miller
Dreamer. Proud ADHD advocate. Laravel astronaut. Building an amazing Gen AI package for Laravel called Sparkle.
Post-Laracon and co-located tests
Broadcast by