Skip to main content
added 97 characters in body
Source Link
Barry
  • 301.1k
  • 1
  • 24
  • 38

Focusing strictly on code edits, I think the following are unequivocally OK:

  • fixing formatting / indentation / brace usage (especially for new users that end posting triple-spaced quadruple-indented code, or for people that have bizarre brace styles)
  • fixing obvious typos that in no way affect the question (i.e. the typo is not the problem, just prevents it from being a true MCVE)

I'm not sure anybody would really argue against those. Where there seems to be some issue is regarding edits of the kind that make the question better by making it more of an MCVE. This category includes anything from:

  • adding missing #includes (for questions unrelated to undefined symbols)
  • removing dozens to hundreds of lines of code to reproduce the problem more minimally
  • making obvious fixes of ill-formed/undefined behavior code that aren't related to the actual problem OP is asking about (e.g. void main(), or OP not having allocated a pointer before dereferencing it - where said pointer dereference is not related to the issue, etc.)

These all fall under the same umbrella and I think they're OK if you're sure you maintained the invariant of OP's original problem... and you're sure because you've verified by compiling/running the code and getting the identical compile error/runtime behavior. But I think they're only actually worth doing if they improve the quality of the question.

Turning a 400 line not-quite compiling, clearly-not-minimal example into a 15 line MCVE with all the right #includes and everything? Hell yea, edit! That significantly increases the upvote-worthiness of a question and makes it more likely that (a) the OP understands OP's own question better and (b) OP gets better, more focused answers. I love these edits and wish I could upvote them.

Turning a 25 line non-compiling example with void main() into a 24 line still-non-compiling example with int main()? I think the edit's fine and non-objectionable (the problem here has absolutely nothing to do with the return type of main() - invariant maintained), but it just isn't particularly significant. I still wouldn't upvote this question. May as well spend the time to actually make the code compile, or leave a comment about the invalidity of void main(), or pass. Probably worth it to have left a comment in the edit as to why that edit was made for OP's sake.

Focusing strictly on code edits, I think the following are unequivocally OK:

  • fixing formatting / indentation / brace usage (especially for new users that end posting triple-spaced quadruple-indented code, or for people that have bizarre brace styles)
  • fixing obvious typos that in no way affect the question (i.e. the typo is not the problem, just prevents it from being a true MCVE)

I'm not sure anybody would really argue against those. Where there seems to be some issue is regarding edits of the kind that make the question better by making it more of an MCVE. This category includes anything from:

  • adding missing #includes (for questions unrelated to undefined symbols)
  • removing dozens to hundreds of lines of code to reproduce the problem more minimally
  • making obvious fixes of ill-formed/undefined behavior code that aren't related to the actual problem OP is asking about (e.g. void main(), or OP not having allocated a pointer before dereferencing it - where said pointer dereference is not related to the issue, etc.)

These all fall under the same umbrella and I think they're OK if you're sure you maintained the invariant of OP's original problem... and you're sure because you've verified by compiling/running the code and getting the identical compile error/runtime behavior. But I think they're only actually worth doing if they improve the quality of the question.

Turning a 400 line not-quite compiling, clearly-not-minimal example into a 15 line MCVE with all the right #includes and everything? Hell yea, edit! That significantly increases the upvote-worthiness of a question and makes it more likely that (a) the OP understands OP's own question better and (b) OP gets better, more focused answers. I love these edits and wish I could upvote them.

Turning a 25 line non-compiling example with void main() into a 24 line still-non-compiling example with int main()? I think the edit's fine and non-objectionable (the problem here has absolutely nothing to do with the return type of main() - invariant maintained), but it just isn't particularly significant. I still wouldn't upvote this question. May as well spend the time to actually make the code compile, or leave a comment about the invalidity of void main(), or pass.

Focusing strictly on code edits, I think the following are unequivocally OK:

  • fixing formatting / indentation / brace usage (especially for new users that end posting triple-spaced quadruple-indented code, or for people that have bizarre brace styles)
  • fixing obvious typos that in no way affect the question (i.e. the typo is not the problem, just prevents it from being a true MCVE)

I'm not sure anybody would really argue against those. Where there seems to be some issue is regarding edits of the kind that make the question better by making it more of an MCVE. This category includes anything from:

  • adding missing #includes (for questions unrelated to undefined symbols)
  • removing dozens to hundreds of lines of code to reproduce the problem more minimally
  • making obvious fixes of ill-formed/undefined behavior code that aren't related to the actual problem OP is asking about (e.g. void main(), or OP not having allocated a pointer before dereferencing it - where said pointer dereference is not related to the issue, etc.)

These all fall under the same umbrella and I think they're OK if you're sure you maintained the invariant of OP's original problem... and you're sure because you've verified by compiling/running the code and getting the identical compile error/runtime behavior. But I think they're only actually worth doing if they improve the quality of the question.

Turning a 400 line not-quite compiling, clearly-not-minimal example into a 15 line MCVE with all the right #includes and everything? Hell yea, edit! That significantly increases the upvote-worthiness of a question and makes it more likely that (a) the OP understands OP's own question better and (b) OP gets better, more focused answers. I love these edits and wish I could upvote them.

Turning a 25 line non-compiling example with void main() into a 24 line still-non-compiling example with int main()? I think the edit's fine and non-objectionable (the problem here has absolutely nothing to do with the return type of main() - invariant maintained), but it just isn't particularly significant. I still wouldn't upvote this question. May as well spend the time to actually make the code compile, or leave a comment about the invalidity of void main(), or pass. Probably worth it to have left a comment in the edit as to why that edit was made for OP's sake.

Source Link
Barry
  • 301.1k
  • 1
  • 24
  • 38

Focusing strictly on code edits, I think the following are unequivocally OK:

  • fixing formatting / indentation / brace usage (especially for new users that end posting triple-spaced quadruple-indented code, or for people that have bizarre brace styles)
  • fixing obvious typos that in no way affect the question (i.e. the typo is not the problem, just prevents it from being a true MCVE)

I'm not sure anybody would really argue against those. Where there seems to be some issue is regarding edits of the kind that make the question better by making it more of an MCVE. This category includes anything from:

  • adding missing #includes (for questions unrelated to undefined symbols)
  • removing dozens to hundreds of lines of code to reproduce the problem more minimally
  • making obvious fixes of ill-formed/undefined behavior code that aren't related to the actual problem OP is asking about (e.g. void main(), or OP not having allocated a pointer before dereferencing it - where said pointer dereference is not related to the issue, etc.)

These all fall under the same umbrella and I think they're OK if you're sure you maintained the invariant of OP's original problem... and you're sure because you've verified by compiling/running the code and getting the identical compile error/runtime behavior. But I think they're only actually worth doing if they improve the quality of the question.

Turning a 400 line not-quite compiling, clearly-not-minimal example into a 15 line MCVE with all the right #includes and everything? Hell yea, edit! That significantly increases the upvote-worthiness of a question and makes it more likely that (a) the OP understands OP's own question better and (b) OP gets better, more focused answers. I love these edits and wish I could upvote them.

Turning a 25 line non-compiling example with void main() into a 24 line still-non-compiling example with int main()? I think the edit's fine and non-objectionable (the problem here has absolutely nothing to do with the return type of main() - invariant maintained), but it just isn't particularly significant. I still wouldn't upvote this question. May as well spend the time to actually make the code compile, or leave a comment about the invalidity of void main(), or pass.