Is Vibe Coding Real? With James Montemagno

## Metadata
- Author: [[Hanselminutes with Scott Hanselman]]
- Full Title: Is Vibe Coding Real? With James Montemagno
- Category: #podcasts
- URL: https://share.snipd.com/episode/aaddbe33-0027-48b4-82a3-dcf629567b54
## Document Notes
## Highlights
- **Vibe Coding as a Flow State**
- Vibing is being in the flow state with AI assistance rather than ignoring code completely.
- It's a cooperative partnership where the developer actively reviews and guides AI-generated code in real time.
Transcript:
James Montemagno
Well, the thing that I wanted to build, and this is where the vibes come in, and I've always been a vibe person, me and Pierce Bogan, uh, worked at Xamarin for a long time and our vibes, the Vibes go up and down. And like, when you think about vibes, it's like a glucose curve. It goes up and down all the time. The vibes are high, the vibes are low.
Scott Hanselman
I feel like we need to define this for people who have English as a second language.
James Montemagno
Right?
Scott Hanselman
Because like the vibes, if the vibes are good, then you're having a good day and things are cool. It's like, it's your emotional state. It's the atmosphere. Like, hey, James gives off good vibes today. Or wow, this restaurant has bad vibes.
James Montemagno
It's just kind of an ethereal thing. It's your feeling, right? And actually, funnily enough, like when you vibe code in quotes, right? Think of it as normal development. I was talking to someone about vibe coding, like what's the difference? I'm like, you know, when you're developing software and you're debugging a problem or you're writing and scaffolding code, or you're creating a new class or implementing a method, Sometimes you are in a flow, you are in a vibe. And sometimes that is going really good. Like you, when you are on a, on a spree, like you are on a good flow in your coding, you're jamming to some music, like you're just, you have the spec in front of you, you're implementing, You're implementing, everything's going right. IntelliSense popping up. You're like, yes, this is good. This is good. And then you're debugging your app and everything's working like that to me is vibing in a different way. That is me vibe coding is me in the flow. And sometimes if I'm debugging a problem or my code is not working correctly and I'm trying to tweak the CSS for the eight thousandth time, the vibes are a little bit lower. I'm a little bit frustrated, right? I'm struggling through it. So what, if you apply the same concept of how we've been developing software to working closely with our AI counterparts to help us get that code completed, then to me, that is the vibe. ([Time 0:04:42](https://share.snipd.com/snip/36b4e2b5-8857-4a11-b022-c322f2dd30ec))
- **Vibing a 17,000-Line App**
- James Montemagno vibe coded a production app of 17,000 lines and wrote only 20 lines himself.
- He used AI agents extensively for backend services, Blazor front end, and Azure AI integration.
Transcript:
James Montemagno
One is I have a, I have a production vibe coded. I wrote 20 lines of code. It's actually wrote 20 lines of code. I had correct some really hard JSON parsing from Reddit.
Scott Hanselman
How many lines of code total in the entire app that you made?
James Montemagno
I added, according to the PR that I sent David Fowler, I think it was 17,000 lines of code. And you wrote 20 of it. I wrote 20 of it. That is correct.
Scott Hanselman
Meaning that you needed to stop and say, no, no, I'm going to drive for a while.
James Montemagno
And you wrote that yourself. Okay. Yeah. And I was very proud of that very complex JSON parsing because it was a real problem that it could not figure out and could not solve. So this is a sentiment analysis tool. I'm really trying to still understand how do I do something with AI as far as like integrating AI into my applications that's meaningful. And something we do at work all the time is interact on Reddit and create YouTube videos. And there's all these comments and I want to do sentiment analysis. David Fowler wanted this and he actually had a bunch of command line applications that would go talk to these different services, grab their comments, and then spit it out to a text file. And I said, well, that's garbage. I'm not a command line person. I don't know what to do with these files. I will create backend services. I will create a web front end with Blazor, and I will use Azure AI to do sentiment analysis and add on these different services. And I took his original library, which was very small, just a few files. And I refactored all the code. So, and by I, I mean, I told the copilot to go do it. And I told him exactly what I wanted. I had to create new projects, had to do everything for me. Then I added Azure function backends, then I added a blazer front end. And then I started figuring out how to work best with it. And I started to create prompts to basically add new features and functionality. I created a spec of how to create something, right? And I worked with it. And in fact, I didn't write the spec. What I did is I vibed a feature and then I said, go create a spec of everything that you just did so I can implement a new feature. ([Time 0:10:33](https://share.snipd.com/snip/1b5adef3-9b3b-4b2f-8cf0-18f8baecdfdf))
- **Control AI with Custom Instructions**
- Define how you want your AI assistant to work, including what it should and shouldn't do, through custom instructions.
- Actively control when AI writes tests or formats code to maintain your coding standards.
Transcript:
James Montemagno
For example, put all my CSS and razor dot CSS files. If it does something I don't like doing, I tell it don't to do that, like write tests. I say, please never write a test unless I tell you to write a test. And if you think I even say this in my custom, I said, if you think I should write a test, ask me if you should write a test. That's my vibe. There's no testing. I'll say, we'll go and do it. So as I'm working with it, I am, for all intents and purposes, crafting and making it better over time. So now I'm implementing features in not that much time at all, like 10 minutes to add a new service, 20 minutes to add a new service. So what I've been doing is I'm in meetings, I'm giving it prompts, I'm working on stuff, I let it go. And to your original question is how long does it take? It depends on the model. It depends on the feature. Um, but it's doing all things live, right? So sometimes it can be 30 seconds, 10 seconds. Sometimes it's a minute or two. ([Time 0:16:03](https://share.snipd.com/snip/6ce11238-2edc-4896-8840-4c12267139bf))
- **Trust AI with Boilerplate Code**
- Trust AI with boilerplate code like classes and services while reviewing UI elements carefully.
- Let AI handle code you're less confident in, such as CSS and JavaScript, to save time and effort.
Transcript:
James Montemagno
And I'm reviewing that code. And I'm looking at it. And I'm working to morph it into what I want. The CSS, the JavaScript stuff, hands off, I will work with it for an hour if I have to, to make that CSS look absolutely amazing. I will not write any CSS because I'm just not, is it amazing CSS? I don't know. It's also something you enjoy. For you, it's toil.
Scott Hanselman
It's inconvenience.
James Montemagno
It is toil. Compared to if I'm in mobile app dev. So imagine I go to a mobile app, I'm doing.ml, which is our C sharp, you know, front end, or maybe I'm doing Swift development or something like that. I'm very confident in all aspects of that, right? I'm very confident in all of it. So in that instance, where it will do extremely well and I can do and apply the same approach is I will most likely be reviewing a lot of the UI work, the thing that the users are seeing. ([Time 0:19:49](https://share.snipd.com/snip/7aa016cc-90c1-415c-ab75-2fed7ba5d373))
- **Big Prompts and Talking Out Loud**
- Large, detailed prompts give AI a better understanding and produce more accurate code.
- Talking to the AI out loud helps clarify your thoughts and improves prompt quality.
Transcript:
James Montemagno
But I have no idea. I would say it was a prototype. So that was true vibes. That was a hundred thousand definition.
Scott Hanselman
Are you a, I keep coming back to Simon Willison because I really think very highly of him, uh, that like vibing your way into a production app is risky. What would you do? Is this, is this specification driven development? Cause I know that your prompts are very, very, very verbose. And I, I advocate for like yapping at the AI. Cause I very much believe like more context is better. Like you don't say, Hey app, make me a master detail, uh, you know, app and bootstrap and like, think that that's enough. You're going to be typing a lot or talking a lot to the thing. I very much believe that we're talking to ourselves in the mirror. You know, it's, you think that you're working with someone, but really you're working with yourself. And by talking out loud, you're understanding what you want and giving it as much context as possible. ([Time 0:21:49](https://share.snipd.com/snip/6acaf36e-4153-40bf-9fd7-5facc8d41761))
- **Use Custom Instructions and Prompts**
- Use custom instructions and prompt files to embed your best practices and coding guidelines into AI interactions.
- Treat these prompts like reusable code templates to maintain consistent and efficient development.
Transcript:
James Montemagno
Their mix. So these cool custom instructions get sent with every call. So you kind of want to keep them low, you know, they're with every call to, to co-pilot in this instance, or it's like an include file. It's like an include file. It gets every single time. So you want it to be long enough, but not too long. So you kind of want to get those best practices, but there's another instance, which is called a prompt. Then a prompt is for all intents and purposes, instead of putting the reusable prompts, basically. So imagine you had a, I want to implement a new API. It's like, you might have an API prompt. Oh, where do you save those? So inside, so the custom instructions are inside the dot getup folder. And then these are inside of a prompts folder inside that folder. And then you can say, run this prompt, and then you can give it. So imagine you had one is, here's how you create an API. So you could define as the architect here in this instance, the prompt file. You say, here is how I implement this. Now, of course, you could also have Copilot just generate a prompt for you and how you do it. It knows your code, right? Don't waste your keystrokes. A wise man once told me, you only have so many keystrokes, don't waste them. So you can have it create the prompt file for you. It knows how you create it. So imagine for your podcast, you're like, here's how I create an API. Here's what it looks like. And here are the different files that I need to do and kind of give it best practices around the API or a front end component or a login definition or some testing thing. So instead of it just saying, create the tests, say, here's a prompt on how I want to create the test that gives it the best practices and it will go do it. So that's how I've been doing it. So I literally have a prompt and my prompt actually has a decision tree, which is here's how I create a service. Now the service can be this type or this type. So based on what type it is, some of it forks at some point. So ask me these questions and define with it. And this is really fascinating because there's also this sort of new spec-driven approach, not just to feature development, but to app development. ([Time 0:22:57](https://share.snipd.com/snip/71566571-94ae-4f91-965e-bdbd57567925))
- **Context Drives AI Effectiveness**
- Context is the key to effective AI coding; feeding error messages and code helps AI fix issues rapidly.
- Custom instructions evolve to reflect your best practices, making AI code output aligned with your style.
Transcript:
James Montemagno
I think what you're saying is how do you massage the code?
Scott Hanselman
Like when do you stop vibing and start code reviewing effectively? Because vibe coding could also be thought of as like going on Fiverr and hiring a young person to go and do this work for you. And I want to make sure that we call out these, these prompts, this dot GitHub folder, and underneath it, a prompts folder and a workflows folder. This is a convention that is an emerging experimental convention in VS Code that you can go and make whatever.prompt So you know what this reminds me of? I've got a utils folder that people know about. For the last 20 years, I've been talking about my tools list. I would download an executable. I just downloaded a new one called y-edit from Malcolm Smith. ([Time 0:27:03](https://share.snipd.com/snip/11d3333f-8fd7-449c-a07c-8304bd7c2b92))
- **Carry Prompts Like Dotfiles**
- Carry around your AI prompts and custom instructions like dotfiles to reuse your development preferences everywhere.
- This makes setting up new environments easier and your AI toolkit portable.
Transcript:
James Montemagno
And I may not give you exactly what you want compared to I carry around my custom instructions. I carry around my prompt files of how I start new projects and how I want my files to be organized and what type of development I like. And that's a James thing. So those are the things that you'll continue to evolve over time when you're developing. And these things will continue to get better. So they get better even without these things, but they get even better with it. And it's all about context. That's really what I've learned at the end of the day, whether that's your prompt or whether you put these in these instructions that are reusable. And to me, I, I start and I give it a lot of trust. ([Time 0:29:13](https://share.snipd.com/snip/a2c43289-260b-4a26-a3c1-8a04b377a4d1))
- **Chunk Tasks and Review in Real Time**
- Chunk larger features into smaller tasks for AI to handle incrementally.
- Review code in real time while AI generates it to remain in control.
Transcript:
James Montemagno
So I think this is a big switch for me, which was when I was asking it in, in, in the edit mode, I would stop. I would be more meticulous, like actually looking at what is writing when I'm in the agent mode. Yeah. You'd come up for air. It's streaming. Now I'm just, I am, I am diving deep with it. Okay. I come up from air only when I want to. So ([Time 0:31:10](https://share.snipd.com/snip/71b1a380-68ca-4988-81f9-0dc1422e2283))
- **AI Automates Code Reviews**
- AI can analyze entire codebases to identify cleanup areas and generate GitHub issues automatically.
- This accelerates maintenance and helps prioritize improvements without manual effort.
Transcript:
James Montemagno
So now I'm vibing, making the code more reusable. And what I did is I used MCP servers or model context protocols, basically tools that the AI can call like GitHub or Perplexity or Context 7. This is a really awesome MCP server. So if you have libraries you're using, it can go fetch context about that specific library. It's called Context 7 because, again, AI is only your point in time. You can feed it Context. So a new hot JavaScript or C Sharp library comes out. It'll grab it and feed it the Context. But what I did, Scott, is I went in and two different things. One is I asked it to do a code review. I said, analyze the entire code base. And here's what I'm looking for. I'm looking for code that can be cleaned up and it can be reusable. It's like not in a good state, stuff that isn't adhering to best security practices or coding standards, performance improvements, go analyze the code and then go create from what You've analyzed the 10 top things that I could do in my application and go create the GitHub issues for me. Really? And yeah, just do it. It's on the, it's on the, the GitHub right now. You can look at the issues. All of those issues were created. It has the context of your entire app. ([Time 0:36:35](https://share.snipd.com/snip/04a6c7ba-ddc4-4096-9ff0-9ff1de3c0465))