r/programming 3d ago

</> htmx ~ Building Critical Infrastructure with htmx: Network Automation for the Paris 2024 Olympics

https://htmx.org/essays/paris-2024-olympics-htmx-network-automation/
104 Upvotes

21 comments sorted by

49

u/New_Enthusiasm9053 2d ago

Only 2 levels of functions is crazy work lol. Also lauding AI for copying and pasting the same thing 3 times is wild because it's "better to not have more function calls", Htmx is great but the rest is the work of the insane.

31

u/FullPoet 2d ago edited 2d ago

Agreed - I don't think OP (and a lot of other people realise) how much tech debt they make with vibe coding like this.

Yeah, it takes 5-10 minutes now but how long will clean up take down the line?

13

u/New_Enthusiasm9053 2d ago

It can take weeks to clean shit like this up even with AI to help. It's really unpleasant. I don't mind the odd bit of duplication to avoid coupling loosely related systems but in this case surely he could have extracted a handful of functions to reuse across the 3 functions. 

Nevermind it's more obvious how things work when you don't have a hundred variables in scope. Function scoping is also an important mechanism for avoiding bugs.

1

u/yawaramin 2d ago

Maybe, but from all indications refactoring and adapting the application was easy:

Moreover, the same app was used on the “Tour de France 2025” with minor changes that were made easily thanks to the hypermedia approach.

2

u/New_Enthusiasm9053 1d ago

Then it wasn't complex to begin with. I'm no fan of react etc but no substantial project wouldn't turn into spaghetti with just 2 levels of functions. 

Plenty of thousand line function code working in science but it's still shit code.

1

u/yawaramin 1d ago

It doesn't sound like the changes were made to the business logic though; as my quote says, the changes were minor because of the use of the hypermedia approach. Hypermedia is used to structure the app frontend and its network interactions, not the backend logic.

33

u/FullPoet 2d ago

Cool article!

Please dont link to discord. Just host it somewhere, discord is awful

-1

u/yawaramin 2d ago

Thanks. It’s not a link to Discord, it’s a link to htmx.org

11

u/BayLeaf- 2d ago

... I imagine they are referring to "There’s a demo video on the HTMX Discord here.".

8

u/FullPoet 2d ago

Sometimes you really wonder if people read what they submit!

1

u/yawaramin 2d ago

I read it, but I don’t have perfect recollection so it’s helpful if there’s more context.

3

u/lxbrtn 2d ago

Come on it takes 5 seconds to find links on the page

2

u/FullPoet 1d ago

And theres only three! Its the first one!

And theyre highlighted blue on grey!

1

u/yawaramin 1d ago

People can read some piece of text and not immediately recall every detail like what link is hosted where. And a comment like ‘please don’t link to Discord’ in a reply to a website submission can be confusing without context and without perfect recall, and it may not be immediately obvious that it’s referring to a link inside the article. It also adds to the confusion when the submitter is not the author and didn’t choose what links where.

When reading your writing, not everyone will interpret it the same way.

-1

u/yawaramin 2d ago

In any case, I don’t even know what I can do with the feedback; I’m not the author of this post, just the submitter.

33

u/DXTRBeta 3d ago

WTF did I just read?

These guys are crazy.

Glad they got paid, but it doesn’t mean they are right.

19

u/Nautigsam 3d ago

What's wrong?

13

u/gabeech 3d ago

Dude reimplementing existing tooling on a bespoke basis … because reasons (which I will summarize as it makes his bank account bigger) Instead of using existing tooling that handles those pretty simple network config tasks.

36

u/imbev 3d ago

The Games were approaching and Pollux didn’t have time to build the webapp: as the architect of the Olympic network, he was overwhelmed by a colossal number of tasks. I showed him the L2VPN app mentioned above and specified the 5-week delivery timeline. I told him that if it suited him, I could build him an HTMX webapp based on his existing Django project and a Bootstrap CSS customized internally by Orange.

This sounds like the perfect case for HTMX. Graceful extension of an existing MPA instead of starting a new SPA.

-12

u/gabeech 3d ago

ALL of the major network vendors have this tooling already built, there was zero need to build bespoke tooling. There was nothing to build.

22

u/yawaramin 3d ago

Sounds like you know more about it than the OP who was directly involved in building it. That’s amazing.