However, regarding the metric that shows developers' happiness over the years:
* If someone asks me if I'm happy writing JS these days vs a few years ago I'll say I'm much happier now than I was before.
* If someone asks me if I'm happy writing JS vs writing Elixir (or Python or some other language), I'll still say I'm much happier with Elixir.
P.S. I don’t, but most people I have met seem to have this kind of mentality.
It's all we've got, but it is assuredly not good. Hopefully WebAssembly comes to fruition and we can leave this dark era behind.
By that, I mean that you get to choose your entire playing field on the backend. What language are you going to use? What database? What OS will it run on? What (reliable) network connection? All can be tailored to your heart's desire.
No such luck on the frontend. Your code is going to run on a diverse set of clients, which you have no control over. The connection quality might be awful. The CPU on the device might be awful, or it might have low memory.
As much as people like to crap on JavaScript, it isn't the reason the front-end is difficult to program for. And WebAssembly isn't going to solve all of these issues either.
I don't like to target specific words, but the problems you specify apply to JS as much as they do to any other language.
A C/rust like language has far better CPU/memory efficiency than JS.
A batteries included language like python might even be better at network latency since it doesn't have to bundle in the code that should've been in a stdlib, not client code.
We use different languages because they are good at different things. The browser doesn't seem to respect this Philosophy :(
If that takes you forever, consider that it may also be your lack of familiarity as much as the lack of type system/compiler. Despite my preference for the back end, I have spent plenty of time on the front end and can pump out changes very quickly.
At least you have pretty good wiggle room to use other solutions on the browser client, whether it's other languages (TypeScript, Elm), to completely new abstractions (React, Elm again, etc). For example, Elm or React are a fuck ton better than anything we have native on Android and iOS.
Look at other clients people development for like iOS. It's not easier. And any gains in ease of use are traded off because you're developing for a platform that not everyone uses.
Also, continuing with iOS, things like CoreData and the entire UI abstraction are super OOP and not very pleasant (especially the former). And it's nontrivial and a lot more warty to switch out abstractions (like using Rx) or use something other than Swift.
So that things are harder that you moved from backend to client development isn't a very scathing review of Javascript because client development isn't easy.
I enjoy modern JS myself, but I'd be careful about coming to a conclusion like that based on this survey. All it tells us is that JavaScript is very well liked among people who wanted to take the time to complete the State of JavaScript survey.
People who dislike or hate it JS probably wouldn't see the value in completing the survey, so the happiness factor might be a bit biased as a result.
BTW, I insist that is a missed oportunity of clean JS even more (ala typescript, whit some of the wats removed).
I don't know a language in a better position of improve by a HUGE margin than JS.
I don't get the Angular hate. I work with it daily and seems like a productive environment. I did some tests with React and Vue too and couldn't find any relevant advantage. Angular has batteries included tools for a lot of tasks: i18n, routing, isomorphic builds, web components, etc.. You get a cross platform mobile development environment too using NativeScript and a somewhat Angular-esque backend development framework using Nest.js. Seems like a good deal to me.
I weep for the people that will maintain all the React mess that is being created. React is great, but the current ecosystem has too much liberty for too many junior dev using it.
Angular being a framework has a lot to offer in term of maintainability and good practices.
You're spot on with that in my case. I already knew JS and wanted to build on top of it. React just felt natural to pick up than Ng. Also, the fact that ng completely changed in v2 really put me off and I haven't looked at it since.
[1] - https://insights.stackoverflow.com/survey/2018#most-loved-dr...
In the end, it isn't the best choice for many things, but it's good enough for most things. As such, it's what I tend to reach for first, since getting something working takes less time, and gets in my way so much less. Windows, Mac, Linux via Node, Electron, Carlo (node + installed chrome), not to mention Cordova (iOS/Android) and React Native. Best of all, I don't have to deal with a lot of issues seen in other platform specific tools.
It's so much closer to write once, run everywhere with less friction than anything else that has been done in computing. Aside from trivial projects.
HA! maybe this is technically true, because in the end that's where it runs, but have you looked in your modules folder at any substantial project lately?
The dependencies run deep and they run wide...
Having someone like Google steward a "standard" library (and it could even be distributed using NPM), would pretty much bring JS dependency management at par and beyond Java or C#.
Why is that bad? It's a huge waste of effort, increases the burden on anyone who's maintaining a package using those micro-libraries, and will guarantee more unpatched security vulnerabilities and unmaintained packages in the long run.
I think a primary reason for this is that Javascript first was a language that was easy to hate because mistakes couldn't be fixed - "don't break the web" and all that. The community then found a way to improve it without breaking the web: add improvements with different syntax, and let your editor/build system/whatever use a linter to deprecate the old syntax from your personal codebase. It's greatly improved in that way and now easily holds a candle to other long-term popular languages.
2018 state of Haskell survey results:
https://taylor.fausak.me/2018/11/18/2018-state-of-haskell-su...
The standard looks great, and with some time some useful tools will probably arrive. But not right now.
For instance, apollo-link-rest would be a strong way to bootstrap into GraphQL for shops with heavy REST investments.
That said, Apollo aren't yet doing themselves favors with nearly every part of their tooling still showing a "Caution: Active Development" warning. That keeps them right on that cusp of "Should I use this in production?" worry for enterprise, and slows adoption probably more than they intend.
Yet what I see around me is enterprise customers on our projects adopting Angular as the official internal Framework, as React is seem as too advanced.
I think a lot is due to the unfortunate naming, people still confuse AngularJS (v1) with Angular (v2-v7). I totally believe a lot of folks will say "Used AngularJS (v1) won't use it again".
I had a friend (F) interview for a FE developer position. He was more of a React adopter and he spoke with the architect (A) of the team. The company was heavily invested into MS technologies (think a lot of WCF Services)
F: So, what technology stack are you moving into? A: We wanted to retain as much of our backend WCF stuff, while we move our front-end into Angular. F: So has there been a project that was started? A: Yes, we have started to move 8 of our enterprise apps to Angular. F: Any challenges so far? A: Well, the code seems to become a little too complicated for our developers to work on. We'd like to get it to a cleaner and more maintainable state. F: Have you considered other frameworks? A: Sadly, no. Company has invested more than 2 years in re-designing the app. And besides, Angular is backed by Google, hence, we seem to think that it will be the right tool for the business. We've invested a lot of time as well with it. F: But you are saying that productivity overall is low because the complexities of your Angular code base is taking a toll on your developers? A: Yes, in some sort of ways. There are Angular constructs which just does not make sense. And nipping the warnings and errors in the console is just a task that's too heavy and tedious. Although we like the fact that Angular can play nicely with our backend stuff with very minimal changes required on that side.
Practically, the architect was saying that the enterprise adopted Angular due to its immense popularity way back then and being heralded as an Enterprise framework.
Although my friend was offered a very good salary (by Canadian standards), he politely declined the offer, after inspection of some of the code base and the challenges that he would be facing.
Once enterprise chooses a tool, that tends to stay the tool for that project, then all of the team is competent in the tool after a couple of years working with it. There's a critical time-frame when new competing tools win a geographical majority [2].
[0] Link to facebook announcing Reach license changes: https://code.fb.com/web/relicensing-react-jest-flow-and-immu...
[1] Link to short article on MIT-Patents license in reack. Takeaway: This has never been litigated before https://hackernoon.com/4-lessons-from-the-react-patent-licen...
[2] Geographical majority http://www.businessdictionary.com/definition/geographic-mono... replace 'place' with 'technology tool'
(Which is often what you would expect of enterprise development: go with the solution "everybody else uses", whether or not everybody else enjoys using it. ;)
But it's not that hard to figure out based on comments, upvotes, stories on the front page, etc.
Consider it an educated guess from a relatively active HN member who's been here for 5 years :)
It feels like doing Haskell with JavaScript.
function MyComponent(props) { return <p>Hello {props.name}</p> }
import React from 'react';
export default ({name}) => <p>Hello {name}</p>;
So much nicer than Angular.It would be great if that was true. The fact is that you can not copy Haskell in any mainstream language (Lisp gets the closest), and that hurts.
React is easy the same way jQuery is. Easy, unstructured, foggy, too much permissive tool.
Far too easy to end-up with spaghetti-code.
I prefer not using it, Angular is far more organized.
// MyHello.jsx
import React from 'react';
export default ({name}) => <p>Hello {name}</p>;
Now do the same in Angular.But that is more of an issue for projects maintained for a long time. If you want to crank out small apps fast, your "example" is relevant, and React definitely is the better option.
But hey, most apps are simple, so no need for all the above. I would say Ng/Ember are more specialized / niche.
import React from 'React';
export default ({name}) => <p>Hello {name}</p>;
Now duplicate in Angular and tell me it's simpler.For real?
I personally think JavaScript is awesome.
I personally think jQuery is awesome.
And I feel really alone a lot of the time in these opinions. I see a lot of disdain for JS here in comments in particular.
I also see a lot of people browsing with JS disabled, and who complain when a site doesn't function without it.
Glad to see people don't adopt things only because they are hyped.
At the end you'll even hear questions like "So where do I add <insert hyped thing here>"
New JS dev's in the last few years have been under the idea that using whatever is hyped is cool... ignoring that it's not stable and you shouldn't probably use it in production.
Is it really the case? Both projects are watched and have quite big number of stars in github.
I have tried flow and liked it. I have used typescript in the past and I'm not crazy about it. Therefore I would like to get better understanding here. Is there anything I could read about it?
The survey can be a representative sample, without including your ̈́"circle of JS hackers". That's how surveys work.
I really wish more would migrate to Koa over Express, but I get it.
As to the JS Love, I think there's still plenty of hate around.
Unsure if the 2018 results are done?
https://blog.rust-lang.org/2017/09/05/Rust-2017-Survey-Resul...
Quite the opposite is happening from what I'm seeing. More people seem to move away from React towards Angular, but that's just my anecdotal observation.
ES6 is good, TypeScript is gaining ground, people are moving away from Flow.
Angular is dead? Most don't even want to touch it again ( Great ). Ember hasn't moved a bit in three years with a declining of interest. I am also surprised no one is using preact. The Choice is now either React or Vue.js, I think Vue.js 3.0 will continue to move vue forward.
Given the amount of hype with GraphQL, I am surprised only 20% are actually using it. And nearly 50% are using Redux!
Backend is dominated by Express only, and Testing framework doesn't have a clear winner either.
And my biggest surprise is how Javascript turned from one of the most hated programming language ( besides PHP ? ) into being acceptable and loved.
I really wish other languages communities do a similar survey, Python, PHP, Ruby, Java, Rust etc... It will be interesting to see the trend and big picture.