In the Help Center, I read that general questions about code review are off topic. It also says that only working code questions are on topic. Does this mean I can't ask about my finished code that has an unexpected bug I can't find?

Resource for answerers perusal and laziness:

What topics can I ask about here?

Code Review Stack Exchange is a question and answer site for seeking peer review of your code. We're working together to improve the skills of programmers worldwide by taking working code and making it better.

If you are looking for feedback on a specific working piece of code from your project in the following areas…

  • Best practices and design pattern usage
  • Security issues
  • Performance
  • Correctness in unanticipated cases

then you are in the right place!

However, if your question is not about a particular piece of code and instead is a generally applicable question about…

  • Best practices in general (that is, it's okay to ask "Does this code follow common best practices?", but not "What is the best practice regarding X?")

  • Tools, improving, or conducting code reviews

  • How to add a feature to or solve a problem with your code

  • Trouble-shooting, debugging, or understanding code snippets

  • Higher-level architecture and design of software systems

then your question is off-topic for this site. (italicize mine, I italicized what I think is relevant, bold not mine)


2 Answers 2


There are two questions in your post. First, the title (keyword highlighting mine):

Are specific troubleshooting questions on topic?

Absolutely not. If you've identified a bug in your code and/or it's not working as intended and you're hoping to submit your code for peer review for us to say "well here's your bug!", your question will be closed.

If you can formulate a specific question about the specific problem you're having, and narrow down your bug to a minimal, complete, verifiable example, and give it a title that you would google up if you had the same problem, make your post specific to the problem, not specific to you - and you'll have a great time on Stack Overflow.

We don't do troubleshooting. If your code isn't doing what it was written to do yet, then it's not ready for a peer review.

Fix your code, make it work to the best of your knowledge - clean it up, refactor as needed, give it all the love you've got. And then put it up on Code Review. Tell us what it does, why you're doing X instead of Y, add screenshots, present us your code - and you'll have a great Code Review post.

The second question is more nuanced:

Does this mean I can't ask about my finished code that has an unexpected bug I can't find?

Not at all. The keyword here is unexpected.

As I said above:

Fix your code, make it work to the best of your knowledge

When you put your code up for review, it already does what it was written for. But you would like another set of eyes to take a look at tell you everything they see in that code of yours; you get tips for enhancing readability or performance, efficiency, etc.

If your code is ready to be peer reviewed, a reviewer pointing out a bug (it does happen) should come as a surprise - when you're posting, as far as you know the code works as it should and you aren't on a bug-hunt anymore, you're just looking to clean it up and/or make it more easily extensible or testable - ready to perhaps change how the code works, without changing what it's doing.


Does this mean I can't ask about my finished code that has an unexpected bug I can't find?

This is correct. We are dealing only with code that works like intended meaning code which has no known bugs and produces the expected results.

If you have fixed your code (found the bug) maybe with the help of some StackOverflow users you are welcome to post it here for review.


You must log in to answer this question.

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