19

I sometimes come across questions (for example this one) where the content is okay, but the preview in the search / browse page is next to useless because of the way the question has been written (originally).

preview

The % ................... lines are purely comments in their code to suggest additional lines, and could be removed (or at least reduced) with no impact on the question.

Is it useful, harmful, or not worth thinking about, to edit a question purely so that the search preview is improved? I feel like it's more useful to future users if they can see more of the question's actual meat.


More broadly, you often see questions start with several lines of context which could be moved down, or an additional summary sentence could be added at the top to give a useful hook from the search page.

Obviously any thoughts regarding this generalisation would be subject to each question, I'm just suggesting other cases where the search preview could be improved by an editor.


I couldn't find this already asked on meta, but thay may be a symptom of not knowing the "proper" name for the search/browse page.

6
  • 8
    Removing these useless comments also helps the readability of the question here. One commented line to tell what that block of code does is ok, two (or more) additional empty lines aren't.
    – Tom
    Commented Sep 1, 2017 at 7:37
  • 2
    I've decided to simplify the comment on that question. Personally, I don't really care about the preview since it doesn't support line break. Any code in the beginning of the post will look bad in any way. OTOH, I agree with Tom that if the readability can be improved (regardless of the preview), then improve it.
    – Andrew T.
    Commented Sep 1, 2017 at 8:13
  • 3
    @AndrewT. Any code at the beginning of the post will look bad, that's why I added more broad cases. For instance if a question starts with code which is rubbish for the preview, could a summary sentence be written or moved from lower down purely so the preview is improved? Of course this probably has the bonus of improving readability since starting with code is bad form.
    – Wolfie
    Commented Sep 1, 2017 at 8:33
  • Related: StackExchange is not yet on ElasticSearch 5 and is suffering from ElasticSearch 4 issues: meta.stackoverflow.com/a/327857/1033581.
    – Cœur
    Commented Sep 3, 2017 at 12:07
  • For reference, now we are on ElasticSearch 5: meta.stackoverflow.com/a/357090/1033581
    – Cœur
    Commented Nov 8, 2017 at 3:35
  • I find questions more readable in general if they start with text rather than code. I tend to move code down in a question if I edit it to improve readability. Commented Jul 31, 2018 at 14:37

0

You must log in to answer this question.

Browse other questions tagged .