In a previous post, I showed how we could use Clojure and specifically Incanter to process access logs to graph hits on our site. Now, we’re going to adapt our solution to allow us to to show the number of unique users over time. We’re going to change the previous solution to pull out the [...]
Categories: DevOps,clojure
Tagged: clojure, devops, incanter
- Published:
- August 16, 2010 – 8:02 pm
- Author:
- By Sam Newman
Continuing in a re-occurring series of posts showing my limited understanding of Clojure, today we’re using Clojure for log processing. This example is culled from some work I’m doing right now in the day job – we needed to extract usage information to better understand how the system is performing. The Problem We have an [...]
Categories: DevOps,clojure
Tagged: clojure, devops, incanter
- Published:
- August 15, 2010 – 7:10 pm
- Author:
- By Sam Newman
In the spirit of making my mistakes in public – something which I have a long history of on this blog – I thought I’d post up a solution I came up with for a relatively simple problem. I’m not unhappy with the solution – it works – but I can’t help thinking I’m missing [...]
Categories: clojure
- Published:
- August 10, 2010 – 10:11 pm
- Author:
- By Sam Newman
As part of the day job at ThoughtWorks, I’m involved with training courses we run in partnership with Amazon, giving people an overview of the AWS service offerings. One of the things we cover that can often cause some confusion is the different types of images – specifically the difference between S3 and EBS-backed images. [...]
Categories: AWS,Cloud Computing,DevOps
Tagged: EBS S3
- Published:
- July 19, 2010 – 9:09 pm
- Author:
- By Sam Newman
Updated to reflect some feedback and one example of using commons-exec as an alternative to the plain old Runtime.exec Second Update to reflect use of shell-out – thanks Scott! Basic Making use of clojure.contrib.duck-streams: (ns utils (:use clojure.contrib.duck-streams)) (defn execute [command] (let [process (.exec (Runtime/getRuntime) command)] (if (= 0 (.waitFor process)) (read-lines (.getInputStream process)) (read-lines [...]
Categories: clojure
- Published:
- June 20, 2010 – 12:34 pm
- Author:
- By Sam Newman
I’ve been playing around with partially applied functions in Clojure, and have hit an interesting snag when dealing with Java interop. First, lets examine what partial does in Clojure, by cribbing off an example from Stuart Halloway’s Programming Clojure: user=> (defn add [one two] (+ one two)) #’user/add user=> (add 1 2) 3 user=> (def [...]
Categories: clojure
- Published:
- June 19, 2010 – 8:00 pm
- Author:
- By Sam Newman
Posted in the “I hope no-one else has to go through this” category in the hope that Google surfaces this for some other poor soul. Picture a rather trivial split function: (defn split [str delimiter] ((seq (.split str delimiter)))) Which helpfully spits out: java.lang.ClassCastException: clojure.lang.ArraySeq cannot be cast to clojure.lang.IFn The issue here is the [...]
Categories: clojure
- Published:
- June 13, 2010 – 7:13 pm
- Author:
- By Sam Newman
A friend of mine is suffering from a nasty, progressive condition called Motor Neurone Disease. There are many forms, all of which share the common trait of affecting the motor neurons which control walking, speaking, breathing and general movement. In the US it is often called ALS or Lou Gehrig’s disease. Prognosis varies, but the [...]
Categories: Uncategorized
- Published:
- March 16, 2010 – 11:43 am
- Author:
- By Sam Newman
The talk I did at QCon SF 2009 is now available at infoq. Only an MP3 download is available, otherwise you’ll have to stream it from the site – but you’ll be missing a lot, as the slides are better than hearing me drone on.
Categories: Agile,presentations
Tagged: presentations, qcon, qconsf, video
- Published:
- March 12, 2010 – 10:40 am
- Author:
- By Sam Newman
At a recent ThoughtWorks techy meetup, we recorded a couple of videos for internal use. One of them involved someone speaking to slides. The problem was that we had no projector, and our flip camera wasn’t really up to doing a great job of filming the screen. So the problem I was faced with was [...]
Categories: howto
Tagged: garageband, handbrake, imovie, keynote, osx, screencast, video
- Published:
- February 27, 2010 – 3:28 pm
- Author:
- By Sam Newman