The "Problem":

Some times folks put the code blocks first, and the question second. The CRLF in code blocks is ignored, which makes the summaries usually worthless. Also, it is code, and not a description of the problem, then the summary is again usually worthless.

Peanut Butter Toast http://lanai.dietpizza.ch/images/stack-overflow-quetion-list-suggestion.png

The "Solution":

Do not include code blocks in abbreviated question summaries on the question listing pages.

Then again, we could just go off and reformat other people's questions, but that seems unnecessarily invasive for such a minor 'problem'.


I think a useful solution for displaying summaries would be perhaps to replace anything within code blocks with the string [BLOCK OF CODE] or something similar. It would serve a dual purpose of not screwing up the summary display, but also potentially allowing for more characters to be included in the summary, since you won't waste characters with broken up code.


This is my question title

I am having a problem getting such and such to work. Here is what I have tried so far: [CODE BLOCK] Are there any other suggestions on how to fix this?

Would look a lot better than something that happened to be incredibly fractured thanks to only displaying a portion of a sizable chunk of code.

  • I like. (Useless text to exceed the stupid limit logic.) – Stu Thompson Oct 1 '09 at 18:30
  • +1 I think this is an excellent way to clearly present the summaries. – Robert Cartaino Oct 1 '09 at 18:45

Even if the code were stripped from the summary, upon loading the full question we're still stuck with having to read through the code before getting to the actual question. This is annoying.

Then again, we could just go off and reformat other people's questions, but that seems unnecessarily invasive for such a minor 'problem'.

Naw. There's always a reason to edit - this is just one more thing to be cleaned up.


They could only post a code block and explain their problem in the code (block) comments. Then you need to handle this edge case or someone will complain about an empty summary. Too much effort, if you ask me.

  • Please show me an example of someone who has done this. (There are plenty of examples of what I point out. Plenty.) I'd call your scenario a rare-beyond-belief case that will be the target of editing or down voted before anybody bothers to come here to MSO and complain about it. – Stu Thompson Oct 1 '09 at 11:09
  • If "target of editing" is an argument, then you do not need this request, as you've pointed out yourself :) – Ladybug Killer Oct 1 '09 at 11:28
  • This is a valid edge case, but I think that this scenario is likely much more rare than the case where code comes first (or even just early in the text enough to appear in the summary). Hence this edge case probably could be handled with edits, where Stu's case is more invasive/difficult to do. (But would qualify many more of us for Strunk & White!) – John Rudy Oct 1 '09 at 13:23

You must log in to answer this question.

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