2
\$\begingroup\$

I'm new to the code review site (but not to SE in general). I posted my first question in earnest after reading the "about" page and noting that code must be working.

The code I posted worked locally, but the entire program is thousands of lines long, the part that needed some TLC was maybe 20 lines long, so I tried to reduce down to that. An answer was given that also suggested I rename the variables to something more reable and a comment was posted saying that without more code and some way to testing it with data it would be difficult to help. My first thought was to scrap the question and start over, so I tried to do that - I've never deleted a post before so I edited the question to request a delete, that was the wrong move and I understand why now (on the mobile version I couldn't find the "request moderator intervention" until someone pointed me in that direction). I then decided to make changes to all the names of the variables and remove lines that don't effect the flow or logic of the code (lines that could be in a different location and are only in the same location for ease, they have little to no effect on the code speed - I profiled to check). This change was also rolled back with the threat that the question be locked if I do it again.

Now first my general experience on SE is that you improve a low quality question rather than reposting. Secondly I found the whole process a little hostile. Both edits I made were called vandalism, in both cases I was trying to do the correct thing, in the second case is was advised by the answer and comments!

I've not linked my former question here because this isn't about me complaining (ok, a little) it's about me understanding. Am I just supposed to leave the question and is, without edits, even if an answer wont help me? Even if comments say a useful answer isn't possible in the current state?

I guess to sum up: on code review do we not improve questions based on other users comments?

\$\endgroup\$
11
  • 3
    \$\begingroup\$ "Secondly I found the whole process a little hostile." What exactly did you find hostile? so we can improve and not be as hostile in the future. Do you find "vandalize" to be hostile? How could we convey the same information and not be hostile? \$\endgroup\$
    – Peilonrayz Mod
    Jan 26, 2020 at 15:20
  • 1
    \$\begingroup\$ I sympathise completely. Matches my experience entirely. There are hardly any genuine users on this site. Hardly anyone asking questions. Hardly anyone writing answers. But for every one of those few users there are at least 10 "police", who are ready to jump in telling you "how you are doing it wrong" or other mostly unhelpful comments. I have been active here for about 2 months. Already a "top3 contributor" apparently (LOL). All chiefs and no Indians. I have pointed this out several times already. Community has "issues"? \$\endgroup\$ Jan 26, 2020 at 15:25
  • 1
    \$\begingroup\$ Love the way your post has already been "typo checked" (with almost entirely meaningless changes) codereview.meta.stackexchange.com/posts/9434/revisions Kind of proves my point. Entire focus is on "moderating / correcting / blocking" content. So much so, that there is no actual content left. Don't get me wrong, there are a few very good people here, who genuinely know their stuff and try to give helpful answer. Unfortunately my impression is that the majority are "gatekeepers with rattling keyrings". I have started to use other sites more. This one needs to take a good look at itself. \$\endgroup\$ Jan 26, 2020 at 15:39
  • \$\begingroup\$ @Peilonrayz as a new site user a better method of policing the changes to code would be to advise the user on how to reach their goal - the 'why' they make the change, rather than just blanket undoing a change. It felt as though there's one correct way and everything else gets reverted. Not saying this is the case, just how it felt as a new site users. \$\endgroup\$ Jan 26, 2020 at 15:51
  • 1
    \$\begingroup\$ We have rules, site-scope and a FAQ. Unfortunately the network doesn't provide you with those in a helpful manner before you ask your question. It would save both new users and us regulars a lot of frustration. \$\endgroup\$
    – Mast Mod
    Jan 26, 2020 at 15:56
  • 2
    \$\begingroup\$ @user6916458 I'm confused as I told you how to reach your goal - as you have stated in your question "until someone pointed me in that direction". And the other user has explained how to move forward too. We didn't "just" undo the change. \$\endgroup\$
    – Peilonrayz Mod
    Jan 26, 2020 at 15:56
  • \$\begingroup\$ @Peilonrayz regardless it felt hostile. Also the second change I made was for readability, not a change to the logic of the code, that wouldn't seem to omit the current answer from making sense. \$\endgroup\$ Jan 26, 2020 at 16:12
  • 1
    \$\begingroup\$ @user6916458 remember that variable names are also an integral part of the code that can be (and oftentimes has been) reviewed. Changing the names of variables can invalidate an answer the same way that replacing a loop with an API call can. \$\endgroup\$
    – Vogel612
    Jan 26, 2020 at 22:38
  • \$\begingroup\$ @Vogel you are ofcourse correct. But if the answer currently submitted doesn't deal with specific variable names it seems overly prescriptive to say I can't change them. I changed them because it was suggested I do so. \$\endgroup\$ Jan 27, 2020 at 0:30
  • \$\begingroup\$ @OliverSchönrock For multiple reasons many previous regulars asking&answering activity has declined significantly recently (myself included). The users you call gatekeepers probably once used to be the ones that were providing most of the answers on this site. I have always tried to encourage others to post good comments when doing moderation-work, sadly it's hard to force people to keep posting good and friendly comments. There's a lot of things I want to have said here, but chat is probably better. Please join me in The 2nd Monitor \$\endgroup\$ Feb 1, 2020 at 16:57
  • \$\begingroup\$ @SimonForsberg My thinking has moved on a bit, and I have articulated my thoughts here: codereview.meta.stackexchange.com/q/9437/212940 If you would like have a look at that and comment there, I think that would be more constructive? \$\endgroup\$ Feb 1, 2020 at 17:07

1 Answer 1

7
\$\begingroup\$

There is a difference between improving a question and improving the code presented in the question that's important here.

On Code Review the whole point is to improve the code. But to do so, answers must remain understandable for readers, which in turn has implications for what is allowed when editing questions.

In general Code Review also wants to have great questions, it's just that as soon as there's an answer reviewing the code in the question, that code must remain unchanged to avoid making the answer look weird.

Improving questions (and not the code in them) is supposed to work basically the same as on other Stack Exchange sites. The core difference is that editing the code inside a question is only allowed when no answers have mentioned things about the code yet. As a rule of thumb: You can edit however you like so long as there is no answers. If there are answers, you must not edit the code, but are allowed to edit everything that's not code.

A question with bad code is not a bad question and it's important to separate these two to understand the policies on Code Review.

\$\endgroup\$
4
  • \$\begingroup\$ I think you've probably hit the nail on the head here. It's a good rule to follow, a little unfortunate when the changes don't effect the goal of the question (eg. Speed up this nested loop, and I rename variables). Is there a limit on reposting of the 'same' code with modifications? \$\endgroup\$ Jan 26, 2020 at 14:48
  • \$\begingroup\$ @user6916458 Theoretically? Not really. Practically? Posting more often than once a day with the 'same' (improved) code would probably be a bad idea. Please keep in mind the network is run by volunteers. \$\endgroup\$
    – Mast Mod
    Jan 26, 2020 at 15:58
  • 2
    \$\begingroup\$ @Mast It almost feels like SE doesn't quite have the functionality for this type of site. \$\endgroup\$ Jan 26, 2020 at 19:31
  • 2
    \$\begingroup\$ @user6916458 Code Review is a bit of an odd site on the Q&A network, that's absolutely right. Still, we work with what we got. \$\endgroup\$
    – Mast Mod
    Jan 26, 2020 at 20:43

You must log in to answer this question.

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