News for hackers. Stuff that matters.
Re:Software Engineering at Google (2020) [pdf] by ignoramous on Wednesday May 04, 2022 @02:19AM (#31257296)
While it might be true that 120 chars are ideal for screens [0], the consensus is an optimal line length is roughly 50 to 75 chars. [1]

[0] https://www.viget.com/articles/the-line-length-misconception...

[1] http://webtypography.net/2.1.2

Re:Software Engineering at Google (2020) [pdf] by kitsune_ on Wednesday May 04, 2022 @03:11AM (#31257628)
Yeah but line formatting usually includes white space indentation in the calculation of the line length, I don't know whether you can 1:1 translate findings from normal text paragraphs like that. With linted code the actual relevant length might only be 20 characters, maybe we need some smarter linters.
Re:Software Engineering at Google (2020) [pdf] by kozd on Wednesday May 04, 2022 @02:22AM (#31257323)
That seems to apply for blocks of text. I don't know that the same would hold true for code.
Re:Software Engineering at Google (2020) [pdf] by shakezula on Wednesday May 04, 2022 @02:34AM (#31257407)
What is code if not blocks of text
Re:Software Engineering at Google (2020) [pdf] by YokoZar on Wednesday May 04, 2022 @06:50AM (#31258752)
Sentences feel different from lines of code. "One statement doing one thing per line of code" seems a reasonable idea but "one sentence per line of text" seems a bit absurd.
Re:Software Engineering at Google (2020) [pdf] by tpush on Wednesday May 04, 2022 @02:46AM (#31257467)
A tree of nodes.
Re:Software Engineering at Google (2020) [pdf] by shakezula on Wednesday May 04, 2022 @08:57PM (#31268039)
And we model sentences the same way
Re:Software Engineering at Google (2020) [pdf] by cjg on Wednesday May 04, 2022 @06:43AM (#31258700)
Often significantly more indented.