Hacker News new | ask | show | jobs
by ajarmst 2131 days ago
And, of course, ed is the default editor. :-) I exert geek dominance over introduction to C students by demoing using ed to modify a source file. After which I amuse myself for the remainder of the term: "Source Control? Syntax highlighting? Luxury! When I was young we had to hand-magnetize knitting needles and edit files one bit at a time directly on a Winchester drive!"

More seriously, I think the 80 column width is just too constraining with more modern languages that aren't remotely as terse as C–not to mention a limit that aggressively militates against in-line commenting. We also have monitors and fonts with resolutions that permit easily reading much denser use of the visual display. I mostly go with 120 chars now (in practice, that means that lines still won't wrap when I print source code files) and however many lines fit into the display pane.

1 comments

Even though 120 fits comfortably on the screen, I find it leads to sloppier code than 80 or 90. The latter exerts pressure to "do one thing per line, and make it neat."

Ime this is true of modern langs like ruby or javascript or Go, as well as older langs like bash. But I know this is a religiously contentious subject, so to each his own.

I like 80 for my Go projects.

Anecdotal, but- It does feel like a good visual approximation and when I start to run close to it I usually pause and figure out if that code needs attention.