Post 9hbHaXn1lpkYBa6ePY by codesections@fosstodon.org
 (DIR) More posts by codesections@fosstodon.org
 (DIR) Post #9hbG9LyrT7O1mt716G by codesections@fosstodon.org
       2019-04-08T14:18:01Z
       
       0 likes, 0 repeats
       
       When coding, what's your preferred line length?  Why?Related question: when sending plain-text emails, do you hard-wrap at a preferred line length (even though that can look odd with shorter soft-wrapping) or do you leave text unwrapped (even though that can be hard to read with no wrapping)?
       
 (DIR) Post #9hbGHMRjcZCHY4R4y0 by starbreaker@mastodon.sdf.org
       2019-04-08T14:19:23Z
       
       0 likes, 0 repeats
       
       @codesections I tend to wrap at 76 characters, so you can read it in a terminal.
       
 (DIR) Post #9hbGO1Bj3amxe17cqu by codesections@fosstodon.org
       2019-04-08T14:20:38Z
       
       0 likes, 0 repeats
       
       @starbreaker For both code and email?And why 76?  I thought most terminals show 80—is it to allow for quoting?
       
 (DIR) Post #9hbGS6B6RjcQHLmCVU by balrogboogie@ceilidh.space
       2019-04-08T14:21:10Z
       
       0 likes, 0 repeats
       
       @codesections I typically like to keep it at ~100 when coding, just because my monitors aren't that big and I don't like to horizontal scrollwhen emailing, I don't manually wrap. I tend to assume (possibly incorrectly) that other people have readers that will wrap appropriately, and I'd rather they view the email the way they'd like to, rather than dictating how wide it goes
       
 (DIR) Post #9hbGYqdackm26kJqwS by carbontwelve@d20hero.club
       2019-04-08T14:22:37.254534Z
       
       0 likes, 0 repeats
       
       @codesections I manually wrap code at approx 80 characters. I dislike wrapping on code as it makes it hard for me to visually see what is going on.As for email, text editing, etc I will normally resize the window to be about the same as 80 characters and then run with that letting it soft-wrap.
       
 (DIR) Post #9hbGZOMlDpVwiOhtQm by yisraeldov@mastodon.technology
       2019-04-08T14:21:56Z
       
       0 likes, 0 repeats
       
       @codesections 120, mostly because I work in #php  and the #psr2 says "There MUST NOT be a hard limit on line length; the soft limit MUST be 120 characters; lines SHOULD be 80 characters or less."Emails I don't hard wrap, I think that most people are using clients now that will soft-wrap for you.
       
 (DIR) Post #9hbGhm7Un2HKhdZ2pc by mgiagante@fosstodon.org
       2019-04-08T14:24:04Z
       
       0 likes, 0 repeats
       
       @codesections it's 80, since it's a standard for a lot of checkers. Although, I tend to benefit from it only sometimes since I use a lot of v-splitting in NeoVim.I leave text unwrapped since my emails are usually short.
       
 (DIR) Post #9hbGnATLfwDRg8MDGS by starbreaker@mastodon.sdf.org
       2019-04-08T14:24:06Z
       
       0 likes, 0 repeats
       
       @codesections For code, email, text that will go through a processor like pandoc or pdflatex, etc.TBH, I don't remember why after doing it for 20+ years. It's just a habit at this point.
       
 (DIR) Post #9hbGreK4dNynPs9jP6 by juliobiason@functional.cafe
       2019-04-08T14:25:58Z
       
       0 likes, 0 repeats
       
       @codesections When coding, 80. Reason: I write code more readable in 80 columns than trying to stuff a bunch of information in a 120 column line.Email... Sadly, not sending plain-text emails, but when I did, I also wrapped around column 80, using hard breaks (in VIM, `gq`).
       
 (DIR) Post #9hbGvfbNoumEXfAZSC by brandon@fosstodon.org
       2019-04-08T14:26:19Z
       
       0 likes, 0 repeats
       
       @codesections Preferred line length for coding is about 70 charactersEmails, I just let it wrap on its own, it's up to the reader to decide if it's hard to read for them or not.
       
 (DIR) Post #9hbH1sA42OgVEQLgp6 by codesections@fosstodon.org
       2019-04-08T14:27:53Z
       
       0 likes, 0 repeats
       
       @balrogboogie > I typically like to keep it at ~100 when coding, just because my monitors aren't that big and I don't like to horizontal scrollHa!  I've been seriously considering getting a *bigger* monitor so that I can work with ~100 character code more easily (since a lot of #rust) code is 100 chars wide.(I can fit ~160 chars on my current screen, so spiting my screen either means having to scroll on both buffers or having one buffer be tiny)
       
 (DIR) Post #9hbHIbbupI88p6M4hs by epilys@chaos.social
       2019-04-08T14:30:50Z
       
       0 likes, 0 repeats
       
       @codesections I use 80 columns exclusively because I'm used to it, and whenever I try to increase it makes reading uncomfortable.You have to retain backward compatibility anyways!
       
 (DIR) Post #9hbHONC5L8BZqf1V9E by codesections@fosstodon.org
       2019-04-08T14:31:56Z
       
       0 likes, 0 repeats
       
       @juliobiason > I also wrapped around column 80, using hard breaks (in VIM, `gq`).#til about the `gq` command—thanks, that looks super helpful :D
       
 (DIR) Post #9hbHaXn1lpkYBa6ePY by codesections@fosstodon.org
       2019-04-08T14:34:08Z
       
       0 likes, 0 repeats
       
       @epilys > You have to retain backward compatibility anyways! [picture of a punch card]Ha!  You know, the only programming either of my parents did was on punch cards.  Sometimes they don't understand what I'm talking about but other times they *really* do.
       
 (DIR) Post #9hbICvLgcw2AFzcQDo by uwehermann@fosstodon.org
       2019-04-08T14:41:01Z
       
       0 likes, 0 repeats
       
       @codesections I soft-wrap both code and mails at <= 80 chars, I work in 80x25 xterms and actual text consoles a lot, editing mails and code in vim and mutt.Only exceptions are when the code looks much more horrible when wrapped than in longer lines.Unrelated, but I don't do HTML email myself, and I have a filter which puts every incoming HTML mail in my spam folder by default.
       
 (DIR) Post #9hbIlaOqVUSXQ6cn0C by hugopoi@mastodon.hugopoi.net
       2019-04-08T14:47:18Z
       
       0 likes, 0 repeats
       
       @codesections @uwehermann I think arroud ~130 chars is good for me because I can scroll lot of lines very fast with this line length, and also have two file side by side on a 1920px screen, with email i do the same as code
       
 (DIR) Post #9hbIpZO0DXY1R186To by codesections@fosstodon.org
       2019-04-08T14:48:02Z
       
       0 likes, 0 repeats
       
       @uwehermann > I have a filter which puts every incoming HTML mail in my spam folder by default.I wish I could do that, but I'd miss too many emails from people who insist on using HTML (and probably soon AMP.  *sigh*)
       
 (DIR) Post #9hbK1jQonJqq1FoHEO by lihu@mastodon.social
       2019-04-08T15:01:26Z
       
       0 likes, 0 repeats
       
       @codesections 88, because that's the default for the autoformatter my team uses. Doesn't matter to me as long as it's consistent :)
       
 (DIR) Post #9hbMUVY5gllVGk3pbs by mansr@society.oftrolls.com
       2019-04-08T15:29:10Z
       
       0 likes, 0 repeats
       
       @codesections 80 columns max for code (rare exceptions permitted). If you need longer lines, it's usually a sign of bad code structure.For email, I prefer when I can make all the lines exactly the same length by choosing words very carefully.
       
 (DIR) Post #9hbMecun9lTb0iVJXk by codesections@fosstodon.org
       2019-04-08T15:30:59Z
       
       0 likes, 0 repeats
       
       @mansr > For email, I prefer when I can make all the lines exactly the same length by choosing words very carefully.So basically this: https://m.xkcd.com/276/
       
 (DIR) Post #9hbUJpin99HCHUUFpQ by kensanata@octodon.social
       2019-04-08T16:56:45Z
       
       0 likes, 0 repeats
       
       @codesections these days it’s about 120 characters in Perl, if I remember correctly.In emails, if I write plain text mails I use the default, ie. 72.
       
 (DIR) Post #9hbXWpT7hHlb7m2xLk by brennen@mastodon.social
       2019-04-08T17:32:42Z
       
       0 likes, 0 repeats
       
       @codesections code: i aim for the classic 78-80 chars, except in cases where it dramatically decreases legibility or leads to awkward structure.reasoning:a) it's a de facto standard, and a known good baseline for terminalsb) it's somewhere in the neighborhood of optimal reading width (well, probably 10 or 20 chars over, but 80 is a useful upper bound for code with room for indentation)mail: i tailor my behavior to venue/recipient, but in practice can often assume soft wrapping.
       
 (DIR) Post #9hbXa0EO8i2BN7fTEW by kungtotte@fosstodon.org
       2019-04-08T17:32:52Z
       
       0 likes, 0 repeats
       
       @codesections in the words of Raymond Hettinger (Python core dev): 90-ish.https://youtu.be/wf-BqAjZb8M
       
 (DIR) Post #9hbXegYciGX7nrMj2G by alcinnz@floss.social
       2019-04-08T17:34:08Z
       
       0 likes, 0 repeats
       
       @codesections I try to stick to 80 characters with 4-space tabs, though in actuality I probably end up at more like 90. I find longer lines difficult to read.Now I think about it I'm not sure what my answer to the email question.
       
 (DIR) Post #9hbXlqzEKtdKAxEF9M by aeveltstra@mastodon.social
       2019-04-08T17:35:26Z
       
       0 likes, 0 repeats
       
       @codesections @juliobiason I have used varying line lengths over time. I find a length between 80 and 100 characters quite productive. And that's mostly because sometimes I work using a smaller screen, that fits 80 characters quite nicely.   I do hard-wrap (or more accurately, I have my IDE hard wrap), which comes at the expense of taller procedure bodies.   My rule of thumb here is not line length. It's that lists should look like lists.
       
 (DIR) Post #9hcVKtS73RW1FpiNtY by chucker@mastodon.social
       2019-04-09T04:42:53Z
       
       0 likes, 0 repeats
       
       @codesections For my projects: I have guidelines set at 80 and 120. I do not soft-wrap. Lines should be <= 80, but for some cases like URLs of API endpoints (or other long string literals), 120 is OK.Outside my own code, I tend to soft-wrap.
       
 (DIR) Post #9hcVjX23Y8aExVH9Q8 by chucker@mastodon.social
       2019-04-09T04:47:21Z
       
       0 likes, 0 repeats
       
       @codesections oh, and for e-mail, I don’t use a monospace font because that doesn’t make sense to me — it’s text, not code — , so a fixed width doesn’t apply. Nor do I hard-wrap.
       
 (DIR) Post #9hhrScpjteUMoIepns by blindcoder@toot.berlin
       2019-04-11T18:44:18Z
       
       0 likes, 0 repeats
       
       @codesectionsWhatever makes sense to be put on a single line.I may have 200+ characters on an overly long if statement. I may hand wrap multiple conditions even at 30 or 40 characters.I don't think I've sent or received a text/plain only mail in years, as well.