Skip to main content

Command Palette

Search for a command to run...

The Code Review That Made Me a Better Engineer

Learn: The Code Review That Made Me a Better Engineer

Updated
6 min readView as Markdown
T

Welcome to TopperBlog! 👋

I'm a tech content creator passionate about helping developers level up their careers and master cutting-edge technologies.

🎯 What I Write About: • AI/ML Engineering & LLMs • Web3 & Blockchain Development
• System Design & Architecture • Interview Preparation (FAANG) • Freelancing & Remote Work • Modern Tech Stacks (Next.js, React, Rust, TypeScript) • Performance Optimization & Best Practices

💼 Mission: Sharing practical, actionable insights that accelerate your tech career and maximize your earning potential.

📚 15+ In-Depth Guides covering everything from earning $10k/month as a freelancer to cracking FAANG interviews.

🌐 Let's connect and grow together in this amazing tech journey!

#TechBlogger #SoftwareEngineering #CareerGrowth #WebDevelopment #AIEngineering

The Code Review That Made Me a Better Engineer

I still remember the Slack notification. My tech lead had left 47 comments on my pull request.

Forty-seven.

I'd spent three days building what I thought was an elegant solution to our API rate-limiting problem. The code worked. The tests passed. I was proud of it. And now, staring at that number, my stomach dropped.

That code review changed everything about how I write software. Not because it destroyed my confidence—though it definitely bruised my ego—but because it taught me lessons I couldn't have learned any other way.

The Setup: When Clever Code Isn't Smart Code

Six months into my first senior engineer role, I was determined to prove I deserved the title. Our team was struggling with API rate limits from a third-party service, and I volunteered to fix it.

The solution seemed obvious: implement a token bucket algorithm with Redis. But I didn't just implement it—I over-engineered it. I created an abstract base class for rate limiters, added strategy patterns for different algorithms, built a configuration DSL, and threw in some metaprogramming for good measure.

The code was, in my mind, beautiful. Flexible. Extensible. Ready for any future requirement.

I hit "Create Pull Request" with the confidence of someone who'd just solved world hunger.

The Review: A Masterclass in Humility

My tech lead, Sarah, didn't pull punches.

Comment 1: "Why do we need an abstract base class when we only have one implementation?"

Comment 8: "This metaprogramming makes the code path impossible to follow. Can you simplify?"

Comment 15: "We're adding 3 new dependencies for a problem that could be solved with 50 lines of code."

Comment 23: "Who will maintain this when you're on vacation?"

Each comment felt like a paper cut. But here's the thing—she wasn't wrong about any of them.

The worst part? Comment 31: "This is really clever code. That's usually a red flag."

That one stung because I knew she was right. I'd been writing code to impress other engineers, not to solve the actual problem. I'd confused complexity with sophistication.

The Conversation That Changed My Perspective

Sarah didn't just leave comments and disappear. She scheduled a call.

"Your code works," she started. "But working code isn't the goal. Maintainable, understandable code that solves the right problem is the goal."

She pulled up my PR and walked through it. "Imagine you're oncall at 3 AM. The rate limiter is broken. Would you want to debug this?"

I wouldn't. I absolutely wouldn't.

"Now imagine a junior engineer joins the team next month. How long would it take them to understand this?"

Weeks, probably. Maybe months.

"Here's what I want you to do," she said. "Delete everything. Start over. Write the simplest possible solution that solves today's problem. Not tomorrow's hypothetical problems. Today's."

I was devastated. Three days of work, gone. But I did it.

The Rewrite: Less Is More

The second version took me four hours.

class RateLimiter:
    def __init__(self, redis_client, max_requests, window_seconds):
        self.redis = redis_client
        self.max_requests = max_requests
        self.window = window_seconds

    def allow_request(self, key):
        current = self.redis.incr(key)
        if current == 1:
            self.redis.expire(key, self.window)
        return current <= self.max_requests

That's it. Fifty-three lines total, including tests. No abstractions. No metaprogramming. No clever tricks.

It solved the exact problem we had. Nothing more, nothing less.

Sarah approved it in 20 minutes with one comment: "This is great. Now anyone can understand and modify it."

The Technical Lessons I Learned

1. YAGNI Is Real (You Aren't Gonna Need It)

Every abstraction I built was for a future requirement that didn't exist. We never needed multiple rate-limiting algorithms. We never needed that configuration DSL. I was solving imaginary problems while making the real problem harder to solve.

Now, before I add any abstraction, I ask: "Do we need this today, or am I speculating about tomorrow?"

2. Code Is Read More Than Written

I spent three days writing code that would take weeks to understand. I spent four hours writing code that anyone could grasp in minutes. The second version was objectively better because it optimized for reading, not writing.

Your code will be read hundreds of times—by you during debugging, by teammates during reviews, by future maintainers who've never met you. Write for them, not for your own cleverness.

3. Complexity Is a Tax

Every abstraction, every dependency, every clever trick is a tax on your team. Someone has to understand it. Someone has to maintain it. Someone has to debug it at 3 AM.

Before you add complexity, make sure the benefit is worth the cost. Usually, it isn't.

4. Good Code Is Boring Code

This was the hardest lesson. I wanted to write code that made people say "Wow, this engineer is smart!" But the best code makes people say "Oh, that makes sense."

Boring code is predictable. It follows conventions. It does what you expect. There are no surprises, no hidden cleverness, no "wait, what?" moments.

Boring code is beautiful.

5. Feedback Is a Gift (Even When It Hurts)

Those 47 comments felt like an attack on my competence. But Sarah wasn't attacking me—she was investing in me. She spent hours reviewing my code and teaching me how to think differently.

The engineers who give you tough feedback are the ones who care about your growth. The ones who rubber-stamp everything are doing you a disservice.

How I Approach Code Reviews Now

That experience completely changed how I write and review code.

When I'm writing code:

  • I start with the simplest solution, not the most elegant one
  • I delete more code than I add
  • I optimize for clarity over cleverness
  • I ask "Will this make sense to someone else?" before committing

When I'm reviewing code:

  • I look for unnecessary complexity first
  • I ask "Why?" more than "How?"
  • I try to teach, not just critique
  • I remember how those 47 comments felt and balance honesty with empathy

The Takeaway: Ego vs. Excellence

Here's what I wish I'd understood earlier: your value as an engineer isn't measured by how complex your solutions are. It's measured by how effectively you solve problems while making life easier for your team.

That code review humbled me. It forced me to confront my ego and recognize that I was optimizing for the wrong things. I was trying to prove I was smart instead of trying to be useful.

The best engineers I know write code that looks simple. They make hard problems look easy. They build systems that anyone can understand and maintain. That's the real skill.

Sarah's 47 comments taught me more than any tutorial, course, or book ever could. They taught me that great engineering isn't about showing off—it's about showing up for your team with solutions that actually work, not just technically, but practically.

Now when I get tough feedback on a PR, I don't see it as criticism. I see it as someone caring enough to make me better.

And that's made all the difference.


What's the toughest code review feedback you've ever received? How did it change how you write code? I'd love to hear your stories.