←back to thread

Just use a button

(gomakethings.com)
284 points moebrowne | 6 comments | | HN request time: 0.838s | source | bottom
1. steve_adams_86 ◴[] No.45775963[source]
This is a good example of cases where LLMs can tend to write 'bad' code, because these patterns (i.e. reinventing wheels in the browser) are quite common in the wild, and LLMs tend to choose them over just using native features (such as buttons). I find myself telling Claude to revisit implementations and simplify them in these kinds of ways.

Another good example is bizarre error handling conventions when working in TypeScript. Claude will come up with tons of weird ways of doing this, using different approaches all over the place, but rarely consider simple patterns like 'return an expected value or an error'.

replies(2): >>45776216 #>>45777714 #
2. turtletontine ◴[] No.45776216[source]
These are great examples of how LLMs are great at writing code, but pretty bad at software engineering
replies(2): >>45776884 #>>45781751 #
3. serial_dev ◴[] No.45776884[source]
Search engines were also only good at looking up things, not software engineering. I find it a blessing that a human is still valuable in this process we call software engineering. And meanwhile you can use search engines just like LLMs to learn and discover much faster than without them.
replies(1): >>45777194 #
4. boothby ◴[] No.45777194{3}[source]
Only nowadays LLMs are embedded in search engines so if you're looking for something that doesn't exist the top of the page is liable to hallucinate its existence.
5. zahlman ◴[] No.45777714[source]
> and LLMs tend to choose them over just using native features (such as buttons).

Of course course the LLMs do that. The pattern contains a lot more tokens that naturally follow on from each other.

6. Anamon ◴[] No.45781751[source]
I'm not sure I agree. This is coding for me, the engineering happened long before you knew you'd have to put a button-like thing there.

To me, it's a great example how LLMs are just as shit at coding as everything else. It's just that the majority of people using them to code don't look at how terrible it is as long as it runs.