Learning Javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Elizabeth Barnwell

    Learning Javascript

    We've built this tool to help with the process of learning programming
    languages. You can use material on the site, or add your own to study.
    We've just rolled out a lot of changes to YoYoBrain, so feedback is
    much appreciated.


    Thanks,

    Elizabeth
  • Peter Michaux

    #2
    Re: Learning Javascript

    On Aug 8, 11:38 am, Elizabeth Barnwell <elizabethbarnw ...@gmail.com>
    wrote:
    We've built this tool to help with the process of learning programming
    languages. You can use material on the site, or add your own to study.
    We've just rolled out a lot of changes to YoYoBrain, so feedback is
    much appreciated.http://www.yoyobrain.com/subjects/show/240
    The presentation has changed but the content hasn't seemed to change
    which would be of interest to the contributors to
    comp.lang.javas cript. It seems as through previous feedback about
    content has not resulted in change.

    <URL: http://groups.google.c om/group/comp.lang.javas cript/browse_frm/thread/148ef2fbbe5190a 2/c0d02e1af7305ff e#c0d02e1af7305 ffe>

    Peter

    Comment

    • dhtml

      #3
      Re: Learning Javascript

      Peter Michaux wrote:
      On Aug 8, 11:38 am, Elizabeth Barnwell <elizabethbarnw ...@gmail.com>
      wrote:
      >We've built this tool to help with the process of learning programming
      >languages. You can use material on the site, or add your own to study.
      >We've just rolled out a lot of changes to YoYoBrain, so feedback is
      >much appreciated.http://www.yoyobrain.com/subjects/show/240
      >
      The presentation has changed but the content hasn't seemed to change
      which would be of interest to the contributors to
      comp.lang.javas cript. It seems as through previous feedback about
      content has not resulted in change.
      >
      Good point.

      A link from this newsgroup will get the YoYoBrain site some incoming links.

      A lot of the questions aren't good flashcard questions. A lot of the
      answers are wrong. Peter already pointed out in an earlier thread.

      Here's just an example of a few wrong answers:

      Q: What is ECMAScript in JavaScript
      A: standard extension for JavaScript that extends methods for processing XML

      Q: Form element property to grab the value of the element - like text in
      input box
      A: value

      Q: How do you avoid using the brittle position dependent arrays to get
      at form elements:

      document.forms[0].elements[
      A: use the name attribute for the tags, so if you had a form signup with
      a field first_name

      document.signup .first_name

      Q: Form element property to grab the form that the element belongs to
      A: form

      Q: How do you grab an array of all the input elements on a form
      A: elements[] array

      Q: Event property that gives the current node on which the event is
      responding - which may be different from the target of the event
      A: currentTarget

      All wrong. I'd say about half of the information there is wrong. SOme of
      the questions have misinformation in them, so they can't really honestly
      be answered. The whole thing reminds me of one of a technical quiz I
      took about 8 years ago at an employment agency. I had to guess as to
      what sort of answer the question was expected to have, even for totally
      wrong questions.

      Some of the topic material ought to give more in-depth references to
      support the answers, along with a clear, valid example, like [more-info]
      [example]. Writing examples and reading references will help the authors
      learn what they're teaching better.

      There is a wide range of material covered. This is a good thing. I
      disagree with the choice to include tutorials on libraries such as
      Prototype and Scriptaculous. It would be a good idea to cover standards
      and browser implementations .

      Garrett
      <URL: http://groups.google.c om/group/comp.lang.javas cript/browse_frm/thread/148ef2fbbe5190a 2/c0d02e1af7305ff e#c0d02e1af7305 ffe>
      >
      Peter

      Comment

      • Thomas 'PointedEars' Lahn

        #4
        Re: Learning Javascript

        dhtml wrote:
        A lot of the questions aren't good flashcard questions. A lot of the
        answers are wrong. Peter already pointed out in an earlier thread.
        >
        Here's just an example of a few wrong answers:
        The answers are not all wrong, but some questions are and some questions are
        worded imprecisely.
        Q: What is ECMAScript in JavaScript
        A: standard extension for JavaScript that extends methods for processing XML
        The answer is correct for the question "What is E4X in JavaScript 1.6 and
        later?". ISTM the person devising the question has confused ECMA-262
        (ECMAScript) and ECMA-357 (ECMAScript for XML).
        Q: Form element property to grab the value of the element - like text in
        input box
        A: value
        This is correct, but worded imprecisely.
        Q: How do you avoid using the brittle position dependent arrays to get at
        form elements:
        They are _not_ arrays.
        document.forms[0].elements[
        This should be a syntactically valid expression, say

        document.forms[0].elements[0]
        A: use the name attribute for the tags, so if you had a form signup with
        a field first_name
        >
        document.signup .first_name
        This is correct, but worded imprecisely; attributes are on elements, not
        tags, although they are set in an element's start tag. And the suggestion
        should be standards-compliant --

        document.forms[0].elements["first_name "]

        -- to correspond with the question.
        Q: Form element property to grab the form that the element belongs to
        A: form
        Correct, although the question is worded imprecisely. `form' is the
        property of form *control objects* to do so. Those objects represent form
        controls (certain interactive child elements of the `form' element) in the DOM.
        Q: How do you grab an array of all the input elements on a form
        A: elements[] array
        `elements' is not an array but a NodeList, and the `[]' is misleading;
        otherwise this is correct.
        Q: Event property that gives the current node on which the event is
        responding - which may be different from the target of the event
        A: currentTarget
        Somewhat correct.
        <http://developer.mozil la.org/en/docs/DOM:event:Compa rison_of_Event_ Targets>
        All wrong. I'd say about half of the information there is wrong.
        You may want to reevaluate your assessment.


        PointedEars
        --
        Anyone who slaps a 'this page is best viewed with Browser X' label on
        a Web page appears to be yearning for the bad old days, before the Web,
        when you had very little chance of reading a document written on another
        computer, another word processor, or another network. -- Tim Berners-Lee

        Comment

        • Lasse Reichstein Nielsen

          #5
          Re: Learning Javascript

          Thomas 'PointedEars' Lahn <PointedEars@we b.dewrites:
          dhtml wrote:
          >All wrong. I'd say about half of the information there is wrong.
          >
          You may want to reevaluate your assessment.
          As *written*, these examples are wrong (exept the "currentTar get"
          one). If we allow for a more generous interpretation of the questions,
          like allowing "form element" to mean "form control" (even though "form
          element" is meaningfull and means something else), then they do make
          sense. Even then, "document.signu p.first_name" is not an answer to
          recommend.

          The problem with quiz questions that are "wrong as written" is that the
          only thing they test is the testee's ability to understand and correct
          for the mistakes made by the test writer.

          /L
          --
          Lasse Reichstein Nielsen
          DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
          'Faith without judgement merely degrades the spirit divine.'

          Comment

          • Thomas 'PointedEars' Lahn

            #6
            Re: Learning Javascript

            Lasse Reichstein Nielsen wrote:
            The problem with quiz questions that are "wrong as written" is that the
            only thing they test is the testee's ability to understand and correct
            for the mistakes made by the test writer.
            ACK.


            Regards,

            PointedEars
            --
            realism: HTML 4.01 Strict
            evangelism: XHTML 1.0 Strict
            madness: XHTML 1.1 as application/xhtml+xml
            -- Bjoern Hoehrmann

            Comment

            • dhtml

              #7
              Re: Learning Javascript

              On Aug 10, 1:29 am, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
              wrote:
              dhtml wrote:
              A lot of the questions aren't good flashcard questions. A lot of the
              answers are wrong. Peter already pointed out in an earlier thread.
              >
              Here's just an example of a few wrong answers:
              >
              The answers are not all wrong, but some questions are and some questions are
              worded imprecisely.
              >
              The answers are wrong. If you misinterpret the misworded questions,
              then its possible to get to what the author is thinking. That's not
              good.

              Q: Form element property to grab the value of the element - like text in
                 input box
              A: value
              >
              This is correct, but worded imprecisely.
              A FORM element doesn't have a value. FORM controls (INPUT, TEXTAREA,
              et c) do.
              >
              Q: How do you avoid using the brittle position dependent arrays to get at
              form elements:
              >
              They are _not_ arrays.
              >
              document.forms[0].elements[
              >
              This should be a syntactically valid expression, say
              >
                document.forms[0].elements[0]
              >
              A: use the name attribute for the tags, so if you had a form signup with
               a field first_name
              >
              document.signup .first_name
              >
              This is correct, but worded imprecisely; attributes are on elements, not
              tags, although they are set in an element's start tag.  And the suggestion
              should be standards-compliant --
              >
              There is no 'brittle position dependent arrays'. Making up words is
              fine for chat at the grocery store, et c.
              Calling an HTMLCollection an Array is very misleading. This is
              harmful.

                document.forms[0].elements["first_name "]
              >
              -- to correspond with the question.
              >
              The question is misleading.
              Q: Form element property to grab the form that the element belongs to
              A: form
              >
              Correct, although the question is worded imprecisely.  `form' is the
              property of form *control objects* to do so.
               Those objects represent form
              controls (certain interactive child elements of the `form' element) in the DOM.
              >
              FORM controls don't have to be children, descendents in HTML 4, but
              not children.
              Q: How do you grab an array of all the input elements on a form
              A: elements[] array
              >
              `elements' is not an array but a NodeList, and the `[]' is misleading;
              otherwise this is correct.
              >
              Not quite. 'elements' is an HTMLCollection.

              elements
              This read-only property is an object that implements the
              HTMLCollection interface.
              Q: Event property that gives the current node on which the event is
              responding - which may be different from the target of the event
              A: currentTarget
              >
              Somewhat correct.
              <http://developer.mozil la.org/en/docs/DOM:event:Compa rison_of_Event_ Ta...>
              >
              'currentTarget' is the EventTarget (Node, window, et c) that the
              EventListener was registered on.

              Used to indicate the EventTarget whose EventListeners are currently
              being processed. This is particularly useful during capturing and
              bubbling.


              All wrong. I'd say about half of the information there is wrong.
              >
              You may want to reevaluate your assessment.
              >
              I did and I stand by that.


              Garrett
              PointedEars

              Comment

              • Thomas 'PointedEars' Lahn

                #8
                Re: Learning Javascript

                dhtml wrote:
                [...] Thomas 'PointedEars' Lahn [...] wrote:
                >dhtml wrote:
                >>A lot of the questions aren't good flashcard questions. A lot of the
                >>answers are wrong. Peter already pointed out in an earlier thread.
                >>Here's just an example of a few wrong answers:
                >The answers are not all wrong, but some questions are and some questions are
                >worded imprecisely.
                >
                The answers are wrong. If you misinterpret the misworded questions,
                then its possible to get to what the author is thinking. That's not
                good.
                I do not follow.
                >>Q: Form element property to grab the value of the element - like text in
                >> input box
                >>A: value
                >This is correct, but worded imprecisely.
                >
                A FORM element doesn't have a value. FORM controls (INPUT, TEXTAREA,
                et c) do.
                There is no such thing as a FORM control :) The ambiguity here is "form
                element".
                >>Q: Form element property to grab the form that the element belongs to
                >>A: form
                >Correct, although the question is worded imprecisely. `form' is the
                >property of form *control objects* to do so.
                >
                Those objects represent form
                >controls (certain interactive child elements of the `form' element) in the DOM.
                >>
                >
                FORM controls don't have to be children, descendents in HTML 4, but
                not children.
                Isn't it interesting that you complain about wrong terminology but are
                unable to use correct terminology yourself?
                >>Q: Event property that gives the current node on which the event is
                >>responding - which may be different from the target of the event
                >>A: currentTarget
                >Somewhat correct.
                ><http://developer.mozil la.org/en/docs/DOM:event:Compa rison_of_Event_ Ta...>
                >
                'currentTarget' is the EventTarget (Node, window, et c) that the
                EventListener was registered on.
                The statement above is not that different.
                [...]
                I do not think you are in a position to lecture anyone here, nor was that
                necessary. I was merely pointing out that not everything of this test needs
                to be written from scratch.


                PointedEars
                --
                var bugRiddenCrashP ronePieceOfJunk = (
                navigator.userA gent.indexOf('M SIE 5') != -1
                && navigator.userA gent.indexOf('M ac') != -1
                ) // Plone, register_functi on.js:16

                Comment

                • dhtml

                  #9
                  Re: Learning Javascript

                  On Aug 10, 11:16 am, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
                  wrote:
                  dhtml wrote:
                  [...] Thomas 'PointedEars' Lahn [...] wrote:
                  dhtml wrote:
                  >A lot of the questions aren't good flashcard questions. A lot of the
                  >answers are wrong. Peter already pointed out in an earlier thread.
                  >Here's just an example of a few wrong answers:
                  The answers are not all wrong, but some questions are and some questions are
                  worded imprecisely.
                  >
                  The answers are wrong. If you misinterpret the misworded questions,
                  then its possible to get to what the author is thinking. That's not
                  good.
                  >
                  I do not follow.
                  >
                  It's bad to have to guess as to try and figure out what the person
                  writing the question meant.

                  Should the questions be clear and unambiguous?
                  FORM controls don't have to be children, descendents in HTML 4, but
                  not children.
                  >
                  Isn't it interesting that you complain about wrong terminology but are
                  unable to use correct terminology yourself?
                  >
                  ?
                  >
                  I do not think you are in a position to lecture anyone here, nor was that
                  My arguments are what they are. They shouldn't seem insulting.

                  Whatever position you're imagining me to be in in is not relevant.
                  necessary.  I was merely pointing out that not everything of this test needs
                  to be written from scratch.

                  Garrett
                  >
                  PointedEars

                  Comment

                  • Thomas 'PointedEars' Lahn

                    #10
                    Re: Learning Javascript

                    dhtml wrote:
                    [...] Thomas 'PointedEars' Lahn [...] wrote:
                    >dhtml wrote:
                    >>FORM controls don't have to be children, descendents in HTML 4, but
                    >>not children.
                    >Isn't it interesting that you complain about wrong terminology but are
                    >unable to use correct terminology yourself?
                    >
                    ?
                    As I have said before, there is no such thing as a "FORM control" in HTML.
                    That is splitting hairs, of course; but you started it, so don't you
                    complain now.


                    PointedEars
                    --
                    realism: HTML 4.01 Strict
                    evangelism: XHTML 1.0 Strict
                    madness: XHTML 1.1 as application/xhtml+xml
                    -- Bjoern Hoehrmann

                    Comment

                    • Lasse Reichstein Nielsen

                      #11
                      Re: Learning Javascript

                      Thomas 'PointedEars' Lahn <PointedEars@we b.dewrites:
                      As I have said before, there is no such thing as a "FORM control" in HTML.
                      Sure there is. CapitaliZATION in NORMAL words (not proper names or
                      trademarks) can change the emphasis, but does not change the meaning.
                      Form controls exist in HTML, capital letters or not.

                      /L
                      --
                      Lasse Reichstein Nielsen
                      DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
                      'Faith without judgement merely degrades the spirit divine.'

                      Comment

                      • Thomas 'PointedEars' Lahn

                        #12
                        Re: Learning Javascript

                        Lasse Reichstein Nielsen wrote:
                        Thomas 'PointedEars' Lahn <PointedEars@we b.dewrites:
                        >As I have said before, there is no such thing as a "FORM control" in HTML.
                        >
                        Sure there is. CapitaliZATION in NORMAL words (not proper names or
                        trademarks) can change the emphasis, but does not change the meaning.
                        Form controls exist in HTML, capital letters or not.
                        They do change the meaning when talking about HTML; read the Spec. A form
                        control is a different thing than a FORM control, because there is, e.g.,
                        and INPUT control. But I am really getting tired of this.


                        PointedEars
                        --
                        var bugRiddenCrashP ronePieceOfJunk = (
                        navigator.userA gent.indexOf('M SIE 5') != -1
                        && navigator.userA gent.indexOf('M ac') != -1
                        ) // Plone, register_functi on.js:16

                        Comment

                        Working...