14 comments

[ 7.3 ms ] story [ 45.2 ms ] thread
I agree with the gist of this article. Choose the right tools for the job.

But as with anything, judgmental snark also goes both ways. The Javascript ecosystem is more of a mess than other, similarly popular, language ecosystems. There's nothing wrong with acknowledging that. Although you're right, a little less snark wouldn't hurt.

Indeed. Seems to be as is for programming patterns; it needs to solve one or more problems.
Bias: I don't like JavaScript.

I think this article is the perfect example of what is wrong with the ecosystem.

It isn't that there are too many frameworks. I regularly choose between five or six web frameworks in Python.

However, in Python, I've never had someone say that the framework was the wrong tool.

The Flask community doesn't crusade that Bottle is bad. They are similar, and have tried to work together, despite different philosophies.

The JS community seems to not just uphold a framework like React, they practically worship it. Suggesting huge complicated things, for something as simple as a HN site.

It isn't just, "Ooh! Shiny!"

It's "Idiot! Why didn't you use the shiny?"

This toxicity is barely under the surface, and is the shining influence of those new developers who choose the language.

The ecosystem isn't the issue. The culture that promotes it, is.

The only people who think that javascript and the javascript "ecosystem" is anything other than an utter disaster seem to be those who've never used anything else.
I agree with the message of the article.

It can be daunting to start out. I think the problem is not following the fad and do your own research into what solves your problem.

I felt the same way when I started. So I documented every step I took and I can say with confidence I am comfortable in the JavaScript universe.

If you are interested in how I learned it you can follow me here:

https://www.codemy.net/channels/react-foundation

I am comfortable in the JavaScript universe.

Are you comfortable in the JavaScript universe or in your JavaScript universe?

While I'm reasonably comfortable writing JavaScript on my projects, I feel that if I where to walk onto a random JavaScript team I'd have no idea what was going on and equally if a random developer where to pick up my JavaScript project the first thing they would do would be to re-write everything to conform to their 'universe'.

The one image that describes JavaScript perfectly: https://i.imgur.com/qPlBUp5.png

Not much more needs to be said, It amazes me that there are people that actually think JavaScript is an "important" language, It's an archaic mess that has simply been polished over and made to look shiny(as the article states).

If you polish a dirty shoe, It's just a dirty shoe that's shiny.

This image is absolutely ridiculous.

    Problem: JavaScript won't run outside browser.
    Solution: V8 (V8 was built for Chrome, btw, NodeJS is what took V8 outside of the browser)
    Problem: JavaScript is single threaded by design. (This isn't a problem, you even said BY DESIGN)
    Solution: Asynchronous programming. (This is a solution that literally allowed applications running on 20-30 machines to drop to 2 machines and still see over an order of magnitude performance improvements).
    Problem: Callback hell. (Callback hell is NOT the way any reasonable Node developer programs. Promises are completely sensible to reason through).
    Solution: Compile to better language (Promises are native)
I don't know how many times I have to post this, but this is what good Node code looks like.

    function doComplexAsyncTask() {
      return Promise.join(
        doParallelAsyncTask1(),
        doParallelAsyncTask2(),
        doParallelAsyncTask3()
      )
      .spread((result1, result2, result3) => {
        let combo = doSomething(result1, result2, result3);
        return saveComboToDBAsync(combo);
      })
      .then(result => doSomethingElseAsync(result))
      .catch(err => handleError(err));
    }
And that's an overly complicated example. And then from anywhere else in the code you can call

    doComplexAsyncTask()
    .then(result => doSomethingWithResultAsync(result));
There is no callback hell. The error handling is trivial. Doing parallel tasks is trivial. And that "single threaded" issue is not an issue. The moment parallel tasks1, 2, and 3 START, your application is already serving the next request. There is 100% CPU availability for every single thread, not a single moment is wasted blocking. And if you're running on a multi-core machine, you use node clustering to get 100% CPU usage of all of the cores.

People do just regurgitate the same nonsense over and over.

Would be great if you can entertain the idea that all that digging might be to get to the other side
You may not like JavaScript, and that's fine (I can certainly understand why), but like it or not it is an "important" language because it's all over the web, where "important" has some debatable meaning of weightiness. Right now hundreds of millions of people around the world are running JavaScript code, whether they know it or not (and most probably don't).
JS is ruthless.

It has no issue discarding an ENTIRE generation of programmer and 1000s of man-hour to move itself forward. It does not sleep, like a eternal blackhole it eats young men and spits out their heat at the other end.

JS is chaotic.

Just like nature, it is not uncomfortable in telling you the complexity that is reality. Fighting it only results in broken dreams and tears. The best hope is to find your small place and hope that the chaos doesn't someday destroy you.

JS is War.

Created in the crucible of the young internet, it had to fight for its survival as soon as the umbilical cord was cut. It existed in slumber while the nations of python, ruby, PHP were destroying each other apart to get a piece of land - in what is humanity's most empowering invention ever since the printing press. JS was not part of the racket, it was too weak to participate - only a nation of lesser mind. The lesser minds however represented large segment of the hungered masses - students, artists. Like the white walkers they came and waged a great war, the size of which so vast that the soldier's fighting it are unaware like a - fish is unaware of water.

This is poetic, and somewhat funny, but also kind of nonsense.

The article pretty much nails it when it talks about choice of tools, frameworks, and libraries being dictated by the kind of problem you want to solve. For me, if I'm going to add another library or tool into the mix, it has to be because it's adding some clear value to what I'm doing. If not, it stays out.

Classic example: I have a games site I'm working on that uses lodash, and only lodash (actually only a subset), because a key factor for me is keeping that page weight down so people accessing the site via mobile on a capped data plan and a laggy connection don't have to wait an age for the game to load because I'm downloading 1MB of minified JavaScript libraries. That means that some things I need to do are more work than they otherwise might be for me, but that's OK because it's helping me hit my objectives.

All of that being said, whether you like it or not, "How it feels to learn JavaScript in 2016," makes some valid points, and certainly captures that feeling of being completely overwhelmed that I hadn't experienced with other languages and ecosystems. You can substitute 2013 for 2016 and it exactly resonates with the way I felt back then, when I returned to JavaScript after a 10+ year absence.

The maligned "snark" just goes with the territory. As far as I can see the JavaScript community seems to thrive on upheaval and butthurt; it feels professionally immature and full of easily bruised egos who want to be right and don't give two hoots about the consequences of the willy-nilly reification of their opinions. Just a couple of examples:

https://medium.com/@azerbike/i-ve-just-liberated-my-modules-...

https://news.ycombinator.com/item?id=7320833 (sadly the commentary has gone from the original post on this one)

And the level of opinionation is extreme. People love to talk about the "right" way of doing things. And, "Oh you're still using X? You should be using Y instead now." is a line I've been on the receiving end of quite a few times now. It gets boring.

I'm fed up of "opinionated" frameworks and libraries and the people involved in them talking about the "right" way of doing things as if it came down from on high carved on stone tablets and isn't in fact just a bunch of stuff they made up themselves. What I need are things that plug together easily to deliver value and help solve a problem, with less of the sass(1).

For me the interesting thing to be doing is building working software that people will find valuable and actually use and, hopefully, enjoy doing so. Languages, frameworks, and libraries are nothing more than a means to an end.

(1) Sorry, it just popped out.

(comment deleted)
Javascript is not just JavaScript. It is HTML, CSS and JavaScript. And all three are evolving at a rapid pace. The tools and frameworks need to evolve too.