logoalt Hacker News

phyzix5761 • today at 6:26 PM • 4 replies • view on HN

"Best Practices" are pretty much dead in the AI era. Pretty soon no one is going to read any of the code AI produces and that's a scary thought.


Replies

paulirish • today at 6:41 PM

IMO maintainability is the next frontier. If we just allow coding agents to accrete 1k-LOC solutions to problems, the codebases run quick away from our ability to maintain _some_ level of understanding.

So I'll take a 1-line CSS solution over 60 lines of ResizeObserver/setTimeout business. But.. best practices for frontend isn't just the code.. it's ensuring quality UX, that keyboard navigability works, that layout doesn't shift on users.

natorion • today at 6:31 PM

Best practices are not dead if they result in better user experience. The focus is less on developer ergonomics though - true that.

sublinear • today at 7:05 PM

The "modern web primitives" are also not even necessarily the "best practice".

Browser-specific implementation gotchas tend to take about a decade to iron out for reasons that never have anything to do with code quality. Users are fickle and so are browser vendors, but that's a different topic.

At the end of the day, there's just no escaping lots of manual testing across device and browser combinations if your goal is a polished result and not just something that "works".

AI has done nothing to make this problem go away. If anything, it's made it worse because people don't even want to look at the code now!

➕ show 1 reply
brlewis • today at 6:53 PM

>Pretty soon no one is going to read any of the code AI produces and that's a scary thought.

This is a misconception. Have your favorite agent summarize this video for you: https://www.youtube.com/live/zcLPGC-tvgk?si=YR68aHlFESD053bh

➕ show 2 replies