When developers consider moving into a management role, I often encourage them — very strongly — to stop coding at work. You’ll be a better manager if you’re not immersed in the machine, I tell them; if you’re noticing the interactions between people on your team, if you’re more obviously available to be interrupted.

What’s the fun in that? they ask. I got into this business because I love coding. What satisfaction would I get from my work if I just observed and got interrupted and had meetings all day?

It’s a reasonable question. I tell them I still code on the weekends and on plane flights. I tell them that the satisfactions of being a manager are more ephemeral but no less meaningful. They regard me with deep skepticism and go back to coding at work. Then, some months later or more, they come back and say, I stopped coding at work, and you’re right, I’m a better manager now, but I hate that I’m not making anything any more. Damn you for telling me to stop.

So. Here’s a story. (I like stories.)

I hired a guy a while ago, a somewhat cantankerous fella who nonetheless did exceptional work. We worked together for a few years, and I enjoyed it, and maybe helped him a bit here and there. I paid attention, noticed who he was and what he liked at work, thought about how he could be better at his job and happier, and told him what I suspected might get him there. But if you’d asked me what he thought of me, I’d have guessed he’d say something like, “Whelp, someone has to be a manager, so it might as well be Marc.” We had some fun and shared some gifs and fought a good fight, and then the fight ended and we went our separate ways. I thought I was a pretty good manager for him, at best.

Earlier this month, though — some years after we worked together last — I went to his wedding. It was a great bash and fun for all involved.

I was waiting in line for the bathroom when the man ahead of me in the line turned to say hi. He saw my first name on my name tag and his face lit up. “You’re Marc Hedlund! I’m so glad to meet you! I’m (the groom’s) father!” He grabbed my hand and pumped the living hell out of it, and told me how he’d heard about me for years, and how much I’d done for his son. He treated me like the most honored guest at the wedding, glowing the whole time we talked.

Maybe he treats everyone that well, or maybe he was just the best wedding host I’ve ever met. But it was all I could do not to burst into happy tears. I stammered politely for a bit and then ran off, astonished and gratified to have met him; astonished that he even knew my name, that anything I’d done rated reaching his ears at all.

So. I still love coding, but it’s worth stepping away from the machine, being observant and letting yourself be interrupted, working as hard as you can at being a good manager, if it winds up truly mattering to the people you manage well. You may not know it for years, but when you do, the payoff is incomparable. No number of successful compiles could ever replace how it felt to get that handshake.