logoalt Hacker News

dlisboatoday at 2:35 PM5 repliesview on HN

This is a good discussion: do LLMs change the calculus for DRY?

A major point of components is having a single place where you can change design and behavior across your entire codebase. With LLMs you can with very good accuracy tell them to change the look of "all buttons that are confirmation buttons in modals but not in the login modal". Doesn't matter if there are 10 such buttons or 1000, it'll take a few seconds for them to accomplish it.

I'm slowly forming the opinion that nowadays having copy-and-pasted "components", with their whole HTML just repeated over and over, is now a much less worrying thing in a codebase. Even a bloated CSS can be quickly fixed by a LLM.

And like you said: you eliminate the build phase entirely and frontend development ergonomics goes back to how it was in the early 2000s.


Replies

Philip-J-Frytoday at 7:50 PM

LLMs change the calculus on DRY in some cases. I would say it's still very much a no-no on the frontend side of things. Code repetition is directly correlated with bad loading performance. When you're optimising for people on slow mobile connections, your HTML/JS/CSS being 500KB instead of 1.5MB matters a lot.

nightskitoday at 2:44 PM

So you enjoy reviewing your entire code base and relying on an extremely detailed regression suite just to make simple changes? I don't think AI changes good engineering at all, it just changes who or what is doing it.

show 1 reply
hamdingerstoday at 6:20 PM

> do LLMs change the calculus for DRY?

Yes it makes it insanely easy to refactor duplicated logic into shared and tested modules. Why would you go the other way?

raincoletoday at 3:08 PM

Frontend development in the early days was nightmare. I don't know why people pretend there was some kind of golden age but there really was not.

You could still develop frontend in the old way. Most browsers are very good at supporting old websites. But on one wants that.

show 1 reply
lemageduragetoday at 4:13 PM

[dead]