From Writing Code to Managing Agents. Most Engineers Aren't Ready | Stanford University, Mihail Eric
Stanford Adjunct Lecturer Mihail Eric talks about what's happening to junior software developers right now — and what it takes to become an AI-native softwar...
Watch on YouTube →Transcript
Intro
- 00:00there is this emergence of kind of like
- 00:01a new I would say class of like engineer
- 00:04which is like the AI native engineer
- 00:05[music] and AI is that language. AI is
- 00:07that new language. This particular
- 00:09generation of junior developers of
- 00:12junior engineers of people that are now
- 00:13entering the workforce will I think be
- 00:14the first kind of generation of that new
- 00:17shift. A single developer become a
- 00:19manager of agents. Adding [music] more
- 00:21agents doesn't always create for a
- 00:22better system. In fact, it can make for
- 00:24a lot worse systems actually if if you
- 00:26just let them [music] go and do whatever
- 00:27they want. So really knowing how to like
- 00:29properly handle multiple agents is like
- 00:31the last boss in a game. Like if you can
- 00:33do that really really well, then you are
- 00:34like literally like the top top.1% of of
- 00:37users even today. I'm Mihel. I lead AI
- 00:40at an early stage startup here in San
- 00:42Francisco. I also teach class at
- 00:44Stanford. The title of the class is the
- 00:45modern software developer. It's
- 00:46definitely the first class where the
- 00:48focus is AI across the SDLC. within like
- 00:51a few hours of the class being announced
- 00:52and it kind of opened up for enrollment.
- 00:54Filled up over 100 students trying to
- 00:56get into the class.
- 01:06What is happening to junior software
Lesson 1 - What is Happening to Junior Software Engineers?
- 01:08engineers?
- 01:11there was this huge momentum around
- 01:14something kind of crazy is happening
- 01:16software development and AI is really
- 01:18starting to make its way into every
- 01:19[music] single part of how software is
- 01:21being done and and clearly something was
- 01:23changing and I've heard some pretty
- 01:25scary anecdotes where I was talking to
- 01:27someone that had just graduated at
- 01:29Berkeley and they were saying that they
- 01:30had applied to like a thousand places
- 01:32and had heard back from like only heard
- 01:34back from like [music] two places. So
- 01:36not even like got interviews and you
- 01:37know had gone through the pipeline but
- 01:38really were just heard back. So the
- 01:40reality is for a lot of junior engineers
- 01:42it's [music] very difficult for them to
- 01:44you know get some of these roles. It's
- 01:46it's an interesting time in in the
- 01:47ecosystem actually the soft ecosystem
- 01:49where [music] where basically three
- 01:50things happened came together in this
- 01:52kind of like perfect storm. The first
- 01:54thing that happened was in around 2021
- 01:55there was this a huge surge of like
- 01:57hiring soon after co there was just a
- 01:59bunch of companies that felt they needed
- 02:01to increase their employee count and
- 02:02then I think a lot of companies realized
- 02:05that they like overhired. So there was
- 02:07like massive layoffs that happened where
- 02:08all these companies that had hired a ton
- 02:10of people realized [music] that actually
- 02:11we can like reduce our workforce by 20%
- 02:1330% and it's still okay. That was
- 02:15combined with the fact that [music] the
- 02:16growth of the CS curriculum like the CS
- 02:19major nationally and internationally has
- 02:21grown tremendously [music] in the last
- 02:22like 10 to 15 years. So when I was
- 02:24graduating, you know, there's like some
- 02:25number of graduates and I think since
- 02:26then [music] like it's doubled to maybe
- 02:273x in terms of how many graduates from
- 02:30CS are graduating every year. And so you
- 02:31have [music] a huge workforce of people
- 02:33that have essentially like been laid
- 02:34off. you have this new overwhelming like
- 02:37new generation of engineers. We want
- 02:39jobs. And then the third thing that I
- 02:40think was contributed to all this was AI
- 02:43became popular, right? Like people
- 02:44started like really paying attention to
- 02:45AI. And so for a lot of employers, they
- 02:47started considering do I need to hire
- 02:49[music] more people to fill my gaps or
- 02:51can I just hire fewer people that are
- 02:53maybe native at AI and [music]
- 02:56that way cover the quota that I have
- 02:57maybe for employment. And so this
- 02:59particular generation of junior
- 03:01developers, of junior engineers, the
- 03:03people that are now entering the
- 03:04workforce will, I think, [music] be the
- 03:05first kind of generation of that new
- 03:07shift, right, where they have to both
- 03:09have good fundamentals, but also know
- 03:11how to be fully AI native.
- 03:13How top 1% AI native engineers
Lesson 2 - How Top 1% AI-Native Software Engineers Orchestrate Agents
- 03:16orchestrate [music] agents. At its core,
- 03:19I think that the AI native engineer is
- 03:21one that both has like a strong backing
- 03:23and and a foundation in traditional
- 03:25programming, system design, and
- 03:27algorithmic thinking, but is very
- 03:30competent at using like a gentic
- 03:32workflows. [music] I always teach them
- 03:34like build it up peace meal. You know,
Build it up piecemeal
- 03:35Boris from Claude said he does like 10
- 03:37agents at once and so I should start
- 03:38doing 10 agents at once. Like that
- 03:40that's like the wrong outcome that you
- 03:41should emphasize. Again, I would build
- 03:43it one at a I would say, hey, like I'm
- 03:45really good at doing one agent workflow
- 03:46quite well and I can build like a
- 03:48complex piece of software with one
- 03:49agent, but then [music] I know that I
- 03:51have to do this like other thing which
- 03:52is like maybe a small change. Thinking
- 03:54about your tasks as something that are
- 03:55isolated and that can be done with
- 03:59confidence by something that is that is
- 04:00a second or third agent. And so you add,
- 04:02you know, a second agent to fix the logo
- 04:03and you're like, well, this agent is
- 04:04fixing the logo. Another agent maybe
- 04:06could also um update the copy on the
- 04:09header of of the website. And again,
- 04:11this is like an isolated change that has
- 04:12nothing to do with what the second agent
- 04:13was doing. And so, the way I would think
- 04:15about it is iteratively add [music]
- 04:17more work for the agents. Make sure that
- 04:20you first understand what has to be done
- 04:22and then know where the lines are
- 04:24between those those items of work. And
- 04:26then like when you're feeling good about
- 04:27how one agent is doing something, then
- 04:29add a second one. Then if the second
- 04:30one's doing well and you're feeling
- 04:31confident, then add a third one, you
- 04:32know? So, I would build it up more step
- 04:34by step rather than 10 agents at once.
- 04:36The second thing that I think is really
- 04:38really important there is knowing how to
Context switching
- 04:40like context switch. In practice, what
- 04:41you're doing is you're like kicking off
- 04:43these like [music] interns. Basically,
- 04:44they're like very eager, savvy interns,
- 04:47these agents, and they're doing a thing
- 04:49and then you're just watching them in
- 04:51the terminal or like in the IDE and
- 04:53you're just like seeing them do work and
- 04:55they're like contributing code and it's
- 04:56just getting written somewhere and but
- 04:58sometimes they get stuck, right? How do
- 04:59you go from like one to another to like
- 05:01understanding, hey, this agent one was
- 05:04working on this particular task, agent
- 05:05two was working on another task, agent
- 05:06three was working on another task, and
- 05:07then you're like constantly switching
- 05:08back and forth. And it's a very
- 05:10difficult thing to do even as a human,
- 05:11right? To know how to like remember what
- 05:13the last thing was working on, but still
- 05:14have enough context to meaningfully push
- 05:16that task forward. And so [music] that
- 05:18switching, I think, is probably one of
- 05:19the core skills of of getting multi-
- 05:21aent workflows to work really well. That
- 05:23what I've described is basically what
- 05:24makes a good manager, like a good human
- 05:26manager. It has nothing to do with like
- 05:27an agent. Like if you can do that task
- 05:28really really well then you also are
- 05:30like a very good you'll be like a good
- 05:31human manager in general and so the
- 05:33people that I've seen best at doing that
- 05:34are the ones that are also have been
- 05:36managers of like humans you know or
- 05:37human developers and have learned how to
- 05:39do that context switching and then apply
- 05:40similar principles to to agents there's
- 05:43this concept that I'm calling like an
Agent-Friendly Codebase
- 05:45agentfriendly codebase or an agent
- 05:47friendly development ecosystem. Uh, and
- 05:49what I mean here is if an agent was
- 05:51released into your codebase, would it
- 05:54know how to understand what's happening
- 05:56in the codebase? When you release an
- 05:58agent to go and build in the context of
- 06:00your codebase, the way you ensure that
- 06:01they're going to like not break
- 06:02something and that whatever they
- 06:03contribute will work, is they test it
- 06:06against your tests, which are basically
- 06:08contracts that define the correctness of
- 06:10software. You need to define these
- 06:12contracts. If if you don't have enough
- 06:13test coverage, then you don't have
- 06:14contracts for your software. agents only
- 06:16can operate on contracts like explicitly
- 06:17defined contracts of software. Any
- 06:19developer who's been in the industry
- 06:20knows that readmes get out of date with
- 06:22what's happening in the code almost
- 06:23[music] immediately. And so you have
- 06:25these like two descriptions of the same
- 06:27thing. The code says one thing but the
- 06:29readme says a completely different
- 06:30thing. If your code has that kind of a
- 06:32situation then the agent will read the
- 06:34readme and maybe the code and they'll
- 06:36and they'll ask them like which of these
- 06:38what's the right interpretation? Should
- 06:39I follow the read memes what the read me
- 06:40says or what the codebase says? And so
- 06:42make sure they're consistent, right?
- 06:43This is like a simple thing. When you
- 06:45get spaghetti code, it's typically when
When you get spaghetti code
- 06:48an agent has maybe gone on and built
- 06:50something for multiple iterations, maybe
- 06:52multiple features, and it just started
- 06:54kind of like going off the rails a
- 06:55little bit. One bad thing that they're
- 06:57really good at is agents can compound
- 06:59errors very quickly. If an agent has one
- 07:01misunderstanding in a code, and then it
- 07:04sees that misunderstanding that it
- 07:05created in step one, it can double down
- 07:07and and create another error in step
- 07:09two, it'll magnify it. The most
- 07:11important thing is like having making
- 07:12sure that the first thing that the agent
- 07:14sees is completely robust and it's
- 07:16completely airtight in terms of design,
- 07:17in terms of testing, in terms of like
- 07:19the build, like a lot of these like kind
- 07:20of core parts of the the codebase itself
- 07:23before you even think about the agent.
- 07:25So again, like making sure that like the
- 07:26[music] first version of your code that
- 07:28an agent sees is self-consistent, making
- 07:30sure that it's well tested, making sure
- 07:32that you have linting in place and style
- 07:34checking so that you know your your
- 07:35codebase is is consistently formatted. A
- 07:37lot of these things will ensure that
- 07:39your agent is always adhering to the the
- 07:42kind of the rules of your codebase that
- 07:43you've [music] already defined. And then
- 07:44the last thing that I'll add just just
- 07:46to give another example of like agent
- 07:47friendly agent first code bases, are you
- 07:49consistent about like design patterns in
- 07:52your code? What I mean here is if if
- 07:54there's one part of your codebase where
- 07:56when you create a certain kind of
- 07:57object, you use this one API and there's
- 08:00another part of the codebase, you also
- 08:02create the same object, but you're using
- 08:03a different API. when an agent now has
- 08:06to develop in your codebase, which of
- 08:09the two should it use? Should you use
- 08:10the API 1 or API 2? And if people have
- 08:13an agent that goes and picks the wrong
- 08:15API, well, a human would also have been
- 08:17confused. If I were walking to your
- 08:19codebase and saw the two different ways
- 08:20of doing it, I would also ask myself,
- 08:22should I do one or two? I don't know. I
- 08:23see both. And I would probably end up
- 08:25asking a teammate, hey, which of these
- 08:27are we actually supposed to use?
- 08:28consistent design [music] patterns and
- 08:29and kind of programmatic patterns I
- 08:31think is also something that the best
- 08:32agent friendly codebases I've seen use
- 08:34functional software versus incredible
- 08:37software
- 08:38a few things that define functional
Lesson 3 - Functional Software vs Incredible Software
- 08:40software from like incredible software
- 08:42the one version of the answer is just
- 08:44[music] taste like what is good software
- 08:46taste right and genuinely there's people
- 08:48that have taste and don't have taste or
- 08:50just people that have taste that spend
- 08:52more time developing that taste when I
- 08:53look at sort of the the students in my
- 08:54class we had some requirements like you
- 08:56have to build like five different flows
- 08:57or something like you can create those
- 08:58flows, but if you want to push yourself
- 09:00like doing the bonus, you know, the
- 09:01bonus and then the extra credit, that is
- 09:03like I think where the difference starts
- 09:05to arise is when someone is like, I know
- 09:06that I've already like hit 100% on this
- 09:08or, you know, got most of the credit for
- 09:10the assignment or the project, but I
- 09:11really want to like I'm invested in like
- 09:13building the most complex thing because
- 09:16I want to solve a problem more than just
- 09:17get [music] the grade, right? But the
- 09:19taste building happens in that like that
- 09:21last mile like where you go spend and
- 09:23you like do the extra work to like
- 09:25expand the feature, make it more robust,
- 09:28make more things possible in the
- 09:30application. You know, the students
- 09:31again that I think did the best were the
- 09:32ones that like are now literally
- 09:33building startups around their projects
- 09:35because they like see that there's
- 09:36something there and they're going to
- 09:37like they're rolling with it. You know,
- 09:38like the class ended, but they're like
- 09:40we're still but we're still working on
- 09:41the exact same thing because we think
- 09:43there's more to build here. And that I
- 09:45think is where the way the top engineers
- 09:46think. Experimentation is sort of the
- 09:50name of the game in [music] becoming an
- 09:52AI native software developer. One
- 09:54example that comes to mind is when Boris
- 09:56came from cloud code came to speak.
- 09:58Someone like Boris even a team like you
- 10:00know Claude at Anthropic that is
- 10:01building such an amazing piece of
- 10:03software they basically rewrite Claude
- 10:05every week or like week [music] or two
- 10:06weeks using Claude, right? So they are
- 10:08like constantly rewriting their own
- 10:10piece of software with software like
- 10:12that they've built. And so they
- 10:13themselves are also [music] figuring
- 10:15things out as they go like they are
- 10:17building their system but they are
- 10:18experimenting and constantly iterating
- 10:20[music] based on feedback from their
- 10:22users and even if they seem like they
- 10:24have all the answers they don't you know
- 10:26they themselves are also discovering
- 10:27what works and what what doesn't work
- 10:29and so the more important thing is to
- 10:31build experimentation into your own
- 10:33workflows and I tried to reinforce in
- 10:35the students was look I can come here
- 10:37and I can give you suggestions I can say
- 10:39you should try this tool here's what I
- 10:40think is good about this tool but at At
- 10:42the end of the day, you have to sort of
- 10:43like beat your head against the wall a
- 10:45little bit yourself. [music] You have to
- 10:46be able to experiment. You have to be
- 10:47able to see what works for you and what
- 10:49doesn't work for you and really just
- 10:50kind of make that a part of the kind of
- 10:52the new way of doing software
- 10:53development, experimentation, hacking,
- 10:55and just making that a part of your
- 10:56workflow.
- 10:57Why the world still needs junior
Lesson 4 - Why the world still needs junior software engineers
- 10:59software engineers?
- 11:00Senior developers historically tend to
- 11:02be a little bit resistant to AI tools
- 11:04because they're so ingrained in their
- 11:06own way of doing things cuz they've been
- 11:07developing for 20 years and they're
- 11:08like, "Oh, the only way to do this is
- 11:10the way that I've done it. I use them."
- 11:11the senior developer sometimes going to
- 11:12be the most stubborn, [music]
- 11:14but someone who is coming to the
- 11:15industry for the first time, they're
- 11:16like they're like a sponge. Like
- 11:18everything is possible to them. Like
- 11:20they're learning things for the first
- 11:21time. And so all of the things that are
- 11:23difficult about the world and society
- 11:24and and industries and verticals, they
- 11:26don't yet. They haven't internalized
- 11:27that yet. They're not like scarred by
- 11:29like how hard healthcare is. They just
- 11:30see like, oh, I see a problem. I don't
- 11:32know. Like why don't I go try and do it?
- 11:33And so there's like a good naivity
- 11:36[music] to how young young people think,
- 11:38which is perfect for a startup founder.
- 11:40they're going to be be brave enough to
- 11:41go and tackle the thing. In those
- 11:42situations, they end up being the best
- 11:45people that have adopted that skill set
- 11:46[music] that everyone is now asking for.
- 11:48Even if there is concern that, you know,
- 11:50it's becoming harder to to kind of get
- 11:51employed, I [music] think the people
- 11:53that are learning these skills for the
- 11:55first time end up being the most nimble
- 11:56and end up being the most like fast at
- 11:58like kind of using those [music] skills.
- 12:00So, I actually think they can still
- 12:02succeed in ways that senior developers
- 12:03cannot. fundamentally like what you're
- 12:05teaching with software is like how
- 12:07[music] to think about building of a of
- 12:09a complex system using [music] digital
- 12:12means and like learning how to use
- 12:13algorithms to solve that system. This is
- 12:16almost like more like math than it
- 12:17[music] is like CS, right? It's it's
- 12:20like like you're learning like math
- 12:21skills almost. And I think that is just
- 12:23like teaching someone how to like think
- 12:24because so much of the CS profession is
- 12:26is breaking things up and seeing how
- 12:29things work and then fixing things and
- 12:31then expanding on things and kind of
- 12:32iterating on things. And so I think that
- 12:34the people that are, you know,
- 12:35developers by trade, they're a lot more
- 12:38willing to customize things. They're a
- 12:40lot more willing to to [music] kind of
- 12:41fix things when they don't work. They're
- 12:42a lot more willing to say like, "Hey,
- 12:44why did this happen? Let me see if I can
- 12:46kind of get into that, you know, get
- 12:47into internals a little bit in ways that
- 12:48other people [music] are more like the
- 12:50system doesn't work. Okay, I guess I
- 12:51need to move away from it. Almost like
- 12:53arrogance. Like the arrogance of a
- 12:54developer sees any problem and thinks
- 12:56software is the solution to the problem.
- 12:58It's like the confidence to say like,
- 12:59hey, I I'm going to try and fix this in
- 13:00a way that I know how to use and I'm
- 13:01going to use the tools that I know how
- 13:02to use and let's see if we can make this
- 13:04work. And that that [music] I think is
- 13:05the the kind of the most powerful
- 13:06properties of of CS developers.
- 13:10So you're like, Claude, make me
Next Episode
- 13:12something. Codeex, make me something.
- 13:13And then you're like, let's add this
- 13:14other feature. And then like let's do
- 13:15another one. And a month goes by and
- 13:17you've built the most beautiful piece of
- 13:18software. It's crazy overengineered and
- 13:21then you launch and nobody wants it. Hi,
- 13:22my name is Rem Coning. I'm a professor
- 13:24at Harvard Business School and I study
- 13:26entrepreneurship and AI. I think we're
- 13:28in a world where increasingly what
- 13:29matters is your ability to allocate
- 13:30[music] intelligence. The key for AI
- 13:33native is that you're not just using it
- 13:35to do [music] the work. You're embedding
- 13:36it in the product so that the AI can
- 13:38directly do the work with the customer.
- 13:41You want to take you as the human out of
- 13:44the loop. That's the key to building AI
- 13:46native organizations. What happens when
- 13:47the AI starts talking to one another?
- 13:49What happens when the AI start
- 13:51collaborating? What do they need for one
- 13:53another? [music] I think is a big
- 13:55interesting open question. It's a little
- 13:56provocative to think that way. Um, but I
- 13:58think it's one where there'll probably
- 14:00be some trillion dollar companies that
- 14:02come out of answering that question.
- 14:03Well,