Hacker News new | ask | show | jobs
by gingerlime 4857 days ago
"You are recognized by your own skills and good work, and you don‘t have to criticize others for not doing good work. Just worry about your own skills."

Reading from inspiring people like Wozniak makes me wonder how to adopt such advice.

I am wondering about that almost every time I review a pull request. How do you deal with bad code, poor comments or over-engineering when you see it? Of course you can be nice, but then code and product quality would end up affected. How do you balance this thing?? The person being reviewed knows it's not personal, but it too often becomes a battle of egos. I would be really interested to find ways to become a better programmer by being nicer without bending over or compromising on professional integrity. Any suggestions?

3 comments

> Of course you can be nice, but then code and product quality would end up affected.

Why? This attitude baffles me. You don't have to be a dick when reviewing someone's code, terrible or not.

> The person being reviewed knows it's not personal

It absolutely is personal if you make it personal, i.e. start personally insulting the author.

"How could you be so stupid to write this this way?"

"This is really idiotic code."

"Sorry, this dumb way of doing things is dumb, and I don't approve of dumb things in my project."

All of the above are personally insulting comments. You should not make comments like them if you value being civil.

There are plenty of ways to reject code without being a complete dick. For example:

"This is pretty neat, but I don't think it fits in here because _________"

"I really appreciate the commit, but _________ doesn't quite work with _______ idea."

"This is a great start. Could you change _____________ to meld better with ________?"

All non-confrontational ways to say "sorry, this isn't good enough" while also offering positive feedback.

I found both types of examples you gave insulting.

Obviously being called dumb is insulting, but being treated like a baby is too.

What's so wrong with just saying

"This should be changed because ___"

"You should avoid doing something like this because __" ?

I always advise my staff to simply stick to the facts. Anything that can be disputed will be. This results in statements like:

"I'd like this changed because I believe it's a mistake to use globals in this context"

rather than

"You're/It's wrong to put a global here"

The difference is subtle, but important. It allows personal opinion to be used without the debate being personal.

That seems to be the direction I was looking for. It is subtle, but I see the difference. What I noticed in your example is two things:

1. The statement is framed as a personal viewpoint, rather than absolute truth/fact. 2. You not only state the problem, but also the intent or direction for a fix.

I'll try to see if I can adopt something along those lines. Thanks.

It's important to acknowledge personal differences while trying to see them as separate from the people themselves. It's when the two are confused that problems arise.

If you ignore personal differences, or don't understand that they're opinions (albeit based on experience) you will fail.

That's therapy training for you :)

I prefer a little explanation here.

"I've just had to track down bugs due to globals defined in this context when they don't need to be. If you use this approach it will save everyone a lot of time in the future."

Not confrontational, it's educational, and you're saying why it's wrong. Just saying "it's wrong" doesn't help if the original author didn't realize it was wrong at the time. If they did realize it was wrong and did it anyways, giving the full description just reminds them why they should go and do it the long way.

I prefer the ways you've verbalized it. Facts are good.

Just pointing out the opposite of being "not nice", and that it is still possible to be productive while being so.

not being nice != being a dick.

I never make rude and inappropriate comments or call people names. I do try to highlight mistakes or what I consider to be a wrong approach. Some of those well-articulated comments still some times get misinterpreted, and egos get involved in the discussion.

Wozniak is talking about not criticizing people, and in that respect, even a nicely put, well articulated comment is a form of criticism.

Some years ago, I had to do several personal development courses. Most of them were absolutely useless (at least to me), but one I found tremendously useful in various job and life settings. It was a course about assertiveness (and, in particular, assertive communication).

Assertive communication is about expressing a contrary position in such a way that you are totally firm, but not aggressive. Your interlocutor must understand that your stance is strong, but that you are a person who listens and is not just trying to impose mindless authority on them.

A basic template for assertive communication is something like:

1. "I understand that [description of your interlocutor's position and why it's understandable that he holds it]",

2. "BUT [description of your position and firm arguments to support it]",

3. "THEREFORE, [conclusion, which will typically match your position but make some concessions to theirs if you can]".

It sounds like something pretty trivial, but believe me, it makes a load of difference. People will be way more likely to accept your arguments if you explicitly show them that you have carefully listened to theirs and respect them. I have had people coming into my office to complain about something, and going out almost thanking me for that very thing!

Of course, this is a personal informal explanation and you'll be able to find much better explanations of this principle on Google.

One (little cunning) advice I received to deal with 'battle of egos' was to introduce a third person, a third reviewer to break the tie. Ideally the person should be one to whom you both respect (due to authority or whatever) and are ready to take his/her word. Cunning part can be he/she should be the one you know will agree with your review comments/thoughts (which should be easy since you know your concerns are valid). This is assuming such battles are rare and people are open for genuine review comments.