I'd recommend adding: * Alphabetize properties within each CSS rule To here: https://github.com/styleguide/css
I strongly prefer logically grouping related styles. The only advantage from alphabetizing rules is perhaps slightly faster scanning of rules, but I don't think it is even very helpful in doing that. You generally don't have that many rules in a single style anyway so it's not a problem that needs solving. However, by grouping related styles I think there are a some small yet worthwhile advantages. Grouped styles can…
The GitHub Styleguide
31–40 of 82 posts
Re: The GitHub Styleguide
#32No mention of the maximum line length in the Ruby style guide. Sigh...
Re: The GitHub Styleguide
#33After reading this, I just want to say that I do not think semicolon-less javascript is, in general, a good idea. Development projects are almost always team efforts. And, unfortunately, there's almost always one or two team members who aren't very good. Some of you folks that only work on startups with brilliant people might disagree, but in my experience most development teams have some bad apples who have let thei…
Yeah, you save one character per line, and gain a lot more in cognitive friction. Words to live by: "don't make me think" even about whether or not I need a semi-colon here.
Once you get into the habit, it requires zero extra effort. You just know when to put them in, same way you just know when to use parens vs curlies.
Coding with semis is like coding with parens around every expression; unnecessary and paranoid.
Re: The GitHub Styleguide
#34No mention of the maximum line length in the Ruby style guide. Sigh...
Re: The GitHub Styleguide
#35Re: The GitHub Styleguide
#36Earlier quoted context omitted.
They actually don't provide a justification. That blog makes the argument that omitting them is harmless. Neither GitHub nor the blog make an argument for why you should omit them, however.
Do you use semicolons in Ruby, Python, shell, or other semicolon-less language where semicolons are allowed? If not, what's your justification for omitting them?
Re: The GitHub Styleguide
#37Earlier quoted context omitted.
They actually don't provide a justification. That blog makes the argument that omitting them is harmless. Neither GitHub nor the blog make an argument for why you should omit them, however.
Do you use semicolons in Ruby, Python, shell, or other semicolon-less language where semicolons are allowed? If not, what's your justification for omitting them?
Re: The GitHub Styleguide
#38Re: The GitHub Styleguide
#39Earlier quoted context omitted.
Yeah, you save one character per line, and gain a lot more in cognitive friction. Words to live by: "don't make me think" even about whether or not I need a semi-colon here.
Dropped semicolons about 6 months ago and haven't had a problem even once. Once you get into the habit, it requires zero extra effort. You just know when to put them in, same way you just know when to use parens vs curlies. Coding with semis is like coding with parens around every expression; unnecessary and paranoid.
> Coding with semis is like coding with parens around every expression;
> unnecessary and paranoid.
Unless, of course, one is using Scheme or some other Lisp variant.Re: The GitHub Styleguide
#40After reading this, I just want to say that I do not think semicolon-less javascript is, in general, a good idea. Development projects are almost always team efforts. And, unfortunately, there's almost always one or two team members who aren't very good. Some of you folks that only work on startups with brilliant people might disagree, but in my experience most development teams have some bad apples who have let thei…
Yeah, you save one character per line, and gain a lot more in cognitive friction. Words to live by: "don't make me think" even about whether or not I need a semi-colon here.
The guide doesn't have anything about brackets and spacing on function calls (maybe because it's dropping the language).