I'd like to improve my question-asking, as my only two questions (question 1 and question 2) were poorly received. I really put effort into those questions, and I believe I followed all the guidelines on the "How to ask a good question" help page, so I'm here seeking more advice.
Help Page Guidelines
- Search, and research.
- In question 1, I mentioned that I tried to search for similar questions, but the question itself is hard to describe, and I still don't know how I'd search for it. I also state what approach I am aware of ("where classes register themselves with other classes") and why I think it doesn't solve my problem.
- In question 2, evidence of research is prominent in the first sentence, as I cite an existing question and state how my question differs. I also show my current attempt, which illustrates two approaches I've tried (
cls.cast(o2)
and reflection).
- Write a title that summarizes the specific problem.
- Question 1 is titled "Design pattern for managing groups of tasks". This describes what I want and what it's for. I admit that "managing groups of tasks" is not the best description of the design pattern, but since I don't know the appropriate design, the best I can do is describe my objective.
- Question 2 is titled "Java reflection to call overloaded method Area.equals(Area)". This succinctly describes what I want, using a technique that I think is relevant. Or maybe I shouldn't have prescribed the solution in my question? The commenters seem to think that reflection is overkill.
- Introduce the problem before you post any code.
- Question 1 begins by describing the use-case for my requested design pattern, giving context as to the number of tasks and my goals, before code is introduced.
- Question 2 begins by summarizing the origins the problem (that
Area
overloads instead of overridingObject.equals(Object)
) and what my goal is (to callArea.equals(Area)
), before giving my attempt in code.
- Help others reproduce the problem.
- Question 1 doesn't have a problem to "reproduce" because I'm asking for design advice. Nevertheless, I provide code that compiles (minus some ellipses) that illustrates my intent.
- Question 2 provides commented code that compiles and runs, to illustrate what I've tried, what works, and what doesn't. Yet, there's a close vote for not providing a MCVE.
- Include all relevant tags.
- Question 1 is about a
design pattern
inJava
. I can't think of other relevant tags, although as a new user I'm also not very familiar with all of them. - Question 2 is about using
reflection
to force calling a particularequals
implementation inJava
, and again I don't know what else to add.
- Question 1 is about a
- Proof-read before posting!
- Yes, I have proofread. Several times.
- Post the question and respond to feedback.
- I promptly responded to answers and questions in both cases.
- In question 2, after I realized that commenters were missing some details, I edited the question (twice).
- Look for help asking for help.
- That's why I'm here.
Other Common Pitfalls
- The XY problem.
- I think I avoided this in question 1 by describing my use-case.
- I don't think I have the XY problem in question 2, but I have the impression that the commenters believe I do.
- Questions that are too broad.
- Question 1 is broad by necessity because I'm asking for design advice. I don't think it's too broad because I've provided my specific context and constraints. To reduce the broadness of my question, I included an ordered list of "desirable properties" to help answerers evaluate different options.
- Question 2 isn't broad at all -- I have a specific situation and I want to obtain a specific behavior.
- Formatting.
- I spent a lot of time making sure that the questions are presentable.
Possible Issues
Here are some possible issues that I'm aware of:
- Question 1 might not be described in a crystal clear manner. The question was hard to write because I wanted to remain open to design options that I hadn't considered, so I didn't want to be too specific about my current approach. However, I did my best to illustrate what I know and what I need.
- In question 1, I didn't explicitly say what was "silly and error-prone" with my last code block. In particular, I didn't want a hardcoded list of classes anywhere, which was maybe not clear.
- Question 1 could be read as "I have a problem with a bunch of detailed criteria, someone solve this for me." Even though I described an initial "silly" approach, I can see how the question could still be read in this way, and I'm not sure how to avoid this.
- Question 2 required a couple edits to improve clarity.
- Question 2 is basically asking "is there a better way than the 'heavy-handed' approach I just described", and it appears that the answer is "no". That makes answering difficult and the question not-so-useful for future visitors, but how was I supposed to know that before asking?
- I'm a new user, and when I posted these questions I had single-digit reputation. I've worked hard to answer questions the last few days to improve any "first impressions". (That was a learning process in itself, as I got plenty of downvotes!)
And after scrutinizing my questions I feel like I'm grading an English-class essay. I hope I don't need to apply the same scrutiny to my future questions, since that's probably not the ideal mindset for someone posting questions on a site for that purpose. It's also somewhat disheartening to see other positively-voted questions that I perceive to be less polished, or maybe I'm just being arrogant.
Thanks for helping me become a better question asker. And if there are issues with this question please let me know as well.
Phew, that was a long post
shows that despite your extensive efforts, you still haven't quite got it. You are very close though and have done much better than most others. SO is not a forum. It does not have posts, it has questions and answers.post ::= question | answer
? It even appears in the revision link.