Don’t Trust the Bot: Always Review Your Code

author Avatar

Cover
#Ai#Thought-Process

Don’t Trust the Bot: Always Review Your Code

Abdul RafayAbdul RafayMay 9, 2025
7 min read read

AI Summary


I just got my first job in the year 2022 after my bachelor’s degree, and I started my career as a Machine Learning Engineer. Then the first AI boom hit — ChatGPT was released and changed the course of history so much that I couldn’t imagine. It was so groundbreaking that I could not believe it. Like I knew what AI was, but then everything changed. With time, the era — “The Era of AI” — was born.

With time, different tools for different AI tasks were created — from coding to writing blogs to SEO and even task management. People were adding OpenAI APIs into their applications and wrapping interfaces around them. Like, this was cool, but one area I want to talk about is code review.

Old Method

Let’s go back in time and talk about how code review used to be done. It was simple. You code something, make a pull request, and then submit it. A reviewer checks it and tells you to make changes to the codebase. You make the changes, re-submit, and if everything looks good, your code gets merged into the main branch. That was it.

This process was simple but skillful — senior and junior devs both had to look out for what could cause issues and whether the code quality was solid.

AI-Written Code

AI has changed everything. Now, everyone is writing code using AI — this was new and became known as “Vibe Code”. If you want to know what vibe coding is, check out my previous blog post.

With vibe coding in place, everyone was writing code using AI. There were cases where AI-written code had downsides — for example, no optimization, bugs, and sometimes it caused major issues in the codebase — even breaking the entire app.

Not too long ago, I came across a YouTube video where Theo talks about a Twitter post where AI-generated code caused a company to lose ten thousand US dollars. That’s crazy. Theo raised some solid points — if you’d like to watch the video, feel free to check it out.

It’s an amazing YouTube video:

Code Rabbit

Let’s be real — everyone’s using AI these days to handle the boring parts: styling, boilerplate, repeated tasks… even I do it! I’ll be honest, I’m not great at design or picking the right color palette, so I use AI for that too. No shame.

But here’s the thing — with all this AI-generated code, you have to review it. And that’s exactly where Code Rabbit comes in.

Basically, Code Rabbit reviews all your pull requests and suggests changes — and not just generic ones. It understands your codebase context too. And the best part? It’s totally free for all public repos. For this blog post, I went ahead and enabled Code Rabbit on all my projects.

And holy moly… it’s actually good. Like 90% of the time, it gives solid suggestions to improve my questionably written code 😅.

Here’s the proof:

Slide 1

Pretty impressive, right?

Code Rabbit doesn’t just point out little things — it’ll flag error handling, suggest accessibility improvements, and yeah… even remind you to remove your API keys if you accidentally commit them. (Been there.)

I remember one time I was building a Text-to-Speech API in the browser, and it was rough getting it to work. Locally and in preview deployments, everything looked fine. But when I pushed the code, Code Rabbit found a bug I totally missed. I fixed it based on its suggestion, and boom — it actually solved the issue.

If you’d like to see the full pull request, feel free to check out my GitHub repo here.

⚠️ One small disclaimer:

I don’t make direct commits from GitHub based on Code Rabbit suggestions. What I do is copy the suggested code, run it locally, test it, and if it works — then I commit manually. If it doesn’t work, I tell it straight up: “Nope, this broke something.” Always test things yourself. Blindly applying code review suggestions (even from AI) can sometimes lead to chaos.

The Catch: It’s Not Always Perfect

So yeah, Code Rabbit is great — 90% of the time it works like magic. But let’s talk about the other 10%, the part where things start to fall apart a bit.

Now the issue isn’t with the code suggestions or how it reads the code — that part is solid. The real problem is when you commit code directly from GitHub, which is kind of the core feature of Code Rabbit.

Check this out:

When you click that commit button from the GitHub UI, Code Rabbit sometimes tries to replace entire functions, even if the fix was just about changing one or two lines. And it does that without fully understanding the rest of the codebase — so yeah, it ends up breaking stuff.

This happened to me a lot when I first started using it. After a few broken commits, I figured out my own flow: I still let it review my code, but I copy the suggested changes, run them locally, and if it works — then I push it. Never blindly commit from GitHub anymore.

Now, another thing that didn’t quite work for me is this new feature called Code Docs. When you make a pull request, it tries to automatically generate comments and document your code by summarizing it.

Honestly? Not a fan. I turned it off the same day I tried it. It’s just not there yet — feels half-baked. Maybe in the future it’ll improve, but for now, nah. Needs more time in the oven.

Final Thoughts

So yeah — Code Rabbit is actually really good. It’s helped me a lot, and honestly, I’ve learned so much just by reading its suggestions. It feels like having a senior dev review your PRs every time… and it never gets tired.

But — and this is important — don’t turn your brain off.

There’ve been times when I pushed some code, and later someone asked me,

“Hey, what does this function do?”

And I just stood there like:

“Uhh… no idea. Some AI wrote that.” 😅

So here’s what I’ve learned:

  • Know your codebase, even if you’re working on just one part of it.
  • Always review everything — read the suggestions, run them locally, test them, and make sure it actually works when deployed.
  • Write tests. Please write tests.
  • And yeah — performance? AI doesn’t care. It just wants to get the job done. You have to be the one to optimize, clean up, and make sure it won’t eat up all your memory.

In the end, tools like Code Rabbit are here to help — not replace thinking. Use it, learn from it, don’t rely on it blindly… and most importantly, have fun. Whether you’re writing real code or just vibe coding, building cool stuff is what it’s all about.

Until then, peace out, nerds. 👓

Comments