On JS Frameworks

I realize I blog a lot less because I write a lot elsewhere, like on reddit, or in emails to my friends. Going forward, I'll probably cross post that stuff more.

This happened on reddit today -- link:

/u/achen2345:

I love JavaScript and believe you can achieve 10x performance in this language compared to many other languages simply because you can iterate faster without a required build/compile step and various other factors.

But....

Outside the JS ecosystem JavaScript developers have a nasty reputation. They are perceived as immature (in a developer sense) and amateurish. Instead of improving and seeking to become more mature developers who seek to contribute superior software solutions many JS developers whine about fatigue, frameworks, and other trivial bullshit. The continuous need for enabling and the confusion over not invented here with the extreme invented here mentality certainly doesn't help. The utter inability to write code or do your job without a favorite pet framework also doesn't help. It's unfortunate, but this negative reputation is absolutely well deserved.

/u/compteNumero9:

Many developers see the problems of JavaScript and just think we use it because we don't know better (even when a lot of us also developed in C, C++, Lisp, etc. before and are also coding in Go and Rust). They don't realize that JavaScript is, today, one of the convenient tools we use. It's flawed, of course, but most tools that are less flawed are also less powerful.

And there's also those kids who think they can look cool by dismissing a language and mock JavaScript because "NaN isn't even equal to NaN" or "a string can be equal to a number, JavaScript is retarded".

And yes, there's a little too much bullshit in our community, with too many frameworks or libs being instantaneously famous mostly because they have a cool web page.

/u/achen2345:

Every language has its bumps and warts. Yes, there is some amount of sloppiness permissible by JavaScript. While those arguments are valid to an extent they quickly become convenient excuses of the uninitiated. With a modest amount of experience and mentoring you develop around the sloppiness, in any language.

The way to counter-argue the tired excuses like that is to produce superior solutions. Most computing problems don't care what language you use.

me:

There's an incredible amount of sloppiness permissible by JavaScript, which gives teams incredible amounts of rope to hang themselves with, which is why there's so much iteration on libraries and frameworks.

It's like if people had been forced to make huge apps in Perl. I might personally have the discipline to not write awful, unreadable spaghetti, but if my organization as a whole doesn't, it's going to be a mess. With tight deadlines, it's super tempting for people to relax some of that discipline, too.

Frameworks don't just organize my code. They provide glue and conventions that allow me to more easily work with other people without having to fight them on every stupid detail.

You can write good vanilla JS, but there are a lot of ways to do the same thing. i.e. Perl's motto TMTOWTDI (There's More Than One Way To Do It). Just because you have experience and received mentoring, the sloppiness doesn't have to come from your code, but it can come from how your code clashes with someone else's, who had different experience and different mentoring, where one isn't necessarily any more valid than the other.

JS might provide 5 different ways to do something, but a framework might reduce it to one obvious way. Good frameworks will provide an escape, in case one of the 5 is clearly better for your situation. To get a team working together on a big project with a language like JS basically requires a framework. If it's not someone else's, you're deciding on a bunch of conventions internally and effectively rolling your own framework.

When you have a lot of freedom, figuring out how to constrain it, to allow a team to mesh, and to what degree to constrain it isn't some simple thing. It's a really hard problem. Struggling with it doesn't make devs amateurish. It's not trivial bullshit.

The problem frameworks attempt to solve is essentially what governments attempt to solve for societies.

>