Early in my career I thought mentoring meant being the smartest person in the room. Junior developer asked how to fix a bug, I told them. Felt great. Work moved forward. Then I went on vacation for two weeks. Same junior ground to a halt. Dozen small decisions piling up, zero confidence to make any of them. That was on me. Trained them to rely on my brain instead of building their own.
Changed everything after that. Now when someone asks a question, my default move is asking one back. They say API call fails, I ask what error message says. Database migration broke, I ask where they looked so far. Feels annoying at first, maybe dismissive, but forces them to articulate the problem. Half the time they answer their own question halfway through explaining it. The other half, we narrowed down the debugging surface area together.
Pair programming gets overthought as a mentoring tool. People dress it up with keyboard schedules and strict driver-navigator rules. Forget that. Pull up a chair, say let us look at this together. Best mentoring happens when I am typing and thinking out loud. Want them to hear me read the stack trace, mutter about the null pointer probably living in the user service, then check the logs to confirm. That internal monologue is the real curriculum. They do not learn when I hand them a pristine solution. They learn watching me stumble through the messy middle.
Code reviews caused the most damage early on. Used to rewrite their code in the comments. Drop a massive diff on their pull request essentially saying do it this way instead. Crushed them. Stopped taking ownership. Now I classify feedback. Hard rule like SQL injection vulnerability, I block the PR and explain the security risk. Preference like iterating with a different method, I leave a comment saying consider X for readability but leave the final call to them. Need space to write code that works even if I would not write it that way.
Giving ownership of something small but real matters more than any tutorial. Hand off a single endpoint or a monitoring alert, say this is yours. Here if you get stuck, but you own delivery. They will make weird architectural choices sometimes. Let them. When their simple cron job hits scaling issues three months later, walk through the failure together. That lesson sticks. Safety nets catch people, but scraped knees teach you to ride the bike.
Hardest part is accepting short-term velocity will tank. Ship less code this quarter. Investment pays off next year when you have a teammate who debugs the system without you, and you finally take a real vacation without your phone blowing up.