5 ms·
I prefer 120 characters of width, modern monitors are wide-screen, I think it's ok to adjust a little to accommodate this reality.
by whoisthemachine 7y ago
I prefer 120 characters of width, modern monitors are wide-screen, I think it's ok to adjust a little to accommodate this reality.
- mclehman 7y agoMy monitor may be widescreen, but my editor typically isn't.
- JonathonW 7y agoSame here; 80 characters just feels too narrow to me in most cases. I'd rather see 100 or 120 characters of width and be less constrained, at the expense of maybe having to scroll if I've got multiple files open in my editor. I also usually run my terminals at 120 characters wide, FWIW.
- AstralStorm 7y agoIt's not like 80 is a hard width limit. The rule exists mostly to limit nesting and not text. More (nonredundant) text is better to a high degree. Likewise 24 line height limit should not include proper comments.
- gorgoiler 7y agoIf you haven’t already heard the counter argument, then it’s less about screen width and more about being able to view multiple pieces of code side by side (split window editing, and side by side diffs for code review.) It’s also important to accommodate people wanting to do this with large type sizes, which becomes important as eyesight deteriorates.
- manicdee 7y agoAll the editors I use have supported soft wrapping, so line length isn’t such an issue. For me it’s mostly about being able to grow each line of code without frying my brain like Perl’s leaning toothpick syndrome does.
- mark-r 7y agoI find wrapped code much harder to read, unless it's indented properly. The wrapping breaks the flow.
- babuskov 7y agoI hate soft wrapping. It makes the code much harder to read and reason about. Especially if someone else wrote it. I rather choose to scroll to the right to see long lines when needed.
- manicdee 7y ago(Extremely late edit: “grok” not “grow”)
- PunchTornado 7y agoOn most monitors today you can still have 120 characters and see 3 or 4 side by side tracks including the filesystem in another track.
- forgottenpass 7y agoHow big is "modern" these days? I have a multiple 22" 1920x1080 screens instead of one huge one, and after making the font as small as is still comfortable at my viewing distance I get 202 visible columns in maximized VS Code. At a still-workable but small enough size that I'll start unconsciously hunching at my desk I can get up to 271. Common laptop screen sizes are even more constrained. I also like to have one monitor turned to 1080x1920 for text editing and consoles. I'd never try to do a side-by-side diff on it, but it really makes you see just how many GUIs are downright wasteful of horizontal space.
- 0xffff2 7y ago2? sure. 3 or 4? Either you're using a monitor that's far outside the realm of "most" or your font size is set to a value far below the mean.
- PunchTornado 7y agoIn my experience the majority have 27 inches monitors. I have 3 of those at my desk, 2 vertical and one horizontal. it's a popular system from what I can see.
- 0xffff2 7y agoOh... you mean 3 or 4 across two or more monitors? That makes a bit more sense, but I find it an odd way to compare things. Obviously if you have n monitors you can fit at least n windows "side by side". (Also disagree about most people having 27" monitors, but I don't think that makes much of a difference)
- rypskar 7y agoYou don't even need a wide-screen monitor for that. I like to turn my coding screen 90 degrees, to portrait mode, to get more vertical space and still can see the line at 120 characters. I call it the TIE-fighter setup, the screen in the middle is in landscape mode and the two others are in portrait mode, gives a lot of screen-space without having to turn the head much to see it all
- bransonf 7y agoThis is my favorite monitor configuration and now I have a handy name for it, thanks!
- IggleSniggle 7y agoI also prefer the TIE-fighter setup, and didn't have a name for it until now. However, I find that 120 characters is too wide as soon as you want to do anything other than code on that screen.
- enriquto 7y ago> I call it the TIE-fighter setup, I have the exact opposite setup, with the vertical screen in front of me. How would you call that setup?
- lvturner 7y agoInverse TIE-Fighter?
- VistaBrokeMyPC 7y agoSatellite setup! (side monitors are solar panels?)
- enriquto 7y agonot as awesome as "TIE fighter setup", but it does the trick
- rypskar 7y agoMaybe Dumbo setup? The outer screens would be his ears. Not happy with the name, but best I could think of today. I'm a developer, so by definition bad at naming stuff. TIE-fighter setup is the lucky exception
- clarry 7y agoI'm using a 30" widescreen monitor and 8pt font. I get four tmux panes side by side, each with a little over 100 characters. I think getting an extra pane is worth way more than getting extra 20 characters of width per pane for the occasional long line. If it were up to me, I'd be happy to add a fifth pane and go for 80 columns. Unfortunately people at work picked long naming conventions and they're also writing massive functions with deep nesting :( I'd actually encourage a 80-character limit and deep indents (at least 4, preferrably 8 spaces) if only to force people to give their code better structure. I don't have a problem with long functions as long as they read straightforward, like a recipe from top to bottom, without too much branching and looping and jumping around. Unfortunately these massive deeply nested functions tend not to read straightforward at all.
- ProZsolt 7y agoI prefer 80/120. I try to write 80 character lines, but occasional 120 lines are accepted.