Earlier quoted context omitted.
IMO 120 is the extreme limit but a good limit. Anything higher than 120 is to long and, personally, I'd ask for that to be fixed in a code review.
I just bought an ultrawide, and I just checked to see how wide my lines are in my code editor. 350 characters. When I'm coding for myself, I use all of that at times. I love that there are some things I no longer have to break onto multiple lines any longer. Also, if you have a ton of nested loops etc, then you don't end up with that problem where you can only see the first few characters of the deepest lines.
Is the 80 character line limit still relevant? (2008)
111–120 of 180 posts
Re: Is the 80 character line limit still relevant? (2008)
#112Earlier quoted context omitted.
> I agree this is terrible primarily because it muddles up any git-blame based workflow for debugging regressions. ...it occurs to me, this feels like you're conforming to the tool instead of the other way around. Is there a reason git blame doesn't have an "ignore whitespace" option? Is it harder than it seems?
I would think the issue is that if you format someone else's code, gitblame then sees you editing that code? Unless you can mark that commit as white space changes only somehow
https://gist.github.com/kateinoigakukun/b0bc920e587851bfffa9...
Re: Is the 80 character line limit still relevant? (2008)
#113Re: Is the 80 character line limit still relevant? (2008)
#114A couple years ago I had a pinched nerve in my cervical spine that prevented me from doing desk work so I built a supine workstation that used an ipad as the screen. I found that the 80 character limit was very helpful in that situation and I wonder how many other disabled devs might agree, especially those with vision issues.
Re: Is the 80 character line limit still relevant? (2008)
#115One minor advantage which wasn’t so relevant in 2008: 80 character lines are much easier to read on a smartphone. This is especially true for Safari on iOS, which always seems to make bad wrapping / sizing decisions with plain text. ETA: thinking back on it, several years ago I switched from 120 characters to 80 specifically because of this. I don’t have a car, so I read a lot of code on my phone while taking public…
Someone else is going to be weird and want to look this up so I'll save you the trouble. Yes, aithrowawaycomm's claim about line lengths are supported by many, many different sources who recommend a 50 to 80 character line length. https://duckduckgo.com/?q=reading+optimal+line+length IMHO, 80 characters is too narrow, especially with Python, for most coding tasks so I settle more around 100 (+-20) characters. PEP-8 s…
> especially with Python
What is special about Python in this case?Re: Is the 80 character line limit still relevant? (2008)
#116One minor advantage which wasn’t so relevant in 2008: 80 character lines are much easier to read on a smartphone. This is especially true for Safari on iOS, which always seems to make bad wrapping / sizing decisions with plain text. ETA: thinking back on it, several years ago I switched from 120 characters to 80 specifically because of this. I don’t have a car, so I read a lot of code on my phone while taking public…
Took me a second to realize ETA was "edited to add." I was very confused on what an estimated time of arrival meant, here. :) I'm surprised reading on a phone is common. Not at all something I would want to do. I'm assuming largely read only there? Makes me curious if the CWEB idea of styling specifically for reading has extra merit in that flow?
Re: Is the 80 character line limit still relevant? (2008)
#117Earlier quoted context omitted.
I don’t know how “common” it is, but (like I said in my comment) the only reason I read code on my phone is that I am often on a bus or a subway. The comment about assuming I only read on my phone is bizarre: you are putting words in my mouth for reasons I do not understand. When it comes to books I like paper, and I usually read long PDFs on a tablet.
Sibling post is correct. I meant that as a question on if you edit while on the phone.
Re: Is the 80 character line limit still relevant? (2008)
#118The penultimate paragraph of the article really shows its age. When there are unclear or conflicting rules ... [y]ou can end up with hilarious games like formatting tennis ... Back then, formatters were rarely used, if at all. The major benefit of tools like gofmt, Prettier, etc. is that a major source of vacuous commits and code review has gone away. In the case of Prettier, bikeshedding can still happen over the .p…
Re: Is the 80 character line limit still relevant? (2008)
#119Sticking with 80 characters has been great for my team. Not only does it encourage shorter lines, but comparing diffs on GitHub ensures that both old and new comparisons fit evenly on the page without any cutoffs or wrapping
What kind of monitors does your team use? I view diffs side-by-side all the time with much wider lines than 80 chars, but I have 27" monitors, which are not unusual these days.
Re: Is the 80 character line limit still relevant? (2008)
#120Earlier quoted context omitted.
I love how everytime this debate comes up, the 80 character gang keeps adding more stuff to put side by side. Now we're shrinking the resolution/sizes of the devices we are using to justify it...
Gotta admit a three-way side by side diff/merge is glorious.