41

9 out of 10 poor questions have code flung onto the site in the most unpalatable and unreadable way.

I have wasted days of my life fixing other people's code formatting and got bored with it a while ago, especially since there is a good chance the questions will be closed or marked as duplicates.

These days, I have taken the approach of asking the user to spend two minutes (ideally, before asking a question) to format their code and post to make it easier to read and easier to answer (in the nicest way I can muster).

Note: I realise new users have no idea of the site norms, and they learn this over time seeing how people format their questions.

Yet still, I have formulated the opinion that there are enough tools to help new users format their own questions; it's not rocket science, and there is a basic interface with few degrees of freedom well suited to it. Even if done abnormally, it tends to be a better received question in general.

Secondly, it shows the question is not lazily hewn and they've spent the time constructing a palatable question for us diligent foot soldiers to read.

Is it a fair (and just) comment to ask users to spend the time to format their own code and question, or is this just noise and unwelcoming?


Example of my more welcoming moments

Welcome to Stack Overflow, please spend 2 minutes when you ask a question formatting your code. It's hard to read, and it makes the question look lazy.

13
  • 19
    Skip the comments. Just vote to close instead. No, it is not worth your expending disproportionate amounts of effort to the asker, unless you truly see a hidden gem of a question there, and you think that your answer would be helpful to a large number of people in the future. Then, edit away; it's why we give you edit privileges, after all.
    – Cody Gray Mod
    Commented Feb 27, 2019 at 0:58
  • 23
    @CodyGray Feature request close reason. "This question shows lack of enthusiasm and hurts peoples eyes. If you didn't mean to fill up your post with garbled nonsense then please use the edit button and make it readable"
    – TheGeneral
    Commented Feb 27, 2019 at 1:02
  • 11
    I'm pretty sure that's the exact tooltip on the downvote button. An "unclear what you're asking" works just fine as the close reason, if slightly less cathartic. It also reminds you not to abuse it when the question is darn-well clear; in that case, just downvote and move along to other more deserving questions.
    – Cody Gray Mod
    Commented Feb 27, 2019 at 1:24
  • 4
    If you're going to comment, spell the name of the site correctly, "Stack Overflow" - two words, both capitalized. :) Commented Feb 27, 2019 at 14:45
  • 7
    I agree with @HereticMonkey: if you’re going to comment on a post asking for the user’s diligence in formatting, please make an effort to do the same yourself with grammar. (Also, change the comma after Stack Overflow to a period, end your sentence with a period, and fix the its/it’s.). The same is true of the close request reason you added as a comment. It’s one thing to want to improve the quality of posts because it’s a virtue you believe in and practice, and another when you try to impose effort in neatness/readability when you don’t follow it yourself. Commented Feb 27, 2019 at 18:41
  • 2
    @CodyGray so you encourage to close, but then you encourage to downvote? Which is it? I see a lot of presumptive admins that are close/delete-happy and think that circumvents the whole voting system entirely.
    – vol7ron
    Commented Feb 27, 2019 at 22:15
  • 5
    @vol7ron Downvoting and closure are not mutually exclusive. In fact, they often go hand-in-hand. Technically speaking, the voting system and the closure system are orthogonal. Voting is meant to assess a question's clarity, usefulness, and research effort. Closure is meant to address a question's lack of suitability for this website. However, it is obviously extremely rare that you would upvote a question that you would vote to close, and similarly true that you would vote to close a question but yet couldn't justify a downvote.
    – Cody Gray Mod
    Commented Feb 27, 2019 at 23:14
  • 1
    Completely agree. In context of the question, which seems more to do with poor coding style, your comment was “Skip the comments. Just vote to close instead.” I think my argument is that in this case the content is accurate, but hard on the eyes. It seems like the downvoting of the community would be enough and if I was an admin I wouldn’t close (or delete) and instead would either (1) move on to another question, (2) comment, (3) or downvote, exercising my right as a member of the community. I could misunderstand, but I think the notion of closing seems to circumvent existing features
    – vol7ron
    Commented Feb 28, 2019 at 0:11
  • 1
    I also admit my bias: closed and deleted questions irk me more than downvotes. They are more difficult to contest or immediately change and often lead to a repost, which is not good for the maintenance of the community and has the appearance as inconsideration. Our goal should hopefully be to partially educate bad actors on how they can get better and shield them from the community as they continue to grow. But I appreciate your input as it has me giving this more thought than I initially planned
    – vol7ron
    Commented Feb 28, 2019 at 0:15
  • Addressing on the "Skip the comments, mark to close" comment. This is why things don't improve, there's constant shadow voting without offering the reasoning to give them even the tiniest nudge in the right direction. If you look at my question history, you'll see improvements, but ONLY because I had to keep going to ask Reddit users "How could I have done better here". There's comment boxes here, if you're going to downvote or vote to close, at least leave a comment so next time they know the mistakes they made last time. Flying blind isn't productive.
    – CodeSpent
    Commented Mar 2, 2019 at 0:45
  • 2
    @Code That's why you vote to close. Then, a big yellow box appears with detailed, polite instructions on how to improve. I suggest not leaving a comment because most veteran users are so annoyed by the onslaught of low-quality questions that they have a very hard time leaving polite, helpful comments. Better to let the system speak for you. Do also note that a downvote sends a very strong signal that the question is unclear or not useful, as it says on the tooltip. It is not necessary to leave comments regurgitating what should be common knowledge. It's all in the Help Center.
    – Cody Gray Mod
    Commented Mar 2, 2019 at 1:36
  • I don't feel the big yellow box is anywhere near detailed enough to be much help most of the time, unless its an obvious issue. (duplicate, etc), a comment is much more tailored to saying "Here's where you made a mistake" & they'll either be receptive or crash. I can definitely understand & promote the reasoning, I suppose I want to see less discouragement that I've gotten when newbies come here. Habitual offenders, absolutely, pay them no mercy, but for new users who are active (100+ rep) & trying to learn, its just far too soon to dismiss them.
    – CodeSpent
    Commented Mar 2, 2019 at 1:41
  • Aside from vetting new users, however, I can't say I've got any productive ideas that'd help so I'm just offering some banter.
    – CodeSpent
    Commented Mar 2, 2019 at 1:42

7 Answers 7

29

No, your time here is valuable and I don't think it's appropriate to waste it on something that is unlikely to have any effect.

People who care, who are interested in participating here and contributing to the quality of the site will proactively make the effort to learn how to do so without any coaching. These people won't benefit from your comment because their first question probably looks fine, and if it accidentally doesn't, they're already trying to fix it because they want it to.

People who don't care won't benefit from your comment because they don't care. Their questions look lazy because their questions are lazy. The majority of users only ask a couple of questions. They don't have much interest in continued participation in the site. They just want an answer to their question and it doesn't matter if they learn anything from your comment, because they're not going to ask another one anyway.

If you think the question looks useful enough for it to be worthwhile to edit it into shape, then go ahead and edit it. If not, don't. Your editing time won't feel wasted if you spend it improving good questions instead of making bad questions look better. If the question is not worth your time to edit, then it's not worth your time to comment on. There are more efficient and effective tools to use on low-quality posts.

4
  • 9
    I agree with this, but I think it should be emphasized that the last paragraph is as important as the beginning: we sorta shouldn't care if the asker is never seen here again. If they happen to ask one of those useful long-tail questions, and get a good answer, then it -- potentially -- is worth taking the time to apply some polish.
    – jscs
    Commented Feb 27, 2019 at 18:57
  • 4
    I agree, @Josh. I actually try to approach every question as if the asker will never be seen here again. It's not that unusual that that's literally what happens. Commented Feb 27, 2019 at 19:20
  • 1
    Agreed. It is probably more worthwhile editing the highest view rate questions. Or highest view rate questions in a particular tag. Commented Feb 28, 2019 at 8:47
  • 1
    If the question is lazy to the point of being useless to anyone else, down vote it.
    – Raedwald
    Commented Mar 1, 2019 at 9:21
12

If the user is new, I will just edit and not leave a comment. Creating the edit will give the user a notification which (hopefully) will provide enough curiosity to look at the edit which will reveal to the user how to use markup in the post.

If they've been around a while and it's not their first post, I will leave a comment prodding them to the edit tools.

I wanted to upvote your post, but find this line is not constructive:

I have wasted days of my life fixing other people's code formatting and got bored with it a while ago, especially since there is a good chance the questions will be closed or marked as duplicates.

No one is forcing anyone to do anything here. I moderate, review and edit, because I enjoy it.

Caveat: If the post is off topic, I don't waste time editing. I close and leave a comment on why it is off topic.

6
  • 2
    Yeah i think i was formatting because of OCD and the incessant need to see clean code. However, i was just turned off a little by the army of homeworkers coming in and lazily splattering code. Nothing bad here, just lost a little interest in it. So what i have tended towards is just a small comment showing (maybe indirectly) the benefit to their question, hence the question here. I was thinking of making a canned response for it... Though, as i think you and others have pointed out, i don't think its all that constructive, my comments can get sharp, and it think its better for me to just VTC
    – TheGeneral
    Commented Feb 27, 2019 at 8:22
  • 1
    @MichaelRandall a canned response is not a bad idea, I'm not sure what it will achieve, as you're likely to be pinged and drawn into dialogue. If you're feeling stressed, walk away from the posts. Take care of yourself. It's something we all need to do.
    – user3956566
    Commented Feb 27, 2019 at 8:42
  • 2
    Teaching by example, it's the only way to go. Maybe the site should point that out to newcomers like "Your question/answer was edited by someone else! Go see what was edited (link)? Does this surprise you? Take a look in the help center (link) to learn why other people can edit your question/answer".
    – Gimby
    Commented Feb 27, 2019 at 10:10
  • @Gimby users get a notification when their post is edited.
    – user3956566
    Commented Feb 27, 2019 at 10:14
  • you're right, it's OP choice to fix others questions, or collect stamps or whatever. It's a question of judgement: is the rest of the question worth the editing? Commented Feb 28, 2019 at 8:54
  • 1
    "Creating the edit will give the user a notification which (hopefully) will provide enough curiosity to look at the edit which will reveal to the user how to use markup in the post." IMO that is exceptionally optimistic! IME it instead gives the impression "you can just dump your rubbish here and don't worry, our team of volunteers will clean it up for you, and this is perfectly okay". Commented Jul 23, 2019 at 15:09
8

I was at some point where you are now: sick & tired of this, but still cared about the quality of site. I tried to make some push on meta to make non-indented/poorly formatted code questions off-topic, since I found them lazy and rude. And of course my proposal got down-voted into meta hell.

The general solution on SO is to stop caring about crap. Don't bother leaving any comments, you are speaking to a wall (of unindented code).

Do this:

  • Down vote.
  • Close vote as unclear.
  • Optional: if you can be bothered, drop a simple comment "please edit your question and fix the indention".
  • Don't read the question and especially don't answer it.
  • Move on.

The only issue with this is that the OP might be confused. Tough luck, they will either improve or leave. Either way, SO wins.

2
  • Yeah, i agree with this. It would be nice if teachers told their students that this site is a resource and expects high quality, additional not here for them to pass the course. But alas, i am guessing anyone who programs for more than a school assignment eventually realizes this
    – TheGeneral
    Commented Mar 1, 2019 at 23:58
  • Exactly this. Comments on things like this too easily veer off into rude and/or unconstructive territory, and then moderators have to spend time deleting them. If a few choice remarks were going to help, then all of the help the user saw before posting their question would have made a difference. Once the question is out of the gate, it's too late. There's no point in anyone wasting time commenting or answering. Edit if you have abundant free time. Otherwise, downvote and vote to close. You're right that such questions are lazy and rude, but that doesn't make them off-topic, sadly.
    – Cody Gray Mod
    Commented Mar 2, 2019 at 1:16
5

If you copy paste this comment, are your two seconds really better spent elsewhere? I think it is worth the effort, especially for new users. Just skip the lazy part from your comment as that isn't very welcoming.

I'd go with something like this:

Welcome to Stack Overflow, please spend 2 minutes formatting your code when you ask a question. It's hard to read in its current form, and it makes people less likely to answer. For more tips on how to write a good question, one that attracts answers, see [ask]

Leaving such a comment to a new user might just make them improve their question, and shows them some guidance as to why their post is poorly received. A comment like this is also perceived far less hostile then DV's and CV's.

TLDR: If you want to take the lazy man's approach use down- and close votes. If you want to help a new user, leave them a comment.

4

No, it's not an appropriate thing to ask in comments.

It's up to you to edit it at all, but since I sense a fair bit of bias...

I have wasted days of my life...

9 out of 10 low-rep questions have code flung onto the site in the most unpalatable and unreadable way...

...if you don't think the post is very good, not engaging with the OP is a far more constructive path.

3
  • Yeah, i wouldn't so mach say its bias, or prejudice against new users. but it is annoying.. however, i am myself agreeing with the comments and post here, the reasoning is, i have trouble with coming across as nice on any-day, the less i comment, the more i am sure ill make the mods happy
    – TheGeneral
    Commented Feb 27, 2019 at 2:36
  • 1
    I can sympathize. I mean, "I" is capitalized. If I were reading a post made my you with that lack of capitalization, and I weren't in as charitable a mood as I normally am, I'd probably be thinking along the same lines of, just not engaging...
    – Makoto
    Commented Feb 27, 2019 at 2:47
  • 3
    And yet you commented back... You must be feeling charitable. And this alones makes me feel warm-and-fuzzy (with hyphens) to be the beneficiary of such philanthropy
    – TheGeneral
    Commented Feb 27, 2019 at 2:58
2

I would say that properly formatted code is essential in assisting someone with a problem. It makes it clear what is what and how everything fits together.

I don't think it's unreasonable to ask someone to take the time to make their code (and even just the question itself) tidy.

-6

Use a short canned comment that was specifically created to address the problem you're facing:

http://idownvotedbecau.se/unreadablecode/

And either VTC with whatever reason and/or downvote (questions with a negative score without answers will be automatically deleted after 30 days, so if the OP doesn't manage to improve the question until then, the system will automatically cut it out).

6

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .