One of the most frequent reasons I vote to close a question is if it is a request for code where the user has not made any effort at all.
Would it be helpful to offer that as a reason for closing?
Perhaps as an off-topic - "Stack Overflow is not a place to request code" or something similar?
The reason I am suggesting it is that it may help the original poster understand why their question was closed more quickly, as well as alerting others that they shouldn't bother requesting code.