define "refactoring"

Refactoring is changing code to make it better (improve performance, etc) or easier to work with without changing the output.

Refactoring changes code to make it shorter, more efficient, or easier to read and understand. You do it like how you write a document draft that meets the main intent, and then edit and refine your words to improve it.

Simple computer science glossary
In my experience, comprehension is achieved through clarity of thinking. This glossary is an ongoing project to clarify my thinking by defining computer science concepts in simple language.