Refactoring
with AI
Refactoring code is like cleaning up a cluttered, disorganized kitchen. Icons from iconpacks.net.
Code refactoring
CC-by hutchdatascience.org
Code refactoring can be time-consuming…
That was a lot of work!
CC-by hutchdatascience.org
Pankaj Patel via Unsplash. Icons from iconpacks.net.
Code refactoring can be time-consuming…and error-prone!
CC-by hutchdatascience.org
Refactoring code can be made easier with AI. Icons from iconpacks.net.
AI can make refactoring more efficient!
AI Tools
CC-by hutchdatascience.org
AI can recognize redundant pieces of code, signified by the multiple “cookbook” copies. Icons from iconpacks.net.
Machine learning algorithms can suggest code improvements
AI Tools
CC-by hutchdatascience.org
AI can recognize bugs or bad code. Icons from iconpacks.net and openmoji.org.
ML algorithms can spot potential problem spots
AI Tools
CC-by hutchdatascience.org
You need to check output produced by AI. Icons from iconpacks.net.
ML algorithms can spot potential problem spots…but check that you’re not accidentally introducing more security issues
AI Tools?
CC-by hutchdatascience.org
AI can be faster and more accurate in many cases. Icons from iconpacks.net.
AI refactoring is more accurate than manual refactoring
AI Tools
CC-by hutchdatascience.org
Let’s see some examples!
CC-by hutchdatascience.org