Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

France named Basile Bouchon invented a way to control a loom using perforated paper tape in 1725. The descending lineage can be traced to 80-column terminals:

https://dave.autonoma.ca/blog/2019/06/06/web-of-knowledge/

In his Elements of Typographic Style, Robert Bringhurst suggests that 66 characters per line, including spaces, for single-column pages is optimal:

https://dave.autonoma.ca/blog/2020/04/11/interior-book-desig...

What studies have reviewed code quality versus line length? Or eye fatigue versus line length? Or comprehension versus line length? Are their any studies that attempt to approach optimal line length empirically?

My preference is to indent 2 spaces rather than 4, which allows a lot of code to fit within 80 columns. When and why did 4 spaces became the norm?



4 spaces allows you to have manual line wrapping, for example: if (a < b || b < c || ... || d < e || ... ) Do something.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: