8
\$\begingroup\$

There has been discussion recently, about how lots of Stack Overflow users carelessly refer OP over here (CR) whenever the question roughly looks like a wall of code and OP is asking for help nailing down a specific bug.

Currently our help/on-topic words it as follows (emphasis mine), under a large-font "What topics can I ask about here?" heading:

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.

This works, if you read carefully the page's content and actually care whether you're about to ask a question that is off-topic.

But you have to somewhat dig it up. People don't read, they skim through ...if they check out the Help Center at all.

\$\endgroup\$
9
\$\begingroup\$

I think part of the problem is that people that only take a quick look at the page will find "Trouble-shooting, debugging, or understanding code snippets" under a bold heading that says "What topics can I ask about here?".

I suggest we change it to something more... explicit. Something like this:


What topics can I ask about here?

Code Review Stack Exchange is for sharing code from projects you are working on for peer review. 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!

What's off-topic on this site?

Code Review Stack Exchange is not a debugging service. If your question is 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.

Quick Checklist

Confused? Simply ask yourself the following questions:

  • Does my question contain code? (Please include the code in the question, not a link to it)
  • Did I write that code?
  • Is it actual code from a project rather than pseudo-code or example code?
  • Do I want the code to be good code, (i.e. not code-golfing, obfuscation, or similar)
  • To the best of my knowledge, does the code work?
  • Do I want feedback about any or all facets of the code?

If you answered yes to all the above questions, your question is on-topic for Code Review.

(followed by the rest of the current content)

\$\endgroup\$
  • \$\begingroup\$ +1 I think this would be a great improvement over what we currently have. It's simple and to the point. \$\endgroup\$ – jliv902 Apr 23 '14 at 13:51
4
\$\begingroup\$

Proposed update

The following is a proposed rewrite of the Help/on-topic page. Consider it to be a discussion topic... 'Rubber Duck'


Code Review is a Stack Exchange site for sharing code from projects you are working on for peer review. Code reviews are an important practice in a healthy software development process. A fresh set of eyes on your code can help to:

  • challenge assumptions and identify edge cases that may cause failures
  • verify that the code will do what it is designed to do
  • identify ways that the code can be improved, whether it is performance, readability, maintainability, security, or conformity to expected/common/best practices

Code Review is a distinct part of the larger Stack Exchange ecosystem, and specifically, Code Review does not overlap with either Programmers or Stack Overflow:

  • Programmers: My code is not written yet, and I don't know how to best design it
  • Stack Overflow: I know what my code is supposed to do, but it is not working as expected
  • Code Review: My code works fine, as far as I know, but I would like to improve it

If you have…

  1. the actual code included in your question (not only as a link to some other site)
  2. and the code is your own code (you wrote it or you maintain it)
  3. which works (to the best of your knowledge)
  4. is in a real system (the code is not hypothetical)
  5. and you want to improve your code (not obfuscate or 'golf' it)
  6. and you want feedback on any facet of the code (not just those things you may list as being concerned about)

… then this is the right place to ask your question!

For help on structuring your question to get the most from Code Review, see the How To Ask page.

Sometimes it helps to see "What types of questions should I avoid asking?"

If your question is off-topic for Code Review, it may be on-topic for another Stack Exchange site. If no site currently exists that will accept your question, you may commit to or propose a new site at Area51, the place where new Stack Exchange communities are democratically created.

\$\endgroup\$
  • \$\begingroup\$ Very good: much better than the original. I suggest: the 2nd sentence i.e. "Code reviews ... development system." could be striked; the 3rd numbered item i.e. "which works" could be qualified e.g. "which works correctly"; the first unordered list items could have initial capital letters. \$\endgroup\$ – ChrisW Apr 16 '14 at 8:34
  • \$\begingroup\$ Based on this comment perhaps ad a link to the tagged faq topics. \$\endgroup\$ – ChrisW Apr 18 '14 at 16:54
3
\$\begingroup\$

Affirmative statements are both easier to understand and more helpful than prohibitions. With that in mind, I think we could improve our off-topic list by simultaneously tackling Confused between posting on Code Review, Software Engineering, or Stack Overflow. Stack Overflow has a similar list of referrals.

What's off-topic on this site?

Code Review is not a debugging service. Questions about these subjects are off-topic for this site:

  • Tools, improving, or conducting code reviews (try Programmers)
  • Higher-level architecture and design of software systems (try Programmers)
  • How to add a feature (try Programmers)
  • How to fix a problem with your code (try Stack Overflow)
  • Trouble-shooting, debugging, or understanding code snippets (try Stack Overflow)

I've made this answer Community Wiki so that you can help improve the list above.

I've also taken this opportunity to fold in Revising or removing the "Best practices" topicality rule.

\$\endgroup\$
2
\$\begingroup\$

Perhaps SE employees can analyze how many people have questions closed:

  • After never having read the on-topic page
  • After reading the on-topic page

Little point in improving a page which people don't read.

On another forum I tried, instead, to maximize how informative the close reasons are (so that after a question is closed, the OP understands why). For example, here most of the detailed off-topic reasons (for example the close reason for this question) don't include a link to the help centre and/or FAQ topic which explains why the question is off-topic.

Jamal was able to post this top-level close reason which does link to the help centre, but IMO most users cannot (they have to choose one of the more detailed reasons, which don't link to the help centre).

\$\endgroup\$
0
\$\begingroup\$

Page Template

The following is a copy/paste of the markup used to create the Help page. If you want to experiment with changing things, you can do it here, or copy/paste the following in to a 'scratch' answer, etc.


Code Review Stack Exchange is for sharing code from projects you are working on for peer review. 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.

I'm confused! What questions are on-topic for this site?

Simply ask yourself the following questions. To be on-topic the answer must be yes to all questions:

  1. Does my question contain code? (Please include the code in the question, not a link to it)
  2. Did I write that code?
  3. Is it actual code from a project rather than pseudo-code or example code?
  4. Do I want the code to be good code, (i.e. not code-golfing, obfuscation, or similar)
  5. To the best of my knowledge, does the code work?
  6. Do I want feedback about any or all facets of the code?

If you answered yes to all the above questions, your question is on-topic for Code Review.

Make sure you include your code in your question

This site is for code reviews, which are hard to do when the code is behind a link somewhere out there on the internet. If you want a code review, you must post the relevant snippets of code in your question. It is fine to post a "see more" link (though, do be careful — very few reviewers will be willing to click through and read thousands of lines of your code), but the most important parts of the code must be placed directly in the question.

Reviewers may comment on any part of the code.

Feel free to call attention to specific areas you are concerned about (performance, formatting, etc). However, any aspect of the code posted is fair game for feedback and criticism.

What? Questions about code reviews are off topic?

Conducting code reviews is an important skill, much like any other programming discipline. These "whiteboard"-style questions are best asked on Programmers Stack Exchange.

For more help, see "What types of questions should I avoid asking?"

Please look around to see if your question has been asked before. It’s also OK to ask and answer your own question.

If your question is not specifically on-topic for Code Review Stack Exchange, it may be on topic for another Stack Exchange site. If no site currently exists that will accept your question, you may commit to or propose a new site at Area51, the place where new Stack Exchange communities are democratically created.

\$\endgroup\$

You must log in to answer this question.

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