TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Do you feel bad conducting code reviews?

2 点作者 sua_3000超过 7 年前
Lately I&#x27;ve been doing most of the code reviews on my team since I have the most experience with this part of the stack.<p>I can&#x27;t help but to feel bad when code comes back 2+ times, sometimes for logic, but mostly for stylistic deficiencies.<p>How do I get myself to not feel bad, for what I imagine must be a frustrating process for the devs on my team?

5 条评论

grayhatter超过 7 年前
I do sometimes feel bad when I do code reviews. But only when I find out after code was merged, that I missed something when I approved the changes.<p>The process is frustrating on the other side, when reviews come back 2-4 times. Only because &quot;I should be better than this!&quot; If there&#x27;s more than 2 rounds of comments on a pull&#x2F;merge&#x2F;patch, I&#x27;m upset that I didn&#x27;t catch the small things the first time around, and that (even though only on a very small level, I&#x27;m wasting the time of the reviewer). Otherwise I&#x27;m happy to explain why my way is better, or when it&#x27;s not. I learn something that makes me a better programmer, and the codebase gets better for it.<p>If the other devs on your team don&#x27;t like code review, perhaps they need an assignment that doesn&#x27;t require code review? Because if I&#x27;m reviewing your code and that bothers you... I&#x27;d be hard pressed to trust ANY of the code you write.<p>Also: If you find you&#x27;re wasting a lot of time for style, mandate a code formatter. Then if you have CI, create a separate job for code style, you can check that first before you even start to review code, it&#x27;ll save everyone time in the long run. Then, you&#x27;ll only have to comment on logic. Style is VERY important when doing code review, every 1&#x2F;1000th of a second I spend trying to parse the style conflicts takes away from the ability to notice an error in the code. If you&#x27;re concerned about security or performance at all, you don&#x27;t need additional overhead of having to read code through style errors.
评论 #15536375 未加载
27182818284超过 7 年前
It is a frustrating process and it goes both ways.<p>You need to give feedback correctly both in how and why.<p>The developers learn to accept the feedback, but it will be a more painful experience for them more because nobody likes their work critiqued. (This is something that I&#x27;ve found trained artists are very good at, as they&#x27;ve been giving and receiving critiques from both peers and instructors from the time they were freshmen)
andymoe超过 7 年前
Have your considered pairing with the other devs either full time or just once in a while to get on the same page? At one extreme you can just not do code reviews since you&#x27;re pairing and at the other you can just do a weekly tech retro with the team, agree to style etc and stop wasting cycles on it during code reviews. We do both but weekly retros are magic for this type of problem.
sidlls超过 7 年前
What do you mean by &quot;stylistic deficiencies?&quot; What fraction of the deficiencies is the coder equivalent of semantic quibbling (e.g. naming things or differences of opinion that have trivial impact on the code) versus something relevant?<p>Seems to me this is an opportunity for you as a senior developer to exercise some leadership: convene the team for a review and discussion about the style guides. The focus ought to be reinforcing alignment on the purpose of the guides, expectations about following them, and evaluating the items in them for relevance and importance.
rvizconde超过 7 年前
You shouldn&#x27;t feel bad if it&#x27;s part of your process and the code is not meeting the standards agreed upon.
评论 #15536383 未加载