Small Worlds

I read one of the Small Worlds whitepapers (available at their site, but you have to enter your e-mail address for them to send the URL’s to you), which provided some clues. They argue that any software is a complex system, and that they therefore are “hierarchies of networks or webs of information exchange” (according to recent advances in complexity science).

The tool analyzes the source code (or, in the case of Java, the bytecode), computing metrics and visualizing the network. In addition, it looks for structural patterns on the local and global scale; these patterns are called “butterflies,” “breakables” and “hubs”. A butterfly is a node that when changed affects many other nodes (either locally or globally, but globally is generally far worse); a breakable is an object that is affected by changes many other objects (again, either locally or globally); a hub is a combination of these two (that is, that changes affects many other nodes, and that changes in many other nodes affect it).

This suggests that hubs in software generally are undesirable. As they write in the whitepaper, the presence of global hubs indicate that the system is in big trouble, since any changes are very likely to cascade across the network, resulting in still more changes along the way. Global breakables are also signs that the system isn’t healthy, while it is likely that there are a few global butterflies – probably in the form of utility classes and core abstractions.

This is something I didn’t consider as I read Linked. I didn’t consciously think that hubs would be a good thing, but I think that I assumed that software systems would also be scale-free. If hubs are undesirable, does this mean that software networks aren’t scale-free? Perhaps software systems left to themselves evolve to scale-free networks? I wonder if there are any examples in nature of networks that are similar to software in this respect: that they must keep a sound number of hubs in order to survive – referring to the fact that software systems slowly die as a consequence of becoming ever more expensive to change, since changes avalanche due to the presence of several global hubs.

I downloaded JXTA because I thought it would be an example of a well-designed system to explore in Small Worlds. Curiously, it showed several global hubs, breakables and butterflies. The tool says that when an “average system object is changed, 21.6 objects are affected.” Is this okay given the fact that JXTA is a framework, and thus must have stable interfaces to not break code depending on it.

The above was posted to my personal weblog on January 27, 2003. My name is Peter Lindberg and I am a thirtysomething software developer and dad living in Stockholm, Sweden. Here, you’ll find posts in English and Swedish about whatever happens to interest me for the moment.

Posted around the same time:

The seven most recent posts:

  1. Tesugen Replaced (October 7)
  2. My Year of MacBook Troubles (May 16)
  3. Tesugen Turns Five (March 21)
  4. Gustaf Nordenskiöld om keramik kontra kläddesign (December 10, 2006)
  5. Se till att ha två buffertar för oförutsedda utgifter (October 30, 2006)
  6. Bra tips för den som vill börja fondspara (October 7, 2006)
  7. Light-Hearted Parenting Tips (September 16, 2006)