Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   Learning Javascript (http://www.velocityreviews.com/forums/t936754-learning-javascript.html)

Elizabeth Barnwell 08-08-2008 06:38 PM

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.
http://www.yoyobrain.com/subjects/show/240

Thanks,

Elizabeth

Peter Michaux 08-09-2008 10:48 PM

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

Thomas 'PointedEars' Lahn 08-10-2008 08:29 AM

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.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 08-10-2008 10:16 AM

Re: Learning Javascript
 
Thomas 'PointedEars' Lahn <PointedEars@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 08-10-2008 11:05 AM

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

dhtml 08-10-2008 05:21 PM

Re: Learning Javascript
 
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-HTM...t-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 08-10-2008 06:16 PM

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.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 08-10-2008 06:54 PM

Re: Learning Javascript
 
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 08-10-2008 07:02 PM

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

Lasse Reichstein Nielsen 08-11-2008 06:20 PM

Re: Learning Javascript
 
Thomas 'PointedEars' Lahn <PointedEars@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.

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


All times are GMT. The time now is 12:21 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.