15
\$\begingroup\$

On this site (code-review), the best questions sometimes contain the worst possible code. I'm not the only one who noticed this. On any other code-related SE site, questions with code that causes puppies to cry, and babies to cringe, down-voting is a good way of notifying other users to "not bother", given that the question is too broad, the OP did not put in any effort, or the code is just so terrible it can't be fixed.

But this site is about reviewing code. A bad question is either: off-topic (contains syntax errors, or is broken), or contains nothing but pristine code. The latter is unlikely to be down-voted. Quite the opposite: I think most of us would be thankful to see a piece of glistening code-perfection, and would upvote. Perhaps leaving a comment saying there's nothing to add to the code.

In the other case, the question will be closed quite quickly, and the poster will be notified that CR only deals with working code.

So how about up-votes? Well, on SO or programmersexchange, I can understand that asking a specific question about some specific coding-related difficulty is contributing to the site. And therefore, up-voting questions (and granting the asker reputation) makes sense. But people who get reputation for submitting code, so that we can review it don't really contribute to the system. They are getting their code reviewed, but they don't contribute much content in itself.

I know my wording is a tad harsh, but I hope you understand what I mean. Submitting code for review is not the easiest thing to do. Code-review can, and IMO should be harsh. Nonetheless, gaining rep for posting bad code isn't how the whole rep-privileges system should work. When I first became active on SO, I looked up to high-rep users, as people who knew their stuff. Someone with 3k rep, but who did not review any code, can draw on false authority when interacting with low-rep users. Sure, we can flag/contradict such comments, but that'll give the mods more work, and blow up the review queue's.

At first glance, I noticed that questions with verbose answers that reviewed the code in detail often end up getting a lot more up-votes that questions that weren't reviewed as extensively. Probably because users who stumbled on the question found the reviews helpful and wanted to thank both the reviewer and the poster for the info they got.

That means that, basically, the worse the code you submit for review, the more upvotes you'll get, and eventually: the more rep you gather.

In essence: I think down-voting questions is quite pointless, and up-voting questions with bad code because they got an extensive review is a bit "twisted". Users who post 10 pieces of bad code can end up with more rep than a user who reviewed 1 of those questions. In my mind, this is wrong: the person reviewing that one question is more deserving of reputation-related rewards.

So my suggestion is: do away with voting on questions entirely for this site, so that the only way to gain/loose rep is doing the actual work this site is about: reviewing code. Only by reviewing (= contributing), you can climb the privilege ladder.

\$\endgroup\$
5
  • \$\begingroup\$ "Submitting code for review is not the easiest thing to do." - is that really what you meant to write there? It doesn't seem to fit with what you said right before \$\endgroup\$ Aug 27, 2014 at 12:54
  • \$\begingroup\$ @SimonAndréForsberg: I wrote this question in a hurry, so there might be some contradictions in there. But basically: code-review can should be harsh, so there's a threshold in that respect. However: providing code to be reviewed does not make the site (CR) a valuable resource. The actual value comes from the reviewing of that code, not submitting it, that's what I was trying to get at \$\endgroup\$ Aug 27, 2014 at 13:17
  • 1
    \$\begingroup\$ I don't think code review should be "harsh", I think it should be informative, educational, and valuable in general. It's not hard to submit code for review... That's the easy part. CORRECTLY reviewing it is the hard part. It almost becomes an issue of, is this site based on "PEER" review, or just, "THIS IS WHY YOUR CODE SUCKS...".. IMVHO... Perhaps the question UP votes can be tied to the REVIEWERS as well as the OP. ? Yea / Neigh ? \$\endgroup\$
    – LarryF
    Aug 28, 2014 at 22:16
  • \$\begingroup\$ @LarryF: An honest review can boil down to telling the OP his/her code can't be salvaged. You have to be brutally honest, which can come across as being blunt, and if the OP is used to be nudged gently into the right direction, someone telling you you've really got things wrong in every conceivable way, can seem harsh to a newbie. There is a psychological threshold when first requesting a review... at least: I found it difficult at first \$\endgroup\$ Aug 29, 2014 at 6:45
  • 2
    \$\begingroup\$ "programmersexchange" giggles \$\endgroup\$
    – bjb568
    Sep 7, 2014 at 3:16

4 Answers 4

13
\$\begingroup\$

I agree with parts of the three current answers from @RubberDuck, @Simon André Forsberg, and @Pimgd. Which, if I can summarize... questions get voted on when:

  1. Horrible code - I disagree with this one. Horrible code does not get upvotes because it is horrible code. Horrible code tends to follow the Hot Question path though (see later).

  2. Interesting question/code - this is code that makes you think "cool!". I agree with this reason for upvotes, and I often tend to upvote questions that ring that particular bell.

  3. Well-structured question with good formatting and context. I agree with this reason too, and I actively upvote questions that make reviews easier. If the question asker makes the question easy to review, then they deserve the +1.

  4. Downvote crap - things that should be closed. I agree with this too, especially for people with rep to downvote, but not close-vote. Still, as a mod, when I have a binding close-vote, I use question down-votes to indicate those times where I really don't like the question.

  5. User retention - I do actively +1 questions from users with less than 15 rep, that ask questions that are 'decent' attempts (and for the weaker questions, I often edit them to improve them). Users with >15 rep can vote on other answers and questions, which helps everyone.

  6. Specific user voting and follow-on questions - When there are iterative reviews, or people who ask 'progressive' questions (successive Euler, challenge, or other 'competitive' questions), I tend to upvote if the code represents an improvement over previous versions/attempts - has the asker applied what was suggested before? Have they learned things? Are they repeatedly asking the same stuff and making the same mistakes, and having to be told the same stuff again, and again?

  7. Questions I answer - If I feel inclined to actually answer a question, I feel that part of the feedback should include the way the question was asked too. If it was a good enough question to answer, then it should either get an up vote or, if I answered it 'out of frustration', a down-vote. Alternatively, and edit to the question to improve it, etc. (and an upvote then too).

  8. Hot questions - when questions go 'hot', there is no telling what will happen with them. Some of them 'explode' with votes, answers, comments, spam, everything. All bets are off.

Hot questions revisited.

Hot questions skew all aspects of the behaviour of things. For a start, many people see the question, and many people who are not 'regulars' on Code Review will vote, answer, and comment just because they drive by, and see things.

Horrible questions, with absolutely abysmal code, often generate a couple of quick, short answers, and those answers often generate a couple of quick upvotes.

That crap code, with two quick answers, and a few quick upvotes is often enough to launch the question on to the hot question list. From there, it snowballs.

This is why horrible code often ends up highly voted.

\$\endgroup\$
3
  • \$\begingroup\$ All valid points, to which I'd add: "review requests that are covert 'refactor-this-code' questions should be down-voted, too". I added this to my question, but Jamal (rightfully) rejected this edit. If you add this to your answer, I'll mark it as accepted \$\endgroup\$ Aug 28, 2014 at 10:51
  • 1
    \$\begingroup\$ @EliasVanOotegem - I am uncertain whether that would be appropriate, especially since that exact concept is closely related to discussion in this question here: Help vs. Review \$\endgroup\$
    – rolfl
    Aug 28, 2014 at 11:00
  • \$\begingroup\$ I'm not 100% on that either... for example this question. It has the look and feel of a "refactor-this" question, but it could be down to the fact that the OP really doesn't know better/enough. Anyway, you're probably right, that's a different discussion to this one. \$\endgroup\$ Aug 28, 2014 at 11:04
12
\$\begingroup\$

That means that, basically, the worse the code you submit for review, the more upvotes you'll get, and eventually: the more rep you gather.

This is not always true. In many cases, good code also get plenty of upvotes (sorry for taking my own code as example).

I think there are three different kinds of questions that get massive up-votes:

  1. Horrible code, this really needs to be improved ASAP!

    Example: Finding words of different lengths given six letters

  2. Interesting/Useful code/question, this needs to be paid attention to!

    Example: Tool for creating CodeReview questions, Using a for-loop instead of sleeping?

  3. Good code/question. Nicely written and provides good context of what the code does / how it all fits together

    Example: SudokuSharp Solver with advanced features

Ultimately, I think up-votes on a question should indicate: This question provides good context or this question is worth reviewing.

What is also worth to remember is that when a question hits the hot network list, it tends to draw a lot of attention from other sites which creates questions that are much higher voted than the normal question around here.

Questions with a lot of up-votes tend to have answers with a lot of up-votes, which is a good thing.

In my mind, this is wrong: the person reviewing that one question is more deserving of reputation-related rewards.

This I agree with. Which is why each up-vote on a question is only worth 5 points instead of 10. However, with enough questions you can gain a lot of reputation even if the average individual question isn't very highly voted.

Personally, the more questions someone has asked (without also reviewing), the less I tend to up-vote their questions.

In the end, what Code Review needs the most to survive as a good and useful site, are reviewers and not askers.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ +1, you make a couple of good points. I'll digest them after work... :) \$\endgroup\$ Aug 27, 2014 at 13:29
  • 6
    \$\begingroup\$ You linked it twice, you're not that sorry ;) \$\endgroup\$ Aug 27, 2014 at 17:09
7
\$\begingroup\$

Questions that get more views get more votes, naturally.

They might not always be good... Derpifying Images

I upvote questions that have interesting problems or interesting solutions.

I don't upvote many of JavaDeveloper's questions; it's mostly the same code over and over and over and OVER and OVERRRR that I've stopped upvoting those.

(Side note: If I see the segment final int left = 2 * i + 1; final int right = 2 * i + 2; I lose interest real quick because I know it's the same piece of code AGAIN.)

As for downvoting, I only do that when a question should get closed. Which is how I voted down 13 times but there's only 1 downvote on a question that's not deleted yet.

I don't know for what other things I'd downvote a question. Maybe if it DEMANDS REVIEWS NOW. But I guess that would get edited out anyway.

\$\endgroup\$
7
\$\begingroup\$
  1. The same as any other SE site, voting on questions helps separate the good questions from the bad. On this site, it usually means separating the well formed and interesting questions from the the malformed and uninteresting ones.
  2. User Retention. It feels good to get imaginary internet points upvotes. We're still in beta, so keeping users coming back is extremely important to us. If their good questions get upvotes, they feel good, have a positive experience, and come back. Maybe the next time they come back, they will answer a question too.
  3. Voting on questions generate reputation. Without reputation, we will not have many users with sufficient privileges to self moderate the site.

So, should we stop voting on questions? Absolutely NOT. The voting system is at the core of what makes an SE site work.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ On point 1: Yes, but define a good question on code review: is it a question containing so many problems that there's a lot to review, or is it a question that is asking to review an algorithm used, or is it a question containing nice code? Point 2: I agree, user retention is important, rep helps to draw in new users. Point 3: Yes, but getting back to point 1: if the user systematically posts bad code, he ends up with privileges but without contributing anything substantial (ie reviews) \$\endgroup\$ Aug 27, 2014 at 13:24
  • 2
    \$\begingroup\$ @EliasVanOotegem concerning your point 1: It's not about the code / what can be reviewed, but whether the question is written in a nice way. Is there enough explanation, can you see the structure and thought behind the code in the question, is there a good explanation, ... \$\endgroup\$
    – Vogel612
    Aug 27, 2014 at 13:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .