Learning Javascript

Discussion in 'Javascript' started by Elizabeth Barnwell, Aug 8, 2008.

  1. 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

    Thanks,

    Elizabeth
     
    Elizabeth Barnwell, Aug 8, 2008
    #1
    1. Advertising

  2. On Aug 8, 11:38 am, Elizabeth Barnwell <>
    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.javascript. It seems as through previous feedback about
    content has not resulted in change.

    <URL: http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/148ef2fbbe5190a2/c0d02e1af7305ffe#c0d02e1af7305ffe>

    Peter
     
    Peter Michaux, Aug 9, 2008
    #2
    1. Advertising

  3. 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.mozilla.org/en/docs/DOM:event:Comparison_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
     
    Thomas 'PointedEars' Lahn, Aug 10, 2008
    #3
  4. Thomas 'PointedEars' Lahn <> writes:

    > 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 "currentTarget"
    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.signup.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/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
     
    Lasse Reichstein Nielsen, Aug 10, 2008
    #4
  5. 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
     
    Thomas 'PointedEars' Lahn, Aug 10, 2008
    #5
  6. Elizabeth Barnwell

    dhtml Guest

    On Aug 10, 1:29 am, 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.


    > > 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.
    http://www.w3.org/TR/DOM-Level-2-HTML/ecma-script-binding.html
    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.mozilla.org/en/docs/DOM:event:Comparison_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.

    http://www.w3.org/TR/DOM-Level-2-Events/events.html

    > > 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
     
    dhtml, Aug 10, 2008
    #6
  7. 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.mozilla.org/en/docs/DOM:event:Comparison_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 bugRiddenCrashPronePieceOfJunk = (
    navigator.userAgent.indexOf('MSIE 5') != -1
    && navigator.userAgent.indexOf('Mac') != -1
    ) // Plone, register_function.js:16
     
    Thomas 'PointedEars' Lahn, Aug 10, 2008
    #7
  8. Elizabeth Barnwell

    dhtml Guest

    On Aug 10, 11:16 am, Thomas 'PointedEars' Lahn <>
    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
     
    dhtml, Aug 10, 2008
    #8
  9. 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
     
    Thomas 'PointedEars' Lahn, Aug 10, 2008
    #9
  10. Thomas 'PointedEars' Lahn <> writes:

    > 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/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
     
    Lasse Reichstein Nielsen, Aug 11, 2008
    #10
  11. Lasse Reichstein Nielsen wrote:
    > Thomas 'PointedEars' Lahn <> writes:
    >> 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 bugRiddenCrashPronePieceOfJunk = (
    navigator.userAgent.indexOf('MSIE 5') != -1
    && navigator.userAgent.indexOf('Mac') != -1
    ) // Plone, register_function.js:16
     
    Thomas 'PointedEars' Lahn, Aug 11, 2008
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hal Vaughan
    Replies:
    7
    Views:
    521
  2. Andrey Popp

    [I'm learning C]: Learning to use ucontext

    Andrey Popp, Jan 29, 2012, in forum: C Programming
    Replies:
    5
    Views:
    804
    Keith Thompson
    Jan 31, 2012
  3. svend
    Replies:
    2
    Views:
    115
    Laurent Bugnion, GalaSoft
    Aug 28, 2003
  4. Sean McCourt
    Replies:
    3
    Views:
    142
  5. Sean
    Replies:
    3
    Views:
    90
    Christopher Benson-Manica
    Mar 25, 2005
Loading...

Share This Page