19

I have a question on Stack Overflow that I really want to improve. I want to make it as good as possible, and figured I'd ask for some guideline.

I'm asking a question about and am trying to only include the relevant code to solve the problem.

Here are a few of the things I've already tried:

  • Trimming code I believe is not necessary to answer the question. For the code, I removed all declarations of variables and all app.use statements. I also removed the console.error code.
  • Improved the formatting so it's easier to read.
  • Added a comment looking for suggestions.
  • I've also followed this style guide.

I want to contribute excellent questions and am looking for some tips. Any suggestions are greatly appreciated.

I am a new user and want to become a good one. I'm willing to work hard for it.

1
  • If the code works, and you edit the post to make it appropriate for the format, it may be on-topic on Code Review (but, please read the CR FAQ first)
    – cat
    Commented Feb 12, 2016 at 17:28

1 Answer 1

31

You have a lot of code there. I wouldn't expect most of that to be necessary to reproduce your problem. Remove as much of it as you can while still having an example that reproduces your problem.

Then with your explanation, remove as much as you can get away with. If it's not giving me useful information that I would need to create an answer, omit it. Also make a point of having the most important information, and your main problem statement, as early in the question as possible. I shouldn't have to read the whole thing to know what your core problem is. Your problem should be clear from the first few sentences, with the rest just being "the nitty gritty details" that it takes to actually write a full solution.

2

You must log in to answer this question.

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