Newly active round these parts; this just happened to me twice.
Is that how I should behave when I get downvote privileges?
If the answer is correct in the sense of containing only true statements, but is not applicable to the asker's problem, then it should be either downvoted or deleted (flag as “not an answer”). Deletion is reserved for answers that are strongly off-topic for the question (for example, an answer that uses a different programming language from the question in a case where the programming language matters). If it takes some knowledge of the topic to see why the answer is inapplicable, downvote.
If the answer is technically correct, but severely misleading or dangerous, it may be legitimate to downvote. Example:
I've just finished wiring an electric socket. How can I test that it's working properly?
⇨ Stick a paperclip in the socket.
You won't find a consensus on how far that can carry to what is merely dubious advice. Some people downvote if you answer fail to mention best practice, sometimes to the point of exaggeration because you can't always explain everything at once. The driving guideline is to upvote answers if they are useful and downvote if they are not useful. If you think that an answer is so bad that following its advice is worse than ignoring the answer altogether, downvote it. If you think that the answer has some good and some bad, a downvote is not warranted. If the answer is only wrong on a minor point and is otherwise helpful, correct it and upvote it.
Whatever you do, when you see something wrong, make sure that it's apparent what is wrong and why. Often, you should comment on the post (unless somebody else has already done that). Explaining downvotes is often a good idea, but it's not required.
No. If you feel tempted to do that, you're probably here for the wrong reasons. The only motivation I see for doing this is to more rapidly increase your reputation points so that you seem more attractive as a programmer to peers and potential employers for the purpose of being solicited.
If you carry that behavior to a job or other team project and start complaining about code that is obviously better than what you came up with, any:
- Open source project
- Project between friends
.. with a decent immune system will quickly get rid of you.
If in doubt, don't :)
If you see down votes collecting on one of your posts and have no idea why (after reading any follow up comments), flag it for moderator attention and we'll do our best to handle it.