← All articles

Mentoring keeps exposing gaps in what I know

A junior developer once asked me why we use dependency injection. I gave the answer I had learned: testability and loose coupling.

They nodded. Then they asked, "But why does that matter?"

I didn't have a good answer.

I had used the pattern for years. I knew when to reach for it and could explain the accepted benefits. Their second question exposed how much of my explanation I had inherited without examining it.

That happens often in mentoring. A junior developer asks a question that sounds obvious, and I discover that my answer rests on another idea I haven't properly explained. They're asking about things I've stopped questioning.

Trying to teach someone also makes me inspect decisions that have become automatic. Why this abstraction? Why this boundary? What would actually go wrong if we chose the simpler option? Sometimes I have a clear reason. Other times, I've just kept doing what I'm used to.

I wouldn't be where I am without people who took time to explain their thinking to me. I try to do the same, even when it means admitting I need to go and think about the answer.