Hacker News new | ask | show | jobs
by lewisjoe 2709 days ago
Here's an interesting observation from recent HN reactions to JS:

+ The hardcore server folks are hating JS these days, because it requires more than dropping a single script tag.

+ The full-stack people / JS beginners are hating JS with a passion, because they think it's unneeded complexity for their deadline.

+ Advanced JS veterans totally like how the JS ecosystem is rapidly maturing & solving its problems in interesting ways.

And there's people like you (the latter), constantly explaining the former groups that JS isn't so bad.

I'll see if I can write a blog (or a book if it has to be) on each part of JS ecosystem that has changed with detailed explanations on why it is better.

I already wrote a piece along those lines - https://writer.zoho.com/writer/open/0y4wx08838bdbcf954b1398c... but I guess I (or someone else) can do better.

1 comments

I think this is all true, but one important factor is that there's currently an assumption that any serious project must necessarily use all this complexity, which makes your second point true - but not in a way that's the fault of javascript, but more the community around it.

If you're making a simple site, or even a fairly simple application, the typical modern Javascript toolchain is absolutely unneeded complexity. It's not even React - many developers will turn their nose up on anything that isn't using Redux / Typescript / GraphQL / whatever flavour of the week is popular, even on sites where Javascript itself is probably not that big a requirement. As an example, we're all talking on a site that has almost no Javascript and works perfectly well - but I have no doubt that if you hired a developer to build a site like this in 2018 it would absolutely use a typical complex setup.

That isn't Javascript's fault, really - no library demands that you use it for everything, and many like Redux make it a point to push users away from using them inappropriately. But the Javascript community is currently in a phase that's probably unhealthily pushed towards the new, shiny, more complex library, regardless of how well it suits the problem.

I have to agree with you. The shiny stuff syndrome is spreading like cancer in the front-end world.

The only way to set this right is: when you create something, don’t sell it as a one size fit for all solution. State the tradeoffs as loud and clear as possible. Guide the users on what point you necessarily need the library and point them to simpler alternatives when needed.

This is something I deeply respect about Dan Abramov. He did this with Redux. Now that he’s in React, I see a lot of this culture in React docs as well these days.

Bottomline: The responsibility is on the creators to stop spreading this shiny stuff syndrome.

I will say that as a current Redux maintainer, I _hate_ that I seem to have to spend more time cautioning people about when it's appropriate to use Redux, than I do actually promoting its use. :( I can't think of any other lib off the top of my head where the maintainers have had to do that.

That said, yeah, we've got a Redux FAQ entry that discusses when you should use Redux [0], and some other "caveat"-type sections scattered throughout the docs.

We're currently planning a revamp of the Redux docs structure and content [1], and we'll see if we can improve some of the messaging as part of that. Would appreciate any suggestions you can offer.

[0] https://redux.js.org/faq/general#when-should-i-use-redux

[1] https://github.com/reduxjs/redux/issues/3313#issuecomment-45...