In this episode Zach and Carl had a down and dirty, geeky conversation with Alex Standiford about the challenges of remote work, WordPress development, and the potential of PHP Nomad, an interesting project that abstracts WordPress away from a plugin.
Alex also shared insightful tips on coding practices, including the use of to-do comments to facilitate a seamless start to the next coding session.
14 tips from this episode
- Use traits in PHP code to group functionality and add it to a class in order to improve code structure and reusability.
- Upgrade to the latest versions of PHP for performance improvements and access to modern features.
- Consider using Laravel for a different approach to PHP development and exposure to different paradigms and methodologies.
- Leverage ChatGPT for assistance with coding, including generating class names and brainstorming programming patterns.
- Take advantage of pair programming as a way to work in pairs and create high-quality code.
- Utilize ChatGPT as a tool for rubber duck debugging, aiding in problem-solving and generating ideas.
- Try using ChatGPT to handle the more obscure errors in JavaScript, which can be challenging to resolve without assistance.
- Explore adding ChatGPT inside the IDE to facilitate quick access to the AI model during the development process.
- Experiment with making use of JetBrains AI for development tasks, especially for working with TypeScript and database table schemas.
- Consider creating a library for PHP to make developing WordPress plugins more seamless and straightforward by abstracting away WordPress integration.
- Develop a solid test suite to enable seamless upgrades and refactoring of code without downtime.
- Apply dependency injection over the last few years, for enhancing testing and creating test instances, a technique that makes testing easier and forces compliance with single responsibility principles.
- Use to-do comments at the end of the coding session to mark where you left off, which helps to quickly resume work from the same point in the next session.
- Be mindful of the process of transitioning from a project’s conceptualization to making the code public, as it brings changes that may require more standardization and a greater emphasis on coding practices and documentation.
Links
Episode Transcript
Zach:
This is Zach Stepek here with Carl Alexander for, forget another episode of the Woo DevChat. Carl, how have you been doing?
Carl:
I’m good. I came back from Japan. I’m finally back into normal East Coast hours. I think it’s a problem with Q1 Q q1. Japan is never good for me. Basically, it’s been meetings, meetings, and it’s like 13 hours to East Coast and 16 hours to West Coast. It’s very painful. So I’m glad to be back in a normal time zone now so that I can don’t have to be up in the middle of the night to take at WordCamp Asia. I took a meeting at three in the morning.
Zach:
Oh, geez. Yeah,
Carl:
It was just terrible bad time.
Zach:
So yeah, we haven’t talked since WordCamp Asia, so looked like everybody had a really good time there, and it was really nice to see Asia grow. Again, from everything that I saw remotely, it looked like it was well attended. So I’m glad to see that. It’s just continuing to get bigger
Carl:
And it’s Manila next year.
Zach:
Nice. That’ll be a fun camp, so hopefully I can go next year. That’s my goal. Yeah,
Carl:
I’m not sure I’m going, I can’t do that in, and everybody’s telling me I should go to CloudFest, so I think I might do CloudFest next year.
Zach:
Yes. Yeah, CloudFest is coming up the US version in just a couple of months, so I might go to that and then I’ll definitely be at us. I think I’m missing Europe this year, sadly. Awesome. Well, we’ve got a guest sitting in the back here just listening to us ramble about WordCamp. Asia. Maybe I should introduce him. So this month we’re talking with Alex and we’re talking about a whole bunch of stuff. Honestly, we’re talking about
Carl:
Some good dev, nerdy content coming your way.
Zach:
Yeah, exactly. Some of the fun things that Alex has been working on, and we’re going to talk about the day job a little bit, but we’re also going to talk about the side projects. Very interesting.
Carl:
Numerous.
Zach:
How are you doing, man?
Alex:
I’m good. I’m good. Thanks for having me.
Zach:
Yeah, it’s great to have you here just to get everything out of the way right away. Let’s just let everybody know what it is you do for the day job and a little bit about your background in WordPress.
Alex:
Sure. I am a developer at GoDaddy. I work on their managed WooCommerce offerings. I’ve been in the WordPress space for, oh gosh, since 2009 is when I started using it, but I started really developing in 2012, 2014. I wrote hundreds of plugins in that 2014 to 2019 timeframe for clients and myself. And sometimes they were really big ones and sometimes they were really small ones. And from doing that, I kind of learned how to not build plugins and kind of just developed my skills over time. I worked for Sand Hills Development for a little while before they got acquired, and then I was working on the affiliate WP team while I was there and ended up leaving that place whenever Austin acquired him and switched over to GoDaddy.
Zach:
Okay. Well, that’s quite a background. I’m sure. It was a lot of fun working at Sandhills.
Alex:
Yeah, I love that place. That place was great.
Zach:
Yeah, I have definitely used most of the Sandhills software at some point in my career, including affiliate wp. And that’s a really good segue into talking a little bit about one of your side projects. So you’re building another affiliate plugin, right.
Alex:
So obviously when I was working for Affiliate WP for a while, but before that I was also building affiliate programs myself and using Working with IT as a user. And when I was running an agency, I was creating all these different creative programs that weren’t just typical affiliate programs. They were a blog content bonus program for bloggers who could write content on my site. And then basically anybody who reads their content, they get that, they get the visit for that would turn into a referral. And I just realized that all of these things that I was doing, and then Press Academy was another one where I’m doing a course creation platform for other people to be able to basically create courses on this site. And all of it required extensive customizations to affiliate wp. And I realized that what I was doing was I was outgrowing what affiliate WP could do, and I’ve been noodling around with it for probably almost 10 years at this point.
And I finally last year committed to it. I was like, you know what? It’s time. I’m ready. Let’s do it. So I started building my own affiliate program or plugin that kind of dwarfs what the other program plugins can do. It’ll allow you to create multiple different programs and you can create multiple different payout methods and all kinds of stuff. That just makes it way better. Basically. It’s kind of been cathartic for me as a developer because I kind of got to work on all of the things that I couldn’t do with affiliate WP when I was there because of all the tech debt that they have, because employee in’s old, and they’ve just been kind of adding things to it over time. So it was just like, man, I get to do all these things that I was never able to do because of some kind of backwards compatibility thing that just made it super hard to work with and super hard to change. That’s been a lot of fun. I’m actually really close to being ready to launch. It’s probably, it’s going to be launching sometime in May, so I’m pretty stoked about it.
Carl:
That’s great. Yeah. It feels cathartic, right? Probably.
Alex:
Yeah, for sure.
Carl:
Yeah, I can get that. Tech debt’s always frustrating, especially all these old plugins that have been there for almost a decade, like the accumulate, it’s like something you have to be really proactive at tackling if you want to tackle it. And even then, it’s a bit like Windows. Some people start building around the bugs, or they take the bugs and it’s like, wait, we’re fixing the bug. Wait, I needed this bug. It actually made my product work. Or something like that.
Alex:
There’s a reason why people say it’s not a bug, it’s a feature.
Carl:
Yeah, exactly.
Alex:
Yeah, for sure. But a lot of that has been, it’s just been fun. I’m just like, yeah, I’m not going to have to worry about this specific problem because I’m going to nip it in the, but right now, you know what I mean?
Carl:
Yeah. Well, you’re still left with the unknown unknowns, the beautiful unknowns.
Zach:
The fun thing about Greenfield development is the ability to all the wrongs of the past, all the things that are those stumbling blocks, but then you find new ones. That’s true. You always find new ones. That’s what this is all about, right? We improve with every iteration of something that we build. And for example, WordPress didn’t start out like it is today, right? The first time I looked at WordPress, I thought, oh, that’s cute. And then I went away for a while, and then I came back when the admin refresh happened last, and it became more of a content management system and less of a blogging specific platform, and just really started to get into it because it had learned from the lessons of its past and grown into something different. And that’s what we all do. We learn from what we’ve done before, and every new thing we build tends to be better than what we’ve built before.
Alex:
And PHP has a unique challenge too, where the versions updates, so it completely can change how code is written. So for WordPress, you want to talk about tech debt and commitment to backwards compatibility. I mean, a lot of the reason why so much of it is so different feeling than modern PHP today is literally because traits didn’t exist. For example, I don’t even, I don’t even remember what version it was, but I know traits weren’t a thing, and I don’t even know if classes namespace were a thing. I’m not even sure they were,
Carl:
Namespace was definitely not a thing.
Alex:
Yeah, I didn’t think so.
Carl:
Namespace classes were basic. I think it started PhP 4, so classes came, I think more expanded in five. I only started using PHP with five essentially. So four predates me, but namespace were relatively new then, so I’m not even sure they were a 5.0 thing. But the thing is too, when you have these large projects like this, one thing at least I try to do is have a good integration or end-to-end test suite, so that if you want to do those rewrites, you can do them. If you only have unit tests, you can’t really do the rewrites. And that’s one of the problems with WordPress is like, yeah, they could rewrite the code and modernize it. You don’t support 5.6 now, right? They’re on seven. So they could rewrite some stuff, and I do enjoy that they have some little things.
They did put some of the polyfills for PHP 8 functions in if you don’t know in PHP, do you, I dunno, I think a lot of us have done this. You want to see if a string starts with something and then you have to do a string position if it’s equal, equal, equal, identical to zero and a whole thing. And now there’s a string starts with function in PHP 8, but WordPress actually added the polyfill for that. So you can use some of these newer PHP eight features, at least the functions that way and leverage at least some of the goodness of the later PHP versions. But I like that they’re at least trying to do that because the PHP language is adding a lot of quality of life stuff functions like these, and you can definitely create a pseudo function that does that, and then you can fill it. So it’s great to be able to do that.
Zach:
Yeah, absolutely. Now, I want to make sure we don’t lose anybody because I know we have some listeners who are newer in their developer journey than later in their developer journey. So you mentioned PHP traits. It’s a very interesting mechanism in PHP that allows for some inheritance. So traits are kind of like classes, but they group functionality and they allow you to then use those traits to add that functionality to a class.
Carl:
It’s basically programmatic copy paste
Zach:
Pretty much.
Carl:
It’s like, do you copy paste this code between all these classes? Never fear. You do not have to do that anymore. You put it in a trait and then you can just copy that code over as much as you want.
Zach:
And it does conflict resolution too.
Alex:
And if you really lean into ’em, you can actually build with composition instead of inheritance. So instead of having a class that extends a class that extends a class, which is problematic, if you get too many layers deep, you can build traits that basically describe a class with some interfaces and basically just assemble this class using a whole bunch of interfaces and a whole bunch of traits. And you’re not writing anything new, but you’re kind of describing the class in a much more nuanced way than extending, and it lets you build things that are a lot more scalable than what it would be with inheritance usually.
Zach:
Yeah. And in PHP 8.2, they added the ability to define constants inside traits, which is nice. So these are all things that just help us write better, more structured code. Our goal is to become more object oriented over time, I believe, as developers. And we definitely started as far from object oriented as we could in the WordPress space, but as PHP grows and it gives us new tools, we’re able to do more object oriented things than we ever have been able to. So it’s really nice to see traits in as a core part of PHP. And the other beautiful thing about PHP upgrades is that they keep working on performance. And every new version of PHP, we seem to get a good boost in performance.
Carl:
Some are bigger than others, like 8.3 is apparently a much larger performance gain. But yes, every version gets better. It’s just some of them matter a bit more. I think 7.4 was the same thing. I think 7.4, there was a really large imperative to move there. It was a large performance gain at the time from switching to that.
Zach:
And then, for example, some of the newer changes in OPC have been pretty amazing for PHP performance as long as you have it configured correctly, which is probably the hardest part of using opc. But yeah, there’s a whole bunch of functionality that comes from these updates. And I would actually highly recommend if you are somebody who wants to understand new versions of PHP and some of the ways that PHP can be used outside of the context of WordPress, there is, well, there tend to be a whole bunch of tutorials and things that are on laracasts that really help you get up to speed with some of the new versions.
Alex:
Jeffrey weighs the man.
Carl:
It’s a good resource, even as a WordPress developer, to be honest.
Alex:
Yeah, I learned PHP through that actually. Literally when I was starting, that’s where I learned it.
Zach:
And some of the things here we’re supposed to be learning JavaScript too. That’s a mandate from on high
Carl:
CHA G PTs teaching me JavaScript cha.
Zach:
That’s a good way to learn. It is.
Carl:
Yeah. It’s a better way to learn. Honestly, I could do a whole episode on chat to PD and writing and articles and stuff like the act on my writing.
Alex:
It is surprisingly good at figuring out how to create and do Gutenberg blocks. I’ve been using it a lot. I can find it in the documentation or I can search for it, but if I just ask chat nine times out of 10, it’s like it gets me 90% of the way there, and I cross-reference with the documentation. I’m like, oh, yeah, okay. That’s right. That’s great. I love it.
Carl:
Yeah. I keep applying to work camps with how to use chat g pt. No, because I would say 80% of the developers I talk to and I say, this is an amazing tool. They’re like, oh, I tried it. I’m like, it’s not great. I’m, you’re probably not thinking about how you’re probably, you’re thinking of it as, do my homework for me. And then
Alex:
Not as a rubber duck
Carl:
Or the whole thematic for me is pair programming. Actually, I think of it, but a lot of people aren’t familiar even with pair programming. So for the listeners who aren’t familiar with pair programming is this crazy idea. I mean, the first time I heard about it, I think I thought that there’s way, I don’t want to work that way, but basically you work as programmers, you work in pairs of two, that’s why it’s called pair programming, but only one person gets to write code. So you have basically the pilot, I forget the terminology, but I think it’s the driver in the passenger, basically the driver writes the code, and it’s kind of like if you’re doing a road trip, if you’re doing a road trip with the passenger, he’s looking at the maps and keeping you checking where you’re going. Oh, you have to take that exit there. So it’s the same idea with programming as you have somebody looking up documentation, checking over your code, making sure you’re not making typos and stuff like that. And I think ChatGPT does a really good job as a kind of driver slash passenger. You can use it to do a bit of boat, and I think that’s a much better way of thinking about ChatGPT and how to use it.
Alex:
It just had a profound positive impact on my ability to come up with patterns. So I’ll think about something, I’ll be like, okay, I have this thing, and as I’m writing it down, I’m describing it to chat, and I’m like, I have this thing, for example, with Siren just now I have this, I had to do this integration for the recurring subscriptions with WooCommerce. So I was like, okay, so I have this thing that happens for a recursion and I need to make sure that I’m able to capture that, and what are some patterns that I could utilize to be able to do this? And it just, oh, yeah, that sounds like maybe this pattern would make a lot of sense. I mean, it was just an event driven one in this case, but I find asking it specifically, what kind of patterns make sense that would solve this problem has been really helpful. Focusing on the abstract level instead of the detail oriented level. It’s been super helpful, able to cross-reference that with common programming patterns that are, what is that site called? There’s a site that has a lot of really great resource for that.
Carl:
Yeah, there’s a GitHub repo too for PHP where it tells you all the patterns. Yeah, all the patterns
Alex:
And everything. Yeah, and I love that.
Carl:
Yeah, I mean, I use it for, they say there’s the two hard things in programming, right? Naming things and cash in validation. So I use it for the, can you give me, I’m trying to do this. Can you give me five class names, ideas, and why you’d name it that? Honestly, it’s been great. Sometimes you get stuck, you want to name some, I’m intense about naming, so I overthink naming things, but I find it useful in the longterm to have clear conceptual ideas around names. I find it helps and just have it throw ideas at you. You might, so, no. Oh my God, it’s so good. I keep telling people it’s the most important tool I added since I added an ID to my workflow.
Alex:
Absolutely.
Carl:
And I don’t feel trended about it, but it’s really, really a force multiplier for me, especially I think it sounds like you’re a bit like me. You’re pretty full stack, Alex. So when you’re full stack, I find it’s even more useful because it’ll bring up, let’s say you’re 60% at something and you’re 90% at something else. Well, it’ll bring you to 80% the stuff that you’re weaker at. So I find if you do a lot of full stack, it’s really useful for that as well. It just levels you out way more than, obviously if you’re an expert, if you’re a DB expert and 90% about databases, you’re not going to get out a lot out of chat GPT. But if you have a diverse skillset and some of it is not as strong as others, it’s so good for that.
Alex:
Yeah, it’s helped me a lot with creating database table schemas. There’s a lot of arcane knowledge to me about creating a good database table schema that helped me with that a lot and creating those. And it also helped me a lot with just TypeScript, just wholesale full stop TypeScript.
Carl:
Yeah, I mean, freaking JavaScript errors are always the most obscure things ever, and you try to Google anything and it’s useless, and then you put in chatty PT and it’s like, oh, it’s probably, you put it the code and the error, and you’re like, oh, yeah, it’s probably that. And it’s like, right, 80%, 90% of the time, at least, even if it’s not right, it puts you in the right direction, which I would never have been able to do. I don’t do JavaScript full time. So those kind of obscure errors that have, sometimes the error is not even where the problem is
Alex:
Usually.
Carl:
So it’s really frustrating. So yeah,
Zach:
It does a really good job of lot of things. For example, just on the naming side of things, you can give it an idea for something you want to start and just describe what it is you’re building and ChatGPT, I’ll give you a list of names for it. It’ll do a whole bunch of stuff like that too. I was actually trying to explain something the other day, which is a training methodology called Mastery Learning, and I asked it to describe Mastery Learning to me, and it gave me a very succinct and very accurate writ description of the mastery learning methodology. It’s so cool. And the thing is, there’s a huge difference between using 3.5 and using four, and not a lot of people know how big that difference is because there’s a paywall in front of four. I would tell everybody who is curious about using ChatGPT in the manners that we’ve talked about to try out Plus and yeah, it’s only $20, right?
Carl:
Yeah. Only if you haven’t tried four, then I thought it was useless till I tried four, basically, and then I wasn’t using it until I started using four. So if you’re using 3.5 and you feel like you’re not getting anything out of it, you’re probably right. I wasn’t getting really much out of it either until I started using four and four was really, really good. But yeah, you just remember that it’s a junior programmer. It can make mistakes, it can invent APIs or things that never existed.
Alex:
I’ll just respond to it and I’ll just say, are you sure about that? With no context? If I’m not sure, I’ll just be like, are you sure about that? And it’ll just be like, oh, whoa, whoa, whoa. No, I’m just kidding. I was wrong.
Carl:
Yeah. Yeah. Sometimes I catch it too. I dunno if I didn’t take the habit of just basically automatically asking it, are you sure? But I’m just like, sometimes I look at something, I’m like, oh, this doesn’t seem right. I don’t think you could do this. They’re like, oh, my apology. Definitely. I mean, it’s not the first time I’ve talked about it in this podcast, but I’m just like, well, I will just keep saying it until everybody tells me they have a chat, GPT or under whichever subscription. Basically, I find it, I always say if I had to choose between, although I haven’t tried a new copilot, but if I had to cut between chat GPT and GitHub copilot, I would cut copilot in an instant because for me, that ChatGPT is the one that I really need that I feel like I would lose something. Singing copilot is really useful. It does really good auto complete. I find that it’s getting a lot better. I don’t know. What’s your experience been like, Alex? But I feel like it’s getting, GitHub copilot has been getting a lot better. It grabs context between files now that I’ve noticed that I feel like it didn’t do before you, before I felt they could only know what was going on in the file. You were editing, and now I find that it’s picking up stuff that’s in other files. Now.
Alex:
I’ve actually been using the JetBrains AI thing and have not had much luck with it. I’ve used a little bit of copilot, but not nearly as much to be honest. I ended up just getting a browser, like an extension for my IDE. I embed a browser in the side panel, so when I click on it, it just opens that up and I just put your GBT there. So it’s literally in my IDE without being officially in it.
Carl:
Yeah, I think if you use DS code, the newer version of copilot has a chat bot that you could talk with, but it’s not in the jet. Yeah, I’m a pH p storm user. I didn’t even try the Jet Brainin AI I saw on Twitter, people were saying it’s trash. So I was like, I haven’t tried it.
Alex:
Yeah, it’s okay. But after a couple weeks of using it, I’ve just stopped. I’m just using the browser one instead. And I’m like, well, okay, I guess I, maybe it’ll get better, who knows?
Zach:
There’s an unofficial plugin for Visual Studio Code for chat GPT-4 that uses the cChatGPT API, right from inside the editor. So I pretty cool. It’s great for refactoring and that kind of stuff. You can ask questions in a window in the editor. It does real time responses just like the GPT website does. So you can see as it’s responding in real time, it supports follow-up questions, and then you can insert the code snippets directly into your active editor. You just have to give it an API key and it’ll all work inside Visual Studio Code.
Carl:
Cool. Yeah, I mean, I’m okay using it as a separate, I have my workflow, so it’s fun. I don’t need my ID to have everything in the kitchen sink in it. I’m happy to look into another window. Oh, I was reminded before the show started, Alex also talked about a little project that got me really excited that is not public yet, and I definitely don’t want to end the show without talking about it because I was super, super excited. So do you want to talk a bit about what it is?
Alex:
Sure. Okay. So whenever I started developing Siren last year, even before that, I was building another open source WordPress library called underpin, and it’s public and it’s still a thing, but the goal of underpinned the original one was to basically make it so that you can register things and WordPress consistently. So instead of having, you don’t have to know what different function and different methodology behind registering a screen versus a user role. It just kind of standardized all of that into a single thing. And I kind of grew that into this idea where I could abstract WordPress away from my plugin completely, and it just kind of lapsed in on itself because the plugin library wasn’t originally built for that. So I ended up starting over about a year or so later, a year or two later after working at GoDaddy for a while, because while I’ve been at GoDaddy, I’ve been working on their managed e-commerce offerings and stuff like that.
And a lot of the people on that team there all have Laravel backgrounds and are just ludicrously smart. They have just a completely different approach to PHP that they’ve been exposed to different things that I have been exposed to in my time working with WordPress and different paradigms and stuff like that. And I’ve worked with Laravel prior to this a little bit, but not a ton, not enough to be able to confidently create this abstraction layer that I wanted to make. But fast forward a little bit later, and I started building Siren after having worked with these people and getting to learn about these different methodologies and things like that. And a lot of the paradigm with Siren that I’ve had since day one was I want to know that if I ever want to take this plugin and I want to turn it into a SaaS, or I want to turn it into something that’s not a WordPress plugin, that’s a recipe API or whatever, that I can do that without either rebuilding the plugin completely or hosting it through WordPress. I don’t want to do that.
So in order to do that, I kind of came back to this original question of how do I abstract WordPress away from this plugin and still make it work with WordPress? And to do that, I basically started just, I treat WordPress like an integration instead of the other way around. So I’m not integrating with WordPress. WordPress is integrating with me. So in order to do that created, I started building a library called PHP Nomad, and I think Carl said it’s not public yet, but it has all kinds of different things. It has an ORM dependency injection and a lot of modern day programming things. But the point being is that it abstracts all of that away from WordPress. So you can literally build your entire plugin without even installing or using WordPress, and then whenever you’re ready, you just install the WordPress integration package and it’ll just work with WordPress.
So there was a bit of extra work that goes into setting all that up, obviously, but if you’re building a distributed plugin or something like that, and the idea of being able to pull something in and out of WordPress or have it run both on Laravel and on WordPress is attractive. I think this is a really good fit because if you wanted to make it run in Laravel, it’s just the goal. I haven’t built that specific part yet. I haven’t had to integrate with Laravel yet. But the intent is to be able to basically just install a different integration package and then set it up on Laravel a little bit, and it’ll basically just know, okay, from the table schema and all the details that are provided, we’re going to go ahead and build all the tables inside of Laravel or inside of WordPress or whatever, plus race API endpoints and all of that.
Carl:
Yeah, I got really excited, literally doing a consulting client that’s a consulting contract right now that’s essentially ripping out WordPress code and building an SDK just for the less, if you dunno what an SD K is, it stands for a software development kit, I forget. But basically it’s like a library that’s supposed to be agnostic to anything. It’s like basically it’s a library for a specific programming language. So in this case it’s PHP. So basically create a library for PHP and then swap that into the plugin. But also the goal is to also build a Laravel package so that they can use, again, like Alex was saying, maybe you want to move away from just having your plugin or service just be for WordPress. You want it to be for WordPress, maybe eventually Symphony, because Symphony would probably give you Drupal as well, or pretty quickly.
So it gives you a bit more of a foundational layer. So that’s why I was like, oh, I got really excited. This is literally what I’m doing right now consulting wise right now these days. But it’s really interesting for these products that the plugins more of an integration wit WordPress. So it’s not necessarily about the feature. It doesn’t necessarily work itself way. It’s like the whole product is something on top of WordPress, but if you’re relying on an external service and just bringing it into WordPress, then it starts being interesting for those types of plugin products to have something like that if you’re trying to find other markets to go into and things like that.
Alex:
Literally the only reason why it’s not public right now, aside from the fact that it’s, I mean, it’s pretty well developed at this point. Like I said, I’m launching Siren next month, so it’s been pretty well fleshed out. But the only reason why I haven’t made it public yet is because one, it’s just a lot of work to make them all from private to public, probably, I don’t know, 18 to 20 different packages that are created for all the different abstractions, everything from APIs to translations and everything in between. But the other reason is literally, I just haven’t figured out how to taking the time to figure out how to make Sirens Composer package set up so that it actually doesn’t conflict should other people decide to use this plugin later. Because WordPress and Composer are oil and water, unfortunately. So I have to figure that out first. And it’s just a couple of pretty small hurdles that I just have to get over. But yeah, I mean, I’ve been noodling around. I started private because I wasn’t sure if I wanted to make it public or not, but I think a lot of people would benefit from it. So it’s kind of hard for me to keep it for myself.
Zach:
It’s always the balancing act, right?
Carl:
Yeah. I mean, I don’t know. I think it’s a cool idea either way, just from a tinkering. I mean, I don’t know how big of a subset there is. Emir is supposed to be Laravel Vapor, and I was like, oh, there’s probably enough people that love Laravel and do WordPress for this. And actually there isn’t as big of a subset as you’d expect. But I mean, I still think it’s interesting for some plugin developers who are looking for other places that they could maybe do something. Because like I said, Laravel has a lot of packages, but it doesn’t have a lot of products. There’s not a lot of things like if you want to do image processing or things like that, different types of things that are services. There’s not that many things available to them. So there’s an opportunity there, but it depends you what product you’re doing and things like that.
Zach:
Yeah, I mean, it’s really interesting.
Carl:
Do you think you’ll make it public when Siren comes out?
Alex:
I think I’ll launch Siren and once the dust settles just a little bit, I’ll probably start endeavoring to do that. There’s a lot of organization that has to happen with the repository been I’m building it from the ground up since it’s just me. I’m like, I’ve been basically cowboy coding the whole time, so I’m pushing everything in a single commit. I’m like, I’m in flow. I don’t have time to deal with the process right now. I can deal with the consequences of this later. So I’m just building and I’m pushing the code and I’m doing all the things you’re not supposed to do. And it’s like I have to organize all of the stuff a little bit more, get the libraries, get the licenses actually in place and all of the kind of get it buttoned up a little better. I certainly know how to do that, but it’s definitely a non-zero effort, so Oh yeah.
Carl:
That stuff is never as a non-zero like making,
Alex:
Right,
Carl:
Unless you just literally want to dump it out. But if you want it to look somewhat professional and people to take interest, you need docs. You need a good read me. Maybe you need a little project logo,
Alex:
And I already have one because ChatGPT is great for that.
Carl:
Yeah, exactly.
Alex:
But it’s a picture of the PHP elephant driving a Class C camper really fast and its ears are flapping as it’s hanging out the window. It’s awesome. I love it.
Carl:
Oh, that’s so cute.
Alex:
But yeah, I’ll probably launch it afterward. Mostly, I mean, it would be kind of silly not to because from a product standpoint, for Siren even, it would be really beneficial for me for people to be able to understand PHP Nomad, because if they know not PHP nomad, then they understand how Siren works, which will make it a lot easier for the community of people who are going to extend Siren. It’ll make that a lot healthier. They’ll be able to do this easier and a little better because there’s some rethinking that you have to do whenever you’re extending Siren or you’re using or extending PHP Nomad and it’s minor things like instead of doing ad action or remove action or anything like that, you have to use basically a facade. It’s a version of a facade. So it’s got a static thing that accesses the event registry, and you tell it what event you want it to fire.
And under the hood for the WordPress integration, it’s literally just using ad action. But if you are building something where you not only you want the plugin to be able to potentially migrate out of WordPress or anything for that matter, you also, the thing that, the reason why I did it is because I want to make sure that everybody who’s extending this plugin can also do that. So if I go from being inside of WordPress to being, say a SaaS or something like that, I want this so that everybody who has an extension for it could also make that jump without having to completely redo everything they’ve done. So there’s been a lot of effort into thinking that through. And so yeah, I’ll probably end up launching it just because there’s a lot of paradigm shifting and a lot of thinking that comes with that. It would be a lot easier to share if the code was just public.
Carl:
That makes a lot of sense to me. And also it’s, it forces you to be a bit more less cowboy like you said. I mean, I’m not OCD in person, but with code, I’m a bit OCD. I can never just do lump everything together and just do it. But I always trying to think if this was public and somebody needed to read through the history or something like that, at the very least. But yeah, it doesn’t have a lot of mental overhead to make anything public. I’m much more careful about that now. But it’s a cool project and you seem really motivated about it. I think it’s worth leveraging that energy to get over the finish line, if you will. It’s a cool idea. I love it. Obviously I got super excited.
Alex:
Yeah, it’s cool. I think I’ll know, I feel like I’ll know whenever it’s time, I guess, if that makes sense. There’s going to be a time where it’s going to make sense for me to push it out. And like you were saying, a lot of the reason why I am so hesitant is because, or why I have been hesitant, and other reason is because there’s just so much code that’s being written right now. I didn’t want to slow myself down with that process, and I know that process is there and I want to take it seriously, and I want to respect that and do that properly. And so I’m kind of in this nice little bubble, this little warm space where this is still mine and nobody else is seeing this, and I can just do what I want at the pace that I want and not have to worry about the consequences of it right now.
Do you know what I mean? But once it goes public and once you release it, and this is the same with product, I actually think that this is why a lot of developers, myself included, have so much trouble launching because they want to build one more thing and one more thing. And once you launch, it changes. It changes things. All of a sudden there’s consequences for your actions. If you make a change today, that change could have a profoundly negative impact on your life three years from now, because you have to make some kind of change that reverts something or migrates data or something like that. It just adds all this complexity. So I’m just like, I’m in this bubble and I don’t know when I want to get out of the bubble with the open source side of it.
Carl:
I could do a whole podcast on that topic basically.
Alex:
Yeah, I bet.
Carl:
But I will just say quickly, testing, testing, testing, testing, and you think you have enough testing, you add more testing. Because I will tell you that I write an update every two weeks for emir, and I was just saying, I just upgraded to Laravel 11, and the project started on Laravel sixth, and one of the reasons I can do these things and not be scared is because I have a really good test suite. It takes, I think, total 12 hours to run. But that’s the trick. And unfortunately, I try to teach this to developers. It’s like you have to think all these habits are about thinking if you’re really going to work on a product for 10 years, think of AffiliateWP or all those old plugins. You have to be able to go back in time, look at the commit messages, look at all that information, and be able to piece together what the person was thinking, what you were thinking. People forget that they’re coding the thing and they’re like, oh, I’ll never forget this. And actually two weeks later, you’ve already forgotten 90% of what you were thinking while you were writing this. It’s insane. So it’s really important. I always tell people it’s really important, but testing is kind of putting that memory into code. Basically. You’re saying, don’t forget that this breaks here. Don’t forget that this causes problems.
Alex:
Yeah. I like to think of ’em as contracts almost, where it’s like I’m saying that from now on, my code will never do this again, or it will always do this again. Do you know what I mean? Yeah. I love that. What I was thinking about the day before, let alone six months later,
Carl:
Like I said, if you start working on a project, and like you said, product developers want to build products, but they also don’t really want to maintain something. Building a product also means you’re going to have to maintain this code for a long time. If you’re the type of person like, oh, no, I want to move on to the next shiny thing. I’m like, actually, well, you can, but it’s all about the work that you put in, right? Do I want to work on PHP 8.3? Do I want to work with Laravel 11? Yes. Okay. How do I make sure that if I push this out, I don’t break everything? How do I have confidence? And especially if you’re alone, even more important, but it’s depending on the product that you’re doing. I do infrastructure management. This is critical. I can’t afford to have things break.
So it’s an interesting, that’s why I think it’s really interesting because a lot of the things that people, developers really don’t want to do actually enable you to do the things that developers want to do, which is play with new toys, try new features, upgrade PHP, not be scared to upgrade or do anything, or rewrite your code. You’re like, oh, I figured out a better way to do this. It’s like, oh, but I can’t touch it because everything’s going to break. I don’t know what, actually, I don’t test anything. I refactor things all the time. And it’s great because I’m always confident that it won’t break. If you’re listening to this and you’re wondering why to do this, I mean, if you like tinkering and playing with new features, here’s your reason. Here’s your carrot.
Alex:
Yeah. I’m a huge fan of, and that’s kind of some of the motivation behind me building PHP Nomad for me, because one of the big things that I’ve discovered is dependency injection over the last few years that’s been, and we never really got to use that in WordPress. So having access to a container and being able to work with that, it just makes testing so much easier, and you’re able to create test instances, and it also just kind of forces you to do single responsibility principles and it’s great. I love it. Huge fan. Oh, before I forget, I wanted to mention this in this chat, the best tip I have about coding wholesale full stop job’s. Done. You ready?
Carl:
I’m ready. I’m listening.
Alex:
Are you sure? Okay. Whenever you’re done, the last thing you do, whenever you’re walking away for the day, add a to-do comment and whatever line of code you’re on and say, you were here, you were thinking about this, and then close the laptop.
Carl:
Okay.
Alex:
Literally, that has saved me hours because you wake up the next day or whatever and you sit down in front of the computer or next week or whatever, and you sit down and it’s like, I’ll literally just open up my IDE and do a search to find where I was.
Carl:
I love that.
Alex:
I’m serious. It probably saves me 20 minutes of just trying to load back up and figure out where I was. There’s something about reading that message, and it just connects my brain to that moment. And it’s loading 90% of that right back of my head, and I can just keep right on going.
Carl:
Yeah, I wish I could say that I need it, but I never stopped thinking about what I’m writing. I never stopped thinking about codes. I find it’s never disconnects. I think about code in the shower. I think about it in my sleep. It’s a problem. It’s a problem.
Alex:
I feel your pain. Unless I’m playing slay this fire,
Carl:
Then Oh, I love slay this fire. Yeah,
Alex:
I bet
Zach:
That’s a fun game. Yeah. So, well, we’ve covered a lot of ground here, right? I feel like Alex, we could have you back and talk about any of these subjects for another hour. Anytime. And we’ll have to do that in the future. We’ll have to once you’ve released Nomad.
Carl:
Yeah. And Siren and Siren. And you can talk about are you maintaining code? You’re now maintaining code for the foreseeable future.
Alex:
How was that cowboy code, buddy?
Carl:
Yeah, exactly. Tell us how you’re managing it now.
Alex:
Spent the last six weeks writing tests I should have wrote.
Zach:
Yeah, right. That’s a thing. That is absolutely a thing. But yeah, it’s been great having you on here. And I think that we should in the future, go back and talk about all of this again and see where things are at. How do people find you if they want to find you on the
Alex:
Internet. So there’s really three places you can find me. First off, I’m on Mastodon, so Alex at alexstandiford@fosson.org. You can also find me on Twitter, pretty active on there as well @alexstandiford. And then my website, alexstandiford.com, is the first place I publish everything. So every tweet, every post, everything that I publish on the internet period is published on my site through a feed and things like that. So it all gets cross posted from there.
Zach:
That’s awesome. And if anybody wants to know more about Alex, I highly recommend that you go and check out the website. A lot of content there, especially about the digital nomad lifestyle and the four years you spent on the road and a whole bunch of other stuff there. So it’s honestly a great site. Lots of interesting topics of conversation there. We could probably build episodes around individual articles there as well. Just lots of fun. Thank you so much for taking the time to be with us this month, and if you’re interested, we’d love to have you back someday.
Alex:
Yeah, absolutely. I would love that.
Zach:
Well, this has been yet another episode of the Woo DevChat. Thank you all for listening. As always, if you have any suggestions for things that you would like to hear about or if you’d like to be the next Alex, please get in touch with us through the Do the Woo website, and we would love to hear from you.
Carl:
Or just harass Bob.
Zach:
Yes. I mean, bug Bob is a hashtag
Carl:
Bug bob. Bug Bob. Bug Bob. Yes, that’s true. I forgot about that. Yeah. Hashtag bug Bob.
Zach:
We will see you next month.
Alex:
See you.







Leave a Reply