The JavaScript blog.


community surveys

JavaScript Developer Survey 2014: Results

Posted on .

The JavaScript Developer Survey has now closed. As always the results are available to the community for further analysis:

Browser-based developers are still the majority.

97% of readers write client-side code, while 56% said they write server-side code. Last year server-side development was at 28%. I'd like to think that the interest and adoption of technologies like Node will contribute to the direction of ECMAScript, because some proposals seem to go against the strides that have already been made in the Node community (the module system, for example).

The DailyJS readership is very experienced (27% said 5-10 years), so perhaps I should do more to cover advanced topics?

78% of readers said they don't use a language that compiles to JavaScript -- both this year and last year. I've written more about technologies like TypeScript this year, partly because I respect that project in particular, but Dart is also compelling. However, Dart was one of the least popular compile-to languages (1%). TypeScript is more popular (5%), but CoffeeScript is still the most popular (16%).

It turns out most people like semi-colons. I think they're going to stick around in the JavaScript community because they're used in so many other languages, but it's always possible that styles will change over time. According to the survey results, the stylistic choices are actually similar to some of the more popular JavaScript style guides.

ES6 features are getting popular: 24% said they use ES6. I suspect that more people actually do use them, because 'use strict' is something I've seen in lots of JavaScript best practice articles. Also, Node frameworks like Koa use cool features like generators quite well, so I think this figure will grow over the next year.

Testing: 29% said they write tests. I was interested to see that PhantomJS is a very popular test environment (38%). I've mentioned many times on DailyJS that I struggle a little bit when it comes to this type of testing, because the tests seem to become brittle and break over time. However, the number of people that use PhantomJS is close to Node, so presumably most people have found a way to make it work well enough.

Jasmine and Mocha are still the most popular test frameworks, and Karma is gaining on them now as well.

61% use JSHint for static analysis. That's 2608 people, which surprised me because I don't often use a linter. I think it might be down to people verifying open source client-side JavaScript, but it would be interesting to find out exactly why people are motivated to lint JavaScript.

Gulp (35%) is already almost as popular as Grunt (47%). It's amazing how quickly Gulp has been adopted, although I've found I can understand Gulp more readily than Grunt scripts.

When it comes to client-side dependencies, CommonJS with Browserify is at 20%, with plain old files at 30%. I think that's interesting because Browserify is my preferred solution, but I often use plain old files because I'm working on a legacy project where Browserify is a luxury we don't have time for.

AngularJS is strangely popular (49%). I've noticed that many in the JavaScript community regard React (16%) as the latest hot framework and see it as an alternative to Angular, but they do different things so I prefer to use the appropriate tool for each project. Meteor is a lot less popular than the hype had me believe (6%), but it's possible that DailyJS readers don't like Meteor. It's worth noting that Backbone.js is popular, with 31%.

SublimeText won the editor wars, although a fair few readers use IDEs like IntelliJ and Visual Studio.

The most popular minimum IE is IE 9. I find that's interesting because I still get asked to support 8 for corporate networks that can't seem to untangle themselves from web-based legacy software (do any readers use ADP for example?)

Here are the top "other" programming languages:

  1. PHP
  2. Java
  3. C#/.NET

I still find it strange that PHP is so popular, although it's 6 on the TIOBE index, and this is primarily a web development blog after all.

Thanks to everyone who took part in the survey! If you'd like me to run another rather than waiting for a whole year, then get in touch with your ideas.


libraries surveys modules assert

Survey Closed, Predicates, Shackles

Posted on .

Survey Closed

The JavaScript Developer Survey 2014 has now closed. I received some updates for the survey to the GitHub repository, so you should see those the next time I run it. Thanks for the contributions!

I'll work on writing up the results and post again when they're ready.


Predicates (GitHub: wookieb/predicates, License: MIT, npm: predicates) by Łukasz Kużyński is a set of tools for type checking and assertions. For example:

var is = require('predicates');

is.string(1); // false  
is.string('test'); // true  
is.undefinedOr(is.string, undefined); // true  

Assertions look like this:

var assertName = createAssert(is.string, 'Name must be a string');

var Person = function(name, surname, age) {  

new Person('Tom', 'Welling', 33); // OK!  

The Predicates API guide has a list of each available method, and there's also an interesting API design document that provides some background to the project.


Shackles (GitHub: metaraine/shackles, License: ISC, npm: shackles) by Raine Lourie is a module for adding chaining to another library. Imagine if Underscore didn't support chaining. You could use Shackles to create a fluent API, like this:

var chain = shackles(_);

var result = chain([1,2,3])  
  .map(function (x) { return x*x })
  .filter(function (x) { return x > 2 })
  .value(); // [4,9]

You can insert values at any point in the chain with tap, and there's also a log method that prints values with console. Logging can be overridden as well.


community surveys

JavaScript Developer Survey 2014

Posted on .

Here is the JavaScript Developer Survey for 2014! You have two weeks from now to complete the survey (the 15th of December).

I asked for help with the questions last year, and collected pull requests and issues to improve the survey. You can view the survey repository at alexyoung/dailyjs-survey. Many thanks to everyone who has helped so far.

Please fill out the survey and share it with your fellow JavaScript programmers! I make sure the data is open so it's not just used for planning DailyJS content, you can use it as well.

Here's the survey link again: JavaScript Developer Survey for 2014

The survey is now closed.


community surveys

JavaScript Developer Survey 2013: Results

Posted on .

The JavaScript Developer Survey has now closed. As always the results are available to the community for further analysis:

Most people write client-side code.

51% of readers write client-side code, while 28% said they write server-side code. Last year client-side was at 98%, so I imagine this is partly due to a changing audience on DailyJS, but it's interesting how strong server-side development is becoming.

Where do you write JavaScript? 54% said "at work", and 45% said "side projects". This is probably a case of people doing both -- I find it's common for programmers to be both hobbyists and professionals.

The majority of readers have been writing JavaScript for three to five years (34%). I can't help but feel this is thanks to the growth of Node -- people rediscovering JavaScript after using other languages for server-side web development, or the growth of client-side frameworks like AngularJS and Backbone.js. I can't imagine doing design without some JavaScript skills.

78% of readers said they don't use a language that compiles to JavaScript. I've noticed some of the influential members of the Node community are vocal about these languages, so it seems like our readers agree. I try to keep some coverage of these languages on the blog, but in general the focus is on JavaScript.

CoffeeScript was the most popular "compile-to" language (64%), and TypeScript was up from last year to 19%.

The style question caused much confusion. Semicolons, commas at the end, and methods with one space were popular options. It's interesting to see 9% using tabs and 11% using spaces. Unlike some languages, JavaScript can survive a little bit of variance in tab size, so I'm not too bothered either way. Client-side veterans seem to use four spaces, though, and 8% of respondents selected this option.

The results for testing amused me:

  • Yes: 25%
  • No: 26%
  • Sometimes / Not enough / Not too much / When needed: 50%

I like your honesty. "Not enough" could be just modesty, so I'm going to read this as "a lot of readers write tests but think they could be doing better".

Jasmine is hugely popular, with 30%. I still think tap is the best approach, but it only received 2% of your clicks. Mocha's doing well with 27%, and QUnit is down to 16%. I think this is more evidence of a large number of Node developers doing the survey, but it could also be the fact that people see Mocha as a browser/Node module, and QUnit as something just for jQuery (which it isn't really).

CI servers? 36% said yes. Node is definitely CI server friendly -- I've recently been setting up a TeamCity server for Objective-C projects and it's surprisingly hard work. Compared to switching on Travis CI for an open source Node project it's a joke. However, Jenkins is the most popular CI server (44%), and TeamCity got 13%, so perhaps people find it easy to slot client-side or Node tests into an existing CI server in companies that use multiple languages.

AMD is extremely popular.

It turns out people like AMD! However, if we break down the stats for CommonJS, we see 17% using CommonJS and 12% using Browserify. For a long time I advocated CommonJS, but substack's Browserify argument is convincing...

Grunt is winning at build scripts (60%). Fortunately, "npm scripts" had a good response (17%), which is encouraging because I feel like lots of tasks are simple enough to work that way, rather than needing a confusing 200 line Gruntfile.

I was surprised to see AngularJS and Backbone.js both get 25% for client-side frameworks. They have mindshare, but I can't help but feel they solve very different problems.

The common wisdom seems to be IE support should start at IE 8 (37%). I'm going to guess that's to support corporates, which has been the bane of my web development existence for over a decade now.

Do you use ES6 features? 85% said "No", so you're OK if you don't. I probably only do to write DailyJS articles, but we'll see this start to grow over the next year.

PHP is the most popular primary development language (24%), and C# got 17%. Hello .Net folks!

Thanks to everyone who took part in the survey! If you can use the data for something cool, I'd love to hear about it.


community surveys

JavaScript Developer Survey 2013

Posted on .

Here is the JavaScript Developer Survey for 2013! You have two weeks from now to complete the survey (the 12th of December).

I asked for help with the questions last week, and the response was incredible! I really appreciate the suggestions, and I've made a list of the pull requests that I accepted. Any that weren't accepted were either due to a clash with another suggestion, or lack of time on my part.