3 ms·
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
by steve_adams_86 1y ago
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'.
- turtletontine 1y agoThese are great examples of how LLMs are great at writing code, but pretty bad at software engineering
- serial_dev 1y agoSearch 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.
- boothby 1y agoOnly 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.
- Anamon 1y agoI'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.
- zahlman 1y ago> 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.