I'm a software engineer working as a full-stack developer using JavaScript, Node.js, and React. I write about my experiences in tech, tutorials, and share helpful hints.
80 characters per line is a common one. I feel that this is an old practice from technical limitations that lived on. I do not go overboard with extremely long lines of code, but with widescreen monitors, 80 characters seems a bit limiting.
I'm a software engineer working as a full-stack developer using JavaScript, Node.js, and React. I write about my experiences in tech, tutorials, and share helpful hints.
A 'driven' software engineer with a passion for cars and tabletop games. Get it, driven? Because cars and... Okay, I'll stick to writing code instead of puns. 🏁
If I remember correctly that stemmed from the COBOL era where a punch card only had a certain number of characters across plus a blank column (the fourth I think?) for the sorting wheel to put cards in order.
I don't think I've ever adhered to a certain number of characters in C#.
I think 80 is just for encouraging good practices. Some people tend to ignore soft recommendations like "don't go overboard", but will follow hard limits.
same here, 80 chars are visible in 3 columns at 1080p; and also 1 vim column + browser without triggering the "small screen websites format". By the way, i3 + nVim is perfect
It's not just a technical issue. longer lines are harder for the human mind to parse out. In text, 50-60 characters are ideal. I think more than 80 in code is pushing it. Having said that, I agree that it's not something to be too dogmatic over. We have our linter set to 125 cpl.
I'm a software engineer working as a full-stack developer using JavaScript, Node.js, and React. I write about my experiences in tech, tutorials, and share helpful hints.
I have heard of the 50-60 being ideal, but I thought that was more for reading sentences than text in general. I could be wrong though, I haven't looked at the studies on it.
Over 80 characters per line means project is written in some ancient language. For example Java.. or other older strongly typed language where it's occasionally impossible to make code nice & readable 😅
That, or there is some bigger issues in code structure.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
80 characters per line is a common one. I feel that this is an old practice from technical limitations that lived on. I do not go overboard with extremely long lines of code, but with widescreen monitors, 80 characters seems a bit limiting.
Erm, nobody insists on that anymore so no, not common at all - it's long been revised to 120.
Popular linters and formatters for JavaScript default to 80 characters:
eslint.org/docs/rules/max-len
prettier.io/docs/en/options.html#p...
Like everything else about JavaScript, This limit is regressive at best.
If I remember correctly that stemmed from the COBOL era where a punch card only had a certain number of characters across plus a blank column (the fourth I think?) for the sorting wheel to put cards in order.
I don't think I've ever adhered to a certain number of characters in C#.
Plus, in the 80s graphic cards the standard text mode was 80 columns X 24 lines.
I think 80 is just for encouraging good practices. Some people tend to ignore soft recommendations like "don't go overboard", but will follow hard limits.
I appreciate code that has an 80 char limit, means I can put two code panes next to each other without having to put the font eyebleedingly small
My coworkers use huddled terminals in an i3 workspace and with Vim, they appreciate having 80 characters per line.
same here, 80 chars are visible in 3 columns at 1080p; and also 1 vim column + browser without triggering the "small screen websites format". By the way, i3 + nVim is perfect
I prefer 120 characters, and stay pretty strict on that limit. 80 chars definitely is not enough, but I do like having a hard limit on line length.
80 characters per line is horribly outdated, it would make most of my code look ugly especially in a more verbose language like PHP.
120 characters per line is fine, that's much more okay.
It has another use case: showing code on a presentation (you need to increase the base font size) keeps your code formatted and in the screen.
Yeah, multiple screens are common nowadays. Super long line is not encouraged. For easy reading I prefer 120~130.
It's not just a technical issue. longer lines are harder for the human mind to parse out. In text, 50-60 characters are ideal. I think more than 80 in code is pushing it. Having said that, I agree that it's not something to be too dogmatic over. We have our linter set to 125 cpl.
I'm pretty fond of 80 characters being the limit.
I have heard of the 50-60 being ideal, but I thought that was more for reading sentences than text in general. I could be wrong though, I haven't looked at the studies on it.
Over 80 characters per line means project is written in some ancient language. For example Java.. or other older strongly typed language where it's occasionally impossible to make code nice & readable 😅
That, or there is some bigger issues in code structure.