Ancestors

Written by Max Woolf on 2025-01-02 at 17:50

New year, new blog post: I had a random question, what happens when LLMs are prompted to write better code, again and again? Do they actually write better code? The answer is yes*! https://minimaxir.com/2025/01/write-better-code/

=> More informations about this toot | More toots from minimaxir@sigmoid.social

Written by Ben Evans on 2025-01-03 at 16:14

@minimaxir Have you tried it on something which isn't a well-trodden algorithmic problem that's likely to be well-represented in its corpus?

I just did a quick experiment of trying to improve some code I'm working with as part of a code archeology project. The codebase is Java & OpenGL.

The first "improve this code" made a small improvement (transforming an ArrayList into a Map for faster lookup), but missed the removal of an unnecessary domain type. 1/

=> More informations about this toot | More toots from kittylyst@mastodon.social

Written by Ben Evans on 2025-01-03 at 16:17

@minimaxir @simon The second iteration still didn't fix the unnecessary domain type, introduced 3 separate bugs and also provided an incorrect explanation, that falsely claimed that the approach it picked to thread-safety was equivalent to the other, correct approach. So, YMMV I guess. /2

=> More informations about this toot | More toots from kittylyst@mastodon.social

Toot

Written by Simon Willison on 2025-01-03 at 16:26

@kittylyst @minimaxir that was my interpretation of the article: saying "do better" doesn't necessarily produce better or bug free code, but it can still highlight interesting potential areas for a human programmer to dig into and collaborate with the LLM to get working (like numba JIT)

=> More informations about this toot | More toots from simon@simonwillison.net

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113765357973259266
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
262.287183 milliseconds
Gemini-to-HTML Time
0.731462 milliseconds

This content has been proxied by September (3851b).