DEV Community

Discussion on: Maximum line length in your code

Collapse
 
donis profile image
donis

It's a nice way to have a constraint in your code not to go deep in callbacks or nested statements, not only long variable or method names. These days with wide screen monitors my preference is to have 120 as a soft limit, nicely fits my code and surrounding tools from IDE in one screen. Also fits in GitHub pull request side by side view. It's all about readability, as long as it is not hardly enforced without a valid reason.

Collapse
 
bosepchuk profile image
Blaine Osepchuk

We find than 120 is the most readable while still short enough for all the ways our code is displayed (screen, diffs, Bitbucket, etc.).

80 chars gets hard to read when you have longer, more descriptive names like we use in our code.