8
\$\begingroup\$

This SE site has a lot of long code postings. Usually these are just copy pasted from actual source code.

The maximum line width before a horizontal scrollbar appears, seems to be only 80 characters. Times when 80 was considered an optimal maximum line width are long gone.

For other SE sites, I feel it's the posters duty to make sure the code is readable, and only the necessary code is presented. For Code Review I do feel you should be able to just post code without having to edit it for better viewing.

Several proposals have already been done:

Perhaps a simple or intelligent wordwrap is also suitable. Consider the revision of this question I posted as something I would like to see automated.

UPDATE:

I forgot to mention, couldn't a different column layout work as well? Where the code/question part resizes freely to the remaining space, and only the right column is fixed?

\$\endgroup\$
  • \$\begingroup\$ Currently the whole page is fixed-width. The site layout would have to change to make the question area wider. Wordwrap is an idea... \$\endgroup\$ – Michael K Mar 3 '11 at 16:56
5
\$\begingroup\$

The only thing I can really think of is making the font smaller for the moment. edit: this is done.

It is true that we expect more code here than on, say, Stack Overflow .. but even for a code review, you should strive to provide just the relevant code and not force people to read reams of your code to get to the "good bits".

A great code review request is scoped to the correct amount of code.

A bad code review request is dumping thousands of lines of code in people's laps and expecting them to critique it for you.

\$\endgroup\$
  • 1
    \$\begingroup\$ Thanks, that at least already allows 12 more characters in width. :) \$\endgroup\$ – Steven Jeuris Mar 3 '11 at 15:13
  • \$\begingroup\$ That does assume that you know what is and is not the relevant/correct amount of code... I can't speak for anyone else, but if I can get that far I can usually work it out myself. The real problem comes when I can't find where the real problem is. \$\endgroup\$ – AnonJr Mar 16 '11 at 21:28

You must log in to answer this question.

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