Your code feedback is killing team morale. Here's how to fix it. 💔➡️❤️
Bad Feedback: ❌ "This code is terrible" ❌ "Why did you do it this way?" ❌ "This won't scale" ❌ "You should know better" ❌ "This is wrong"
Good Feedback Formula: ✅ Observe + Impact + Suggest
Examples:
🔸 Bad: "This function is too long" Good: "This function has 50+ lines which makes it hard to test individual behaviors. Consider breaking it into smaller, focused functions like validateInput() and processData()."
🔸 Bad: "Performance will be bad" Good: "This nested loop creates O(n²) complexity. With large datasets, this could cause timeouts. What if we use a Map to reduce it to O(n)?"
🔸 Bad: "Security issue" Good: "This SQL query is vulnerable to injection attacks. Using parameterized queries or an ORM would prevent malicious SQL execution."
The SBI Framework: • Situation: Describe the specific code • Behavior: Explain what you observe • Impact: Share the potential consequences
Psychological Safety Rules: • Criticize code, not the person • Ask questions instead of making demands • Explain the 'why' behind suggestions • Acknowledge good parts too • Offer to pair program on complex fixes
Examples of Encouraging Feedback: • "I like how you handled error cases here" • "This abstraction makes the code much cleaner" • "Good catch on the edge case handling"
Remember: The goal is to improve code AND developer skills. If your feedback only achieves one, you're doing it wrong.
Great technical leaders build people up while building code quality.
How do you give constructive code feedback? 🤔
