The question:
I recently found a question with a terrible title, hard-to-read code, and a confusing problem description. It was two hours old at the time I read it, and there had already been a discussion in the comments between the original poster and a pair of high-rep users trying to understand exactly what the problem was.
An hour after the others had stopped trying, I read over the post, figured out what the poster's actual problem was, and posted a solution that has since been accepted. Based on that, I then edited the question to clean up the title, format the code so it was clear where the issue was, and reword the question to explain what the problem was and what the desired fix should do.
In my opinion, it's now a pretty good question. It earned four downvotes over the first two hours, prior to my edits and answer, but I think it's the type of thing someone else might be able to find and benefit from if they run into the same thing.
My question is, should I upvote it? Obviously I'm now biased towards thinking it is "useful and clear". But it didn't show research effort, and the clarity only came after the fact from an external source. So do I upvote the question based on its merits as they exist now, or leave it alone?
To put it another way, does upvoting a question I consider to be useful and clear matter more than potentially encouraging a new user to post poor-quality questions?
The answers so far (10/30/2014):
YES - you put in a lot of time and effort to make the edits, and whether that was because you are psychologically incapable of leaving things well enough alone, or because you genuinely thought that someone else would be able to read it and find use, if you've gotten this far you should go ahead and upvote it.
YES - voting is meant to be on the question itself, and who edited what doesn't matter. If the question you see on the page is useful, upvote it. From ivarni: "Votes shouldn't be around to penalize people but to rate the content on the screen."
YES - upvoting will make future searchers more likely to find and/or view the question, which is the whole point of building a knowledge base like SO. Note: Ben Voigt pointed out that Google search is capable of evaluating votes.
NO - awarding reputation to a user who wrote a bad question is a bad idea, since it might make them more likely to keep posting bad questions and assume others will fix them. Rebuttal: editing, commenting, and other forms of communications can alleviate this.
NO - upvoting the question might prevent things like the question ban algorithm from recognizing a bad user.
WHO CARES - it's just one vote (though if you activate the Meta Effect, it might turn into more: before being referenced here, it had four downvotes. As of now, it has received two additional downvotes and ten upvotes, and I haven't voted yet).
WHO CARES - voting is your decision, not something others should dictate.
My own thought:
Upvote. I was leaning towards this anyway, and the opinions shared in the comments and answers given so far seem to tilt in this direction. The question is more important than the asker, and if their asking skills are poor enough to eventually trip something like a question ban, that will make itself evident in time. On the other hand editing, commenting, and even upvoting (after making it clear that the upvote is because the 'new' question) might drive home the point even further - moving from negative four to positive five after they saw their question edited will show them how important that edit was in the trajectory of the question.
I'm going to go cast my symbolic vote now.