-10

I just had an edit rejected, and one of the reviewers seemed to say that the point of the question was whether or not the syntax was correct. I don't even begin to agree. This question is clearly NOT about syntax. The poster was clearly very lazy while typing in, but I felt that a few folks appeared to be keying off of the syntax issues and not addressing the actual question. To help the poster and eliminate the noise I opted to clean up the syntax in his code.

Another reviewer claimed that my edit was incorrect, but in fact I checked it and ran it in my ide.

Another reviewer approved it.

And of course one said "changes too much/changes intent"

Really?? Does anyone honestly think that this post was asking "what's the right syntax"?

https://stackoverflow.com/review/suggested-edits/2401107

Obviously, one shouldn't fix syntax in a "why won't this compile" question, or another question where the syntax is germain, but surely fixing bad syntax isn't prohibited when it's neither the point of the question nor the source of the problem? I suspect the reviewers didn't read the whole question.

8
  • 13
    Fixing the OP's code is not a good idea. That changes the whole meaning of the question.
    – ɥʇǝS
    Jun 28, 2013 at 0:44
  • 1
    You don't change someone else's code. If you want to correct it, do it in an answer, as an aside, or in a comment.
    – Daedalus
    Jun 28, 2013 at 0:45
  • did you read the question at hand and my edits?
    – Gus
    Jun 28, 2013 at 0:45
  • 1
    The lack of syntax could only detract from the actual question in this case
    – Gus
    Jun 28, 2013 at 0:46
  • 3
    Of course I did, whether you are correct in the edits or not is not the issue here.. I don't think the post is asking about syntax, but changing the code is a no here.
    – Daedalus
    Jun 28, 2013 at 0:46
  • If that's actually a hard policy I feel it should be in the faq
    – Gus
    Jun 28, 2013 at 0:47
  • 14
    "Is this a correct approach to convert ByteBuffer to String in this way" is very much asking whether or not the code is correct - both from a best-practice standpoint, and whether or not it actually works properly. Say "No!" to changing code.
    – user98085
    Jun 28, 2013 at 0:52
  • 3
    After all this debate I asked the OP what he thought. He made the edits and thanked me. So clearly, it is possible to have positive input relative to code, but the community wants posters to retain control over their own code. Hence I accept that this rejection is within current community standards, and propose this feature: meta.stackexchange.com/questions/186419/alternate-edit-workflow
    – Gus
    Jun 28, 2013 at 4:32

2 Answers 2

7

If the poster can't be bothered to properly copy/paste code for their question, it's their fault. If they're too lazy to put effort into properly asking the question, too bad. I understand the need to be kind to new posters, but if it's not worth enough effort from them to actually post their code in a question, it's definitely not worth my time to try and answer it when the time could be spent helping someone else who has put in that effort.

This is different from an issue with English not being their first language and syntax or grammar issues with the question text; this is code, where syntax and phrasing has to be accurate in order to compile at all.

Posting String k = new String("abcd"); when it should be String k = "abcd"; is not being "very lazy while typing in" - it's more keystrokes, so it's not laziness. Fixing the code is just wrong. Comment on it and ask the poster to fix it, vote to close the question until it's edited, or post an answer to the question. Don't edit the code.

20
  • 3
    I tend to prioritize getting clear questions and answers on this site that will be useful to the poster, not distract or mislead the potential answerers, and be useful for future visitors. I'm generally not interested in 'punishing' the poster's laziness or ignorance that is irrelevant to the question. The point of community edits is to make the site better.
    – Gus
    Jun 28, 2013 at 2:16
  • 1
    There's no "punishment" intended, but there certainly shouldn't be a reward for not putting effort into your question when you're asking for free help. And I clearly reviewed the question before posting this answer, because I quoted it; the point of your edit was to intent of the question. "Is this a correct approach?" when you edit "this approach" clearly alters the meaning. The question "Is spelling 'burd' when you mean 'bird' OK?" clearly changes if you correct the spelling of 'burd' to 'bird' in the question.
    – Ken White
    Jun 28, 2013 at 2:21
  • So you believe the question was about syntax? Sure looked like it was about technique to me... in short "why are they going to all that extra effort"
    – Gus
    Jun 28, 2013 at 2:23
  • No. :-) Read my edited last comment. I phrased it differently. It's about the approach (which you changed entirely from what was posted).
    – Ken White
    Jun 28, 2013 at 2:24
  • So adding "abcd" in place of new String("abcd") changes the approach? Do you program java? The former and the latter only differ in that the latter produces a load on the garbage collector, and the former does not. The question is not about garbage collection at all.
    – Gus
    Jun 28, 2013 at 2:27
  • I don't "program Java", and it makes no difference whether I do or not, any more than a moderator has to be knowledgeable about everything in order to moderate. The question is about whether a reviewer should change code in the question. I didn't say it was about garbage collection. I said you should not edit the poster's code. :-) Even if you have some sort of intuition that lets you guess what was in their mind instead of what they actually asked. :-)
    – Ken White
    Jun 28, 2013 at 2:36
  • Not intuition. Knowledge of the Java programing language. There's a difference. And when I get to approve/reject edits I will pass on judging an edit to code in a language I don't know, even if that means it takes a little longer to earn a badge.
    – Gus
    Jun 28, 2013 at 2:40
  • 1
    Great. You know Java. So that lets you know what the poster knows, too? And judge what they meant to post instead of what they actually posted? It has nothing to do with badges, or rep, or anything else except making the presumption that you know better than the person who asked the question what they meant to type. Hopefully by the time you get to approve/reject edits, you'll understand the difference and make the correct choices. And if you don't, edits can always be rolled back. :-)
    – Ken White
    Jun 28, 2013 at 2:46
  • My changes: 1) adding omitted semicolons, 2) Alternate but equivalent string construction, 3) Adding the System.out. in front of the print methods for identifying the result of the equals() statement. Which of those seems possibly intentional and Germain to the question? (I doubt it matters because clearly you and many others favor "rules of thumb" over actually understanding the question and the edit). I guess now I know
    – Gus
    Jun 28, 2013 at 2:52
  • 1
    If the code is wrong, that's part of the problem. If it isn't wrong, it doesn't need editing in the first place. Either way, don't edit the code. There's a difference between editing to remove unnecessary code (code that isn't relevant to the question) and editing to change code that is relevant, and you did the latter. The question was about that specific code, and you changed that specific code.
    – Ken White
    Jun 28, 2013 at 2:54
  • And which of those three things was relevant to the question, and how?
    – Gus
    Jun 28, 2013 at 2:56
  • 2
    You're too stuck on the same point, and not seeing the big picture. If I ask you specifically if i = i + 1 is the same as i +=1, and you change the question to whether i = i + 1 is the same as i++, even though they end up having the same value for i, the intent of the question is totally different. All of those things is relevant, because YOU didn't ask the question. It's not up to you as a reviewer to decide if the posted code in the question is optimal and choose to rewrite it if it isn't to your liking; if you want to do that, post it as an answer instead.
    – Ken White
    Jun 28, 2013 at 3:01
  • Except that your analogy is nothing like what i did and nothing I did would in any way answer the question! And you are dodging my question. Also an acceptable answer making the key point about encoding had already been posted.
    – Gus
    Jun 28, 2013 at 3:01
  • 2
    I give up, since apparently you're not willing to consider any other viewpoint other than the one you have now. My analogy is precisely what you did; you changed the entire syntax used in the code for absolutely no reason other than you thought it could be written differently, and IMO (and the opinion of the majority of posters at SO) you should not do so. You asked, and we told you you were wrong, and that the edit should have been rejected. You should learn from that for future use, and if you don't, approved edits can always be rolled back. I'm done here; questions on SO need attention. :)
    – Ken White
    Jun 28, 2013 at 3:07
  • 3
    Once again, you're not listening. :-) It's not your place as a reviewer to decide whether the code posted is to your liking or not, and change it to suit your whims. The question was based on the code posted, and you changed it. If the issue is that it won't compile, post an answer that corrects it. Otherwise, leave it alone. You're reviewing questions, not acting as code reviewer to determine if the poster used the optimal code. It's exactly the example I posted regarding i++-you made a judgement you don't have the right to make as a reviewer. Last word is yours. I'm done here.
    – Ken White
    Jun 28, 2013 at 3:23
4

I don't feel I can accept the answer that takes a pejorative "too bad for them" tone towards the user, so I'll write this one. If you don't want to help you won't edit, you'll just downvote with no comment and so the entire point is lost with that attitude. This all came about because I wanted to help a user who seemed to have a valid question but was getting downvotes, and I want SO to be as nice and well edited as possible.

After reading around a bit, I ran across this: https://meta.stackexchange.com/a/157687/179031 and it made me think a bit. There are a large number of programming languages, and most of us are fluent in 1-5 of them. Most of the time reviewers are looking at code they don't have the expertise to judge. (well demonstrated by the discussion around new String("abcd") vs "abcd" on the other answer). Until something like the answer I linked is implemented, it's just too difficult to judge code relate changes accurately enough. Without expert knowledge of the programing language it's difficult to determine if an edit changes the question, is an answer or is just simple cleanup. By way of contrast, most reviewers have working knowledge of English, and are fit to judge whether or not the meaning of the question is being changed when edits are made to the text around the code.

With that in mind it seems that the answer to my question is, that the edit is correctly rejected because there is a blanket policy against editing code. That policy is in place because even though there are possible cases where such edits could be beneficial, code edits are dangerous (I've never disagreed with that, and I don't usually do it anyway despite what some seem to assume), and too hard to administer (which I hadn't thought about).

You must log in to answer this question.

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