24

I recently saw a flood of suggestions adding CSS syntax highlighting to existing posts. The edit suggestions themselves are put on posts with CSS that are otherwise in good shape. Is adding syntax highlight enough of an improvement to warrant serial editing? I know that some think it's helpful, while others think it's too minor (previous discussion about syntax highlighting).

This case in particular:

  • The posts are already in good shape, so the edits aren't incomplete or otherwise leaving the posts in bad shape.
  • Multiple posts in the same Q&A set are receiving the edit at once.
  • The user has submitted a lot of suggestions in a short time. I estimate about 60 suggestions an hour.
10
  • 19
    I don't think that this is something that users without edit privileges should be doing, as I don't think it's worth the review time/effort. That said: once they've made them, I wouldn't reject them, as they are an improvement.
    – jonrsharpe
    Commented Jan 14, 2016 at 20:49
  • 2
    Wouldn't they have the css tag on it and therefore render in the correct manner without the specific language syntax hint? Commented Jan 14, 2016 at 20:49
  • 4
    @MikeMcCaughan the css is one of a few tags known to not support syntax highlighting by the tag itself. So the highlight has to be added in the markdown as an HTML comment.
    – ryanyuyu
    Commented Jan 14, 2016 at 20:51
  • 1
    @jonrsharpe yeah. I really want to reject them, but the posts are in good shape already. It's just the sheer quantity of edit suggestions that's alarming to me.
    – ryanyuyu
    Commented Jan 14, 2016 at 20:52
  • 10
    I'm "The user". I cooled my jets. I thought I was legitimately being helpful by formatting css correctly, and didn't think it'd put any strain on the review process (seeing as it's such a straight-forward edit). But I get that it's a bit much.
    – thanksd
    Commented Jan 14, 2016 at 22:03
  • 4
    I love cleaning up edits though (most often I'll do spacing and indentation changes to make things more readable). And I think any readability edit is valuable. Just in this case, I was able to make those changes really quickly, because it's such a straight-forward edit.
    – thanksd
    Commented Jan 14, 2016 at 22:06
  • 4
    @thanksd thanks for joining the discussion. I will say that you didn't neglect any of the posts (which is what typically happens when people serially edit). So good job on that. It's just a bit much all at once. Anyway, my usually advice is to fix all aspects of the post when suggesting an edit. So far, you've found posts already in good shape, but just be vigilant for future edits.
    – ryanyuyu
    Commented Jan 14, 2016 at 22:26
  • 2
    @thanksd and once you break 2k rep, you'll be able to clean-up without straining the review queue. Though even then the fact that an edit bumps the question might raise some flags for a few people, but that's a different issue. Commented Jan 15, 2016 at 16:15
  • 1
    Perhaps we should be more concerned with the people serially posting malformatted code. ;)
    – krillgar
    Commented Jan 15, 2016 at 16:36
  • 2
    I wish someone could be doing the same thing with [matlab] *nudge nudge wink wink* Commented Jan 15, 2016 at 16:55

1 Answer 1

56

I'm strongly in favour of edits like this. Syntax highlighting, tab-size consistency and wrapping to avoid horizontal scrolling can make a significant difference to the legibility of a code sample — especially for users with visual acuity difficulties (like me!). Similarly, fixing typos can make it much easier for users (not all of whom are first-language English) to understand the question or answer.

To my mind, there's a definite benefit in accessibility, and has the advantage of showing learner-developers good style, so they're likely to write qualitatively "better" code as a result.

The review overhead seems low so I think, in general, edits like this should be welcomed. (I'd agree with ryanyuyu that users should be vigilant to fix all the issues they can see at the same time, mind.)

5
  • I agree that general code cleanup is great. But what about specifically serial edits that fix only syntax highlight (in this case because nothing else needed fixing)? That's what I'm a bit more interested in.
    – ryanyuyu
    Commented Jan 15, 2016 at 16:30
  • Side-note to this: edit diffs for syntax highlighting changes override previous formatting with red, making it hard to tell from the rendered output that anything has changed. (I feel like this edit suggestion should have been approved, and the fact that you aren't able to see what exactly was changed could have affected the decision to reject it).
    – thanksd
    Commented Jan 15, 2016 at 16:39
  • 2
    @thanksd a reviewer should always click "markdown" to see what's actually changed in the code. When I review, I always do. Often more extensive code formatting is more clearly understandable in markdown. Commented Jan 15, 2016 at 16:42
  • 13
    "Syntax highlighting [...] can make a significant difference to the legibility of a code sample" Syntax highlighting where there was none is a nice improvement. Syntax highlighting where there was some, but it was wrong is WONDERFUL improvement. This is especially important in multi-language posts where, e.g., you'll get things like XML highlighted as JavaScript. Commented Jan 15, 2016 at 16:47
  • 2
    Anyway, if a post is pretty much perfect, bringing it all the way there is a good edit, even though it really doesn't amount to doing much, Commented Jan 15, 2016 at 18:49

You must log in to answer this question.

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