Memories of BiCon 2010

London Docklands from the University of East London

BiCon 2010, the 28th annual bisexual conference/convention took place from August 26th – 30th at the University of East London, Docklands campus. It was combined with the 10th International Conference on Bisexuality, and the first international Bisexual Research Conference. About 450 people attended, from 28 countries!

I got up ridiculously early on Thursday 26th August in order to take the coach from Winchester to London leaving at 06:30. The journey was smooth and I was at UEL by 10am, in time to check in and drop off my suitcase in my accommodation.

The research conference was utterly brilliant, full credit to Meg Barker and Christina Richards for running it. Most of the talks were of exceptional quality, and i feel i learnt a lot. I enjoyed hearing about Helen Bowes-Catton’s research into how people perceive and visualise bisexual spaces. Kaye McLelland spoke about bisexuality in the works of Shakespeare, and i marvelled at how well my English teachers at school managed to hide it all from us!

Robyn Ochs at BiCon 2010

I was thoroughly inspired by a keynote talk from Robyn Ochs, a public speaker, writer, and long-standing bisexual activist. Robyn spoke of the importance of the impact that we make when we create space for people to be comfortably bisexual. I was touched by Robyn’s description of the reward when somebody tells us that we make a difference for them. I felt so proud at that moment that I helped to found Bi Wessex in Winchester: proud that people come along and gain something from the group, and that some of the members were there at BiCon.


Miguel Obradors Campos speaks at BiCon 2010

On Friday i bought Robyn’s book, Getting Bi: Voices of Bisexuals Around the World and attended the workshop where we heard from ten of the people who contributed to the book. They stood up and told us something about themselves and read an excerpt from the book. It gave such meaning to hear them speak personally, and when i reach their stories in the book, i will remember them. Their contributions will be particularly meaningful for me. I asked several of the contributors to write in my book, which they gladly did.


Sexual orientation self-definitions

I enjoyed hearing Heidi Bruins Green and Dr. Nicholas Payne speak about the results of a workplace survey on bisexuality. It was very interesting to hear the results analysed and validated from a mathematical perspective. Their results showed that bisexuality is not a phase on the way to something else, but a valid destination point, as are many other sexual orientations. They had some interesting data to show that happiness at work is directly correlated with LGBT support groups in the workplace, and anti-discrimination policies that include sexual orientation, gender identity and expression.

Saturday’s discussion about words and phrases for bisexuality in other languages was intriguing. I shared my Esperanto knowledge about the etymology of the word ambaŭseksema and the positive phrase borrowed from shipping terminology navigi per vaporo aŭ velo (to navigate by steam or sail). We learned phrases, both positive and negative in German, Dutch, Danish, Spanish, Italian, Sri Lankan, Welsh and Hebrew. Everybody contributed something, and the results will be published … somewhere.

Knitting a bi pride bracelet

I knitted a bi pride bracelet in the amazing craft room, and then on saturday afternoon i took some time out to visit Central London. I went to Covent Garden to visit the new Apple store (the biggest in the world) and enjoyed spending time by myself.

Saturday evening was the BiCon ceilidh which i enjoyed immensely. When it comes to dancing, i really like being told what to do! :) I made a new friend that night, somebody who i feel could become a very good friend. We danced together a lot and had some lovely conversations. Later on the music became too loud but i joined the Corridor Club upstairs where it was quieter and i enjoyed chatting to more people. We were actually the last to leave because we didn’t realise when the music had stopped and everyone downstairs had left!

Sunday was the disastrous “Bisexuality in Science-Fiction & The Future” workshop. It was marred by the speaker being late, a church group being in the room we were supposed to use, the laptop being broken, the projector refusing to work, and the speaker’s corny sense of humour which did not go down particularly well at 10am. I gave up and left after about ten minutes of technology fail, and went and joined the church, which i actually really enjoyed! Those who stayed said it only got worse, and by half way through several of them had started their own alternative science-fiction workshop out in the atrium!

The highlight of Sunday was “Smutty Storytelling” which was very well attended, and the storytellers did not disappoint! The stories were well written, and delivered with humour and enthusiasm! There were cheers and a standing ovation by the end! I sat with my new-found friend and mentioned that I had “The Girl With The Dragon Tattoo” on DVD, which we watched later that evening.

Monday morning seemed to go quite slowly. Things were winding down but there were still a few workshops left. I went to one on sensual play, which was well facilitated, and led to discussions of how we might turn the results into an amusing website! Later i went to have my photo taken professionally, so that hopefully i will appear again on the front cover of Bi Community News and maybe in other publications about bisexuality.

Latimer "the buck" and a lion from BiCon 2008 share a hug

Before i knew it, it was closing plenary. Awards and thanks were given, we celebrated the success of this BiCon, and met the team of BiCon 2011 which will be in Leicester from September 1st – 4th. Registration is already open!

The bi community is amazing. So totally inclusive and unquestioning. I am so happy that i went, I am sad that it’s over, but writing this is my therapy: recording my happy memories and celebrating the joys of the last few days.

Thanks so very much to the BiCon 2010 organising team – you did an incredible job!

Advertisements

Rails alphabetical pagination

A common problem we often run into at eden is paginating a list of things alphabetically. I thought it was possible with will_paginate but apparently not, so yesterday we created our own simple solution, and today we rolled it into a plugin.

Here’s a little tutorial of how to use it.

So i have a nice simple view of Gowalla pins ordered by name. Please forgive the scaffolding! ;)

Gowalla pins

This page is quite long. Of course, we could use standard pagination to make it 10 per page or something, but it wouldn’t be very helpful if you were looking for a pin with a particular name. You’d have to click through the pages to find it. Wouldn’t it be neat to list a page for each letter?

Enter paginate_alphabetically!

Simply install it as a plugin:

rails plugin install http://github.com/edendevelopment/paginate_alphabetically.git

Enable pagination in the model:

class Pin < ActiveRecord::Base
  paginate_alphabetically :by => :name
end

Make the controller fetch the right pins:


class PinsController < ApplicationController
  def index
    @pins = Pin.alphabetical_group(params[:letter])
  end
end

Add pagination links in the view:

<ul class='pagination'>
  <strong>Jump to:</strong>
  <%- Pin.pagination_letters.each do |letter| -%>
    <li><%= link_to(letter, pins_path(:letter => letter)) %></li>
  <%- end -%>
</ul>

Perhaps a touch of CSS:

ul.pagination {
  list-style: none;
  color: lightgray;
  padding: 1em 0.5em;
}

ul.pagination strong {
  color: black;
}

ul.pagination li {
  display: inline;
  font-size: 1.1em;
}

ul.pagination li:before {
  content: '| ';
}

And here it is:

Gowalla pins beginning with E

The cool thing is you can add this to any of your models, and paginate by any attribute you wish.

Tested with Rails 2.3.5 and Rails 3 release candidate.

Get it from github: http://github.com/edendevelopment/paginate_alphabetically
or RubyGems: http://rubygems.org/gems/paginate_alphabetically

Thanks to Tom, Enrique and tooky for their help making this.

What's a pomodoro?

At eden, we often use the Pomodoro Technique™ to manage our time effectively. What exactly is a pomodoro? You could find out on the Dizionario di Italiano but i’ll give you a clue: it’s a tomato.

Share photos on twitter with Twitpic

A tomato?! How does a tomato help us manage time and increase our productivity? Well when we talk about pomodoros, we’re actually talking about a 25-minute block of time followed by a 5-minute break to reflect and assess how we’re doing and what we will do in the next 25 minutes. After four of these we take a longer break. If we’re really serious about the technique, we aim to do 12 pomodoros in a day.

This is the Pomodoro Technique created by Francesco Cirillo in 1992. It is called Pomodoro because Francesco used one of those kitchen timers shaped like a tomato.

These are the five simple steps of the Pomodoro Technique:

  1. Choose a task to be accomplished
  2. Set the Pomodoro to 25 minutes (the Pomodoro is the timer)
  3. Work on the task until the Pomodoro rings, then put a check on your sheet of paper
  4. Take a short break (5 minutes is OK)
  5. Every 4 Pomodoros take a longer break

We don’t actually use a kitchen timer (though i think it would be cool to have some!) but we use software tools instead. We use Apple’s Pomodoro timer which has Growl integration and keeps track of tasks and interruptions. When pairing remotely we use http://tomatoi.st/ which enables both people to see the time as it counts down.

At eden, pomodoro time is highly respected in terms of not interrupting unless it is really urgent. It’s very easy to say, “We’re on a pomodoro” and people know that you’ll talk to them in your next break.

We find that the Pomodoro Technique increases our focus, keeps us on track with what we’re doing, and keeps us in control of our time, rather than time controlling us. For ideas and resources, visit PomodoroTechnique.com.

30 days to fix my life

These are the last few hours of my 30-day trial of various changes to my life. For the last 30 mornings i have got out of bed and got going at 7am consistently. I have completely cut out coffee, i have gone to bed at a decent time and i have prioritised my evenings more effectively, much reducing the amount of time i spend watching television.

By consequence i’ve felt a lot happier, more engaged, more enthusiastic to do my job and do it well. My weekends have seemed more structured. I’ve felt emotions that seem somehow more authentic, and i’ve looked forward to my bedtime, enjoying a good read in bed. I’ve often woken up before my alam sounds in the morning, and enjoyed dozing in bed listening to the birds and the weather. I’ve given up chocolate almost by accident, and i’ve no intention to start eating it again. I’ve come to absolutely love Rooibos Tea! :)

Several people have asked me: what happens next? Well, ideally more of the same. I spent 30 days exercising my self-discipline, forcing myself to follow a routine in order to establish a habit. I’d like to think it won’t be difficult to keep it up now. I used twitter extensively, tweeting every morning that i’d got up on time. Some of my followers will be glad to hear that i won’t be doing that anymore! Twitter is a great motivational tool, but i no longer need it. I think it would feel weird now to stay in bed after my alarm has sounded.

So the experiment has been a great success and it has set me up to continue the good habits that i’ve established. Thank you everyone for your encouragements during the past month. I’ve really appreciated it!

Using Cucumber to test concurrency issues

Recently i encountered a concurrency problem of the type where there is a queue of things to do, and users press a button to be automatically assigned the next item in the queue. The bug report was that two users could get assigned the same item.

My pair programmer and i tried to reproduce the problem using two computers, but we couldn’t. We were only running one Rails instance, but we know that in the production environment there are multiple load-balanced servers pointing to one database, so we had an inkling that we’d be able to produce it using multi-threading.

To give it a test, we wrote a Rake task which we ran in two terminal windows to mimic the simultaneous access. The Rake task looked something like this:

require File.join(File.dirname(__FILE__), '..', '..', 'config', 'environment.rb')
namespace :test do
  task :take_next_for, :login do |t, args|
    user = User.find_by_login(args[:login])
    user.take_next_item
    puts user.item.inspect
  end
end

This is easily called by running:

rake test:take_next_for['ann']

We ran it for two users simultaneously and inspected the output. Sure enough they were being assigned the same item.

Since there is only one database, we knew that we could fix it with a carefully placed transaction and lock on the database. But we wanted to add a Cucumber feature so that we could be sure it was working, and to give us confidence that the bug would not come back again in the future.

  Scenario: Two users take next item simultaneously
    Given a user with login "ann"
    And a user with login "bob"
    And an available item called "Item 1"
    And an available item called "Item 2"
    When two users attempt to take the next item at the same time
    Then they should each have taken different items

Notice we can’t actually say who gets which item – it’s a race condition. We can only check that both of them have an item and that they are not the same item. We could alternatively check that both of the items have successfully been taken.

Testing this concurrency issue in Cucumber turned out to be somewhat tricky. We tried using simple Ruby threads in Cucumber, but it wasn’t properly simultaneously. I guess the single Cucumber environment still only does one thing at a time. So it was back to the Rake task.

When /^two users attempt to take the next item at the same time$/ do
  t1 = Thread.new { `RAILS_ENV=cucumber rake test:take_next_for['ann']` }
  t2 = Thread.new { `RAILS_ENV=cucumber rake test:take_next_for['bob']` }
  t1.join
  t2.join
end

We ‘join’ the two threads to make sure they’ve both finished before carrying on.

It’s slow because it loads up a whole new Rails environment for each of the Rake tasks, but that is exactly what we want to do, to mimic the concurrency of the production system.

The next problem we encountered was that Cucumber scenarios are run inside a transaction which means that a Rake task running outside of it cannot see the users and items we just created. So we had to tag the scenario as @no-txn so that they would be available externally and @clean-up-afterwards so that we could remove them from the database.

After "@clean-up-afterwards" do
  User.destroy_all
  Item.destroy_all
end

With this in place the Cucumber scenario failed as we hoped it would! Then it was simply a matter of creating a transaction from the moment we find the next item (with a database lock) until we have successfully assigned the item. This is a simplified version of what we ended up with:

class User < ActiveRecord::Base
  has_one :item

  def take_next_item
    transaction do
      item = Item.available.by_priority.find(:first, :lock => true)
      self.item = item
    end
  end

end

The Cucumber scenario passed and the problem was solved. In the live system, if two users now try to take an item at the same time, one of them has to wait a moment until the database has finished assigning to the first user so that it can assign a different item to the second user.

How would you have tested a concurrency issue like this? Are there better ways of imitating a multi-server production environment than the solution we came up with?