Re:Generating Code Without Generating Technical Debt?
by Manfred on Friday November 10, 2023 @03:56PM
(#38224404)
People usually commit code that is written by code assistants intermixed with their own changes. You would not be able to track it, even on first commit.
Re:Generating Code Without Generating Technical Debt?
by joshuanapoli on Friday November 10, 2023 @04:54PM
(#38225051)
We can use a fine-grained commit style to distinguish hand-written and machine-written lines of code. I like this style for command-line driven AI tooling, where my tool is making bigger code changes (completing a function or file). In this case, it's easy to include a "git commit..." command in the tool.
Unfortunately, it doesn't work with GitHub Copilot's style, which assumes really fine-grained interaction.
Re:Generating Code Without Generating Technical Debt?
by sublinear on Friday November 10, 2023 @04:07PM
(#38224543)
Makes more sense to just not commit generated code without understanding it first. As has been said many times, writing the code was never the hard part. Software devs are still responsible for the integrity of implementation details.
Re:Generating Code Without Generating Technical Debt?
by lvncelot on Friday November 10, 2023 @04:14PM
(#38224631)
Yeah, I like the sentiment here, but I wouldn't pass review on a piece of code that had the "@generated" tag on it to absolve either the author or me as the reviewer of actually understanding what it does.
At the end of the day, whether you copy-pasted the code from StackOverflow, let Copilot generate it or M-X-Butterfly'd it in yourself doesn't make a difference as you still need to understand thoroughly what it does.
Re:Generating Code Without Generating Technical Debt?
by klhutchins on Friday November 10, 2023 @04:57PM
(#38225076)
Half joking but I try to make sure to ask the AI to "explain line 5 - 20 as if I am new to coding" and throw that in a comment
The first, if used, implies the code can be contextualized through another employee at the office (the one who wrote it).
The second, if used, implies you may not be able to get an answer as to why the code was written as it was, since an LLM generated it.