EngFarm ยท 5 points ยท Posted at 01:51:58 on January 13, 2019 ยท (Permalink)*
The eagle bird eventually gets his bird out of the water. And then another bird steals the bird. And then eagle bird just kind of stands around and is like "aw man I almost did it that time"
I love Python and dislike JS, but Python interpreters run far slower than NodeJS, and that does not prevent people run Python backends.
Aegior ยท 72 points ยท Posted at 16:42:31 on January 12, 2019 ยท (Permalink)
90% of Node's regular use case as a server processes go to a C++ thread pool (FS access, generating crypto keys or hashes, etc) or directly to the host OS' ethernet interface (HTTP request/listening)
This was a NodeJS project. At least with PHP, the language for browser-side and server-side code is different so you have to really mess up to think the variables would be the same lol.
dAnjou ยท 3 points ยท Posted at 11:02:05 on January 13, 2019 ยท (Permalink)
I believe that's a non-argument because I think it doesn't matter in reality. Frontend and backend almost never share code and you're using different patterns and paradigms anyway. Using the same or different languages hardly makes a difference.
I mean, I don't have a lot of experience with Java for example, but doing a quick Google search, it seems a lot easier to handle http requests with json payloads in JavaScript than Java.
dAnjou ยท 1 points ยท Posted at 12:29:59 on January 13, 2019 ยท (Permalink)
Maybe in a Hello World example. In reality you're expecting the payload to have a certain structure which you want to validate. And this step alone requires just as much effort in JS as in any other language. Even if you don't validate (is there any reason for that?) it's a really bad idea to pass around arbitrary key/value objects, makes it really hard to navigate the code. At that point you're creating classes or prototypes or whatever and then you have the same effort again as in any other language.
That's why I like TypeScript for frontend. So, much simpler to navigate when things are typed.
bt4u6 ยท 3 points ยท Posted at 19:08:14 on January 13, 2019 ยท (Permalink)
I'd even argue it's a benefit to have it in separate languages, makes the distinction between them so much clearer and obvious even when doing overtime and you've run out of coffee.
If your developer is unable up learn more than just 1 language, fire him
There's a lot of stupid crap you can pull off in the client and it doesn't matter.. But in the backend it can potentially be costly.
Pure Javascript is a death sentence, Typescript codebase with Node? I wouldn't mind, but at that point, why not just use C#/Java , because that is essentially what you're trying to do.
Renive ยท 3 points ยท Posted at 23:19:26 on January 12, 2019 ยท (Permalink)
Syntax (indentation errors is the closest thing to abomination in programming), performance, difficult deployment, difficult usage (virtual environments), fragmented community despite 3 being decades old, and as far as scripting go, Node does everything better. AI? Best framework, Tensorflow, has official JS version. Number crunching? Scikit has official version for Node, also lots of libraries literally porting it like numjs. Web dev? Flask or Django are literally pointless since you will write JS on frontend so if you wanna mix languages at least go to something faster than Node like C# or Java.
bt4u6 ยท 2 points ยท Posted at 19:18:48 on January 13, 2019 ยท (Permalink)
You know js has indentation errors too, yes? Well, line ending errors due to it's idiotic optional semicolon to be precise, which is much less obvious and harder to fix than in Python
Renive ยท 1 points ยท Posted at 19:44:46 on January 13, 2019 ยท (Permalink)
It's one click fix by linter. Indentation errors on Python are manual to fix.
bt4u6 ยท 2 points ยท Posted at 20:52:46 on January 13, 2019 ยท (Permalink)
Silly argument, static code analysis exists for Python too
Renive ยท 0 points ยท Posted at 21:20:59 on January 13, 2019 ยท (Permalink)
Nope, only in Python indentation is tied to logic. Fixing that is way harder and error prone for linter than just adding semicolon before every enter.
bt4u6 ยท 1 points ยท Posted at 00:02:20 on January 14, 2019 ยท (Permalink)
Nonsense. Read up on js's optional semicolon
Renive ยท 0 points ยท Posted at 00:15:44 on January 14, 2019 ยท (Permalink)
It can be tied to logic because of JIT confusion, but youre comparing shit which stays with language for backwards compatibility and which is frowned upon and every linter will scream at you to Pythons "this is my way and Im proud of that".
Hevaesi ยท 3 points ยท Posted at 01:22:57 on January 13, 2019 ยท (Permalink)
indentation errors
Uhuh, try a real text editor sometime?
Haven't had such kind of error for years, the only thing actually causing it was me being dumb and using tabs instead of 4 spaces.
Renive ยท 4 points ยท Posted at 03:02:09 on January 13, 2019 ยท (Permalink)
Always used tabs for intendation, never had any problems, how?
yogthos ยท 1 points ยท Posted at 22:08:45 on January 13, 2019 ยท (Permalink)
Clojure runs on the JVM or Node on the backend, and you can compile it to Js on the front-end. Pretty much all the benefits of Js along with a well designed language.
hanss314 ยท 115 points ยท Posted at 17:18:04 on January 12, 2019 ยท (Permalink)*
I don't think this is a comment on the speed of JS but more of a comment on JS being where JS shouldn't be
Edit to address some comments and clarify: JavaScript used to be very frontend only and using it as backend was a crazy idea. Then node happened and all the frontend devs got to write backend code. And then node got kinda good and people started caring about ECMAScript and mongodb happened and fucktons of frameworks happened and now we have fullstack js and desktop js and everything js which is weird but somehow works. Some people still argue that JS should stay on the browsers and not the servers while others are like "JS! FUCK YEAH!"
Exactly. It's surprising (and a bit disappointing) that I had to scroll down so far to find this comment. A lot of people are missing the point of this meme. It's not really about speed. It's about suitability.
Some of the JS... quirky behavior can lead to a variety of problems like data insecurities or corruption. It's also important to point out a backend isn't some RPC to run benchmarks on the backend. It's normally interacting with some persistent data store and a stable, well supported framework like Ruby on Rails or Django/DRF doesn't exist for nodeJS. None of this is to say things won't continue to improve but for now it's worth being apprehensive using JavaScript for a production backend.
Some of the JS... quirky behavior can lead to a variety of problems like data insecurities or corruption.
This can be said about any language.
It's normally interacting with some persistent data store and a stable, well supported framework like Ruby on Rails or Django/DRF doesn't exist for nodeJS.
It's all relative. Not everybody needs RoR or Django features.
but for now it's worth being a apprehensive using JavaScript for a production backend.
You're not the one to judge this.
I get it that you don't like it but there is no real reason to not use JS on backend.
See_Em ยท 6 points ยท Posted at 20:09:14 on January 12, 2019 ยท (Permalink)
[deleted] ยท 0 points ยท Posted at 22:53:16 on January 12, 2019 ยท (Permalink)
Whatโs wrong with using JS as a backend it works great as a frontend server. Anything beyond that you will delegate to a micro service written in another language for performance.
[deleted] ยท 1 points ยท Posted at 21:11:46 on January 13, 2019 ยท (Permalink)
Lol this kid is still in school but wants to pretend to be a pundit and telling us JS should only stay inside the browser. Maybe get some working experience first then we might listen to you.
why do you care so much? its /r/programmerhumor. take some jokes and misinterpretations.
rsoares88 ยท -12 points ยท Posted at 14:08:05 on January 12, 2019 ยท (Permalink)
And the OP meme is about space pig's, not JS being used in the backend...
And the comment said " using JQuery for everything. " so putting the discussion in context means someone managed to use jQuery in backend and front end ence the everything
If we try to des-contextualise everything to fit our belifs, then even the space pig's i mentioned make sense now..
ben_g0 ยท 3 points ยท Posted at 16:18:30 on January 12, 2019 ยท (Permalink)
People don't like js for the backend, because they have looked at the other uses of js which commonly use jQuery which slows it down. It's similar to how some people dislike anything made with Unity since the engine is used for a lot of crappy games. This doesn't mean that it's impossible to make a good game with Unity, but it does have that reputation for a lot of people.
Similarly due to the inefficiency of old interpreters and the lagginess of the bloated js and jQuery on pages js still has the reputation of being slow. And that is what they meant, jQuery has no effect on the backend, but it did ruin the javascript reputation.
jQuery has no effect on the backend, but it did ruin the javascript reputation.
Literally the opposite is the case. Jquery made js survive its horrible phase of being what it was: bad and basically unmaintained. Then es5 came, which made jquery pointless. But before that jquery kept it alive.
Did you ever used jQuery in your life, your you just trying to be popular?? Also i miss the point where any of this adds anything to the discussion..
Spoiler: 99.9% of people bashing on jQuery never used it, are around 20yo and probably don't even know 'tha' fuck it does..
If it wasn't for jQuery, JS in front end dev would have been replaced ages ago, FE frameworks wouldn't be what they are today, get your facts straight before talking shit you don't understand..
ben_g0 ยท 4 points ยท Posted at 16:52:51 on January 12, 2019 ยท (Permalink)
I never claimed that anything is too slow, but that it has the reputation to be so. The main problem of most slow pages is that they are bloated and load way to many things, and use a lot of libraries in places where they're not really needed and the loading of the libraries can slow things down. This is why jQuery got brought up in this discussion. We're not bashing on it just to be popular.
Again.. jQuery is a front end library, and can't be used as a backend anything.. This just show the bad state the web development is..
[deleted] ยท 1 points ยท Posted at 17:49:25 on January 22, 2019 ยท (Permalink)
What do you mean bad? It's excellent we can't use JQuery as backend anything and I'm thankful for it. Otherwise shit would be slow as fuck and JQuery noobs would be writing spaghetti code all over. Honestly, although I loved JQuery when I first started JS, I think it's far past it's prime and there's no reason to keep using it.
Guy linked to jQuery on NPM as if it indicated JQ was used in the back end. Two people (me three) have been trying to explain that Node is used for downloading, managing and bundling front end code. See Webpack, Babel.
Long story short, people got fed up with two things: syntax and cdns.
To improve syntax, devs started using Babel and/or Typescript. These brought their runtime, Node into the frontend space.
And since Node comes with npm, people thought "Hell, we might as well serve front-end depencies from there too". And thus angular, jquery, etc appeared on npm, relying on webpack or similar tools to bundle any front-end deps found in package.json or in .node_modules into the output js file.
This eliminates having to update the htmls every time a new front-end library release is out, and having to rely on remote cdns or having to manually download and rename these libraries if cdns are no option.
Also, angular and react come with their own bootstrapping tools which also rely on Node, further tying node to the frond-end (specifically, the front-end build toolchain). This is what the comments above were talking about, and I have no idea why they were downvoted so much.
Nobody said that jQuery or Angular are backend libraries. They said that Node is used for both backend and frontend development, which is true: it powers servers on the backend, and toolchains on the frontend. Nuff said, have a nice day.
bwhite94 ยท 4 points ยท Posted at 12:53:38 on January 12, 2019 ยท (Permalink)
I hear insert another only front-end library/framework here is being used as back-end too..
Yep, also the creator of flask, Armin Ronacher is now working on Actix, the fastest web backend in the world by third party metrics. Actix is built in Rust (https://actix.rs)
[deleted] ยท 0 points ยท Posted at 06:31:51 on January 13, 2019 ยท (Permalink)*
I quite like Rusts syntax actually. To each their own
Avambo ยท 5 points ยท Posted at 13:41:58 on January 12, 2019 ยท (Permalink)
I was just about to say this. If anyone can, rust can. I would love to try it out, but I have no use for it yet though since I'm a web dev, and no companies are hitting Rust developers for the web here.
fadais ยท -6 points ยท Posted at 14:12:52 on January 12, 2019 ยท (Permalink)*
Yeah I don't think Rust will ever have any use as web backend. Rust is, like c / c++, designed to work very low level to ensure devs can design very efficient code. this is important for application that are so complex that they constantly take up a big part or most of the cpu/gpu/memory. So it could get used for stuff like game development, video editing or maybe low-level coding for microcontrollers but web backends usually don't need to this level of Efficiency, it would most certainly be cheaper to just buy a better server instead of hiring rust devs to develope you new technology + most web servers are already overpowered to ensure that a big amount of users can use the web service so why would they start developing
edit:
I didn't meant that there won't be any web server implementation written in rust. Just wanted to say that rust won't play a big role in web development in the future for the same reason c/c++ are didn't.
Rocket is really cool, I think the documentation is better for it. Some people are switching to Actix because Rocket depends on nightly which in and of itself is pretty stable but it can make managing dependencies more difficult. From third party testing I've seen Actix is faster if that matters for the project.
Avambo ยท 2 points ยท Posted at 14:31:23 on January 12, 2019 ยท (Permalink)*
There are a lot of work being done for Rust web development though, and it looks really promising. But it's not quite there yet. I'd give it another 3-4 years before it becomes viable. But yes, the vast majority of companies won't need Rust for their web backend. Until then I'll stick with Go and C# for my backends.
My thoughts on Javascript as a backend are: "Sure, why not?"
This is one of the cool thing about Node - I only have to know one language to do the full stack. Which is great. I'm working on a startup web app, and it needs the full stack. I don't need to hire another developer (sinking money into the project) before I get the prototype up. I can even get a reasonable number of users before sinking money into the project -- and if I already have a user base, that means that I'm more likely to be getting VC funded.
If I did it in Java (or C or Rust or whatever), I'd have to learn and maintain a new language, before I can even tell if the product is viable in the marketplace. I'd have to not just learn the syntax but also the packaging and conventions. Generally, by the time Javascript no longer meets your apps scaling need, you have an app that has a high enough usage you can spend the money on someone with expertise in building scalable Java or Rust or Go or Whatever backends.
Is Javascript the best language? No. Python is simpler, C/Rust is faster, Java is more robust and type-safe. But it's clearly the most flexible, running just about anywhere on anything. It is the perfect prototyping tool.
vaaski ยท 19 points ยท Posted at 12:28:17 on January 12, 2019 ยท (Permalink)
[...] by the time Javascript no longer meets your apps scaling needs [...]
I don't like JS for the backend because it's designed to be extraordinarily fault-tolerant. It will happily coerce anything into anything else because when it's used in the front end, it's better to do that than to throw errors. But that's not the case in the backend.
Also a nearly non-existent type system (though TS helps with that).
The next section of docs explain why the default behavior is what it is and why you probably dont want to override it but handle that error properly somewhere instead.
I am writing a Node backend for a personal project, and this helps me out a ton. I knew this was possible but didn't know how. You just saved me some Googling time! Thanks!
Sure, good and bad code can be written in any language. That doesn't mean they're all equal. Some languages make writing good code easier or harder by disallowing various kinds of bad code. The obvious example is how important the type system is. JS's can be almost entirely ignored, where Haskell (for example) is defined primarily through its type systme.
I disagree. I do think there are some languages where it is impossible to write good code. Brainfuck, for example. Others fall elsewhere on the Cartesian plane of X-axis = easy to write good code, Y-axis = easy to write bad code, and there are some languages or frameworks where it is easy to do both.
kryptkpr ยท 1 points ยท Posted at 16:55:28 on January 12, 2019 ยท (Permalink)
Important to whom exactly? Tediously marking every intermediate type is not my jam. I define/enforce types at the database layer, and explicitly cast whenever I expect a particular thing to be a particular type. This goes for JavaScript, Python and any other weakly typed language. Weak types are awesome! So much less verbose, and the JIT will work it out correctly 99% of the time (explicit cast when it doesnt, its weakly typed not untyped!)
There is no such thing as untyped/weakly typed code. Types are a conceptual construct, not just an implementation construct. The only difference between a strict and weak language is how well that language enforces the conceptual construct.
That said, I do understand your point. Personally, I'm a fan of the approach python takes, where you can freely run whatever you want (within sanity, no "1" + 1 == "11", "1" - 1 == 0 sillyness), but there are also third-party libraries that take advantage of language syntax specifically designed for them. I can write with as strict or as weakly typed as I want. I do usually choose to annotate as much of a given program as possible, because it prevents a class of bugs that can be easily missed by just reading and testing.
Garrosh ยท 1 points ยท Posted at 17:55:18 on January 12, 2019 ยท (Permalink)
You could say the same about everything. Include Visual Basic. And I didn't mean Visual Basic .net.
fauxtoe ยท 3 points ยท Posted at 13:21:37 on January 12, 2019 ยท (Permalink)
Itโs not hard to write code that accounts for things so there arenโt unexpected coercions.
kryptkpr ยท -1 points ยท Posted at 16:49:42 on January 12, 2019 ยท (Permalink)
Data validation belongs at the database and model layer my friend, not at the endpoint. If your model allowed some garbage to get in, you have already lost. There are plenty of ways to enforce schemas with Node, just depends on your db stack.
Types aren't data validation. Types are expectation validation. You're not checking runtime data, you're checking that assertions and assumptions you've made about your own code are accurate.
kryptkpr ยท -2 points ยท Posted at 17:14:51 on January 12, 2019 ยท (Permalink)*
Linting, testing and coverage are unavoidable either way. It comes down to personal preference, but after a decade of Python/JS I never see myself going back to a strongly typed language, C# and Java now feel like shackles. Types belong with data, just let my 3 lines of code be code. Note that I almost never write more then those 3 lines, I am a plumber not a scientist. I can see with 3000 lines why you care for types.. but for the kind of monkey plumbing I do on a daily basis types are just brittle and blow up when something they didnt even care about changes.
None of those three have anything to do with typing though. They're all approximations that are valuable for exactly what you just said, a lot of people feel limited by stricter typing. Which is a fine stance to take, but not one I agree with myself. I'm of the opinion that it is not possible to separate code from data, code is just a series of operations to be performed on data.
kryptkpr ยท 0 points ยท Posted at 17:22:03 on January 12, 2019 ยท (Permalink)
That's just it - my code generally does not operate on data, it just blindly moves it around. I am piping, scaffolding. Not having to know what's in the box is a strong selling point.
That's fair, I guess. I can't imagine a problem that is both simple enough to not interact with any kind of data and not doable with a few bash scripts, but I guess there's gotta be something.
kryptkpr ยท 1 points ยท Posted at 17:27:53 on January 12, 2019 ยท (Permalink)
IoT platform work. Large scale asynchronous message passing/processing systems that dont care much for content of messages. I am somewhat dead inside.
I think you are mixing up weak/strong typing with static/dynamic typing.
Js is weak and dynamic. (types only exist at runtime and they can be converted easily --> 1 + '1')
Python is (mostly) dynamic and strongly typed.
Java c# are all static type languages.
bt4u6 ยท 2 points ยท Posted at 20:55:35 on January 12, 2019 ยท (Permalink)
Prototyping? That's a funny word you use for "deployed directly to production with no refactoring or rewrites for 10 years"
Lol no it's not. Java is way faster, c# is way faster. Almost any compiled language is going to be faster. Yes, compiling your code gives you massive advantages in speed over interpreting. Compile time optimizations are real.
Osolodo ยท 5 points ยท Posted at 14:47:22 on January 12, 2019 ยท (Permalink)
Mostly it comes down to the interpreter/compiler. The C compilers have had decades of optimization baked in. I bet with a few years of work I could write a C++ interpreter that is 1000 times slower than node.js.
But I won't, because that would be pointless.
ben_g0 ยท 11 points ยท Posted at 16:31:48 on January 12, 2019 ยท (Permalink)
The main thing holding js back compared to C/C++ is that js is interpreted, and has some features that can't be precompiled such as the eval function. C/C++ will always be faster than js unless someone makes a more limited js dialect which can be directly compiled to native machine code.
However, the modern interpreters are so good that they have basically cought up with "semicompiled" languages such as Java. Since Java's performance, while significantly less than C/C++, was already considered "good enough" to gain a lot of popularity for web apps and enterprise software in the 2000's. So modern javascript should now also be good enough for many applications. The rising popularity of javascript-based web apps such as Google Docs seems to confirm this.
Java is way, at faster than JavaScript in 99.99% of situations. Like, alot faster. Go do a reverse flood fill and come back with the results, it's not even close. Saying JS has "caught" up is pretty much propaganda.
Java is not a good example. It always inside the JVM, which is another layer of abstraction away from hardware.
C# is a better example because it has JIT compilation directly to machine code
bt4u6 ยท 1 points ยท Posted at 19:30:33 on January 13, 2019 ยท (Permalink)*
What are you talking about? I think you're a little confused
Both Java and c# run on a VM. For Java it's bytecode on the jvm. For c# it's CIL on the CLR. Both VMs use JIT
The additional layer of abstraction provided by the VM improves performance, it doesn't hinder it. It does this by, in simple terms, letting the compiler make the job of the JIT easier
[deleted] ยท 1 points ยท Posted at 22:23:22 on January 12, 2019 ยท (Permalink)*
C# runs on the .NET runtime, which is entirely a JVM knockoff that came about when Sun litigated against their incompatible Microsoft JVM. It's the same thing.
kryptkpr ยท 0 points ยท Posted at 17:04:39 on January 12, 2019 ยท (Permalink)
JS is not interpreted, it's more like lazy compiled once it sorts out types. eval is compiled down to bytecode and JITed to native like everything else. Some black art surrounds keeping native paths hot when using same function called with different type args, avoiding that is your best bet to performance.
ben_g0 ยท 3 points ยท Posted at 17:12:23 on January 12, 2019 ยท (Permalink)
True, but since javascript is still usually classified as an interpreted programming language I didn't really know what else to call it (and iirc it used to be almost completely interpreted at the start). How the code is actually executed also depends somewhat on which program you use to run it.
kryptkpr ยท 3 points ยท Posted at 17:26:45 on January 12, 2019 ยท (Permalink)
I agree, but I dont think it's fair to continue to do so. The two most common ways to run javascript are both V8, either via Node or Chrome.. and it's been leading the JIT frontier for the past decade.
I would even argue that the classical interpreted language is dead outside of shell script.. Every modern scripting language is at least a bytecode compiler and VM, with many having a JIT/native emitter at the end.
Malor ยท -1 points ยท Posted at 11:10:17 on January 12, 2019 ยท (Permalink)*
edit: this comment is wrong. I'm leaving up for posterity, but this is an incorrect assertion:
Web Assembly is a subset of Javascript that's crazy fast, fast enough to be a compilation target for languages like C. (I think only Rust is really good at this so far, but other languages shouldn't be far behind.) It gets recompiled down to machine code in browsers, and apparently is hard to distinguish speed-wise from compiling for an OS.
Programs can be compiled from high-level languages into Wasm modules and loaded as libraries from within JavaScript applets
Doesn't that mean that it's loaded by JS, but it's not a subset of JS? It's like loading a Java program with C++, and saying Java is a subset of C++.
Malor ยท 6 points ยท Posted at 11:43:00 on January 12, 2019 ยท (Permalink)
I think you're right, after looking further; WASM is an actual bytecode format, not just Javascript like asm.js was. I misunderstood that.
Malor ยท 3 points ยท Posted at 11:36:05 on January 12, 2019 ยท (Permalink)
Well, as I understand it, and I could be wrong, WASM is a literal syntax subset of Javascript, an outgrowth of the effort to make Javascript go fast. They realized that they could make some of it go super quick, which led to the creation of WASM's predecessor, asm.js, the parts of Javascript that could be accelerated the most.
Now, it's possible that the update from asm.js to WASM may have changed it in some fundamental way I'm not aware of, as I haven't written any of either. But I think that both are subsets of the main language, perhaps with some special delineation in WASM's case.
Well you can easily compare the performance yourself. V8 is very well known for its performance in the industry. Thereโs a reason why Node JS is often preferred over PHP these days.
[deleted] ยท -1 points ยท Posted at 00:40:58 on January 13, 2019 ยท (Permalink)*
I think a very important piece of information that you are missing is that the web has changed a lot in the last few years. The web used to be simple - you take a template HTML file, inject some user specific data into it and you are done. Maybe do some user authentication and file or db I/Os but thatโs about it. That worked well for a while with PHP, however nowadays the entire landscape has changed with the introduction of newer technologies. We now have frameworks like React and Angular where you have to do server-side rendering to avoid serving a blank page with only JavaScript. Can your PHP scripts run React code and render the app on the fly? Definitely not without sacrificing performance. How about compatibility and support for NoSQL databases? Not so great.
Ultimately it depends on the tools that you are working with. If you are serving simple webpages - sure pick whatever you want. If you are stuck with old technologies like MySQL then you are probably better off using PHP. However if you are working with newer technologies like MongoDB and React, then not only Node JS is faster - it also works better with those tools.
The only difference is you would have to understand ihatewhatidontunderstand1, ihatewhatidontunderstand2framework, ihatewhatidontunderstand100 which will be coming out everyday
[deleted] ยท -27 points ยท Posted at 14:54:38 on January 12, 2019 ยท (Permalink)*
[deleted]
fyzbo ยท 12 points ยท Posted at 16:27:53 on January 12, 2019 ยท (Permalink)
I hate what I don't understand
The only thing I know as a JS backed is express. I imagine it's not half as performent as Nginx and probably even apache
Was that a joke? Common practice is to use Nginx with express.
Well, itโs not exactly an apples to apples comparison. Express is a JS framework based on Connect to handle web requests using js middleware interfaces.
Tl;dr: Express = logic; [apache, nginx] != logic
[deleted] ยท 2 points ยท Posted at 15:20:21 on January 12, 2019 ยท (Permalink)*
Exactly, remember Rails doesnโt run on the browser, it always runs in the server and compiles into something the browser can read, you CAN have logic there, connect to a DB.
Express can do this and more, if you want to run a template system, there is a middleware for that, but it also allows you to develop a REST API and has a lot more flexibility. Apache all by itself canโt connect and query a db. Neither can nginx
[deleted] ยท -1 points ยท Posted at 15:55:54 on January 12, 2019 ยท (Permalink)*
[deleted]
luorduz ยท 6 points ยท Posted at 17:14:33 on January 12, 2019 ยท (Permalink)
Not really. Compare servers to servers and frameworks to frameworks; don't compare a server to a framework.
Rails is a framework, Express is a framework, Apache is not a framework, Nginx is not a framework.
[deleted] ยท -1 points ยท Posted at 18:23:26 on January 12, 2019 ยท (Permalink)*
[deleted]
[deleted] ยท 1 points ยท Posted at 23:30:51 on January 19, 2019 ยท (Permalink)
what the fuck
luorduz ยท 0 points ยท Posted at 18:59:00 on January 12, 2019 ยท (Permalink)
Your position is really weird: You can use nginx or apache to redirect towards application servers of any backend. Express doesn't force you to use Apache, Rails doesn't force you to use Nginx, Django doesn't force you to use lighttpd, etc. And viceversa.
It's as if you were comparing go behind nginx and go behind apache, when we're talking about the go code.
I understand your question. Youโre on the right track.
JS only has nodeJS
Other ecosystems have web hosting tools like nginx or IIS
JS is different. You need NodeJS to run JavaScript on the server, but node does not offer any web capabilities. To get web request handling, you have to install a package (like express). There is no explicit web management layer, just specific code that you load into a JS project
ralphpig ยท 5 points ยท Posted at 17:15:11 on January 12, 2019 ยท (Permalink)
Oh okay, so you clearly don't know what you're talking about
[deleted] ยท -1 points ยท Posted at 17:53:41 on January 12, 2019 ยท (Permalink)*
[deleted]
ralphpig ยท 2 points ยท Posted at 00:58:40 on January 13, 2019 ยท (Permalink)
Express with nginx or Apache. The fact that you think they are interchangable means you've never touched either.
msg45f ยท 7 points ยท Posted at 15:08:26 on January 12, 2019 ยท (Permalink)
Tell that to Walmart, who decided to give Node a test drive and discovered that their servers never went above 1% utilization during the entire day that they tested it. Which was Black Friday.
ri2parna ยท 3 points ยท Posted at 12:14:03 on January 12, 2019 ยท (Permalink)
It's sad, i don't meet the techinchal requirements for getting this joke.
Avambo ยท 11 points ยท Posted at 13:44:47 on January 12, 2019 ยท (Permalink)*
Explanation of the GIF: JavaScript was never meant for the backend, just like an eagle was never meant to be swimming. It works, but it's not very fast compared to other languages that were created for that task.
Edit: For the people voting me down, can you explain why? If you look at the history of JS it was never meant for backend stuff. It was meant to be a very forgiving frontend language for simple tasks. I'm not saying JS is bad, I'm just saying that it was not meant for the backend initially, and it doesn't perform as well as other languages.
Edit 2: Yes, I am fully aware that Node is sufficient for 99% of backend apps. I use Node at work as well for some things.
imizaac ยท 8 points ยท Posted at 20:38:44 on January 12, 2019 ยท (Permalink)
It does has convenient benefits that lead to Dahl's use of it. He set out to make a high concurrency event based server side framework. JS is the best language in the world for that singular purpose. Evented and async by default.
The problem with node is people using it poorly (like writing blocking code) or using it for things that are a poor fit for the language (like high computational cost operations).
If you play to its strengths, handling requests/second and mostly just returning data, it's really solid. Ranking highly in performance.
For microservices it is probably the best language to use. Startup time and overhead are trivial so spinning up instances costs next to nothing. Which is why Netflix went to an entirely node backend. If you want to have thousands of instances turning on and off, node is great.
Additionally node benefits from having the largest developer pool of any language. JavaScript is the most popular language in the world, by a lot. From this you get awesome tooling and lots of smart people pushing the language and frameworks forward.
JavaScript by design is faster to develop with, being dynamic and interpreted developers can go from a blank slate to a working project in less time, which in many cases is more valuable than slight performance gains. In the real world code is created on a deadline, tested, and replaced. Js is great for that.
So yeah it's narrowly good on servers. It happens to have valuable strengths. It's no mistake that it's popular. And it's on the rise, so you should probably get used to it.
Where I work, we have a fairly simple app that has very large objects and manages payment processing. We had 1,000 of current users at one point and it didn't break a sweat. I didn't see CPU usage hit more than 10%, and we current only have one server which hosts the api and front end server on the same server.
We also got DDoSed a while back. It lasted for a solid ten minutes, but the CPU usage didn't hit more than 60% and the website was completely functional.
mikejoro ยท 2 points ยท Posted at 20:45:30 on January 12, 2019 ยท (Permalink)
Javascript actually does perform pretty well for most backend tasks. It's not good at synchronous things like large calculations, but its great at doing asynchronous things. Just google node performance. I'm on mobile or I would link it myself.
Renive ยท 1 points ยท Posted at 23:32:38 on January 12, 2019 ยท (Permalink)
It wasnt designed for that 20 years ago. Language itself has changed a lot since then you know? And people found pit that it works fine on backend and in lots of cases is the best choice.
but it's not very fast compared to other languages that were created for that task
Source?
Avambo ยท 1 points ยท Posted at 23:31:07 on January 12, 2019 ยท (Permalink)
So? Who cares? There is no reason to not use it.
The part you quoted was just an explanation of the GIF. It wasn't my opinion about Node, and I never even said that you shouldn't use it. Heck, I use it at work every day...
Again, I'm not saying that Node is bad, it's perfectly fine for the vast majority of applications. But it's not the most performant in many situations. Nor is it a very safe language (Typescript helps though).
I just want to say that I'm not anti-node. I'm a full stack developer so I totally understand the benefits of Node. Personally though I'd opt for another language on the backend if I had the choice, but that's just my personal preference.
HellD ยท 0 points ยท Posted at 04:12:17 on January 13, 2019 ยท (Permalink)
What do you use when your โfull stackโ? Iโm a programming/cyber sec student thatโs trying to go full stack before April to join a hackathon.
Avambo ยท 2 points ยท Posted at 05:48:29 on January 13, 2019 ยท (Permalink)
I mainly use JS with Vue (which I think is amazing) on the front end, and C#/.NET with PostgreSQL or MSSQL on the backend.
On my free time I dabble a bit in Go (language), Unity3D and UWP.
If you're trying to go full stack in a short time, and is interested in security, I'd recommend Go over C# since it's a lot more light weight, cross platform compilable by default, and very easy to work with and learn. Go also has an amazing built in web server that only requires like 4 lines of code to set up. I know Python is also a very good language for security stuff, probably even more so due to the popularity of the language.
You could also just stick with JS on both the backend (with NodeJS) and frontend if you don't feel like learning a new language. I'm a bit unsure about the possibilities of JS when it comes to security stuff though, but it probably has some libraries for it.
Anyway, whatever you do, never just stick with the languages you initially learn. Always try to check out new stuff. It broadens your knowledge of programming. I try to learn the basics of a new language about once every year. Next year I'm gonna try Rust, if nothing else pops up that looks more interesting.
HellD ยท 1 points ยท Posted at 06:34:11 on January 13, 2019 ยท (Permalink)
Thanks! Due to how outdated the class is, and how I recently got into an internship at a cybersec company, I wanted to branch out and make my own site. I am learning Node right now, and Iโve used flask with python before. Will look more into the security and other applications of python and node tho.
Got stuff like serverless lambdas on AWS JS is fantastic. For other stuff.... Meh I'm not sure yet.
Xendrak ยท 1 points ยท Posted at 01:39:06 on January 13, 2019 ยท (Permalink)
Typescript backend and dev restarts in seconds = productivity.
[deleted] ยท 1 points ยท Posted at 09:38:01 on January 13, 2019 ยท (Permalink)
I wish C was the only language one shall ever had to learn. (Except unix shell, though).
garronej ยท -3 points ยท Posted at 10:02:18 on January 12, 2019 ยท (Permalink)
Netflix does run slow indeed.
colnarco ยท 57 points ยท Posted at 10:08:44 on January 12, 2019 ยท (Permalink)
Netflix is actually using a lot of Java. I donโt think any of their streaming-functionality is build with node.
Not to pick on node though, for most crud-centric applications itโs a good choice.
ruttydm ยท 1 points ยท Posted at 14:04:46 on January 12, 2019 ยท (Permalink)
It still transpiled into JS which is interpreted and slow. It amazes me that people would want to use JS outside of the browser.
[deleted] ยท 2 points ยท Posted at 23:00:08 on January 12, 2019 ยท (Permalink)
No one is asking you to write a video encoder with JS. Using NodeJS to code your API servers will be faster than Python or Java because itโs good with IO. Everything else thatโs CPU intensive youโre going to delegate to another microservice written in a more performant language anyway.
Slow is relative. It's faster than python, and Django exists. It's also easy to understand and has a huge support group. It's documented well, and since it isn't compiled, you can speed up development. Not for you? Sure, that's perfectly fine. But when I can keep my codebase the same everywhere I will. Again, it's preference.
Yes, I do know switching away from Atom because it consumed 4GB of RAM and ran as fast as a turtle. Also, desktop apps aren't really backend, are they?
allmeta ยท 12 points ยท Posted at 12:29:15 on January 12, 2019 ยท (Permalink)
Vscode is an example of electron done right though
So VScode is the best kind of the worst kind of cancer? I am fine with that definition.
allmeta ยท 1 points ยท Posted at 14:20:41 on January 12, 2019 ยท (Permalink)
Hahaha
ferg92 ยท 1 points ยท Posted at 14:50:34 on January 12, 2019 ยท (Permalink)
I run VS Code and Webstorm and 20 Chrome tabs at the same time because I just hate seeing all that spare RAM go to waste
chanpod ยท 1 points ยท Posted at 17:23:53 on January 12, 2019 ยท (Permalink)
Uh, what? I've used web storm, visual studio pro, vs code, sublime, and atom. And in terms of speed, vs code sublime and atom are all pretty similar. Web storm and vs pro are slower than snails
[deleted] ยท 1 points ยท Posted at 23:04:47 on January 12, 2019 ยท (Permalink)
Webstorm is pretty fast for me. Did you set your build directories to ignore?
chanpod ยท 1 points ยท Posted at 00:49:09 on January 13, 2019 ยท (Permalink)
I don't remember. It's been a while. Maybe web storm has optimized for things like node modules or Bower (anyone still use this) now but when I use it a couple years ago it was pretty slow. Usually due to indexing. Vscode manages to provide intellisense on node modules without slowing things down.
[deleted] ยท 1 points ยท Posted at 05:16:40 on January 13, 2019 ยท (Permalink)
Webstorm is pretty fast now. It doesnโt only provide intellisense for node modules but your own code as well. For example if I want to instant go to the definition of a function I imported from another file I just press Ctrl + B. If I want to know all the usages of a given function or class I also just press Ctrl + B. In fact the intellisense is much better than the extensions from VS Code. The major hurdle I had with VSCode intellisense is that itโs actually slower than Webstorm and also its other extension doesnโt support stylelint with styled components on the frontend.
chanpod ยท 1 points ยท Posted at 13:19:27 on January 13, 2019 ยท (Permalink)
Have you used vscode lately? It does all of this (ctrl + left click will take you to the definition. They've added the ability to peek at the definition too) and the intellisense is nearly instant for me.
[deleted] ยท 1 points ยท Posted at 20:26:20 on January 13, 2019 ยท (Permalink)
Yes I tried migrating a few months ago. Spent about 4-5 hours playing around with extensions. Itโs a pretty decent editor considering that itโs free. But there are still things that Webstorm does much better. For example I can easily refactor several functions from File A into File B with a few clicks. This will also change all references from where it was used. Copying a code snippet from File C into File D will also automatically add import statements where necessary (based on your copied snippet) into File D.
Youโre comparing the wrong tools. VS code and atom both run on electron, so of course they will be the same speed.
VS pro is monumentally larger than both of those combined. VS code is a text editor, VS pro is a fully featured IDE
The more appropriate comparison would be VS Code vs Notepadd++. They are both text editors, NP is substantially faster bc itโs not electron
chanpod ยท 1 points ยท Posted at 22:17:55 on January 12, 2019 ยท (Permalink)
So people keep saying vs code is just a text editor. But it has intellisense (maybe not as good as the "big boys" but it's good enough imo), integrated console/powershell, debugger support for node and browser client scripts (can't remember if this needs a plug-in for the browser debugging), and arguably the better git integration than the others. And with a large community of plugins it can do just about anything.
And maybe you have a toaster, but my vs code opens almost instantly. So I don't know where you get this notion that it's slow
[deleted] ยท 1 points ยท Posted at 23:06:57 on January 12, 2019 ยท (Permalink)
I would recommend webstorm over vscode. I tried to migrate over to vscode and the extensions just werenโt as good as the intellisense Webstorm provided out of the box. Lots of people donโt like paying for software but if you write software for a living paying $5 per month is pretty much nothing.
[deleted] ยท 1 points ยท Posted at 23:03:39 on January 12, 2019 ยท (Permalink)
Iโm a huge fan of Jetbrains. Was going to switch over to VSCode but some of the extensions just arenโt as good as the native support webstorm offers.
Electron is only slow because browsers are slow. Node.js (v8) is not slow compared to a typical dynamic language interpreter. And it's pretty well suited for certain backend stuff
McJaume ยท 71 points ยท Posted at 15:12:25 on January 12, 2019 ยท (Permalink)
Hey, you're a bit hard : on the full clip, the eagle eventually gets his fish out of the water :)
cmd_command ยท 27 points ยท Posted at 19:41:10 on January 12, 2019 ยท (Permalink)
Eventually
code-panda ยท 2 points ยท Posted at 11:19:22 on January 13, 2019 ยท (Permalink)
If it works, it works /shrug
EngFarm ยท 5 points ยท Posted at 01:51:58 on January 13, 2019 ยท (Permalink)*
The eagle bird eventually gets his bird out of the water. And then another bird steals the bird. And then eagle bird just kind of stands around and is like "aw man I almost did it that time"
https://youtu.be/FuIliFtwRe0?t=60
Jigge89 ยท 3 points ยท Posted at 19:54:39 on January 12, 2019 ยท (Permalink)
Now I need to see that :)
KeetoNet ยท 2 points ยท Posted at 02:16:10 on January 13, 2019 ยท (Permalink)
Turns out it was actually river weed that had been automatically converted to a
stringfish.netheril96 ยท 183 points ยท Posted at 11:18:51 on January 12, 2019 ยท (Permalink)
I love Python and dislike JS, but Python interpreters run far slower than NodeJS, and that does not prevent people run Python backends.
Aegior ยท 72 points ยท Posted at 16:42:31 on January 12, 2019 ยท (Permalink)
90% of Node's regular use case as a server processes go to a C++ thread pool (FS access, generating crypto keys or hashes, etc) or directly to the host OS' ethernet interface (HTTP request/listening)
TheDarkSwordsman ยท 41 points ยท Posted at 22:24:03 on January 12, 2019 ยท (Permalink)
Still nice being able to write the same langauge all the way from the front to the back though. โบ๏ธ
pickausernamehesaid ยท 38 points ยท Posted at 23:39:22 on January 12, 2019 ยท (Permalink)
I came across a CS student in college who couldn't figure out why his server side variables were inaccessible in his interface code. -_-
Hevaesi ยท 24 points ยท Posted at 01:21:28 on January 13, 2019 ยท (Permalink)
This is your brain on JavaScript.
lezorte ยท 2 points ยท Posted at 20:39:00 on January 13, 2019 ยท (Permalink)
Damn php developers
pickausernamehesaid ยท 1 points ยท Posted at 21:29:00 on January 13, 2019 ยท (Permalink)
This was a NodeJS project. At least with PHP, the language for browser-side and server-side code is different so you have to really mess up to think the variables would be the same lol.
dAnjou ยท 3 points ยท Posted at 11:02:05 on January 13, 2019 ยท (Permalink)
I believe that's a non-argument because I think it doesn't matter in reality. Frontend and backend almost never share code and you're using different patterns and paradigms anyway. Using the same or different languages hardly makes a difference.
TheDarkSwordsman ยท 4 points ยท Posted at 11:09:18 on January 13, 2019 ยท (Permalink)
I mean, I don't have a lot of experience with Java for example, but doing a quick Google search, it seems a lot easier to handle http requests with json payloads in JavaScript than Java.
dAnjou ยท 1 points ยท Posted at 12:29:59 on January 13, 2019 ยท (Permalink)
Maybe in a Hello World example. In reality you're expecting the payload to have a certain structure which you want to validate. And this step alone requires just as much effort in JS as in any other language. Even if you don't validate (is there any reason for that?) it's a really bad idea to pass around arbitrary key/value objects, makes it really hard to navigate the code. At that point you're creating classes or prototypes or whatever and then you have the same effort again as in any other language.
TheDarkSwordsman ยท 1 points ยท Posted at 19:39:50 on January 13, 2019 ยท (Permalink)
I'm a little confused. What do you mean arbitrary keys and values? And what do you mean by "creating classes or prototypes"?
Can you give an example?
dAnjou ยท 2 points ยท Posted at 08:25:24 on January 14, 2019 ยท (Permalink)
Maybe that's not the right word (English is not my first language). What I mean is this:
Bad
Good
This way you can follow the data around in the code. It just makes maintenance and debugging way easier.
AromaOfPeat ยท 1 points ยท Posted at 16:04:39 on February 2, 2019 ยท (Permalink)
That's why I like TypeScript for frontend. So, much simpler to navigate when things are typed.
bt4u6 ยท 3 points ยท Posted at 19:08:14 on January 13, 2019 ยท (Permalink)
I'd even argue it's a benefit to have it in separate languages, makes the distinction between them so much clearer and obvious even when doing overtime and you've run out of coffee.
If your developer is unable up learn more than just 1 language, fire him
AromaOfPeat ยท 2 points ยท Posted at 16:03:24 on February 2, 2019 ยท (Permalink)
They do however often share data interfaces.
Dedustern ยท 0 points ยท Posted at 07:59:27 on January 14, 2019 ยท (Permalink)
I think that is a drawback?
There's a lot of stupid crap you can pull off in the client and it doesn't matter.. But in the backend it can potentially be costly.
Pure Javascript is a death sentence, Typescript codebase with Node? I wouldn't mind, but at that point, why not just use C#/Java , because that is essentially what you're trying to do.
TheWildKernelTrick ยท 6 points ยท Posted at 16:04:34 on January 12, 2019 ยท (Permalink)
Vertical scaling yo
Tysonzero ยท 17 points ยท Posted at 20:07:31 on January 12, 2019 ยท (Permalink)
That doesnโt make NodeJs good... it just makes Python bad.
majky358 ยท 3 points ยท Posted at 22:24:15 on January 12, 2019 ยท (Permalink)
.NET walks in the bar...
AmericanGeezus ยท 3 points ยท Posted at 08:34:10 on January 13, 2019 ยท (Permalink)
And starts trying to sell everyone on razors~
[deleted] ยท 2 points ยท Posted at 12:00:50 on January 28, 2019 ยท (Permalink)
The Razor Engine is awesome
Change my mind
AmericanGeezus ยท 2 points ยท Posted at 12:01:59 on January 28, 2019 ยท (Permalink)
I refuse.
(It is pretty badass tech.)
trichotillofobia ยท 18 points ยท Posted at 13:37:10 on January 12, 2019 ยท (Permalink)
Unfortunately.
EarthWindAndFire430 ยท 5 points ยท Posted at 18:07:40 on January 12, 2019 ยท (Permalink)
What do you mean it cannot prevent people from running Python backends
wallefan01 ยท 1 points ยท Posted at 23:56:45 on January 12, 2019 ยท (Permalink)
well what else would you use python for
EarthWindAndFire430 ยท 1 points ยท Posted at 00:20:05 on January 13, 2019 ยท (Permalink)
I get it now , I read it in the wrong way
Renive ยท 3 points ยท Posted at 23:19:26 on January 12, 2019 ยท (Permalink)
Syntax (indentation errors is the closest thing to abomination in programming), performance, difficult deployment, difficult usage (virtual environments), fragmented community despite 3 being decades old, and as far as scripting go, Node does everything better. AI? Best framework, Tensorflow, has official JS version. Number crunching? Scikit has official version for Node, also lots of libraries literally porting it like numjs. Web dev? Flask or Django are literally pointless since you will write JS on frontend so if you wanna mix languages at least go to something faster than Node like C# or Java.
bt4u6 ยท 2 points ยท Posted at 19:18:48 on January 13, 2019 ยท (Permalink)
You know js has indentation errors too, yes? Well, line ending errors due to it's idiotic optional semicolon to be precise, which is much less obvious and harder to fix than in Python
Renive ยท 1 points ยท Posted at 19:44:46 on January 13, 2019 ยท (Permalink)
It's one click fix by linter. Indentation errors on Python are manual to fix.
bt4u6 ยท 2 points ยท Posted at 20:52:46 on January 13, 2019 ยท (Permalink)
Silly argument, static code analysis exists for Python too
Renive ยท 0 points ยท Posted at 21:20:59 on January 13, 2019 ยท (Permalink)
Nope, only in Python indentation is tied to logic. Fixing that is way harder and error prone for linter than just adding semicolon before every enter.
bt4u6 ยท 1 points ยท Posted at 00:02:20 on January 14, 2019 ยท (Permalink)
Nonsense. Read up on js's optional semicolon
Renive ยท 0 points ยท Posted at 00:15:44 on January 14, 2019 ยท (Permalink)
It can be tied to logic because of JIT confusion, but youre comparing shit which stays with language for backwards compatibility and which is frowned upon and every linter will scream at you to Pythons "this is my way and Im proud of that".
Hevaesi ยท 3 points ยท Posted at 01:22:57 on January 13, 2019 ยท (Permalink)
Uhuh, try a real text editor sometime?
Haven't had such kind of error for years, the only thing actually causing it was me being dumb and using tabs instead of 4 spaces.
Renive ยท 4 points ยท Posted at 03:02:09 on January 13, 2019 ยท (Permalink)
I will rather use sane language than use spaces.
hairy-beary ยท 2 points ยท Posted at 09:06:10 on January 13, 2019 ยท (Permalink)
Well that rules out JS
Hevaesi ยท 1 points ยท Posted at 10:48:03 on January 13, 2019 ยท (Permalink)
Yeah because in real code (the one you don't seem to work with anyway), you don't ident it using 4 spaces anyway right...
BhagwanBill ยท 2 points ยท Posted at 02:42:04 on January 13, 2019 ยท (Permalink)
42 spacesUnterSkiller ยท 1 points ยท Posted at 20:37:59 on January 13, 2019 ยท (Permalink)
Always used tabs for intendation, never had any problems, how?
yogthos ยท 1 points ยท Posted at 22:08:45 on January 13, 2019 ยท (Permalink)
Clojure runs on the JVM or Node on the backend, and you can compile it to Js on the front-end. Pretty much all the benefits of Js along with a well designed language.
hanss314 ยท 115 points ยท Posted at 17:18:04 on January 12, 2019 ยท (Permalink)*
I don't think this is a comment on the speed of JS but more of a comment on JS being where JS shouldn't be
Edit to address some comments and clarify: JavaScript used to be very frontend only and using it as backend was a crazy idea. Then node happened and all the frontend devs got to write backend code. And then node got kinda good and people started caring about ECMAScript and mongodb happened and fucktons of frameworks happened and now we have fullstack js and desktop js and everything js which is weird but somehow works. Some people still argue that JS should stay on the browsers and not the servers while others are like "JS! FUCK YEAH!"
braxistExtremist ยท 25 points ยท Posted at 20:00:27 on January 12, 2019 ยท (Permalink)
Exactly. It's surprising (and a bit disappointing) that I had to scroll down so far to find this comment. A lot of people are missing the point of this meme. It's not really about speed. It's about suitability.
marinespl ยท 15 points ยท Posted at 22:21:31 on January 12, 2019 ยท (Permalink)
Why isn't is suitable?
z0mbietime ยท 2 points ยท Posted at 02:39:14 on January 13, 2019 ยท (Permalink)*
Some of the JS... quirky behavior can lead to a variety of problems like data insecurities or corruption. It's also important to point out a backend isn't some RPC to run benchmarks on the backend. It's normally interacting with some persistent data store and a stable, well supported framework like Ruby on Rails or Django/DRF doesn't exist for nodeJS. None of this is to say things won't continue to improve but for now it's worth being apprehensive using JavaScript for a production backend.
marinespl ยท 6 points ยท Posted at 08:36:11 on January 13, 2019 ยท (Permalink)
This can be said about any language.
It's all relative. Not everybody needs RoR or Django features.
You're not the one to judge this.
I get it that you don't like it but there is no real reason to not use JS on backend.
See_Em ยท 6 points ยท Posted at 20:09:14 on January 12, 2019 ยท (Permalink)
But itโs fast
redwall_hp ยท 9 points ยท Posted at 01:01:21 on January 13, 2019 ยท (Permalink)
No
And a native binary is even faster than that.
SustainedSuspense ยท 7 points ยท Posted at 20:27:18 on January 12, 2019 ยท (Permalink)
Says who?
[deleted] ยท 0 points ยท Posted at 22:53:16 on January 12, 2019 ยท (Permalink)
Whatโs wrong with using JS as a backend it works great as a frontend server. Anything beyond that you will delegate to a micro service written in another language for performance.
[deleted] ยท 1 points ยท Posted at 21:11:46 on January 13, 2019 ยท (Permalink)
Lol this kid is still in school but wants to pretend to be a pundit and telling us JS should only stay inside the browser. Maybe get some working experience first then we might listen to you.
wallefan01 ยท 0 points ยท Posted at 23:59:10 on January 12, 2019 ยท (Permalink)
JAAAVASCRIIIIPT ! F**K YEAH! GONNA SAVE THE
I'm sorry, I just can't
YeeP79 ยท 19 points ยท Posted at 16:05:19 on January 12, 2019 ยท (Permalink)
I write Nodejs for a living and this made me lmao..
Garaleth ยท 123 points ยท Posted at 10:33:27 on January 12, 2019 ยท (Permalink)
JavaScript is fairly fast, faster than most programming languages. Sure it cannot compete with C and C++, but nothing can.
[deleted] ยท 140 points ยท Posted at 10:48:19 on January 12, 2019 ยท (Permalink)*
People that complain JS is slow are usually using JQuery for everything.
rsoares88 ยท 41 points ยท Posted at 11:21:18 on January 12, 2019 ยท (Permalink)
jQuery in the back end? Is that a new framework??? Just wondering how this is being upvoted..
Guisseppi ยท 13 points ยท Posted at 16:47:38 on January 12, 2019 ยท (Permalink)
Do you mean cheerio?
Hugix ยท 24 points ยท Posted at 13:48:18 on January 12, 2019 ยท (Permalink)
Nobody stated that jQuery is being used in the back-end. You just made that up, the original comment is obviously talking about JS in general.
That comment is saying "Users complaining JS is slow are using frameworks like jQuery".
TheWildKernelTrick ยท 9 points ยท Posted at 16:09:30 on January 12, 2019 ยท (Permalink)
why do you care so much? its /r/programmerhumor. take some jokes and misinterpretations.
rsoares88 ยท -12 points ยท Posted at 14:08:05 on January 12, 2019 ยท (Permalink)
And the OP meme is about space pig's, not JS being used in the backend...
And the comment said " using JQuery for everything. " so putting the discussion in context means someone managed to use jQuery in backend and front end ence the everything
If we try to des-contextualise everything to fit our belifs, then even the space pig's i mentioned make sense now..
ben_g0 ยท 3 points ยท Posted at 16:18:30 on January 12, 2019 ยท (Permalink)
People don't like js for the backend, because they have looked at the other uses of js which commonly use jQuery which slows it down. It's similar to how some people dislike anything made with Unity since the engine is used for a lot of crappy games. This doesn't mean that it's impossible to make a good game with Unity, but it does have that reputation for a lot of people.
Similarly due to the inefficiency of old interpreters and the lagginess of the bloated js and jQuery on pages js still has the reputation of being slow. And that is what they meant, jQuery has no effect on the backend, but it did ruin the javascript reputation.
careseite ยท 2 points ยท Posted at 20:42:31 on January 12, 2019 ยท (Permalink)
Literally the opposite is the case. Jquery made js survive its horrible phase of being what it was: bad and basically unmaintained. Then es5 came, which made jquery pointless. But before that jquery kept it alive.
rsoares88 ยท -2 points ยท Posted at 16:30:11 on January 12, 2019 ยท (Permalink)
Did you ever used jQuery in your life, your you just trying to be popular?? Also i miss the point where any of this adds anything to the discussion..
Spoiler: 99.9% of people bashing on jQuery never used it, are around 20yo and probably don't even know 'tha' fuck it does.. If it wasn't for jQuery, JS in front end dev would have been replaced ages ago, FE frameworks wouldn't be what they are today, get your facts straight before talking shit you don't understand..
ben_g0 ยท 4 points ยท Posted at 16:52:51 on January 12, 2019 ยท (Permalink)
I never claimed that anything is too slow, but that it has the reputation to be so. The main problem of most slow pages is that they are bloated and load way to many things, and use a lot of libraries in places where they're not really needed and the loading of the libraries can slow things down. This is why jQuery got brought up in this discussion. We're not bashing on it just to be popular.
TheWildKernelTrick ยท -4 points ยท Posted at 16:06:59 on January 12, 2019 ยท (Permalink)
Fuck promises, just use JQuery
[deleted] ยท -10 points ยท Posted at 12:30:49 on January 12, 2019 ยท (Permalink)
[deleted]
rsoares88 ยท 11 points ยท Posted at 12:32:19 on January 12, 2019 ยท (Permalink)
Again.. jQuery is a front end library, and can't be used as a backend anything.. This just show the bad state the web development is..
[deleted] ยท 1 points ยท Posted at 17:49:25 on January 22, 2019 ยท (Permalink)
What do you mean bad? It's excellent we can't use JQuery as backend anything and I'm thankful for it. Otherwise shit would be slow as fuck and JQuery noobs would be writing spaghetti code all over. Honestly, although I loved JQuery when I first started JS, I think it's far past it's prime and there's no reason to keep using it.
Thats_arguable ยท -1 points ยท Posted at 12:39:57 on January 12, 2019 ยท (Permalink)*
Node is also used for front-end development, e.g. Angular.
Edit: why the downvotes? Angular projects are literally built with Node and NPM (Angular cli, webpack).
rsoares88 ยท -1 points ยท Posted at 12:43:33 on January 12, 2019 ยท (Permalink)
WTF does node have to do with 'e.g Angular' ?
Or did i miss something and the 'e.g' is a node library for Angular (sarcasm)...
But what does any of that has to do to someone claiming jQuery is being used in a backend ???
Zegrento7 ยท 14 points ยท Posted at 12:58:13 on January 12, 2019 ยท (Permalink)
Neither jQuery nor Angular are used for backend, but these days frontend also uses npm for dependency management, regardless of what backend is used.
rsoares88 ยท -8 points ยท Posted at 13:09:39 on January 12, 2019 ยท (Permalink)
Now i just want to shoot myself in the head, what does a package manager has to do with ANY of this ??
Are this people real developers or just here for the memes ??
antifa_brasileiro ยท 7 points ยท Posted at 13:29:05 on January 12, 2019 ยท (Permalink)
Guy linked to jQuery on NPM as if it indicated JQ was used in the back end. Two people (me three) have been trying to explain that Node is used for downloading, managing and bundling front end code. See Webpack, Babel.
rsoares88 ยท -2 points ยท Posted at 13:30:18 on January 12, 2019 ยท (Permalink)
Ok, i see now, they are here for the memes..
Im out, peace!
Thats_arguable ยท 2 points ยท Posted at 14:35:52 on January 12, 2019 ยท (Permalink)
You've never used npm before, have you?
rsoares88 ยท -1 points ยท Posted at 15:24:26 on January 12, 2019 ยท (Permalink)
Again what does npm has to do with js being used in backend front end or nasa end ??
You guys should stick with the memes..
Zegrento7 ยท 7 points ยท Posted at 13:34:52 on January 12, 2019 ยท (Permalink)
Long story short, people got fed up with two things: syntax and cdns.
To improve syntax, devs started using Babel and/or Typescript. These brought their runtime, Node into the frontend space.
And since Node comes with npm, people thought "Hell, we might as well serve front-end depencies from there too". And thus angular, jquery, etc appeared on npm, relying on webpack or similar tools to bundle any front-end deps found in package.json or in .node_modules into the output js file.
This eliminates having to update the htmls every time a new front-end library release is out, and having to rely on remote cdns or having to manually download and rename these libraries if cdns are no option.
Also, angular and react come with their own bootstrapping tools which also rely on Node, further tying node to the frond-end (specifically, the front-end build toolchain). This is what the comments above were talking about, and I have no idea why they were downvoted so much.
rsoares88 ยท 0 points ยท Posted at 13:43:53 on January 12, 2019 ยท (Permalink)
So because node depends on the internet, it makes node an ISP...
And if i use linux console to download jQuery it makes it a shell library too..
I see your logic..
If after this you still can't understand why the downvotes, there's nothing i can do for you. Have a nice day.
Zegrento7 ยท 2 points ยท Posted at 13:57:28 on January 12, 2019 ยท (Permalink)
Nobody said that jQuery or Angular are backend libraries. They said that Node is used for both backend and frontend development, which is true: it powers servers on the backend, and toolchains on the frontend. Nuff said, have a nice day.
bwhite94 ยท 4 points ยท Posted at 12:53:38 on January 12, 2019 ยท (Permalink)
I hear insert another only front-end library/framework here is being used as back-end too..
rsoares88 ยท 2 points ยท Posted at 12:58:28 on January 12, 2019 ยท (Permalink)
Is the ' insert another only front-end library/framework here ' powered by Disruptive Crypto AI Serverless Blockchain
technology ??
[deleted] ยท 1 points ยท Posted at 22:53:50 on January 12, 2019 ยท (Permalink)
And they donโt understand JS well enough
fadais ยท 31 points ยท Posted at 12:28:42 on January 12, 2019 ยท (Permalink)
Rust can :)
UrpleEeple ยท 14 points ยท Posted at 16:47:23 on January 12, 2019 ยท (Permalink)
Yep, also the creator of flask, Armin Ronacher is now working on Actix, the fastest web backend in the world by third party metrics. Actix is built in Rust (https://actix.rs)
[deleted] ยท 0 points ยท Posted at 06:31:51 on January 13, 2019 ยท (Permalink)*
[deleted]
UrpleEeple ยท 4 points ยท Posted at 16:28:00 on January 13, 2019 ยท (Permalink)
I quite like Rusts syntax actually. To each their own
Avambo ยท 5 points ยท Posted at 13:41:58 on January 12, 2019 ยท (Permalink)
I was just about to say this. If anyone can, rust can. I would love to try it out, but I have no use for it yet though since I'm a web dev, and no companies are hitting Rust developers for the web here.
fadais ยท -6 points ยท Posted at 14:12:52 on January 12, 2019 ยท (Permalink)*
Yeah I don't think Rust will ever have any use as web backend. Rust is, like c / c++, designed to work very low level to ensure devs can design very efficient code. this is important for application that are so complex that they constantly take up a big part or most of the cpu/gpu/memory. So it could get used for stuff like game development, video editing or maybe low-level coding for microcontrollers but web backends usually don't need to this level of Efficiency, it would most certainly be cheaper to just buy a better server instead of hiring rust devs to develope you new technology + most web servers are already overpowered to ensure that a big amount of users can use the web service so why would they start developing
edit: I didn't meant that there won't be any web server implementation written in rust. Just wanted to say that rust won't play a big role in web development in the future for the same reason c/c++ are didn't.
UrpleEeple ยท 4 points ยท Posted at 16:49:18 on January 12, 2019 ยท (Permalink)
Rust won't ever have a use in web backend? https://actix.rs
Freeky ยท 2 points ยท Posted at 19:14:32 on January 13, 2019 ยท (Permalink)
Apparently used a lot in Azure - its lead developer is a Microsoft employee.
There's also https://rocket.rs/ which I gather is used for some of the NPM backend.
UrpleEeple ยท 1 points ยท Posted at 19:49:48 on January 13, 2019 ยท (Permalink)
Rocket is really cool, I think the documentation is better for it. Some people are switching to Actix because Rocket depends on nightly which in and of itself is pretty stable but it can make managing dependencies more difficult. From third party testing I've seen Actix is faster if that matters for the project.
Avambo ยท 2 points ยท Posted at 14:31:23 on January 12, 2019 ยท (Permalink)*
There are a lot of work being done for Rust web development though, and it looks really promising. But it's not quite there yet. I'd give it another 3-4 years before it becomes viable. But yes, the vast majority of companies won't need Rust for their web backend. Until then I'll stick with Go and C# for my backends.
This is an interesting page that I check every now and then.
https://www.arewewebyet.org/
UltimateComb ยท 1 points ยท Posted at 20:41:15 on January 12, 2019 ยท (Permalink)
rust in aws lambda is fairly easy to use
jpsalvesen ยท 1 points ยท Posted at 00:08:19 on January 13, 2019 ยท (Permalink)
If we could build a stack that's both efficient to code on and execute, we would be saving a lot of processing power in the data centers.
BrianBoyko ยท 24 points ยท Posted at 10:55:47 on January 12, 2019 ยท (Permalink)
My thoughts on Javascript as a backend are: "Sure, why not?"
This is one of the cool thing about Node - I only have to know one language to do the full stack. Which is great. I'm working on a startup web app, and it needs the full stack. I don't need to hire another developer (sinking money into the project) before I get the prototype up. I can even get a reasonable number of users before sinking money into the project -- and if I already have a user base, that means that I'm more likely to be getting VC funded.
If I did it in Java (or C or Rust or whatever), I'd have to learn and maintain a new language, before I can even tell if the product is viable in the marketplace. I'd have to not just learn the syntax but also the packaging and conventions. Generally, by the time Javascript no longer meets your apps scaling need, you have an app that has a high enough usage you can spend the money on someone with expertise in building scalable Java or Rust or Go or Whatever backends.
Is Javascript the best language? No. Python is simpler, C/Rust is faster, Java is more robust and type-safe. But it's clearly the most flexible, running just about anywhere on anything. It is the perfect prototyping tool.
vaaski ยท 19 points ยท Posted at 12:28:17 on January 12, 2019 ยท (Permalink)
i don't think there are many use cases where you'd need to move from node to something else, paypal switched to nodejs in 2013 and actually saw performance improvements compared to the old java backend.
thirdegree ยท 23 points ยท Posted at 12:13:55 on January 12, 2019 ยท (Permalink)
I don't like JS for the backend because it's designed to be extraordinarily fault-tolerant. It will happily coerce anything into anything else because when it's used in the front end, it's better to do that than to throw errors. But that's not the case in the backend.
Also a nearly non-existent type system (though TS helps with that).
trichotillofobia ยท 16 points ยท Posted at 13:37:52 on January 12, 2019 ยท (Permalink)
Yet one uncaught exception can halt your nodejs server.
kryptkpr ยท 3 points ยท Posted at 16:59:54 on January 12, 2019 ยท (Permalink)
You can override this easily: https://nodejs.org/api/process.html#process_event_uncaughtexception
The next section of docs explain why the default behavior is what it is and why you probably dont want to override it but handle that error properly somewhere instead.
trichotillofobia ยท 2 points ยท Posted at 20:10:45 on January 12, 2019 ยท (Permalink)
I know, but that's almost like writing
BabyLegsDeadpool ยท 1 points ยท Posted at 18:59:42 on January 12, 2019 ยท (Permalink)
I am writing a Node backend for a personal project, and this helps me out a ton. I knew this was possible but didn't know how. You just saved me some Googling time! Thanks!
OwlsRavensnCrow ยท 2 points ยท Posted at 16:22:26 on January 12, 2019 ยท (Permalink)
but even in debug mode you'll never know what killed it
Fausztusz ยท 13 points ยท Posted at 13:37:25 on January 12, 2019 ยท (Permalink)
It's very easy to write horrible js code, but it's not that hard to write beautyful and reliable js.
thirdegree ยท 14 points ยท Posted at 13:54:36 on January 12, 2019 ยท (Permalink)
Sure, good and bad code can be written in any language. That doesn't mean they're all equal. Some languages make writing good code easier or harder by disallowing various kinds of bad code. The obvious example is how important the type system is. JS's can be almost entirely ignored, where Haskell (for example) is defined primarily through its type systme.
BrianBoyko ยท 1 points ยท Posted at 12:35:11 on January 13, 2019 ยท (Permalink)
I disagree. I do think there are some languages where it is impossible to write good code. Brainfuck, for example. Others fall elsewhere on the Cartesian plane of X-axis = easy to write good code, Y-axis = easy to write bad code, and there are some languages or frameworks where it is easy to do both.
thirdegree ยท 1 points ยท Posted at 12:36:48 on January 13, 2019 ยท (Permalink)
Sure, esolangs excepted.
kryptkpr ยท 1 points ยท Posted at 16:55:28 on January 12, 2019 ยท (Permalink)
Important to whom exactly? Tediously marking every intermediate type is not my jam. I define/enforce types at the database layer, and explicitly cast whenever I expect a particular thing to be a particular type. This goes for JavaScript, Python and any other weakly typed language. Weak types are awesome! So much less verbose, and the JIT will work it out correctly 99% of the time (explicit cast when it doesnt, its weakly typed not untyped!)
thirdegree ยท 5 points ยท Posted at 17:09:43 on January 12, 2019 ยท (Permalink)
There is no such thing as untyped/weakly typed code. Types are a conceptual construct, not just an implementation construct. The only difference between a strict and weak language is how well that language enforces the conceptual construct.
That said, I do understand your point. Personally, I'm a fan of the approach python takes, where you can freely run whatever you want (within sanity, no "1" + 1 == "11", "1" - 1 == 0 sillyness), but there are also third-party libraries that take advantage of language syntax specifically designed for them. I can write with as strict or as weakly typed as I want. I do usually choose to annotate as much of a given program as possible, because it prevents a class of bugs that can be easily missed by just reading and testing.
Garrosh ยท 1 points ยท Posted at 17:55:18 on January 12, 2019 ยท (Permalink)
You could say the same about everything. Include Visual Basic. And I didn't mean Visual Basic .net.
fauxtoe ยท 3 points ยท Posted at 13:21:37 on January 12, 2019 ยท (Permalink)
Itโs not hard to write code that accounts for things so there arenโt unexpected coercions.
BrianBoyko ยท 1 points ยท Posted at 12:30:28 on January 13, 2019 ยท (Permalink)
Are you sure you arenโt thinking of PHP? No sarcasm, thatโs not a criticism I often hear leveled at node but described PHP to a T.
As for typescript, I like it too, and think that it makes writing code in a team more practical.
thirdegree ยท 1 points ยท Posted at 12:31:50 on January 13, 2019 ยท (Permalink)
I've never used PHP, so maybe?
kryptkpr ยท -1 points ยท Posted at 16:49:42 on January 12, 2019 ยท (Permalink)
Data validation belongs at the database and model layer my friend, not at the endpoint. If your model allowed some garbage to get in, you have already lost. There are plenty of ways to enforce schemas with Node, just depends on your db stack.
thirdegree ยท 11 points ยท Posted at 17:11:45 on January 12, 2019 ยท (Permalink)
Types aren't data validation. Types are expectation validation. You're not checking runtime data, you're checking that assertions and assumptions you've made about your own code are accurate.
kryptkpr ยท -2 points ยท Posted at 17:14:51 on January 12, 2019 ยท (Permalink)*
Linting, testing and coverage are unavoidable either way. It comes down to personal preference, but after a decade of Python/JS I never see myself going back to a strongly typed language, C# and Java now feel like shackles. Types belong with data, just let my 3 lines of code be code. Note that I almost never write more then those 3 lines, I am a plumber not a scientist. I can see with 3000 lines why you care for types.. but for the kind of monkey plumbing I do on a daily basis types are just brittle and blow up when something they didnt even care about changes.
thirdegree ยท 6 points ยท Posted at 17:20:04 on January 12, 2019 ยท (Permalink)
None of those three have anything to do with typing though. They're all approximations that are valuable for exactly what you just said, a lot of people feel limited by stricter typing. Which is a fine stance to take, but not one I agree with myself. I'm of the opinion that it is not possible to separate code from data, code is just a series of operations to be performed on data.
kryptkpr ยท 0 points ยท Posted at 17:22:03 on January 12, 2019 ยท (Permalink)
That's just it - my code generally does not operate on data, it just blindly moves it around. I am piping, scaffolding. Not having to know what's in the box is a strong selling point.
thirdegree ยท 1 points ยท Posted at 17:24:39 on January 12, 2019 ยท (Permalink)
That's fair, I guess. I can't imagine a problem that is both simple enough to not interact with any kind of data and not doable with a few bash scripts, but I guess there's gotta be something.
kryptkpr ยท 1 points ยท Posted at 17:27:53 on January 12, 2019 ยท (Permalink)
IoT platform work. Large scale asynchronous message passing/processing systems that dont care much for content of messages. I am somewhat dead inside.
AndrewGreenh ยท 1 points ยท Posted at 21:29:25 on January 12, 2019 ยท (Permalink)
I think you are mixing up weak/strong typing with static/dynamic typing. Js is weak and dynamic. (types only exist at runtime and they can be converted easily --> 1 + '1') Python is (mostly) dynamic and strongly typed. Java c# are all static type languages.
bt4u6 ยท 2 points ยท Posted at 20:55:35 on January 12, 2019 ยท (Permalink)
Prototyping? That's a funny word you use for "deployed directly to production with no refactoring or rewrites for 10 years"
STATIC_TYPE_IS_LIFE ยท 7 points ยท Posted at 22:17:08 on January 12, 2019 ยท (Permalink)
Lol no it's not. Java is way faster, c# is way faster. Almost any compiled language is going to be faster. Yes, compiling your code gives you massive advantages in speed over interpreting. Compile time optimizations are real.
Steve5451 ยท 1 points ยท Posted at 01:32:54 on January 13, 2019 ยท (Permalink)
Node is JIT compiled like java and .net.
STATIC_TYPE_IS_LIFE ยท 1 points ยท Posted at 02:28:48 on January 13, 2019 ยท (Permalink)
JIT is no where near as good as actual compilation. Go do a reverse flood fill and come back with the results.
Hevaesi ยท 2 points ยท Posted at 01:23:56 on January 13, 2019 ยท (Permalink)
That's where you're wrong kiddo.
spektrol ยท 2 points ยท Posted at 08:48:27 on January 13, 2019 ยท (Permalink)
Javascript is NOT fast compared to other programming languages.
https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/regexredux.html
Osolodo ยท 5 points ยท Posted at 14:47:22 on January 12, 2019 ยท (Permalink)
Mostly it comes down to the interpreter/compiler. The C compilers have had decades of optimization baked in. I bet with a few years of work I could write a C++ interpreter that is 1000 times slower than node.js.
But I won't, because that would be pointless.
ben_g0 ยท 11 points ยท Posted at 16:31:48 on January 12, 2019 ยท (Permalink)
The main thing holding js back compared to C/C++ is that js is interpreted, and has some features that can't be precompiled such as the eval function. C/C++ will always be faster than js unless someone makes a more limited js dialect which can be directly compiled to native machine code.
However, the modern interpreters are so good that they have basically cought up with "semicompiled" languages such as Java. Since Java's performance, while significantly less than C/C++, was already considered "good enough" to gain a lot of popularity for web apps and enterprise software in the 2000's. So modern javascript should now also be good enough for many applications. The rising popularity of javascript-based web apps such as Google Docs seems to confirm this.
STATIC_TYPE_IS_LIFE ยท 7 points ยท Posted at 22:19:00 on January 12, 2019 ยท (Permalink)
Java is way, at faster than JavaScript in 99.99% of situations. Like, alot faster. Go do a reverse flood fill and come back with the results, it's not even close. Saying JS has "caught" up is pretty much propaganda.
CraigslistAxeKiller ยท 2 points ยท Posted at 19:35:27 on January 12, 2019 ยท (Permalink)
Java is not a good example. It always inside the JVM, which is another layer of abstraction away from hardware.
C# is a better example because it has JIT compilation directly to machine code
bt4u6 ยท 1 points ยท Posted at 19:30:33 on January 13, 2019 ยท (Permalink)*
What are you talking about? I think you're a little confused
Both Java and c# run on a VM. For Java it's bytecode on the jvm. For c# it's CIL on the CLR. Both VMs use JIT
The additional layer of abstraction provided by the VM improves performance, it doesn't hinder it. It does this by, in simple terms, letting the compiler make the job of the JIT easier
[deleted] ยท 1 points ยท Posted at 22:23:22 on January 12, 2019 ยท (Permalink)*
[deleted]
CraigslistAxeKiller ยท 0 points ยท Posted at 23:48:38 on January 12, 2019 ยท (Permalink)
Yes, java does have JIT, but it runs on the JVM, which leads to lower performance.
redwall_hp ยท 3 points ยท Posted at 01:05:39 on January 13, 2019 ยท (Permalink)
C# runs on the .NET runtime, which is entirely a JVM knockoff that came about when Sun litigated against their incompatible Microsoft JVM. It's the same thing.
kryptkpr ยท 0 points ยท Posted at 17:04:39 on January 12, 2019 ยท (Permalink)
JS is not interpreted, it's more like lazy compiled once it sorts out types. eval is compiled down to bytecode and JITed to native like everything else. Some black art surrounds keeping native paths hot when using same function called with different type args, avoiding that is your best bet to performance.
ben_g0 ยท 3 points ยท Posted at 17:12:23 on January 12, 2019 ยท (Permalink)
True, but since javascript is still usually classified as an interpreted programming language I didn't really know what else to call it (and iirc it used to be almost completely interpreted at the start). How the code is actually executed also depends somewhat on which program you use to run it.
kryptkpr ยท 3 points ยท Posted at 17:26:45 on January 12, 2019 ยท (Permalink)
I agree, but I dont think it's fair to continue to do so. The two most common ways to run javascript are both V8, either via Node or Chrome.. and it's been leading the JIT frontier for the past decade.
I would even argue that the classical interpreted language is dead outside of shell script.. Every modern scripting language is at least a bytecode compiler and VM, with many having a JIT/native emitter at the end.
NibblyPig ยท 2 points ยท Posted at 11:59:11 on January 12, 2019 ยท (Permalink)
Just a shame it's horrendeous when you try to write something complex in it
[deleted] ยท 1 points ยท Posted at 23:49:47 on January 12, 2019 ยท (Permalink)
At least it's not php
redwall_hp ยท 1 points ยท Posted at 01:02:13 on January 13, 2019 ยท (Permalink)
JabaScript is slower than Java.
Malor ยท -1 points ยท Posted at 11:10:17 on January 12, 2019 ยท (Permalink)*
edit: this comment is wrong. I'm leaving up for posterity, but this is an incorrect assertion:
Web Assembly is a subset of Javascript that's crazy fast, fast enough to be a compilation target for languages like C. (I think only Rust is really good at this so far, but other languages shouldn't be far behind.) It gets recompiled down to machine code in browsers, and apparently is hard to distinguish speed-wise from compiling for an OS.
2Punx2Furious ยท 20 points ยท Posted at 11:19:25 on January 12, 2019 ยท (Permalink)
I think that might be wrong.
Doesn't that mean that it's loaded by JS, but it's not a subset of JS? It's like loading a Java program with C++, and saying Java is a subset of C++.
Malor ยท 6 points ยท Posted at 11:43:00 on January 12, 2019 ยท (Permalink)
I think you're right, after looking further; WASM is an actual bytecode format, not just Javascript like asm.js was. I misunderstood that.
Malor ยท 3 points ยท Posted at 11:36:05 on January 12, 2019 ยท (Permalink)
Well, as I understand it, and I could be wrong, WASM is a literal syntax subset of Javascript, an outgrowth of the effort to make Javascript go fast. They realized that they could make some of it go super quick, which led to the creation of WASM's predecessor, asm.js, the parts of Javascript that could be accelerated the most.
Now, it's possible that the update from asm.js to WASM may have changed it in some fundamental way I'm not aware of, as I haven't written any of either. But I think that both are subsets of the main language, perhaps with some special delineation in WASM's case.
NonreciprocatingCrow ยท 0 points ยท Posted at 18:55:48 on January 12, 2019 ยท (Permalink)
Except Fortran supposedly.
[deleted] ยท -2 points ยท Posted at 14:52:43 on January 12, 2019 ยท (Permalink)*
[deleted]
ProgramTheWorld ยท 3 points ยท Posted at 20:22:47 on January 12, 2019 ยท (Permalink)
The best JS interpreter out there (V8) is really one of the fastest interpreters. PHP is no match for (Node) JS.
[deleted] ยท -4 points ยท Posted at 21:23:52 on January 12, 2019 ยท (Permalink)*
[deleted]
ProgramTheWorld ยท 4 points ยท Posted at 21:28:03 on January 12, 2019 ยท (Permalink)
Well you can easily compare the performance yourself. V8 is very well known for its performance in the industry. Thereโs a reason why Node JS is often preferred over PHP these days.
[deleted] ยท -1 points ยท Posted at 00:40:58 on January 13, 2019 ยท (Permalink)*
[deleted]
ProgramTheWorld ยท 1 points ยท Posted at 07:27:05 on January 13, 2019 ยท (Permalink)
I think a very important piece of information that you are missing is that the web has changed a lot in the last few years. The web used to be simple - you take a template HTML file, inject some user specific data into it and you are done. Maybe do some user authentication and file or db I/Os but thatโs about it. That worked well for a while with PHP, however nowadays the entire landscape has changed with the introduction of newer technologies. We now have frameworks like React and Angular where you have to do server-side rendering to avoid serving a blank page with only JavaScript. Can your PHP scripts run React code and render the app on the fly? Definitely not without sacrificing performance. How about compatibility and support for NoSQL databases? Not so great.
Ultimately it depends on the tools that you are working with. If you are serving simple webpages - sure pick whatever you want. If you are stuck with old technologies like MySQL then you are probably better off using PHP. However if you are working with newer technologies like MongoDB and React, then not only Node JS is faster - it also works better with those tools.
jazzyphil59 ยท 59 points ยท Posted at 14:00:24 on January 12, 2019 ยท (Permalink)
I hate what I don't understand
Tysonzero ยท 18 points ยท Posted at 20:10:01 on January 12, 2019 ยท (Permalink)
I understand JS very well, I have written a compiler backend for it, I hate it now more than ever.
[deleted] ยท 3 points ยท Posted at 22:54:48 on January 12, 2019 ยท (Permalink)
I too am Bill Gateโs son
pixel4 ยท 2 points ยท Posted at 21:50:06 on January 12, 2019 ยท (Permalink)
Then I guess you hate people that hate it.
naveen17797 ยท 3 points ยท Posted at 17:51:55 on January 12, 2019 ยท (Permalink)
The only difference is you would have to understand ihatewhatidontunderstand1, ihatewhatidontunderstand2framework, ihatewhatidontunderstand100 which will be coming out everyday
[deleted] ยท -27 points ยท Posted at 14:54:38 on January 12, 2019 ยท (Permalink)*
[deleted]
fyzbo ยท 12 points ยท Posted at 16:27:53 on January 12, 2019 ยท (Permalink)
Was that a joke? Common practice is to use Nginx with express.
Guisseppi ยท 18 points ยท Posted at 14:58:37 on January 12, 2019 ยท (Permalink)
Well, itโs not exactly an apples to apples comparison. Express is a JS framework based on Connect to handle web requests using js middleware interfaces.
Tl;dr: Express = logic; [apache, nginx] != logic
[deleted] ยท 2 points ยท Posted at 15:20:21 on January 12, 2019 ยท (Permalink)*
[deleted]
Guisseppi ยท 4 points ยท Posted at 15:20:47 on January 12, 2019 ยท (Permalink)
Rails would be a fair comparison
[deleted] ยท -2 points ยท Posted at 15:21:51 on January 12, 2019 ยท (Permalink)*
[deleted]
Guisseppi ยท 3 points ยท Posted at 15:25:08 on January 12, 2019 ยท (Permalink)
Exactly, remember Rails doesnโt run on the browser, it always runs in the server and compiles into something the browser can read, you CAN have logic there, connect to a DB. Express can do this and more, if you want to run a template system, there is a middleware for that, but it also allows you to develop a REST API and has a lot more flexibility. Apache all by itself canโt connect and query a db. Neither can nginx
[deleted] ยท -1 points ยท Posted at 15:55:54 on January 12, 2019 ยท (Permalink)*
[deleted]
luorduz ยท 6 points ยท Posted at 17:14:33 on January 12, 2019 ยท (Permalink)
Not really. Compare servers to servers and frameworks to frameworks; don't compare a server to a framework.
Rails is a framework, Express is a framework, Apache is not a framework, Nginx is not a framework.
[deleted] ยท -1 points ยท Posted at 18:23:26 on January 12, 2019 ยท (Permalink)*
[deleted]
[deleted] ยท 1 points ยท Posted at 23:30:51 on January 19, 2019 ยท (Permalink)
what the fuck
luorduz ยท 0 points ยท Posted at 18:59:00 on January 12, 2019 ยท (Permalink)
Your position is really weird: You can use nginx or apache to redirect towards application servers of any backend. Express doesn't force you to use Apache, Rails doesn't force you to use Nginx, Django doesn't force you to use lighttpd, etc. And viceversa.
It's as if you were comparing go behind nginx and go behind apache, when we're talking about the go code.
CraigslistAxeKiller ยท 1 points ยท Posted at 19:40:57 on January 12, 2019 ยท (Permalink)
I understand your question. Youโre on the right track.
JS only has nodeJS
Other ecosystems have web hosting tools like nginx or IIS
JS is different. You need NodeJS to run JavaScript on the server, but node does not offer any web capabilities. To get web request handling, you have to install a package (like express). There is no explicit web management layer, just specific code that you load into a JS project
Guisseppi ยท 1 points ยท Posted at 15:56:50 on January 12, 2019 ยท (Permalink)
Apache is to node as Express is to PHP
[deleted] ยท -3 points ยท Posted at 16:18:39 on January 12, 2019 ยท (Permalink)*
[deleted]
Guisseppi ยท 1 points ยท Posted at 16:31:20 on January 12, 2019 ยท (Permalink)
oh word?
ralphpig ยท 5 points ยท Posted at 17:15:11 on January 12, 2019 ยท (Permalink)
Oh okay, so you clearly don't know what you're talking about
[deleted] ยท -1 points ยท Posted at 17:53:41 on January 12, 2019 ยท (Permalink)*
[deleted]
ralphpig ยท 2 points ยท Posted at 00:58:40 on January 13, 2019 ยท (Permalink)
Express with nginx or Apache. The fact that you think they are interchangable means you've never touched either.
msg45f ยท 7 points ยท Posted at 15:08:26 on January 12, 2019 ยท (Permalink)
Tell that to Walmart, who decided to give Node a test drive and discovered that their servers never went above 1% utilization during the entire day that they tested it. Which was Black Friday.
wallefan01 ยท 4 points ยท Posted at 23:56:09 on January 12, 2019 ยท (Permalink)
Are you really comparing JavaScript to something as majestic as an eagle
KraZhtest ยท 4 points ยท Posted at 01:04:14 on January 13, 2019 ยท (Permalink)
Get REKT moon boys
Alexmitter ยท 7 points ยท Posted at 13:49:47 on January 12, 2019 ยท (Permalink)
Javascript as Everything/Anywhere.
happydogo12 ยท 5 points ยท Posted at 21:08:10 on January 12, 2019 ยท (Permalink)
Reddit's backend is js, isn't it?
NoLanSym ยท 7 points ยท Posted at 21:37:36 on January 12, 2019 ยท (Permalink)
Iโm fairly certain itโs written in python. They very well could have migrated to something like node micro services by now though.
redwall_hp ยท 5 points ยท Posted at 01:07:24 on January 13, 2019 ยท (Permalink)
It's Python, using the Pylons framework. It used to be Lisp early on.
TheDarkSwordsman ยท 2 points ยท Posted at 22:22:22 on January 12, 2019 ยท (Permalink)
"Say it to my face!" - Me, a Node.js dev /s
dagbiker ยท 2 points ยท Posted at 01:14:22 on January 13, 2019 ยท (Permalink)
TBF He looks like he's doing pretty well.
bot_not_hot ยท 4 points ยท Posted at 19:53:39 on January 12, 2019 ยท (Permalink)
Yea, if you donโt know how to use node..
ri2parna ยท 3 points ยท Posted at 12:14:03 on January 12, 2019 ยท (Permalink)
It's sad, i don't meet the techinchal requirements for getting this joke.
Avambo ยท 11 points ยท Posted at 13:44:47 on January 12, 2019 ยท (Permalink)*
Explanation of the GIF: JavaScript was never meant for the backend, just like an eagle was never meant to be swimming. It works, but it's not very fast compared to other languages that were created for that task.
Edit: For the people voting me down, can you explain why? If you look at the history of JS it was never meant for backend stuff. It was meant to be a very forgiving frontend language for simple tasks. I'm not saying JS is bad, I'm just saying that it was not meant for the backend initially, and it doesn't perform as well as other languages.
Edit 2: Yes, I am fully aware that Node is sufficient for 99% of backend apps. I use Node at work as well for some things.
imizaac ยท 8 points ยท Posted at 20:38:44 on January 12, 2019 ยท (Permalink)
It does has convenient benefits that lead to Dahl's use of it. He set out to make a high concurrency event based server side framework. JS is the best language in the world for that singular purpose. Evented and async by default.
The problem with node is people using it poorly (like writing blocking code) or using it for things that are a poor fit for the language (like high computational cost operations).
If you play to its strengths, handling requests/second and mostly just returning data, it's really solid. Ranking highly in performance.
For microservices it is probably the best language to use. Startup time and overhead are trivial so spinning up instances costs next to nothing. Which is why Netflix went to an entirely node backend. If you want to have thousands of instances turning on and off, node is great.
Additionally node benefits from having the largest developer pool of any language. JavaScript is the most popular language in the world, by a lot. From this you get awesome tooling and lots of smart people pushing the language and frameworks forward.
JavaScript by design is faster to develop with, being dynamic and interpreted developers can go from a blank slate to a working project in less time, which in many cases is more valuable than slight performance gains. In the real world code is created on a deadline, tested, and replaced. Js is great for that.
So yeah it's narrowly good on servers. It happens to have valuable strengths. It's no mistake that it's popular. And it's on the rise, so you should probably get used to it.
TheDarkSwordsman ยท 3 points ยท Posted at 22:30:03 on January 12, 2019 ยท (Permalink)
This is exactly the comment I was looking for.
Where I work, we have a fairly simple app that has very large objects and manages payment processing. We had 1,000 of current users at one point and it didn't break a sweat. I didn't see CPU usage hit more than 10%, and we current only have one server which hosts the api and front end server on the same server.
We also got DDoSed a while back. It lasted for a solid ten minutes, but the CPU usage didn't hit more than 60% and the website was completely functional.
mikejoro ยท 2 points ยท Posted at 20:45:30 on January 12, 2019 ยท (Permalink)
Javascript actually does perform pretty well for most backend tasks. It's not good at synchronous things like large calculations, but its great at doing asynchronous things. Just google node performance. I'm on mobile or I would link it myself.
Renive ยท 1 points ยท Posted at 23:32:38 on January 12, 2019 ยท (Permalink)
It wasnt designed for that 20 years ago. Language itself has changed a lot since then you know? And people found pit that it works fine on backend and in lots of cases is the best choice.
marinespl ยท 0 points ยท Posted at 22:23:42 on January 12, 2019 ยท (Permalink)
So? Who cares? There is no reason to not use it.
Source?
Avambo ยท 1 points ยท Posted at 23:31:07 on January 12, 2019 ยท (Permalink)
The part you quoted was just an explanation of the GIF. It wasn't my opinion about Node, and I never even said that you shouldn't use it. Heck, I use it at work every day...
Again, I'm not saying that Node is bad, it's perfectly fine for the vast majority of applications. But it's not the most performant in many situations. Nor is it a very safe language (Typescript helps though).
I just want to say that I'm not anti-node. I'm a full stack developer so I totally understand the benefits of Node. Personally though I'd opt for another language on the backend if I had the choice, but that's just my personal preference.
HellD ยท 0 points ยท Posted at 04:12:17 on January 13, 2019 ยท (Permalink)
What do you use when your โfull stackโ? Iโm a programming/cyber sec student thatโs trying to go full stack before April to join a hackathon.
Avambo ยท 2 points ยท Posted at 05:48:29 on January 13, 2019 ยท (Permalink)
I mainly use JS with Vue (which I think is amazing) on the front end, and C#/.NET with PostgreSQL or MSSQL on the backend.
On my free time I dabble a bit in Go (language), Unity3D and UWP.
If you're trying to go full stack in a short time, and is interested in security, I'd recommend Go over C# since it's a lot more light weight, cross platform compilable by default, and very easy to work with and learn. Go also has an amazing built in web server that only requires like 4 lines of code to set up. I know Python is also a very good language for security stuff, probably even more so due to the popularity of the language.
You could also just stick with JS on both the backend (with NodeJS) and frontend if you don't feel like learning a new language. I'm a bit unsure about the possibilities of JS when it comes to security stuff though, but it probably has some libraries for it.
Anyway, whatever you do, never just stick with the languages you initially learn. Always try to check out new stuff. It broadens your knowledge of programming. I try to learn the basics of a new language about once every year. Next year I'm gonna try Rust, if nothing else pops up that looks more interesting.
HellD ยท 1 points ยท Posted at 06:34:11 on January 13, 2019 ยท (Permalink)
Thanks! Due to how outdated the class is, and how I recently got into an internship at a cybersec company, I wanted to branch out and make my own site. I am learning Node right now, and Iโve used flask with python before. Will look more into the security and other applications of python and node tho.
GarasiaKartik ยท 3 points ยท Posted at 15:47:06 on January 12, 2019 ยท (Permalink)
I think the he did not heard about nodejs
noideafornewname ยท 2 points ยท Posted at 12:34:53 on January 12, 2019 ยท (Permalink)
AH man I really want to show this to my project manager.
bot_not_hot ยท 6 points ยท Posted at 19:54:21 on January 12, 2019 ยท (Permalink)
So you can be slapped Rick James style
noideafornewname ยท 1 points ยท Posted at 03:53:35 on January 13, 2019 ยท (Permalink)
Thats what's stopping me.
mzfattal ยท 1 points ยท Posted at 21:12:27 on January 12, 2019 ยท (Permalink)
Ideas on Node.js?
Iโm being introduced to it in my new position.
WazWaz ยท 1 points ยท Posted at 21:13:38 on January 12, 2019 ยท (Permalink)
Less like a swimming eagle, more like a flying gerbil.
cheezballs ยท 1 points ยท Posted at 01:29:58 on January 13, 2019 ยท (Permalink)
Got stuff like serverless lambdas on AWS JS is fantastic. For other stuff.... Meh I'm not sure yet.
Xendrak ยท 1 points ยท Posted at 01:39:06 on January 13, 2019 ยท (Permalink)
Typescript backend and dev restarts in seconds = productivity.
[deleted] ยท 1 points ยท Posted at 09:38:01 on January 13, 2019 ยท (Permalink)
I wish C was the only language one shall ever had to learn. (Except unix shell, though).
garronej ยท -3 points ยท Posted at 10:02:18 on January 12, 2019 ยท (Permalink)
Netflix does run slow indeed.
colnarco ยท 57 points ยท Posted at 10:08:44 on January 12, 2019 ยท (Permalink)
Netflix is actually using a lot of Java. I donโt think any of their streaming-functionality is build with node. Not to pick on node though, for most crud-centric applications itโs a good choice.
ruttydm ยท 1 points ยท Posted at 14:04:46 on January 12, 2019 ยท (Permalink)
Dart backends!
LordQuantumKeks ยท 1 points ยท Posted at 20:55:08 on January 12, 2019 ยท (Permalink)
At least it works!
z-lf ยท 0 points ยท Posted at 11:41:13 on January 12, 2019 ยท (Permalink)
Amen.
CaveJohnson111 ยท -6 points ยท Posted at 18:57:15 on January 12, 2019 ยท (Permalink)
Javascript is cancer though
DelxHQ ยท 4 points ยท Posted at 19:23:32 on January 12, 2019 ยท (Permalink)
It's actually really nice
CaveJohnson111 ยท -3 points ยท Posted at 19:25:20 on January 12, 2019 ยท (Permalink)
Yeah an interpreted language with no type checking is absolutely amazing.
DelxHQ ยท 5 points ยท Posted at 19:41:46 on January 12, 2019 ยท (Permalink)
What do you think TypeScript is for?
CaveJohnson111 ยท -4 points ยท Posted at 20:05:12 on January 12, 2019 ยท (Permalink)
It still transpiled into JS which is interpreted and slow. It amazes me that people would want to use JS outside of the browser.
[deleted] ยท 2 points ยท Posted at 23:00:08 on January 12, 2019 ยท (Permalink)
No one is asking you to write a video encoder with JS. Using NodeJS to code your API servers will be faster than Python or Java because itโs good with IO. Everything else thatโs CPU intensive youโre going to delegate to another microservice written in a more performant language anyway.
Call_Of_B00TY ยท 2 points ยท Posted at 21:29:06 on January 12, 2019 ยท (Permalink)
Slow is relative. It's faster than python, and Django exists. It's also easy to understand and has a huge support group. It's documented well, and since it isn't compiled, you can speed up development. Not for you? Sure, that's perfectly fine. But when I can keep my codebase the same everywhere I will. Again, it's preference.
MiffTheFox ยท 0 points ยท Posted at 19:36:42 on January 12, 2019 ยท (Permalink)
Yeah it's slow and hard to use, but look, there's only one bird.
[deleted] ยท -1 points ยท Posted at 20:06:37 on January 12, 2019 ยท (Permalink)
[deleted]
Falcondance ยท 3 points ยท Posted at 20:19:27 on January 12, 2019 ยท (Permalink)
I wrote a neural network using node.js over the past month lmao
Papayaman1000 ยท 2 points ยท Posted at 20:21:04 on January 12, 2019 ยท (Permalink)
I don't disbelieve that for a single clock cycle.
marinespl ยท 2 points ยท Posted at 22:28:01 on January 12, 2019 ยท (Permalink)
Why would it end?
[deleted] ยท -1 points ยท Posted at 22:42:04 on January 12, 2019 ยท (Permalink)
[deleted]
marinespl ยท 1 points ยท Posted at 08:38:28 on January 13, 2019 ยท (Permalink)
There is nothing insane in developing anything you want in Node.
laphilosophia ยท -29 points ยท Posted at 10:18:45 on January 12, 2019 ยท (Permalink)
That is not true. Do you ever know electron app?
notquiteaplant ยท 45 points ยท Posted at 10:26:42 on January 12, 2019 ยท (Permalink)
Yes, I do know switching away from Atom because it consumed 4GB of RAM and ran as fast as a turtle. Also, desktop apps aren't really backend, are they?
allmeta ยท 12 points ยท Posted at 12:29:15 on January 12, 2019 ยท (Permalink)
Vscode is an example of electron done right though
Alexmitter ยท 1 points ยท Posted at 13:49:06 on January 12, 2019 ยท (Permalink)
Not really, who thinks VScode is fast is delusional or just used to web apps everywhere.
allmeta ยท 1 points ยท Posted at 13:54:50 on January 12, 2019 ยท (Permalink)
I meant electron, not apps in general
Alexmitter ยท 5 points ยท Posted at 14:20:08 on January 12, 2019 ยท (Permalink)
So VScode is the best kind of the worst kind of cancer? I am fine with that definition.
allmeta ยท 1 points ยท Posted at 14:20:41 on January 12, 2019 ยท (Permalink)
Hahaha
ferg92 ยท 1 points ยท Posted at 14:50:34 on January 12, 2019 ยท (Permalink)
I run VS Code and Webstorm and 20 Chrome tabs at the same time because I just hate seeing all that spare RAM go to waste
chanpod ยท 1 points ยท Posted at 17:23:53 on January 12, 2019 ยท (Permalink)
Uh, what? I've used web storm, visual studio pro, vs code, sublime, and atom. And in terms of speed, vs code sublime and atom are all pretty similar. Web storm and vs pro are slower than snails
[deleted] ยท 1 points ยท Posted at 23:04:47 on January 12, 2019 ยท (Permalink)
Webstorm is pretty fast for me. Did you set your build directories to ignore?
chanpod ยท 1 points ยท Posted at 00:49:09 on January 13, 2019 ยท (Permalink)
I don't remember. It's been a while. Maybe web storm has optimized for things like node modules or Bower (anyone still use this) now but when I use it a couple years ago it was pretty slow. Usually due to indexing. Vscode manages to provide intellisense on node modules without slowing things down.
[deleted] ยท 1 points ยท Posted at 05:16:40 on January 13, 2019 ยท (Permalink)
Webstorm is pretty fast now. It doesnโt only provide intellisense for node modules but your own code as well. For example if I want to instant go to the definition of a function I imported from another file I just press Ctrl + B. If I want to know all the usages of a given function or class I also just press Ctrl + B. In fact the intellisense is much better than the extensions from VS Code. The major hurdle I had with VSCode intellisense is that itโs actually slower than Webstorm and also its other extension doesnโt support stylelint with styled components on the frontend.
chanpod ยท 1 points ยท Posted at 13:19:27 on January 13, 2019 ยท (Permalink)
Have you used vscode lately? It does all of this (ctrl + left click will take you to the definition. They've added the ability to peek at the definition too) and the intellisense is nearly instant for me.
[deleted] ยท 1 points ยท Posted at 20:26:20 on January 13, 2019 ยท (Permalink)
Yes I tried migrating a few months ago. Spent about 4-5 hours playing around with extensions. Itโs a pretty decent editor considering that itโs free. But there are still things that Webstorm does much better. For example I can easily refactor several functions from File A into File B with a few clicks. This will also change all references from where it was used. Copying a code snippet from File C into File D will also automatically add import statements where necessary (based on your copied snippet) into File D.
CraigslistAxeKiller ยท 1 points ยท Posted at 19:46:02 on January 12, 2019 ยท (Permalink)
Youโre comparing the wrong tools. VS code and atom both run on electron, so of course they will be the same speed.
VS pro is monumentally larger than both of those combined. VS code is a text editor, VS pro is a fully featured IDE
The more appropriate comparison would be VS Code vs Notepadd++. They are both text editors, NP is substantially faster bc itโs not electron
chanpod ยท 1 points ยท Posted at 22:17:55 on January 12, 2019 ยท (Permalink)
So people keep saying vs code is just a text editor. But it has intellisense (maybe not as good as the "big boys" but it's good enough imo), integrated console/powershell, debugger support for node and browser client scripts (can't remember if this needs a plug-in for the browser debugging), and arguably the better git integration than the others. And with a large community of plugins it can do just about anything.
And maybe you have a toaster, but my vs code opens almost instantly. So I don't know where you get this notion that it's slow
[deleted] ยท 1 points ยท Posted at 23:06:57 on January 12, 2019 ยท (Permalink)
I would recommend webstorm over vscode. I tried to migrate over to vscode and the extensions just werenโt as good as the intellisense Webstorm provided out of the box. Lots of people donโt like paying for software but if you write software for a living paying $5 per month is pretty much nothing.
[deleted] ยท 1 points ยท Posted at 23:03:39 on January 12, 2019 ยท (Permalink)
Iโm a huge fan of Jetbrains. Was going to switch over to VSCode but some of the extensions just arenโt as good as the native support webstorm offers.
Alexmitter ยท 0 points ยท Posted at 16:23:37 on January 12, 2019 ยท (Permalink)
I have nothing against Using Ram, i have something against wasting it for Javascript and its bad Runtimes.
There is a Big, no no Giant difference between using and wasting.
CraigslistAxeKiller ยท 2 points ยท Posted at 19:43:33 on January 12, 2019 ยท (Permalink)
VScode is a nice tool, but itโs pathetically slow. Notepad++ offers the same features with substantially faster load times
[deleted] ยท 2 points ยท Posted at 23:02:36 on January 12, 2019 ยท (Permalink)
Notepad++ is shit when compared with VScode with the proper extensions. And even worse when compared to anything released by Jetbrains
Booty_Bumping ยท 1 points ยท Posted at 08:30:00 on January 19, 2019 ยท (Permalink)
Electron is only slow because browsers are slow. Node.js (v8) is not slow compared to a typical dynamic language interpreter. And it's pretty well suited for certain backend stuff