Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Learning Javascript

165 views
Skip to first unread message

Elizabeth Barnwell

unread,
Aug 8, 2008, 2:38:49 PM8/8/08
to
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

Peter Michaux

unread,
Aug 9, 2008, 6:48:30 PM8/9/08
to
On Aug 8, 11:38 am, Elizabeth Barnwell <elizabethbarnw...@gmail.com>
wrote:

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

dhtml

unread,
Aug 10, 2008, 2:59:12 AM8/10/08
to
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.javascript. 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.com/group/comp.lang.javascript/browse_frm/thread/148ef2fbbe5190a2/c0d02e1af7305ffe#c0d02e1af7305ffe>
>
> Peter

Thomas 'PointedEars' Lahn

unread,
Aug 10, 2008, 4:29:29 AM8/10/08
to
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

Lasse Reichstein Nielsen

unread,
Aug 10, 2008, 6:16:01 AM8/10/08
to
Thomas 'PointedEars' Lahn <Point...@web.de> 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.'

Thomas 'PointedEars' Lahn

unread,
Aug 10, 2008, 7:05:54 AM8/10/08
to
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

dhtml

unread,
Aug 10, 2008, 1:21:18 PM8/10/08
to
On Aug 10, 1:29 am, Thomas 'PointedEars' Lahn <PointedE...@web.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.
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

Thomas 'PointedEars' Lahn

unread,
Aug 10, 2008, 2:16:00 PM8/10/08
to
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

dhtml

unread,
Aug 10, 2008, 2:54:17 PM8/10/08
to
On Aug 10, 11:16 am, Thomas 'PointedEars' Lahn <PointedE...@web.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

Thomas 'PointedEars' Lahn

unread,
Aug 10, 2008, 3:02:18 PM8/10/08
to
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.

Lasse Reichstein Nielsen

unread,
Aug 11, 2008, 2:20:24 PM8/11/08
to
Thomas 'PointedEars' Lahn <Point...@web.de> 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.

Thomas 'PointedEars' Lahn

unread,
Aug 11, 2008, 2:22:24 PM8/11/08
to
Lasse Reichstein Nielsen wrote:
> Thomas 'PointedEars' Lahn <Point...@web.de> 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.

0 new messages