Dave Landers

Dave’s thoughts (such as they are)

Archive for the 'Tech' Category

Colorado Software Summit – Day 1

It’s now Monday morning at Keystone, and I’m looking forward to a good week of learning and catching up with old and new friends.

For those of you who are unable to be here this year, here is the annual obligatory picture of “the goods”.

Software Summit Goodies
The coolest thing this year is how they are distributing the conference session slides. In the past it was in a big 3″ 3-ring binder. Last year, we got a CDROM. This year, everyone got the slides on a 1.8Gb USB thumb drive. Nice!

Technorati Tags: , ,

Comments are off for this post

A twitter group bot for Colorado Software Summit

I have created a twitter group and an associated pair of bots for use during this year’s Colorado Software Summit.

Listening to @swsmt

The twitter group is @swsmt. If you use twitter, and want to follow tweets about the conference, then just follow @swsmt.

A few minutes later, you should also see @swsmt start following you. The main reason for this is to allow you to direct message the group. If you remove @swsmt from your followers, it should also then quit following you.

Tweeting to @swsmt

To tweet about the conference, or to send a message to everyone following @swsmt, you can do one of several things:

  • Direct message the swsmt group (For example: D swsmt blah).
  • Reply to @swsmt, or otherwise mention @swsmt in a tweet.
  • Use the #swsmt hashtag in a tweet.
  • Mention "SoftwareSummit" (one word) in your tweet – this will also pick up anyone tweeting a link to softwaresummit.com

When my bot sees any of the above, it will retweet them to the @swsmt account, so that everyone following the group will then see them.

The bots

Twitter has a pretty decent REST API, and I also found a nifty ruby library (twitter) wrapping that. Throwing together a couple of scripts was pretty easy after that.

Syncing friends

The first script I wrote syncs the group’s friends with followers. Keeping these in sync lets the follow act kind of like a subscription to the group.

The script just grabs both the followers and friends lists, and adds/removes based on the diffs between them.

The script is:

#!/usr/bin/env ruby

# synchronize followers/followed
# we do this because followers (those who 'join this group') will see
# all the messages, but we need to make them our friend so they
# can direct message the group

# http://twitter.rubyforge.org/
# sudo gem install twitter
require 'rubygems'
require 'twitter'

group_name = 'swsmt'
passwd = 'XYZZY'   # not really :)

# Log in
group = Twitter::Base.new(group_name,passwd)

# TODO only returns 100
# when we get more than 100, this will probably stop working very well
friends = group.friends.collect{ |f| f.screen_name }
followers = group.followers.collect{ |f| f.screen_name }

# followers who are not the group's friend yet (add them)
followers.each do |f| 
  unless friends.include? f then
      puts "Adding friend (following) #{f}"
      group.create_friendship f
      puts "Unable to add friend #{f}: #{$!}"

# friends who no longer follow the group (remove them)
friends.each do |f|
  unless followers.include? f then
      puts "Removing friend (following) #{f}"
      group.destroy_friendship f
      puts "Unable to remove friend #{f}: #{$!}"

Retweeting script

The retweet script searches recent tweets for @swsmt, #swsmt, or softwaresummit, and retweets that to @swsmt. It then grabs any recent direct messages, and retweets those.

Here’s that script:

#!/usr/bin/env ruby

# retweet messages to the @group
# we'll search for messages with a group hashtag #group or
# referencing the @group
# as well as some other keywords.
# also retweet any direct messages to the group
# run this via cron every couple of minutes to keep the group updated

# http://twitter.rubyforge.org/
# sudo gem install twitter
require 'rubygems'
require 'twitter'

group_name = 'swsmt'
passwd = 'XYZZY'   # not

# search for hashtags, group ref, or conference name
search_query = "##{group_name} OR @#{group_name} OR SoftwareSummit"

# Log in
group = Twitter::Base.new(group_name,passwd)

def retweet(group, from, text, id, lastid)
  retweet =  "Via @#{from}: #{text}"
  retweet = retweet[0,140] + '...' if retweet.length > 159
  puts retweet
    id.to_i > lastid.to_i ? id.to_i : lastid
    puts "Error retweeting: #{$!}"
# Keep track of the last ids we retweeted
searchid_file = File.expand_path('~/.group_retweet.searchid')

last_searchid = nil
last_searchid = File.open(searchid_file){ |f| f.gets.to_i } if File.exists?(searchid_file)

  # search for #group hashtag etc
  # TODO this will only return the 50 most recent - if there's too much traffic, 
  #   we will drop some.
  Twitter::Search.new(search_query).since(last_searchid).per_page(50).sort {|a,b| a['id'] <=> b['id'] }.each do |m|
    # skip messages from the group itself (probably our last retweet)
    unless  m['from_user'] == group_name then
      last_searchid = retweet group, m['from_user'], m['text'], m['id'], last_searchid
  File.open(searchid_file, 'w'){ |f| f.puts last_searchid } unless last_searchid.nil?

directid_file = File.expand_path('~/.group_retweet.directid')
last_directid = nil
last_directid = File.open(directid_file){ |f| f.gets.to_i } if File.exists?(directid_file)

  # now grab any new direct messages and retweet them
  # TODO this will only return the 20 most recent - if there's too much traffic, 
  #    we will drop some
  group.direct_messages(:since_id=>last_directid).sort {|a,b| a.id <=> b.id }.each do |m|
      last_directid = retweet group, m.sender_screen_name, m.text, m.id, last_directid
   File.open(directid_file, 'w'){ |f| f.puts last_directid } unless last_directid.nil?

I’m running both of these via cron. I just turned this on, so we’ll see how it goes.

Technorati Tags: , , , , , ,


Scheduling for Software Summit

The 3-each-session scheduling at Colorado Software Summit pays off again.

I looked at the schedule, and picked (based on content) the sessions I pretty much want to see this year. I ended up with 18. There are only 20 time blocks.

But because of the way they do the scheduling, I was able to fit in all 18 of my preferences into the 20 time slots. Just try that at other conferences!

Here’s how I do my schedule, in case you care:

Since the iCalendar format schedule is now also available, I subscribed to that (I use Apple’s iCal). Then, I created a new “myCSS” calendar and copied all the sessions I might go to (that’s 18 sessions at 3 times each). Some of the time blocks only had one session I wanted, so I deleted all the other instances of that session. That opened up yet more blocks. Lather, rinse, repeat. In the end I only had about 3 or 4 time slots to manually resolve. It probably took me less than 10 minutes total (not counting reading all the session abstracts to choose the 18 in the first place).

Thanks, Wayne & Peggy!

Technorati Tags: , , ,

Comments are off for this post

Colorado Software Summit – Detailed Schedule Posted

The full, detailed, daily schedule for Colorado Software Summit has just been posted.

If you are not familiar with the conference, you should take a look. One look at the full schedule and you will see that (like every year), they’ve got some world-class developers talking about some hot topics – REST, JavaScript, JSF, Linux, iPhone and Andriod development, scalability, Spring, and lots more.

In fact, this might just be the first conference to feature iPhone development since Apple has only this week lifted their NDA.

You should also note that, unlike a lot of other conferences, this one features every session three (3) times each. That’s quite a load on the speakers (I speak here from personal experience), but is a boon for attendees (again, personal experience). While there is much more content here than you can hope to take in during the week, the 3-times-each deal makes it pretty certain that you’ll be able to get to your top 10 or 15 sessions.

Some other things that make this conference different and better than the rest:

  • When you check in, you will get a CD with every single slide for every single session. So you can plan your schedule based on more than just the abstracts.
  • After you get home, you’ll receive a CD containing every single slide (again – since many speakers tweak things at the last minute), plus any example source code used in the sessions.
  • Every speaker is presenting two topics, so if you like one session, you might want to attend their other one.
  • This conference is a real community. You will (if you so choose) be able to hang out, eat lunch, etc. with the speakers (and many other smart developers). Networking, in-depth conversations, and lots of joking around are an integral part of Software Summit. If you don’t leave having made a couple of new friends, you haven’t done it right.
  • The food is absolutely fabulous.
  • The venue in the heart of Colorado’s Rocky mountains (at a major ski resort) is spectacular.

Technorati Tags: , , , , ,

1 comment

Time Machine Restore works

I just got a new MacBook Pro yesterday. I “needed” a new machine because my old one is a Core Duo (not Core 2 Duo) and wouldn’t run the Java 6 preview. And my son “needed” my old MacBook Pro for college. Yea, that’s it.

Anyway, I turned on the new machine this morning, and selected the Restore from Time Machine option. It chugged away for an hour or whatever, but by about 9:30 AM I was sitting in front of a near replica of the other machine. Pretty cool.

I did have to install XCode and Dashcode again.

And I had to re-acquaint my bluetooth phone with the new Mac. And re-authorize my iTunes music.

And for some reason, I had to reset my USB drive as the Time Machine volume (and it choose a new backup database folder, so it’s going to start over with a full backup).

Technorati Tags: , ,

1 comment

« Previous PageNext Page »