A Single Programmer's Blog

Puppet Debugging: --noop

in
Auteur: 
François Beausoleil

I do more and more Puppet, and I really like it. It’s a simple way to declare the desired state of the world. As I do more and more with Puppet, I needed to debug my manifests: check that they were doing the expected thing. I was looking for some kind of dry run option, similar to apt-get‘s or other tools, but puppet help apply didn’t provide any helpful hints. Until I stumbled upon Puppet dry run.

Scala Case Classes and State Machines Using Akka Actors

in
Auteur: 
François Beausoleil

At Seevibes we use the Twitter Streaming API to harvest what people say about television shows. The Twitter Streaming API docs state that:

Upon a change, reconnect immediately if no changes have occurred for some time. For example, reconnect no more than twice every four minutes, or three times per six minutes, or some similar metric.

From Updating Filter Predicates

Scala Hackaton and SQL Workshop Wrap Up

in
Auteur: 
François Beausoleil

A great time was had by all!

Seriously, the Scala workshop was very cool. The actor model was new to almost all attendants and needed some explaining. Looking back, I should have explained a bit more about how the this works. From what I saw, nobody stumbled upon the Scala syntax that much. The people that were there were all experienced programmers, thus may not have needed much hand-holding regarding syntax.

Quick Puppet Tip

in
Auteur: 
François Beausoleil

While testing my Puppet recipes, I usually boot a new instance then apply configuration manually. I have a base configuration, which is extended with other things. I just noticed I could apply a manifest using STDIN:

1 # ( echo "include sysbase" ; echo "include rabbitmq" ) | puppet apply -v

Viva the Unix tradition!

If you do any kind of configuration management, I highly recommend Puppet.

Needium Joins Seevibes for Beer

in
Auteur: 
François Beausoleil

I just learned this morning that Needium will join Seevibes in sponsoring the beer at the Scala Hackaton and SQL Workshop. Both events are on February 2nd. If you haven’t already done so and wish to join us, please register at EventBrite:

Announcing Scala and SQL Event on February 2nd in Montreal

in
Auteur: 
François Beausoleil

I would like to invite you to attend one or two events on February 2nd: Analyzing Twitter Social Data using Scala and Akka Actors and Social Media Metrics using SQL Engines.

Daemontools Best Practices

Auteur: 
François Beausoleil

I sometimes have to do sysadmin work, such as when I’m the sole technical person on a probject. When I need to keep a service running, I usually turn to daemontools. Daemontools was written by D. J. Bernstein, a mathematician and author of many UNIX utilities.

From daemontools’ home page:

daemontools is a collection of tools for managing UNIX services.

Running ScalaTest Tests Under IntelliJ IDEA

in
Auteur: 
François Beausoleil

I had lots of difficulties running my tests under IDEA. The exact error message was:

Error running All Tests:
Not found suite class.

Where All Tests was the name of my Run configuration.

I finally ended up with the right incantations. In my POM, I have the following:

Simple-Build-Tool: Error Getting Started

in
Auteur: 
François Beausoleil

I’m starting in Scala, because Seevibes’ code is in Scala. Scala has a tool named simple-build-tool for managing your projects. sbt is similar to Ruby’s Bundler and Clojure’s Leiningen in that it manages dependencies and helps build a project for you.

Unfortunately, I had problems getting started. After following the Setup instructions, I was consistently getting this error:

Sequel's #set_all still restricts the primary key

in
Auteur: 
François Beausoleil

I ran into a little gotcha today, using Sequel. I’m writing an importer, you know the kind: read record from database A, apply some transformations, write to database B. No rocket science required. But, Sequel has a little gotcha that stumped me for a bit. My script looked like this: