Just ask it to rewrite the shitty code you wrote in a language you barely understand to “follow standard best practices in <language>” or something like that and it will add advanced typing features, functional programming for iterables, advanced exception handling, proper concurrency handling, optimize control flows, use better equivalent functions, etc.
As long as you understand the foundations of these concepts in at least one language anybody can become pretty close to an expert in most languages instantly. Especially since most of them are C based and pretty similar
The output will sometimes change the logic but I mean that’s pretty easy to catch and fix
Rip C++ nerds that memorize the entirety of each releases manual to shave off 3ms in every single function
Well my personal experiences have just been that the ML approach catches a lot of things the static analysis tool hasn’t. Those are hard coded by humans and there are dozens of not hundreds of ways to write any given function with identical logic. It’s impossible for static analysis to be comprehensive enough to catch and fix a code block more than a few lines
E.g. I had a super ugly nested try catch exception block for this new integration test I was writing. It was using a test framework and language I’ve never used before, and so it was the only way I knew to write this logic. I asked the LLM to improve it and it broke up the nested try catch logic into 2 top level pieces with timeout functions and assertion checks I didn’t know existed. The timeout removing the need to throw an exception and the assertion fixing the issue of catching it
I’m glad you’ve gotten some actual use out of the LLMs! My outlook is more skeptical because I’ve seen too many interns get stuck on projects because they tried to ask LLMs for advice (which they did not double check) instead of reaching out to an experienced dev. The word calculators can only do so much.
Oh don’t get me wrong, I definitely think LLMs are gonna absolutely destroy kids ability to learn anything, including coding if they use it like a teacher
But for those who use it as a tool to build and do instead of learning, I’m quickly starting to become a strong believer in its usefulness