Live data from Hacker News

The State of JavaScript – Survey results

stateofjs.com

81–90 of 357 posts

Re: The State of JavaScript – Survey results

#81
post #77

Earlier quoted context omitted.

Not really. Relay is mostly designed around querying a backend data store, not updating/managing client-side state.

Relay v2 will bring with it a way to manage client side state.

Interesting. I didn't know that.

If anything, that actually somewhat affirms my preference for Apollo. Since Apollo is built on top of Redux, you can use both in tandem without any problem instead of having to learn a whole new tool and refactor your application to use it.

Re: The State of JavaScript – Survey results

#82

I wish to register my complaint with the term "ES6" which has always been unofficial and refers to the official standard "EMCAScript2015".

Same. ECMA changed to using dates a while ago and people are still saying "ES6" and "ES7". I've also seen people refer to all new syntax and features as "ES6" including things that in ECMAScript2017. Honestly though I think ECMA has some of the blame for this. I don't think they do a very good job communicating changes and versioning.

Yeah I think there is just a lot of friction when moving from the concise "ES6" to the lengthy, and somewhat awkward "ECMAScript2015". The fact that so many people still use the terms ES6 and ES7 gives others even less incentive to use the official naming scheme. Hopefully, it will iron itself out in the future.

Re: The State of JavaScript – Survey results

#83

I would respect the JavaScript so much more if there wasn't so much faddishness - somehow JS devs have decided switch statements are bad, indenting with 2 spaces is the only way to go, semi-colons should be banished and "boilerplate" code should be hidden in libraries the magically wipe it away so your code looks "clean," if barely understandable without reading through a bunch of libs. Edit: forgot to add that these…

> somehow JS devs have decided switch statements are bad

Nonsense. Though sometimes using an object can look cleaner depending on your use case.

> indenting with 2 spaces is the only way to go

I love 4 spaces and I use 4 in my JavaScript projects. Just because you've seen some subset of people use 2 doesn't mean it's the majority, what you have to use, etc.

> semi-colons should be banished

Absolutely, positively NO. Semi-colons are a requirement of the language. Some people elide them, incorrectly, because the JavaScript engines are good enough to still handle it. In my experience being playing a limited part in open source JavaScript eliding the semi colon seems to be a rarely done practice.

Regardless it's incorrect no matter how you slice it.

> "boilerplate" code should be hidden in libraries the magically wipe it away so your code looks "clean,"

This sounds more like a rails-ism than a JavaScript-ism. Though you'd be hard pressed to find libraries without implicit behaviors in every language. Some people take DRY way too far.

This point just seems more anecdotal than anything else.

> a make file. Who has time to wade through umpteen million build systems?

A lot of JavaScript devs use make. Nothing wrong with that.

Re: The State of JavaScript – Survey results

#84

I would respect the JavaScript so much more if there wasn't so much faddishness - somehow JS devs have decided switch statements are bad, indenting with 2 spaces is the only way to go, semi-colons should be banished and "boilerplate" code should be hidden in libraries the magically wipe it away so your code looks "clean," if barely understandable without reading through a bunch of libs. Edit: forgot to add that these…

> somehow JS devs have decided switch statements are bad Nonsense. Though sometimes using an object can look cleaner depending on your use case. > indenting with 2 spaces is the only way to go I love 4 spaces and I use 4 in my JavaScript projects. Just because you've seen some subset of people use 2 doesn't mean it's the majority, what you have to use, etc. > semi-colons should be banished Absolutely, positively NO.…

I'm heartened by your comment. I'm glad to be wrong on this.

Re: The State of JavaScript – Survey results

#85
post #64

For the life of me I can't understand why webpack has become the de facto build tool. It's so much more complex than anything else I've tried. I understand it's supposed to be faster, but still, I wouldn't bother with it until your build times actually start to become a nuisance.

I switched from browserify to webpack when I started writing ES6 on the client because the browserify build times with ES6 were slow enough that they felt disruptive to my workflow (somewhere between 10-30 seconds, I don't remember the exact amount). I'm not sure if that's improved now for Browserify, but it's the kind of thing that you're not likely to switch back from once you have a working setup.

Re: The State of JavaScript – Survey results

#86

It's nice to see some love for Apollo here. It's leagues better than Relay and has definitely been the biggest boon to my development stack in a while. That being said, the article should make it clearer that Apollo is perfectly usable just as a frontend client—you don't have to adopt the backend at all. The Meteor team really deserves commendations for learning from some of the mistakes in building Meteor. Apollo sp…

Respectfully disagree--I like Relay better. And Relay 2 is including client-side state, so you don't need Redux.

It has a steep learning curve and some initial setup overhead; but from a long-range perspective--I think it will have better performance and code comprehensibility. Maybe Apollo is better suited for freelancers though.

Re: The State of JavaScript – Survey results

#87

Earlier quoted context omitted.

Could it be that you are still just new to it (in the grand scheme of things)? Because all of those things sound very similar to the complaints I hear from web developers on their first foray into desktop development. There are so many tools it's impossible to know them all (or to even know which one is best to use in which situation), so much legacy code out there it's tough to learn what the "right" way to do thing…

See, I'm not sure that's the case. When I started writing apps using Cocoa, for example, I had a pretty good experience. Yeah, I fought some of the tooling that I wasn't really used to, but given that it was quite different from my backgrounds in web and embedded development, I was overall quite pleased with how easy and more importantly how obvious everything was. I found this to be the same when I wrote application…

IMO, the problem is looking at Javascript as a single unified thing. One thing I came away with from this survey is that there are two major competing "stacks" at the moment- the Typescript/Angular stack and the Webpack/Babel/React stack.

Personally, I've been focusing the majority of my "professional research time" in keeping up with the latter stack, and it's ended up paying off in the sense that it's almost trivial to spin up a new project at this point.

> Every tool seems to be broken into 200 different parts that subsequently have to be reassembled in order to implement a working pipeline.

I agree that this can be frustrating. Setting up a new Webpack/Babel/React project does tend to involve installing a bunch of different plugins, presets, and loaders. The way I learned this stuff it was by focusing on one thing at a time: set Webpack up to bundle my Javascript modules. Okay, cool, I fully understand that thing. Okay, now let's add Babel, with the ES6 preset. Alright, rad- now what about CSS?

> But as it has developed as an application platform, it feels more and more like I am fighting the tools, rather than having them help me. That's not a nice feeling.

I absolutely promise that I'm being earnest, NOT snarky, when I say that it sounds like you need to learn the tools more thoroughly. Personally, I tend to forget how much of a pain it was to learn other ecosystems, and so I sometimes get frustrated because it feels like learning a new ecosystem should be easy. And, yes, other ecosystems definitely have an easier learning curve. That said, I'm right there with you when it comes to testing frameworks. Oh god, testing frameworks. -_-;

A major part of the problem, I think, is that the current Javascript ecosystems spend a lot of time optimizing their tutorials and documentation for newbies and junior developers. I'll admit that I think it's a categorically Good Thing to have that, but many's the time I've wished for intermediate-level docs. The absolute best examples of this, in my opinion, are the Rails guides, the Rails API documentation, and the Elixir documentation (all of it).

> I was overall quite pleased with how easy and more importantly how obvious everything was. I found this to be the same when I wrote applications in Qt, and also when starting to work with newer languages (like Go).

Can you go into a little more detail on this? I'm genuinely interested in the details of what these languages got right.

Re: The State of JavaScript – Survey results

#88

It's nice to see some love for Apollo here. It's leagues better than Relay and has definitely been the biggest boon to my development stack in a while. That being said, the article should make it clearer that Apollo is perfectly usable just as a frontend client—you don't have to adopt the backend at all. The Meteor team really deserves commendations for learning from some of the mistakes in building Meteor. Apollo sp…

What part does Graphene play (assuming you mean https://github.com/graphql-python/graphene). Are you building graphql based apis rather than rest ones?

Re: The State of JavaScript – Survey results

#89
>Overall, developers are not happy about JavaScript testing.

This is because of the low percentage of devs in the survey who have used Jest. I can't begin to describe the joy of finally finding a JS test utility that just works and doesn't require a giant configuration file.

If you aren't using Jest, make the switch now! It's likely a lot of your existing tests will work with Jest.

Re: The State of JavaScript – Survey results

#90

I apologize if the predictability of this comment, but I just want to say, I recently started a new gig at a company that has undergone a full on embrace of Javascript for tooling and server side projects and it boggles my mind how much productivity is wasted on this ecosystem. There is an interesting amount of energy put into making asynchronous code read synchronously in situations where asynchronous code provides…

> There is an interesting amount of energy put into making asynchronous code read synchronously in situations where asynchronous code provides no benefit. I see many new / intermediate people trying to do this. They want to make everything asynchronous when it does make sense to. You want asynchronous when you're accessing an external resources or for something low running (in which case yields / multiple asynchronou…

The problem with frontend is that making code synchronous blocks the client—even if it's something that "should be" synchronous. If it's anything more complex than a loop or a map through an array, it's recommended you make it async.
Post reply on HN