4 ms·
For an even better feeling, combine 2 spaces with a more sensible line length. Why does the Google Python style guide allow only 80 columns and 4 spaces, but th
by Kwpolska 4y ago
For an even better feeling, combine 2 spaces with a more sensible line length. Why does the Google Python style guide allow only 80 columns and 4 spaces, but the Java style guide allows 100 columns and 2 spaces? Python may be simpler than Java, but the difference feels too large IMO, and it’s time to get rid of old TTY vestiges and embrace the larger screens.
- vultour 4y agoNo, anything above 80 characters per line doesn’t fit two documents on the screen at the same time. Not everyone codes with a font size of 10.
- Kwpolska 4y agoThis depends on your font size and on your screen size. I can manage 230 columns with 14px Consolas on a 1080p screen, which is plenty for two 100-column documents, and almost enough for 120-column. And even if it won’t fully fit, most lines don’t reach the length limit, and for the remaining ones, in a two-file scenario, you could enable the soft word wrap feature of your editor, or just cut them off and scroll a little when absolutely necessary.
- tiagod 4y agoJava is much more verbose than python, lines get a lot longer.
- ttyprintk 4y agoFwiw, I didn’t care about any of this until I worked with a visually-impaired programmer. In fact, a better article would have been to try and predict the eye powers of a programmer based on their formatting choices.
- u801e 4y agoWhen dealing with screen splits, max line length is important. If I have my screen split vertically, I can't display more than 90 characters per line without having to horizontally scroll or deal with soft wrapping even with a large screen. If I'm resolving conflicts using a 3 way vertical split with diff3, having a shorter line length is even more important.