2 ms·
You could try what's called a "sandwich technique" where you preface and follow your constructive criticism with positive feedback. A highly exaggerated example
by mikece 8y ago
You could try what's called a "sandwich technique" where you preface and follow your constructive criticism with positive feedback. A highly exaggerated example could be: "Your code shows amazing creativity and imagination -- I like that! But this section isn't as efficient as it could be; in fact, using a common algorithm -- like the one I'll send you by email in a moment -- you could speed up this function 3200x. You've got great passion and insights -- keep up the great work!"
- finaliteration 8y agoInteresting thought! What about if there's not really anything there to "praise", but it's just a chunk of code with some things that are off?
- mikece 8y agoHave a conversation. As a code reviewer you're looking to increase the understanding of the person whose code you're reviewing -- which starts with understanding why they wrote the code they way they did. Some people simply understand things differently and what's intuitive to them isn't to others. Consider the code sample I talk about in the following blog post: the only thing that's "wrong" about it is that it's probably not obvious to anyone other than the author. URL: http://www.mikece.com/2015/08/clean-code-vs-really-clever-code/ http://www.mikece.com/2015/08/clean-code-vs-really-clever-co...