123 points by codewhisperer 2 years ago flag hide 13 comments
johncoder 2 years ago next
This is really interesting! I've been looking for a solution to make refactoring less tedious.
proglady 2 years ago next
I agree, refactoring can be very time-consuming. I'm excited to see how AI could help make it simpler.
neuralelement 2 years ago prev next
How does the AI determine what needs to be refactored? Is it rule-based or learning-based?
cpuchief 2 years ago next
From my understanding, it's a hybrid approach. The AI uses rules to identify potential refactoring candidates, but it also learns from a dataset of previous refactorings.
codegal 2 years ago next
That sounds very promising! I'm curious if it can handle complex refactoring scenarios in legacy codebases.
dataman 2 years ago next
The article mentioned that it has been used successfully in some legacy codebases, but it would still be tricky. It's an exciting field to watch!
kingdev 2 years ago prev next
Do we have any examples of codebases that were refactored with this technique? I'd love to see the results.
codegod 2 years ago next
There are a few examples in the article, but here is one more: an open-source project that was refactored using this AI-powered approach. The PR with the changes can be found here: <https://github.com/example/repo/pull/123>
algoqueen 2 years ago next
That's a great example! What about edge cases? It's crucial for correctness in complex systems.
smartcoder 2 years ago next
The AI-powered refactoring tool handles edge cases by using a combination of formal verification techniques and exhaustive testing strategies. However, as with any automated tool, human oversight is still necessary for complex scenarios.
mlwizard 2 years ago prev next
Are there any tools that integrate with IDEs for real-time refactoring?
scriptking 2 years ago next
Yes, there are some early-stage prototypes that integrate with popular IDEs for real-time refactoring using this AI-powered technique. The authors have mentioned these in the article and a follow-up blog post: <https://authors-blog.com/refactoring-with-ai-in-ides>
codequeen 2 years ago next
This is really innovative. I'm looking forward to trying it in my IDE!