# Is asking a question about doing something a different way on topic here?

I recently asked a question on StackOverflow and eventually ended up self answering it. The solution I came up with is, in my eyes, a bit of a hack.

Is a question asking for a different/better way of doing the same thing on topic here?

EDIT: This is the original question on stack overflow.

• So you want your code to be improved right? And you think the solution you are using is bad, and would like a review of it? – Peilonrayz May 10 '16 at 11:35
• @JoeWallis not necessarily the design, more a different way of doing it. I.e. don'y use foo use bar – TheLethalCoder May 10 '16 at 11:37
• You may want to add the stack overflow question to this question. I'll also write a quick answer. – Peilonrayz May 10 '16 at 11:44
• @JoeWallis I usually don't do that as some people complain about trying to draw attention to it but shall do – TheLethalCoder May 10 '16 at 11:46

## Yes, but...

Code Review is indeed a site for doing the same thing in a better way, however... The code you are showing should not be "examplish" if you post it here. I noticed in your Stack Overflow question you had SomeMethod();, this could make your question be close at Code Review because of being "example or hypothetical code".

In your Stack Overflow question you also had a very specific question: Does anyone know why the code is slower when I comment out the calls to Console.WriteLine?

While good Code Review questions are often of the form:

• How can I make this code faster?
• How can I make this code more readable?
• How is this code? Is it good? Is it bad? What can I improve?
• Is there a way to avoid all these nested if statements?
• The code that is necessary for the answer is however the ThreadingPriority stuff and the problem, as far as I can tell, is not always reproducible on different machines. Therefore wouldn't it be okay with just the relevant pieces and pseudo code? Also would the question Is there an alternative to setting the Threading Priority? be acceptable? – TheLethalCoder May 10 '16 at 12:15
• @TheLethalCoder Avoid pseudo code. You don't need to include all the code to make everything compile, but you shouldn't change your method names and variable names etc. when you prepare your Code Review question. About if the question is acceptible, it might be - it is hard to say beforehand. – Simon Forsberg May 10 '16 at 14:58
• Okay I'll probably avoid it because I doubt it'll be on topic but thanks for the help anyway. – TheLethalCoder May 10 '16 at 15:21