DEV Community

Discussion on: What programming best practice do you disagree with?

Collapse
 
gsto profile image
Glenn Stovall

It's not just a technical issue. longer lines are harder for the human mind to parse out. In text, 50-60 characters are ideal. I think more than 80 in code is pushing it. Having said that, I agree that it's not something to be too dogmatic over. We have our linter set to 125 cpl.

Collapse
 
tarialfaro profile image
Tari R. Alfaro

I'm pretty fond of 80 characters being the limit.

Collapse
 
ryansmith profile image
Ryan Smith

I have heard of the 50-60 being ideal, but I thought that was more for reading sentences than text in general. I could be wrong though, I haven't looked at the studies on it.

Collapse
 
apihlaja profile image
Antti Pihlaja • Edited

Over 80 characters per line means project is written in some ancient language. For example Java.. or other older strongly typed language where it's occasionally impossible to make code nice & readable 😅

That, or there is some bigger issues in code structure.