23

I have a question about my Stack Overflow post: How to generate all possible permutations from a given length in Java?

EDIT: The question has been closed.

It was downvoted 2 times, but I'm not quite sure why. I can confirm this because I received 10 reputation on the question, which I found was the reputation you get from an upvote. But the score was still -1, so it must have been downvoted twice and upvoted once.

I've consulted the Help Page on How to Ask a Question, which lays out the points:

  • Search, and research
  • Write a title that summarizes the specific problem
  • Introduce the problem before you post any code
  • Help others reproduce the problem
  • Include all relevant tags
  • Proof-read before posting!
  • Post the question and respond to feedback
  • Look for help asking for help

Of these points, I believe I satisfied all of them.

Search, and Research

I searched on Google, and found a result, which did work, but I didn't prefer. I clearly noted it in my question:

I checked out https://www.geeksforgeeks.org/print-all-combinations-of-given-length/, but I am not willing to create a char array with 127 items. Is there any other way to do it without using an array to store the characters and using plain chars and for loops?

Write a title that summarizes the specific problem

I believe my title "How to generate all possible permutations from a given length in Java?" summarizes the question pretty well. I made sure to include relevant information such as generating permutations from a given length, and the language which I was using.

Introduce the problem before you post any code

I introduced the backstory very clearly, including what I was trying to do, and the plan I wanted to take.

Help others reproduce the problem

In this case, there was no problem. I was asking a How To question, rather than a Why.

Include all relevant tags

I included because that was the language I was using. I included because it was recommended, and because the question had things to do with permutation.

Proof-read before posting!

I proof read the question before posting, and read it afterwards. I edited it very quickly when I found some small errors, long before anyone would likely have read it (although this I cannot confirm).

The last 2 points

There was no feedback at all, and that's where my question comes in.

I would like to know why my question was downvoted, but I can't find a polite and professional way to do it rather than commenting on the question, which is unlikely to notify the downvoters.

What is the right way to ask for feedback which is non-invasive and will still notify the authors?

22
  • 40
    I really doubt it got downvoted just because it contains the words "How to" in the title. Commented Dec 25, 2020 at 23:05
  • 4
    It is wordy. Are you sure non of the previous questions got any relevant bits: stackoverflow.com/… ? Is the problem you have how to generate the string or how to hash the string, or both, or something else.
    – rene
    Commented Dec 25, 2020 at 23:09
  • 2
    I really don't understand why the question was closed as "needs more focus."
    – user14889573
    Commented Dec 26, 2020 at 0:18
  • 17
    I see how problematic any suggestion would be - you need to explain why you trying to do that but your explanation shows misunderstanding of hashing... To some extent "build a rainbow table" or "generate all combinations" is not an interesting question asked plenty of times and really need a lot of effort to stand out. Definitely should not start first lines with questionable reasoning as people will simply stop reading after first 5 lines... Commented Dec 26, 2020 at 0:59
  • 8
    It was probably downvoted and voted to close, because although you present a framework for the problem, you left all the actual and hard work to the reader. In other words, it shows zero effort on the actual work. Commented Dec 26, 2020 at 8:54
  • 5
    And ... I'm sure I have seen other StackOverflow questions asking how to generate all permutations of something.
    – Stephen C
    Commented Dec 26, 2020 at 10:18
  • 3
    I do think having some sort of grace period before revealing to everyone the current up/down vote count of a question can help combat the a sort of "first-mover advantage" that downvotes get. In many cases if a post gets a downvote and is in the negatives it's far more likely for others to "pile them on" from a cursory glance of the question. Same is also true for upvotes. Anecdotally I have seen questions that are seemingly of similar quality fare much differently vote-wise just because of how the first couple of votes went.
    – apokryfos
    Commented Dec 27, 2020 at 7:36
  • 4
    @nARVA If you asked this on a Q&A site for pilots he would be confused because he assumed you obviously know that and would be wondering what could have possibly been the problem when you tried to fly a plane. (see this other Meta answer for the same analogy)
    – mkrieger1
    Commented Dec 27, 2020 at 20:40
  • 2
    @mkrieger1 What part of "How do I fly a plane" implies that I already know how to fly a plane?
    – user14889573
    Commented Dec 27, 2020 at 20:42
  • 5
    @nARVA Your question is more akin to "I opened the puzzle, finish it for me". Commented Dec 27, 2020 at 22:19
  • 2
    @nARVA "I believe OP effort should be less emphasized on "How" questions" well, the community and the rules disagree with you, so now what? If I ask "how do I build an e-commerce platform" and the only code I show is a for loop, then the answer to my question would literally fill a book. And whether you realize it or not, your question has the same problem. as I went to some effort to explicate below. You made your case here on meta, and got the feedback you requested. What else do you want here? Commented Dec 28, 2020 at 1:55
  • 2
    An answer would be the length of a book. Each one of those topics is too broad of a question for a Q&A site, much less all of them mixed together. Consider a question that (glancing briefly at your profile) may be more in your wheelhouse: "how do I build an e-commerce site with Python?" written by someone who only knew HTML/CSS. You'd have to explain about client vs server, templating, HTTP, databases, integrating a payment system like Stripe, asynchrony, possibly Javascript and the DOM, etc etc. And that's just scratching the surface! Then there's the meta problem we're ... Commented Dec 28, 2020 at 18:16
  • 3
    ... discussing here of how to explain to someone who doesn't know what they don't know (which again, is not a moral failing). And again I can't speak for jpmc26, but I am becoming increasingly grumpy because of the sense of entitlement I perceive in a lot of new users: that we owe them an answer, that experts who are volunteering their (extremely financially valuable) time should be grateful to offer it unconditionally. It is hard not to read a "the world revolves around me" arrogance in to that attitude. And maybe you just haven't been around here long enough to feel that burn yet. Commented Dec 28, 2020 at 18:19
  • 2
    @JaredSmith Honestly, what makes me grumpy is not the sense of entitlement of the askers. That I can understand; many of them don't care and many more haven't even considered that they're being given an expensive service for free. So I can ignore them. What drives me mad is prominent users and employees on this site who encourage or justify it (like 10 rep's original comment does). They really ought to know better, and whether knowingly or not, they're actively making the problem much, much worse.
    – jpmc26
    Commented Dec 28, 2020 at 19:25
  • 3
    @melvin It seems you have a fundamental misunderstanding about the meaning of votes
    – mkrieger1
    Commented Dec 28, 2020 at 20:20

2 Answers 2

31

This may or may not answer your question, but it's waaay too long for a comment.

I can't speak for the actual close voters but... If I had come across this in the review queue I would have voted to close your question, and I would have used that reason. As to why: how can I possibly explain the solution in an answer of any reasonable length? Or the faulty premises inherent in the question like how you know the length of the plain text? Or do you wrongly assume that the hashed output has the same length as the plain text? What hashing function are we talking about, and how/why do you know that? How many rounds? etc. etc. How many related sub-concepts do I need to explain?

Then we get into the problems that aren't related to the actual problem but the limitations of physical resources. Assuming only lower case ASCII alphabet characters (no numbers, punctuation, uppercase, or Unicode) the number of possibilities for length n is n ^ 27. Adding in numbers and uppercase and punctuation takes up to... ok I stopped counting at 81. Let's just say n ^ 81. And that's without Unicode! That's a lot of data for even fairly small values of n, much less larger ones. How are you handling that? Obviously it can be done (rainbow tables are a thing), but how are you storing and querying this? To your credit you at least give nod to that in the question itself but that could be a probably still too broad question in it's own right.

I could go on, and we haven't even made it to the code yet. There's just too much going on here to fit into the space of a Stack Overflow answer, which is why it's too broad. Any "answer" would have to punt on a number of crucial details, and/or require a level of interaction with you that amounts to the interactively teaching you the contents of multiple tutorials and even if someone were willing Stack Overflow just isn't a good venue for that.

And don't feel too bad about it. Without experience it is often possible that you don't realize just how deep the rabbit hole goes, or how to research a given topic effectively, or how to have a good feel for what will fit in a Q&A post.

Obligatory, if dated xkcd.

As for why you didn't get a lot of feedback on the question itself, well, look at how long this feedback is. No way this would have fit in comment(s) on the question itself.

11
  • 11
    I guess the answer to the question in the title is: ask on meta. This answer is feedback on the original question ;) Commented Dec 26, 2020 at 14:40
  • 2
    I tried to capture a summary of your point in my custom close reason. Both my summary and your answer are basically a nice way of saying, "You have no idea what you're talking about." And it's okay to not know what you're talking about. Just don't be surprised or upset when it leads to your question being closed.
    – jpmc26
    Commented Dec 28, 2020 at 7:06
  • 2
    This situation clearly shows the weakness of the SO review process. We have a new contributor who actually read the help page and really put in the effort to ask a proper question which still got closed because of a reason you needed to describe in 2K+ characters but the feedback he received first was only "not focused enough". It seems to be impossible to ask a good first question because the bar is so high. No wonder people hate the SO asking experience.
    – totymedli
    Commented Dec 28, 2020 at 9:33
  • 1
    @totymedli We used to have a much more applicable reason: "lacks minimal understanding." It was deemed "bad" by the same people who gave us "welcoming." The bigger problem is the hordes of users who will happily reopen a question that's asking for something easily recognized as utterly ridiculous if you have even a modicum of introductory knowledge on the topic.
    – jpmc26
    Commented Dec 28, 2020 at 12:26
  • 2
    @totymedli while I certainly appreciate the effort the OP put into getting it right, there's only so much we can do. While I think "lacks minimal understanding" is uncharitably worded it highlights a real problem: we just can't teach someone how to implement a complex system in the space of a SO answer, even if they can program. So let's say we set the bar lower as you suggest. How would you answer the OP's question, as asked? Commented Dec 28, 2020 at 12:36
  • 3
    @jpmc26 "Lack minimal understanding" isn't any better. My reasoning is that we shouldn't just "neglect" novice users who put in the effort to ask properly with vague sentences. The experience of getting all your questions closed is is what makes the community appear unwelcoming.
    – totymedli
    Commented Dec 28, 2020 at 12:36
  • 1
    @JaredSmith I'm not saying that the close was unjustified, my problem is that the reasoning is not clear. In this case the close voters should have given a more clear explanation why answering the question is problematic. BTW IMHO broad questions should be allowed, the answers should focus on the direction OP needs to take to solve his problem, because in the end by closing the question we just neglected a legit problem without an attempted solution or at least a direction.
    – totymedli
    Commented Dec 28, 2020 at 12:44
  • 4
    @totymedli If the asker had spent 30 minutes reading about hash functions (and more specifically about cracking them), they would know that their question is so far off the rails that they would never have asked it. I think that justifies us not spending a lot of time on it. Why are experts the ones required to spend their time rather than the novices? The novice's time writing the question could have been better spent expanding their knowledge on their own anyway. Teach a man to fish and all that.
    – jpmc26
    Commented Dec 28, 2020 at 12:46
  • 1
    @jpmc26 That is what needs to be explained in the answer (or at least in the comments). If somebody in the future (without prior knowledge) will find this question when he researches the topic or has the same issue, he needs to know why this is a problematic question. Seeing "closed as not focused" won't help him.
    – totymedli
    Commented Dec 28, 2020 at 12:49
  • 1
    @totymedli If it's downvoted and closed and has no answers, it won't be there in the future to be seen. It will get auto deleted, and that's the best outcome for a question that leads people in the wrong direction. A Google search for "crack hash function" will probably yield better results.
    – jpmc26
    Commented Dec 28, 2020 at 12:50
  • 2
    @totymedli yes yes, in a perfect world we could do that. And in this world there are plenty of people who post ridiculously open-ended questions without realizing it. Most of them are help vampires and don't deserve and/or wouldn't even understand the feedback you're advocating. The OP is clearly not one of them: he/she followed up with a (highly upvoted) post on meta, solicited feedback, and got two solid answers. Problem solved? Seems to me that the system, designed to deal with the constrained resources of over-subscribed expert volunteers, is functioning as intended. Commented Dec 28, 2020 at 13:02
25

To me a major problem is that your title isn't aligned with the question description.

The title talks about "generating permutations" but the question description is more focused on "find a string that gives a specific hash value".

If all you wanted was to "generate permutations" there is no need for describing all the hashing stuff. Keep questions focused on what you really need help for.

Further, a statement like "but I am not willing to create a char array with 127 items" requires some kind of justification. We need to know why?

Maybe I wrote an answer (solving the task) using algorithm X and all I would get in response would be: ".. but I am not willing to use algorithm X" Would I like to spend time on that - no.

1
  • Thanks for the feedback. Your answer provides good information on how I can improve my question. I appreciate your time. If you have extra effort, please consider investing time to answer the question title!
    – user14889573
    Commented Dec 28, 2020 at 23:59

You must log in to answer this question.