I’ve Turned into a Hipster
Posted: February 2nd, 2012 | Filed under: General, JavaScript | Tags: coffeescript, hipster, JavaScript, nodejs | Comments
I’ve seen a day I never thought would come: the day I turned into a hipster!
If you’ve been following this blog, you’ll have noticed that throughout 2011 I’ve been working more and more in Javascript, more specifically with Node.JS.
The last few months have been especially Node.JS-centric. During the day, I’ve been building architectural improvements into Jabbakam. Evenings and weekends, I’ve been hacking about on the Live Unsigned mobile site. All of my recent projects revolve around Node.JS, and I’ve been loving it. Node is incredibly interesting and powerful, and it is giving my brain a workout.
However, Javascript itself has a few niggly bits that become more problematic the larger the project gets. Issues with structure and maintainability of code motivate projects such as Joose and Backbone.js. One of the things that has been bugging me is having to hack in class-based inheritance. After a lot of experimentation, I settled on Prototypal Inheritance, which does the job to an extent, but left me dissatisfied .
So, the other day I finally broke down and tried CoffeeScript.
When CoffeeScript first came out I resolved never to bother with it. It is clearly for Ruby people who don’t quite understand Javascript. Since then it’s been getting a lot of press, and it now even has its own book!
Anyway, I was up the other night, waiting for my daughter to wake up in screaming pain as razor-sharp pieces of enamel slowly bored through her gums. With nothing better to do, I decided to play around with CoffeeScript.
I was up and running in no time, installing the Node.JS Module and browsing the Little Book of CoffeeScript. After about an hour I had effortlessly written some additions to Live Unsigned which integrated seamlessly. To be honest, I feel like a bit of a muppet for not trying it sooner.
After just a couple of days playing around with it, CoffeeScript has now become a major part of my toolkit. The syntax is elegant, nicely lending itself to clean coding, and code can be reused easily, improving project structure. CoffeeScript compiles to pretty clean Javascript, and from what I can make out, the better you understand Javascript, the better CoffeeScript you can write.
So yes, I am now coding in CoffeeScript.
I am now a hipster.
There is nothing left for me but to rush out, buy some skinny jeans and a Macbook Air and learn Vim.
Oh, God.
