I wish they included the right way to do the stuff. Then it would be fun and useful too, and that would be a great way to teach best practices and coding techniques.
For a project that's trying to improve documentation and documentation visibility, arewefirstyet.com is a pretty horrible site. I had no idea what was going on until I read the jsconf speech. Also, (this is nitpicky, but) you might want to reverse the vertical axis of your graph to emphasize that #1 is a good thing (and make the range 1-250, not 0-250).
Of course, if you only want 'insiders' looking at arewefirstyet.com, then what I said doesn't matter.
I'm fairly sure things on the internet are still allowed to be fun if the publisher so desires.
It certainly beats another "You are a bad programmer but..." submissions which are tiresome in the extreme for their general self-serving and contrived examples/advice.
> I don't really see how this snobbery helps anyone
I find your lack of humor, amusing. Practically, it makes people laugh which I'msure if I bothered to look I could find some study that shows laughing reduces stress. It provides relief from dreary, serious business, grumple heads like you.
I meant how does it advance JavaScript? How does it make JS developers look to the outside world? Is it really cool to laugh at people who don't know better?
If you're someone that runs an enterprise-level website (>100 hits per day), you've probably had to deal with the pains of scaling and maintaining your code.
Enterprises have dealt with these problems for years -- this is an attempt at gathering all of that knowledge and to share it with the world.
Usage shown in example is stupid.
However to present this approach as antipattern is also stupid.
If "enterprise" means even moderately big apps namespacing is the way to go.
Alas, that project mocks too much useful stuff to be liked by me.
Namespacing seems fine, but to torture the declaration syntax as shown on the site in order to get the Java-like com.domain.package.class.method() syntax is wrong. Just use underscores in the name rather than periods and use the syntax properly.
That's the first example I got when loading the page, and that's exactly what I thought: for big projects namespacing seems sensible enough. So I thought the site was a collection of design patterns, rather than anti-patterns.
Left me very confused when the next example was declaring all your functions globally.
I'm bothered that when I saw the code on http://enterprise-html.com for rounded corners, the first thing I thought was "You forget to set cell spacing, padding, and borders..."
I spent a summer interning at a large financial data company, and I was surprised to see javascript was used quite a bit internally, so I can attest that "enterprise javascript" really does exist.
My coworkers wrote very good code, however the quality of my JS was terrible. Of course. I only knew C++ and Java at the time, so I treated javascript like it was "Java without types"
I would probably bet most people approach JS like that. Which is probably related to the fact that there is so much bad javascript. People who don't really learn the language and just assume that they know [insert-statically-typed-language-here] and therefore can program javascript.
Indeed. Javascript: The Good Parts is a good book for getting past that stage. I feel like I'm finally learning JS, after having used it for years amateurishly, and it's becoming one of my favorite languages.
I realize things are a little different in JS, but when you're working on a massive product with a small team, no matter how great the code is, eventually you learn that the variables DO have to be descriptive and properly organized namespaces ARE very important.
Many of these conventions evolved, in my opinion, because it's difficult to create large applications, period. No matter how much effort you put into abstracting everything and modularizing components into smaller components.
Anyway, these were the only ones that I thought were a little out of place.
Seems like a great way to run a hacker specific news site.. that way only people who understand things like git and github would be able to submit stories :)
I really hope the recommended method of suggesting tips (fork, modify, pull request) and the overcomplicated backend (complete with four dependencies!) is an attempt at meta-humor. Maybe we need an opensource-js.com.