magpiebrain
Speaking at qcon San Francisco
I’ll be speaking at qcon San Francisco on the 20th of November. Navigating The Rapids: Real-world Lessons in Adopting Agile will be a typically rambling affair, drawing on a multitude of war stories from the many projects I’ve work on at ThoughtWorks. Qcon is an invite only conference, so thanks go to Steve Freeman for inviting me to talk as part of his Technical Skills For Agile Development track.
A Build Radiator for CCTray Feeds
I spend most of my time working in team areas with other devs, as part of a team who check in frequently and who always use a Continuous Integration tool. When the build is broken, it’s a problem. Typically, a big problem - it should be the top priority of any team to fix a broken build.
The problem is that all of the tools out there provide web interfaces that work well on a desktop, but are rubbish as an information radiators. Information radiators sit in the corner of the room, often several meters away.
Big Visible Wall is a scala webserver which displays the status of one or more cctray feeds. It uses an embedded jetty server. Consider it a software appliance. cctray feeds are supported by multiple different tools, so it seemed like a good choice. It’s been tested with Cruise and Hudson, but should work with anything that serves up cctray.
Grab the distro and let me know if it works for you.
The Lego XP Game at Skillsmatter
This is truly awful. A while back I did a run though of the Lego XP Game for Skillsmatter. I developed the game a few years ago with colleagues help by way of a training excercise. The game isn’t awful - I actually enjoy running it, and I get a kick knowing how many of my coworkers have run the game for internal and external purposes.
No - the thing that is awful - truly, mind-bendingly awful - is that someone filmed it. More specifically, they filmed me.
Just try to bear in mind three things:
- I forgot I was supposed to run the session until that morning
- As a result of 1. above, I didn’t have enough lego
- I look better in person1
Anyway, all 80-odd glorius minutes are on the Skillsmatter website.
Typically I run the game over a 2 1/2 - 3 hour period, so this session was rather truncated. So be kind :-)
1 - OK, that might be a lie
Using Scala pattern matching to implement a URL handler
I’ve been playing around with using Scala’s pattern matching support to create a URL handler for use with an embedded Jetty server. This little code snippet creates a Jetty handler that can not only match URLs, but even extract parts of the URL and pass it into the block
protected class SomeHandler extends AbstractHandler {
override def handle(target: String, request: HttpServletRequest, response: HttpServletResponse) = {
response.setContentType("text/html");
val HomePage = "/"
val StaticResources = new Regex("""/static/(.*)""")
target match {
case HomePage => {
ok(response, "Hello!")
}
case StaticResources(resource) => {
ok(response, "You asked for resource " + resource)
}
case _ => {
notFound(response, "Not Found")
}
}
(request.asInstanceOf[Request]).setHandled(true);
}
}
The ok, notFound methods simply write the String out to the response stream with the right HTTP code.
The StaticResources regex pulls out everything after the /static/ root. It would be easy to imagine some kind of regex which pulled out the year, month and day from a URL - for example:
val EntriesOnDay = new Regex("""/posts/(\d+)/(\d+)/(\d+)""")
...
target match {
case EntriesOnDay(year, month, day) => {
// use year, month, day etc to pull back posts or whatever
}
}
I have just recieved an IOU from the state of Califonia. Some people claim the govenment owes them money - in my case it’s true.



