All right, welcome back. I'm Jared, and you are listening to The Change Log, where each week we interview the hackers, the leaders, and the innovators of the software world to pick their brains, to learn from their failures, to get inspired by their accomplishments, and to have a lot of fun along the way. On this episode, I'm joined by Carson Gross, who calls himself the CEO of HTMX, which you shouldn't take seriously because Carson doesn't. HTMX is a small, zero-dependency JavaScript library that he says completes HTML as a hypertext. Carson built it because he's big on hypermedia. You might even say he's hyped about hypermedia, if you're a nerd like me. He's so hyped, he even wrote a book called Hypermedia Systems. Carson has a lot of strong opinions, weekly held, that we dive into in this conversation. It's a ride. I think you'll enjoy it. But first, a big thank you to our partners at Fly.io, the public cloud built for developers who love to ship. We love Fly. You might too. Learn more about it at Fly.io. Okay, Carson Gross on the changelog. Let's do it.
Well, friends, Retool Agents is here. Yes, Retool has launched Retool Agents. We all know LMs. They're smart. They can chat. They can reason. They can help us code. They can even write the code for us. But here's the thing. LMs, they can talk, but so far they can't act. To actually execute real work in your business, they need tools. And that's exactly what Retool Agents delivers. Instead of doing just one more chatbot out there, Retool rethought this. They give LMs powerful, specific and customized tools to automate the repetitive tasks that we're all doing. Imagine this. You have to go into Stripe. You have to hunt down a chargeback.
You gather the evidence from your Postgres database, you package it all up and you give it to your accountant. Now imagine an agent doing the same work, the same task in real time and finding 50 chargebacks in those same five minutes. This is not science fiction. This is real. This is now. That's retail agents working with pre-built integrations in your systems and workflows. Whether you need to build an agent to handle daily project management by listening to standards and updating Jira or one that researches sales prospects and generates personalized pitch decks or even an executive assistant that coordinates calendars across time zones. Retail agents does all this. Here's what blows my mind.
Retool customers have already automated over 100 million hours using AI. That's like having a 5000 person company working for an entire decade. And they're just getting started. Retool agents are available now if you're ready to move beyond chat bots and start automating real work. Check out Retool agents today. Learn more at Retool dot com slash agents. Again, Retool dot com slash agents.
Today, I'm joined by the CEO of HTMX himself. It's Carson Gross. Welcome to the Change Log. Hey, thanks for having me on. Happy to be here and happy to talk about software and maybe some HTMX and so forth. I'm happy to have you as well. I feel like our paths have crossed a few times. I think you've been on a show I produced, maybe a show that I co-hosted, but never got to sit down one-on-one and just talk software. So this is exciting to me. You have lots of opinions about software, don't you? I do have a fair number of opinions. What are they? You're supposed to have something opinions strongly held or weak opinions. Yes. Whatever that is. Strong opinions weekly held, I believe. Whichever, I have the opposite of what you're supposed to have.
I do have opinions and not like, but I don't think everyone has to agree with me for sure. What's interesting about you, you've had these opinions kind of embedded in software over the years. Intercooler is where it started. HTMX and became, you spent a long time trying to get people to pay attention to HTMX. I remember because we had you on GoTime, we had you on Jay's Party and you were kind of starting to get some traction. And then you just decided, I'm just guessing, decided like, I guess I need to just become a Twitter troll and that's how I'll actually get attention. Because eventually you actually did rise to the point where like HTMX is out there. Like you are a known quantity at this point. Was there an epiphany where like, I just had to become the world's best troll or how did you do it? Troll is such a, such a.
Just, you know, it's trolling for lack of a better term is good. Now, I had always been, I'd always had fun on social media, like not taking it very seriously. And I think what really happened, and there's a video you can look up online, the speech that I hear, the talk that I gave at the Big Sky DevCon, which is the big conference out here in Bozeman, Montana, where I live. And I talked about sort of my experience marketing HTMX and how. You know, I had had Intercooler, the predecessor to HTMX, technologically very similar, so conceptually very similar. And it didn't have nearly the success that HTMX had.
And I don't think that there's anything that I can point to and say like, that's what worked. I think there's a lot of survival bias problems and just, you know, random things that happened. And so I did when HTMX was sort of going to go to 1.0 and also in our book, Hypermedia Systems, which your listeners can check out at hypermedia.systems online for free and you can buy it in hard copy if you want. We just sort of like a bunch of things came together and I had been getting, so, you know, when I went to HTMX 1.0, I was like, okay, I'm going to double down on being crazy on Twitter. I'm not going to troll people. Like I'm not going to attack people. That's one thing that a lot of people.
try to do is like, you know, you punch out to try and get a bigger account to say something to you. And I definitely like engaged with bigger accounts, but I try to be funny instead of sort of mean. you know, whatever. And so in that talk, I think it's called a theory of open source marketing or something like that. I talk about sort of like the whole process and sort of what I've found has worked online. So I wouldn't say I set out explicitly to be a troll. I think people are used to very serious technical content. I do try to have like, you know, I published an ACM peer reviewed paper on hypermedia and we're open to get another one in to the ACM hypertext conference this year. So we're doing intellectual work as well and, you know, more serious work. But at the same time, I think the medium is the message at some level. And like on Twitter, if you're taking it too seriously or any of these Twitter like situations, you're probably not utilizing it the way it was.
to be used. Like it's a hundred and whatever characters saying something funny and coming up with a good meme is probably going to be much more effective than trying to be, trying to be all serious. So, so I think a lot of things kind of came together at once prime, you know, the primogen and fireship dev happened to cover HTMX, like right when we were releasing the book. And so there was definitely this sort of moment on, and then the X algorithm changed briefly. It's changed back. So I don't get nearly the engagement I used to, but for just for a brief period of time, the way I was posting was just perfect for the algorithm. And everyone was like, why is HTMX on my homepage every day?
Like, I don't know. I just got lucky. Yeah, that's kind of the way it is. Yeah, you got to play to the crowd, you know, know your audience and know the medium, like you said. For a very long time on Twitter, my entire approach was just memes. And I eventually, I did pretty well. I had some viral ones and we grew our account from like 2,000 up to like 30,000 people. And I just kind of grew sick of the entire rat race of what it was. This is back in the pre-Musk days. But it was fun for a while to like try to play the game and see if you can get good at it. And of course, you're using that to promote your open source and your thoughts, which really, it seems like you're trying to get your way of.
creating apps out there through hdmx but also through your essays which are technical and thoughtful and still interesting reads they're not like you know acm style essays maybe they don't read the acm it just seems like it's too dry for me yeah it's pretty it's pretty technical and academic but just you know getting your thoughts out and uh and sharing them hypermedia a big thing that you're into i think taking html seriously is uh something that i've heard you say where does this viewpoint of the world come of web development particularly well i think uh one thing that i've realized is i built intercooler and then htmx is i i didn't appreciate hypermedia when i really when i built the things it took me you know there's this idea that like existence precedes essence that's a philosophical idea where something has to exist and then you can look at that and say okay what's the essence of this thing like strip away all the you know particularities of this thing like what's the essence of it and that was very much my experience with htmx where we have to i had to build it and then understand okay wait a minute this is really generalizing hypermedia controls like i didn't when i created intercooler and htmx i didn't think oh i know what i'm doing i'm generalizing hypermedia controls but when i looked at what I'd done and I went back and read some of the historical writings on hypermedia, then I kind of developed that idea like, okay, this is why this is working as well as it is. Because it always felt like I wasn't writing that much code and I was getting a lot of bang for my buck out of it. And I think the reason for that is it was taking this sort of like...
higher level idea of hypermedia and then generalizing it is the way that i would say it so um so you know i just think that's it's this is one of those things that uh you know you have to do it before you can really talk about it and so i did it with intercore ds and then hgmx and that put me in a position to write these more sort of like deep essays on hypermedia and the thing that i came to understand about hypermedia as i got into it is it's a just it's one of a few different ways to build distributed systems and that's you know there's uh if your listeners are familiar with roy fielding he wrote a really famous dissertation sort of early on for the web and it's pretty academic and hard to read so i don't you know you can read it there's a reasonable summary of it in the hypermedia systems book that you can read if you want. But what he talks about in there and what I've come to appreciate about hypermedia is it's just one of these like sort of fundamental ways you can build.
a distributed system. And it was a really effective way as evidenced by the fact that the worldwide web sort of took over everything, you know, in the late nineties and early two thousands. And so developing an appreciation for like, what's unique about it, what are its strengths, what are its weaknesses? That's just something I've been able to do over the last say five or 10 years as I've been working on, on these things. And then I'm trying to communicate that to the broader development world because the broader development world has sort of left hypermedia behind because of the weaknesses in particular of sort of the base HTML web model for hypermedia. HTML tries to address those weaknesses. And then it's a matter of convincing these people like, Hey,
I know the old way was sort of clunky and, you know, the big kerchunks and all this like flash of unstyled content and all that stuff, but the web's gotten a lot better. And by the way, HTMX can make it even better and make it more effective. And then the advantages of that old approach, which were, you know, simplicity, like there's a simplicity to it and so forth, or it can be available to you even if you're building some class, some subset of modern applications. It's not appropriate for everything, of course. And so I try to talk about the trade-offs that are inherent in hypermedia-based applications, but it can be used for a lot of stuff. And even if you don't use it, I think it's interesting from a technical perspective, just to understand the ideas and what the trade-offs are.
If you were to distill down what hypermedia is into a few bullet points or principles, you know, so they're all on the same page, what would you say? I'd say hypermedia, a hypermedia is some sort of media. So text is the most common media we work with, HTML, with what are called hypermedia controls in it. And that's nerdy, but bear with me. What hypermedia control is, is something like a form or a link where you've embedded in the document what Ted Nelson would call a nonlinear control flow mechanism where you can jump to some other place or you can submit some information. And that control, so let's use the term control.
like UI controls like buttons and so forth. That control is embedded in the document in a really kind of unique and interesting way. So you have content and then you've got this control sitting there right in the middle of the content. So those are hypermedia controls. And what HTMX does...
is make it possible to sort of generalize that idea. So a lot more things can be hypermedia controls and they can do a lot more and they can replace only chunks of the screen and so forth. And a lot of these ideas are very old. Like the idea of replacing only a chunk of HTML in a screen has been called transclusion for a very long time. And a lot of hypermedia academics have talked about it, but it just never really caught on in the web because the only way to do it on the web previously was with iframes. And so HTML is sort of like...
breaks out of that and makes it more general and a lot smoother. You don't have to deal with that frames and the limitations that that has. But that's what I would say, hypermedia. It's a media, some sort of media. We're most familiar with the text, so hypertext, that has these weird things in them called hypermedia controls that can interact with the network and do crazy things, like navigational and update style. When you talk about forms, which are added in HTML, you sort of update style operations to interact with a remote system.
the h in html hypertext right ht hypertext market language that would be a form of hypermedia But HTMX exists, and I guess a lot of these other styles of building applications exist because, like you said, of the lack of tooling or the lack of power that's in the HTML spec or in the elements provided. Was this something like when the, you know, the fieldings and the Tim Berners-Lee's and, I don't know, early Microsoft, you know, IE, browsers, Netscape people, like, were they trying to build a hypermedia thing and they came short of it because HTML wasn't powerful enough? Or how did it get to where HTML is a hypertext, but it doesn't have all the controls that we need to actually build what we want to build?
I think hypermedia is just sort of a weird thing, and people aren't used to it. People don't, you know, we developers, when we think about distributed systems, we fall back to this RPC, remote procedure call, like paradigm, just very quickly. And maybe that's because that's what we work in for the most part is RPC. And so that's what I see with a lot of SBA style applications is it's much more of an RPC style. application, which is fine. There's nothing wrong with that. It's just different than hypermedia. And so why did they stop with forms and HTML2? And that was a really important advance. I mean, to the credit of the web and what they did with the web, all of Web 1.0, which includes like Amazon and Google and all that stuff, like that was all done with Web 1.0 tools. That was a massive advance as far as distributed computing goes. So the anchor tag and the form tag are both very powerful. Just those two little controls are very powerful in some ways, but they just weren't as useful as they could have been if they had
kept advancing the web as like hypermedia aspects of the web. Instead, what they really sort of turned to was more like they introduced a lot of APIs that were more client-side oriented and scripting. And so that makes some sense to me. You know, that's just the way we developers tend to think. And I think, you know, it gets big enough and the hypermedia people start getting ground out and maybe they just weren't thinking too much about the idea of generalizing this notion of hypermedia controls. And so I, you know, I think it was, it was so powerful at the time. Like it's hard to look back and say, well, you know, guys, this could have been more powerful.
It's just, it was doing, it was doing really well. And then JavaScript was there to address any issues that came up when it wasn't powerful enough. And so we just sort of slid into this world where more and more JavaScript took over more and more. And that didn't, so therefore there wasn't a necessity to keep going with the hypermedia ideas that were sort of inherent in HTML. So I think it's, you know, it's reasonable. And like we've talked, you know, you mentioned before we got on here, like the term rest has sort of been completely like flipped from the start till now because of that. And so there's a historical process there. And, you know, Google maps, I think shares a lot of the blame because Google maps.
came out and it was just this amazing app compared to like all the, you know, if you use MapQuest beforehand, you had to click a button and kerchonk and like go to the next thing. It was horrible. And Google Maps comes out and that's not building in a hypermedia way at all. It's all, you know, RPC style stuff. And it's amazing. And everyone freaked out and was like, well, we got to build apps this way now. So, and I don't think that's, you know, that's totally understandable, but it's just a historical process. So hopefully we can, you know, hopefully we can bring hypermedia back into the consciousness of web developers as a potential and good alternative for some class of web applications. Right. So HTML has the anchor. It has the form.
And we do have, you know, Ajax for like, you can, you can build in partial page updates. We can build around all this kind of stuff. But what are some examples of the things that HTMX adds that really gives it what it needs to be a full hypermedia API or whatever you want to call it? Yeah, I would say the way I would say it is what, how does HTMX generalize this idea of hypermedia controls? And so what I've eventually hit on was the HTMX takes, so anchors and forms, what do they have in common with one another? Some user action, a click or a submit, depending on which one triggers an HTTP request, like a request to some remote server. And that server responds with HTML.
And then that HTML is placed somewhere in the document. So it just anchor tags and forms that can be controlled with what's called the target attribute. And you can actually target an iframe by name if you want. And that would be transclusion where you're only updating part of the page. So what HTMLX does is it says, OK, let's generalize those things. First of all, any element can be hypermedia control, can participate in this sort of like remote request world as a hypermedia control. Any event can trigger it. So not just clicks and submits, but also, for example, when an element scrolls into view, that's a common time when you want to.
maybe make a remote request or something like that. And then it can issue an HTTP request. HTMLX also supports things that aren't supported by HTML right now. So in plain HTML right now, all you can issue are get and post requests. That's, I think, a shortcoming of the HTML specification that we're actually, we have another project called Triptick that Alex Petros, who's a core member on the HTMLX team, is really driving. And then we're trying to get HTML to adopt some of the ideas of HTMLX. So we're trying to get those other requests, put, patch, and delete are the ones most people are going to be familiar with so that you can actually use them from HTML as well. But HTMLX, you can...
use all those and then htmx but the final sort of generalization of it is you can say when the request comes back and that request when it comes back it isn't going to be json so you're making a request url you're getting back html and you can say in htmx i want you to target this element and the element that you target doesn't have to be an iframe can be any element on the screen you use css selectors to pick it out and then it'll replace that element or you can there's a few different options you can say either replace the whole thing or put it inside the thing or maybe put it at the end of the thing or whatever and so that's really what htmx does is it takes this the the sort of specialized ideas that you find in anchor tags and forms and then generalize them. So, you know, any element can act like hypermedia control now, can replace any part on the page. And if you were to provide the virtues of that, like here's why hypermedia is better or, you know, trade-offs, et cetera, as opposed to the way we're building web apps nowadays, which is very much more of an RPC style thing, what would you say?
I would say the biggest thing is you're reducing the amount of state that you've got in the total system. Because when you have an RPC system, you've got server state and you've got a client-side state store of some sort. And then you've got the DOM, which also at some level is a representation of the state. And all three of those things need to remain in sync via callbacks or whatever and blah, blah, blah. And so that's complicated. That's just another layer. Whereas if you go back to the hypermedia model, there's really just the server and the DOM and that's it. So you get rid, you collapse one layer of state and state management that you have to worry about. So you're not really talking about like client-side routing or any of that stuff. That all goes away. And it's just interacting with the server in a stateless manner, relatively stateless.
manner, sort of like the original web. And so virtues of that are really simplicity. It can, in some cases, dramatically cut down on the amount of code you have to write. The trade-off of that is that the interactivity that's available isn't always as high as it is if you have a much more rich client-side model and the sort of reactive feedback that you can get with client-side libraries. And so it's sort of gated on this network request model. And if your system can't do that well, then it's not going to be a good approach.
There's some echoes of an old style jQuery building of applications where you have some CSS selectors, maybe you hijack a form submit, and then you say, you know, when the submit happens, go grab this HTML, target this thing, put it in there. And we build web applications that way for many years. With more or less success, you can build yourself a sprawling mess like that. Like it can happen. So one of the things that maybe the greatest virtue of the React movement was this one-way data flow, re-render, don't worry about.
where, you know, the target spot for this thing is going to intercept with that. Now I got to update, you know, I got listeners and I got pups I'm going on because I have different things I need to update based on what's coming back from the server. Does this have something built into it that helps avoid the jQuery potential spaghetti or is it just a different way of going about similar apps, but because it's in the HTML, maybe it's simpler, cleaner that way. What are your thoughts on that? Yeah, I think there's definitely a line at which if you try to do too much with HTMX, you're going to get into that sort of like, oh man, this is just too much. It's an interactivity line, in my opinion, rather than like an application size line. You can build very big applications with HTMX, but if you try and get too fiddly with a UI and you're putting a network request on every interaction, then that's probably not going to be good. And so you can use scripting with HTMX. That's sort of the style of scripting that you would use. I would call it very DOM oriented. You wouldn't try and have like a model. Whenever you have an additional source of truth in your system and HTMX is in there, you're going to start having to deal with synchronization issues. That's just the nature of it.
I think where HTMLX is superior to what you were talking about, the old jQuery mechanism of building these sales applications. Older listeners might remember jQuery.load, which was the method, actually, that pretty much inspired Intercore. I looked at that and was like, oh, that's cool. I didn't know you could do that. Use that to solve this problem I was having in a web app.
And then I saw Angular 1 and the way they used attributes in the HTML. And I didn't like the way they were programming, but I liked using attributes. And so where I think HTMX is superior and where you don't really get the sort of spaghetti code that you sometimes got with jQuery is because with HTMX, you put the attributes that specify what to do on the elements themselves. So it's right there. So older developers who work with jQuery a lot have no doubt run into this problem where there's a button, it does something, what does it do? Well, you got to find the ID and a selector somewhere, and maybe someone did something crazy like string concatenation. So it's really hard to figure out what the heck is going on with that.
And HTMX eliminates that by basically putting the logic, just like the href or the action on a form tag, it puts it right there on the element. And I think that dramatically simplifies things from a cognitive standpoint. You can obviously still build a snake's nest with it. And again, if you try to get too fiddly with interactions, I think that can lead to that situation. But for a large class of applications, the interactions aren't that fiddly. What you don't want is that really old reset of scroll state and the flash of unstyled content, which has gone away in modern browsers for the most part. But just that feel of resetting everything on every action that you got with the old.
old web. And so HTMX avoids that. And I think that's why you can make pretty compelling applications in many cases just using that model. Now they don't have to spiral out of control sort of like the old jQuery apps did. No, I think you're right. The, I don't know what you call it, but like the co-location of the code that operates on the elements with the elements is a huge improvement over, I think we went kind of crazy on separation of concerns back in the jQuery day where it's like all your JavaScript is over here in this other file that like randomly attached, not randomly, but arbitrarily attaches to different elements. And then you're wondering in your HTML, it's super clean, right? But you're like,
this HTML has no idea what's going to happen with it. And so I think having it there does make a lot more sense. Yeah, I wrote an essay on that idea called locality of behavior. You can find it on the htmx.org slash essays page, where I talk about exactly what you're saying, which is this idea of co-locating the logic with the element itself and sort of stepping away from separation of concerns, which I think has not been nearly as beneficial as many of the advocates for it said. And we've had that experience now with these old jQuery apps. We just know it's better. Like, man, I just wish I could see what this thing does. And so as long as what that...
as long as that logic isn't too complicated and doesn't overwhelm the markup. And in the case of HTMX, it typically doesn't. It's like two or three attributes at the most. Then I think it's fine. I do, you know, tailwinds CSS sometimes gets mentioned as well. And tailwinds, I've not taken the tailwinds bill yet because when I see a ton of tailwinds classes on it, on an element, I think to myself, man, that seems like that should be a CSS class to me. But it's just probably a skill issue on my part. So I think there's a balance there.
There is a balance. I'm definitely on that fence where I'm not sure exactly. I kind of agree with you, but there's like a line that you cross at a certain point where it's like, I feel like I'm just writing my CSS in here. We can get on a tangent on that. I think there's certainly, again, virtues to having it localized there. But sure, it'd be nice to have just like a couple of classes and then have that stuff tucked away.
Well, friends, it's all about faster builds. Teams with faster builds ship faster and win over the competition. It's just science. And I'm here with Kyle Galbraith, co-founder and CEO of Depot. OK, so Kyle, based on the premise that most teams want faster builds, that's probably the truth. If they're using CI providers, their stock configuration or GitHub actions, are they wrong? Are they not getting the fastest builds possible? I would take it a step further and say if you're using any CI provider with just the basic things that they give you, which is if you think about a CI provider.
It is, in essence, a lowest common denominator generic VM. And then you're left to your own devices to essentially configure that VM and configure your build pipeline, effectively pushing down to you, the developer, the responsibility of optimizing and making those builds fast, making them fast, making them secure, making them cost effective, like all pushed down to you. The problem with modern day CI providers is there's still a set of features and a set of capabilities that a CI provider could give a developer. That makes their builds more performant out of the box, makes the builds more cost-effective out of the box and more secure out of the box. I think a lot of folks adopt GitHub Actions for its ease of implementation and being close to where their source code already lives inside of GitHub. And they do care about build performance and they do put in the work to optimize those builds. But fundamentally, CI providers today don't prioritize performance. Performance is not a top-level entity inside of generic CI providers. Yes. Okay, friends. Save your time. Get faster builds with Depot, Docker builds, faster GitHub Action Runners, and distributed remote caching for Bazel, Go, Gradle, Turbo Repo, and more.
Depot is on a mission to give you back your dev time and help you get faster bill times with a one line code change. Learn more at depot.dev. Get started with a seven day free trial. No credit card required. Again, depot.dev.
One thing that's interesting, I mean, what's normal you have on your website is porting stories. Like here's a port from React to HTMX and there's a few of those. It's abnormal and I found refreshing and cool is you actually have a counter port. It's not really a port. It's a lack of a port. It's Gumroad. They were going to choose HTMX for a new system and they actually decided not to. And so you host that there on the HTMX.org essays written by Gumroad founder Sahil. I'm not sure how his last name is pronounced. Lavingia? Lavingia? I don't know. Yeah, we'll just leave it right there.
That's cool. How did that come together? And then maybe just give a summary of what did they find? Why did they decide not to for their particular case? Yeah, I think that's a good essay. It's worth reading. And I just saw him on Twitter talking about HTMX and being pretty negative about it.
You know, one thing that I've learned about online behavior is that often your first reaction is not the good one. And if you do the opposite, like, you know, George Costanza, when he did like opposite, like he was just like, I'm going to do the opposite of everything I would do. So I was like, I've been trying to do that. And it has been surprisingly effective in my life. And I was like, you know what? Hey, he didn't, it didn't work out. I don't want people to use HTMX. If it's not going to be good for them, that would be like, there's no, no one's winning in that scenario. Just someone who's pissed off. They had to use HTMX. And so let's try and capture why.
htmx didn't work well for this particular use case um and so i asked him like hey would you be willing to write an essay on it and uh and he agreed and uh sort of went through and like here's here's what we found i would say the way they were using htmx is it was a uh it was an spa developer using it was like kind of a square bag round hole situation um and so they weren't using htmx the way i would use it um but at the same time that's going to be the same experience that a lot of spa developers have and uh so they just you know they're trying to make something they're really familiar with the spa tools and they make things work a certain way and they're used to that and so um if they come in and i think the big meta lesson in my mind from that essay is like if you're going to take the htmx bill you really have to take it like you have to understand hypermedia and think in terms of hypermedia and uh if you're trying to do these really fiddly little interactions it's going to get ugly and not be um and not be super effective i saw web dev cody as well he never wrote an essay i asked him to but he just was like he he tried to do and i think what he tried to do is he tried to move to go he was a javascript guy and he tried to go to he tried to do go and htmx at the same time and i think that was a mistake because now you're fighting with a new you know the new infrastructure of go you don't know where you know where's my wrench where's my hammer like everything's in a different place
And at the same time, you're also trying to make this pretty, and there is a really big difference between building hypermedia based applications and building SBA style or, you know, RPC style applications. And so I've seen, and I've seen that in not just his case, you know, but in many cases, if you try and bite off too much, it can, I think, end up in a pretty bad spot. I always recommend that people try HTMX out first on, for example, like an internal tool. Maybe you've got like some underserved. internal tool that is used just by your you know co-workers support support or whatever it is and it's just like an old school like curl app or you know php or whatever and maybe try sprinkling some htmx in there and see if you can get some quick wins with it and then and then that'll sort of show you what the strengths are rather than you know okay we're doing someone on twitter said every is good so we're going to rewrite the whole app in hypermedia and we're going to try and make it all work exactly the same so one of the reasons that i found they did list like five i think reasons why you know bullet points and one of them i found interesting which is a little bit outside your control and it's ai and tooling support and this is probably outdated at this point because even i've had a similar situation with ai tools with the elixir like the earlier versions just didn't really know elixir very well it wasn't very good at them and now as i reached i think gemini 2.5 and specifically claude 4.
is just better. Like it just knows more. And so like that problem kind of went away to a certain degree. But there is kind of a, that old saying, you know, nobody goes to that restaurant anymore. It's too crowded. It's like, it's like Next.js sucks all the air out of the room. And so people are just going to pick it because it's what they know. It's what everybody else does. It's what, where the jobs are, where the money is. And so to a certain extent, some of the reasons why people make choices aren't actually.
based on the merit or anything you can control at all they're just kind of like yeah well you know popularity is its own merit nobody ever got fired for buying ibm is like maybe frustrating to people who are more philosophically inclined but it's just the reality of life you know like right there technology is very much a winner-take-all sort of uh situation in many cases although we do see you know microsoft for example was like the big dog for a long time and then was down for a little bit and now it's maybe back. And, you know, so these things that seem inevitable, like there are these ebbs and flows. And, you know, one thing I say in that talk that I gave at Big Sky Software is if you're a little guy like me, like it's just me and a couple of other guys working on IGNX, really the important thing I think is hanging around and waiting for the winds to shift in a direction that is favorable to your technology. And the best way to do that, my experience has been, is to stay unrelentingly positive and like funny and just have fun. And so that's one reason why is, you know, like I told Brian the other day, like when I was on a show, I was like, being funny is no...
no joking matter. Like you have to like keep it fun or you're going to quit because it's frustrating. And these people are just picking that because they're picking it because Facebook said so or whatever. And you just have to be okay with it. And like, Hey, we're going to go over here. We're going to have our fun. We're going to, you know, make some funny jokes. And the technology is serious. There's a, you know, good ideas behind it. And I'm happy to talk to people about those ideas, but I'm not going to let the fact that, you know, so many people pick Next.js by default and pick SDA, the SBA approach by default, knock me out of the game. Right. Cause I'm not changing that anytime soon.
But, you know, I think we made a dent and we made a dent because we're just hanging around and having fun and being, you know, saying some interesting things. Persistence absolutely pays off. Yeah. Especially if you can stay positive and interesting for long enough. Yeah. We'll eventually pay attention to you. So next JS, of course, lots of money behind that sucker. You know, HTMX, like, do you have a goal in mind? I mean, how do you make your money? Is this just like something you do because you're a consultant and you use it yourself or like, what's the, how do you make your living and how does it play into that? If at all.
I teach at Montana State University. So I'm a professor. That's how I make my salary and health care and all that stuff. HMX does have a fair number of sponsors, many more than I ever expected, which I'm very appreciative of. But I try to treat that money as not real because it could evaporate tomorrow. And HMX is BSD zero licensed.
There's not money to be made. There's no plan there. Do I look like a guy with a plan? I wasn't going to say it. You look like a St. Louis fan. That's all I got. But you're out there in Montana. So how do you get to be a St. Louis fan? Sam, that's a funny story. I've actually never been to St. Louis in my life. So I coach youth baseball. That's like my other like.
cape that I wear. And I was in California for a long time. That's where I grew up. And in California, it was impossible to be the Giants or the A's or the Dodgers or the Padres or the Mariners. Like you just could never be any of those teams. Oh, they're all taking my time. Yeah, exactly. They're all like the cool, the cool coaches get all those. And I got sick of fighting over it. Not, you know, I grew up a Giants fan, but, and, but the Cardinals were always available. And I was like, I don't know. I like the hat and like, I respect their program. And so I had, you know, we just had all this Cardinals gear laying around because that's what my little league teams always were. And then the MLB TV came out and they just, they wouldn't let me watch the.
giants because it was in market like regional stuff yeah exactly and so i was like well i got the hat i might as well start watching the cards i guess and so i started watching the cardinals and it just kind of spiraled from there and now i like the cardinals one i like the giants so that's hilarious i had a similar experience in my childhood for some reason just based on the markets is that for some reason i'm here in nebraska and i don't know why it's this way but when i was growing up like in the 90s on tbs i think it was every weekend it was just Atlanta Braves. Why would it be Atlanta? I guess probably because. Turner. Yeah, there you go. Turner's out of there. Yeah, so I don't know why, but like the Braves was on and I watched the Braves like religiously as a kid. I just loved them. And they actually were a good team back in the 90s. I had some World Series runs and so I became a huge Braves fan. I'm not so much anymore, but just seeing like for me, a kid in Omaha, I'm like, why do you like the Braves? It's the only thing on TV. Yeah, exactly. That's basically my story too.
One day, actually, you know, especially when H&M was super hot about like six or eight months ago, a guy in the Cardinals organization like saw me and saw me wearing a hat, like a technical guy, like a programmer, and reached out and was like, hey, do everyone want to come down and get a tour of the stadium? Like, let me know. I'm like, man, I should do that. You should totally do that. Or at least go to a conference or something in St. Louis. Although it's kind of cool to be able to say I've never been there, you know. You'd ruin that. Speaking of cool venues, we were at Microsoft Build up there in Seattle recently, and they had their after party in the Seahawks Stadium. I can't remember the name of the place. Lumenfield? Yeah. So like Microsoft.
bought out lumen field for the night and they just had their after party on the like you're on the field you can kick they let you kick field goals and stuff that was pretty rad just yeah that is pretty cool i'll never forget uh what oh what's his name beast mode, Marshawn Lynch, that run that he, do you remember that run of his? Of course I do, yes. He just throws that guy off him. So I went to Berkeley for undergrad and I was there when Marshawn Lynch was the running back and he was just always such an unbelievable football player. And I'm not a Seahawks fan, but I watch that video every once in a while because I'm like, man, I need to see the greatest run by Cal Berkeley alumni ever. Yeah, absolutely unbelievable. All right, well, now we're talking sports. Let's get back onto your essays. No, I apologize.
Vendoring or code and dirty? I want to talk through a few of your essays just because I think you do a good job. Now I know you're a teacher. That makes more sense of elucidating your thoughts and kind of your style of programming. Let's go to this one, which I think you and I both seem to like, which is the code and dirty one. I think you wrote this last year. And it's a bit of a response to clean code, not specifically, but like there's this idea of like how you're supposed to write software, of course, Bob Martin's clean code book, which is highly regarded in both and also hated kind of a piece of work. And you wrote quick and dirty, which.
you know, is contrary to a certain extent, but I also find myself nodding my head. So talk me through some of the thoughts here on your coding style. Well, you know, Bob Martin and clean code is definitely a dominant idea. It's a dominant sort of, you know, ideology, I would call it maybe in coding. And there are aspects of it that I don't hate or that I don't disagree with entirely anyways, but there are aspects of it that I don't agree with. And I code, I definitely code very differently and I've had a pretty successful programming career. And so I wanted to communicate, particularly to younger developers, like don't be intimidated.
by these things. It's one thing I just like, and I have, you know, Bob and I have kind of gotten into it on Twitter a little bit. Jokingly though, he's been a very good sport and like not, doesn't take it seriously. So I really appreciate that. We don't agree with one another and we can make, but we can make a joke out of it. So, but I really, you know, I think there is a,
What do I want to say? I think younger developers can be intimidated by these terms. Like clean code is one of these sort of, like, how could you be in favor of dirty code? Like, you know, how could you be opposed to this? And then you look at the actual ideas and you're like, wait a second. Like, you know, there's this, there's the headline and then there's the actuality of it. And the headline, you know, of course everyone wants their code to be clean, but then the realities of the recommendations I think don't necessarily hold up. And so I, like, now that I've had some success as a programmer, I'm trying, one of the things I'm trying to do is to go out and say like, look, as I do things pretty differently than most of these, particularly sort of the consulting.
oriented, clean code, agile, like that whole world, the way they say to do things, I do things pretty differently. And I've had a pretty successful career. And so that was the inspiration of this essay. And I think there were three sort of things that I went at. So I don't believe in short methods for the sake of being short. I think long methods are okay. And I don't unit test my code. Like I don't do TDD.
I do test my code, but I don't necessarily do unit testing and sort of the ideological, what I would call ideological approach of like always writing a test before you write any code. And then the last thing that I take issue with is, or that I sort of say, this is how I do things different is I tend to write code with classes that are much denser and bigger than clean code advocates would recommend. And so I tend to mix concerns. I have classes that do more than one thing, which is something that clean code people would object to. So those are sort of the three things that I picked out in that essay to focus on. So, and I'm happy to go into each one individually. Yeah, let's talk about big functions.
because I've definitely done it both ways. Early on in my career, like early on, you don't really have opinions because you don't know what's good or bad. You're just like, I need to make a thing. And so I'm going to try to make the thing. And so I was very open to advice. And I remember early on in the Ruby community, I took Sandy Metz's advice on many things. And one of the things she said, of course, she's very level setting in her ideas, but she'll say, follow the rules until you know better and then break the rules all you want, as long as you know why you're breaking the rules. One of the rules that she had was short functions. And I think she even says like five line functions, like just give yourself five lines.
And if it's more, just have another function and just do that for a while. And eventually you'll know why and you'll know when not to, and you'll break that rule. But there's a rule. I think it was five lines, which in Ruby is very small because like two of them, like we're not using curly braces. So like two of them is the def and then the end. And so you're like, what, three lines? I tried to follow that rule for a while. And I found it incredibly constraining. And eventually I broke out of it, but it always gave me this sense of like, you know, if a thing starts to get too big, I start to at least think about a refactor. I may not do it. But I didn't really consider back then this idea of.
functions matching kind of the, or function size matching kind of the importance of the code. And I definitely realized that with classes, I mean, you have like your user class, for instance, you're like, you can go look at any app and see it's user class or whatever it's functionally important to that. And you're like, yeah, you're like, okay, here's the app, you know, or there's usually like two other classes that are like, here's where the majority of the app is. I think that's good. I think it's good to have.
this sort of matching up, which I think is some of your point. But when you say long functions or big functions, are you talking like 10 lines, 20 lines, 500 lines, 2,000 lines? What are your thresholds? I don't really have a threshold. I definitely will start feeling antsy when a function has more than, say, 100 lines of code in it. But if it's an important function and if there isn't reusability to be achieved by pulling the code out, I still won't refactor it just because it's too long. I try to make being too long not the reason I do things. If there's code reuse...
then I'll do it. And the reason for that is, so you touched on it already. I think it's important functions should be big. Like important things in general should be large and unimportant things should be small. And so when you go into a code base, if there's a hundred five line codes, it's kind of hard to get a handle on what.
is happening there, you know, and obviously it depends on exactly what style of code that is. Is it like a library, like a list thing, or is it like domain logic or is it controller logic or whatever? So it really depends on the, you know, what style of code that is. But I prefer to go into a code base and be like, okay, here's like the five functions that are really important for me to understand. And let's go through them and read them top to bottom and not have to be navigating down five level deep, five levels deep, and then coming back up and then going back down, you know, doing that sort of tree walk that you have to do if you have too much decomposition in a code base. And I use IntelliJ and all the JetBrains products and I'm good with navigation. So I can move around, but I still just find myself.
preferring just like just tell me what you're doing you know you show me like only like you do this then you do this then you do this and fine it doesn't all need to be factored out if there's no code reviews to be achieved with it. So I think that's important. I think another important observation, and this is a bit of wisdom in computer science, is that there's two hard problems, right? Naming things and cache invalidation and off-by-one errors. So naming things is one of the two hard things in computer science. And whenever you extract a function, you've got to name things. You're committing to the parameters, the signature. If you accidentally make it public, someone else suddenly starts relying on it. There's a lot of danger in pulling code out into a separate method that I think is unacknowledged by people that act as if.
if pulling code out to another function is just a free operation, or in fact, we'll just make things better just because you get it. That name changes, you're sort of committing yourself to that particular bit of logic now because it's somewhere else, so it's harder to go and change. And there's just a lot of things like that where you end up constraining yourself because you've committed to this sort of signature now, a name for this thing. And so I definitely... I start to get itchy when a function is 100 lines of code, but also I try to be disciplined. I'm like, okay, if there's no code reuse to be found here, I'm not going to pull it out just to pull it out. Maybe for testing, maybe. But then that gets to the testing thing where I tend to prefer end-to-end and what are sometimes called integration tests rather than unit tests of functions. I don't like unit testing as much as I like those other styles of tests. And so that I think sort of dovetails with my opinion on longer functions. There has been some academic work, some actual empirical work on this, believe it or not. And the empirical work that I've seen indicates that you actually, I think it was like 200 lines.
code, you actually end up with fewer bugs per line of code if you're willing to allow functions to get larger. And then there was a modern, someone kind of tried to fact check me with a more modern paper on it. And again, that paper didn't show strong association with longer methods and bugs per function. So it doesn't seem like there's much empirical evidence that long functions are bad. It's mostly just an assertion based on what, as far as I can tell, or aesthetics. Right.
So here's something that I will do sometimes, and I wonder if you would do it or not. Sounds like probably not if code reuse is your indicator for extraction. Let's say I have a module that does one major thing, and it's kind of complicated. Let's just call it a checkout of an e-commerce. You know at checkout time, there's five or six things that you have to do. And so there's your function, whatever, call it checkout. And then it's going to have five or six steps. And each of those steps, I might even leave myself a comment. Here's my steps, one, two, three, four, five, and I'll describe them. And then I'll either have to decide, do I just code those up right here?
Or is each one of those the name of a subroutine? You know, and I code them up in separate routines. I've done it both ways. I honestly don't have like a strong opinion on it being better or worse. But will you just like code all five steps right there in the function most likely unless there's code reuse? Or would you would?
I'd probably put all five right there, maybe with comments indicating step one, step two, step three, step four, step five. And in particular, what I would look for is, is there a shared state between those things? Because if there is, if there's like more than one thing that's kind of crossing boundaries for those five steps, now extracting that out like can get dangerous because you have to encapsulate that state and are there callbacks or like some crazy, you know, you don't want some crazy callbacks. So like, but I would, I would be inclined to write it the linear way with just ifs and loops. And then if that proves to be unstable or I need to test them individually or something like that, then maybe I would extract them at that point. But I definitely wouldn't extract them. I would write it for sure the first time, just a straight line code. Straight through. And then if that wasn't good enough for whatever reason, then I would start, you know, and I would look for opportunities to like pull out utility methods if I see it doing kind of the same thing in a couple of places. But I wouldn't feel it necessary to structure something where it is. Like that's an important thing for someone to see that there's like five things going on here and sort of in a linear steps. And so I wouldn't try and hide that from them too much. Right. But for instance, if step two was.
calculate shipping. Well, there might be some other time you're going to calculate shipping. You'd probably wait until you're actually doing it elsewhere. Then you might pull that one out, call it from there, and then also call it from somewhere else. That makes a lot of sense to me. Yeah, that's the way I would do it. I do like unit tests, not for any other reason, but they're easier to write and they're faster to run, and so I feel more productive. Integration tests are such a drag because you have to do everything, and I know that's what the app does, but it makes me not like them. They're slow, they're expensive. A lot of times they include some sort of a runner, which may have to fire up Chromium or something. Right.
Yeah. So the language here is always difficult because like, what is a unit test? And this is one thing that infuriates me whenever I'm dealing with people online, like test advocates are often like, they'll argue definitions rather than concepts. And it's like, well, that's not a unit. That's not a really, it's like, okay, right. Like I'm not talking about useful. Yeah. So to me, a unit test is a test that like has, you have one function that maybe doesn't call any other parts of your system or you mock those calls out. That's a very common practice in unit testing. And so you're really just testing the logic in one method.
at a time. Whereas what I call an integration test is anything sort of higher level than that. And I think even testing the public API of a class, for example, is not unit testing necessarily because the internals of that class might be pretty sophisticated, may hit a database, may do like whatever. And so that's the level that I like to work at. So my criticism of unit tests is that they often test implementation details and they're not high level enough. And so yes, setting up a good integration test suite can be some work and can take some time to build out all the utilities that you need. And so often you have to build data objects or whatever. But my experience is that those tests tend to survive much longer because they express high
level truths about your code base whereas unit tests tend to express more ephemeral like this is true for now but then they go into a refactor then they're all going to break and the real hard thing about that in my opinion one reason to maybe be a little bit more careful with your unit tests is that when you get a large unit test suite and you've got thousands of tests that size has its own quality of like leaning on you You can't do a big refactor because you're going to break all these tests. And which of these tests that are broken are tests that are broken because we did the refactor and we want them to break? And which are tests that we actually broke something important?
And that can be really hard to tell when you get, you know, like I work to companies with like, you know, 50,000 tests that take 10 minutes to run. And it's like, I'm not going to refactor anything because if I do, if I can't clean it up, it's just going to, all this stuff is going to break. And I'm going to spend four weeks trying to figure out what is really broken and what just went away or whatever. And so that, again, I think that's one reason to try to get your, the assertions that you make about your system up. to higher levels, sort of away from the details of the implementation, which unit testing, and again, you can argue about language and all the rest of it, but I think unit tests tend to test implementation details too much. But I acknowledge 100% what you said, which is that the higher level the tests get, the harder they can be to run. They take longer to run because you've got to set up maybe some state and so forth. And then when you get to end-to-end tests, like you're talking about browser tests, it's so far away from the code that like, okay, did this test break because a label changed or an ID of an element changed, or did something actually break down in the mug? And so I love end-to-end tests, but I think you have to be really careful.
there too for exactly that reason. You need to keep that end-to-end test suite relatively small. Otherwise, people just start ignoring it because it breaks all the time and no one can figure out what's going on with it. And that's why, again, I really focus on what I would call integration tests for lack of a better term. Just like not unit tests and not end-to-end tests. So what are those? I don't know. Integration tests. Somewhere in the middle. Those in-betweeners. Hopefully they can run fast enough.
that they're still not like incredibly painful. And then when something breaks, it's more obvious than in the end-to-end case. So things break less frequently than unit tests and more obviously than end-to-end tests. So that's why I speak up for what I call integration tests, but I don't know. Yeah, there's certainly a give and take with a test suite where it's like, on one hand, it's kind of an asset that you have because it gives you assurances that your software continues to operate the way it was designed. You know, of course, with the asterisk in there that maybe, you know, you tested it wrong and stuff like that. But on the other hand, if you value that asset too highly now, it's actually holding you back from making progress. And so...
In smaller code bases, especially ones where I'm the primary author, I have no problem either refactoring the test right along the code or deleting the tests. Sometimes after I write the unit test, it's already done its job. I know the function works. The test can be gone. But in large projects with multiple developers, you didn't write those tests in the first place. You don't know if that test is passing because you changed this interface in a way that makes sense or if you actually broke something unbeknownst to you. And so it can become a hindrance to progress in that sense. Yeah, and I think that's similar to the case with extracting functions. People act like adding a test is cost-free or always a net positive. There's no cost associated with it.
not true like extracting a method there's a cost associated with that adding another test that like isn't gonna even if it's testing correct behavior today if it's super low level and testing like a particular implementation like that can hold you back from changing that implementation and people say oh well you know you just you just refactor the test too and that's fine to say but as you point out when you get into a big development, or even if you can't remember why you added the test, which I'm old now, so that happens. Like, what does this test even doing? I don't know. Then, you know, it's not as easy to just delete tests as people say. So there are costs. I think that's one meta point I would make anyone who's listening, and it's particularly younger developers, is that all these things have costs associated with them. Like closures, another great example. I love closures. Like, I love, you know, like doing data structure manipulation with sort of functional style maps and all that stuff. But closures can get super out of control, and you can turn it into a callback outlet you have in JavaScript. And so, so many of these tools that we have, you have, it's just Aristotle again, right? Like, there's like,
and overuse and then there's the golden mean and figuring out what that golden mean is sort of wisdom and development um so i think anytime you get someone who's like x is the way it's like well okay but like there's probably some trade-offs that are associated with that and i like to talk about those trade-offs um and not present any particular tool or approach or certainly the way i do things it's like always unilaterally just the best way to do things You also prefer a few classes. You don't mind god objects and like the old-fashioned FLs versus polymorphism. So I'm with you on some of those. I don't have a problem with god objects. I know that's a majority of people say that. It usually is a bad thing. But I think, like you said, that systems have certain more important parts than other parts. And if the user and the, you know, imagine GitHub, like the repo, imagine how much.
code is in their repo objects like github i'm sure it's more than is in their issue objects for instance and that's indicative of like it's about repos you know and yeah it can get unwieldy but um i think we are too afraid of that too early and hedging against something that may never happen we're prone to over decomposition is the way that i would say it with a break left we just break everything up it'll be and it's like it just doesn't it's again, it's decomposing a system is not cost free. And so yet, you know, cohesion is the idea that things belong, things should be, things that are related belong together. And so, you know, like you probably don't want your user, for example, being also where you send all your emails from. On the other hand, you're always sending an email to a user. So to me, like put some methods on user that send emails and that's all right. Like it's okay if that functionality is in there. And you know, my experience is the same as yours. The user obviously comes to do this massive thing. And I just don't think it adds much to break that up a whole bunch. Like, in fact, again, I would say there's a cost associated with that. If you have everything in one file, you know, if you have everything in one class, then it's easier to,
communicate across, you don't introduce additional lines to your UML diagram, right? I'm not a big guy, I'm not a big UML guy, but I do know that like more lines is bad, badder in UML. And so, you know, the insight there, I think, is to be careful with your decomposition at the class level, not just at the function level. So I think it's just, you know, same thing. Well, one place I'll break from you is that I've, in my career, moved from Ruby over to Elixir about 10 years ago. And the pattern matching...
properties in elixir allowing me to match on function invocations and have multiple functions of the same name with different you know arguments coming in have really simplified in my experience my maintenance of branches what i call like non-inconfident code like a defensive code that's what i just call it it's like so much of your code especially the top of a function is like making sure you didn't end up with a thing that you didn't want to end up with you know right and of course all the types of people are yelling right now but i like that more than if else But what are your thoughts on that? Have you worked in languages that have pattern matching at the parameter level? I haven't worked in a language that uses pattern matching as a primary dispatch mechanism. It looks a little weird to me. I'm just a Java guy. It didn't look weird at first, yeah. And so I'm just a Java guy. I don't have a problem with it, though. I think it's probably very effective.
And when I say ifs and loops, I think that's more of a spiritual ifs and loops than like the actual ifs and loops. You know, this idea of just like keeping it simple and, you know, in the Java world, which is where I spend most of my time, just, you know, not falling prey to this temptation of a complicated object model when you can just have an if statement that does the same thing. Like, you know, five lines of code with an if statement instead of like three classes with an interface and doing dynamic dispatch, which again, clean code would recommend, you know, like they say explicitly, like you see an if statement, could this be, think to yourself, could this be dynamic dispatch? And I would recommend the opposite of that. I would say, if you see dynamic dispatch, think to yourself, could this be an if statement?
Because you'll reduce the total cognitive load by getting rid of all these additional crappy small classes that you've got. They're just there basically to do an if statement. So I've never worked with Elixir or Haskell or these languages that really prioritize pattern matching as a dispatch mechanism. So I can't have a strong opinion on it. But I know a lot of very smart people who love it. So that seems indicative that there's something very good there. Yeah. For me, it's like the only way I've actually felt.
a lot of my conditionals melt away without huge cost because everything's still right there. The function name is the same. Right. You just have like a list of handlers effectively. Right. It is an if statement at some level. It's just a higher level way of doing an if statement. Right. But it's not passing you off to some new class that just has like a, you know, you just instantiate a new object and then calling this thing on it, which is basically what the Java story is. So maybe that's just a, maybe at the function level is like the happy middle ground there. I don't know. Yeah.
Well, friends, building multi-agent software is hard. Agent to agent and agent to tool communication is still the wild, wild west. So how do you achieve accuracy and consistency in non-deterministic agentic applications? That's where the agency, A-G-N-T-C-Y, comes in. The agency is an open source collective building the internet of agents. And what is the internet of agents? It's a collaboration layer where AI agents can communicate, discover each other, and work across frameworks. For developers, this means...
standardized agent discovery tools, seamless protocols for interagent communication, and modular components to compose and scale multi-agent workflows. You can now build with other engineers who care about high-quality multi-agent software. Visit agency.org and add your support. That's A-G-N-T-C-Y dot org. Let's talk vendoring. The last one here, I'll let you go, but this is a topic that's near and dear to my heart just because it's so much of what we do is dealing with other people's code and how to do that well and then failing to or when to do it, how to do it, et cetera. Vendoring, of course, is the concept of a pretty simple concept of just like actually copying other people's code in your project versus statically or dynamically linking to it. And you wrote on this as well, your thoughts on vendoring.
Well, I really like vendoring. I really like when libraries go out of their way to have no dependencies. And particularly when you talk about JavaScript libraries like HTMLX, HTMLX is designed so that it can be added to a website just with a script tag. You don't need to adopt a crazy build tool. I've heard very good things about Veep, but still, your average person is like, I just want to put a script tag in the header and be done with it. And I think some of the programming dependency management was an important advancement in computer science. I don't want to downplay it. But I do think we've maybe gone a little overboard. And I think some communities have gone more overboard than others.
and the JavaScript community is one of them, where you add a dependency and then a thousand other dependencies get dragged in. And now you have to have a pretty sophisticated build system in order to make that software work. And my experience, for example, for some reason, this seems like such an easy problem, but I've used three or four different static site generators in my life. And they're just like, whenever I go back to these old sites and try to upgrade, it's just... everything's broken always like the cross dependencies and like, well, it's just, I've had so many problems with upgrades like that. And so to me, I think library developers would be,
They would do their users a saver if they weren't libraries in particular apps are sort of their own thing. Like you got your dependencies and it is what it is. But if you're building a library, I think it behooves you to try as best you can to have as few or ideally no dependencies beyond, you know, just because, and if you've got to pull in some code and write it yourself or whatever, then just write the test for it. And obviously that's not always realistic. Like you're not going to do your own SSL library or something like that, but do not write your own crypto.
Right, but typically that stuff's provided by the system, right? Like most of the stuff you shouldn't write is typically provided just as a base library by the system. And so I think, particularly in the JavaScript world, I think a lot of libraries could, and I've seen, I forget which library it was, but there was a guy on Twitter talking about how like, each release of his software, he had fewer and fewer dependencies. And in release five, he got to zero. And it's like, that's so awesome because now your software can be used without all this other complicated stuff. And yeah, the JavaScript community is comfortable with V or whatever, but there's a lot of people that just want to do web development that don't want to deal with all that. And I actually think, so you talk about vendoring, the idea of vendoring is just copying the code into your code base. And I think there's actually a big opportunity right now for a vendor first.
dependency management system that keeps this idea of transitive dependencies, right? Like, you know, there are going to be times when a library is going to need to depend on another library and figuring that out is difficult. And that's a big value add that these dependency systems do. But I also think that you could do that. And instead of having like end products, like compressed JavaScript, that's unreadable or whatever, or in my case, just Java, you know, jars, like whatever that are, you know, you have to go and download the source code from somewhere else. Instead, what you could do is you could have a system like that that downloads the source into say a lib directory and
uses some naming convention to keep everything, but just has the source of the libraries there. And then when you compile your project, you compile your project and you compile that source all at once into the final product. And what's really nice about that is then you can check that source in. It can be part of your project. People don't have to have that dependency management system on their system in order to just check out and build your project and run it. And the other important thing, and I think this will become more important over time, is now you can see all the code.
that is in your project due to transitive dependencies. And so it's going to be a lot easier for security analysis and trusting. You'll be able to build your app and then ship it to production. Without this, what to me is pretty crazy, when people do builds in production and they're actually doing dependency resolution in production and then shipping that out, it's like you're trusting a remote system at the very last minute to give you the exact same code that it gave you previously. And that seems like a really bad security and just general stability idea to me. To me, I'd love to.
I wish Java had this, where I could just say, OK, these are libraries we depend on, figure out all the transit of dependencies, and then put all that code in my code base, say, in a lib directory. And then if I got questions about how something works, the code is just right there. And I can do an audit of it and make sure there's no inappropriate file system usage or anything like that very easily. So I think there's a big opportunity right now in what I would call vendor-oriented dependency managers, where you have a dependency manager that focuses on delivering source to the project instead of sort of final products like JARS or compressed JavaScript or whatever. Sorry, that's a little bit of a rant, but I've been thinking about it. No, that's interesting. You know, Ruby on Rails used to do that. I wonder if it still does. It wasn't the...
happy path, but like, you can literally, I think that's where the term vendor came from is you can literally type like rails, vendor, and then something. And it would, instead of like putting them in your gem file and then having a gem file.lock and, you know, downloading them to wherever they are in a system, it would actually unpack all that source code into your vendor directory. And that was good for deploying it because it was all right there, but it also kind of has some drawbacks. Like if you're going to check it into your history and stuff, every time you update your dependencies, you're having these huge splats of like files updated and it can be a little bit gnarly in that sense. I think there's pros and cons, but I do think it's an interesting.
way of going about it. Yeah, well, I think I remember the Rails way of doing it. I remember being a little janky and not working, because it just wasn't the focus of it. And then the other thing I'd say is computers are pretty fast. So like big janky check-ins are okay at this point. And, you know, I don't know. Like, I feel like I would rather see like what changed with my dependencies, you know, and add someone who's in charge of managing that and maybe is in charge of the dependencies and doing that work on their own machine. And, you know, then the situation now where I just like get new random jars and I don't know what's in them or what's changed or anything like that. So I do think there are a lot of trade-offs. I think there's an opportunity there. You'd have to do it right and you'd have to, you know, be smart about it for sure. But I think there's an opportunity there. And, you know, I would couple that with this general plea to library developers to reduce the number of trains.
dependencies that they bring into projects as well. I think in the JavaScript community, that's a growing trend over the last five or 10 years where I've seen, especially, you know, people pitch us a lot of libraries for coverage and conversation and stuff. Like dependency free is now a marketing term, which I'm all, I appreciate that one. There's some marketing terms, which I think are silly, like modern, everybody puts modern on there. It just means like they just got finished writing it, you know? But, but dependency free is actually like become a term of art that people put with their pitch. Like, Hey man, no dependencies.
to me, that makes it more exciting. I'm like, cool, I can more easily recommend this tool, just because I know I'm not dragging something else along for the ride, unbeknownst to me, you know? Yeah, exactly, and I have to point out, again, this is one of those situations where it's like, we had bad vendoring, where you had to manage everything yourself, and then we went, like, transitive dependencies, and everyone's like, this is great, I can depend on this, and then, like, it's spidered out of control, and now maybe there's this moment when we can sort of go back in between those two, and say, like, can we have some of the good of the dependency management system, but then some of the good of the vendoring. approach as well. I think that's something that's available to us now. We have the technology for it and the experience to do something like that. So I hope someone builds that. I do not have time to do it, but I hope someone does. Write your pitch deck, Carson. Get that pitch out there. Somebody will fund it. So real quick, HTMX 2.0, was there anything to that? Was it a big thing? I remember emailing you when it happened. You're like, well, it's not brand new or different. I mean, there's some things, but it wasn't a big deal. Yeah, we cleaned some stuff up.
We changed basically some defaults in it, and maybe we didn't do quite enough of that. There's a couple of things I look at. I'm like, man, I wish I'd changed that in 2.0. So 3.0 coming soon? No, we're not doing 3.0. There's an essay up on the future of HTMX on the website, and I talk about how I think HTMX, there are mistakes that I made in it, for sure. There are aspects of it that I would change if I could go back in time, but it's not wrong enough that I'm willing to break backwards compatibility to fix those things. They're just small, ugly issues or implementation issues that obviously be simpler. If I use Fetch instead of XHR or something like that, that would be a little bit cleaner.
I really just, you know, I think HTMX is the conceptual idea of it is strong. And the little gronkiness that exists around the edges is not worth breaking everyone who's using HTMX stuff just to clean up for, you know, philosophical reasons. And so we've thrown a lot of config options in there to turn on and off things. Like that's one way that I try to deal with things. Like I don't like how something behaves.
But it's the default. I'll put it in the right way, but then put it behind a config flag so people have to opt into that behavior. And so that makes HTMX a little more gronky than it would be if I was more willing to break backwards compatibility. But I think backwards compatibility is a big feature. And so the jump from HTMX1 to HTMX2 is very gentle for most people. You know, there were two or three config options that you could flip and basically have identical behavior with 1.0. And then that's just, that's the philosophy and sort of vibe of HTMX. Like, okay, we're generalizing hypermedia controls. This is what it does. We're not going to try and reinvent that. Like there's no HTMX.
CMX server components or anything like that. It does what it does and that's it. And so, you know, so I think that it's a different way of approaching software for sure, but I think there's advantages to it as well. Right on. Well, if you want more from Carson, hypermedia.systems, the new book, the revolutionary ideas that empowered the web, read it for free online by the hardcover to support the authors. Just came out in Japanese, by the way. Oh, nice. There you go. For all your Japanese listeners. Excellent.
No, I think that's it. You know, HTMX is the big thing. Hypermedia systems, those are the big things right now. So check them out. Oh, gregbrain.dev. If you want sort of a humorous take on, like my humorous take on software development from like a caveman voice, you can check out gregbrain.dev. All right. All the links to all those things are in your show notes. So check there, click through and connect with Carson. Good stuff. Appreciate your thoughts. Appreciate your work and putting it out there for free for all to have. That's always awesome, Carson. Appreciate you coming on the show. Thanks a bunch for having me on. I appreciate it.
Are you joining us in Denver for our big Kaizen 20 slash Pipely launch show? You should, if you can. Yes, we are recording live at the Oriental Theater in Denver on Saturday, July 26th. The tickets are 15 bucks cheap and free for ChangeLog++ numbers. There's a meetup, there's a hike, there's even a Brakemaster cylinder. Get in on it at changelog.com slash live. Thanks again to our partners at Fly.io and to our sponsors of this episode. Retool, go to retool.com slash agents. Depot, go to depot.dev and agency.org. That's A-G-N-T-C-Y dot org. Okay, this one's done, but we'll talk to you again on Friday.
Thank you.