Live data from Hacker News

Why Gumroad Didn't Choose Htmx

htmx.org

191–200 of 216 posts

Re: Why Gumroad Didn't Choose Htmx

#191
One quality of htmx that a nextjs solution won’t benefit from is stability. I have come back to an htmx project months later and been able to very quickly change a behaviour.

My experience with nextjs was a few deps now had vulns (fair enough, I’m grateful for the npm tooling that informed me) which necessitated updates which were a bit distracting and felt like yak shaving when all I wanted to do was a simple change. Even when there aren’t vulns I find it a bit lazy not to take the opportunity to evergreen the dependencies for a bit longer but that does frequently cost unwanted time.

One place where htmx feels underpowered is when you have multiple related states on a page - a table view with some summary metric fields across the top as a dashboard and some action items in a sidebar with labels exposing counts of actions. In htmx you can always resort to hxswap basically the entire view out rather than trying to surgically update each dependent target but at that point why am I using htmx, I can just round trip for a page refresh and skip the whole hassle of having a server side component strategy.

Re: Why Gumroad Didn't Choose Htmx

#192
As many others have mentioned, the comment about AI failing to cough up good answers is intriguing. But what has not been said is that this may also be evidence that the HTMX documentation needs improvement. In particular it needs (many) more examples.

I have always been a reader of documentation for libraries that I use, and I have nearly always felt that docs could be better. Having tried to write docs myself, I know how hard (impossible?) it is to imagine not knowing how the thing you are documenting works.

Recursivedoubts, please take this criticism as encouragement more than anything! I think HTMX is important both as a library and as a reality check against complexity.

There is something unnerving about the HTMX docs to me: over and over again, I read them, and I think, "ok got it, sounds straightforward" but then it turns out there is something slightly tricky that is hard to diagnose. I don't quite know why.

One thing that has gotten me a couple times is not being clear on whether an attribute is for the request or response. I feel kind of dumb admitting this but it has been harder than I'd have thought. My best suggestion would be to add a request/response column in the attributes reference listings. Debug mode validation of "hx-*" attributes would be very welcome.

Early on I definitely mixed up hx-select-oob/hx-swap-oob and hx-include/hx-vals. I've also made mistakes with hx-indicator/htmx-indicator although that's a little different because one is a css class name.

Another that got me recently was trying to set an hx-on: after-settle handler in the target element (client side) and having nothing happen, but then discovering that if I put it in the response it would work. This made no sense at the time. Now I'm wondering if it was because the hx-swap was set to something other than innerHTML.

Anyway, I think the main point is that some of these things are sort of related in various subtle ways, and also sound similar, and are easy to mix up. As a new user, when I try to follow the directions and then apparently nothing happens, it is very hard to know how to proceed. Really the only way forward is to find a working example and try not to break it, or selectively break it to figure out how it works.

I know docs are a lot of work, but in an ideal future there would be example links to click on for each one of the attributes. Perhaps I could help with that at some point.

I've always thought that HTMX has amazing potential on the documentation front because one can build working examples that are served completely statically. In fact I can't think of a UI system that is more amenable to training an LLM. You would just need to write out the expected end-state of the HTML target.

For context, I've been using HTMX as crucial component of a back office web app for two years now. It is mostly a custom scheduling calendar. Most of it is simple HTMX, but I've used OOB-swap and hx-on in places. I use it to do fast state changes without full page refreshes, and to implement a few multi-step forms that require back-and forth of valid form choices. Recently I built a modal control with different edit actions, etc. I don't think I would have taken on this client at all if it weren't for HTMX. So, thank you!

Re: Why Gumroad Didn't Choose Htmx

#193
Kudos to htmx for their refreshingly honest blog post! I hope many other open-source tools especially Databases can do similar things.

>> while it’s important to consider lightweight alternatives, it’s equally crucial to choose technologies that can grow with your project and support your long-term vision

A key takeaway that resonates with me is the importance of choosing technologies with growth potential and a thriving ecosystem – essentially making a long-term bet on their success. Too many devs get entangled with adopting shiny new things, while losing focus on delivering real value to customers.

Re: Why Gumroad Didn't Choose Htmx

#195
post #30

Earlier quoted context omitted.

Your attitude to call out where htmx might not be the best solution, makes me respect the project even more. It's refreshing to see this compared to lots of other projects that always seem to claim to be the best solution for everything. I'm curious in particular about the call out around drag-and-drop. Is that something you agree with? Is drag and drop difficult with htmx and if so, is that something you plan on tac…

> It's refreshing to see this compared to lots of other projects that always seem to claim to be the best solution for everything. Agreed 100%, hencq!

Your effort did not go unnoticed :-)

Re: Why Gumroad Didn't Choose Htmx

#196
post #170

Earlier quoted context omitted.

I think ~0% of people will be coding without LLMs in some form in a few years. How many people are still coding in assembler?

The LLMs will need to get a lot better though. I see every day on reddit/X a bunch of people saying they downloaded Cursor and built a saas without ever having coded anything in their lives; the resulting code is always terrible, full with really obvious bugs and buckets of trivial security issues. All these things can be prevented, in theory, but current LLMs really don't do that at all (they aren't capable).

> the resulting code is always terrible, full with really obvious bugs and buckets of trivial security issues

That's pretty much the same as what you got from old school stackexchange. The LLMs are trained on poor example data (e.g. from stack exchange) and I presume it is a hard problem to filter for just the "good" training data.

Re: Why Gumroad Didn't Choose Htmx

#197
post #170

Earlier quoted context omitted.

> LLMs will further amplify the existing winner-take-all, first-mover nature of dev tools This will be true for people who rely on LLMs to code , which I strongly suggest is not a great long-term bet for a software engineering career.

I think ~0% of people will be coding without LLMs in some form in a few years. How many people are still coding in assembler?

Compilers actually output the binary that you ask them to, though.

If all a compiler did was spit out a slurry of buggy assembly that misunderstands its context and has to be carefully scrutinized for errors, I would still be writing assembly the old fashioned way.

Re: Why Gumroad Didn't Choose Htmx

#198

Earlier quoted context omitted.

The LLMs will need to get a lot better though. I see every day on reddit/X a bunch of people saying they downloaded Cursor and built a saas without ever having coded anything in their lives; the resulting code is always terrible, full with really obvious bugs and buckets of trivial security issues. All these things can be prevented, in theory, but current LLMs really don't do that at all (they aren't capable).

> the resulting code is always terrible, full with really obvious bugs and buckets of trivial security issues That's pretty much the same as what you got from old school stackexchange. The LLMs are trained on poor example data (e.g. from stack exchange) and I presume it is a hard problem to filter for just the "good" training data.

Stack exchange answers make up a tiny fraction of LLM training data. They've dumped the source of every open-source project on the internet into those things. They've been trained on plenty of high-quality code; the trouble is that all that can teach is imitation.

The why behind a design decision is something an LLM can't understand simply by being fed the decisions themselves. Hence, though they often stumble into the right answer, they only ever do so because it "seems right based on context," and so they can easily apply a principle correctly one moment and then misuse it the next.

Re: Why Gumroad Didn't Choose Htmx

#199

Earlier quoted context omitted.

If your devs can't work without something writing their code for them, why are you hiring them?

> If your devs can't work without something writing their code for them, why are you hiring them? I am currently in the process of hiring a backend engineer. Anybody who does not use AI to aid development work gets an automatic disqualification. In my experience, a good engineer using AI tools will run circles around a good engineer not using AI tools.

"A good cyclist using training wheels will go circles around a good cyclist who doesn't." No, training wheels only help bad cyclists. You can't generalize that and assume they will make a good cyclist even better.

AIs generate deeply mediocre code. This is better than anything a person who can't code on their own would produce, but an experienced developer will have to spend all their time babysitting the AI to get it to behave properly.

Re: Why Gumroad Didn't Choose Htmx

#200
post #145

Earlier quoted context omitted.

Does it support nesting?

here htmx is integrating with Sortable.js for drag and drop functionality via events, so whatever Sortable can do, htmx can respond to: http://sortablejs.github.io/Sortable/

I'm kinda familiar with Sortable, but haven't looked at it in the past several years. I'll have a look again, thanks!
Post reply on HN