Developer A: "When I comment this out, it works"
Developer B: "Weird. Why?"
Developer A: "I am not sure."
Developer B: "Huh, weird. Let's ship this, maybe someone can explain it to us later."
This is a scene I have seen play out a few times that is deeply harmful to a technical organization. Any changes (positive or negative) that aren't well understood are treated as coincidence - folks miss the opportunity to build depth (critical to developing seniority; I'll write more later), and instead do something that seems to work. More importantly, changes that seem to work but are not understood are more likely to be fragile. Over a long enough time horizon, you end up living in the cargo cult.
As a leader on a team, you are a participant in a lot of these knowledge exchanges. It's worthwhile to cultivate an understanding (typically by observing your team) of when a change is intentional and driven by knowledge and understanding, vs. when a change is coincidental and just happens to work.
Ideally, zero change or knowledge exchange in your organization should be driven by coincidence - but if you're coming from a place of seeing this commonly in your teams or areas, you have to start somewhere and the first place to start is by identifying it and finding how to coach folks out of it. Example:
Developer A: "When I comment this out, it works!"
You: "Weird. Why?"
Developer A: "I am not sure."
You: "I am not sure either."
At this point you have a few options - you could pair with the person on digging deeper, you could say something like “I’m not comfortable with us merging this until we understand it better, can you explain this to me?”, you could do the research yourself (this option is the least socially impactful, but still makes you better at least).
As you (and, hopefully the other person!) build understanding of why something works, you can develop depth together and use that to make the change intentional. Eventually, the exchange becomes:
Developer A: "When I comment this out, it works. That's because of X, which happens because Y. Here’s a link to the relevant docs: <link>"
You: "Cool, that makes sense! Let's ship it!"
If you are going to develop a team that improves and accelerates, it is critical that as many changes as possible are intentional. A coincidental change won’t make it into the toolbox for someone, and when it DOES because of the coincidental nature it was discovered through it’s harder to pattern match on when to apply it correctly. Poorly understood changes increase fragility, have unintended side effects, or worse - don’t solve the problem they’re trying to at all and are just a waste of time. Over a long enough time period and enough coincidental changes, you end up in a world where all change is difficult - your team has to solve problems by swinging a cat in the forest and hoping they hit the right coincidence. A team that understands and is able to more intentionally make changes will pay lower costs than you in rework, incidents, and “oh whoops, that didn’t fix that at all”.
At the end of the day, which of those teams do you want to be on with the time you have?
Thanks to Tim Frison for the discussion that led to this, and Allen Pike for suggestions and early draft feedback.