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

I really hate other people's style-guides. Most of it is common-sense, but there's always some aspect or another that really grates against my preferences, e.g. "Keep lines fewer than 80 characters" is a pet hate; when did we return to Green-screen terminals?? My current company enforces this, and it often creates worse multi-line dischord cf. adding an extra 10 to 20 char's to the current line.

And "Read other style guides and apply the parts that don't dissent with this list" is a little too arrogant for any coder in the entire world -- perhaps should be "Replace any parts of this list that don't conform to your style".



Actually, I find limiting to ~80-100 chars makes code more readable.

On a 24" screen I like to have 2-3 files open side by side.

Having to scroll down is no big deal, scrolling sideways is pretty awkward. It also makes diffs harder to read if lines are too long.

I certainly wouldn't argue for a hard limit of 80, but I find it's generally a good idea to break up lines if they're getting too long.


That's kind-of the point: emphasis should be on readability, not "this long, and no longer!", and that applies to all points in any style-guide, i.e. it's a "guide" not a rule-book.




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

Search: