
Kyle Johnson
2.2K posts

Kyle Johnson
@negcx
Startups, product, engineering, customer success







Fox News now saying 401K holders should just accept their fate since 2025 tariffs on Canadian potash is our modern day Normandy Beach. “We need 100% buy in”.






Packers legend Brett Favre to join Donald Trump at Green Bay event Wednesday jsonline.com/story/news/pol…

I spent the weekend rewriting our entire product into @htmx_org. I'm planning to write a longer article about this experience in the future, but wow... this was the most fun and productive I've been writing code in 20 years.
I normally hate js libraries, but this was so joyful and I just have to say something about it.
I've been writing code for the web since before the `ActiveXObject('Microsoft.XMLHTTP')` swept in with Windows 2000 and changed the game. I've spent most of the past 25 years building software for the web, not because the web is a particular passion of mine, but purely from the pragmatic ease of deliverability.
In the olden days, distributing software painful beyond words. If you've never felt the pain of a disconnection 7-hours in while downloading FreeBSD over a 56k dial-up connection, or spent hours swapping through 28 1.44MB floppy discs to install the Borland C++ IDE, then it might be difficult to explain how liberating "web development" was at the start of my professional development career.
With web development, I could write code and immediately make those programs available to anyone in the world. Everything we built was _UGLY_, was crammed to the brim with SQL Injection vulnerabilities, and was usually pretty slow, but we'd finally reached a point where distribution was no longer the hardest challenge.
During the next 10 years, web development actually started to get pleasant. We got libraries like Prototype.js, Rico.js, and later jQuery, and the idea that those libraries would normalize-away all the bad parts of supporting multiple browsers and we could focus just on writing our business logic.
The word AJAX originally was a term that meant "Asynchronous Javascript and XML", because in the early days of building clean modern web-apps, the prevailing wisdom was that all of your AJAX calls would be sending HTTP requests to the server and getting back fully-formed chunks of XML.
Also at that time, developers were moving away from the random design of early HTML and there was a big push towards a version of HTML called XHTML (XML-compliant HTML). That was where we first started using a trailing slash on self-closing HTML tags like ``, and with AJAX, if our HTML was valid XML, we could take the response directly from the server and start putting it into place with `.innerHTML`.
But writing XML has always sucked, and several years later JSON took over as the dominant standard of sending structured data to and from APIs. In general, this was a HUGE win over dealing with malformed XML and so everyone rightfully switched over.
What we didn't realize though was what we were losing. In the year 2003, when I wanted to update a div on a page without a full reload, I would make an AJAX request to one of our prebuilt server side components and get an XHTML representation of that component with whatever content had been updated in the database, and would immediately dump it right into the page. No parsing, no worrying about fields, just a single assignment to a DOM node's `.innerHTML`.
As we moved more into the JSON era, now we all decided that every endpoint should respond with JSON, so we built a version of the page that loaded with HTML, and then APIs that would send back JSON that we'd have to parse and update on the page.
Then we moved to libraries where the entire back-end responded with JSON, and we had the front-end library do all the DOM node rendering. I hated this, and fought against moving to these technologies on any product that I was in charge of.
We can write our entire product to work as a traditional boring web application. We write our own HTML/CSS and have a request to /dashboard load the full HTML page. This works great, but it's not very "sexy" and we have to send the entire page down the line with every request. @htmx_js changes the game for us.
Now, we can write our full normal boring web app, but add @htmx_js on top of that when we're done and all of the sudden unlock beautiful modern reactive websites without any extra mental burden. A click to the "dashboard" link when the page is already loaded has our server send back _JUST_ the middle part of our app that shows the dashboard. All the extra stuff (menus, navigation, logos, footers) can be ignored. Saves the server a ton of time per request, and makes every page load beyond the first one take up just a few small KB.
This is the missing link between sane web development and modern web development. This was the tool that needed to exist in 2005 when we were all figuring out how to build nice web applications. If we had this back then, I think the world would be a much different place right now.
But I'm glad that it exists now, and I don't see how we can ever go back to anything else. Many thanks to @htmx_js for the great library and @ThePrimeagen for talking about it and getting this great library on my radar.









