5

I have a problem related to strings in Java, and I have a solution to it. Now I want to know how to improve on it (suggestions for a better data structure to use for this problem, etc.).

Is it acceptable to ask these types of questions on Stack Overflow? If so, do you have any suggestions on what tags to use? If not, do you know of any other place where questions like this would be welcome?

2

2 Answers 2

5

StackOverlow or CodeReview would be options depending on actual question.

  • If you have code that works, but it does not meet your goals (i.e. performance, or using particular library/feature that not viable in your case) - StackOverflow is right place. You will need to clearly specify what improvement you are looking for.

    Posting such code on CodeReview would be likely acceptable, but you can't expect suggestions to solve your problem.

  • If your code works and you just want style/data structure opinions - CodeReview would be the right choice.

    Posting such code on StackOverflow should endup with "unclear what you are asking" or "too broad" in most cases. It may be somewhat on-topic if original code is outrageously wrong (i.e. bubble sort for finding max element in array), but you'd probably weed out such options while writing code/verifying it.

  • If you feel that problem is somewhat broader than code - Programmers or maybe even Computer Science could be right place. These sites are unlikely to be good fit if you already have code that works and meets your goals. Sample problem could be implementing grammar parser of some sort.

Detailed guide - https://codereview.meta.stackexchange.com/questions/5777/a-guide-to-code-review-for-stack-overflow-users.

-16

StackOverflow is the best place to go for anything to do with code.

1
  • 1
    Not if this is how to improve working code, in that case Code Review may be better.
    – greg-449
    Commented Dec 20, 2015 at 8:34

You must log in to answer this question.

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