News for hackers. Stuff that matters.
Re:Front End Development Guidelines by bialecki on Thursday May 05, 2011 @09:09PM (#2519614)
This is good, but some of the advice isn't quite right. For instance "self" is a reserved keyword in JavaScript, so often people use "_self" instead. And camel casing variable names is right, unless they're constants, in which case "THIS_IS_A_CONSTANT" is more appropriate. Too nit picky?
Re:Front End Development Guidelines by M1573RMU74710N on Thursday May 05, 2011 @09:55PM (#2519708)
> camel casing variable names is right,

Personally I disagree. In my code-bases it's:

functions: doSomeThing()

constructor: new Foobar()

object/array/primitive: some_object

"constants": SOME_VALUE

I find that much more readable, especially when looking at code completion in the IDE, I can always tell whether a property is a method or not.

For example, you might have an object foo that has a property called isBar. I like being able to tell that that is a function that returns a true or false value, as opposed to is_bar which just holds the boolean value.

Re:Front End Development Guidelines by jacobolus on Friday May 06, 2011 @06:55AM (#2520608)
"self" isn't a reserved keyword in JavaScript...
Re:Front End Development Guidelines by leftnode on Thursday May 05, 2011 @09:41PM (#2519687)
And there's those of us who prefer lowercase unix_case_for_variable_names and function names over camel case.
Re:Front End Development Guidelines by taitems on Thursday May 05, 2011 @09:12PM (#2519621)
Nope, exactly the type of feedback I'm after. Thanks a lot!