Stop Writing AngularJS Directives!

I see it time and time again. A new developer comes to Angular. She wants to, say, display a list of things and a button that sorts them. So she asks her fellow—more Angular savvy—colleagues how on earth to do that. Write a directive, they say. Your logic…

Taming Gruntfiles

Every software project needs plumbing. If you write your code in JavaScript chances are you’re using Grunt [http://gruntjs.com/]. And if your project has been around long enough, chances are your Gruntfile is huge. Even though you write comments and indent properly, the configuration is starting to look…

Speeding Up Grunt Builds Using Watchify

Grunt [http://gruntjs.com/] is a great tool for automating boring tasks. Browserify [http://browserify.org/] is a magical bundler that allows you to requireyour modules, Node.js style, in your frontend code. One of the most useful plugins for grunt is grunt-contrib-watch [https://github.com/gruntjs/grunt-contrib-watch]. Simply put,…

Going Functional: Reduce

Reduce (a.k.a. foldl) is one of my all-time favorite higher-order functions. It’s kinda sorta thecrane stance [http://www.youtube.com/watch?v=pYE4fNQKTs4] of the functional style kung-fu: you don’t want to use it a lot but when you do it can save the day. Every…