I stumbled across a gem of an online service called Codewars when reading an article about coding as often as possible to keep those coding skills up to date. Codewars works very much in a Martial Arts/Kata system, whereby you start as a Kyu and work your way up to being a Dan. I recommend the JavaScript developers give it a try, as my experience with the site has been great. There is also CoffeeScript and Ruby language support too.

Announcing generator-angular-require

I’m proud to announce the release of my first Yeoman generator, designed specifically to scaffold out and enforce a degree of rigour when working with AngularJS projects that use RequireJS for module loading.

When creating a project using yo angular-require in your terminal/command prompt and answering the few questions you are presented with, a scaffolded, AMD-based AngularJS project is created, with the RequireJS configuration tokenised appropriately. Also included are sub-generators for creating new routes, views, directives, services, and so on. These ensure that the AMD JavaScript pattern is used throughout and the project has a predictable structure. Of course you are free to fork the project on GitHub and tailor it to work for you if that’s what you need!

How to install

Assuming you’ve node and Yeoman installed, type the following to install generator-angular-require (you may need to run this as an administrator/root):

npm install -g generator-angular-require

How to run generator-angular-require

Running the generator is easy. Create the directory in which you wish to place your web application and navigate to it in your terminal/command prompt. Then, issue the following command, substituting <APP_NAME> for the name of your project:

yo angular-require <APP_NAME>

You’ll find a directory and file setup that includes your app scaffolded, and importantly a Gruntfile. Grunt is used as the typical build tool in Yeoman applications at present. Issue the following to build your new project:


That’s it to build your project. Grunt will take care of linting, image optimisation, running the ngmin tool against your AngularJS code, minification and a whole heap of useful goodness. When that is done, issue the following to server up your app and watch for file changes so that they can be seen instantly:

grunt serve

You’ll find a browser window will open with your application proudly displayed. Try changing a file, and upon saving you’ll notice the changes are reflected right there in the browser. Superb!

What is Yeoman?

Taken from the Yeoman homepage: “The web’s scaffolding tool for modern web apps”. Put simply, it automates web application project creation in accordance with industry best practices. Grunt is then used as the means in which to automate as much as possible the build of your project. Finally, Bower is used to provide web package management. Read more about Yeoman on the home page.

And finally

Check out the project on GitHub (where incidentally you can raise issues or enhancement requests). I’m happy to answer questions on GitHub or by email. There’s also the project page on NPM for those you are interested.

2013: A (very) brief review

As each year draws to a close, I’m often contemplating new years resolutions for the next, which end up as fireworks of ideas going exploding in my mind, which seems fitting given the fan-fare of the fireworks that are used to bring in each year. Coming up with resolutions for the next year often cause one to be reflective of how the past year has gone.

2013 was the year in which me and my fiancee purchased out first home together, and moved our family in. We found out that Isla, our daughter, was to be graced with a brother or sister on the 29th of December. This day has passed, and now baby Allport will definitely be meeting us in January of 2014. Isla turned one in 2013, which goes to show just how quickly time passes. I guess that was the main motivation for my resolutions, which I’ll jot down when I’ve come up with a manageable list I’m happy with!

A brief timeline of my year:

  • January: I got a new job, working with web technologies I love and being given the freedom to explore new ideas. I’m respected by my peers and I’m responsible for setting technical direction.
  • March: Me and Bec have been together for 2 years.
  • April: We discovered we were expecting again.
  • August: I turned 29.
  • November: We purchased our first home together.

I wish everyone a happy new year, and hope that 2014 brings you success.