Sometimes we see questions are about write code for me. The question does not show efforts.
We should downvote it, and leave comments to notify the author to improve their question, sure. But should we answer it if we happen to have the knowledge?
Sometimes we see questions are about write code for me. The question does not show efforts.
We should downvote it, and leave comments to notify the author to improve their question, sure. But should we answer it if we happen to have the knowledge?
No, you shouldn't be explicitly writing code for someone. Part of the posting rules/guidelines states that you should at least provide some code to show why the problem is occurring and what you've already tried.
Not all questions benefit from including code. But if your problem is with code you've written, you should include some. But don't just copy in your entire program! Not only is this likely to get you in trouble if you're posting your employer's code, it likely includes a lot of irrelevant details that readers will need to ignore when trying to reproduce the problem. Here are some guidelines:
- Include just enough code to allow others to reproduce the problem. For help with this, read How to create a Minimal, Complete, and Verifiable example.
- If it is possible to create a live example of the problem that you can link to (for example, on http://sqlfiddle.com/ or http://jsbin.com/) then do so - but also include the code in your question itself. Not everyone can access external sites, and the links may break over time.
Rewriting code so it works though, that should be fine.
That way we're providing meaningful help to solve a question without doing all of the work first. Once we know what the person asking is after and that they've tried X and it doesn't work, then we can write the code so that it now does work.