Suggesting Is Not Attacking
Published on .
Sometimes as a developer, we give suggestions about other people's code. We want to help people to become better. Also, sharing is caring. But the way we give a suggestion is important, because the one that receives the suggestion may think that we are "attacking" instead of suggesting.
How to give suggestions in an offensive way?
Let's use this code snippet throughout this blog post so we are on the same page.
body {
font-size: 1rem;
}
The offensive way of doing it is by saying that the code that the developer writes is useless.
Hey there! I notice that you write
font-size: 1rem
on thebody
styling. That is not useful. You should remove it since that is already the default styling of thebody
element.
Strengthening what we know
We know that the fact that user agent stylesheet has already specified the styling on the body's element.
Now, how to tell it to the developer without attacking the developer?
Hi there! The user-agent stylesheet has already set
font-size: 1rem
on thebody
element.
This suggestion is only stating a fact. We do not need to tell whether it is useful or not. We do not need to tell what the developer needs to do.
I like this approach because we see the code as something that is attacking our knowledge and then, we handle it by not attacking. We just need to strengthen what already know with evidence. That is why making suggestions helps us to understand a topic better.
Giving good suggestions is not easy
When we already know about something, we are not the same person who still does not know it. That makes us forget the state of our past selves when we did not know it.
I still make mistakes when I write suggestions to people. Sometimes I am too aggressive by being too critical. But I am trying to get better at making suggestions. That way I can have a conversation.
Anyway, I want to share this little tip with the hope that we can show our good intentions in a good way.