Don't get defensive during code review

Sometimes even a small observation can lead to a big improvement

Joel Clermont
Joel Clermont

When someone else gives feedback on my code, it's very easy to slip into a defensive mindset. How dare you challenge my perfectly-crafted code! But over time, I've really grown to enjoy having my code reviewed.

As an example, Aaron was looking at one of my pull requests, and he commented on the name of a particular function. With the change I introduced in this PR, the name wasn't fully accurate anymore.

Instead of just brushing it off, we paired for a bit, and that simple name observation led to a really nice refactoring. In the end, the code became much more readable.

Here to help,


P.S. If you're a solo dev and don't have someone to do code review, I'd be happy to take a look. It's a really valuable process.

Toss a coin in the jar if you found this helpful.
Want a tip like this in your inbox every weekday? Sign up below 👇🏼

Level up your Laravel skills!

Each 2-minute email has real-world advice you can use.