How many users does it take to change a paradigm?

John O’Nolan recently asked Twitter whether people actually used LESS (or any CSS preprocessor) in anger. Despite it being the new hotness, it seems that most of his respondents didn’t. I can’t say that this surprised me, but it did make me think about where I use preprocessors like SASS or LESS, and CoffeeScript.

I’ve recently written about CoffeeScript (more on that soon), and have been using it exclusively on a Sencha Touch application I’ve been working on. I’ve been using SASS on the same project, and both languages are lovely to work with. CoffeeScript, in particular, strikes me as the way JavaScript wants to be: it’s as though the language itself has been refactored.

But the real star of this story is neither CoffeeScript, nor SASS. The star—which I will introduce circuitously—is most notable when absent. At FreeAgent, I don’t use CoffeeScript, despite thinking it the most wonderful thing since discovering git autocompletions. Poor Robbie still hand-codes all our CSS (yes, even the amazing gradients you’ll see when the redesign hits), despite being desperate to use some SASS macros to tidy all that up for a much more declarative experience.

Personal project? I’m all over CoffeeScript and SASS like a cheap suit. Actual day job? Don’t touch it.

Why? Politics? Processing power? Reluctance to learn new stuff? If you’ve met any of the FreeAgent team, or seen the kind of kit we develop on, you’re laughing at all of these suggestions.

Simple: the personal project is on Rails 3.1. FreeAgent isn’t, yet.

Rails 3.1 has an amazing asset pipeline system that means you write your JavaScript and CSS using any language you like, with CoffeeScript and SASS being the defaults, and Rails automatically does the compilation steps before rendering the page. Write CoffeeScript, reload page, done.

As soon as you move outside a framework that does that for you, using any of these timesaving technologies requires you to invent a workflow upfront. Do you use Compass? Run a compiler from the commandline? Set watches on key-files? Keep your source out of the public tree?

These things are tricky enough for developers, as you’ll know if you’ve ever tried to get CoffeeScript compiling on Windows, but when it’s time for a designer to dabble with SASS, and they’ve suddenly got to manage dependency lists, console input and source-compile relationships, the barrier is too high. Hell, engineers outnumber the designers five to one at FreeAgent, and we haven’t got around to using Sprockets to bring the asset pipeline to Rails 3 yet.

So, am I surprised that the uptake on these new technologies is low? No, not at all. Do I think they’re overhyped? Also, no, not at all. I think that JavaScript’s future looks a lot like CoffeeScript’s present: after all, there’s nothing stopping browsers from running CoffeeScript directly, and the same is true of LESS or SASS. At that point, the skills you pick up now from dabbling are going to be invaluable.

I think that Rails’s role in all of this is interesting, too. I’m biased, of course, but it does seem that Rails has proved to be a weathervane in the last 5 or 6 years, promoting the good path of RESTful, Test Driven development by making those things so accessible that you feel stupid not using them. That thinking has spread to other languages and frameworks, and I don’t think it’s unreasonable to predict the same things happening with CoffeeScript and SASS, now that they’re the defaults in Rails going forward.

Regardless, we’re all getting back to the stage where maintainability is far, far more important than raw development speed, and that’s where all of these technologies shine. So adoption is slow just now, and may remain so, but getting in early will put you well ahead of the competition by the time the workflows have stabilised.

Besides, both CoffeeScript and SASS put a lot of the fun back into this whole racket, and the fun technologies always win eventually.

3 Comments