Absolutely not.
Encouraging incomplete answers can easily be mistaken for encouraging answers that just point out a single problem in a snippet of code that is littered with potential issues. This might have the OP believe that their code is acceptable, and that they just have to do some minor tweaking. That's not what Code Review is about.
Incomplete answers can lead to question sniping. Something most Stack Overflow users are all too familiar with. A question is asked, a couple of users rush in to post a 2 sentence answer, and update it in bursts. Nothing wrong with that, you might say, but it does reduce the chance of thorough, well written, more comprehensive and possibly more interesting answers being posted.
If I spend 20 minutes reviewing code, and then I see someone has posted a review, I'll go ahead, finish my answer and post it anyway. If I start explaining what I would change and why, but after 5 minutes there have been 10 answers posted, I'll probably click discard and not bother.
Short answers can breed lazy readers. If the incomplete (and most likely short) answer becomes the norm, we're at risk of attracting users who are looking for a quick tip on how to proceed. We're guiding developers, rather than reviewing their code. This is not what Code Review is about. The more comprehensive answers might be skipped by the OP and these new users all together, and a lot of hard work might go by unrewarded. This would be a shame, IMHO
A short answer with a list of things that are wrong with the code, and links to previous answers or wiki pages to provide background are perfectly fine. Some would encourage these answers, and I can understand why, but I feel as though these answers are only worthy of an up-vote if the critiques apply to the code as a whole. A simple example:
int main ( void )
{
int some_int = 123;
size_t sizeOfVar = sizeof some_int;
}
void my_function(int *foo);
int myFunction();
If an answer were to point out that the naming is problematic because the OP is mixing camelCased names in with under_scored names and the names my_function
and myFunction
uncommunicative , then that's fine: it applies to all of the code.
Another issue could be that of return types (void
might not be ideal depending on what my_function
does, and main
doesn't return). In fact, just looking at these few lines of pseudo code, I can think of a lot of things to say.
But an answer saying nothing more than:
You forgot to return 0;
from the main function, and you should check for invalid pointers in my_function
.
Is short, but, IMO, not valid. it's a comment. A valid comment, but not a code review, and therefore not an answer.