Hacker News new | ask | show | jobs
by gampleman 1040 days ago
The question label is interesting, since I often ask questions in code review. However, the answer is only sometimes relevant in terms of just learning something. Someone else reading the code having a question is a signal that the code may not be as obvious as it should be and therefore should be changed (if only by replying to the question in the form of an added comment).

Of course sometimes the reviewer is just dumb/tired/distracted and a simple explanation is all that's needed....

2 comments

One use case for the question label is a bit of code that you're unfamiliar with, but which is commonly used by more experienced developers. That said, it can be a good primer for the author to update the code, add explanation, or use simpler code structures so the code becomes more obvious.

Like, "what does ??= mean? I've never seen it before" in modern JS. I've had to adjust to code like that for a bit because I've been doing JS since ES3/4 and may have missed some developments (or the general availability of those).

Experienced coders will understand this and often respond to a question with a code change rather than an answer. And junior coders pick it up quickly with mentoring.