Given the comments above, I believe the following reasons were reasonable contributions to the downvotes:
- Question was 2 years old
- Begging for upvotes
- Code was not formatted
- Code was of dubious quality
Old questions can have good, new answers, and formatting is mostly a matter of training.
I remember seeing this in one of the review queues (low quality perhaps?), but I don't remember what I chose to do with it (probably skipped it as it didn't fit one of the canned deletion responses, there was other community involvement, and it didn't feel like saying "looks OK" was the right thing to do).
My general approach is that if I'm going to downvote something, leaving a comment is required except for the most blatant and obvious (something like re-asking a question multiple times where the previous question did have guidance in the comments that was not taken to heart). Even if I'm just regurgitating the "welcome to SFSE" script, you can't fix a problem you don't know you have (except by accident).
I know that I've downvoted without comment on a few occasions but, by keeping discipline, I feel that I can avoid jumping on a voting train (might be a personal bias, but I think that people tend to vote more, and in the same direction, after the first vote is cast).
I take this as doubly true for new users.
The point that battery.cord makes is also relevant. Unless I specifically keep the question opened in a tab/bookmark, once I've cast my vote there's not anything to bring me back to re-evaluate. Even if I leave a comment telling a user to @mention me so I can be notified and come back after an edit, users, and especially new users, don't necessarily do that (or do it correctly, if they're new to StackExchange sites).
Maybe we can petition the StackOverflow staff to add a feature to notify downvoters if an edit has been made.
My thoughts on the downvotes
Given that this was a new user, I don't think I would (and haven't) downvoted. Engaging the new user to improve their solution (a bit harder in this case since I don't know if new users can chat even if invited to a room created by someone else) feels like the best solution to me here. David started it off, but I'll be looking to expand on his comment.
There is some cause to warrant the downvotes, and I don't really think we went overboard in this case. If it had gotten to -4, -5, my feelings would be different.
I like that the user made an effort to explain their code, but at the same time, I agree that I wouldn't upvote this answer based on its merits alone. I do occasionally upvote things to offset what I think are unwarranted downvotes, and give more consideration to new users.
I don't think we went overboard
At the same time, we could have done more for this user without the fear of overwhelming them
Aim to always accompany downvotes with explanations
Think twice before downvoting a new user