My question was closed with a very vague reason. I'm a member on multiple Stack Exchange sites and haven't had issues before with creating a question.

If my question is off-topic I would say the title of the site is not very accurate.


Can someone tell me what is wrong with my question? I don't even know how to modify to be 'more' acceptable.


As the closure reason states, this is stub code. There are too many placeholders for this to be considered real, working code:

  • MyException — That sounds like a poor, nondescript choice of name for a class.
  • // Do stuff to verify it's a java file — What stuff, exactly?
  • // doc is parsed — No it's not. That function is a no-op.
  • "doing something like…" — We can't review "something like"; we review what is.

If you've implemented it, then show us the code you wrote. If you are still designing it, then the question is off-topic for Code Review.

Furthermore, the title of the question, "Proper interface implementation", is a sign that your question is off-topic. As stated in How do I ask a good question?,

The norm is to summarize the goal of the code in the title. Some typical titles are:

  • Project Euler 9: finding a Pythagorean triplet
  • Game of Life with a Swing UI
  • View controller for smoking cessation iOS app
  • Validating inputs for a vacation request form

If your code does not have a goal, then it is likely that your question contains hypothetical code, or that you are asking about best practices in general rather than for a review of your code. Such questions are off-topic for Code Review.

  • 1
    \$\begingroup\$ That's about my answer too, but, note that the "Implementations" are not implementations, because they don't "implement" the interface either. The code is hypothetical, not even trimmed-down real code. \$\endgroup\$
    – rolfl
    Jun 25 '15 at 17:57
  • \$\begingroup\$ My question isn't about a problem that I'm having but a "Best practices and design pattern usage" as stated in the site FAQ. The details of the class do not add clarity what I'm asking in my design related question. \$\endgroup\$ Jun 25 '15 at 17:58
  • \$\begingroup\$ @inquisitor So it's hypothetical code, then. That's off-topic here -- we deal in real code. \$\endgroup\$
    – Nic
    Jun 25 '15 at 17:58
  • \$\begingroup\$ What would be the purpose in adding the details of my code if I'm asking a design question? \$\endgroup\$ Jun 25 '15 at 17:59
  • 6
    \$\begingroup\$ @inquisitor The details of the class do add a lot of clarity. We have had issues several times in the past. When you do not post the exact code you are working with you leave a lot of guesswork for us. The problem is that Code Review questions are meant to be asked after you have designed and implemented your code, not before. It is Code Review, not Preview. \$\endgroup\$ Jun 25 '15 at 18:00
  • \$\begingroup\$ Look, the people who typically use this site are very intelligent and I think my question is very understandable. It's not a hard question to understand, and if you guys are being honest with yourself you would see that no value would be added to my particular question by adding the useless details of my code. It would simply clutter the question. \$\endgroup\$ Jun 25 '15 at 18:02
  • 2
    \$\begingroup\$ @inquisitor Code Review is not Stack Overflow. What Stack Overflow might consider "clutter", we often consider "context". Your question is perfectly readable and understandable, but unfortunately it is off-topic for this site in its present state. \$\endgroup\$ Jun 25 '15 at 18:05
  • 5
    \$\begingroup\$ @inquisitor - note the quote you have here: "Best practices and design pattern usage" - Code review is about the usage of the best practices, not the discussion of what the best practices are, or should be. Code Review is a past-tense place: How did I do?. It is not a future-tense place: What should I do? \$\endgroup\$
    – rolfl
    Jun 25 '15 at 18:08
  • \$\begingroup\$ @SimonAndréForsberg sure, but I wouldn't say that there was an objective reason for closing my question. My code is stub code because it's a very large project and the details of my code are useless given the context of the question. My guess is that there are just mods here that are eager to use their Internet powers whenever possible, but whatever. Thanks for your time. \$\endgroup\$ Jun 25 '15 at 18:08
  • 5
    \$\begingroup\$ @inquisitor Trust me, this is not about the mods being eager to use their internet powers. Mods here don't want to do that, they don't want to close off-topic questions, but they do close off-topic questions when they appear (they are just "doing their job"). It has been decided by the community that hypothetical code is off-topic for Code Review. See also Why is hypothetical code off-topic for Code Review? \$\endgroup\$ Jun 25 '15 at 18:10
  • \$\begingroup\$ @SimonAndréForsberg the rules should be reasonable and flexible. They shouldn't be applying the same rules to every question willy nilly, because every question is not the same. I'm not putting up 4k lines of code when I have a question about the overall design of my code for a specific use case. That makes no sense and is an unreasonable and silly request. \$\endgroup\$ Jun 25 '15 at 18:16
  • 1
    \$\begingroup\$ @inquisitor I feel like we could discuss this for a while, I would like to invite you to chat where we can discuss this further. In chat I can also be able to discuss your specific question and how I think you should approach it. \$\endgroup\$ Jun 25 '15 at 18:23
  • 2
    \$\begingroup\$ @inquisitor we tend to defer all design-related questions to Programmers.SE, assuming if it fits their on-topic questions as well. You might have a better chance over there for such questions. :) \$\endgroup\$
    – h.j.k.
    Jun 26 '15 at 8:21
  • \$\begingroup\$ Unfortunately the original question is gone now so I can't check if it'd meet our standards, but yes Programmers.SE is the place to go for a design-related question about hypothetical/stub/unfinished code. \$\endgroup\$
    – Ixrec
    Jun 27 '15 at 13:00

You must log in to answer this question.

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