Why did you do it this way?

Probably one of my favourite questions in a code review. 😄 Especially when reviewing code from less experienced developers. I could just tell them what I would change. And sometimes that is exactly what I do. But I find it much more interesting to understand why someone chose a particular solution.

Sometimes there is a good reason I simply overlooked. Sometimes, while explaining their approach, they notice the problem themselves. And sometimes we end up discussing three different solutions and none of them is clearly better. 😅

I think that is actually one of the things I enjoy most about code reviews. They are not just about finding bugs or improving code quality. They are also an opportunity to learn from each other.

And after more than 20 years of writing code, I still regularly encounter solutions I would never have thought of myself.

Of course, the whole thing only works if “Why?” is a genuine question and not just a more polite way of saying “You did it wrong.” 😉

#CodeReview #SoftwareDevelopment #Mentoring

View image

Kommentare auf LinkedIn →

Kommentieren und diskutieren können Sie direkt unter dem Beitrag auf LinkedIn.

← Alle Beiträge