I've got several pieces of code that I think are clever little things to do, but I'd love to see feedback from people with exponentially more experience coding than I've got. Is it appropriate to post requests for such feedback on SO?

If it is, would it be acceptable to post such questions as non-community wikis?

EDIT: Note, I've read a similar question here: https://stackoverflow.com/questions/99283/is-it-useful-to-post-questions-i-already-know-the-answer-to-on-stack-overflow

But I believe this has a slightly different nuance to it.

Clarification: By "piece of code", I mean anything from a single line, to a method, or even a class, but definitely not an entire project.

  • I'm all for posting it, but what's a non-community wiki?
    – RedFilter
    Dec 17, 2008 at 19:40
  • I think he's asking if it's ok to post code for review and still get the rep points for it. Dec 17, 2008 at 19:43
  • @Kristo: That's right.
    – Daniel Schaffer
    Dec 17, 2008 at 19:45
  • 1
    If what you post sparks good programming discussion then you have accomplished the site's goals and you deserve rep for it IMO.
    – EBGreen
    Dec 17, 2008 at 19:53

7 Answers 7


These types of questions should asked on http://codereview.stackexchange.com

Code Review - Stack Exchange is for sharing code from projects you are working on for peer review. If you are looking for specific feedback about…

  • Code correctness
  • Best practices and design pattern usage in your code
  • Application UI
  • Security issues in a code snippet, etc.
  • The performance of your code

and your question is not about …

  • Tools, best practices, improving, or conducting code reviews
  • Trouble-shooting, debugging, or understanding code snippets
  • Higher-level architecture and design of software systems

… then you are in the right place!


I say go for it.

One caveat though - do not post it as:

"I've got this code, what do you think about it?"

Instead, phrase it where it would be useful to other people. More like:

"What is the best way to accomplish [your objective]. I've tried this way, are there others?"

That way other people trying to accomplish the same goal will be able to find your post.

For the Community Wiki part of your question - my opinion is these questions add value to the site; someone wanting to know how to do what you are asking will get great value out of them. So why should you not get credit for it? And why should those answering the questions get no credit either. So I say do not make them Community Wikis.

The Community Wiki would be more for those questions that are too subjective, or are not really programming.

  • 1
    +1: The "my code is cool" is annoying. Get your own blog on blogspot to bask in your cleverness. If you don't have a specific thing that's broken, don't post it here.
    – S.Lott
    Dec 17, 2008 at 19:45

I don't see any problem with it in general. There are the usual things, of course, which will make such questions better:

  • Keep the title and tags informative, to aid searching later.
  • Keep the sample short and focused, to avoid 100+ comments on everything from the algorithm's correctness to the brace style.
  • Something additional, which would make this list have three bullets, and hence improve this answer's style.

I would say "Yes", but with qualifications. I don't think the community would react well to a question which consists entirely of a block of code and the question:

Hey, what do you all think of this? Is it clever or what?

In particular, ask about:

  • Is this the most efficient algorithm for this task? (Describe the task)
  • Is there a standard pattern or (better yet) a library that will do this?
  • Are there any obvious shortcomings or bugs that I have missed for my use cases? (Describe your use cases)

Some things you can ask but expect differing answers. Try to give context so as not to be too subjective and argumentative when asking about things like naming conventions, indentation and bracing style, etc.

The more specific and less subjective you can be, the better.


There is a big difference between your question and the old one - it almost seems like you're asking for code review instead of posing pop quizzes. Since this is a community-run site, I don't think there's anything inherently wrong with it until you start ignoring the vox populi.

Try posting a couple of pieces of code, but be specific that you're asking for code review, not showing off your code, and if people seem to dislike the fact you're getting free code reviews, then you might consider stopping.


I would think so, what better way to get code reviewed by people.


well sure. Its good to know/ask if what you are doing has any flaws, perks, what alternative ways people may do it and why. With coding there are usually many different ways to accomplish the same thing - some work better than others of course.. but even further, some work better than others in particular instances - its good to know what your peers or more experienced developers think and could be very informative for making decisions on how you code.

You must log in to answer this question.

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