It's not "just changing stuff."

Refactoring is disciplined and precise. Refactoring is not just “rewriting it differently” but rather “transforming code structure via a series of safe and precise transformations.” https://www.industriallogic.com/blog/dissecting-the-rename-refactor/

Dissecting the Rename Refactor

Are you refactoring, or just changing stuff? Let's look into the highly-disciplined world of REAL refactoring with a simple rename!

Industrial Logic - Modern Agile Consultancy

@tottinge the given recipe is vulnerable to aliasing / shadowing issues. For example, rename f -> g in this Python program:

def f(): pass
def g(): print("fail!")

f()

We need refactoring processes/tools to get this right in situations where humans cannot.

@tottinge @danbjson

One of things I started to notice when people used automated refactoring tools was that they wouldn’t always see the bigger picture and that could make things worse rather than better.

Are Refactoring Tools Less Effective Overall?

https://chrisoldwood.blogspot.com/2017/05/are-refactoring-tools-less-effective.html

Are Refactoring Tools Less Effective Overall?

Tales of a computer programmer.

@chrisoldwood @danbjson You can refactor to anything -- good or evil.
The skill doesn't guarantee the result; it guarantees your ability to reach it.
@tottinge @chrisoldwood At a few occasions I have witnessed “refactoring wars” where every second commit one programmer have refactored to his [sic] personal style and every other second commit another programmer have refactored to his [never her] personal style.
That is why I insist on “refactor towards the domain” as guiding star.

@danbjson @chrisoldwood They really should have worked together, preferably with a third as tie-breaker.

Is this "refactored" or "reformatted", btw? If it's format, there are programs for that.

@tottinge @danbjson

This kind of behaviour is why I’ve seen teams end up adopting a PR model, because it’s easier to put up a barrier than to address the elephant in the room :o).

@chrisoldwood @danbjson true. .
PR code review can be a human avoidance technology.
@tottinge @chrisoldwood The occasion I have most specifically in mind was a refactoring war, not formatting. Something around whether a method should be inside a polymorphic hierarchy (strategy pattern) or if it should be only data and the acting should be a switch in the caller.
Yes. They should have sat together - acting out differences in opinion via git is not ideal.
@danbjson @chrisoldwood It looks a lot like the occasional "war by proxy" I see from matrixed managers, undermining each other by redirecting/reprioritizing the team members.