3 ms·
Optimal reading width is like 40-90 characters, and if I end up with an excessively long line, often times, I’ll try to rewrite a bit, not just line-break my fi
by theonemind 6y ago
Optimal reading width is like 40-90 characters, and if I end up with an excessively long line, often times, I’ll try to rewrite a bit, not just line-break my first thought, but use it as a creative spur to write better.
Personally, I like 80 character lines. If I need more than 80 characters in a line, I treat it as a code smell.
- RHSeeger 6y ago> Optimal reading width is like 40-90 characters That statement follows along the same line of thought that many people that want 80 char lines have. That it's better because "it's optimal". I have yet to see any significant study actually showing this to be true for the case of something like code. Personally, I like longer lines where they make sense, and shorter lines where they make sense. But overall, I like a line configuration that lets me understand as much as possible with one screen of lines. That's the same reason I prefer short functions, because I can understand more in the same screen space from a single function call (by the name) than I can if the same code is inline.
- lostmyoldone 6y agoFor non whitespace text that might be a good figure but it doesn't automatically imply that the same would be true for the full width indented text. I don't personally feel that the indentation most programming languages employ have any effect at all on my reading, unless possibly it's too narrow as code is partially read as a graphical construct. Hence limiting the length of the entire line to an equal width seems unnecessarily restrictive.
- thiht 6y ago40 chars is unreadable. I have a buddy who writes all his mails wrapped at 60 chars and it's already a pain to read.