In this episode of Leaders of Code, Eira May and Peter O’Connor welcome Docusign CTO Sagnik Nandy—whose career spans engineering leadership roles at Google and Okta—to discuss how software engineering teams are evolving alongside generative AI.
Sagnik shares his "70/30 rule" for career growth and his habit of repeatedly asking "So what?" to push teams past vanity metrics like AI adoption or raw usage and toward measurable business outcomes. The conversation explores how Docusign applies AI to transform static PDFs into structured, automated agreement workflows via Intelligent Agreement Management (IAM), how they balance probabilistic AI models with deterministic guardrails and human-in-the-loop validation, and why "building for deprecation" is critical when technology evolves every few weeks.
Notes
- Connect with Sagnik Nandy on LinkedIn.
- Connect with Peter O’Connor on LinkedIn.
- Have guest suggestions or topic ideas for Leaders of Code? Email us at podcast@stackoverflow.com.
TRANSCRIPT
Eira May (00:04) Hello and welcome to Leaders of Code. This is a segment on the Stack Overflow podcast where we get senior engineering leaders together and we ask them about the work they're doing, how they build their teams, and the biggest challenges that they find themselves dealing with right now. My name is Eira May and I am the B2B editor at Stack Overflow. Here again with my colleague Peter O'Connor, who is director of platform engineering at Stack. Hey Peter, how is your Monday starting off?
Peter O'Connor (00:32) Going well, except for I'm not sure if it's raining or an ocean opened up outside, but we're doing okay.
Eira May (00:38) We're also joined today by the CTO of Docusign, that's Sagnik Nandy. Sagnik, welcome to the show.
Sagnik Nandy (00:45) Thank you. Great to be here and thanks for having me. Looking forward to it.
Eira May (00:50) Yeah, our pleasure. I wanted to start out with a question for you, Sagnik, on your career trajectory. So I see you spent a number of years at Google in ads infrastructure. And then you were also CTO and chief development officer at Okta working on identity and access management. I actually worked at Auth0 during the time they were acquired by Okta, so we got a little bit of—
Sagnik Nandy (01:13) Well, that's good.
Eira May (01:15) —common ground back there. And then now, of course, you're working at Docusign, you're focused on trusted digital agreements. So my question is: do you see this as solving one underlying engineering problem across different forms, or do you really see these disciplines as distinct spheres of engineering problems to solve?
Sagnik Nandy (01:36) I think they definitely have some commonality, but they're also different enough. I think of myself as a problem solver, so I gravitate towards—my time at Google, I did vastly different full product, infrastructure, machine learning, all sorts of problems. I follow this thing that someone told me early in my career: make changes based on a 70/30 rule.
So I look for problems where I feel my experience and expertise applies readily, maybe for 70% of the problem. That way I bring enough to the table. And then 30% of the problem scares me or looks very new, and that keeps me on my toes. That brings all sorts of ideas to the table, and that's been a pattern. So if you look across all the changes, both in Google or outside Google, it's been following this pattern: enough commonality to the table, but enough difference to shake things up just the right amount.
Peter O'Connor (02:33) What do you think the through line is for why you've been so successful then? What is that 70% do you think that you're adding that's been a connective tissue piece throughout the whole time?
Sagnik Nandy (02:44) First of all, thank you. Hopefully it's different things in different problems—each problem warrants a different approach. But inherently, I think some of the things I believe in are building great systems, really addressing customer problems and providing customer value, and scaling solutions. A lot of times the first two can be true, but you do it in a very piecemeal fashion.
And so I think these three things: how do you build great systems that allow you to really do things differently, allow you to differentiate; really address actual customer problems and provide very tangible value; and then whatever you're doing, scale it out. If you're doing it for a thousand customers, do it for ten thousand, do it for a million, do it for a billion. That's been the focus.
Peter O'Connor (03:32) No, that's pretty cool. And I went pretty quick on that because I'm wondering—I heard a lot of customer focus in there, which is really good. And of course, scalable always matters. When I think about good engineering or good product solutions, it does gotta start with that customer focus. Even when you were saying you're more platform focused or more infrastructure focused, your customers are internal and they're just as important.
How do you instill—have you built teams around that idea that it doesn't matter who your customer is, you need to focus on them and drive to their outcomes more than anything else?
Sagnik Nandy (04:07) Yeah, I think one of the things I do annoyingly, people around tell me, is I try to get down to first principles and ask why. And a lot of times I do this annoying thing where whatever they are pitching or we are proposing, I keep asking, "So what?" till the value is very evident. And this has worked great for end-user products, it's worked great for infrastructure, it's worked great for internal teams. If you take something simple, let's say—I'll make up an example, but I've had similar conversations—where if someone says, "I can make some great charts for the customer," and you say, "So what?" "Well, the customer will see great data." I was like, "So what?" "Well, they'll see great data."
At some point you see they're repeating, and I was like, "But so what?" "Well, then they can get great insights." "So what?" "Well, then they'll do better in their business." So now you move up the value chain, and then you really get to this conversation of: what is the value? What is it that the customer is trying to do? It's really important to distill out their purpose versus all the tools you're providing them to get there and to not lose focus.
Peter O'Connor (05:25) Yeah, I really like that.
Sagnik Nandy (05:26) I've had people pitch internal system optimizations—"Hey, we can make this process 5% faster"—and "So what?" "Well, don't you want it faster?" Obviously in these things, yes, but you push them to commit to the real value: "So what?" "Well, then we can do more." It was like, "Okay, do more—are you gonna do more in terms of for each customer, or are you gonna handle more customers for the same resource?" And you keep asking these questions till you get to what is it that you're really trying to deliver?
Peter O'Connor (05:58) Yeah, so I agree. You gotta be really focused on the customer and what their problem is where you're not solving a need that they really care about. I read a book a long time ago that was The Mom Test, and if you can't pass the mom test—which is like, yeah, it sounds great, sounds all pretty, but if it's just mom saying yes to you and the customer's not gonna buy it—so what? Right. I love that idea. "So what?" Why does it matter?
Sagnik Nandy (06:22) Now especially, I think with all the things happening with AI, so much is possible. I regularly get pitched things where if you keep asking the "so what?", it often sounds like a solution looking for a problem. And you have to separate that from when it's really a solution you care about.
Peter O'Connor (06:40) For sure, for sure. A couple years ago in AI, I think everyone went through some crisis of like, "Oh my gosh, AI's gonna do everything for us," or "What is our job here at our companies?" And even us, we went through it and it was like, "Well, do you just throw AI at everything?" And nowadays it's getting less of that, but man, I get four calls myself about the same problem for sure. How do you separate that though? How do you know—does the "so what" rule cut through those calls when people are pitching you stuff as well?
Sagnik Nandy (07:08) It does. It increasingly moves you up the value chain. Also, a lot of times when people talk about ROI, the return and the investment are often measured in vastly different units. The investment might be in dollars; the return might be in like, "Don't you like that?" And I think both for myself—and I love this about Docusign—we really try to move the value and the return closer to the unit where you can measure. Usage is great. Dollars, if that's what we try to push for: is it saving you time? Is it making you more money? Is it saving you money? Is it helping you avoid compliance or security issues? These units get to more tangible value outcomes, and that's what we try to push people towards.
Peter O'Connor (07:58) Yeah, I hear a lot of your metrics history coming back out. I love it. It can be very hard for businesses who are in the B2B market, like Docusign and Stack can be, thinking, "All right, you have a business outcome, you have a customer-driven problem that you can give them value to," but connecting those can be very difficult. How have you strived to connect problems that the customer's having that they want to see business outcomes to things that matter from the product? 'Cause session time is not exciting. That doesn't tell anybody any story. Clicks—don't do that. How have you approached solving the gap between business value and these kinds of product metrics?
Sagnik Nandy (08:42) Yeah, I think it's important to strike a balance. In this case, perfection can be your enemy. I often tell folks that if you get ten engineers and have a conversation on the best metric, you'll get fifteen on a good day. So—
Peter O'Connor (08:56) Yeah.
Sagnik Nandy (08:58) —as a result, the same thing applies to product conversations. I think it's important to find something that you think largely, directionally reflects things, and keep tracking it while you try and then iterate over time. So the three tools to push for: always keep an eye out on what's next in the value chain. How can you move up that value chain? So taking the example of AI, if you see even a year back, everyone started with adoption numbers. That's great—adoption is not the goal. Then people started with usage numbers.
And again, that's better than adoption, saying "50% of people are using" versus saying "I'm using it X amount," good. But again, usage is a means to an end oftentimes. Then you say, "Okay, what are you generating?" Now, throughput is great. Once you move up the chain to throughput, then you say, "Okay, what's value? What's outcome?" So I think pushing people up the value chain, and then identifying metrics which at any given instance you feel—even if it's not perfect—make it directionally accurate, and then keep iterating over time. Keep an open mind. I'll give you an example with AI-led coding. Again, I'm annoying about wanting to measure everything. So we were like, "Okay, show me metrics that are moving in the right direction," because I was hearing a lot of anecdotes.
And those are great anecdotes. I'm not doubting those, but saying that an engineer would have taken three months to do something and now they did it in two weeks—great story. So what? Like, is it reflecting an overall thing? So as you move there, folks said, "Let's measure PRs."
Peter O'Connor (10:38) Mm.
Sagnik Nandy (10:39) And we started measuring PR throughput, and then we quickly realized that people were creating much larger PRs when they are AI-aided. So actually, sometimes PR throughput can go down, but what a PR does is growing because earlier you were limited by what a human being can grasp and put together. That's no longer the limiting factor. So again, start with something, keep improving it, and then also say, "Okay, is this the end? If not, what's the next level of value I can measure?"
Peter O'Connor (11:12) Yeah, yeah. I think that's super valuable to think about. We at Stack are looking at trying to solve decision speed, and measuring decision speed is very difficult. But that's super business value for our customer. They see a lot of value in getting decisions faster, but it's hard. So the same thing we do: we think about, "Well, we can't get there today, but what can we aspire to? What are the next steps?" And so is it like, "Okay, are you getting out the right context? Are we then seeing that context come back in through our system?" And those are some interesting pieces.
I see AI has come into every one of our conversations, it sounds like, and it's coming into ours already. I was trying to steer us away, but that's fine. I love talking about AI. I think we're both in very interesting environments. I want to give decision-grade knowledge to people so they can make their decisions faster and they're not sitting there sifting through knowledge. You're giving a product at Docusign which is like, these are legally binding documents that are crucial to the flow of business. Both of us want to try to think about AI and how do we integrate it? How is Docusign looking at AI in the product world? Then we can talk about devs maybe after that. How do you do it in the product world when determinism is more important than probabilism, right? You can't get a document wrong. That can be a problem. How are you all approaching that?
Sagnik Nandy (12:32) So a few things. First of all, one of the things that drew me to Docusign was I saw this big technical shift happening and I really wanted to get a front-row seat into that. And if you see what we do, we deal with agreements, and one of the things these large language models or all the tools around us are really focused on is documents. So it felt like a very good match in terms of domain.
And then when I double-clicked into that, I saw this both as a software buyer in my previous roles or just keeping track of things: agreements are extremely inefficient. You have some of your most business-critical information in them. You have everything from your procurement details to your renewal information to clauses you've signed up for. And they even now, to a large extent, live inside these opaque, large blobs of PDFs that are scattered across your organization. I always use this example. One of the things that when Intelligent Agreement Management—which is our AI-driven agreement solution platform—I first heard about it, it resonated. One of the things in my job I have to do a lot is I buy a lot of software. And a very common question is:
"What's up for renewal in the next X amount of time?" and ideally put some kind of a threshold cap because you want to make sure you're doing a good job. That simple starting point—"I just want to know what's up for renewal in the next quarter, and let's put a dollar threshold, and what am I supposed to look out for?"—is insanely difficult. And that's just a starting point. And I typically would have, in the past, multiple people working on the team who would pull this information, doing ad hoc processes, put it on a spreadsheet. If you want to see data over time for some of these things, forget it. That should not be this hard. So I felt with Docusign IAM, there was this very interesting, just from a domain point of view, a big enough problem that was truly a good fit for the technical innovation happening around. So it felt like a very good domain to apply the technology to, and we've been hard at work around that.
So we've taken the whole agreement process, we split it up into three parts—create, commit, manage—and reimagined all these steps, but also the end-to-end journey using AI. What would it mean? Again, go through and "so what?" We are increasingly moving from features to end-to-end functionalities. One of the things we had launched was being able to take these agreements and put a structured data layer on top of it. So instead of these blobs, you can now easily get things like party name, various obligations you have, contract period, etc.—a whole bunch of metadata that you can extract, which is a great starting point.
When you then say "so what?", this is a great starting point, but what people really want to do is then do something with this information. Once you extract your obligations, what you really want to do is create a workflow where you manage it. All the things I was talking about—when is something due for renewal—you want to put it in a process that maybe two months before any renewal above, let's say, 100K, I should get an email which shares certain information with me and gets the ball rolling. Stuff like that gives me very tangible value. Same thing with redlining, same thing with automated insights, which then lead to end results. So that's what we've been focused on. We've taken this problem which fits very nicely to the AI changes and taken end-to-end workflows, and we're really trying to make it significantly better, measurably better using AI.
Peter O'Connor (16:30) That's really cool. Your example there of thinking about procurement contracts hits me at home. Here at Stack, I do the same thing, manage these contracts. And of course, what comes up from the C-suite to me is like, "Hey, do we really need Vendor X?" Right. And so, great question. Before, I would just ad hoc be like, "Gosh, I have no idea." And they would say something that was like, "We're gonna get off Datadog" or something like that. And I'm like, scary, but also valuable if it's the right cost. So those things really matter a lot so I'm not thinking about last step and just trying to figure it out at the end.
So do you find that your flows have an error problem to them at all, or are they just inspection? What are they doing for me that's making sure that I'm not getting hallucinated on or I'm not getting the wrong information—like, "Actually Datadog's just a fine contract, wouldn't worry about it," and then I'm like, "Well crap, I'm spending way more than I should be," right? How do you check for things like that in your guardrails on your systems?
Sagnik Nandy (17:29) Yeah, so there are two levels of guardrails. One is what we do in terms of the software we are building. But we are also very big believers in the human-in-the-loop aspect of this. Some things you can afford to be 95% accurate. There are things where anything less than 100% is not acceptable. And one of the big things we mentioned that we bring to the table is we've dealt with agreements forever—all kinds of them, all aspects of them, varying amounts of criticality. We understand that every step of the process is very, very different: your last step of sign-off versus if you're initiating a flow. It's okay to get your first version out, even if it is pretty much accurate, that's fine, because there'll be more eyes that'll go through it. But getting your last version absolutely right—
So injecting humans in the mix, giving them a way of providing feedback, allowing people to bring in their in-house expectations—that's why I think designing of a process is very important. A lot of people are injecting AI into processes. As you do that, it's also important to just revisit the whole process, and we are doing that with a lot of flows in the agreement journey.
But internally as well, we have very, very strict guardrails—everything from what data we use, how we use it, what's the radius of usage for that data, what are some checks and bounds we put. One of the things among many things we've built is a very strong evaluation framework, which allows us to continuously evaluate things. I say that before you run, you need the right infrastructure.
I've seen actual races where very fast runners get disqualified because they go out of the track. So you draw those boundaries, you get them the right shoes—that's when you let them run really fast. So building that—one of the things Docusign has done is really focused on compliance, security, the in-house guardrails, everything from data anonymization; people trust us with really sensitive, critical information, to make sure we use it in an absolutely right way. The use cases matter. If we are extracting information, that's of different criticality versus if we are generating information, and they have different guardrails. So that's a big part of our focus.
But then also when we create the solutions, making sure human beings both get to see, but also give feedback, correct things in cases where they need to, and bring in their organizational uniqueness and context. So for redlining, we can bring a basic standard set of best practices. But in your organization, you might have decided you don't want to work with certain vendors or you care about certain clauses differently. Your ability to feed that into our system and then really make the solution your own as opposed to one-size-fits-all is very important.
Peter O'Connor (20:32) Yeah, really cool. The practice of making sure you keep sensitive data in different flows protected and make sure you're evaluating is really, really important. We also have a lot of those same tenets here. I find that data is really important, and now that we're moving to more probabilistic pathways than deterministic, it's more important than ever to check yourself all the time. 'Cause we all believe the models are good and we check them, but if we don't check them then we may not realize they've been drifting—or for instance for us, we may be giving you context to make a decision, but unfortunately we keep identifying the incorrect SMEs, right? The most recent person who's talked about a topic becomes the SME, the subject matter expert, as opposed to some other reason. Without those frameworks, we will just be blind. And so I think that's really fair.
You're making me think about another question, and I guess we'll go back to our developer friends—since this is Leaders of Code, not Leaders of Product. Do you think nowadays—I'm starting to feel that every engineer of mine needs to have some experience with data modeling, data engineering in a way. They need to probably understand machine learning a little bit, even if they aren't machine learning engineers. How are you thinking about the shape of developers nowadays in the AI world for where you are?
Sagnik Nandy (21:53) Yeah, again, it's easy in these answers to make it sound either very specific or very general. So I always say every problem is different, but I do feel—I was just joking with someone, I draw the analogy with speaking different languages. Now, more than ever, your ability to speak different languages—and here I use language as an analogy of different functions—is more important than ever. You need to understand data. You need to understand machine learning. You need to understand a little bit of front-end development, back-end systems, like what kind of database choices. The ability to speak a little bit of all of these things—and then you obviously need experts—but now more than ever, in the past, I think you could just be siloed in terms of focus. Today's world warrants, I think, a broader perspective.
You might not be fluent in all these languages, but you should be good enough to understand, "That doesn't sound right," or "This is where I bring in the actual linguist." That is very important. So I encourage—I speak to a lot of people who are in college, graduating—and I say, now more than ever, the ability to be nimble, the ability to be curious, is going to be an asset for your career.
Peter O'Connor (23:11) And "curious" is such a great word to use. I use that word a lot myself. I think curiosity, your energy, and aptitude to learn are some of the key things that I look for nowadays and actually try to inspire people to look for. Personally, I'm not looking so much for experts anymore—not that they're wrong or I don't need so many—but somebody who can just say, "Hey, I need to solve a problem. I need to learn these things to solve that problem." I think you're accelerated by those people nowadays because AI has made it easy to learn anything now. And I don't think you need to be a jack of all trades, but I think if you have that creativity now, that means more today than I think it did yesterday. And that's a hard thing to teach. That's a hard thing to get people to just learn.
Back in the day we could just say, "All right, it's about coding, and let's learn your basic functions, and let's make sure you understand what a front end and a back end are and how they differ. How do you communicate between them? Here's an API call." That's just par for the course, easy stuff nowadays. And it's not trying to diminish the need for those things, but the problems we want to solve are, like you said at the beginning of the podcast, scalable, hard business problems. And I don't think it's as much about staying in your silo, like you were saying. So it's a hard thing to figure out.
Sagnik Nandy (24:29) Yeah, I still feel like experts, domain specialists are important, but more than ever—I'd mentioned at the beginning of our conversation that I think of myself as a problem solver. I love solving problems and I love diversity of problems. It's probably the best time I've ever seen to be a problem solver. Because earlier you were limited by—even five years back, there were certain problems where I was like, "I don't know enough to go start scratching on the surface to see if I can make a dent." Now I feel my level of confidence: I'll either learn it or I have tools that I can access to help me at least start diving into that problem. So I think it's a great time to be a problem solver.
Peter O'Connor (25:11) I totally agree with you, totally agree with you for sure. You said you were talking to some college graduates. What is your message to them right now? I've been trying to thread this message myself and it's difficult. Computer science degrees, I think, have a strong aptitude to be in the marketplace well. But being a junior engineer is harder today than it was when I was one. I will not reveal my age, but it was a while ago.
So what do you tell junior engineers? I was talking to one the other day that was like, "What do I do to get a job? There's just not—the openings are hard." I'm like, "You gotta learn and you gotta show that you're willing to go out there and learn." That was one of my core advices to them. So how about you? What do you do to inspire?
Sagnik Nandy (25:49) I think very similar—plus 100 to what you said. Being curious, which I would say is a proxy for learning. When you're curious, you learn better, you learn more, you learn different kinds of things. And I think being flexible—some of us in the past, we could pick a set of tools and make an entire career out of it. We are in a world where everything around us is changing very rapidly.
I keep mentioning this to a lot of people I talk to that one of the ways I see this AI shift different from some of the big technical shifts I've witnessed in the past—whether it's mobile, SaaS, even the internet, now I'm dating myself—in most of those technologies, the emergence of the technology was disruptive, but the evolution was organic.
With AI, we are seeing a technical shift where not only the emergence, but the evolution is equally disruptive. Every five weeks, a new tool comes in and fundamentally questions your assumptions. It was the LLMs to start with, then it became about the agents. Now, whether it's tokens—like, there's a new talk of the town every few weeks. And in that world, being nimble, being flexible, being curious.
And again, speaking a little bit of all languages, I think there's tremendous value in knowing where to go looking. You might not know exactly what you're looking for, but the fact that when you're designing a system like this, maybe I should go think about the database side of it. "You know what? Maybe I go and look at the underlying NoSQL data store. Maybe I fundamentally question how much I do server-side versus client-side. Maybe all of this should really be headless." Knowing what questions to ask, knowing where to go and start digging—one of the things I like to ask a lot of questions because—
Peter O'Connor (27:41) Mm-hmm.
Sagnik Nandy (27:42) —now you have tools that are phenomenally good at answering. But what you ask will often determine how much they get to work.
Peter O'Connor (27:50) Really, really key advice there. I love that. The questioning—I think when I onboard a new engineer, I think you should be asking more questions than anything else, right? In fact, it's always good to be asking questions, even about the day-to-day operations; you may point out things we didn't know because we get biased towards that. So I think asking questions is really important.
When you've seen your developers try to adopt AI right now and maybe get good outcomes out of it—I heard you say something about your PR size went up. We've seen that on our side go up, and it can be scary at first. Did you have to do any mentoring of engineers when it came around to like, "You know, hey, this code may not work right, but the code you wrote two weeks ago before AI, that might have been wrong too." That's one of the things we're trying to balance right now ourselves, is like, "Oof, do you really understand your code? Well, maybe not." Have you had struggles or education pathways you had to take your teams through to say, "It's okay. Go forth, try it and see what it does. As long as we're safe, we're okay"?
Sagnik Nandy (28:48) No, absolutely. So we internally actually—one of the things I'm very proud of how it's shaped up is we went with some starting principles. We said we want us to be an extremely AI-leaning organization. We want to do it right. We want to do it for the long run. We want it to be sustainable. And we really want people, again, going back to what we discussed in the beginning, to move up the value chain. So it's not a checkbox. It's not like, "I use an AI tool. Done."
We really want to derive value out of these tools. So with that, we set up something called the Eng AI Champions Program. We took four or five of our most senior people and said, "Hey, you're tasked with making this happen." But then scale is very important, as I mentioned. So they went and basically brought together a whole bunch of other leads—we call them the Eng multipliers, around 75 people across a thousand-plus engineering team. And their goal was very clear: "We'll be building stuff. You tell us what to build, we'll build. You help us deploy it within your teams. So you're both an advocate for deployment and usage, but also give us feedback of what's working, what's not working. So things that work, we'll try to scale it out. Things that are not working, we will go fix." So we created this network and we created this feedback loop that came in very handy. And again, from the beginning, we were clear.
There was a lot of initial feedback around, "Should we be using AI?" It seemed pretty evident that this is a very powerful set of tools. I always draw this analogy with chainsaws—I don't know why. Imagine you were cutting trees with saws. AI is like a chainsaw. It gives you that much more power. But you do need people to learn how to use chainsaws, otherwise you'll cut yourself. So that's—
Peter O'Connor (30:32) Mm.
Sagnik Nandy (30:33) —very important. You also need to know when to use a chainsaw. Just because you have a chainsaw, you don't want to cut your sandwich using a chainsaw. So, I know, maybe not the best analogy, but I think we told people we learn this. We understand we'll get many things right, but we'll get some things wrong. In the early days I got a lot of people pinging me that people would share examples with me: "See, AI got this wrong."
And I was like, "I don't think AI ever said they'll get everything right." Humans were getting not everything, a lot of things wrong. Humans still get a lot of things wrong. We invest in humans, we train them. None of us entered the workforce knowing everything. We had a ramp-up. We are still making mistakes. We learn from our mistakes. We create that feedback loop. We build the guardrails. I think it's the same thing with AI. If you think of AI as a partner who has similar traits—the strengths are there, but there are also weaknesses. Over the years we've learned how to really optimize throughput using people. Now let's think of people plus AI, how with that combination we can do the same.
Peter O'Connor (31:42) Yeah, I totally agree with you. We have a network inside of our company called Champion of Champions—I think I might have stolen your name, I'm sorry—but yeah, same idea, same general principles, and we also try to measure the outcomes. One of the ideas we've had is let's look at some of our outcome-based metrics: hey, we have a measurement of our wait states, and we're thinking, "Okay, are we waiting in certain areas more now, and are we spending more tokens in that area?" Not because we care about the tokens, but maybe that's a sign of where we're finding a new bottleneck. Because we're spending a lot of tokens here, here, and here, and then we're waiting at this, then maybe that's the next space we have to add some—
Sagnik Nandy (32:18) Exactly that. We are doing that. Again, it's very important to ask these questions. I feel the combination of measuring things and asking questions about it—I mentioned sustainability. One of our key principles internally is like, we want to do this right and we are here for the long run. We are very happy with both how our cost per token, but also how tokens per task is evolving.
Going with that chainsaw: you don't have to slice your bread with a chainsaw. So one of the things we've done is we've taken workflows internally based on feedback from developers, and we've automated them, often using AI, but the final solution doesn't have to necessarily use AI—if it's a deterministic tool, like building it with AI, then you don't have to keep throwing tokens at it. Which allows you to both drive up efficiency, but also bring down tokens per task, because you invest tokens initially, but after that it becomes a deterministic workflow which you can periodically revisit.
Peter O'Connor (33:19) Yeah. Boy, I'm super happy to hear you say that. I told that to one of my principal engineers right away. They were like, "Well, if you just keep re-AI-ing this all the time, it's gonna be frustrating." I'm like, "Why don't you just have it make the tool that makes it deterministic and then you're done? And then it's repeatable forever that way." And it was just a bright light I could see happening at that point. It's really interesting. I read Linus Torvalds just the other day—maybe two weeks ago—made a really interesting comment that helped a lot of my engineers to think about AI as well, which is: there's a fear that "I don't know the code anymore, right? If I don't write the code, I don't know it. How can I work with it?" And it's like, yeah, think back to the code you wrote. Did you know that code? Because you hit compile on it and it goes into something else, and you assume you know what that does, but do you know what it goes down to all the way down to the instruction level? We make a lot of these abstractions.
And this is just a different version, and a few engineers recently—I was in a little town hall with them and I could see them smile like, "Holy crap, I never made that connection before." And I thought that was a really, really cool play to talk to them as well.
Sagnik Nandy (34:26) If I could, I would jump through the screen and give you double high fives. I've used almost the exact same example. I'm guessing you and I both at some point have coded in assembly. I talked to my son who's programming now. I think we always assume some things work and build on top of it. What we assume changes over time. My PhD advisors talk about when they would use punch cards. I didn't have to use that.
So they would think the fact that you have a compiler that actually works is a huge win. I recently found myself telling my son that he's never had to deal with memory management. And I spent a good amount of time in my early days dealing with that. And he's like, "Well, you never know what chasing memory errors is like." So we all take some things for granted and build on top of that. I was just saying to someone who had a very similar conversation, the one you mentioned: we use so many APIs. You assume that it works. There's a certain handshake and you say, "Okay, it's delivering what it's supposed to." So we've always—and now with AI, I think the number of things we have access to has grown.
But A, you always depend on things. B, the other very important part of this is the accountability still sits with you. If you're designing a solution and you've chosen four libraries, at the end of the day, if the solution doesn't work, you're the one who went and chose the libraries. So it was never like, "The library is bad"—you chose the wrong library. Same thing: the accountability of the end-to-end solution still needs to reside with the individuals leveraging AI. And there are different ways of achieving that in a world where throughput has gone up. And I think the best engineers are adapting. They are not only doing more of what they did, they're doing things differently because it's just a very different set of tools.
Peter O'Connor (36:19) For sure. I totally agree with you. I love hearing what you're saying about using the tools, gaining that testing ability, and making sure they try new things and learn. To me, it's like confidence, right? Everything we do is about confidence. Why do you deploy on a Friday night? Confidence, right? Because of the tools you have around, the monitoring you have around, you've done it before, right? With AI, we just gotta build that muscle and realize it can be just as confidence-generating. And I think that'll really accelerate a lot of us. I'm excited. If I never have to deal with the GCC compile-time problem again, I'm gonna be happy. So—
Sagnik Nandy (36:54) There's so much to be excited about. Again, our ability to get things done and get different kinds of things done just went up. It's such a fascinating time to witness just so much happening around us.
Peter O'Connor (37:09) Yeah, the human-in-the-loop thing came up to my mind. You said it a while ago, and I really appreciated hearing you believe in human in the loop too. I would love to hear your thoughts on: we have humans, they are very important to us, right? They are the ones who operate the AI that will make it go so much faster. So putting them at the right spots now becomes even more important, right? We don't want somebody sitting here just doing a PR review on a 20,000-line PR, right? You're not gonna grok it that well. It's not helpful. Have you pondered that thought? Where do you find making sure that your humans are doing the right jobs and not just spinning their wheels in the wrong space?
Sagnik Nandy (37:47) No, such a great question. I think two things are very important: to think about the process and figure out where exactly humans need to be present. So I think a lot of people are starting to do that. But I think another very important part of this is to make it easy for the humans to deliver whatever feedback or result that you want them to.
I'll give you an example. We have, in our agreement journey, steps where humans are needed to sign off on the data quality. We might be doing a 100% accurate job, we might be doing a 95% accurate job. But we need them to validate that this looks good. But it's on us how easy that validation is. Is it the press of a button, or do we expect them to say, "Okay, now I take all of this, run my own internal diffing mechanism"? So if you want humans in the loop, you have to also really make it enjoyable, make it easy for them. Same thing with developers internally. As we started generating more code, we realized our code review bottleneck increased. Code review time shot up by 50% for us at one point. And—
Peter O'Connor (38:57) Oof, yeah.
Sagnik Nandy (38:58) —we built additional agents to help with that. Could we break problems down into smaller problems? Could we do certain checks and bounds automatically? So it's on us. Yes, we told all our developers that at the end of the day, you are accountable for any code that's made it into the system. You can't say, "AI did that." But if the expectation then is, to your point, they have to start reviewing 20,000 lines—yes, we inserted a human in the loop, but then we made it both not so much fun, but also very difficult for the human to do their job. So we have to make it easy for them to play the role, the evolved role that we expect them to play.
Peter O'Connor (39:38) For sure, yeah. I can't imagine if a colleague of mine was like, "Here's 20,000 lines of code to review." I'd be like, "Well, I think my vacation started today." So that'd be pretty brutal. Yeah, I agree. We need to find where a lot of the value is for humans. I think we've said code's the bottleneck in the past, and complicated code will still be. There will still be places where I think we need to make sure that humans have a really strong eye, maybe, on that PR review, because it's a very sensitive part of the codebase. Risk here is high; we don't want anything bad to go out. But not all places have that problem. And then we need to figure out how we get better at all the other surrounding things: stakeholder engagement, understanding problems better, understanding how we can experiment against the problems is another place I think we're gonna see acceleration that we didn't see before.
Before, it was a lot of—even if we're agile—it was like, "Let's go analyze the problem and then, all right, now I think this is the way we go." And now it can be like, "Why do I need to analyze the problem? Why don't I try five different experiments right off the bat and see which one has the best outcomes?" I'm excited to see that, and I'm hoping that that'll go far. Is experimentation in your area really accelerated for the problems you're trying to solve?
Sagnik Nandy (40:52) Oh, absolutely. One can't afford to have a locked-down stack or set of decisions anymore. I think that's—
Peter O'Connor (41:03) Yeah.
Sagnik Nandy (41:03) —not prudent. So the ability to be able to try out things and when they look exciting to make changes based on that, it's very, very important. It's also, I think, then important to scale that out.
I've mentioned this a few times, the ability to scale. We are having our internal developers try out various things and making it super easy for them to share. One of the things I'm very excited about that just happened a few weeks back, taking our internal AI agent: we had some developers who built an entire end-to-end flow. Tests were producing errors, they were in the logs. The typical workflow was engineers would come, go check error logs, find errors, assign it to someone or themselves, they would go look at it, fix it, roll it out, rinse and repeat. This whole process is error-prone and takes time. So someone wrote an entire flow that scans into our error logs, finds issues, at night automatically tries to fix them, creates a PR, sends it out. And then again, that's the process. Worked very well—literally hundreds of hours of human time, and again we measure this, saved.
But what was even more amazing is they made it very easy for this whole thing to be templatized and copied by any other engineers on the team. So they can then take the same thing and say, "Okay, my problem is very similar, but maybe a different set of error logs or places to look at. Or maybe I have an additional check. So let me build on top of this so everyone doesn't have to reinvent the wheel." And this is really starting to resonate with the engineers.
Peter O'Connor (42:41) I love hearing that. That is so exciting to hear. Those are the success stories that I think mean a lot. Internally we had something similar: we had identified something like 200-some accessibility issues in our SaaS product. And boy, I can tell you, trying to remediate accessibility issues back in the day, that was a year-long project, easy right there. And we had some of our best developers just try some AI agents out on it, and something that was going to take us six months took us six weeks—not even—and that was them learning at the same time. Wow, that's great. So that's super cool to hear that you're having success like that. I have one last question.
When we build platforms—and this should take us out of the AI space a little bit—when we build platforms, we think you have an abstraction, right? We always are trying to provide that last abstraction. And I want to ask a really, hopefully introspective question. I know I could tell you about five different times, at least in my life, I've gotten that abstraction wrong. But I was wondering if you could tell me a story of when you thought you nailed that abstraction right, whether it be for an internal developer or maybe for a customer, and you learned a big lesson from making sure you get that layer of abstraction just right.
Sagnik Nandy (43:48) This is so close to heart. One of the engineering leaders I learned a lot from in my early days at Google used to cite this flow that many of us have been through. We see a system, it's riddled with issues, we fix it. We are the saviors—we come, we build a better system. Most of us, almost all of us, then feel like, "Now we've addressed it all."
A year later, people find issues with that system we built. And then they do it again. But again, we fall for that same trap. We're like, "Well, this time we got it right. We've understood." So this person used to say, "You should build for deprecation," which is a very different philosophy. If you assume anything you're building will eventually get deprecated—we somehow falsely give ourselves that level of credit that we got it right. I have never seen a system get it fully right.
I don't think any system will, not because they are badly designed, because so many other factors change around you. And that is happening now sooner than it ever has happened. So I think it's very, very important to build systems for deprecation. If you think of that, you will build the layers very differently. Any persistent data, you should ask yourself: someday someone will have to migrate this data to a different format, potentially.
It always does. They will have to read a terabyte, a petabyte of information from somewhere. Am I making it super hard for them? Am I creating the right abstractions? Can the data be decoupled from the processing? If not, I might think the data format is perfect today. It never is. So once you assume your system will get deprecated, you should design for that. And that's been something I found super helpful.
And over the years, I've personally made or seen hundreds of times that to be true. You made decisions which were great decisions, and a year later you're like, "Why did I make that decision?" And every assumption you think is absolutely right are—
Peter O'Connor (45:52) Mm.
Sagnik Nandy (45:52) —the ones which probably cause you most trouble when they are proven wrong. So I just tell everyone: assume that every assumption is eventually going to be wrong.
Peter O'Connor (46:01) Well, it takes you a year to find out you were wrong. It's usually about a week for me and then I'm like, "Whoop, that was dumb." So yeah, I love that idea. I remember deploying a system here—it was a DevOps system, "You can make your services so easily here." And I was like, "Did it, great, thanks." About three months later it was like, "Well, people don't like writing Terraform, people don't like the fact that we need an upgrade now? Good luck, you're on your own at this point."
You're hurting me right now, I just want to tell you. But I love that premise. It's almost like you're saying build for upgradeability, right? Think about the upgrade path before you think about anything else. So—
Sagnik Nandy (46:37) Exactly.
Peter O'Connor (46:38) —cool. Cool. Well, I really appreciate your time today. Thanks a lot for talking with me today.
Sagnik Nandy (46:44) No, likewise. I really enjoyed the conversation, time just flew by. So thank—
Peter O'Connor (46:47) Yeah.
Sagnik Nandy (46:48) —you for having me.
Eira May (46:49) Yeah, such a pleasure to be a fly on the wall for this conversation. Thank you both. If you are just tuning in, this is Leaders of Code, and you're going to want to go back to the beginning so you can hear a great conversation between Stack Director of Platform Engineering, Peter O'Connor, and Sagnik Nandy, who is the CTO of Docusign. Where can folks find you if they want to get in touch? Is LinkedIn the best place? Are you on X? Where can people find you?
Sagnik Nandy (47:15) LinkedIn, and my parents have SEO-optimized my name brilliantly. So if you just search for my name, I'll show up and I'm pretty responsive.
Peter O'Connor (47:24) Yeah, you can find me on LinkedIn as well. O'Connor Peter K is my thing, and that's the only place you'll find me. I'm not much of a social media person.
Eira May (47:31) Awesome. Well, if you have suggestions for topics to cover or guests that you'd like us to speak with, you can reach out to me at podcast@stackoverflow.com. As always, my name is Eira May and I am the B2B editor at Stack Overflow. Thank you all for listening. We are excited to see you on the next episode of Leaders of Code.
