Skip to content

What’s that blocky green logo?

2012 January 31
by Richard Harrington

A few weeks ago I went to a tech Meetup in Soho at the offices of Cyrus Innovations, hosted by a guy who works there named David Newell.

I’ve been going to a lot of Meetups lately. This one was on CoffeeScript, a clever little language (and ‘little’ is a word that it proudly uses to describe itself) which compiles down to JavaScript. It’s basically syntactic sugar on top of JavaScript.

As far as I can tell, Coffeescript has two main purposes:

  1. The creators have tried to eliminate most of the pitfalls that can trip up the unwary JavaScript programmer by simply not including the worst aspects of that language. (I’m not impugning the abilities of Javascript’s creator here, who apparently he had 10 days (!?) to create the whole thing — more on that in a later post.) And
  2. To add a bunch of syntactic sugar (comprehensions, splats, etc.) to make it look more like python or ruby. Thus also having the secondary effect of making it a lot shorter to write.

We were there all day for what David called a ‘code retreat.’ With my primitive Unix skills, I had just barely managed to install CoffeeScript on my laptop, a feat which first involved installing Node.js, the technology all the kids are talking about these days but only the lucky few actually know. By the time I got done I had about an hour to go over a tutorial, so that was the extent of my Coffeescript knowledge.

I’m not sure what I expected but we all got thrown into working in pairs creating implementations of Conway’s Game of Life (wikipedia that shit) in CoffeeScript. 45 minutes for each pair, then you ERASE all the code you’ve been working on (which was super-painful), come back to the group to discuss it, pair off with someone else and do it all over again, all day. David says that every time he needs to learn a new programming language, he makes the Game of Life. We didn’t ever get very far, but that wasn’t the point. The idea was to keep refining the way you thought about the problem.

It was an interesting experience. David was a very nice guy and did a great job running it, and I learned quite a bit about the concepts behind test driven development, which I’d also never had any experience with.

The verdict is still out on CoffeeScript. I basically like it, but I’m not swayed by it being shorter to write than JavaScript, as I work out code in my head a lot slower than I can type. If that ever changes, I’ll be jumping on the CoffeeScript bandwagon. In the meantime, I’m glad I have enough of a surface familiarity with CoffeeScript now so that if I ever had to learn it, I know how long it would take me to do so.

Well, that about wraps it up for today. Oh but wait, you ask, what about the logo? Well, when I got home the night after the Meetup, I sat down and wrote an implementation of the Game of Life in good old JavaScript. It can be found here. The shapes in the logo are the four forms of a moving pattern in the Game of Life known as the ‘glider’ (one form is repeated in the logo). Again, wikipedia that shit.

Leave a Reply

Note: You may use basic HTML in your comments. Your email address will not be published.

Subscribe to this comment feed via RSS