At Ask UbuntuAsk Ubuntu we appreciate potivve answers that help the asker.
You should feel free to downvote any post you really think is useless. Furthermore, it was probably good you informed the answer's author that you were unsure if you responded appropriately and that you were posting on meta. This might have helped to clarify the possibility that your words did not reflect site policy.
Besides that, though, in my opinion, you did not respond appropriately. The problem is not one of being too harsh--instead, I believe you have somewhat misunderstood both (a) site policy and (b) the answer you were critiquing.
First, it is rarely good to tell someone to leave our community. I understand you were trying to avoid rudeness--you said "Then this isn't the place for you."--but in this context you were in effect telling somebody that they must either do what you say or get out.
I think it's usually best to let people decide for themselves if they are a good fit for the Ubuntu community. For example, if someone said, "How dare you improve the grammar of my question?" it would make sense to tell them that such edits are considered appropriate on Ask Ubuntu, and that if it is important to them that people not do that, then our site might not be the best place for them to seek support.
I suspect there are exceptions to this guideline, but I can't think of any in a confrontational context.
You might be concerned that sometimes, for the good of the community, someone needs to be given an ultimatum and told "Do it this way, or get out!" But that doesn't mean you need to tell them. I think that's the sort of exceptional situation where a moderator should do the talking. They are elected for that purpose (among others). It will be clear, when they say it, that it really represents the official word on the subject.
Second, when I read your comments I got the distinct feeling that you were invoking communal authority inappropriately. Throughout your comments you talked about the community and said we and our a lot. I can't speak for anyone else, but as I read them I know I certainly didn't feel included in any of that. You blamed an argument between two individuals--the post author, and you--on the post author's unwillingness to cooperate. At no point did you show the post author--with links, or in any other way--that they were actually failing to cooperate with real community norms.
This would have been bad enough if you were correct, but I don't think you were. Not only is the post an acceptable answer, but I have no idea where you would find sources for most of the things you said about site policy (see below for details). And while I'm sure this was unintentional, the phrase "before a mod gets involved" seems to convey the idea that moderator involvement in a dispute is some sort of traumatic event.
Third, the post is not a joke answer, and I don't think it's sarcastic either, though I'm not really sure what you mean by that in this context. It presents a solution that must arguably be modified--albeit in a trivial way--to meet the OP's precise needs. I say "arguably" since the question does not actually contain a specification of which letter grades should be included. The closest thing to such a specification is the code the OP provided us. And that code only covers cases F, D, and C! The rest of us assumed the OP wanted to cover the common grades B and A, and answered accordingly; this answer is the only one really faithful to that aspect of the question.
Incidentally, both your answers sometimes return "E" as a grade. I don't think that's common in an academic grading system--I've never heard of anybody scoring an "E." (I admit I am mostly familiar only with grading systems in the United States and Canada, however.) Although I do consider this a significant weakness of your answers, I don't think it makes them "joke answers which make more work for someone" either.
Furthermore, the answer presents the solution clearly. It illustrates how to solve the problem in Python, in a compact and readable way. The author is correct to believe the OP can easily extend it to provide additional letter grades or to remove the messages accompanying the grade letters.
Fourth, the author did not actually express an unwillingness to comply with community rules. Although you talked about the community a lot, the post author didn't. When you said you would flag the post for deletion, they said they did not care. I believe context makes clear they were saying they did not care whether or not you personally flagged the post. It was your actions they professed not to care about. You then said: "Then this isn't the place for you."
That doesn't seem right.
Fifth, you explicitly presented the problem as being about the author's unwillingness to listen to you:
The issue is the sexual innuendo which is inappropriate for a professional site, the lack of A and B cases and your unresponsiveness to listening to an experienced user.
On average experienced users may be more likely than inexperienced users to understand how people should conduct themselves on the site; we get additional site privileges in recognition of this. But we do not have personal authority to tell people how to behave, more than any user has who is able to post comments.
Even if we are right to think someone is doing the wrong thing, the reason it's wrong is not because we think it is, nor because we say it is. This site doesn't have a social hierarchy where users with more rep, badges, or years of participation get the authority to issue orders which must be obeyed.
And experienced users can be wrong.
Sixth, we do not have a policy that answers to scripting questions must spoon-feed the OP with complete code solutions. (If you believe we actually have such a policy, please comment or edit your question with clarification. But I'm pretty sure we don't.)
A good answer is one that answers the question--it tells the OP what they want to know, or helps them understand what they are looking to understand. One way to answer a scripting question is to provide a complete, working script. But usually people want to comprehend how to do something. An explanation that makes clear how to do something is an acceptable answer, and often a good answer, irrespective of whether or not its code examples constitute complete solutions to the problem as it has specifically been stated.
Ask Ubuntu is not a code golf site. Answerers are not being evaluated for their skills in turning out complete programs that produce precisely the specified output. An answer that demonstrates to readers how to solve the problem is just as good. Answering questions here is not, for most people, a job, and the goal is not always to conform the OP's specific demands. Finally, answers aren't just (or even primarily) for the OP.
In this case, it looks like the OP is trying to understand how to solve a particular kind of task by writing a script. This answer is fully compliant with that aim.
Seventh, the original version of the answer did not contain "chit chat about dinosaurs." Using the word "dinosaur" to mean something old, decrepit, and unwieldy is a common English idiom. This meaning is common enough to be listed in multiple respected dictionaries.
3 : one that is impractically large, out-of-date, or obsolete
- dinosaur. 2015. In Merriam-Webster.com. Retrieved May 15, 2015, from http://www.merriam-webster.com/dictionary/dinosaur
2 A person or thing that is outdated or has become obsolete because of failure to adapt to changing circumstances.
- dinosaur. 2015. In OxfordDictionaries.com. Retrieved May 15, 2015, from https://www.oxforddictionaries.com/definition/english/dinosaur
In the original version of the answer, the author is explaining why they recommend using Python. (Explanations of why one recommends something are, in my experience, usually considered good on Ask Ubuntu.) You removed over half that explanation and altered the rest. Here's the original lead paragraph:
The python is default installed on every linux os so why programming in bash (its old dinosaurs). Google does it in python, every one doing in python for linux... You should do it too!
Here's the version after your edit:
The python is installed by default on every Ubuntu so why program in bash?
If I'd seen an edit like that from a low-rep user in review, I would've either rejected it as a radical change or clicked Reject and Edit to make the lead look something like this:
Python is in Ubuntu's default installation, and comes with every other Linux-based OS too. There's no longer any reason to do this in Bash, which is an old dinosaur among scripting languages. Google uses Python, everyone these days is scripting in Python on Linux--you should try it too!
I believe that both captures and somewhat clarifies the original intent.
It's true that the author's original words did not constitute a fully adept use of the "dinosaur" idiom (the author wrote "its old dinosaurs"). If someone wrote a post in standard English with no errors except the phrase "its old dinosaurs," then there might be question about their meaning. But judging from the way the post is written, and also from the author's profile, it seems likely English is not the author's first language. Considering that, and how commonly this meaning of "dinosaur" is used, I don't think there's any ambiguity here.
Eighth, you often stated what you believed to be site policy in an ambiguous way.
The author said:
I think someone is smart enough to figure it out how to continue programm by its own, or modify it.
You replied:
He might be, but this is not a forum. Complete answers here please, and get rid of the snarky comments. If you do, I'll undo the downvote. If you don't, I'll flag for deletion
As detailed above, this was a complete answer. But besides that, what is the significance in this case of Ask Ubuntu not being a forum? If you think the post is unprofessional, sarcastic, a joke, and only creates more work for people without helping them, why would you want the author to put it on a forum?
You also said:
At Ask Ubuntu we appreciate potivve answers that help the asker.
I've been using the site for a while, but I have no idea what you mean by a "positive answer."
Ninth, your concern about the post's sexual innuendo might be merited, but this is a borderline case that should be decided by the community.
I understand that my own views of what content should be considered objectionable sometimes differ from those of the Ask Ubuntu community. But the innuendo here seems pretty tame, and the author has even edited some of it. I think the edit might be intended to tone it down, but I admit I'm not really sure.
I do think the humor in the script's output is pretty weak, though. I don't find it funny at all, and I suspect not many other people will either, though I cannot say that with any certainty. While the current "snarky comments" in the code (as you put it) don't offend me, personally I hope the author will change them out for other snarky comments of higher quality.
Reading programming books printed by respectable publishers, I've seen mild sexual innuendo, as well as jokes about suicide in the form of "Goodbye, cruel world!" programs. Jokes about car crashes are common also. Two separate book series, both including many volumes on computer topics, insult their readers in every title. The cofounder of a major, respected network of question-answer sites--contributed to and relied upon daily by many professionals in computer-related fields--once joked in a tweet about murdering people who reported pluralization bugs.
I don't mention any of these things to judge them well or ill. Just because something happens in a professional community doesn't mean we should consider it appropriate for a professional community. But I think this shows it's unreliable to extrapolate hastily from one's own opinion to the opinion of the community as a whole.