Why do people hate node js




















If you are in the second category, I believe this post might help you to improve your knowledge. You can see there are thousands of posts about NodeJS being really naughty, and thousands of posts about NodeJS being awesome. If you love NodeJS, one of the following reasons could be why. What we really need to investigate is, why certain developers really hate it. After reading some articles and with some of my own experiences, I thought of summing up a set of reasons for people including me when I first started with it… hating NodeJS and how to overcome them to become more comfortable with NodeJS.

I believe the rest of the article will be really useful especially for those who are new to NodeJS and having a difficult time working with it. And the problem is worse because you are not familiar with JavaScript as well. If you are coming from a different tech stack Java, Python or similar , you need to first have a good training on JS before stepping into NodeJS.

This problem is linked to the previous problem I mentioned. To implement proper error handling, you need to thoroughly understand the lifetime of an async action and how multiple async actions can be chained properly. Here are some tips to improve:. With the new features coming up deprecating older features, NodeJS package developers also frequently release updates to their packages to support latest changes. This can cause immense pains when you develop your apps.

Latest versions of these packages will be installed each time you npm install which might sometimes be incompatible with your existing code.

Therefore, when one of your colleges clone your repo and run npm install , or when you deploy your app somewhere and run npm install it might not work and throw errors while running.

Luckily, preventing these kinds of pains is easy:. This is the most common situation when people get frustrated about NodeJS, although it has nothing to do with NodeJS itself. Most of the work has been already done and you just have to fetch it and include in your project. Verify Your Email. In order to vote, comment or post rants, you need to confirm your email address. You should have received a welcome email with a confirm link when you signed up.

If you can't find the email, click the button below. Your rant must be between 6 and 5, characters. Your comment must be between 6 and characters. Save Changes. Vote and comment on others' rants.

Post your own. Build your custom avatar. Keep me logged in. FYI we never show your email to other members. Forgot Password? It happens to the best of us. If you still need help, email info devrant. Login Signup.

Login Sign Up. From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API. Maybe they don't know why? It's easy to hate on something different. You do realise that if you're reading this, it's most probably on some-js. Devrant is not a native app.

What if you never waited for any IO to happen? An excellent answer. Although JS has problems, it did already win so Node. But async everything is nutso and requires lots of gating and checking mechanisms in order to get back to synchronous, imperative behavior which is what you normally want in a scripting language. I work on a monrepo of , lines of code at work and I think most of the Node stuff is "just guessing" when people run it.

All of Node is like this. People use JS because it is in the browser, do you have any data that JS won anywhere except the browser? Pretty sure it isn't even the most popular solution for web backends. It's also the most popular language for Lambda functions on AWS. Lambda functions are just a back end framework tightly coupled to a cloud service, they go in the web backend bin and aren't their own thing. Javascript might be the most popular there but I doubt lambda functions makes a significant dent in the overall web backend landscape.

That's a tarted-up container environment, irrelevant to node. I never got why there is just one. The script tag can take any number of languages. Eventually, people just compiled code written in other languages into Javascript, treating it more as an "assembly language for the web"[2] than a language directly coded in, and the script type attribute was officially deprecated from the script tag in HTML5.

What properties would a new language make an interesting alternative? What common problem suffers the most solved in js? Preferably something without hope for improvement. Given how practically all Javascript nowadays is generated by Typescript or other compile-to-js languages, probably a stricter type system, actual integers and doubles JS only uses floats, maybe as often mentioned, a bigger standard library.

There probably isn't much benefit to different languages if you're just manipulating the DOM which is probably why that model failed, having more than one language doing the exact same thing is needless extra complexity but using the browser as an application runtime opens up the possibility of making any software written in a supported language accessible and executable from a URL.

The "JS as bytecode" model got us surprisingly far, but it was a disgusting hack, and Java applets and Flash had their day in the sun, but Webassembly is probably what's going to make the "multiple scripts in the browser" model eventually feasible.

Thinking about it there are so many angles from which one could approach it. It could not be required to run the script. For example require the visitor has his own website and have the script interact with specified tools installed there.

Or a very limited language that disables js for security. It could be a highly readable DSL, for example something to write interpreters in. Or something narrow like interact with a rich text editor or data visualizations. Perhaps a basic game engine. I think its awesome :D. I had the unfortunate displeasure of selecting Node for a take home interview. My simple express API was working fine when testing with Insomnia but the test suite was a convoluted pile of crap built from different npm frameworks and plugins.

Oh well, I learned I never want to touch Node again. Probably you would have had this problem with any other platform you were not familiar with. Tests can be written properly and in a very reliable way in any platform, and a mess can be made in any platform too. Node is hated because programmers are highly opinionated not in a negative way. Everything with huge usage gets hate, because everything has flaws and trade offs. People get forced to use it at work, sometimes to solve the wrong kinds of problems for it's strengths, which amplifies the dislike.

It's the nature of the beast. I disagree. Python doesn't get anywhere near the amount of hate as Javascript. Ruby never had that level of hate. Go attracts some criticism, but it also has a lot of ardent supporters. I have extremely negative feelings about Java, but when I work on a Java project, I can't assume that everybody working with me feel the same way.

Lots of people who work with Java find it tolerable or even pleasant. Javascript is like PHP; when you join a group of people working in it, you can freely shit on the language without worrying that you're going to hurt anybody's feelings, because everybody hates it. Even people who love it, hate it.

That's interesting. I hate Java and actually like JS. I used to make the same assumption too, that everyone just hated Java and it was easy to hate on. I used to apply for JS jobs, and the interview would have questions like "What do you dislike about JS? Maybe it's a sign of proficiency when you're good enough at a language to hit its limits. I'd say the other effect is when you join projects built by experienced but non-senior people, it tends to be overengineered.

Overengineering shows the ugly side of a language. Everyone assumes that this is normal behaviour for the language, when it's frequently not. As an outsider, I see nodejs differently from js in general. I think nodejs has its flaws, in particular in the ecosystem, but general js is just garbage all the way. I think a lot of people see it this way. I hate: - the sense that I never really can be sure where the code is executing at a glace; - the compared to Python cruft-laden syntax JSON was a win.

A fair point, but don't you think it sidesteps the matter at hand? Never mind that other systems have flaws, too. What are the specific reasons that Node. You are reframing the question then accusing the parent of not answering your goalposts-moved scenario.

And in a negative way as well :- Ask me how I feel about php. This is, though, a very excellent point. CodeGlitch 41 days ago root parent next [—]. Negative views about PHP is completely justified :. Perl is not a bad language. Neither is PHP. I'm using both.

And to be honest - it's all about collaboration. Writing something for myself? Writing anything which will involve anyone else? Writing something that you don't mind if you hate after AND if you don't mind if you hate yourself after: Perl.

Don't get me started. Everything has flaws and trade offs, but some things have more flaws than others. You wouldn't make this statement if to compare bogosort and quicksort, would you? JavaScript sucks. It isn't the best choice for any problem except where you are forced to use it the web browser. The only reason we still have it is inertia. PHP is in the same camp.

Programming languages have evolved. We know how to do better now. The-Brent 35 days ago prev next [—]. Here's the thing. JS does not suck. Node does not suck. They exist and are widely used precisely because they do not suck and deliver many advantages that are preferred by many developers over alternatives. I hate Python and could go on all day about what's wrong with it, but it doesn't suck.

I use it when it is appropriate for the task at hand, but find it is rarely the best language for the job - given what I know and what I prefer. Most people that hate a language also avoid it and, therefore, tend to not have made their peace with its shortcomings, so don't have an honest reckoning. It is unfair to completely disparage a language until you have fully figured out how to understand and work with it, warts and all. Frankly, until then, you aren't yet informed enough to make a summary judgement.

You are just cherry-picking your dislikes. I have rarely heard a criticism that did anything but highlight the critic's lack of knowledge. For example, there is a common criticism about the lack of a standard library. Well, that is how the ES or Node ecosystems are structured. It is not a flaw - it is just a different approach. If you work intelligently within that paradigm, it is actually quite nice.

It may not be what you like or expect, but it is not inherently wrong or lacking. Parenthetically, anyone who makes the standard library complaint about Node just doesn't know Node. It has a very complete set of functionality natively, for its purpose. It is not going to offer much in the way of math operations, sorting algorithms, etc. That is not its purpose. If you want those things, you can add them.

If you think that a given dependency is too big, too small, incomplete, or poorly managed, write your own, and publish it like many have done. But be warned - if it gets popular, there will be no end of complaints about what's wrong with your library because We have opinions and are quick to convince ourselves that those opinions are fact and anyone who disagrees is not as smart as we are.

Something that I don't see mentioned here, but which I believe drives a lot of the controversy around Node, is that it takes an extremely unopinionated approach to web development. That is, Node. You need a package to serve html, you need to decide on an application architecture and organizational structure, you need to choose an ORM.

You need to make a lot of decisions that other web frameworks like Django or Rails just make for you when you build a project. The lack of opinionated defaults has some benefits: - It gives you a ton of flexibility - It makes it easy to learn the framework, since there's no magic.

The other side of this coin is that flexibility often leads to architectural chaos, and working with Node can feel very slow, since you're constantly reinventing the wheel. I think you're not seeing it mentioned here because this is comparing apples to oranges. Node is not a web development platform, it literally IS only a runtime.

Rather than comparing with Django or Rails, one should instead compare it to Python and Ruby. It's possible you may have confused Node with Express, as I see that happening very frequently, but Node is used for all sorts of other workloads like desktop apps, microservices, and other general computing tasks.

Comparing Node with Ruby and Python is still apples to oranges. Those people complain about and those no one uses. Every tool has its usefulness and its drawbacks. In retrospect, he was clearly talking about javascript, which got a tremendous push from the big tech players despite all its obvious problems. Now we are stuck with a mess of code written in an ugly language. Why the big guys picked javascript, I don't know. Maybe to ensure that everyone was so bogged down in dependencies, language incompatibilities and callback hell that no competitors would arise?

Haha, nice link. Yeah, pretty much this. I'd expand on it to answer the original question more fully from my perspective: I don't actually hate node. I'm sure it's a very good javascript environment. For me, the problem is a fundamental one: you're choosing to write javascript somewhere where you don't have to be writing javascript. I disagree on principle with doing that: friends don't let friends choose js. For me, any technical merits of the implementation and the benefits of running the same code on both server and client sides aren't important - IMO you're better off to just use a good language instead, only using as much js as is absolutely necessary.

I literally don't think I've ever seen anybody try to argue that js is a good language. I can't conceive of anybody trying to argue that such a pitiful standard library is a good idea. Why in god's name would you choose to use it server side when you could be writing something less excruciating like perl or php or assembler or brainfuck?

To be fair, they never really picked it per se, it was just the only thing that was kinda-sorta standardised enough that you could write code and kinda-sorta-almost get it to run on most browsers without installing some horrible plug-in. I think a more appropriate question is why it never got replaced with something not-awful. For me, it's less an equation of active hate. I can actually see why some people like it, and I wouldn't want to get in anyone's way on that. That said, I have found that the.

NET ecosystem is an agreeable way to build the kind of software I need to build. I don't think my product would be infeasible in a Node. JS ecosystem, but it would certainly be more painful for reasons that are specific to our problem domain. If I had to take a shot across the proverbial HN language war deck, I would say that dependency management is the biggest reason I would prefer to avoid Node.

JS on future projects. I have a very complex. NET code base which uses 3rd party dependencies you can count on one hand.

Our customers really enjoy that kind of thing. My guess is because: - lots of people don't like Javascript - lots of people don't like V8 - the guy who made Node. PaulHoule 41 days ago parent next [—]. It falls in an awkward place. For most scripting work it is hard to beat Python even if Python is slow.

I would love a more in-depth exploration about this part of your message, if you have some time. I just like it personally. For one thing you have the solid jvm runtime, ides that work, good performance, etc. With sealed types, var, and similar features, pattern matching, it is getting better all the time in small ways. I recently wrote a dsl in Java that lets you write a Java AST , transform it as a tree, write Java source code, compile it.

It is not quite as simple as doing the same in LISP and you have to mangle names a little to unerase types, but the IDE helps you find the names. Apropos of nothing I find Python to be unreadable. I have a moderate reading issue and Python just looks like random letters to me. I actually wish I could process it as there are some very nice tools that I see people make that use Python. With Python it is about the ecosystem. Maybe I am crazy but I think it is fun writing async clientservers in Python.

I know V8 from the inside out used it as a standalone component on several of my projects and it truly is a modern engineering marvel. Used node for many things, including services currently in use by many millions of users. I love node. I also love Python and Zig. Different tools for different jobs. Any one is really bad for some things and amazingly good at others. I don't hate node, I just realized that on the server-side, by the time I added enough modules to make something work I could get better performance from a Jakarta EE application server and write far less code.

Go's standard library comes with a lot of the same batteries built in and while I write more code in Go, the compiled binary is small good for container management and I use less dependencies.



0コメント

  • 1000 / 1000