re: Why I keep pestering everyone about long lines VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION

No it does not apply equally, see the video I linked to: the width of the text is not based on the width of the screen (I only work on widescreen by the way), it's also not based on the width of a split window, but it's based on the width humans are comfortable reading. I mean look at this blog post: does it spawn all the width of your screen? Why do you think the vast majority of websites does just that?

The point I'm trying to make in this article is that getting a widescreen is that the screen real estate you are getting should be put to good use by using split windows instead of just making your lines longer. Maybe you will see the point when you buy a 4K screen and your files get even wider.

I have two of those here, and code isn't (and should never be) fullpage text.

I do agree with you about split screens being useful. It's only the absolute and rather low 120 character limit I take issue with.

That limit often depends on the language: I use php, and the recommended limits are 80 and 120 (yes, there are two). In python, it's more like 72, and apparently, in Java, that would be 80. Not sure what your favorite language is, but maybe it culturally has a higher limit? Anyway, I find 120 very comfortable, but when I cross that limit, I try to make the offending block under 80.

My language of choice is Java. The 80 character limit that you mention is most likely either part of an old Java style guide (the most recent Oracle Java guidelines are from 1999), or a result of inertia (Google apparently moved to 100 characters as a compromise to those still preferring 80).

Java has a well-deserved reputation for verbosity (which I don't see as a negative), which means that while most of the lines of code I come across tend to be 100-120 character wide, a fair share are 120-150.

Might be ok indeed for Java, I did not practice a lot but I still remember "System.out.println" vs "echo", so it could indeed make sense in that language.

That's a very mild example. For some laughs and groans, try googling "java long class names" :-).

lol even german does not produce such long words

code of conduct - report abuse