1 of 10

Refactoring

with AI

2 of 10

Refactoring code is like cleaning up a cluttered, disorganized kitchen. Icons from iconpacks.net.

Code refactoring

CC-by hutchdatascience.org

3 of 10

Code refactoring can be time-consuming…

That was a lot of work!

CC-by hutchdatascience.org

4 of 10

Pankaj Patel via Unsplash. Icons from iconpacks.net.

Code refactoring can be time-consuming…and error-prone!

CC-by hutchdatascience.org

5 of 10

Refactoring code can be made easier with AI. Icons from iconpacks.net.

AI can make refactoring more efficient!

AI Tools

CC-by hutchdatascience.org

6 of 10

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

7 of 10

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

8 of 10

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

9 of 10

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

10 of 10

Let’s see some examples!

CC-by hutchdatascience.org