Latest / Tech Leadership with Fexingo: Engineering Managers, CTOs, and Technical Leadership Conversations / How a CTO Uses Nudge Theory to Ship Better Code
Transcript
- Lucas: You know, I've been thinking a lot about how we get engineers to do the right thing without beating them over the head with process. Luna: Right, because the default move is usually to add more rules, more checks, more gates. Lucas: Exactly. And a lot of CTOs I talk to are starting to realize that approach has diminishing returns — engineers just learn to game the system or they burn out on friction. Luna: So what's the alternative? Lucas: Well, there's this concept from behavioral economics called nudge theory. The idea is that you design the environment — the choice architecture — so that the easiest path is also the best one. And it's quietly showing up in how some engineering leaders shape developer behavior. Luna: Give me a concrete example. I want to see how this lands in actual code. Lucas: Sure. There's a VP of Engineering named Maria Chen — she runs engineering at a mid-sized SaaS company, about 80 engineers. She told me she was tired of fighting with her team over code review quality and test coverage. So instead of mandating that every PR have tests, she changed the default GitHub pull request template. Luna: What did she put in it? Lucas: The old template had a checkbox that said 'Tests added: yes/no.' Most people checked 'yes' even if they only ran the existing suite. She replaced it with a text box that says 'Describe one test you added or one documentation update you made.' The default — the placeholder — says 'I updated an inline comment or added a unit test for the new function.' Luna: So the path of least resistance is to actually do something small, not just check a box. Lucas: Right. And the key is she didn't remove the option to submit with nothing — she just changed the default expectation. Within two months, the percentage of PRs with at least one new test or doc update went from about 40 percent to over 85 percent. Luna: That's a big swing. But is this manipulation? I mean, you're kind of tricking people into doing what you want. Lucas: That's the critique, and it's fair. But Maria was transparent about it — she actually wrote a short RFC explaining the change and why she was making it. And the thing about nudge theory is that it's only ethical if the nudge is aligned with what the person would want if they had full information. Most engineers want to write good code. They just have a million things pulling their attention. Luna: Okay, so what other nudges has she used? Lucas: Another one was around linting. Her team had a style guide that nobody read. So she turned on lint-on-save as the default in the team's VS Code settings repo. Engineers could turn it off, but most didn't bother. Suddenly formatting debates disappeared from code reviews. Luna: That's clever because it removes the friction of remembering to run the linter manually. Lucas: Exactly. And she didn't enforce it with a CI gate — she just made it the default. The CI still catches stuff, but the nudge happens before the code even leaves the developer's machine. Luna: So the cost of compliance is almost zero. Lucas: Right. And then there's the cleanup hero thing. She set up a Slack bot that posts a weekly badge to the person who deleted the most lines of code from the main branch — including comments and dead code. Luna: That's a social nudge. It makes deleting code a positive signal instead of just invisible maintenance. Lucas: Yes. And it worked. In the first quarter after that bot went live, the team deleted about 12 percent of their total codebase. That's huge for reducing tech debt. Luna: I love that because it reframes something that feels like a chore into something that's publicly celebrated. Lucas: And it's voluntary. Nobody is forced to participate. But the bot creates visibility, and once a few people start chasing the badge, it becomes a kind of friendly competition. Luna: What about the risk of engineers gaming it? Like, someone might add a bunch of dummy code just to delete it later. Lucas: Maria told me that came up. But the bot only counts deletions that have been in the codebase for at least two weeks — so you can't churn. And it's measured against the main branch, so any temporary additions would get caught. Plus, the team reviewed the top deletions each week in their standup, so it was transparent. Luna: That accountability loop is key. So nudges work best when they're combined with a bit of transparency. Lucas: Yeah. And I think the broader lesson for CTOs is: instead of building another process, look at the defaults, the friction points, and the social signals. Those are often cheaper and more effective than a new policy. Luna: You know, it's funny — we're talking about low-friction improvements, and that's exactly the kind of thing that makes a podcast like this valuable. If you get even one small idea you can apply, it's worth more than a hundred generic rules. Lucas: And that's actually why listener support matters so much to this show. We keep it ad-free because we want the conversation to be direct, no interruptions. If you find these episodes useful, you can support us at buy me a coffee dot com slash fexingo. It's a simple way to keep the show going, and it means a lot. Luna: Yeah, exactly. And it's totally optional — we're just glad you're here. But if you've ever gotten a practical takeaway from a conversation like this one, that's the kind of thing that keeps us doing it. Lucas: Alright, back to nudges. The last one I want to mention is about incident response. Maria changed the default Slack channel for reporting incidents from a private channel to a public one — with an automated message that says 'Report an incident here. Don't worry about being wrong — false alarms are better than silence.' Luna: So she lowered the social cost of reporting something that might be nothing. Lucas: Exactly. And it worked. The number of early-warning reports tripled in the first month. Most were false alarms, but a few caught real issues before they escalated. Luna: So the nudge is essentially 'default to share rather than default to wait.' Lucas: Right. And that's the thread through all of this — designing systems where the right behavior is also the easy behavior. It's not about controlling people. It's about removing the obstacles that get in the way of their own good intentions. Luna: So if you're a CTO listening, what's one nudge you could try next week? Lucas: I'd say start with your PR template. Change the default placeholder to something that prompts a small improvement. Don't enforce it — just change the default. See what happens. Luna: Low-risk, high-upside. That's the kind of experiment I like. Lucas: And if Maria Chen's experience is any guide, you might be surprised how much a tiny tweak can shift a whole team's culture.