I just wrote a post on refactoring some Go code to use interfaces. I outline the steps used to refactor this particular pattern: dev.to/chuck_ha/interfaces-in-go-3onc
I would also suggest reading sandimetz.com/99bottles/. It's a fantastic book that refactors code throughout the book and explains how to get there.
This kata is a famous one :
Also, you can take a look at this one :
Java one is also explained in two blog articles here :
Someone at work asked me to refactor their 99 bottles code. I recorded the refactoring so they could see the process and how I think about it. Before is here and after is here. It's a pretty good demonstration of how I refactor.
is it about safe refactoring (with ide)
or refactoring to design patterns? if its the latter, I recommend going through Clean Code by Rob Martin and
Refactoring: Improving the Design of Existing Code by Kent Beck and Martin Fowler
(C#) I just made one that I found in StackOverflow. I implemented the code in a WebApi and it is working fine :D
Here's some C# refactoring exercise
has a few awesome posts. here's one:
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.