[thelist] javascript debug (easy)
Christian Heilmann
codepo8 at gmail.com
Mon Jun 6 18:26:05 CDT 2005
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > It is very easy to learn JavaScript, as you instantly
> > get results in your browser. If you start sloppy, you'll
> > just need to learn more later.
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> Conciously choosing to omit optional curly braces does not mean you're
> sloppy. Also, never once did I say this was a good idea for a beginner or
> someone not comfortable with scripting.
However, beginners _will_ look at your code and see it as a good
example how to do it properly. And therein lies the danger.
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > You could apply the same logic to commenting. Why
> > comment when the code is easy enough to understand?
> > Because you cannot expect the next developer to have
> > the same skill level you have and it speeds up
> > handovers.
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> There's also the crowd that believes that if your code is written clearly
> enough that over-commenting actually makes it more difficult to manage as
> all the comments break up the natural rhythm you get when parsing the code
> by eye. In other words, learn to write self-documenting code by using
> descriptive variable and function names. In my opinion ever little line of
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()
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.
--
Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/
More information about the thelist
mailing list