3 ms·
What I'd love to see in the future is a proper refactoring UX. This new chat interface is probably a good start, as it seems able to replace code blocks in your
by w-m 4y ago
What I'd love to see in the future is a proper refactoring UX. This new chat interface is probably a good start, as it seems able to replace code blocks in your original source file. But most code changes in the real world require changes in multiple locations. And I don't usually have questions for the AI, I have small tasks for it to do.
I hope we can get to a point where I can give quick commands to a Copilot-like system to do more complex changes. Changes which traditional refactoring tools balk at. Stuff you would discuss with other humans. Like "this value needs to be calculated once, move the code to the constructor", which then requires code being removed in one method, a member variable being created, and possibly a constructor, and some code being moved there, and perhaps a few changes in method parameter lists.
The jump from single-point edits to multi-point edits is obviously a huge one, not only for the AI part, but also for the UI (being able to understand, accept or modify the changes, for the human). That for me would be truly next level (up from the amazing place where we are already with Copilot), and I can't wait for it to get there.
- ilaksh 4y agoThere are multiple startups for this. You can test the concept on my site https://aidev.codes https://aidev.codes although I don't have github integration yet.
- salt4034 4y agoI agree. Before finalizing the changes, the AI could show you the diff and ask "is this what you had in mind or would you like me to change anything else?"
- w-m 4y agoAre diffs really the best we can do though? Can't we come up with a better model of interaction? I find that looking at code and looking at diffs are different mental modes, for lack of a better word. For me, parsing diffs seems to engage a different part in the brain, and is much more exhausting than reading code. In comparison, reading code while someone makes changes to it seems to stay in the same code-mode. And I don't want to switch back and forth from code-mode to diff-mode all the time. How about after being prompted, Copilot acts like a remote user in my code base, with its own cursor, changing the code at the speed that ChatGPT currently writes out answers? Perhaps even commenting on what it does next to it. You could still have accept/modify/reject buttons at the code change locations, but they would change the new version, not a diff. Getting this slightly wrong will of course make you curse the whole thing to hell and back.