The JavaScript blog.


community douglas-adams-reference about-fish-probably

The End

Posted on .

The End

I've decided to stop writing DailyJS. It's part of my weekday ritual, and so it's a difficult decision to make, but it's time to move on to other things.

I love writing regularly, but mistakes have started to creep in that mean it's difficult for me to publish articles with the level of confidence that I'd like.

There's been a small community of contributors that have made DailyJS great and encouraged me to keep going since 2009, and the readers have always been friendly and fun to talk to. Thank you!

During my hiatus from blogging I'm going to help finish Node.js in Action, Second Edition. I really want it to be a solid and broad introduction to Node, so I'm excited about working on it.

I'm going to do other technical writing. I'm not sure what exactly, but if you're interested in working with me then you can find me at alex_young on Twitter.

If anyone wants to take over DailyJS then please get in touch!



JavaScript: 2014 in Review

Posted on .

I can't keep up with the libraries that people send to DailyJS -- there are just too many! I've always felt like this is a good thing: it's a sign the community is creative and works hard to solve problems in interesting new ways.

It's hard to decide on a framework or library for a particular task: should you use Koa, Express, or Hapi on the server? Gulp or Grunt as a build system? Then there's client-side development, with its rich set of libraries. This year alone I've used React, Angular, Knockout, and Backbone.

One of the reasons there are so many Node modules is npm is so good. There's still room for improvement, and the npm blog has been useful for tracking new and upcoming changes to the package manager. It seems like more people than ever are using npm for client-side development as well, so it'll be interesting to see if Bower still occupies its niche in 2015.

Speaking of 2015, I expect to see more people using ES6 features. We've already seen several libraries that use generators to make synchronous-style APIs for client-side modules, and server-side databases. Generators seem hard to learn so it'll take a while for these APIs to catch on.

There's still scepticism and even irritation in the Node community about ES6 modules. We've spent years writing CommonJS modules and happen to like the syntax, so ES6 modules are a hard pill to swallow. There's a gist from 2013 about Node and ES6 modules that has comments from well-known Node programmers, and since then es6-module-loader by Guy Bedford has appeared. This library is a polyfill that provides System.import for loading ES6 modules. Guy wrote a great article, Practical Workflows for ES6 Modules with lots of details on ES6 modules from a Node programmer's perspective.

I don't think 2015 will see a big Node/ES6 module controversy, though. It seems like CommonJS modules are here to stay, and perhaps eventually we'll start using both formats.

Another potential controversy is the future of Node forks. io.js got a of initial attention, but it seems to have cooled off over the last fortnight. But I think forks are positive and I'm excited to see what people do with alternative takes on Node.

If you do anything in 2015, please make more libraries and frameworks. We don't want a totalitarian open source community, we want a big wonderful mess, because open source is an ongoing conversation with no truly right solutions.


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.


community node

Node Advisory Updates and Node Forks

Posted on .

As someone who works professionally with Node and writes about it regularly, I've naturally been following the discussions about Node forks and the Node advisory board. I've been collecting articles in Instapaper and highlighting things like crazy to figure out what's going on.

On Wednesday TJ Fontaine posted an advisory board update on the official Node blog. The board has had three meetings so far which you can follow on GitHub: nodejs-advisory-board/meetings.

The most recent minutes mention the ongoing discussions about the Node trademark:

The group will utilize Mongo, Eclipse, and Docker as examples projects to draw from. Agreed that there is no certification products and since there is no process to do that, there will be no certification for training or product compatibility. Project teams should be publishing the acceptance testing and organizations that want to test against the test suite and should be posting the results to the node.js repo

The advisory board have decided that the Node project should be run based on a consensus, rather than a dictatorship:

One thing that we all agree on, is that we're not going to be using the Benevolent Dictator model. In fact, recently the project hasn't been operating that way. We can be more clear about that in our documentation. We all agree we want a healthy and vibrant team, a team focused on making progress for Node.js, not for progress's sake, but for the betterment of the software project and the community we serve.

The goal of the team, especially that of the project lead, is to drive consensus and ensure accountability.

This is followed by a list that indicates how API changes will be handled in the future. Also, there is news about Node 0.12:

Finally, we are very close to releasing v0.12, there's only one major patch we're waiting to land. Once that's done we'll be releasing v0.11.15 as a release candidate.

StrongLoop's blog has a related post about their position on a major Node fork called io.js:

As it has been widely reported, last week a fork of Node went live called io.js. Io.js represents a technical exploration by key developers in the Node core community with the intent to accelerate the release of recent technical innovations, many of which were developed by StrongLoop developers.

At StrongLoop, we've always participated in leadership, advisory and technical efforts in the Node ecosystem when appropriate and will continue to do so. We actively play a role in the Node Advisory Board established by Joyent in October 2014.

Although this sounds like StrongLoop is endorsing Node for now, the author indicates that StrongLoop remains open to changes in the future:

We will continue to recommend the version that currently has the best community support, is most compatible with the tools and frameworks we develop and that we can support for our customers. Of course, our preference over time is to support a version that satisfies these requirements and adheres to an open governance model.

There's an article on Wired that quotes Mikeal Rogers citing Joyent's control as a reason for the fork:

"We don't want to have just one person who's appointed by a company making decisions," says Mikeal Rogers, a Node community organizer involved in the fork. "We want contributors to have more control, to seek consensus."

Of course other contributing factors must be the perceived slow progress of the 0.12 release. It's possible that io.js will exist as a novel fork that influences mainstream Node, or it could be like Chrome vs. previous less popular WebKit browsers. My advice is to follow both and avoid judging either too soon.


community mozilla

Why You Should Donate to Mozilla

Posted on .

Firefox donations

Recently Firefox prompted me to donate to Mozilla. The ad appeared on the Firefox Start Page, but you might not always see it -- sometimes there's a message that reads "Let the world know you #ChooseIndependent with Firefox." I switch between browsers for testing quite a lot, so I'm not particularly tied to one browser. However, that day I'd been using the latest Firefox and the Firefox Developer Edition, so I was in a good mood about Mozilla and decided to donate a few dollars.

I happen to think that you should donate as well, and here's why. The Mozilla Foundation has been involved with some projects that have been immensely useful and powerful: Firefox, PDF.js (Mozilla Labs), asm.js, and Rust spring to mind. Take a look at the Mozilla Research Projects list for more.

Something that JavaScript developers can't live without is the Mozilla Developer Network documentation. I almost felt like I was donating to support that site alone!

Like you I also use Chrome, and I actually like Google's email indexing and Google Now -- the way it shows delivery information for recent purchases is awesome. So I'm not pro-Firefox due to any privacy issues. And Safari is totally gorgeous on Yosemite. It definitely feels like Firefox's competition is strong, and the mainstream technology press is down on Firefox. The last few releases have felt as fast as Chrome though, and the UI is evolving to something clean and minimalist that I like.

I think Mozilla does a lot for us JavaScript developers. If you'd like to donate, go to sendto.mozilla.org. There's also a FAQ about donations. You can now even donate bitcoin!