Posted on March 3, 2011, 10:23 am, by Bob Remeika, under Uncategorized.
So the CEO comes to you and is all like “I wanna build the next Facebook killer”, and your all like “Fuck ya! I’ve been waiting for this chance ever since I learned PHP!”. So forget the massive backend infrastructure and that you didn’t even know what graph theory was until they hired that PHD who kept talking about O-n-squared like it’s a bad thing. Your job is to build the front end.
So how do you do it?
Well John Resig and Doug Crockford are your Jesuses (or Jesusi? How do you pluralize Jesus… the guy is a fucking God), so you’re all like, “Well jQuery worked on awesomepetsbyphilandphillis.com… so $(function(){}) this bitch”. So you start coding like a bat out of hell. Before you know it, you’ve got a login form and a dialog box and shit is all peaches and cream. You are a God! All you had to do was grab a plugin here and there… you didn’t have to do shit! And then BLAM! BETA!!! Valleywag is now following your CEO on Twitter and Michael Arrington is pleading with you to enter the Techcrunch 50. You are going to be RICH!
So now you’re feeling pretty good about yourself and that PHD is thinking, why the fuck did I spend $150K on college when I could have just read “Javascript the Good Parts” and been the next internet hero? Not so fast sparky.
The Rails Developer
You’re a startup so you are inevitably going to be a Rails shop and you will hire a “Ruby Rockstar”. Don’t argue with me on this.
So like I was saying… you hire this “Rock Star” and then all of a sudden he’s dissin’ your shit. “What the fuck is this inline Javascript?” and your response is “Dude, I’m gonna clean it up, we’re a startup YAGNI… Agile… coughcough”. So you start cleaning up your Javascript and then you realize “Oh, there’s some common patterns here”. So you start making some classes, cause that’s what Doug said to do. Then you’re like, “Wait, Javascript doesn’t have classes” (or inheritance…. at least not the kind you read about in Learn Java in 21 days), but dude it’s cool. Class.js
So you add class.js into your growing number of dependencies and off you go again. You have classes now and life is starting to make sense, but your app continues to grow, and all of that shit that was starting to make sense is now falling apart. jQuery UI will get you an awesome fucking date picker but the CEO is talking about going international and adding some consistency to the user experience. You want to be everywhere… mobile, desktop, web and beyoooooooooooooooond! The CTO is annoyed about the lack of keyboard controls in the FriendPicker plugin you wrote, but that’ll take a week… and then another week. “She just doesn’t have the power, Captain” you say, but if you don’t get the fuck out of this Romulan tractor beam then you’re fucked. Wait… whaaaaa?
So now what?
Your job was to build a full fledged app, but there’s no way you could have seen this massive shitpile of shit coming down the ephemeral pike (is it pike or pipe? People disagree). Your solution is to build a widget rendering system, some core Javascript utilities, some abstactions upon abstractions (he said mobile didn’t he?). All of a sudden you have a directory tree that looks like this:
public/javascripts/app — Rails BRTCHES!
- application.js — Rails BRTCHES!
- prototype.js — Rails BRTCHES!
- core.js
- core.seriously.js
- util.js
- jquery.1.4.2.js
- underscore.js
- mobile.bitch\!.js
- plugins/
- lightbox-0.5.2.js
- thickbox.js — Cause lightbox didn’t do everything
- gallery-1.1.1.js
- rating-1.23.4.js
- carousel-1.23324234354354353453453453.23.js
… eight hundred or more non-interconnected files
- widgets/
- base.js
- FriendPicker.js
- NosePicker.js
… blah blah blah.. who cares.
What’s missing?
Aside from the fact that you now have dependency galore and that your rating plugin requires underscore 1.0....
"So the CEO comes to you and is all like “I wanna build the next Facebook killer”, and your all like “Fuck ya! I’ve been waiting for this chance ever since I learned PHP!”."
Ha!
As for the content of the article...
Yes, if you know that you're going to be building some sort of rich Javascript app, then start with a richer framework. This doesn't mean that JQuery is for Noobs, it just means that it's for lighter weight uses. Different strokes for different folks.
Indeed. When I started a new job that required me to use MooTools, I went looking for the philosophical differences between it and jQuery (which I was familiar with). I found this wonderfully-written overview: http://jqueryvsmootools.com/ .
Before reading the post, i was thinking "dude, this is a troll post."
after the first 5 paragraphs i was thinking, "dude, he has got a point. i think TL;DR is : 'tools doesn't make you a good programmer use whatever you want."
but after the "dojo" section, now, i'm thinking "this blog post is for trolling."
there is no god damn one tool to make you a good programmer. not a web framework, not a ide or anything. the tools are nothing to do with your skills.
you have to learn programming without program anything at the early stages. learn programming fundamentals, algorithms, design patterns, best practises and so on.
i'm not giving a shit about which tool you use. if you are using MongoDB because "it's new and everybody talks about it" i will kill you. use a tool only if it does the job.
Ignoring the Zed Shaw tone, he makes an excellent point. Part of why I work on Faux is that jQuery isn't a framework. It's a library. I try to explain to people that Faux is to Backbone as Rails is to ActionController/ActionView and Active, and now that I think of it, Faux is to jQuery as Rails is to ActiveRecord.
Well maybe not exactly those comparisons, and it isn't nearly as good as Rails 3.x, but certainly that's the right scaling, and it would be a tremendous mistake to start a rich SPI application and think that jQuery is a framework, just as it would be a mistake to start a web application and think that ActiveRecord is a framework.
Summary for those in a hurry:
"fuck this, fuck that shit, dojo has better i18n and a11y plugins, fuck jquery, The End"
The tarantino writing style weakens his argument, IMHO. More scientific arguments and less passion please.
Rebecca, thank you for posting these. I'd categorize myself among the n00bs the OP refers to, and your reasoned articles were very beneficial. I hadn't considered Dojo in the past, but I'm planning a very client-heavy JavaScript application in the near future, and I'll definitely check it out.
If you're calling i18n and a11y "plugins", you're missing the point. These types of considerations are taken thoughout the framework in a consistent manner.
>We have apps that have well over the mentioned 5k LoC of JS that even our Ruby programmers have no problem cracking open
Why the "even?" What is it about your ruby programmers which means you find it unusual that they can understand your 5k line JS app?
Not trying to be snarky or pedantic, I'm genuinely curious. I see the two languages as being relatively similar, with their common emphasis on closures and functions-as-objects. Obviously the object models are very different...
I work in a big shop. By and large our programmers don't venture outside their specialities (their choice). You could rephrase what I said as "even people who don't know anything about the code and have very limited experience with JS..."
I can see how what I said may have made the wrong impression. I don't think there's anything Ruby-specific that makes people good or bad at JS.
I think it's where the only submissions displayed are those submitted by users who have karma above a certain threshold (or where their account was created a long time ago, i.e. not new account submissions).
I think you know what I mean. If I'd just said the article was immature and silly and doesn't belong on HN because of its outrageous tone my feeling is that I'd be downvoted, as it's happened before, so I made my criticism more oblique.[1]
I didn't know what you meant. But that's by the by. A larger question has to do with HN changing as its userbase changes. Things change. Sometimes for the worse:
And sometimes for the better. There was a time when the PC web was all about the newcomers, the barbarians beating at the gates of the establishment. The web was the same way. I can't rule out the possibility that if HN is flooded with newcomers, some of them might be vandals wrecking everything, but some of them might also be ushering in a new age, the new new thing.
I think this post is neither trolling nor calling on people to blindly switch to Dojo. It is pointing out a thing I see over and over and over again: people choosing jQuery for tasks to which it is simply not suited. Yes, if you know what you're doing you can make it work -- Alex Sexton makes this argument quite well in his post "On 'Rolling Your Own' Large jQuery Apps" (http://alexsexton.com/?p=106).
This post asks developers who blindly choose jQuery, based on its popularity and an often-misguided sense of self-assuredness, a straightforward question:
"Tell me how, exactly, you plan to solve these problems you haven't even thought about yet? If you proceed blindly with jQuery, then by the time you think about them, you will be effed. So, maybe you ought to ponder, for a solitary moment, that there might be things you haven't thought about yet, and consider a toolkit that's thought about JavaScript app development questions for years, rather than a library whose competencies are still and painfully limited to DOM, Ajax, events and effects."
I applaud the people who answer this question competently with jQuery as a base. What I take issue with is the people who aren't willing to consider for a second that, for all its popularity and simplicity, jQuery might not be the right tool for every JavaScript job under the sun.
jQuery is for websites, while Dojo or Prototype is for applications. The architecture of the library/frameworks are extremely different, and if you can write jQuery then it isn't too difficult to switch to another library or framework. It's all javascript. I don't see why people like using tools for unintended use cases. This is like using Rails to build a 3 page static site. Wrong tool for the job.
TL;DR: if you use jQuery and PHP, you are noob, everyone who disagrees is a noob. Rails ohhh yeah it's the best, fuck yeah. If you don't use Dojo, you are a fuckin' noob.
For some reason I can't take this post seriously, it's like a typical troll post, it claims a lot of things but doesn't even try to back them up properly.
31 comments
[ 106 ms ] story [ 1366 ms ] threadAnyone have a cache?
Posted on March 3, 2011, 10:23 am, by Bob Remeika, under Uncategorized.
So the CEO comes to you and is all like “I wanna build the next Facebook killer”, and your all like “Fuck ya! I’ve been waiting for this chance ever since I learned PHP!”. So forget the massive backend infrastructure and that you didn’t even know what graph theory was until they hired that PHD who kept talking about O-n-squared like it’s a bad thing. Your job is to build the front end.
So how do you do it?
Well John Resig and Doug Crockford are your Jesuses (or Jesusi? How do you pluralize Jesus… the guy is a fucking God), so you’re all like, “Well jQuery worked on awesomepetsbyphilandphillis.com… so $(function(){}) this bitch”. So you start coding like a bat out of hell. Before you know it, you’ve got a login form and a dialog box and shit is all peaches and cream. You are a God! All you had to do was grab a plugin here and there… you didn’t have to do shit! And then BLAM! BETA!!! Valleywag is now following your CEO on Twitter and Michael Arrington is pleading with you to enter the Techcrunch 50. You are going to be RICH!
So now you’re feeling pretty good about yourself and that PHD is thinking, why the fuck did I spend $150K on college when I could have just read “Javascript the Good Parts” and been the next internet hero? Not so fast sparky.
The Rails Developer
You’re a startup so you are inevitably going to be a Rails shop and you will hire a “Ruby Rockstar”. Don’t argue with me on this.
So like I was saying… you hire this “Rock Star” and then all of a sudden he’s dissin’ your shit. “What the fuck is this inline Javascript?” and your response is “Dude, I’m gonna clean it up, we’re a startup YAGNI… Agile… cough cough”. So you start cleaning up your Javascript and then you realize “Oh, there’s some common patterns here”. So you start making some classes, cause that’s what Doug said to do. Then you’re like, “Wait, Javascript doesn’t have classes” (or inheritance…. at least not the kind you read about in Learn Java in 21 days), but dude it’s cool. Class.js
So you add class.js into your growing number of dependencies and off you go again. You have classes now and life is starting to make sense, but your app continues to grow, and all of that shit that was starting to make sense is now falling apart. jQuery UI will get you an awesome fucking date picker but the CEO is talking about going international and adding some consistency to the user experience. You want to be everywhere… mobile, desktop, web and beyoooooooooooooooond! The CTO is annoyed about the lack of keyboard controls in the FriendPicker plugin you wrote, but that’ll take a week… and then another week. “She just doesn’t have the power, Captain” you say, but if you don’t get the fuck out of this Romulan tractor beam then you’re fucked. Wait… whaaaaa?
So now what?
Your job was to build a full fledged app, but there’s no way you could have seen this massive shitpile of shit coming down the ephemeral pike (is it pike or pipe? People disagree). Your solution is to build a widget rendering system, some core Javascript utilities, some abstactions upon abstractions (he said mobile didn’t he?). All of a sudden you have a directory tree that looks like this:
public/javascripts/app — Rails BRTCHES!
- application.js — Rails BRTCHES!
- prototype.js — Rails BRTCHES!
- core.js
- core.seriously.js
- util.js
- jquery.1.4.2.js
- underscore.js
- mobile.bitch\!.js
- plugins/
- lightbox-0.5.2.js
- thickbox.js — Cause lightbox didn’t do everything
- gallery-1.1.1.js
- rating-1.23.4.js
- carousel-1.23324234354354353453453453.23.js
… eight hundred or more non-interconnected files
- widgets/
- base.js
- FriendPicker.js
- NosePicker.js
… blah blah blah.. who cares.
What’s missing?
Aside from the fact that you now have dependency galore and that your rating plugin requires underscore 1.0....
Now, we have added HN to the list of communities which can slashdot a site.
Ha!
As for the content of the article...
Yes, if you know that you're going to be building some sort of rich Javascript app, then start with a richer framework. This doesn't mean that JQuery is for Noobs, it just means that it's for lighter weight uses. Different strokes for different folks.
after the first 5 paragraphs i was thinking, "dude, he has got a point. i think TL;DR is : 'tools doesn't make you a good programmer use whatever you want."
but after the "dojo" section, now, i'm thinking "this blog post is for trolling."
there is no god damn one tool to make you a good programmer. not a web framework, not a ide or anything. the tools are nothing to do with your skills.
you have to learn programming without program anything at the early stages. learn programming fundamentals, algorithms, design patterns, best practises and so on.
i'm not giving a shit about which tool you use. if you are using MongoDB because "it's new and everybody talks about it" i will kill you. use a tool only if it does the job.
Well maybe not exactly those comparisons, and it isn't nearly as good as Rails 3.x, but certainly that's the right scaling, and it would be a tremendous mistake to start a rich SPI application and think that jQuery is a framework, just as it would be a mistake to start a web application and think that ActiveRecord is a framework.
Evidently.
- http://blog.rebeccamurphey.com/on-rolling-your-own
- http://blog.rebeccamurphey.com/on-jquery-large-applications
- http://blog.rebeccamurphey.com/2009/11/12/dojo-confessions-o...
We have apps that have well over the mentioned 5k LoC of JS that even our Ruby programmers have no problem cracking open and working on if needed.
(And for God's sake, just because they're Rails apps doesn't mean they have to depend on Prototype.)
Why the "even?" What is it about your ruby programmers which means you find it unusual that they can understand your 5k line JS app?
Not trying to be snarky or pedantic, I'm genuinely curious. I see the two languages as being relatively similar, with their common emphasis on closures and functions-as-objects. Obviously the object models are very different...
I can see how what I said may have made the wrong impression. I don't think there's anything Ruby-specific that makes people good or bad at JS.
[1]http://news.ycombinator.com/classic
[2]http://en.wikipedia.org/wiki/New_Coke
[1] http://en.wikipedia.org/wiki/Self-censorship
https://secure.wikimedia.org/wikipedia/en/wiki/Eternal_Septe... http://gilesbowkett.blogspot.com/2008/05/summon-monsters-ope...
And sometimes for the better. There was a time when the PC web was all about the newcomers, the barbarians beating at the gates of the establishment. The web was the same way. I can't rule out the possibility that if HN is flooded with newcomers, some of them might be vandals wrecking everything, but some of them might also be ushering in a new age, the new new thing.
This post asks developers who blindly choose jQuery, based on its popularity and an often-misguided sense of self-assuredness, a straightforward question:
"Tell me how, exactly, you plan to solve these problems you haven't even thought about yet? If you proceed blindly with jQuery, then by the time you think about them, you will be effed. So, maybe you ought to ponder, for a solitary moment, that there might be things you haven't thought about yet, and consider a toolkit that's thought about JavaScript app development questions for years, rather than a library whose competencies are still and painfully limited to DOM, Ajax, events and effects."
I applaud the people who answer this question competently with jQuery as a base. What I take issue with is the people who aren't willing to consider for a second that, for all its popularity and simplicity, jQuery might not be the right tool for every JavaScript job under the sun.
I use JQuery for the simple stuff and Flex/AS3 for RIA. JQuery is pretty cool but I could see how all the plugins help paint you into a corner.
If I did heavy-duty JS development I have no idea what I'd use. I'd probably just spend wy time bitching about no Flex/AS3.
For some reason I can't take this post seriously, it's like a typical troll post, it claims a lot of things but doesn't even try to back them up properly.