Starting at about 8am today, some members of the Alagad team started receiving, shall we say, subtle reminders to blog. You see, I’m trying to institute a new policy here to have everyone blog at least once a week, with me blogging twice a week. The problem is, as much we we all know it’s good for us (and for you), it’s easy to let blogging take second stage to paying work.
To encourage people to blog, I recently assigned a blog-day to everyone here. I’m supposed to blog Monday and Thursday. Jeff, Layne, Scott and Jared are assigned to Monday, Tuesday, Wednesday and Thursday, respectively. To make sure people remember to blog I made a habit of sending harassing IMs to people encouraging them to blog. This was more effective than doing nothing, but had one slight downfall: I had to remember to remind people.
Last night I was thinking about this problem and though, what the heck, I’ll automate it! As it were, we already have the infrastructure in place to facilitate 90% of this process. We have a project management system we built that already makes use of the XMPP Event Gateway that ships with ColdFusion. We used the gateway to create an IM bot which many of us use to track time against tasks on our various projects. (This time tracking information feeds into our project management system which ultimately feeds QuickBooks and drives our invoicing and reporting. Let me know if you want to hear more about this process and maybe I’ll blog on that as well.)
So, we already had a system to send IM messages to Alagad employees. We also have the blog, which conveniently has an RSS feed that includes the email address for the person who wrote the entry. All I had to do was create a service which first pulled the Alagad.com RSS feed and parsed it to find out the last time any given person blogged.
Next, I had to know what day a user was assigned to blog. For that, I created a new table in my database called UserBlogDay, and stored a userId and the user’s blog-day. By referencing this object in my Reactor config, I was able to use Model-Glue scaffolding to generate the user interface which I then tweaked to perfection.
By cross referencing what day a person was supposed to blog and the last time they blogged I can figure out if the user is overdue to blog. In the case that they are due to blog I then use the same event gateway used by the time tracker IM bot to send them a random nagging IM message.
I set up a scheduled task, which is actually created by the reminder service when it’s instantiated, to run the reminder process every hour. But, I didn’t want to be rude and overbearing. (Well, not that overbearing!) I decided to only have this remind people to blog between 7am and 6pm. The nice thing is, because of the time tracker, I’m already tracking each employee’s time zone and I could reuse functionality to get the time in that user’s locale and only remind them when it’s reasonable.
The whole thing is wired together using ColdSpring. In fact, the messages that can be sent are configured via ColdSpring, though perhaps I should put them into a database table and scaffold an interface to create new nags.
Finally, the entire Project Management system, now complete with a blog-reminder nagging system, is deployed by Ant. We use my CFAnt project to check the application out from subversion, configure it for production, create the data source, enable trusted cache, regenerate all Reactor objects, and more. The whole modification to the project management system only took about 3 or 4 hours to implement and roll out! So, this is a little slice of how we do things at Alagad. It gives you a little peak into our culture as well as how we work! Today, I personally received about 9 reminders to blog! So fine, here’s my blog entry!