Wednesday, 15 September 2010

JavaScript and so on.

I took a few days off from coding. I managed to run a half marathon and took the children up a welsh mountain on the same day. Ok partially up a small one and I have been suffering ever since, I then spent some time chilling and building up my energy for the next couple of weeks of iterations of the synth app.

For once this entry is not about the gradually growing synth app. It is about clojure and javascript.

A bit of background to give you some context for my thoughts. A couple of weeks ago I decided to focus on making a web based synth app. To do this I decided to dive into GWT and the google app-engine.

As I am thinking on this as a little start up experiment that I intend to develop for an extended period rather than hack at it for a few weeks I knew I needed a way to handle my distractions. I have a tendency to enjoy fiddling with technology and I did not want this to get in the way of the synth development.

I decided the best course of action was to allow a small amount of time to fiddle with other stuff. This would usually be done over lunch hours or during evenings when my brain is not up to deep thought.

Enough background stuff. After watching the 1984 lisp videos on youtube (Structure and interpretation of computer programs) and thinking wow that are great I decided to have another go at learning a lisp language. I started with scheme but in the end decided I liked the deployment prospects of the JVM better and switched to clojure. I enjoyed clojure but was a little put off by the lack of a good path to get my code working on Android. I was also finding clojure quite a departure from scheme. I found it a little big, for want of a better word, and because I was spending an hour here and there playing with it I was struggling to get fluent in it. Basically I needed to devote a reasonable amount of time to get over the learning curve and that was not something I wanted to commit too.

Enter javascript. Before clojure I toyed with JavaScript. Watched a few videos and then got put off and the videos all seemed to talk about avoiding the bad bits. Not a great way to sell a language to someone. Howerver in my synth project I had to use some javascript (to support the canvas element in gwt) and found it to not be that bad. I am no expert on it but it feels quite a small language and when combined with the canvas element a good language for messing around it. It has lambda which is a requirement for a mess around language and the prototype style of OO is starting to make sense.

Of course deployment of javascript is pretty easy. Just make a webpage! It does of course have issues but none that I should hit with "figuring stuff out" code I want to write with it.

So now you know the reason why you might get some Javascript related posts on this blog and not too many clojure ones from now on.

No comments:

Post a Comment