Earlier quoted context omitted.
CWEB?
https://tug.org/docs/latex/cweb-latex/cweb-user.pdf
Is the 80 character line limit still relevant? (2008)
171–180 of 180 posts
Re: Is the 80 character line limit still relevant? (2008)
#172I maintain 80 characters in order to edit files side by side on a laptop screen without side scrolling. I seem to grok code better vertically too.
If you soft wrap you can avoid scrolling inn this case for any line length without negatively impacting the case of a single file
Re: Is the 80 character line limit still relevant? (2008)
#173> formatting tennis That's a paddling. Seriously, professionals do this? If someone else wrote it and it does what it is supposed to do, it is not, NOT (no apologies for shouty emphasis), my job to change that. (I hate tabs, but will never :retab someone else's code.) My job is either/both to fix bugs and add new capabilities, not to be precious about, well, anything. I would have serious reservations about any team…
Since we’re already on a Holy War About Arbitrary Things topic (and at the risk of igniting the whitespace wars anew), do you mind expanding on this? > I hate tabs This opinion seems common but I haven’t seen a practical argument against tabs among practical arguments (for an admittedly niche situation) in favor of tabs. This seems an appropriate place to ask about it.
Consider this example:
def someFunctionName(Int firstParameter, Boolean secondParameter, String thirdParameter)
Let's say, that line is too long. We could format it like this: def someFunctionName(Int firstParameter, Boolean secondParameter,
String thirdParameter)
Or we could format it like this: def someFunctionName(Int firstParameter, Boolean secondParameter,
String thirdParameter)
Or event his def someFunctionName(Int firstParameter,
Boolean secondParameter,
String thirdParameter)
In the second two variant the indentation depends on the length of someFunctionName, so it is not necessarily a multiple of four or whatever your tab width is.There are other similar situation when aligning in multiple columns, etc.
Re: Is the 80 character line limit still relevant? (2008)
#174Earlier quoted context omitted.
Actually no I don’t want to be able to work like that on a laptop monitor. I’d rather optimize my full screen real estate. There in lies the conflict.
Since in most cases, most lines don't even reach 80 characters, or they're long enough to still wrap at 120, there's not a lot of optimization going on. Going from 80 to 120 will net you, what -- an extra 2 or 4 lines in your viewport? It's not worth the optimization when you lose so much for the reasons I described.
I also tend to work on a single file at a time versus trying to view multiple files side by side. But when I do want to do that, I'm not trying to work on a laptop monitor, so I have 2 monitors for that use case.
The white space I have available but typically don't use, simply doesn't bother me. I like some white space, I'm not seeking out density as some productivity hack, I can tab to another file when I want to see it, seeing them both at same time isn't a huge requirement of mine.
It sounds like you have a job that has you frequently doing code jams on a tiny monitor (why? you got pulled into someone's office? you coding on a train?) so this works for your normal situations. You're not understanding that I avoid those situations. I code from a desk with a full setup or I don't code, I take notes about what changes need to be done when I get back to coding.
Re: Is the 80 character line limit still relevant? (2008)
#175Earlier quoted context omitted.
i don't think that guideline is correct, it's "the shorter your line lengths, the less your eye has to travel to get back to the left margin , the quicker and more error free you'll find the next line" and no similar idea occurs vertically, save that it is already mediated by vertical section markers. (I very frequently wish that hitting page down would show me a distict mark where the previous bottom of screen is no…
Maybe, though I've also read fundmentals care about eye strain, where distance could matter? > hitting page down would show me a distict mark where the previous bottom of screen is now) For a literal page down the last line would literally become the first line, but yeah, that's the mark/animation that could be useful for when it's not a page
Re: Is the 80 character line limit still relevant? (2008)
#176Earlier quoted context omitted.
In new projects I usually add an empty .prettierrc file with a single comment: // Empty file. Use default Prettier settings. No rules here. To make it clear for other people that it was not just a mistake that the formatter was missing its configuration or that no config file existed at all. Useful to deter from adding new rules because someone is capricious about their own preferences...
Maybe even add a CI step that closes PRs if someone modifies formatter config files.
Re: Is the 80 character line limit still relevant? (2008)
#177Earlier quoted context omitted.
All of my main external displays are 27". The diffs fit perfectly on them with the 80 character limit
You must have your text size set to 18pt or something, because I can easily fit 3-4 columns of 80-char text on my 27" monitors.
Re: Is the 80 character line limit still relevant? (2008)
#178>at a comfortable 10 point font size. How lovely for you. As someone with significantly impaired vision, even when corrected, I have my font size set to 18, thank you very much. A coding standard that assumes a 10 point font size would violate the Americans with Disabilities Act's 'reasonable accommodation' mandate. I wasn't pushy enough to act on it, but it sure pissed me off when my fellow team members blew off my…
I try and maintain 100 char width in most code, because I feel like it makes people more concise. I’m curious on several statements you made, please take these as genuine and well intended questions: what’s wrong with two space indent? Would a bigger monitor with higher DPI solve some of these issues? Have you considered a horizontal scroll wheel or similar? I think this is a Band-Aid to a bad pattern, but may be a l…
Bigger monitor with higher DPI does help, yep.
Horizontal scroll: I suppose it could help. The more immediate tradeoff tends to be that I use a terminal full width on a large monitor when needed, and tolerate the fact that I'd prefer to have space to have a web browser open on the same screen.
I'm a big fan of Sandy Metz, who advocates 5 line routines. In Python and Ruby, this is possible, and the indentation problems go away. In C, it's more of a challenge.
Re: Is the 80 character line limit still relevant? (2008)
#179>at a comfortable 10 point font size. How lovely for you. As someone with significantly impaired vision, even when corrected, I have my font size set to 18, thank you very much. A coding standard that assumes a 10 point font size would violate the Americans with Disabilities Act's 'reasonable accommodation' mandate. I wasn't pushy enough to act on it, but it sure pissed me off when my fellow team members blew off my…
> A coding standard that assumes a 10 point font size would violate the Americans with Disabilities Act's 'reasonable accommodation' mandate. Would it? I don't think having to make all my lines 44% shorter than they should be is reasonable; that's going to be a massive impingement on productivity.
Re: Is the 80 character line limit still relevant? (2008)
#180Earlier quoted context omitted.
> A coding standard that assumes a 10 point font size would violate the Americans with Disabilities Act's 'reasonable accommodation' mandate. Would it? I don't think having to make all my lines 44% shorter than they should be is reasonable; that's going to be a massive impingement on productivity.
44% shorter: is your claim that limiting line lengths to 80 or 100 characters is going to 'massively impinge' your productivity? That seems unlikely to me.