100 lines of code: reviewed in 10 minutes. 1000 lines of code: reviewed never. Code reviews exist to catch bugs, improve maintainability, and help teams write better software together. But most engineers treat them like assignments to pass instead of collaborative checkpoints. That mindset kills the process before it starts. ➧ When you're submitting a PR: 1. Keep it small Aim for 10-100 lines of code per pull request. Past 100 lines, reviewers start skimming. Past 500, they stop caring entirely. Large PRs are harder to review, take longer to approve, and make it nearly impossible to catch real bugs. Break your work into isolated, logical chunks. Yes, it's more work upfront. But it ships faster. 2. Write a description Give context. Always. Your reviewer might be on a different team, in a different timezone, or new to the codebase. Don't make them guess what you're solving. If you're fixing a bug, explain what broke and link to the ticket. If it's a visual change, add before/after screenshots. If you ran a script that generated code, paste the exact command you used. Context turns a confusing diff into a clear story. 3. Leave preemptive comments If part of your diff looks unrelated to the main logic, explain it before your reviewer asks. "Fixed a typing issue here while working on the main feature." "This file got reformatted by the linter, no logic changes." These small clarifications save back-and-forth and show you're thinking about the reviewer's experience. ➧ When you're reviewing a PR: 1. Be overwhelmingly clear Unclear comments leave people stuck. If you're making a suggestion but don't feel strongly, say it: "This could be cleaner, but use your judgment." If you're just asking a question, mark it: "Sanity check, is this intentional? Non-blocking, just curious." Over-communicate your intent. Especially with remote teams or people you don't know well. 2. Establish approval standards with your team Decide as a team when to approve vs. block a PR. At Amazon and now at Nielsen, we approve most PRs even with 10+ comments because we trust teammates to address feedback. The only exception: critical bugs that absolutely can't go to production. Without clear standards, people feel blocked by style comments and approvals feel arbitrary. Talk to your team. Set the rules. Stick to them. 3. Know when to go offline Some conversations don't belong in PR comments. If the code needs a major rewrite, if there's a design disagreement, or if you're about to write a paragraph, stop. Ping your teammate directly. Have a quick call. Save everyone time. Leave a comment like "Let's discuss this offline" so they know you're not ignoring it.
How to Improve Your Code Review Process
Explore top LinkedIn content from expert professionals.
Summary
Improving your code review process means making sure your team catches errors early, shares clear feedback, and keeps code readable and maintainable. Code review is a collaborative step where developers check each other's work to spot bugs, clarify logic, and confirm the code fits the overall project goals.
- Keep changes small: Break your code updates into manageable pieces so reviewers can focus, understand, and catch mistakes more easily.
- Provide clear context: Always include explanations or descriptions with your code so others know what you changed, why you changed it, and how to test those changes.
- Encourage open communication: Ask questions, discuss concerns, and mark minor suggestions to avoid confusion, making the review process more collaborative and productive.
-
-
In the last 11 years of my career, I’ve participated in code reviews almost daily. I’ve sat through 100s of review sessions with seniors and colleagues. Here’s how to make your code reviews smoother, faster and easier: 1. Start with Small, Clear Commits - Break your changes into logical, manageable chunks. This makes it easier for reviewers to focus and catch errors quickly. 2. Write Detailed PR Descriptions - Always explain the “why” behind the changes. This provides context and helps reviewers understand your thought process. 3. Self-Review Before Submitting - Take the time to review your own code before submitting. You'll catch a lot of your own mistakes and improve your review quality. 4. Ask for Specific Feedback - Don’t just ask for a “review”—be specific. Ask for feedback on logic, structure, or potential edge cases. 5. Don’t Take Feedback Personally - Code reviews are about improving the code, not critiquing the coder. Be open to constructive criticism and use it to grow. 6. Prioritize Readability Over Cleverness - Write code that’s easy to understand, even if it’s less “fancy.” Simple, clear code is easier to maintain and review. 7. Focus on the Big Picture - While reviewing, look at how changes fit into the overall system, not just the lines of code. Think about long-term maintainability. 8. Encourage Dialogue - Reviews shouldn’t be a one-way street. Engage in discussions and collaborate with reviewers to find the best solution. 9. Be Explicit About Non-Blocking Comments - Mark minor suggestions as “nitpicks” to avoid confusion. This ensures critical issues get addressed first. 10. Balance Praise and Criticism - Acknowledge well-written code while offering suggestions for improvement. Positive feedback encourages better work. 11. Always Follow Up - If you request changes or leave feedback, follow up to make sure the feedback is understood and implemented properly. It shows you’re invested in the process. -- P.S: What would you add from your experience?
-
Most of us review code in the wrong order. We spot a missing test or a style inconsistency before even asking whether the code is correct. We should think about it differently. The first question should always be: Does this code do what it is supposed to do? If the answer is no, nothing else matters. Style, structure, tests - all secondary to correctness. Once you are confident it is correct, ask if it is clear. Can someone else (or you, six months from now) understand what is happening and why? Clarity in code helps ensure it does not become a liability. Then check whether it matches the style and conventions, because inconsistencies add cognitive load for everyone who reads the codebase afterward. After that, look for duplication. Is this solving a problem that is already solved somewhere else? Could this be a shared utility? Finally, ask whether it is well tested. Not just "are there tests" (non-sensical ones), but do the tests actually cover the meaningful cases? Correctness. Clarity. Style. Deduplication. Tests. In that order, every time. Hope this helps.
-
TIPS FOR YOUR INTERNSHIPS AND NEW GRAD POSITIONS - 2024 EDITION There are some things you learn better once the roles are reversed: I learned the importance of a good pull request (PR) once I started reviewing them myself. Here is a checklist you can refer to: 1. Getting your work reviewed doesn't shift the responsibility of catching issues to your reviewers. The prime responsibility of ensuring your work is defect-free and won't cause problems in prod is always on you, the author. The code review process is a guardrail, but don't treat it as a crutch: 'I'll have a senior engineer review my work, so I don't have to worry about testing the edge cases, they'll catch those.' This is the wrong mentality to create a PR with. If all your PRs involve reviewers pointing out edge cases, you're not doing your job diligently. 2. Document your PRs properly. Provide context, and don't take this for granted. Just because someone reviews your PR doesn't mean they'll have the complete background. Include the WHAT, WHY, and HOW. WHAT: Provide background on the issue. Example: this PR fixes an uncaught exception (include details about the exception). WHY - Why is this fix necessary? Example: the fix is needed because it helps prevent the app from crashing unexpectedly because of the uncaught exception. HOW - Example: It's fixed by encapsulating this block of code within a try-catch and logging the error. 3. Add instructions on how to reproduce the error and verify the fix locally. 4. For UI changes, including screenshots of before and after can be helpful. 5. Add tests! You'd be surprised how often this step is forgotten. 6. Keep the PR small, so it's easy to review. The usual guideline is less than 250 lines of code per PR. If it's too large, break it down into multiple PRs. 7. Review it first yourself. You'd be surprised by how many print statements you'll find that you forgot to clean up. 8. Assign the right reviewers. 9. Call out things you want to bring specific attention to, and you can cc specific people. 10. You don't have to necessarily agree with every piece of feedback provided - if there's something you feel strongly about, feel free to discuss it. If the discussion is getting too long, consider switching to a different medium - my goto is to jump on a quick call. 11. Give people enough time to review large PRs. If you're planning on merging a big feature on Friday afternoon (which isn't a great idea to begin with), don't create the PR on Thursday evening. There can be exceptions to this rule, but rushed reviews should be avoided. In the worst case, keep in mind that your PR could be reverted, which is why keeping the PR detailed is necessary. Got any more suggestions? Drop them in the comments below! #softwareengineering #technology
-
The time between introducing a defect and fixing it is one of the most important metrics in software engineering. The closer that gap is to zero, the better. Not all defects are bugs that break things. Low-quality code, functions that are too long, nesting that's too deep, complexity that's too high, is a defect too. It works, but it degrades your codebase over time. After building 30+ repositories with AI coding tools, I've seen this play out at scale. These tools generate more code faster, which means there's more to manage. Functions balloon to 60 lines. Nesting goes four levels deep. Cyclomatic complexity creeps past 15. You don't notice until every change gets harder. Code review catches it, but too late. By the time a reviewer flags a 40-line function, the AI has already built three more on top of it. The fix is enforcing quality at the moment of creation. I built a set of Claude Code PostToolUse hooks (scripts that run after every file edit) that analyze every file Claude writes or edits and block it from proceeding when the code violates quality thresholds. Thresholds are configurable per project. Six checks, enforced at the moment of creation: → Cyclomatic complexity > 10 → Function length > 20 lines → Nesting depth > 3 levels → Parameters per function > 4 → File length > 300 lines → Duplicate code blocks (4+ lines, 2+ occurrences) All six checks run on Python with no external dependencies. JavaScript, TypeScript, Java, Go, Rust, and C/C++ get complexity, function length, and parameter checks via Lizard. When a violation is found, Claude gets a blocking report with the specific refactoring technique to apply: extract method, guard clause, parameter object. It fixes the problem and tries again. In a recent 50-file session, Claude resolved most violations within one or two retries, with blocks dropping from 12 in the first 20 writes to 2 in the last 30. Hooks handle measurable structural quality so I can focus reviews on design and correctness. If a threshold is wrong for a specific project, you change the config. → ~100-300ms overhead per file edit on modern hardware → Start with one hook (function length > 20 lines) and see how it changes what your AI produces The full writeup covers: → The hook architecture and how PostToolUse triggers work → A before/after showing how a 45-line nested function gets split into three focused helpers → Why hooks complement CLAUDE.md rules rather than replacing them Link in comments 👇
-
I don’t think the main primary purpose of code reviews is to catch bugs. Most dev do. They’ll tell you reviews are about quality control. But I disagree. The most valuable part of a code review is knowledge transfer. Here's why: - Developers usually test their code before opening a PR - Most teams already use linters, static analysis, and CI to catch issues What teams do not do enough of is share why the code was written a certain way and capture architectural decisions so future engineers understand the tradeoffs On a fast moving distributed team it is impossible for everyone to be in every call or track every ticket. Code reviews become the last line of defense for distributing knowledge Here are 4 ways to make code reviews a knowledge sharing superpower: 1. Always explain the “why” behind your code, not just the “what" 2. Document architectural decisions either in the PR itself or by linking to an ADR 3. Summarize the PR in plain English so anyone can quickly understand what changed and why 4. If a decision was made in Slack or a meeting, record it in the PR so it is not lost
-
The best code review I ever received had zero technical feedback. Instead, my senior colleague wrote: "The code works perfectly, but someone reading this in 6 months won't understand the reasoning behind your approach. What context are we missing?" No nitpicks about variable names. No debates about algorithms. Just one simple question that changed how I think about code forever. That review taught me: → Code is written once, but read hundreds of times → Your biggest audience isn't your team today—it's your team in 6 months → Clarity beats cleverness every single time → The best code tells a story, not just executes logic Now when I review code, I ask different questions: "What story is this code telling?" "Will someone understand the 'why' behind these decisions?" "Are we solving for today's problem or tomorrow's maintenance?" The most impactful code reviews aren't about finding bugs—they're about building empathy for the humans who will inherit your work. What's the best non-technical feedback you've received on your code? #CodeReview #SoftwareEngineering #TechLeadership #CleanCode