News for hackers. Stuff that matters.
Re:I'll sue you if you use my common-sense JavaScript tests by Rauchg on Sunday December 13, 2009 @07:18PM (#993305)
Re:I'll sue you if you use my common-sense JavaScript tests by nzmsv on Sunday December 13, 2009 @08:03PM (#993351)
Wow! After reading these, and the replies, I definitely agree with John Resig about that newsgroup: don't read. Or risk losing your hope for humanity.
Re:I'll sue you if you use my common-sense JavaScript tests by ubernostrum on Sunday December 13, 2009 @09:20PM (#993455)
And yet I can't help drawing a parallel: comp.lang.lisp was famously full of the hateful spewing of an intolerant contributor, and for that both the group and the contributor (Erik Naggum) were basically worshipped by a non-trivial community. Why did Lisp produce that outcome, while JavaScript produces this?
Re:I'll sue you if you use my common-sense JavaScript tests by nostrademons on Sunday December 13, 2009 @10:43PM (#993558)
It's basically the same. comp.lang.lisp and Erik Naggum may've been worshipped by a non-trivial community, but it was still a small community. The rest of us still hated it.

I'm sure there're people out there that enjoy comp.lang.javascript too.

Re:I'll sue you if you use my common-sense JavaScript tests by NikkiA on Monday December 14, 2009 @06:02AM (#993948)
And as a simple perusal of threads that David has posted in shows, he has he fair share of 'you're absolutely right David, jQuery, mootools and all the rest suck' style worshipping.

For some reason (which I could make guesses at) Usenet attracts this type of kookery, and when kooks gather, they tend to create this appearance that people actually value their rants and conspiracies.

As a result, you get the perceived 'Erik is god' views of comp.lang.lisp, whereas people that try to read, or contribute, consider(ed) him and his ilk as a deterrent to useful discussion.

Re:I'll sue you if you use my common-sense JavaScript tests by nostrademons on Monday December 14, 2009 @01:35PM (#994709)
Basically every community has their heroes, people that from the outside look like cult leaders but from the inside look like wise sages. Hacker News and Paul Graham. Joel on Software and Joel Spolsky. StackOverflow and Jeff Atwood/Joel Spolsky. FictionAlley and Cassandra Claire. Haskell and Oleg Kiselyov. Google and Jeff Dean.

Their popularity outside the community seems to reflect the popularity of the community itself, which in turn reflects how much it does for the world at large and how similar its values are to the "mainstream". I'm kinda curious why such cult followings develop, but it seems to be a near-universal feature of communities of sufficient size (basically anything over Dunbar's number, where not all members know all other members). I've got a few hypotheses on this but no answers.

Re:I'll sue you if you use my common-sense JavaScript tests by jrockway on Sunday December 13, 2009 @08:31PM (#993391)
It's sad that one person can destroy an entire community. But one can.
Re:I'll sue you if you use my common-sense JavaScript tests by boucher on Sunday December 13, 2009 @08:48PM (#993414)
According to his LinkedIn, David Mark is now working at Sitepen, the primary contributors to Dojo. I guess he no longer believes that all JavaScript frameworks are completely idiotic...
Re:I'll sue you if you use my common-sense JavaScript tests by mxpxpod on Tuesday December 15, 2009 @12:02AM (#995926)
David Mark no longer works at SitePen.
Re:I'll sue you if you use my common-sense JavaScript tests by NikkiA on Monday December 14, 2009 @05:58AM (#993945)
Every Usenet programming language (and some that aren't PL related) community has a troll/kook like David. Over time you learn to read around them, or read them only for humour value.
Re:I'll sue you if you use my common-sense JavaScript tests by iamwil on Monday December 14, 2009 @04:47AM (#993885)
Reading that made me appreciate the discussions here a lot more.
Re:I'll sue you if you use my common-sense JavaScript tests by webignition on Monday December 14, 2009 @05:14AM (#993911)
"Near as I can tell, [John Resig] has never written a competent script in his life (or written anything useful on the subject.)"

That's quite a brave statement from David Mark.

Re:I'll sue you if you use my common-sense JavaScript tests by billybob on Monday December 14, 2009 @11:52AM (#994441)
If Resig is incompetent, then 99.99% of Javascript coders should quit immediately. Maybe 100%.
Re:I'll sue you if you use my common-sense JavaScript tests by axod on Monday December 14, 2009 @06:43AM (#993978)
I think he has a few points. If you disagree with some of his points, argue why.

FWIW, I also view js libraries with skepticism. I'm not convinced they're a net gain for the web. (I'm talking about general purpose libs. UI libs obviously provide value).

There's this misconception that working with the DOM is hard, or can't be done in a cross browser way without bolting on a big js lib.

Even something as simple as a closure is routinely packaged up in a js lib as .bind() why??? Add to that the fact they usually do silly things like convert arguments to an Array etc just to slow you down some more.

When you see news stories like "js lib X latest release is 5 times as fast as previous version!" You should not think 'wow that's great'. You should think 'jesus christ how could they have written it so slow to start with? How do I know they've written it properly this time? Time to stop using js lib X'

Re:I'll sue you if you use my common-sense JavaScript tests by mattmanser on Monday December 14, 2009 @07:07AM (#994002)
This just sounds like you haven't used jQuery yet. Then you'll know why.
Re:I'll sue you if you use my common-sense JavaScript tests by axod on Monday December 14, 2009 @07:10AM (#994004)
I've seen jQuery code. It doesn't do anything particularly useful for me.

It solves problems I don't have. I don't need to lookup elements in the dom, because I put them there. I already know where they are.

I don't need a slow .bind() method - I know how to write closures.

Look at one of the top news items - jQuery plugin 'behavior'. It just doesn't make any sense.

Look at some of the source code. For example .addClass(). It's the most general you could imagine - can take a list of classes, or a function. Yet I'm betting most of the time it's being called with a single class to add. There's a lot of wasted checks and effort in there. It's checking the type, it's splitting the string on " ", it's checking to see the class isn't already listed etc etc

Also everything is assuming it's operating on a list of elements - cue wasteful for loops when they're not needed.

So, when you do the seemingly simple

  $('#myelement').addClass("foo");
it'll be cycling through the array of elements of length 1, splitting 'foo' on spaces, checking if 'foo' is a function, etc etc etc etc

Those are precious wasted cycles. And for what? so you can write:

  $('#myelement').addClass("foo");
instead of:

  // I already have a js ref to myElement thanks,
  // and know myElement doesn't already have 'foo' in className
  myElement.className+=" foo";
</rant>
Re:I'll sue you if you use my common-sense JavaScript tests by ra on Monday December 14, 2009 @10:04AM (#994234)
You make some fair points.

I believe jQuery's strength is that it allows you to accomplish things neatly without needing to know the sins and virtues of Javascript....

The point is that there are plenty of both.