If you've ever been part of a large project team, you understand the communication challenges present. Large project teams just have so much more of everything than do smaller teams. There is more code, more people, more requirements, more, more more. And all this extra stuff makes it difficult for anyone and everyone to understand things consistently. Hell, I've been on teams where I don't even know all the developer's names. And if I don't know their name, you can bet I don't know what they are doing nor how they are doing it. That's not ideal, but it's also real. And it's why we try to break teams up into smaller teams that each work together. Anyway, I've always wondered about the unique paths of communication that exist between members of a team. So I wrote a little Ruby script to help me figure it out.

First things, first. I needed to know the algorithm . I found that the number of unique combinations of r objects from an initial set of n objects is calculated using the following formula.

So this allows me to calculate how many groups of 2 developers can be chosen from a set of 10 developers. The answer, of course, is 45. But to find all possible paths of communication, I also need to know how many groups of 3, 4, 5, 6, 7, 8, 9, and 10 developers can be chosen from a set of 10 developers. This can be represented by summing up the results of the above formula for each, represented by the following.

Here's the Ruby script that does this for me.

def factorial(val)
if val == 1
val
else
val * factorial(val - 1)
end
end

print "Enter number of people: "
n = gets.to_i

channels = 0
n.downto(2) { |r|
n_fact = factorial(n.to_i)
r_fact = factorial(r.to_i)
if (n - r < 1)
n_minus_r_fact = factorial(1)
else
n_minus_r_fact = factorial(n - r)
end

channels = channels + (n_fact / (r_fact * n_minus_r_fact))
}
puts channels


The results are rather astounding, as illustrated below. Even a medium sized project consisting of 20 developers has over 1 million communication paths. Take it to 50 people, and it's a number bigger than I know.



No wonder large projects are so much more difficult. I'm not sure where the breaking point is, and I'm sure it's different based on a number of factors (ie. culture, experience, attitude, aptitude, etc.). But I do think these numbers hold some weight. I know from experience it's easier to work on a team of four (11 paths) than on a team of 40 (1,099,511,627,735 path). I also know that agile practices and a pragmatic approach helps those larger teams.