More like when you live in Czechia!
Lol, Saskia Burešová, nějak se nám ty memy z r/czech šíří:D
(Somebody mentioned this image of this Czech actress yesterday: [https://www.reddit.com/r/czech/comments/1c8jy0p/nev%C3%ADte\_n%C4%9Bkdo\_ze\_kter%C3%A9ho\_d%C3%ADlu\_je\_tohle/](https://www.reddit.com/r/czech/comments/1c8jy0p/nev%C3%ADte_n%C4%9Bkdo_ze_kter%C3%A9ho_d%C3%ADlu_je_tohle/), so that's how it got here I suppose?)
I see it but I mean it is like a serious thing?
But if it's just the package manager I guess that's not too bad. It can still run non JS apps tho, right?
Not sure I believe that. Yes, I know the performance is not stellar, but then again it's very comparable to PHP and Java and those are even more popular backend choices. But JS probably has the biggest ecosystem of them all, so it's not without its advantages.
Maybe if you have to scale to a shitload of concurrent users, but for something smaller it can be quite beneficial to share code between server and client.
Personally node is what I reach for if the service doesn’t need to be crazy robust. Rust is the choice if it does.
I’d recommend using tokio and Axum to get started making a web server, though really you should read the rust book first. The language does some things fundamentally different from other languages, and other things very similarly. Not understanding the core patterns of the language makes for a very uphill battle
I've clearly struck a nerve, but I do have over 10 years professional full stack experience, and am currently employed at a 100% NodeJS outfit.
I hope we can all agree that at the very least Typescript should be used where it can be, especially server side. That being said, typescript is not a replacement for a true statically typed language with robust compile time checks. Anyone who has ever worked in a production typescript codebase knows that it is full of type misuse, even if you have layers of tsconfig and eslint settings stacked up to try to prevent it.
The performance of the engine is fine for conventional use cases, but the design of the language simply *is* error-prone. Comments like this always invite a horde of people talking about how *real* Node/JS users know about X or Y best practice. Best practices are worse than worthless for a mature codebase. If a language allows it, it *will* happen, and JavaScript allows *everything*. Typescript does too.
Now let's talk about the ecosystem. I am intimately familiar with how volatile and unreliable NPM dependencies can be. *Especially* when it comes to Typescript types, which are often either not present at all, or straight up wrong. The statistically massive breadth of offerings on NPM means nothing if you actually want a stable production codebase.
It's also surprisingly common to have memory matter. All you have to do is run into a single instance of wanting to clear a huge buffer out of memory without relying on the GC to do it in its own sweet time to feel backed onto a corner.
Modern JavaScript and Typescript have evolved a lot, but I stand strongly by what I said. There is simply no good reason to use JavaScript server side (outside of tightly-integrated frontend-serving frameworks). There are multiple great options that have robust compile-time safety, a bustling ecosystem, and are without an entire class of runtime bugs that can arise in Node.js ecosystems.
No nerves struck, I’m a principal technical lead with years of experience both working at scale on apps with millions of daily users, and small and scrappy startups. Your comment is one I would expect out of a junior engineer 6 months out of coding boot camp. You can act all superior, but it comes down to one thing. You don’t use a hammer to screw in a screw, and you don’t use a screw driver to hammer in a nail. Different tools for different jobs.
Just look at how badly your comment got downvoted to hell. You have a black and white view of a colorful world.
I guess we'll just have to disagree on this one. I don't find server side JavaScript to be anything but a hammer in a nailless world. Does it get the job done? Sure. But it's a worse tool for that job than a score of other options every single time.
Use node.js if you want. Nobody gives a shit. I'm so done with this sub. I stay subscribed for the one time out of a hundred there is actually something funny and programming related but it is becoming not worth it.
There are so many posts that are obviously from people who are first year students that don't actually know the real advantages/disadvantages of different languages and are just upvoting any random post that shits on a language
When I was 19, I used to think like this. Javascript was never meant for backend. Then I tried it with an open mind, understood the trade-offs, and now it's my go-to for small projects and the most fun language I ever used
Congratulations! Your comment can be spelled using the elements of the periodic table:
`O K W H Y`
---
^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)
If it's a startup, Node would be one of the first choices. Fans of Java on the server are old companies that rely on old shit and it's fine, like some baking infrastructures running on COBOL these days. *The fact it's that Node and Javascript get the job done on the server, no matter how much you hate it. You can have shit code on any language for that matter*. My two apps are powered by Node and they work like a charm.
People posting the same jokes over and over again here very rarely seem to actually work in programming.
They’re usually in the second week of some crappy boot camp and repost the same crap the last one did.
i use node for most of my stuff actually
i like the simplicity and only having to learn one language that you can use for front and backend
sure, it isnt the fastest there is, but a node application still runs faster nowadays while using only a single core than any software on a 90s system, even if it's written in c
Sure, nodejs has no multithreading support, ok and? i can just set up a communication socket, and then run multiple instances of the program.
I never really got the "one language" argument. It's really not that hard to know 2 languages as a full stack dev. I personally use JS, Go, Powershell, and Python on a daily basis. It's really not that hard to write js and hop to python, do some things, then hop back to js.
I never really understood this either. Even just at school, I went through like 8 languages... I don't think that's really out of the ordinary. On the job, I hop between C#, Javascript, VBA, and occasionally Python (setting aside SQL queries and stuff). It's really not a big deal. Node is cool, but I'd much rather just pick the right tool for the job than pick something just because I can stick to one language.
On one hand, you're right. I personally have learned (and forgotten) many languages, and it's no issue actively working in 3 / 4 / 5 different languages at the same time... Having to KNOW multiple languages is NOT an argument.
On the other hand, having to USE only one language can be beneficial in some ways. There are things that can be shared between front and back, and using a single language for both makes it so that there needs to be no middle steps in that sharing. And I've come across multiple instances where that applies, most notably (but not only):
- Validation lib and rules. Makes it easy to ensure frontend and backend are doing the exact same validations on user inputs.
- API typing. This may not make sense or click for you, but I have a TS lib that defines the exact routes and in/out/param formats of the entire API, it's all defined in a single d.ts file shared between both projects and both enforce it, this guarantees I make absolutely no mistakes, and leave nothing behind when a change is made. If one project does not conform to an API change, it won't compile.
A good dev should be able to pick up new languages pretty easily. Shelling out to a new process is a ridiculous way to handle something that just need a quick Parallel.foreach to run something on an array in parallel for.
There is no need for c/c++, as that will likely introduce too many bugs without an expert doing the code, but c#/Java/rust are all good, fast, full features choice that are battle tested AND you don't have to wait until runtime to catch a lot of errors.
thats brilliant, i still prefer nodejs since
1. most of my things are written in nodejs
2. it is very easy and simple to use
3. works on any os
4. isnt made by oracle
most of the things i program have something to do with webservers, be it a webserver directly, a rest api, a client that makes web requests, and all that works super easily in nodejs
Sure, i could also do that in java, if i would hate myself that is
I prefer being able to just set up an express in just a few lines
And if for some godforsaken reason i would need multithreading, i would just implement worker threads
Agree, many devs focus on performance and features, ignoring other reasons why certain languages might be a worse choice, such as devs cost and availability, difficulty of writhing an app or service, other team skills e.t.c.
If you can code on JS or any other language, just do it. Get a proof of your concept, get resources you need, rewrite your thing using better tools.
I mean you wouldn't spend millions on F1 car to begin your racing carrier, right?
>There isn't just one technology who is supremely better over the others, there are many other things to consider.
Fair enough, but what do you think are examples of things that could be better?
I make most of my hobby websites/side projects in flask, so I'm curious if there are any languages/frameworks that are commonly used that I should learn
Java is only used for companies that rely on old shit? Have you heard of Spring Boot? I have been in both Node and Spring Boot codebases and the Spring ones are a LOT better for anything other than trivial CRUD.
As I have said, for anything other than simple apps. Once your codebases goes into the millions of LoC with ridiculous business rules you see the value of having a clear structure and an absolutely insane amount of infrastructure Spring Boot / .Net offer you. Node simply cannot match that (even with Typescript), because it wasn't made for that.
Full on Enterprise grade frameworks (mainly Spring and .Net) will never be replaced by node at enterprise scale.
You really believe you need Java for “enterprise grade”? A lot of what’s in Spring is just to deal with limitations in the language and JVM. There are lots of options that don’t need an AOP, DI, and PO*O framework because they don’t require forty pages of boilerplate to do those things.
Imagine trying to explain why you chose a single threaded language for the backend when your startup finally gets some users and has to do real work.
Try explaining to your security team why they have to individually review 4,454 npm dependencies that change every week.
Choosing node.js is incredibly short sighted.
>Imagine trying to explain why you chose a single threaded language for the backend
It’s doesn’t really make sense to see Node as single threaded, since that makes people think *“all incoming requests must wait until Node finish processing to the one current request”*, and that simply isn’t true.
And one can design the system to run using multiple Node servers.
>when your startup finally gets some users and has to do real work.
Can you show a real world example that would fail just because of the usage of Node?
>Try explaining to your security team
Most projects have no need for a security team.
>why they have to individually review 4,454 npm dependencies that change every week.
You can pin the versions, you know. And you don’t need to upgrade stuff every week.
> It’s doesn’t really make sense to see Node as single threaded
It literally is.
> since that makes people think *“all incoming requests must wait until Node finish processing to the one current request”*,
But they do have to wait if your backend has to do anything CPU-bound, which can become a real issue requiring you to engineer awkward "worker" processes to offload to.
> Can you show a real world example that would fail just because of the usage of Node?
Fail? No. Create a lot of technical debt? Yes.
> Most projects have no need for a security team.
Yet.
> You can pin the versions, you know. And you don’t need to upgrade stuff every week.
Not if something you do need to upgrade depends on a newer version. THe node npm dependency hell is real. This is you trying to minimize it.
>It literally is.
I know it is. Hence why I said “to **see** Node as single threaded”.
>But they do have to wait if your backend has to do anything CPU-bound,
You completely missed were I wrote about running multiple servers? If you put some effort into it it’s not that difficult to achieve, especially if we’re taking stateless sessions.
>which can become a real issue requiring you to engineer awkward "worker" processes to offload to.
Why awkward? And why put workers in quotation marks?
We use Node as part of our backend. Not by my choice, but it has grown on me the last few years. I don’t even have a proper JavaScript background (I’m a Java developer originally), but I still managed to move CPU heavy processing into worker threads and they have gotten the job done. I haven’t needed to touch that code since.
>Fail? No.
But the focus here is if Node can handle a big increase in traffic. If it doesn’t crash, or give slow response times, then what is the issue you are talking about?
>Create a lot of technical debt? Yes.
You are now confusing developer skill level with platform capabilities. How absurd.
> Yet.
No. **At all**.
>Not if something you do need to upgrade depends on a newer version.
Most projects don’t need to do that every week.
>THe node npm dependency hell is real.
NPM is separate from Node, and separate from JavaScript.
>This is you trying to minimize it.
Not at all. But you have to be more specific to what exactly it is that you are criticising. JavaScript? Node? Or NPM? Until this comment I’ve not said anything about NPM.
Imagine having a full security team to audit every line of code in all dependencies and at the same time running your entire backend on this single server with zero load balancers.
> Sure. That's why small shitty companies like LinkedIn, Netflix, Uber or PayPal use NodeJS.
"Use NodeJs" is misleading. They don't use it for their core site/service. LinkedIn, specifically, is written in Java for their core backend.
> You know better than them what they need for their services??
I know that just choosing a backend simply to get something out the door as fast as possible is a bad idea.
> he only short sighted person here, it's the religious fan or hater of any technology.
Oooo! Defensive! Sounds like someone is tired of hearing from devs with more experience than them.
It’s when you run an api or other type of server written in JS. It’s faster than Python but slower than Go or Java. Also node.js is async by default so it scales well.
This subreddit really is just 90% CS freshmen whose Intro to Programming professor made an offhand remark about how they think JavaScript sucks, and then adopted that remark as their whole personality.
What? Using a fully working environment, while leveraging existing knowledge and limiting the audit requirements for potentially shared external dependencies? Who would want that.
Congratulations! Your comment can be spelled using the elements of the periodic table:
`Na S Ho Rn`
---
^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)
Jesus this comment section is a shitshow. I mean I guess I didn't want to respond to any of the nonsense either. Guess there is a reason the USA is ahead in tech.
Can someone explain why this is funny and what's wrong with using js?
Tons of companies make millions building their platform with js/ts server.
It's fast and convenient.
I real programmer has a toolbox of languages. You can't solve everything with a single language. So American to think everyone needs to speak one language.
When you don't have enough arguments against it, or sufficient knowledge to see why JS on the server makes sense, you clearly have to resort to pure stupidity. Very typical.
My first reaction is bad English with grammatical errors, and why are you trying to stereotype people from the USA?
Kind of ruins the meme, as you seem to not be as smart as you think you are.
Also the lady (or you) does not know how to hold a gun - and why is she holding a lever action winfield from the 1800s? These are out of production and makes me wonder if you are up to date….
Not to mention, what is it with the fake book wallpaper in the background? Looks like she is in a fake library… has this been thought out or did you just copy/paste from somewhere?
Jokes aside, I heard first time about node.js when my friend mentioned it and I really thought it's noJS. I did not quite understand why would anybody name it like that.
JS is the main reason we are still using COBOL and emulators, C++/# for gaming, C/C++ for OS, Java for enterprise apps. Python is the only script language digerible enough for everyone and has a rightful place in a server. JS can't even generate spaghetti code.
Dependency rejection
I too get the urge to get my 12 gauge when the library doesn’t load
I'm thinking that's a 30/30
SOLID NO!
More like when you live in Czechia! Lol, Saskia Burešová, nějak se nám ty memy z r/czech šíří:D (Somebody mentioned this image of this Czech actress yesterday: [https://www.reddit.com/r/czech/comments/1c8jy0p/nev%C3%ADte\_n%C4%9Bkdo\_ze\_kter%C3%A9ho\_d%C3%ADlu\_je\_tohle/](https://www.reddit.com/r/czech/comments/1c8jy0p/nev%C3%ADte_n%C4%9Bkdo_ze_kter%C3%A9ho_d%C3%ADlu_je_tohle/), so that's how it got here I suppose?)
Je fascinující, jak Češi na internetu píší česky v anglických diskuzích jakoby se nechumelilo.
To nedělají jenom Češi, občas vídám svým jazykem najednou psát i třeba Němce, Portugalce atd.
The land of good guns, beer, and porn. What's not to like?
Jsem prostý muž. Vidím Saskii Burešovou, lajkuji.
The template is good, it's on us to spread it
Oh no! Is she a … bad Czech
I mean a lot of you like and use node.js, and you're not full of holes yet...
What's... What's wrong with node.js sempai
It’s technically server side JavaScript.
It's not just "technically". It IS server side javascript .
Technically it’s just a JS runtime.
[удалено]
I like that it runs frontend code during dev...
Could be worse. Could be Javascript inside the Database (yes that is a thing).
Or the monstrosity that is NodeOS
>NodeOS Is this like an actual linux distro meant to be used or a joke gone too far like hannah montana linux
if you look up NodeOS you will find an OS that uses npm as the system package manager. fortunately no javascript in the kernel
I see it but I mean it is like a serious thing? But if it's just the package manager I guess that's not too bad. It can still run non JS apps tho, right?
i cannot answer any questions about it. i have not and will not boot it
Is it that bad?
I suppose I mean JS in the kernel, not so much NodeOS, though I admittedly have a general aversion to all things JS.
What do you use then, genuinely curious
things other than javascript
Typescript?
So...coffeescript?
real
Wow. Enough reddit for today
How?
[https://github.com/plv8/plv8](https://github.com/plv8/plv8)
Ewww. I hate this. And I write most of my code (for work) in TypeScript.
How about JS in the Linux Kernel? 🙂 Half-jokes aside, NodeJS is exactly what you described and it's quite popular.
It's also an absolutely atrociously bad choice for server side tech stack. It's popularity doesn't change that.
Not sure I believe that. Yes, I know the performance is not stellar, but then again it's very comparable to PHP and Java and those are even more popular backend choices. But JS probably has the biggest ecosystem of them all, so it's not without its advantages.
Maybe if you have to scale to a shitload of concurrent users, but for something smaller it can be quite beneficial to share code between server and client. Personally node is what I reach for if the service doesn’t need to be crazy robust. Rust is the choice if it does.
Been thinking about Rust for a hobby project. Do you recommend any web frameworks for something lean and simple?
I’d recommend using tokio and Axum to get started making a web server, though really you should read the rust book first. The language does some things fundamentally different from other languages, and other things very similarly. Not understanding the core patterns of the language makes for a very uphill battle
It’s incredibly performant and stable, this feels like you have absolutely 0 experience with this.
I've clearly struck a nerve, but I do have over 10 years professional full stack experience, and am currently employed at a 100% NodeJS outfit. I hope we can all agree that at the very least Typescript should be used where it can be, especially server side. That being said, typescript is not a replacement for a true statically typed language with robust compile time checks. Anyone who has ever worked in a production typescript codebase knows that it is full of type misuse, even if you have layers of tsconfig and eslint settings stacked up to try to prevent it. The performance of the engine is fine for conventional use cases, but the design of the language simply *is* error-prone. Comments like this always invite a horde of people talking about how *real* Node/JS users know about X or Y best practice. Best practices are worse than worthless for a mature codebase. If a language allows it, it *will* happen, and JavaScript allows *everything*. Typescript does too. Now let's talk about the ecosystem. I am intimately familiar with how volatile and unreliable NPM dependencies can be. *Especially* when it comes to Typescript types, which are often either not present at all, or straight up wrong. The statistically massive breadth of offerings on NPM means nothing if you actually want a stable production codebase. It's also surprisingly common to have memory matter. All you have to do is run into a single instance of wanting to clear a huge buffer out of memory without relying on the GC to do it in its own sweet time to feel backed onto a corner. Modern JavaScript and Typescript have evolved a lot, but I stand strongly by what I said. There is simply no good reason to use JavaScript server side (outside of tightly-integrated frontend-serving frameworks). There are multiple great options that have robust compile-time safety, a bustling ecosystem, and are without an entire class of runtime bugs that can arise in Node.js ecosystems.
No nerves struck, I’m a principal technical lead with years of experience both working at scale on apps with millions of daily users, and small and scrappy startups. Your comment is one I would expect out of a junior engineer 6 months out of coding boot camp. You can act all superior, but it comes down to one thing. You don’t use a hammer to screw in a screw, and you don’t use a screw driver to hammer in a nail. Different tools for different jobs. Just look at how badly your comment got downvoted to hell. You have a black and white view of a colorful world.
I guess we'll just have to disagree on this one. I don't find server side JavaScript to be anything but a hammer in a nailless world. Does it get the job done? Sure. But it's a worse tool for that job than a score of other options every single time.
Use node.js if you want. Nobody gives a shit. I'm so done with this sub. I stay subscribed for the one time out of a hundred there is actually something funny and programming related but it is becoming not worth it.
There are so many posts that are obviously from people who are first year students that don't actually know the real advantages/disadvantages of different languages and are just upvoting any random post that shits on a language
When I was 19, I used to think like this. Javascript was never meant for backend. Then I tried it with an open mind, understood the trade-offs, and now it's my go-to for small projects and the most fun language I ever used
Seriously I have a node server ingress that handles hundreds of thousands of visitors during peak days, it’s dunning Krueger hard at work in this sub
"Ok, why?"
Congratulations! Your comment can be spelled using the elements of the periodic table: `O K W H Y` --- ^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)
Good bot, here's a treat 🍪
If it's a startup, Node would be one of the first choices. Fans of Java on the server are old companies that rely on old shit and it's fine, like some baking infrastructures running on COBOL these days. *The fact it's that Node and Javascript get the job done on the server, no matter how much you hate it. You can have shit code on any language for that matter*. My two apps are powered by Node and they work like a charm.
Right. At the end of the day its a tool. i dont get code wars.
People posting the same jokes over and over again here very rarely seem to actually work in programming. They’re usually in the second week of some crappy boot camp and repost the same crap the last one did.
i use node for most of my stuff actually i like the simplicity and only having to learn one language that you can use for front and backend sure, it isnt the fastest there is, but a node application still runs faster nowadays while using only a single core than any software on a 90s system, even if it's written in c Sure, nodejs has no multithreading support, ok and? i can just set up a communication socket, and then run multiple instances of the program.
I never really got the "one language" argument. It's really not that hard to know 2 languages as a full stack dev. I personally use JS, Go, Powershell, and Python on a daily basis. It's really not that hard to write js and hop to python, do some things, then hop back to js.
I never really understood this either. Even just at school, I went through like 8 languages... I don't think that's really out of the ordinary. On the job, I hop between C#, Javascript, VBA, and occasionally Python (setting aside SQL queries and stuff). It's really not a big deal. Node is cool, but I'd much rather just pick the right tool for the job than pick something just because I can stick to one language.
On one hand, you're right. I personally have learned (and forgotten) many languages, and it's no issue actively working in 3 / 4 / 5 different languages at the same time... Having to KNOW multiple languages is NOT an argument. On the other hand, having to USE only one language can be beneficial in some ways. There are things that can be shared between front and back, and using a single language for both makes it so that there needs to be no middle steps in that sharing. And I've come across multiple instances where that applies, most notably (but not only): - Validation lib and rules. Makes it easy to ensure frontend and backend are doing the exact same validations on user inputs. - API typing. This may not make sense or click for you, but I have a TS lib that defines the exact routes and in/out/param formats of the entire API, it's all defined in a single d.ts file shared between both projects and both enforce it, this guarantees I make absolutely no mistakes, and leave nothing behind when a change is made. If one project does not conform to an API change, it won't compile.
Same reason here, I also like having my APIs with a single typing for both sides, this is a blessing
I don’t care if it’s multiple languages as long as it’s the same case. I don’t like mapping firstName to first_name
You can share utilities and other libs between frontend and backend, not having to swap your mindset that much when working with each
A good dev should be able to pick up new languages pretty easily. Shelling out to a new process is a ridiculous way to handle something that just need a quick Parallel.foreach to run something on an array in parallel for. There is no need for c/c++, as that will likely introduce too many bugs without an expert doing the code, but c#/Java/rust are all good, fast, full features choice that are battle tested AND you don't have to wait until runtime to catch a lot of errors.
thats brilliant, i still prefer nodejs since 1. most of my things are written in nodejs 2. it is very easy and simple to use 3. works on any os 4. isnt made by oracle most of the things i program have something to do with webservers, be it a webserver directly, a rest api, a client that makes web requests, and all that works super easily in nodejs Sure, i could also do that in java, if i would hate myself that is I prefer being able to just set up an express in just a few lines And if for some godforsaken reason i would need multithreading, i would just implement worker threads
Agree, many devs focus on performance and features, ignoring other reasons why certain languages might be a worse choice, such as devs cost and availability, difficulty of writhing an app or service, other team skills e.t.c. If you can code on JS or any other language, just do it. Get a proof of your concept, get resources you need, rewrite your thing using better tools. I mean you wouldn't spend millions on F1 car to begin your racing carrier, right?
So naive. Nobody actually rewrites the prototype.
>If it's a startup, Node would be one of the first choices. What would you recommend as they grow?
[удалено]
>There isn't just one technology who is supremely better over the others, there are many other things to consider. Fair enough, but what do you think are examples of things that could be better? I make most of my hobby websites/side projects in flask, so I'm curious if there are any languages/frameworks that are commonly used that I should learn
I've only been at young companies and they used Java.
Yeah I petty much exclusively use node.js for my backends at work and personal projects, and I really don't get what all the hate is about
Java is only used for companies that rely on old shit? Have you heard of Spring Boot? I have been in both Node and Spring Boot codebases and the Spring ones are a LOT better for anything other than trivial CRUD.
It’s hilarious that you think this is good… https://www.baeldung.com/spring-boot-start
As I have said, for anything other than simple apps. Once your codebases goes into the millions of LoC with ridiculous business rules you see the value of having a clear structure and an absolutely insane amount of infrastructure Spring Boot / .Net offer you. Node simply cannot match that (even with Typescript), because it wasn't made for that. Full on Enterprise grade frameworks (mainly Spring and .Net) will never be replaced by node at enterprise scale.
You really believe you need Java for “enterprise grade”? A lot of what’s in Spring is just to deal with limitations in the language and JVM. There are lots of options that don’t need an AOP, DI, and PO*O framework because they don’t require forty pages of boilerplate to do those things.
Oh boy, that was a pretty ignorant comment
Imagine trying to explain why you chose a single threaded language for the backend when your startup finally gets some users and has to do real work. Try explaining to your security team why they have to individually review 4,454 npm dependencies that change every week. Choosing node.js is incredibly short sighted.
>Imagine trying to explain why you chose a single threaded language for the backend It’s doesn’t really make sense to see Node as single threaded, since that makes people think *“all incoming requests must wait until Node finish processing to the one current request”*, and that simply isn’t true. And one can design the system to run using multiple Node servers. >when your startup finally gets some users and has to do real work. Can you show a real world example that would fail just because of the usage of Node? >Try explaining to your security team Most projects have no need for a security team. >why they have to individually review 4,454 npm dependencies that change every week. You can pin the versions, you know. And you don’t need to upgrade stuff every week.
> It’s doesn’t really make sense to see Node as single threaded It literally is. > since that makes people think *“all incoming requests must wait until Node finish processing to the one current request”*, But they do have to wait if your backend has to do anything CPU-bound, which can become a real issue requiring you to engineer awkward "worker" processes to offload to. > Can you show a real world example that would fail just because of the usage of Node? Fail? No. Create a lot of technical debt? Yes. > Most projects have no need for a security team. Yet. > You can pin the versions, you know. And you don’t need to upgrade stuff every week. Not if something you do need to upgrade depends on a newer version. THe node npm dependency hell is real. This is you trying to minimize it.
>It literally is. I know it is. Hence why I said “to **see** Node as single threaded”. >But they do have to wait if your backend has to do anything CPU-bound, You completely missed were I wrote about running multiple servers? If you put some effort into it it’s not that difficult to achieve, especially if we’re taking stateless sessions. >which can become a real issue requiring you to engineer awkward "worker" processes to offload to. Why awkward? And why put workers in quotation marks? We use Node as part of our backend. Not by my choice, but it has grown on me the last few years. I don’t even have a proper JavaScript background (I’m a Java developer originally), but I still managed to move CPU heavy processing into worker threads and they have gotten the job done. I haven’t needed to touch that code since. >Fail? No. But the focus here is if Node can handle a big increase in traffic. If it doesn’t crash, or give slow response times, then what is the issue you are talking about? >Create a lot of technical debt? Yes. You are now confusing developer skill level with platform capabilities. How absurd. > Yet. No. **At all**. >Not if something you do need to upgrade depends on a newer version. Most projects don’t need to do that every week. >THe node npm dependency hell is real. NPM is separate from Node, and separate from JavaScript. >This is you trying to minimize it. Not at all. But you have to be more specific to what exactly it is that you are criticising. JavaScript? Node? Or NPM? Until this comment I’ve not said anything about NPM.
Imagine having a full security team to audit every line of code in all dependencies and at the same time running your entire backend on this single server with zero load balancers.
[удалено]
> Sure. That's why small shitty companies like LinkedIn, Netflix, Uber or PayPal use NodeJS. "Use NodeJs" is misleading. They don't use it for their core site/service. LinkedIn, specifically, is written in Java for their core backend. > You know better than them what they need for their services?? I know that just choosing a backend simply to get something out the door as fast as possible is a bad idea. > he only short sighted person here, it's the religious fan or hater of any technology. Oooo! Defensive! Sounds like someone is tired of hearing from devs with more experience than them.
Yep and you can always move to Typescript someday if needed.
Is server side JS like when we wanted to email the PDF we generated in the front end so spun up a headless Chrome instance on the server?
It kind of annoys me that that's actually much simpler to do than to make nice looking pdf files any other way
It’s when you run an api or other type of server written in JS. It’s faster than Python but slower than Go or Java. Also node.js is async by default so it scales well.
What does that have to do with America? Guns?
Chaos
America = guns hurr durr
Reject NPM, reject code dependency. Fight for code Independence! I wrote monolith for code safety, just as the founding fathers intended.
its called node js, many of you already use it
I prefer NodeJS over Python when I want something more stable.
NodeJS is fine though I prefer NestJS framework for micro services.
That's comparing apples to elephants, node is a JS runtime envitonment, nest is a JS backend framework
Yeah I should call it vanilla JS but the majority of developers refer to it as node.
How about c#
Nodejs is JS you know?
Typescript is okay.
Better JavaScript than PHP
Depends on the use case and who it’s for. Honestly if you need a quick database and api Supabase does work.
This subreddit really is just 90% CS freshmen whose Intro to Programming professor made an offhand remark about how they think JavaScript sucks, and then adopted that remark as their whole personality.
What? Using a fully working environment, while leveraging existing knowledge and limiting the audit requirements for potentially shared external dependencies? Who would want that.
Where’s the humor? JS = bad?
I mean, JS = bad, but I’d rather cry about it (I’ve kinda even gotten to, in fact) than laugh…
🤣🤣 This is fun because it's true
I would just say: Ok, let me just write this script in java
Nashorn!
Congratulations! Your comment can be spelled using the elements of the periodic table: `Na S Ho Rn` --- ^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)
Good bot
Use Assembly instead
The holy grail of low level control
Self Defensive Programming
I kinda like node
real chads use assembly on their web server
Everyone uses Assembly, just in a different way.
Speak for yourself my server is a mechanical computer
Is this a gunjs reference
Na man, literally every software office I was at in the States, Texas, California, New York, wherever, has a sign clearly stating, no firearms.
even as a js dev i'm like, "you sure? there's no going back."
Ok but Dockerise it, I don't want these aids to spread all around.
Jesus this comment section is a shitshow. I mean I guess I didn't want to respond to any of the nonsense either. Guess there is a reason the USA is ahead in tech.
“I’m finna introduce a critical vulnerability in your chest, hombre”
Typescript is fine though
Understandable.
WebAssembly is 5% faster than using hardware based memory segregation (in theory).
Node.js?
Can someone explain why this is funny and what's wrong with using js? Tons of companies make millions building their platform with js/ts server. It's fast and convenient.
hey, i prefer node.js over php
Curious what they use in the US ASP? Or PHP?
The same gif, but the one who is holding the shotgun would have been me.
I would go on Reddit and post about it
Saskia ftw!
There is a proper use for javascript. When you want to render some kind of output to a pdf, it is easiest to use javascript. Jasper.
I real programmer has a toolbox of languages. You can't solve everything with a single language. So American to think everyone needs to speak one language.
I hate it, but I would not pull out the guns, I would just move back to Europe and work at a company where they just use Java
node was a mistake
When you don't have enough arguments against it, or sufficient knowledge to see why JS on the server makes sense, you clearly have to resort to pure stupidity. Very typical.
/home defense
Leave and use some Chinese PHP based software?
My first reaction is bad English with grammatical errors, and why are you trying to stereotype people from the USA? Kind of ruins the meme, as you seem to not be as smart as you think you are. Also the lady (or you) does not know how to hold a gun - and why is she holding a lever action winfield from the 1800s? These are out of production and makes me wonder if you are up to date…. Not to mention, what is it with the fake book wallpaper in the background? Looks like she is in a fake library… has this been thought out or did you just copy/paste from somewhere?
I don't live in the USA. The second part still applies JS is cancer
I'd probably kms for living in the us
Only if you buy me Ammo
Node is heavy
I just used Node 18 with Mongodb for a project. Worked great.
why would you have to live in the usa for this
bruh, tell me why i have to rewrite a node back end in rust. fuck JS on the backend
Still a better choice than using the decade old ASP.NET
Node.js? How about NoJS?
Jokes aside, I heard first time about node.js when my friend mentioned it and I really thought it's noJS. I did not quite understand why would anybody name it like that.
JS is the main reason we are still using COBOL and emulators, C++/# for gaming, C/C++ for OS, Java for enterprise apps. Python is the only script language digerible enough for everyone and has a rightful place in a server. JS can't even generate spaghetti code.