[thelist] javascript debug (easy)

Jeff Howden jeff at jeffhowden.com
Mon Jun 6 19:05:08 CDT 2005


Chris,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Christian Heilmann [mailto:codepo8 at gmail.com] 
> 
> However, beginners _will_ look at your code and see it
> as a good example how to do it properly. And therein
> lies the danger.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

Well, whether beginners look at my code or not depends entirely on me.  If I
know that they'll be part of my audience, then I'll forego my usual style
and include every last optional curly brace.  However, if it's work-related,
beginners will *never* be involved in any of that and therefore I have no
need to take them into account.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> That is a YMMV decision. Personally, and working with a
> lot of ASP folk made that painfully aware to me, I'd
> rather have one line of comment than deal with function
> names like
> 
> getCurrentSettingOfThisInstanceWhenTheMoonIsHighAndTheWolfHowlsLonely()
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

If you find yourself *ever* needing a function *that* ridiculous, you've got
bigger problems in your project than comments, well-named variables and
functions, and being a curly-brace nazi can *ever* fix.  In all the time
I've worked in this industry I've *never* needed anything that verbose.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> Working a lot in a distributed development environment
> with developers in other countries and full project
> handovers to clients or from clients after years of
> mismangement and bad documentation made me appreciate
> clean code syntax - even when one or more parenthesis
> or curly bracket was superfluous.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

That's why I'm saying it's simply a personal style thing.  Surely the
ommission will have just as little overall effect on the end result as the
inclusion.  In the end, I'm not sure you could ever make a case for it
actually mattering one way or the other beyond personal taste/style.

 [>] Jeff Howden
     jeff at jeffhowden.com
     http://jeffhowden.com/



More information about the thelist mailing list