We've had a lot of these recently, even a few today. I'll get straight to the point:
It's my opinion that any question that simply requests we write code for the asker, and that shows zero research effort, should be unilaterally put on hold (with a friendly request to post the code); whether that be by a single moderator, a band of 3k+ community members, or a combination.
Such questions are not considered appropriate on any Stack Exchange site that I've ever visited, and I believe we need to actively discourage them. For example, one of the custom close reasons on Stack Overflow is:
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results.
I don't see any reason for us not to use the same logic here, with questions that relate to code.
So what I'm asking is does any community member object to these questions being closed unilaterally?
If so, I'd be grateful if you could outline your reasons for the objection in your answer. I can't conceive of a valid reason to keep these questions open so if anyone disagrees I'd be genuinely interested in the thinking behind that opinion. There may well also be edge cases I've missed, which would be great to know about, but I'm confident we can still implement an overall policy while treating any edge cases with the respect they need.
If this question is well received (as in, the community want these types of questions to be closed), I propose that the above quoted close reason from Stack Overflow, or something very similar, become our first custom close reason. This would help to facilitate the closing of such questions quickly and easily, with an official reference to point to.
If it's not well received then at least we've made a conscious group decision to allow those kinds of questions, and we've got this meta post to provide as a reference if anyone wants to query it.
Thoughts?