Loading ...
Sorry, an error occurred while loading the content.

Re: [jslint] Re: Final backslash to wrap strings seems unsupported by JSLint (UNCLASSIFIED)

Expand Messages
  • Luke Page
    I think a wiki would be useful and agree that sometimes the error messages are a bit obscure to the problem - but often it has led me to really look at the
    Message 1 of 5 , Feb 22, 2011
    View Source
    • 0 Attachment
      I think a wiki would be useful and agree that sometimes the error messages
      are a bit obscure to the problem - but often it has led me to really look at
      the code, consider it and think about it rather than seeing a simple �do
      this instead� type error message.

      The other problem when writing a parser and error checker is that it is
      easier to test if something is right than try to consider all the many, many
      ways that people could write the code badly and then give truly appropriate
      advice.
      Having said that, there are a few small areas of JSLint I disagree with -
      but rather than make a long email about them, I take the fact that overall
      it has a very positive effect on code I run it against.
      On 21 February 2011 19:11, Jakob Kruse <kruse@...> wrote:

      >
      >
      > Erik,
      >
      > If you'd care to read my reply, you would see that my advice was to read a
      > book. I did. It answered most of the questions I've seen asked on this list.
      >
      > Would it be better if the contents of that book was available online, and
      > the relevant parts were hyperlinked from every JSLint message? Certainly!
      > But would you have done that, had you been the author?
      >
      > I've been using JSLint *a lot* for several years. I can honestly say that
      > you will benefit by just doing as it recommends. Even when you disagree or
      > don't understand. I'm not advising that you do this blindly, by all means
      > please make an effort to understand why. But even if you don't understand
      > the advice of JSLint, and Douglas is not forthcoming with yet another
      > explanation, it's still good advice. That was all I meant.
      >
      > That said, a wiki or stack exchange or something for a JSLint FAQ would be
      > a really nice addition. But I can't claim to provide that level of support
      > for the stuff I give away.
      >
      > /Jakob
      >
      > -----Oprindelig meddelelse-----
      > Fra: jslint_com@yahoogroups.com [mailto:jslint_com@yahoogroups.com] P�
      > vegne af Erik Eckhardt
      > Sendt: 21. februar 2011 18:40
      >
      > Til: jslint_com@yahoogroups.com
      > Emne: Re: [jslint] Re: Final backslash to wrap strings seems unsupported
      > by JSLint (UNCLASSIFIED)
      >
      > Jakob,
      >
      > In my opinion, "just do what you're told" is really poor advice. This kind
      > of mentality is exactly what has caused legions of people to propagate bad
      > programming practices for decades. Someone gets an idea about "that's just
      > the WAY you DO it" and it's all over after that. Systems Hungarian
      > Notation,
      > whatever.
      >
      > If you want to change the way programmers code, you have to change the way
      > they think. This won't be accomplished by "I told you so." If you want them
      > to be deliberate about choosing their methods and you want them to be able
      > to recognize new things that you've never taught them before, it won't come
      > through enforcing a list of rules.
      >
      > I greatly appreciate Douglas's work and the jslint tool. But I think his
      > attitude when responding to folks who aren't "up to his level" is a little
      > lacking. When I came here and asked a question about `continue`--which I
      > HAD
      > searched the internet for and read up on as much as I could--after an
      > initial "you shouldn't do that" I never heard from Douglas again even after
      > asking him a direct question, hoping to understand his rationale.
      >
      > What a waste! Here we have a programmer ready to have his mind filled with
      > supposedly Good Stuff and mostly all he got was Don't Do That,
      > Dummy--Douglas Has Spoken.
      >
      > Douglas, I for one bristle a bit at being told to be quiet and obey. If
      > your
      > goal is improving people's coding, you missed your chance with me by not
      > being willing to engage me a bit. What are your reasons for providing
      > JSLint
      > at all? If your goal is to help propagate good code practices in the world,
      > it is not being done in the most effective way. Being abrupt and
      > short-tempered may not put off the really dedicated aficionados, but why
      > offend people when you could be winning their minds and hearts instead?
      >
      > If you don't want to spend the time helping every person who might possibly
      > have a question, then exactly what was asked for seems the most efficient
      > way to impart the information: provide individual explanations of each
      > issue
      > with examples of why it is harmful to do otherwise. You could even make it
      > a
      > wiki-style thing open to only approved members from the JSLint list. Then
      > your conversations wouldn't just be lost to the jslint archives but encoded
      > into relevant and easy-to-access instructions to the unwashed masses...
      > helping them to wash their javascript just a little bit.
      >
      > Erik
      >
      > On Mon, Feb 21, 2011 at 8:52 AM, Jakob Kruse <kruse@...> wrote:
      >
      > >
      > >
      > > �JavaScript: The Good Parts� is a recommended read which explains most of
      > > these issues. If that doesn�t do it for you, you could consider just
      > > accepting that doing things the way JSLint recommends decreases the
      > > likelihood of errors in your source code.
      > >
      > > Also, a JSLint �error� is often just a violation of the better way to do
      > > something. Do not confuse them with JavaScript errors.
      > >
      > > /Jakob
      > >
      > >
      > > Fra: jslint_com@yahoogroups.com [mailto:jslint_com@yahoogroups.com] P�
      > > vegne af mathew
      > > Sendt: 21. februar 2011 17:44
      > > Til: jslint_com@yahoogroups.com
      > > Cc: Cheney, Edward A SSG RES USAR USARC
      > > Emne: Re: [jslint] Re: Final backslash to wrap strings seems unsupported
      > by
      > > JSLint (UNCLASSIFIED)
      > >
      > >
      > >
      > > On Mon, Feb 21, 2011 at 10:35, Cheney, Edward A SSG RES USAR USARC <
      > > austin.cheney@...> wrote:
      > >
      > > > > Yes, it would be great if each error had an error code you could look
      > > up
      > > > to see the explanation for why it's an error.
      > > >
      > > > Seriously?? This is a free software tool. Nobody is stopping you from
      > > > opening the JS and using CTRL + F on the text 'Problem on line'.
      > > >
      > >
      > > I don't know what tool you're talking about, but the source code for the
      > > JSLint I'm running doesn't contain explanations for why things are
      > errors.
      > >
      > > Searching for "Missing space between", for example, just finds
      > >
      > > ...
      > > missing_a_after_b: "Missing '{a}' after '{b}'.",
      > >
      > > missing_option: "Missing option value.",
      > >
      > > missing_property: "Missing property name.",
      > >
      > > missing_space_a_b: "Missing space between '{a}' and '{b}'.",
      > >
      > > missing_url: "Missing url.",
      > >
      > > missing_use_strict: "Missing \"use strict\" statement.",
      > >
      > > ....
      > >
      > > mathew
      > >
      > > [Non-text portions of this message have been removed]
      > >
      > >
      > >
      >
      > [Non-text portions of this message have been removed]
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >


      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.