DEV Community

Discussion on: Code style rules that are actually useful

Collapse
 
okolbay profile image
andrew • Edited

80 (120) chars are not only for screen width IMO
you can have a very long if clause or 9000 nested fuction calls. this limit implicitly hints you, when line becomes unreadable, despite still fittimg into modern screens. Another point on widescreens is that I have project structure on one side and Gradle tasks on another, so code section is still not so wide ))

overall most of these advices are more of a clean code rather than code style.
CS is more about curly braces on same line in method declaration, indents etc. I would recommend you Clean code, if you havent read it already, I’m sure you will like it )