For all those jQuery fanboys

  • Thread starter Michael Haufe (\TNO\)
  • Start date
D

David Mark

Michael said:
Actually, I thought this would be the perfect kryponite for David
Mark:

Fact: David Mark eats kryptonite for breakfast. :)

That's very odd, I thought Crockford was the JS Chuck Norris?

http://roomthily.tumblr.com/post/459492918

BTW, typeof YUI != 'awesome', so though clearly a language expert,
Crockford's browser scripting legacy is pretty limp in comparison.

And Resig is more like Javascript's Pee Wee Herman. ;)

I meant to do that. :)
 
P

Peter Michaux

BTW, typeof YUI != 'awesome', so though clearly a language expert,
Crockford's browser scripting legacy is pretty limp in comparison.

I don't think Crockford was or is as involved with YUI! as you think.
From what I understand his role was as a resource to the YUI! team.

Crockford's legacy is that he used good taste to choose good ideas
from how Scheme is used (lexical closures for message passing OOP and
s-expressions for data transport in the form of JSON), ideas discussed
on comp.lang.javascript, some of his own ideas about how to fit those
ideas together, and spread those ideas. He is a teacher and as a
teacher he has improved the overall quality of JavaScript programming
on the web.

And he killed ES4 which seems to have been the right choice.
 
D

David Mark

Peter said:
I don't think Crockford was or is as involved with YUI! as you think.

That's as maybe. What has he done in terms of browser scripting?
From what I understand his role was as a resource to the YUI! team.

Well, he let them go wildly astray, at least in terms of browser
scripting. The code may pass JSLint, but that's gloss on a rat.
Crockford's legacy is that he used good taste to choose good ideas
from how Scheme is used (lexical closures for message passing OOP and
s-expressions for data transport in the form of JSON), ideas discussed
on comp.lang.javascript, some of his own ideas about how to fit those
ideas together, and spread those ideas.

Yes, kudos. :)
He is a teacher and as a
teacher he has improved the overall quality of JavaScript programming
on the web.

I see no evidence of that. Show me scripts in use on the Web that are
worthwhile. I can never find _any_, other than the _occasional_ example
code.
And he killed ES4 which seems to have been the right choice.

Yes. Glad for that.
 
D

David Mark

David said:
That's as maybe. What has he done in terms of browser scripting?

Forgot to mention a couple of things. Posted examples that call
hasOwnProperty without feature detection, gave talks about "browser
grading", famously calling for IE6 to be forced into retirement (a
perfectly ludicrous call that plays to a popular broken-down bandwagon)
and IIRC has discussed "browser grading" with a straight face. He's the
anti-Cornford.
 
T

Thomas 'PointedEars' Lahn

David said:
Forgot to mention a couple of things. Posted examples that call
hasOwnProperty without feature detection, gave talks about "browser
grading", famously calling for IE6 to be forced into retirement (a
perfectly ludicrous call that plays to a popular broken-down bandwagon)
and IIRC has discussed "browser grading" with a straight face. He's the
anti-Cornford.

Don't forget his recommendation to use `window' to avoid "implied globals"
(in jslint). Now that's a ridiculous blunder not easily forgiven.


PointedEars
 
D

David Mark

Thomas said:
Don't forget his recommendation to use `window' to avoid "implied globals"
(in jslint). Now that's a ridiculous blunder not easily forgiven.

Yes. I forgot that one (if I ever knew of it). Do you mean he recommends:-

window.myvar = something;

(?)

That would be unpardonable. :)
 
T

Thomas 'PointedEars' Lahn

David said:
Thomas said:
David said:
David Mark wrote:
[Douglas Crockford's recommendations]
Forgot to mention a couple of things. Posted examples that call
hasOwnProperty without feature detection, gave talks about "browser
grading", famously calling for IE6 to be forced into retirement (a
perfectly ludicrous call that plays to a popular broken-down bandwagon)
and IIRC has discussed "browser grading" with a straight face. He's
the anti-Cornford.

Don't forget his recommendation to use `window' to avoid "implied
globals" (in jslint). Now that's a ridiculous blunder not easily
forgiven.

Yes. I forgot that one (if I ever knew of it). Do you mean he
recommends:-

window.myvar = something;

(?)

That would be unpardonable. :)

Here you are:

<<

PointedEars
 
D

David Mark

Thomas said:
David said:
Thomas said:
David Mark wrote:
David Mark wrote:
[Douglas Crockford's recommendations]
Forgot to mention a couple of things. Posted examples that call
hasOwnProperty without feature detection, gave talks about "browser
grading", famously calling for IE6 to be forced into retirement (a
perfectly ludicrous call that plays to a popular broken-down bandwagon)
and IIRC has discussed "browser grading" with a straight face. He's
the anti-Cornford.
Don't forget his recommendation to use `window' to avoid "implied
globals" (in jslint). Now that's a ridiculous blunder not easily
forgiven.
Yes. I forgot that one (if I ever knew of it). Do you mean he
recommends:-

window.myvar = something;

(?)

That would be unpardonable. :)

Here you are:

<<news:[email protected]>

Thanks, but TB doesn't seem to like those. Probably confused by so many
different FF versions installed beside it.

The thing is, he switched it a year or two back to list window itself as
an implied global, even when assuming a browser, which certainly makes
no sense. He should forget about host objects.
 
T

Thomas 'PointedEars' Lahn

David said:
Thomas said:
David said:
Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
[Douglas Crockford's recommendations]
Don't forget his recommendation to use `window' to avoid "implied
globals" (in jslint). Now that's a ridiculous blunder not easily
forgiven.
Yes. I forgot that one (if I ever knew of it). Do you mean he
recommends:-

window.myvar = something;

(?)

That would be unpardonable. :)

Here you are:

<<news:[email protected]>

Thanks, but TB doesn't seem to like those. Probably confused by so many
different FF versions installed beside it.

Unlikely. Try with <http://mnenhy.mozdev.org/> or, to be even more on-
topic (Mnenhy is probably written in JavaScript), the following bookmarklet
(remove the "from the parameter or change the code):

javascript:window.location="http://groups.google.com/groups?hl=en&as_umsgid="+"%s".replace(/^<(news:)?|
The thing is, he switched it a year or two back to list window itself as
an implied global, even when assuming a browser, which certainly makes
no sense. He should forget about host objects.

ACK


PointedEars
 
T

Thomas 'PointedEars' Lahn

D

David Mark

Thomas said:
Thomas said:
David said:
[get posting by Message-ID] javascript:window.location="http://groups.google.com/groups?hl=en&as_umsgid="+"%s".replace(/^<($/g,"")

Just saw that they changed their search URI (and broken the old one in the
process, so much for competence), so use:

javascript:window.location="http://groups.google.com/groups/search?hl=en&as_umsgid="+"%s".replace(/^<(news:)?|

That is getting all fouled up in TB, as well as GG. I tried to piece it
back together, but kept getting Google server errors. Can you just post
a GG (http) link?
 
D

David Mark

Thomas said:
David said:
Thomas said:
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
[Douglas Crockford's recommendations]
Don't forget his recommendation to use `window' to avoid "implied
globals" (in jslint). Now that's a ridiculous blunder not easily
forgiven.
Yes. I forgot that one (if I ever knew of it). Do you mean he
recommends:-

window.myvar = something;

(?)

That would be unpardonable. :)
Here you are:

<<news:[email protected]>
Thanks, but TB doesn't seem to like those. Probably confused by so many
different FF versions installed beside it.

Unlikely. Try with <http://mnenhy.mozdev.org/> or, to be even more on-
topic (Mnenhy is probably written in JavaScript), the following bookmarklet
(remove the "news:" from the parameter or change the code):

I have no idea what it was doing. Clicking the links appeared to be a noop.
 
D

David Mark

David said:
David said:
Thomas said:
David Mark wrote:

Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
[Douglas Crockford's recommendations]
Don't forget his recommendation to use `window' to avoid "implied
globals" (in jslint). Now that's a ridiculous blunder not easily
forgiven.
Yes. I forgot that one (if I ever knew of it). Do you mean he
recommends:-

window.myvar = something;

(?)

That would be unpardonable. :)
Here you are:

<<Thanks, but TB doesn't seem to like those. Probably confused by so many
different FF versions installed beside it.
Unlikely. Try with <http://mnenhy.mozdev.org/> or, to be even more on-
topic (Mnenhy is probably written in JavaScript), the following bookmarklet
(remove the "news:" from the parameter or change the code):
I have no idea what it was doing. Clicking the links appeared to be a noop.

Pasting the link into Chrome opened a new TB instance, popped up
an empty Identity dialog (which I canceled) and then did nothing. I
give up. :)

And speaking of Usenet/Google mysteries. How is it that some people
have their names in the post totals, while others have email addresses?
I remember looking at the message source from people in each group, but
couldn't spot any likely discrepancies. I've noticed that, like
everything about GG, the behavior switches from time to time (sometimes
everyone has an email address rather than a name). The totals never
seem to add up either (compared to other GG report pages), but that's
not new (Google could never count very well).
 
T

Thomas 'PointedEars' Lahn

David said:
Thomas said:
Thomas said:
David Mark wrote:
[get posting by Message-ID]
javascript:window.location="http://groups.google.com/groups/search?hl=en&as_umsgid="+"%s".replace(/^<(news:)?|

That is getting all fouled up in TB, as well as GG. I tried to piece it
back together, but kept getting Google server errors.

No, bookmarklets are for your *Web* *browser*. You need to create a
bookmark with the above value as URI and give it a keyword. Then type the
keyword and the parameter (`%s' is replaced with the parameter when you use
the bookmarklet). At least that is how it works in Mozillas.

The alternative is to type the Message-ID without `<', and `>' in the
Message-ID field on the bottom of

Can you just post a GG (http) link?

If I must:

<http://groups.google.com/groups/search?hl=en&[email protected]>
<http://groups.google.com/groups/search?hl=en&[email protected]>

(That is the same as if you typed it in the form.)


PointedEars
 
T

Thomas 'PointedEars' Lahn

David said:
Thomas said:
David said:
Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
[Douglas Crockford's recommendations]
[...]
<<Thanks, but TB doesn't seem to like those. Probably confused by so
many different FF versions installed beside it.

Unlikely. Try with <http://mnenhy.mozdev.org/> or, to be even more on-
topic (Mnenhy is probably written in JavaScript), the following
bookmarklet (remove the "news:" from the parameter or change the code):

I have no idea what it was doing. Clicking the links appeared to be a
noop.

Clicking the secondary mouse button (on Mac: Ctrl+Click) should show a
context menu containing "Search Msg-ID" > "Google Groups". But it is
possible that you have to insert `/search' in the resulting URI, as
described, for this to work, because Google changed their Advanced Search
interface. The author has not released a new version yet, not even one
that would be compatible with TB3, which really is a pity as it is a great
tool (Msg-ID lookup is only one of its many functions).


PointedEars
 
D

David Mark

Thomas said:
David said:
Thomas said:
Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
[get posting by Message-ID] javascript:window.location="http://groups.google.com/groups/search?hl=en&as_umsgid="+"%s".replace(/^<($/g,"");
That is getting all fouled up in TB, as well as GG. I tried to piece it
back together, but kept getting Google server errors.

No, bookmarklets are for your *Web* *browser*.

I know that. I pasted it into the Web browser's address bar, which
AFAIK, should have worked.
You need to create a
bookmark with the above value as URI and give it a keyword.

Ah, I never bother with them, so I am ignorant of the mechanics
involved. I thought they were basically just javascript: links bookmarked.
Then type the
keyword and the parameter (`%s' is replaced with the parameter when you use
the bookmarklet). At least that is how it works in Mozillas.

No idea.
The alternative is to type the Message-ID without `<', and `>' in the
Message-ID field on the bottom of

<http://groups.google.com/advanced_search>.

Right. I was getting tired of messing with GG though.

Thanks. The first was the JSLint oddity I mentioned. The second is a
real spit-take moment. It goes to show that he knows the language (very
well of course), but not so much how to apply it in a browser.
 
D

David Mark

Thomas said:
David said:
Thomas said:
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
[Douglas Crockford's recommendations]
[...]
<<Thanks, but TB doesn't seem to like those. Probably confused by so
many different FF versions installed beside it.
Unlikely. Try with <http://mnenhy.mozdev.org/> or, to be even more on-
topic (Mnenhy is probably written in JavaScript), the following
bookmarklet (remove the "news:" from the parameter or change the code):
I have no idea what it was doing. Clicking the links appeared to be a
noop.

Clicking the secondary mouse button (on Mac: Ctrl+Click) should show a
context menu containing "Search Msg-ID" > "Google Groups". But it is
possible that you have to insert `/search' in the resulting URI, as
described, for this to work, because Google changed their Advanced Search
interface. The author has not released a new version yet, not even one
that would be compatible with TB3, which really is a pity as it is a great
tool (Msg-ID lookup is only one of its many functions).

Sorry, I was referring to TB. I didn't download that other thing.
 
T

Thomas 'PointedEars' Lahn

David said:
Thomas said:
David said:
Thomas 'PointedEars' Lahn wrote:
Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
[get posting by Message-ID]
javascript:window.location="http://groups.google.com/groups/search?hl=en&as_umsgid="+"%s".replace(/^<(news:)?|
$/g,"");
That is getting all fouled up in TB, as well as GG. I tried to piece it
back together, but kept getting Google server errors.

No, bookmarklets are for your *Web* *browser*.

I know that. I pasted it into the Web browser's address bar, which
AFAIK, should have worked.

Not without a parameter value to replace the `%s' :)

That said, this one is a fairly simple bookmarklet; they can be written
differently (and I have done so) so that they use a default value or the
user is prompted for the parameter. If have found this one I have written
to be particularly useful:

javascript:var%20s%20=%20%22%s%22.split(/\s+/),
%20topic%20=%20(s[1]%20?%20%22%20%22%20+%20s[1]%20:%20%22%22),
%20lang%20=%20(s[1]%20&&%20/^[a-z]
{2,3}$/.test(s[1])%20?%20((topic%20=%20%22%22),%20s[1])%20:%20%22de%22);
%20void(topic%20=%20(s[0]%20&&%20s[0]%20!=%20%22%25s%22%20?%20s[0].replace(/_+/g,
%20%22%20%22)%20:%20%22%22)%20+%20topic);
%20if%20(typeof%20(topic%20=%20window.prompt(%22Query%20to%20%22%20+%20lang%20+%20%22.wikipedia.org:
%22,
%20topic))%20==%20%22string%22)%20{%20window.location%20=%20%22http://%22%20+%20lang%20+%20%22.wikipedia.org/wiki/%22%20+%20encodeURIComponent(topic.replace(/(_)
{2,}/g,%20%22$1%22).replace(/\s+/g,%20%22_%22));%20}

If you assign the keyword `wiki' to it, you can type either

wiki

or

wiki $title

or

wiki $title $language_id

in the Address Bar. In all cases you will be presented with a
window.prompt() dialog where you can refine your search. You can also type
$language_id:$title in that dialog, thanks to Wikipedia's interface. (The
prompt() dialog was necessary even for simple searches because Mozilla
could not deal with Umlauts and other characters not in US-ASCII in
bookmarklet parameters.)
Ah, I never bother with them, so I am ignorant of the mechanics
involved. I thought they were basically just javascript: links
bookmarked.

Both are possible.

Chrome 5.0.307.11 beta (for Linux) supports them, too, but you have to set
them up as "Search Engine" instead. When I imported my Firefox bookmarks
into Chrome, that was done automatically.


PointedEars
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top