Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I like green-screen programming personally. Most of my breaking up of long functions/methods/procedures were if my code extended too often beyond 72 characters.

With 16:10 & 16:9 monitors today and our PuTTY screens with nice large fonts and much wider than 80 chars allows for much more comfortably deeper-indented functions, I've noticed this in many codebases of late.

Today, is there a new 80x24 optimal size for coding?

alt text

share|improve this question
Possible duplicate: programmers.stackexchange.com/questions/604/… – bigown Sep 30 '10 at 12:32
The other question is asking if it's still relevant; this question is asking what the better alternative is. To be honest, this question is more useful. – user8 Dec 12 '10 at 0:35

closed as not constructive by ChrisF Feb 14 '12 at 8:39

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

1 Answer

up vote 5 down vote accepted

Longer identifiers and more complex coding constructs (I'm thinking of lambda expressions and extension methods in C#) do tend to push the righthand margin out somewhat, though the trend towards very small methods (5-7 lines) with expressive names does serve to mitigate this.

I tend to set a margin in my IDE at 99 characters, and to try to keep all code within that, though I treat it as a soft boundary and don't sweat too much over the occassional line going wider.

Why 99 characters?

Because code doesn't always stay on screen - sometimes it's useful to print out code for a (personal or peer) review. With an A4 page, 10mm margins, Courier New @ 9pt, 4 digit line numbers and some whitespace, you have room for 99 characters of code.

There's another factor to consider - I'm really agressive about seeing as much of my code as I can in one go - a 9pt font on a 1200px high screen is really good. But, I don't let the fact that I see lots of code at once tempt me into puttint lots of code in one method.

share|improve this answer

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