News for hackers. Stuff that matters.
Re:Code Standards & Front-end Development Best Practices by melvinram on Wednesday March 16, 2011 @09:53PM (#2334764)
The difficulty with such "standards" and "best practices" is that what is standard can often be subjective. For example, under Indentation, they have:

  For all code languages, we require indentation to be 
  done via soft tabs (using the space character). Hitting 
  Tab in your text editor shall be equivalent to four spaces.
Umm, who died and made you king? <tongue and cheek> I don't like using 4 spaces. I find it a waste of space, literally. In ruby community, 2 spaces is generally accepted.

With that said, it's probably not a bad idea to have discussions around such standards with the understanding that there may be more than one good way to skin a cat.

Re:Code Standards & Front-end Development Best Practices by shoeless on Wednesday March 16, 2011 @10:01PM (#2334788)
But they have a standard, and this is good for consistency across their development. What may be better is "follow the standard that you are working on", meaning, don't change coding style because you prefer your own, adopt what is already there, or the norms for a project (e.g. 2 space indents for all that Ruby code we have).
Re:Code Standards & Front-end Development Best Practices by pstinnett on Wednesday March 16, 2011 @10:11PM (#2334812)
Agreed. Maintaining consistency is key.
Re:Code Standards & Front-end Development Best Practices by insin on Thursday March 17, 2011 @06:41AM (#2335667)
On that note, I like the parting words in Google's JavaScript Style Guide ( http://google-styleguide.googlecode.com/svn/trunk/javascript... ):

BE CONSISTENT.

If you're editing code, take a few minutes to look at the code around you and determine its style. If they use spaces around all their arithmetic operators, you should too. If their comments have little boxes of hash marks around them, make your comments have little boxes of hash marks around them too.

The point of having style guidelines is to have a common vocabulary of coding so people can concentrate on what you're saying rather than on how you're saying it. We present global style rules here so people know the vocabulary, but local style is also important. If code you add to a file looks drastically different from the existing code around it, it throws readers out of their rhythm when they go to read it. Avoid this.

Re:Code Standards & Front-end Development Best Practices by bauderjoshua on Thursday March 17, 2011 @08:43AM (#2335928)
I second that consistency is something that is lacking in web development at the moment
Re:Code Standards & Front-end Development Best Practices by ldh on Thursday March 17, 2011 @10:51AM (#2336247)
Coding standards are helpful and not uncommon when collaborating within a team.

As much as you don't like using 4 spaces, it's much worse to have a codebase littered with some sections using 4 spaces, some sections using tabs, some sections using 2 spaces, some sections using 8 spaces, and some sections using a random assortment of nothing in particular.

Just as you accept the apparent standard of 2 spaces when working within the Ruby community, for consistency's sake I'd hope you would accept the standard of whatever other team you're working with.

Re:Code Standards & Front-end Development Best Practices by Seth_Kriticos on Thursday March 17, 2011 @05:19AM (#2335532)
I agree. I personally like 8 spaces, but I code in a way so others can choose their own preferences. Meaning, I use the tab character and avoid ASCII art in my source / comments. This way people can set up their tab width in their editor as they like and don't have to put up with my style de jure.

That's part of collaboration basics:

* Try to find an acceptable middle ground for the minor things and focus on coding and not politics.

* Don't be a douche.

~2ยข

Re:Code Standards & Front-end Development Best Practices by technomancy on Wednesday March 16, 2011 @11:31PM (#2334968)
Count your blessings that you work in a language that doesn't have ambiguity around indentation rules. These poor fellas obviously don't.
Re:Code Standards & Front-end Development Best Practices by rob_react on Thursday March 17, 2011 @11:13AM (#2336359)
Hey,

Isobar front end engineer here...

What you're looking at is a document that serves as OUR internal standard. We just made it public because we think people might find it useful. We understand what we do internally may not work for everyone, but that's part of the fun of sharing documents like this. We learn too.