One of the things I am lacking in experience with is refactoring code. So I did what I always do, and asked Twitter for their thoughts.
I picked out a few things from the replies I intend to go through and added some of my own. I cannot vouch for any of these yet, so do let me know what you think of them.
- 📙 Paid: 99 Bootles of OOP by Sandi Metz
- 📙 Paid: Refactoring by Martin Fowler
- 📙 Insight Loop: Code by Refactoring, a workshop by Deep Roots
- 📺 Therapeutic Refactoring by Katrina Owen
- 📺 Refactoring from Good to Great by Ben Orenstein
A book is never going to teach you something fully though, everything you learn needs to be put into practice. So, find some small pieces of the codebase you're most familiar with and ask yourself if it could use some cleanup. Maybe there's a
Class that's 700 lines long? Or a React component that has turned into an absolute monster? 🧟♂️
I'm curious if you have any other resources or tips on the art of refactoring, so do share in the comments!