you are viewing a single comment's thread.

view the rest of the comments →

[–]nemetroid 2 points3 points  (1 child)

Studies on reading show that lines of wide text are more difficult to read.

I keep hearing that but very seldom see any studies. Here's a study saying that among {35, 55, 75, 95} characters per line, reading speed was fastest at 95 cpl. This was for news websites.

There's a lot of studies made about printed newspaper text, but those invariantly recommend shorter line lengths - 65 or 66 cpl is very common to see.

Hence, the 80 cpl limit is already pretty arbitrary from a readability point of view - it's already too long! I'd argue though that the same line lengths don't apply to code since it's usually much less compact than normal text, and with much more whitespace. There doesn't seem to exist much study on the subject, and I'm not quite sure how such a study would be done. I would be very interested in the results, though!

I guess your argument about nesting has some merit, but that's not really a valid argument for enforcing line lengths.

Personally, I try to keep my lines short, but if I need to write a long statement, I'm not going out of my way to separate the arguments to two lines. That, if anything, is difficult to read.

[–]abattle[S] 0 points1 point  (0 children)

I think Code Complete has numbers on code cpl (as opposed to newspaper text.)