DEV Community

Discussion on: Is “Defensive Programming” actually healthy?

Collapse
 
megazear7 profile image
megazear7

When I review pull requests I like to make my comments open ended. "What do you think about...", "Do you see a benefit with...", "How difficult would it be to..."

This helps draw out expertise from the other developer, fosters open discussion, and helps maintain code quality and future proofing while allowing the developer that is actually going to write it to say that it isn't worth the time - and gives them a chance to provide a reason for that opinion.

Collapse
 
cubiclebuddha profile image
Cubicle Buddha

That’s a great idea. I’ve always appreciated the Socratic method. Question for you: does this work well for you in remote teams? I feel like this might work better as an in person code review. I say this because questions can be perceived as passive aggressive in text.

Collapse
 
megazear7 profile image
megazear7

I work almost entirely remote and most of the people I work with are non native English speakers. So it definitely works but you are absolutely right. I make sure to go out of my way to prevent a accidental passive aggressive tone.

Thread Thread
 
cubiclebuddha profile image
Cubicle Buddha

Yea totally. Remote working is a skill unto itself.