logoalt Hacker News

Why AI Sucks at Front End

52 pointsby tobrtoday at 12:26 PM53 commentsview on HN

Comments

feverzsjtoday at 1:37 PM

If you are really good at something, you'll find AI sucks at everything.

show 8 replies
khasan222today at 2:27 PM

Ngl I’m reading this article after having used ai to build a beautiful front end that is pixel perfect.

Yes ai can’t see, it only understands numbers. So tell it to use image magick to compare the screenshot to the actual mockup, tell it to get less than 5% difference and don’t use more than 20% blur. Thank me later.

I built a whole website in like 2 days with this technique.

Everyone seems to have trouble telling ai how to check its work and that’s the real problem imho.

Truly if you took the best dev in the world and had them write 1000 lines of code without stopping to check the result they would also get it wrong. And the machine is only made in a likeness of our image.

PS. You think Christian god was also pissed at how much we lie? :)

show 4 replies
fnytoday at 2:42 PM

Aside from the obvious "AI can't see" criticism, AI sucks at frontend because frontend sucks. Why does frontend suck? Churn.

To quote the article:

1. "It trained on ancient garbage" which is the by product of massive churn and this attitude leads to even more churn

2. "It doesn't know WHY we do things" because we don't either... even the paradigms used in frontend dev have needlessly churned

My fix? I switched from React/Next to Vue/Nuxt. The React ecosystem is by far the worst offender.

Zigurdtoday at 1:51 PM

After years of writing native code for mobile apps I'm using Flutter, and finding that, if you do things step-wise, and check in intermediate results so you can easily roll back failed experiments, agent-assisted coding can accelerate your front end coding substantially, and you can deliver more polished results instead of obviously demo grade visual results that need refinement. And that makes it easier to communicate with your non-coder colleagues.

bushidotoday at 2:31 PM

Design is an interesting beast.

Good design is not always logical. Color theory, if followed, results in pretty bad experiences. And interestingly, good design can't always be explained in a natural language.

Main thing is, it's very hard to get AI to have taste, because taste is not always statistically explainable.

The best I've gotten to is have it use something like ShadCN (or another well document package that's part of it's training) and make sure that it does two things, only runs the commands to create components, and does not change any stock components or introduce any Tailwind classes for colors and such. Also make it ensure that it maintains the global CSS.

This doesn't make the design look much better than what it is out of the box, but it doesn't turn it into something terrible. If left unprompted on these things, it lands up with mixing fonts that it has absolutely no idea if they look good or not, bringing serif fonts into body text, mixing and matching colors which would have looked really, really good in 2005. But just don't work any more.

show 1 reply
faangguyindiatoday at 2:08 PM

Ai ain't gonna perform at level of top front end designer but you will get you halfway at significantly less cost.

Gualdrapotoday at 1:40 PM

If AI really sucked at front end I'd have a job right now.

show 1 reply
darzutoday at 2:31 PM

Does this website run at 10fps for anyone else? I'm on a mac M4 w/ safari. Really doesn't help the author's point.

show 2 replies
TexanFellertoday at 2:30 PM

I'm a backend dev and I'm always hearing about how LLMs are dramatically better at frontend because of much more available training data etc. Maybe my perspective isn't as skewed as I've been led to believe and LLMs need close supervision and rework of their output there too.

show 1 reply
ronbentontoday at 2:33 PM

Everything is nuanced and generalizations help no one. There are absolutely frontend apps where AI straight up crushes. Sure these much be less novel apps but most of what people work on is a CRUD-esque interface.

show 1 reply
coder68today at 2:27 PM

AI is much better at front-end than me, it has really enabled me to build visual apps as a normally backend/ML guy.

christophilustoday at 1:29 PM

Dunno. It’s really good with Preact + Tailwind. And I have to say that I think most problems can be solved this way and don’t require a special one-of-a-kind UI. In fact, the fewer special UIs I see, the better. I prefer standardized patterns unless they truly don’t fit a domain.

rgoultertoday at 1:30 PM

My first instinct reading an article (especially one about LLMs) is to scroll down to see the structure..

Anyway.

Do people get the impression that LLMs are worse at frontend than not? I'd think it's same with other LLM uses: you benefit from having a good understanding of what you're trying to do; and it's probably decent for making a prototype quickly.

Zeff84today at 1:46 PM

Sure, but most companies don't seem to value Front End

show 1 reply
jncfhnbtoday at 1:57 PM

Imo front end is what it’s best at.

hmontazeritoday at 1:37 PM

Kimi k2.5 has been so far the best model for frontend. At least from my experience so far

show 1 reply
anonutoday at 2:14 PM

Site has been slashdotted

rboydtoday at 2:26 PM

double down on betting your career on being a css expert? what could go wrong

vfalbortoday at 1:37 PM

This is something that talk with some friends, How IA is doing things in front end is complelty different from Humans. Humans can select colors and themes based in their criteria, and IA only generate what they learn as a machine that they are, and It's not bad, but the thing is that people that use IA for develop front-end are adapting what IA generate, and in the other hand developer is adapting to client. Which are different approaches.

PaulHouletoday at 1:32 PM

Who says it sucks at front end? Unlike Stackoverflow, AI does a great job of "center a div." I tend to like working from reference documentation which is great for Python and Java but challenging for CSS where you have to navigate roughly 50 documents that relate to each other in complex ways to find answers.

Like I don't give it 100% responsibility for front end tasks but I feel like working together with AI I feel like I am really in control of CSS in a way I haven't been before. If I am using something like MUI it also tends to do really good at answering questions and making layouts.

Thing is, I don't treat AI as an army of 20 slaves will get "shit" done while I sleep but rather as a coding buddy. I very much anthropomorphize it with lots of "thank you" and "that's great!" and "does this make sense?", "do you have any questions for me?" and "how would you go about that?" and if makes me a prototype of something I will ask pointed questions about how it works, ask it to change things, change the code manually a bit to make it my own, and frequently open up a library like MUI in another IDE window and ask Junie "how do i?" and "how does it work when I set prop B?"

It doesn't 10x my speed and I think the main dividend from using it for me is quality, not compressed schedule, because I will use the speed to do more experiments and get to the bottom of things. Another benefit is that it helps me manage my emotional energy, like in the morning it might be hard for me to get started and a few low-effort spikes are great to warm me up.

show 2 replies
1a527dd5today at 2:37 PM

...not in my experience. It does what I need it to do; center a div.

sys_64738today at 1:56 PM

No worse than humans then.

TechSquidTVtoday at 2:21 PM

...Does AI suck at front-end? This is news to me.

dbbktoday at 1:55 PM

Except... it doesn't

AlexSalikovtoday at 2:34 PM

[dead]

xorguntoday at 2:30 PM

[dead]