Catalog of Refactorings

7 points by hwayne


brudish

I have the Ruby version of this book and I quite like it. But this catalog is missing something that I think the book critically supplies, which is the context in which these refactorings make sense. I also find myself more attached to the "smells" portion of the book because - as patterns - those feel easier to get an intuition for.

I can't say that it's fundamentally useful to recognize that "rename field" or "rename variable" are technical refactoring steps. The book talks about how solutions for these code smells can be broken down into recipes of these discrete steps, but I feel like that's simultaneously too granular to be useful to veterans and newbies alike.

That said, there are really useful items in this catalog, like "replace conditional with polymorphism" but it requires the broader context around when and why, and then the "how" becomes clearer for it.

jitterted

It’s a bit sad that tools like IntelliJ IDEA seem to have stalled adding more complex automated refactorings, such as replace primitive with object. Seems like I haven’t seen a new one in 5 years? And now I probably won’t, cuz “AI” can do it? (Not well, nor predictably, nor efficiently in my experience.)