A refactoring can be reorganizing or re structuring your code, or rewriting little bits of it to make it more readable, maintainable, scaleable and just in better, in general, better code. For me, i have a sort of anti patterns in my head that when i recognize them in the code. The easiest code to refactor is code with tests, whether that's unit tests or aggression tests or any of the other number of tests that there are. If you have a code based that has zero tests, refactoring is very, very dangerous,. ecause you can refractor something and completely change the behaviour and not know about it - which is not ideal at