[thelist] javascript debug (easy)

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Mon Jun 6 15:41:05 CDT 2005

> In my opinion, this is one of those coding standards that's strictly for
> newbies and those uncomfortable with script syntax.  Once you become
> comfortable with scripting, there's no reason to include curly braces in
> situations where they are optional.

Well, if there is too much stress on you due to deadlines; if your
project has been released before fully being alpha-tested and you are
fighting with customer complaints; such that your telephone has a ring
frequency higher than the CEO's secretary's,
and if your average sleep per day has dropped to 4 hours for the last
week; it is quite possible to you are prone to making mistakes.

I consider myself an experienced-enough javascript / java / c# / web
developer. And I surely know, and can use the tertiary ( ? : )
shorthand notation instead of "if else"s. I can omit non-necessary
curly braces, non-necesary parantheses etc.

But, I've found that writing clear and non-error prone (call it
newbie-style) code saves me hours!

I've been leader/co-ordinator of 4-10 people development teams in two
different companies, and I've seen tons of different coding styles.

I admit, putting curly braces and parantheses here and there and
everywhere is an extreme point.

But there is another extreme: 
Putting x?y:z style notations all around, say replacing all if elses
with tertiary equivalents,
Removing all curly braces, removing all non-necessary spaces, so that
only the indentation is visible, but there is no single so-called
unncessary space.
no logical code groups, whatsoever exist.
I've seen those minimalists struggle for finding an obvious mistake in
code for hours.

imho, coding is writing a letter, or more a poem. 
Everthing should be as clear and understandable as possible.


More information about the thelist mailing list