I am relatively new to Code Review, so I don't know if this Stack Exchange site suffers particularly from counter-productive interaction by negatively critical senior users but I'm certainly seeing it with the last question I asked.

I asked a question, 3 days ago, about how best to structure PHP arrays:

What's the best way to tidy up a PHP array with both indexed entries and associative entries?

Over the course of the first two days, lots of positive interaction:

  • the question attracted one upvote and three answers
  • two out of three of those answers received upvotes
  • one of the three answers was then accepted

So far, so positive. This looks to me like a Stack Exchange site working exactly as it is supposed to.

Since then (and I stress, since I accepted one of the three answers):

  • the question has been argued with
  • the question has been closed
  • the question has been downvoted (it now has a negative score)

It is really no wonder, is it, that Stack Exchange struggles to make new users feel welcome? This feels exactly like a bunch of clique-identifying bullies with a petty sense of ego-driven ownership ganging up to maintain the conservative norms of "their Stack Exchange site."

The question enquired as to how a PHP array with mixed-type entries ought to be structured and how it could be restructured most efficiently.

In my question, I gave my perspective on an improved structure and gave my working code on how to get to that improved structure.

Those who answered my question responded to the question intelligently and thoughtfully. At the point where I accepted one of those answers, everything was done and dusted, I thought.

And yet we have people who come along subsequently, and have nothing better to do with their time than to interact negatively and cause nothing but needless trouble. Why?

I have had to explicitly point out that in the Help Center FAQ for Code Review, users are recommended to ask about "Application of best practices and design pattern usage".

This was a - pretty elementary - question about the best practices of structuring arrays in PHP.

Perhaps when a question asking for code to be reviewed is asked, reviewed, improved, answered several times, the answers are good and one answer is good enough to be accepted, perhaps (just maybe?) that's not a textbook example of question to start picking holes in?

Perhaps, instead, those who are picking holes are doing so because it doesn't fit their partisan view of what Code Review should look like because something as elementary to them as array structure is something everyone should have learned at school ages ago, and it never crosses their mind that some (many?) users here are not from a formal programming background and are asking these sorts of questions because they consider it important to get basic building blocks right?

  • 3
    \$\begingroup\$ I can't quite parse "the point" of this question here. Could you elaborate on what exactly your problem is, preferrably without ascribing motivations to third parties? From what I can tell, your question was initially voted to close two days ago and the closure process was ongoing until four hours ago (at time of writing). Would you have felt better if the question had been closed faster? Or are you confused that people sometimes disagree on the on-topicness of a question? I personally think that the question as it is is not a good question for code review, but that's just my opinion... \$\endgroup\$
    – Vogel612
    Mar 2, 2020 at 15:35
  • \$\begingroup\$ My proposal is that a question which has been posted, upvoted, answered several times and had an answer accepted is not a good candidate to be closed by others who consider themselves to know better than all those who have positively engaged with the question. There are lots of questions I don't much like on Stack Overflow, but if I cannot interact positively with a question I move on until I find a question with which I can. I don't go around trying to close questions and certainly not when they have been upvoted, received multiple answers and accepted an answer. \$\endgroup\$
    – Rounin
    Mar 2, 2020 at 15:49
  • \$\begingroup\$ In answer to your question: I would have felt better if those capable of interacting with the question positively had done so (which indeed they did, and I am very grateful to them for doing so) and those incapable of interacting with the question positively had concluded the question was not one for them. \$\endgroup\$
    – Rounin
    Mar 2, 2020 at 15:52
  • \$\begingroup\$ For clarification, any votes to close have taken place since an answer to the question was accepted. This means that individuals who have never at any point attempted to engage positively with the question have nevertheless sought to have the question shut down, even though it has already completed its journey from being conceived, to being articulated, to being answered to accepting an answer. Pretty hostile behaviour on the whole - and for shame if those engaging in it cannot see it. \$\endgroup\$
    – Rounin
    Mar 2, 2020 at 17:34
  • \$\begingroup\$ The original question now has two downvotes and the meta question above has one downvote. This is precisely what I am referring to as: Negative engagement, ganging up, question closing, downvoting. \$\endgroup\$
    – Rounin
    Mar 2, 2020 at 17:47
  • 6
    \$\begingroup\$ Someone may not like being dubbed "clique-identifying bullies with a petty sense of ego-driven ownership ganging up to maintain the conservative norms of "their Stack Exchange site.", when all they're trying to do is help you get your post into shape and conforming to what the site is actually about. I understand your frustration and sympathize with your situation and we can all hash out what happened and why and how to avoid it going forward (FWIW, accepting off-topic questions is not on the table), but bashing on the very people that are trying to help isn't going to get you many upvotes. \$\endgroup\$ Mar 2, 2020 at 18:03
  • \$\begingroup\$ The people trying to help were the two who answered my question. I value their help and I very much appreciate it. The people who have some misplaced idea that their sense of custodianship legitimates objectionable behaviour towards new users ought, perhaps, take a long look in the mirror. I maintain that it is inappropriate to declare open season on & shoot down questions which have received multiple answers and which have already accepted an answer. Such aspects alone ought to be sufficient to demonstrate that the post was in shape and that it does conform to what the site is actually about. \$\endgroup\$
    – Rounin
    Mar 2, 2020 at 18:26
  • \$\begingroup\$ I'm suggesting that it would be better if some users didn't regard their opinions as more authoritative than those of others. I'd speculate - and I'd be delighted to be proven wrong here - that the 3 people who positively engaged (myself and the two others who answered) are not from a formal programming background, whereas all the downvoters & close-voters are. If my speculation is correct, then I would like to remind those from a formal programming background that they do not own Stack Overflow / Code Review etc. and it's really not their place to make such sites "their personal club". [1/2] \$\endgroup\$
    – Rounin
    Mar 2, 2020 at 18:36
  • \$\begingroup\$ Stack Exchange sites are for those who are not from a formal programming background, too. Sometimes such informally trained members might ask something as elementary as how to restructure an array in PHP. This shouldn't be a particularly big deal. [2/2] \$\endgroup\$
    – Rounin
    Mar 2, 2020 at 18:36
  • 2
    \$\begingroup\$ This isn't about "us vs them" - I don't have a formal CS background either... it's about what we've agreed as a community was on-topic here, and what wasn't. Maybe the help center needs to be clearer, but nobody cares that restructuring arrays is or isn't "elementary" - everyone was once a beginner and nobody has a problem with reviewing trivial code. We do care however, that CR posts present code to be peer reviewed, not ask about solving specific coding issues - that's SO's territory. Now maybe you don't care that CR isn't SO, but that's another problem. \$\endgroup\$ Mar 2, 2020 at 18:43
  • 2
    \$\begingroup\$ Since joining Code Review, whenever I have a programming question, I do my best to consider as carefully as possible whether to ask it here or at Stack Overflow. If I have written a piece of code but I am in doubt as to whether it conforms to contemporary best practice coding conventions, I will present it here for peer review. This is what I sought to do in the question referenced above. \$\endgroup\$
    – Rounin
    Mar 2, 2020 at 18:45
  • 1
    \$\begingroup\$ It can absolutely be not-so-obvious, and the site regulars are always here to help (here on meta, and in Code Review Chat) - bear in mind that these are the very same people you come off ranting about and name-calling here though ;-) \$\endgroup\$ Mar 2, 2020 at 18:51
  • \$\begingroup\$ Let us continue this discussion in chat. \$\endgroup\$ Mar 2, 2020 at 19:04

2 Answers 2


There's a gigantic disconnect here.

I would have felt better if those capable of interacting with the question positively had done so (which indeed they did, and I am very grateful to them for doing so) and those incapable of interacting with the question positively had concluded the question was not one for them.

Seems you define "positive interaction" as, basically, an answer - any answer - whether or not that's actually reviewing your code (as your own posted answer demonstrates).

I understand where you're coming from, really, I do. You have a question, you ask one, there's a way to read it in such a way that it's defensibly within the site's scope, and when two less-experienced users come looking for low-hanging fruits to score a quick upvote with, post an answer, and there, see, these users bring positive energy, these users understand!

Why don't the more experienced users then? Why are they telling you to fix your post? There can't possibly be anything wrong with it, see, it got answers!

That's part of the problem: the fact that a question can even have a single canonical answer (which when you're learning is, indeed, very helpful) on this site is a red flag, and while it's helping you in one way (you get what you came here for), it's also hurting you in the following way: these answers have effectively "frozen" your post in a bad state, as fixing the post will now very likely invalidate the answers, and answer-invalidating edits routinely get rolled back, because the last thing we want is for readers to work out which answer speaks to which particular specific revision of the original post: letting that happen quickly turns everything into an undecypherable mess, and I'm sure we can all agree that nobody wants any of that to happen.

New contributors posting their first answer here might have an understanding of the site similar to the one you came here with, and put up what you would think is a very helpful piece of advice or a snippet of code that solves your specific problem. That's great, but this isn't what Code Review means to be.

In a nutshell, a good CR post (note I avoid the term "question") presents a piece of code with as much context as possible, walks reviewers through it, maybe it raises questions about the design, the algorithm, the performance, security, or any other aspect of it - and reviewers are free to post "answers" that cover any/all aspects of the code, whether or not the concern is expressed in the question - and that's how you could get a reviewer pointing out a bug, an edge case, a performance issue, a language opportunity, or anything else, that you didn't even know about when you posted the question: it's precisely what makes CR such an amazing learning resource.

The counterpart of this, is that you can't "narrow down" a piece of code to one specific concern, strip it of its context, make the identifier names meaningless or otherwise irrelevant, and then ask about that one concept, showing a code snippet that merely serves illustrative purposes, that isn't really the actual subject matter of the post: to be clear, this is what your post reads like, and why it was closed.

Site regulars aren't here to argue; they aren't here to judge your skills (or lack thereof, if applicable); all they want to do is review working code, and in order to do that and make it easier for everyone else that wants to be reviewing code, the SE system gives us downvotes as a tool: at -4 net score, a question no longer shows up on the site's home page, which leaves room for one more post that is on-topic (I see no reason to downvote anything beyond -4, and at -4 all you need is +1 to counter all the deducted reputation points, so this isn't about rep scores either). It's not about policing people, nor about picking holes in answered questions. Close votes are another tool the SE system gives its more experienced users, those that are (usually) deemed more familiar with the site's scope, and trusted to vote accordingly. Not one single (non-moderator) user's opinion can get a question closed: others need to agree, too. Posts that get put "on hold" can't be answered by less-experienced users, and that is a good thing, because it prevents the "stuck between a rock and a hard place" situation your post is currently in... when it happens swiftly enough.

The regulars here were just trying to make sure your next post was well-received, because objectively speaking, that one wasn't, and everyone here wants you to get the best out of this site.

Letting it slide on the basis that "oh well, it's answered" wouldn't have been helpful either, because you wouldn't have come here to enquire about what was wrong with the post, and then the next post might not have been as lucky.

Additional resources:

  • 1
    \$\begingroup\$ Thank you for all your contributions today, @Mathieu. And for this excellent and comprehensive answer. +1 \$\endgroup\$
    – Rounin
    Mar 2, 2020 at 21:39
  • 3
    \$\begingroup\$ @Rounin thank you - I really hope you come to realize that close votes are a necessity, and that the "gatekeepers" aren't here to keep anyone from getting their answers. Sites have rules and yes, sometimes they're blurry and grey-area questions happen, and we do tend to lean on the "keep it open" side of the fence. In this particular case, there is no fence and I will defend every user in this community that cast a close or "keep closed" vote. Again I'm sorry this has been your CR experience thus far and hope to see you around some time soon with a well-received post. \$\endgroup\$ Mar 2, 2020 at 21:45

If I may add to a subject that looks closed-ish, there is one thing that might help you understand the nature of what happened.

Under one of the two answers you have on your post, you left this comment (emphasis mine) :

My apologies, I didn't make it sufficiently clear which part of my question was the Code to Review. I have edited the question to indicate it much more clearly. To restate my two questions: 1) Is a hybrid associative / indexed array a bad idea; and 2) what is the best approach to transform the former into a "non-mixed" associative (or even an indexed) array? – Rounin Feb 27 at 23:38

What happened here is that someone took time to post a review to your code and lost their time because there wasn't enough context in the post to understand what was the object of the review. It isn't so bad now because it's a small answer, but imagine a scenario where a user takes 30-45 minutes to write a deep review of a post, only to be told "you didn't review the right thing because I wasn't clear".

People who downvoted/VTCd the post didn't do it out of spite and certainly not because they knew the answer to your problem. The post was closed because there wasn't enough context for people to give a good review.

This happens often and the objective of closing the question is to give you time to add context on your post so that people taking time to write answers to help you out don't lose their time doing it.

Most of the time, closing a post is an invitation to fix it so it fits the scope of the site. You may not agree with the fact that the site needs a scope, but if this scope wasn't there, the number of posts not asking for review or posting a piece of code without context would be too high.

What you should need to take out of this is that a closed post isn't a dead post or a bad one, especially when the OP takes time to try and fix things.

  • \$\begingroup\$ Yes, some very good points. Thanks. +1 Re: "Most of the time, closing a post is an invitation to fix it so it fits the scope of the site." I now understand and accept this to be the case, but I'd tentatively submit that - perhaps due to the verb "close" which has an air of finality to it - I have never understood (in 5 years of being an active member of Stack Exchange) that a closed question was anything other than a sub-standard, rejected question. I have never fixed any of my questions after I was told they were closed - I proceeded on the basis that they were already rejected. \$\endgroup\$
    – Rounin
    Mar 3, 2020 at 20:26
  • 3
    \$\begingroup\$ @Rounin I agree with this sentiment regarding the negative feeling of the verb "close". But I assure you that we're doing a pretty good job on re-opening posts when they look good and usually it doesn't take a lot of work from the OP :) \$\endgroup\$
    – IEatBagels
    Mar 3, 2020 at 20:28
  • 1
    \$\begingroup\$ "imagine a scenario where a user takes 30-45 minutes to write a deep review of a post, only to be told "you didn't review the right thing because I wasn't clear" Yes, that's an entirely fair point. I'll take it on board. Although it is also the case - and I have experienced this directly more than a dozen times over at Stack Overflow - that I may spend a substantial amount of time (10-20 mins) putting together an answer... and then I am unable to submit that answer because others have closed the question I was answering. This is pretty much the same outcome. \$\endgroup\$
    – Rounin
    Mar 3, 2020 at 20:29
  • \$\begingroup\$ there wasn't enough context for people to give a good review - I think this comes back to my main problem with the question being closed. To my mind, there absolutely was enough context for people to review the code. All I wanted to do was restructure an array. That was it. Literally nothing more. I got the impression that other members wanted me to be asking for more than that. But I wasn't. That was all I was asking for. I felt the code I'd written to restructure the array lacked elegance and I wanted to submit it to peer review and learn how to improve it. \$\endgroup\$
    – Rounin
    Mar 3, 2020 at 20:34

You must log in to answer this question.

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