blog.pierrehenry.be

How to Stay in Control When Coding With AI Copilot

Photo by Alfred Rowe How to Stay in Control When Coding With AI Copilot - Photo by Alfred Rowe on Unsplash

Alright, let’s get straight to it. Today, I want to talk about something that comes up all the time when you’re working with AI code assistants like Copilot. You’re writing code, you hit commit, and suddenly you’re staring at something weird in your diff. You’re thinking, “Wait, why did Copilot do this? I’m not silly—I’m the pilot here. Copilot is just the co-pilot.” And honestly, that’s exactly the mindset you need.

Let’s say Copilot resets an item count in your code. You might wonder, “Why are we resetting the item count? Do we really need to do that?” Here’s my advice: never hesitate to ask, to question, and to challenge Copilot. That’s super important. At the end of the day, you are the pilot. Copilot is your junior engineer, and you’re reviewing their code.

Of course, you want to help each other out, but you should always be thinking: “Why would you do that? Are you sure this is correct?” That’s not just about catching mistakes—it’s the best way to learn. If you just rely on AI and never dig deeper, you’re not going to learn anything. You’ll get bored, and eventually you’ll feel helpless, like all of this is pointless. But it’s not pointless. Understanding what Copilot does helps you research, improve, and become a better engineer. That’s the goal.

Always Question, Always Learn

So, always question. That’s how you get better at what you do. Use AI to be more efficient and to level up, but don’t just accept everything Copilot spits out. Think of it as a conversation between you and Copilot. Ask yourself, “Do we need this?” Because if you just trust Copilot blindly, it’ll add a lot of code—sometimes too much. That’s when problems start. Your codebase becomes unmaintainable, bugs creep in, and you have no idea why. Well, it’s your fault if you didn’t review properly.

Debugging is a part of coding How to Stay in Control When Coding With AI Copilot - Photo by Hitesh Choudhary on Unsplash

Copilot can also add redundant checks or unnecessary stuff. It’s your job to spot that and prevent it. You can even add rules for this. For example, you have Cursor rules, and you can set up instructions with Copilot in VS Code. Right now, the instructions aren’t as good as Cursor rules, but hopefully that’ll get better soon.

Practical Example: Reviewing Copilot Suggestions

Let’s say Copilot suggests this:

1// Copilot adds this line
2itemCount = 0;

Ask yourself: Do I really need to reset itemCount here? What’s the context? Is this introducing a bug or hiding a problem? Don’t just accept it. Sometimes Copilot will add things that seem logical but don’t fit your use case. That’s why you need to review every suggestion, just like you would with a junior developer’s pull request.

Don’t Let Shortcuts Become Dead Ends

Here’s the thing: using AI is still pretty new. We’ve only had these tools for a few years, and we’re all still figuring out how to use them best. It takes time to adjust. But you want to use the latest and best technology to be quicker and better. Just remember, being quicker without reading or questioning Copilot won’t actually make you faster in the long run. It might feel like it, but eventually, you’ll hit a wall. That’s when the problems start.

Photo by Srijan Tiwari How to Stay in Control When Coding With AI Copilot - Photo by Srijan Tiwari on Unsplash

Don’t take the shortcut that leads to a dead end. Use the right way, the right path. Step by step, you’ll become a better engineer—a better version of yourself.


Key Takeaways


Pierre-Henry Soria

GitHub · PierreHenry.Dev · YouTube

<< Previous Post

|

Next Post >>

#Ai Coding Assistants #Ai Copilot #Code Editors #Productivity #Productivity Tips #Software Development #Tasks #Tech