Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 153 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I wanted to suggest an edit for an answer given to php array_combine only if keys match, but it was denied because "Edits must be at least 6 characters."

However, given the edit I was suggesting is very important to the syntax of the solution, I think it is relevant even though it contains only 3 characters. See the answer posted by knittl and notice the variable $value is used as both function input and in the foreach loop. I simply suggested changing the function parameter's name to $values in the 3 locations it is used, but was denied, leaving the post incorrect.

Note: I do realize I could have suggested an entirely different variable name thus allowing the edit, but similar situations have arisen in the past where a simple fix of just a few characters make a significant difference. After all, Stack Overflow is a coding website and syntax is very important.

share|improve this question
Never change the code in the question! Do not correct typos, indentation or anything else, please. If you fix by mistake the error many people will waste their time without knowing why. And if you fix anything else along the way, you might obscure other problems and errors as well. Only the OP should edit his/her code. – Time Traveling Bobby Nov 15 '11 at 15:04
@Asylum well indentation is fine to fix, but actual code is not. – amanaP lanaC A nalP A naM A Nov 15 '11 at 15:29
@AManAPlanACanalPanama: Python, anyone? Additionally, we should also be able to see the style of the code, to advice on that, too. – Time Traveling Bobby Nov 15 '11 at 15:36
While I support fixing obvious errors in code in answers, I don't think we should reduce the minimum number of characters to make an edit. In this special case, just leave a comment. – meagar Nov 15 '11 at 18:28
It is nice to see that trying to learn about the site so I can contribute more gets me a -6 (so far). Nowhere in the FAQ does it say this is the standard behavior. Apparently the community as a collective chose that as a standard, and that is fine, I understand and will carry on in that fashion, but how is anybody supposed to learn if they get bombarded when asking a simple question? I will think twice before asking another question in attempts to learn more about the site. Notice I did chose discussion and not feature-request – steveo225 Nov 15 '11 at 18:43
Downvotes on meta indicate disagreement with the question's premise, not that you asked a bad question. – Robert Harvey Nov 15 '11 at 19:26
Nowhere in the FAQ does it say this is the standard behavior. If you refer to the downvotes, than it is in the FAQ. – Time Traveling Bobby Nov 15 '11 at 22:28
The OP here is talking about changing an answer not a question as the +10 upvoted comment suggests. It makes sense not to change code in a question, but in an answer it's different. rm -rf . /* oops I meant rm-rf ./* sorry, you typed that? I think it's helpful to fix obvious errors rather than rely on a stream of comments. – artfulrobot Jun 17 '15 at 11:05

That is the OP's code.

Why would you change his/her code just to make it so you can read it better?

Suggest in the comments, don't change code...

share|improve this answer
You didn't pay attention to my discussion. The answer provided uses the same variable name to represent 2 different variables. The solution will not work as the first variable will get overwritten. My edit was suggesting the variable name is changed for one of them to avoid collisions. Even still, that doesn't even remotely address the problem I suggested when an answer has a small syntax error that needs corrected for the code to be valid. – steveo225 Nov 15 '11 at 14:24
@steveo225 hence, comment, and the poster will change it. – amanaP lanaC A nalP A naM A Nov 15 '11 at 14:25
@steveo225: leave a comment in that case. Let the OP correct his code. You can even downvote if the code is really wrong or dangerous. – Mat Nov 15 '11 at 14:26
What is the point of editing then? The answer is perfectly valid, except for a small syntax error. Why tell him to change it if I possess the knowledge and ability (except for the 6 character restriction in this case). – steveo225 Nov 15 '11 at 14:50
@steveo225 edits are to edit errors. not code. – amanaP lanaC A nalP A naM A Nov 15 '11 at 14:51
So by that logic, code can't have errors? – steveo225 Nov 15 '11 at 14:55
This doesn't seem logical. If I post a comment, the answer may get fixed by the poster in which case my comment is now irrelevant, if they don't fix the code, it is wrong for all other users that may have the same problem and may not see all the comments. – steveo225 Nov 15 '11 at 15:03
The purpose is for the OP to learn from his [potential] mistakes (as well as others), learning from the answers and comments provided. Editing his code teaches him nothing, he may not even notice it. – Jack Nov 15 '11 at 15:05
It is not the OP's code. That isn't how SO works. Editing the code in an answer is perfectly acceptable. While I agree that, in this case, a comment was appropriate, your answer happens to be right for all the wrong reasons. It has nothing to do with "changing his/her code just to make it so you can read it better". It's about fixing obvious errors in an answer and making it more useful for future users. – meagar Nov 15 '11 at 18:29
@meagar thank you. I just wanted to figure out (as somebody reasonably new to the site) why this was the way it was. I never expected such a backlash. I know on occasion moderators have fixed obvious mistakes in my code, and I was thankful. – steveo225 Nov 15 '11 at 18:47
Generally speaking, you shouldn't change someone else's code unless you are sure that the change is correct and necessary, and that the change doesn't affect the meaning or intent of the original code. – Robert Harvey Nov 15 '11 at 19:30

You must log in to answer this question.

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