Beyang Liu, the CTO & Co-founder of Sourcegraph is back on the pod. Adam and Beyang go deep on the idea of âindustrializing software developmentâ using AI agents, using AI in general, using code generation. So much is happening in and around AI and Sourcegraph continues to innovate again and again. From their editor assistant called Cody, to Code Search, to AI agents, to Batch Changes, theyâre really helping software teams to industrialize the process, the inner and the outer loop, of being a software developer on high performance teams with large codebases.
Beyang Liu: [00:24:24.07] Yeah, so the equivalent of a day in the life for an engineer is what does it take to take a feature from idea all the way to getting into production? Itâs like one whole loop of the software development lifecycle, which we kind of model as this two loops that are connected. Thereâs kind of an inner loop, which is your kind of read/evaluate print loop in your editor, where youâre kind of quickly iterating on the idea, and making it come together⌠And then thereâs the outer loop, which is sort of like the ops loop. You plan out the feature, you actually write it, you push it up, it gets reviewed, it needs to pass CI/CD, it gets rolled out, and then after it gets deployed, youâve got to monitor and observe it to deal with any kind of production bugs or things that emerge.
So a day in the life of an enterprise developer or a developer working in the context of a very large existing codebase, itâs kind of like you have an idea for a feature - whatâs the first thing you have to do? Well, the first thing you have to do is you have to go and acquire a bunch of context about the existing codebase. So in the pre-Sourcegraph world, what does that entail? Itâs a bunch of grepping for stuff in your existing repository, maybe youâve got to clone down a couple of additional repositories if youâre very intentional about it⌠Sometimes people just donât bother, because theyâre like âAh, itâs too much work. I will just assume that this thing that Iâm building doesnât exist yet, so let me just go build it.â Sometimes it involves pinging your colleagues for help. So if youâre onboarding to a new part of the codebase, or youâre a new engineer, youâre going to go bug the senior engineer who was around when that code was written, whoâs very short on time, and kind of crotchety because thereâs like five other people you who have asked them a very similar question in the past two weeks⌠So that is a whole kind of tooth-pulling exercise. And that can take you, I donât know, weeks, even months⌠In some of the codebases that we worked in while we were at Palantir, itâd literally take months just to orient on âHey, this is the part of the code that actually needs modifying.â And thereâs a bunch of false starts along the way, because you start writing something only to realize âOh, you should be modifying this other piece over there.â
Okay, so thatâs just getting to the point where youâre ready to start writing the code, right? Once you start writing the code, youâre in your editor, most of the code you need to write is probably boilerplate, or what we call boilerplate plus plus. Itâs not exactly something you can copy and paste, but you basically want to find an existing example of using that one particular API that you need to use. And then youâd kind of turn your brain half off and just pattern-match against that example, because thatâs the reference point. So provided youâve found that example, then you can pattern-match against it. If you donât find that example, then thatâs kind of this arduous âHey, let me discover how to properly use this API, because thereâs no docs on how to use it.â And someoneâs probably done this probably like a dozen times before, but Iâve never done it before, so now I have to essentially go and rediscover how to do that.
So you go through that exercise, thereâs multiple rounds of kind of iterating on it, and you finally get to the point where âOkay, Iâm ready to push it up.â You push it up to review⌠Maybe thereâs multiple stakeholders that have to sign off on on the change. Thereâs the people you work directly with, maybe thatâs part of your code review process, maybe you also made some modifications to some other shared libraries, and now other teams that own that code have to also sign off on itâŚ
[00:27:57.29] A lot of times those other teams donât necessarily care too much about the change that youâre trying to land, because they have their own priorities, and theyâre incentivized to work on those, and not anything else that happens in the company. So who knows how long itâll take to get all the stakeholders to sign off on that change. Or maybe you realize through the review that you get from a senior engineer that this whole approach was wrong, because you didnât do enough search and discovery.
So itâs almost like this game of chutes and ladders. You have a potential to shoot all the way back to scratch; you just wasted a week, a monthâs worth of work because he built the wrong thing. Best case, it takes a lot of time getting people to approve it, you finally get it approved, it rolls out to production, maybe it breaks something, maybe thereâs a test that breaks that you didnât catch locally, and so on and so forth⌠Once it gets into production, thereâs a long tail of issues that could arise too, in terms of it triggered some bug, or maybe there was some security vulnerability that got introduced⌠Anyways, I donât have to sketch this out, itâs already painful just describing this.