Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wow, I cannot tell you how many times I've wanted to say something similar in a code review but instead go with "hey, this looks a little funny, any ideas what you could do to clean it up?" Part of me does think its rude, the other part is jealous he can say it and I can't :)


"Hey, this looks a little funny, any ideas what you could do to clean it up?" is ambiguous and doesn't help you.

"Hey! This is broken. It doesn't do X, Y, or Z. Please make sure to check code thoroughly (refer to $DOCUMENT) before committing." is direct, tells people what's wrong, and isn't hostile. People will be offended by it, but those people can be made to understand that they are being given useful direct advice.


Agree. I *hate it when I receive ambiguous criticism, which just means that we'll need to dance around each other while I try to figure out exactly what "looks a little funny".

Getting specific details - instructions or guidance even - is far better to solving the problem efficiently.


The feeling of being offended by such a message diminishes the more it happens, the more you fix and prevent the behaviour, and when you see your role models make similar mistakes, which has a tendency to humanize them.


If you're wired anything like a normal human being, you'd observe the effect saying it actually had and you'd stop behaving that way. So think of your current situation as having skipped ahead without the additional damage of a hands-on learning process.


Haha, yeah. Honestly, being nice in code reviews, half the time the person just argues for half a dozen comments or never addresses the issue, even if it's completely obvious like two methods doing the same thing but with different names. Oh, well, if we have to be nice and not get things done or suffer some idiot code getting in, we have to be nice.


Both are really not the response you want to give, but the one you gave probably would be less problematic and, if said coder was paying attention, might get the right response. Code reviews with folks who cannot take a hint were always the least fun experience. I was a TA during college, so at least I had some training. I often think seniors should have to do a formal code review with freshman just to get the vibe.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: