8 ms·
I'll sue you if you use my common-sense JavaScript tests
- Rauchg 17y agoSome other gems by David Mark http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/3d90e8b8a8301462?pli=1 http://groups.google.com/group/comp.lang.javascript/browse_f... http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/2232c2e46e200cde/ http://groups.google.com/group/comp.lang.javascript/browse_t...
- nzmsv 17y agoWow! 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.
- jrockway 17y agoIt's sad that one person can destroy an entire community. But one can.
- ubernostrum 17y agoAnd 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?
- nostrademons 17y agoIt'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.
- NikkiA 17y agoAnd 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.
- nostrademons 17y agoBasically 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.
- iamwil 17y agoReading that made me appreciate the discussions here a lot more.
- NikkiA 17y agoEvery 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.
- webignition 17y ago"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.
- billybob 17y agoIf Resig is incompetent, then 99.99% of Javascript coders should quit immediately. Maybe 100%.
- axod 17y agoI 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'
- mattmanser 17y agoThis just sounds like you haven't used jQuery yet. Then you'll know why.
- axod 17y agoI'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>
- mpk 17y agoI actually had to go and google the person in question. After about five or so newsgroup messages from him badmouthing other people I gave up. Still no idea who he is.
- babyboy808 17y agoSeems like this David Mark is mad at the world: http://sixrevisions.com/javascript/promising_javascript_frameworks#comment-22465 http://sixrevisions.com/javascript/promising_javascript_fram... http://sixrevisions.com/javascript/promising_javascript_frameworks#comment-24056 http://sixrevisions.com/javascript/promising_javascript_fram... http://stackoverflow.com/users/88658/david-mark http://stackoverflow.com/users/88658/david-mark http://help.wugnet.com/bravenet/webmaster/Great-Examples-code-ftopict33846.html http://help.wugnet.com/bravenet/webmaster/Great-Examples-cod...
- jblochjohnson 17y agoThanks for digging these up. His tone and his arguments are two different things; I find his tone hard to take, but can any JS coders weigh in on his arguments?
- boucher 17y agoHis arguments are nonsensical. Are there bugs in jQuery? To be sure. But he has absolutely no clue what real developers are looking for in a library. Many of the complaints in his critiques center around the fact that jQuery does things which will break browsers like Netscape 4 and IE 5. Not only does jQuery not claim to support those browsers, there are literally no web developers using jQuery who care about support for those browsers.
- mmastrac 17y agoExactly. I would never pretend my code would run on anything less than IE6 or any brand of ancient Netscape. I'd love to know which browsers shipping today fail on: window.blah === undefined and require the more verbose equivalent I've seen pushed on c.l.j: typeof window.blah === "undefined" There's simply no market left for this sort of paleo-Javascript.
- timdown 17y agoFor that specific case, the more verbose version is definitely better, since the undefined property of the global object can be altered. For example, this silently redefines it for the whole page: if (undefined = someVar) {...} The typeof check cannot be broken in this way.
- TNO 17y agoWhy is this even being posted to HN? Is it buzzword compliant or something?
- afed 17y agoHN is the news site for javascript web scripting faggots who imagine they are software developers.
- yesimahuman 17y agoAnother reason not to participate in comp.lang.javascript: Thomas 'PointedEars' Lahn.
- boucher 17y agoYou are absolutely right.
- chrischen 17y agoHe (David Mark) isn't going to get much support with his attitude.
- overgard 17y agoI wish that were the case, but often it seems being controversial is a more direct path to popularity than thoughtfulness is.
- thaumaturgy 17y agoHe is not more popular than jQuery, however. (Or Resig for that matter.) ...Not that this should be reduced to a popularity contest.
- tlrobinson 17y agoAh yes, David Mark. This guy trashes other JavaScript frameworks (usually quite pedantically) in order to promote his own "My Library". Not a good strategy if you ask me. We were the target of a highly superficial "review" by him soon after Cappuccino was made public: http://groups.google.com/group/comp.lang.javascript/msg/17994a9a6f8f96e3 http://groups.google.com/group/comp.lang.javascript/msg/1799... (for the record, YES and NO are there for compatibility with Objective-C, and we benchmarked the math functions, used in graphics routines which needed to be highly optimized, and found a significant performance improvement, in IE if I remember correctly, by aliasing them to eliminate the Math object property lookups)
- boucher 17y agoNot to mention, in his "reviews" he consistently nitpicks on tiny things and then declares that no further effort could possibly even be warranted. Use a dollar sign anywhere in your code and David Mark will declare you an incompetent fool.
- thaumaturgy 17y agoWhat's even more hilarious is the code in his "My Library". I'm far too much of a generalist to consider myself a JavaScript expert. However, even I can pick out a number of items in his lib that shouldn't have been handled the way they are: - He declares $ in a global context without first checking for its existence; - He uses RegExp objects constantly -- in 50 different places in his full "mylib.js" -- including in cases where a simple indexOf would be better, and, best yet, he doesn't bother to cache them in any of the dozen or so cases that I examined. Wasn't that one of his criticisms of someone else's code? - His treatment of camelCase is truly embarrassing, relying on an ugly RegExp every time it's called. Try something like this instead: _camelCases = {width:'width', height:'height'}; _camelCaser = function (p) { return typeof _camelCases[p] != 'undefined' ? _camelCases[p] : _camelCases[p] = p.replace(/\-(.)/g, function(x, y){return y.toUpperCase()}); } There, now you only need to camelCase the property for anything once. JavaScript's object handling makes caching this kind of stuff soooo easy. And, if you do have to have a camelCasing function, try to do it with as little overhead as possible -- use the tools that JavaScript gives you, instead of capturing the string parts in a match and then .join()ing them and all that other nonsense. His library doesn't demonstrate any of the kind of specialized language knowledge that he accuses other library developers of lacking, and it has at least some of the same weaknesses that he criticizes others' works for.
- julio_the_squid 17y agoDavid Mark is an anti-jQuery crusader. He is known for speaking ill of people who use the library as well as the developers (John Resig in particular). He insists that jQuery is responsible for all of the sites across the internet that have JavaScript errors. See http://www.reddit.com/r/programming/comments/7vul9/some_technical_criticism_of_jquery_code/ http://www.reddit.com/r/programming/comments/7vul9/some_tech... http://www.reddit.com/r/programming/comments/8ndyw/jquerys_latest_stab_at_competence/ http://www.reddit.com/r/programming/comments/8ndyw/jquerys_l...
- furtivefelon 17y agoI think this is "his" javascript library (can't find his name mentioned anywhere though): http://www.cinsoft.net/mylib.html http://www.cinsoft.net/mylib.html
- jorsh 17y agoDude has some decent points but has the chronic usenet disease of not being able to put them forth in any manner even approaching tact or class.
- sh1mmer 17y agoThere is always some guy, I've never heard of, being an asshole on any given topic on the Internet. I'm sorry that he's picking on John/jQuery but it's really not that surprising. I think John is being pretty pragmatic though just to exorcise the whole deal and attempt to enforce a clean room environment for the affected code branches.
- jorsh 17y agoHere is the actual David Mark post in question: http://groups.google.com/group/comp.lang.javascript/msg/071fb5f5c6c6fe90?dmode=source&output=gplain http://groups.google.com/group/comp.lang.javascript/msg/071f...
- afed 17y agoYou're idiots for using javascript at all.
- kprobst 17y agoHmmm. There used to be a "David Mark" back in the day that trolled the Microsoft VB newsgroups when they were very active. Trolled hard. This guy's demeanor seems very similar.
- stephenjudkins 17y agoEverything I've read by this guy is more or less the same bilious, angry screed. His monomaniacal obsession with John Resig is a little alarming. Therefore, I'm sad to admit that, in this case, he almost has a point. The use of attr('height') to mean not the height attribute in the DOM but as an alias for height() smells wrong to me. However, it's clear that he has absolutely no intention of becoming a productive contributor to jQuery or helping in any way. By contrast, let's take a minute to appreciate this Matt Kruse fellow. He has apparently strong objections to something in jQuery's design and is taking it to John Resig. He seems ready to engage in a real dialogue. The end result? He probably ends up a little happier and jQuery ends up a little better. The real question is: how can we have more Matt Kruses and fewer David Marks in the world? Do the David Marks of world drive off the Matt Kruses? (I think they almost certainly do.) Why are there so many sociopathic personalities in circles such as this, and how do we mitigate the damage they cause?
- kroo 17y agoIn my experience perhaps the only way of dealing with characters like David Marks is by completely ignoring their contributions. He does, I agree, almost have a point. However, his lack of respect for those who spend time and energy contributing to these projects could (and will likely) drive away many useful contributors. "Feeding the trolls" is a dangerous game, much more so than avoiding the advice of a few David Marks. The problem with this strategy lies in the fact that most open-source projects are large, open communities, where experts in a particular area useful to that project are likely not to be ignored. John Resig's response to the situation (in which he condemns the entire comp.lang.javascript usenet group) seems an extreme (but perhaps appropriate) response to this -- he's sending a very strong message to those who contribute to jQuery: "no more feeding David Mark". (I would also agree that this Matt Kruse fellow seems to be going about things in an excellent sort of way. His response to Resig < http://groups.google.com/group/jquery-dev/msg/e93f9484cd524625 http://groups.google.com/group/jquery-dev/msg/e93f9484cd5246... > was, in my opinion, spot on)
- compay 17y agoThe worst kind of trolls are the ones that are knowledgeable and articulate, but arrogant, dogmatic crusaders. Many programming mailing lists I've been on ended up acquiring somebody like this, at which point I usually have to unsubscribe in order to resist the temptation to get into pointless flamewars.
- pg 17y agoActually, the worst trolls are the ones that are knowledgeable and articulate, but are more dedicated to trolling than to any particular beliefs. Dogmatic trolls are at least somewhat constrained by their dogmas.
- billybob 17y agoI'm completely unqualified to tell whether this guy has valid points. But Resig has led the charge on a Javascript library that makes my job dramatically easier and more fun. To gain the respect I have for Resig, Mr. Mark would have to do likewise, or contribute significantly to jQuery. Or, to put it in more childish terms, "if you're so smart, let's see you do it."
- boucher 17y agoHis latest, on a bug report I filed against google closure: http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/44bb4805cc4d9cf8 http://groups.google.com/group/comp.lang.javascript/browse_t... I'd like to see him write cross browser key-event handling code without doing UA sniffing. Honestly, I would like that. He committed an attempt to a branch of Dojo but it's not in service and doesn't actually work.
- cloverfield 17y agoAnd you don't know what you are talking about either. To save time, responses are aggregated here:- http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/f829f23962c72d35# http://groups.google.com/group/comp.lang.javascript/browse_t...
- boucher 17y agoHis response is typical. He denies saying things which can easily be disproved. He makes basic factual errors and in the same sentence validates most of the criticism in this thread: "Cappuccino. That's something built on top of Sproutcore, right? No need to get any deeper than that." Of course, Cappuccino isn't built on Sproutcore, but even if it was this sentence illustrates the fact that David has long ago made decisions about what he perceives to be the state of javascript frameworks, and isn't interested in anything other than those opinions, however baseless those opinions may be.
- thaumaturgy 17y ago"cloverfield" is David Mark, FYI -- it seems someone went and pointed him here. I noticed in several parts in his response, he's trying to claim credit for aspects of jQuery's development -- something that I think most people would find patently ridiculous. Given David's recent threats, if I were Resig, I'd be tempted to start using the word "defamation" and tell David to put up some evidence or shut up. Fortunately, I'm sure Resig's more level-headed.
- Sensible 17y agoIt would be useful that instead of praising one person and denegrating another, supporters of jquery, capucinno et al addressed each of the many concerns that have been raised about those libraries in a manner that can be objectively evaluate.
- boucher 17y agoIt's difficult to have a rational discussion with someone who has already staked out an extreme position and offered little to no evidence to support that opinion. Also, it's spelled Cappuccino. And since David's superficial review contained virtually nothing of substance, there isn't much to objectively respond to. Example: <script src = "Frameworks/Objective-J/ObjectiveJ.js" type = "text/javascript"></script> > Nice markup. Yes, one file in 280 Slides (not Cappuccino) has spaces between the attribute, equals sign, and quote. We must be incompetent. > Yeah, I guess "false" is harder on the fingers. Or, maybe, we're going for an easier transition for people from an Objective-C background... with (new prototype_bug()) member = true; > Ugh. How insightful. Hilariously enough, this is actually doing real feature detection to detect a real bug in real browsers. > I've seen enough. So, in other words, he made no substantive evaluation. If you ask us questions, and aren't a dick about it, we're more than happy to give answers. We readily admit our own faults, and we're vocal about what our framework is not designed to do.
- Sensible 17y agoYour post reads like an attack on a person rather than anything else. I've read tons of posts by David Mark and I've found little wrong with them technically so describe his position as extreme does not mean he is automatically wrong on everything. Why pull things out of context and not provide a reference to the original? You complain about the tone of his posts (someone called it snarky) and then go on to post your own snarky comments, why?
- boucher 17y agoThe original was referenced above, an additional reference didn't seem necessary. I don't believe the quotes are out of context, that was the majority of his post. Just so you don't have to search for it, here is the link: http://groups.google.com/group/comp.lang.javascript/msg/17994a9a6f8f96e3 http://groups.google.com/group/comp.lang.javascript/msg/1799...