Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Despite increases in screen size and resolution, many sources still suggest that code be limited to 80 characters per line. I realize than there are many different opinions on this subject, but I wonder whether there are any standards bodies or influential firms that use other limits (120 characters is a common alternative). For example, are any standards bodies considering "enlarging" the suggested limit? Are there large scale software projects (e.g. at NASA or ESA) that use larger limits?

Note: This is not yet another question about what individuals do, or about related opinions, though I'd welcome such information as comments. This is a specific question about whether there is any indication that standard practice or recommendations (in the form of specific examples) is likely to change soon.

share|improve this question
Fun fact, the actual 80-character terminal limit predates to old punch cards having 80 columns... which dates back as far as 1928 thanks to IBM's 80-column card format. –  zxcdw Jan 1 '13 at 21:53
As requested, here is an opinion as a comment. I work in terminals, and like to have as many terminals floating around as I conveniently can so I can be looking at multiple things. I therefore would like code to be relatively "narrow". –  btilly Jan 1 '13 at 22:13
Our company internally uses 120 characters, because we know all developers have big enough screens (and usually 2). For published guidelines, it's not so easy to know what hardware the developers have. –  MSalters Jan 2 '13 at 16:39

1 Answer 1

up vote 8 down vote accepted

The Android style guide says

Limit Line Length

Each line of text in your code should be at most 100 characters long.

There has been lots of discussion about this rule and the decision remains that 100 characters is the maximum.

Exception: if a comment line contains an example command or a literal URL longer than 100 characters, that line may be longer than 100 characters for ease of cut and paste.

Exception: import lines can go over the limit because humans rarely see them. This also simplifies tool writing.

Chromium also uses these style guidelines, and I believe Guava uses something similar. All of these are derived at some point from Google's internal style guide which allows 100 columns. For example, the eclipse rule set from code.google.com/p/google-styleguide includes:

<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="100"/>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.