Arc Forumnew | comments | leaders | submitlogin
1 point by rocketnia 4641 days ago | link | parent

I don't quite know why, but I like to be pretty strict. I keep every line at 70 spaces long or less, with tab stops every 4 spaces, except for the following scenarios:

- Commented-out lines of code.

- A line of code that just can't be broken up any further. But first I try to move this line to a less indented part of the code, and then I remove other indentation on the line until it fits the best it can.

- Code that someone else has already made too long by my judgment. I try not to change someone else's style if my cosmetic change would obscure the meaningful changes I'm making, or if it would introduce inconsistency in the codebase. In this case the codebase includes any part of the revision history, branches, forks, and related projects that might be reintegrated.

In college I used 80 spaces, but that turned out to be too long to fit on my Wordpress layout without scrolling.

---

I thought it was also too long for Arc Forum, but it seems that's not true. Looks like Arc Forum supports 83 characters, at least on my user agent.

  (---10---)(---20---)(---30---)(---40---)(---50---)(---60---)(---70---)(---80---)1234
-

  (---10---)(---20---)(---30---)(---40---)(---50---)(---60---)(---70---)(---80---)123
When I switch from Chrome to Firefox, it looks like the 84-character line doesn't scroll anymore. In general, I bet it depends on the browser's default fonts and such.