Currently, the FAQ provides the following guidelines:

Code Review - Stack Exchange is for sharing code from projects you are working on for peer review. You should only ask practical, answerable questions based on actual problems that you face.

As far as I can tell, Project Euler problems are allowed, as well as homework. This is somewhat surprising by the following definitions, as most of these questions pertain to problems that have already been solved, and people want feedback on their solutions (which I think is perfectly acceptable). According to the answer to this question, Code Katas are fine, too. What about code written to understand concepts, or meant as an example in a book?

Would it make sense to reformulate the FAQ to extend to any code that does something useful or provide some useful functions, as opposed to just showing off language features/design patterns/etc.?

This may be a duplicate, although I think it is broader. In particular, if it is not possible/desired to change the FAQ, could some examples of things that are definitely fine, and of things that are questionable, be given?

  • \$\begingroup\$ My interpretation of "projects you are working on" in this case is fairly broad. Basically if it is intended to run and serve a purpose beyond the question itself (including training/educational purposes) then it's fine. \$\endgroup\$ – Brian Reichle Jan 13 '12 at 8:10

Your examples would be on-topic here. As I see it, they definitely fit both requirements. The code is for "practical, answerable questions based on actual problems that you face" - for example, helping you understand a concept. Say you're learning about encryption and write a public/private key generator. In that case, the code demonstrates your knowledge of the algorithm, and getting feedback on it can only help.

Your other example of sample code for a book also is on-topic for similar reasons. the code was written to teach, and the poster needs to know if it is suitable for that purpose. Is it correct, first of all? It it clear and stripped down to the minimum needed to demonstrate the desired concept? These are all questions that can be answered well by peer review.


You must log in to answer this question.

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