background preloader

Complexity

Facebook Twitter

Why complex life probably evolved only once - life - 21 October 2010. The universe may be teeming with simple cells like bacteria, but more complex life – including intelligent life – is probably very rare.

Why complex life probably evolved only once - life - 21 October 2010

That is the conclusion of a radical rethink of what it took for complex life to evolve here on Earth. It suggests that complex alien life-forms could only evolve if an event that happened just once in Earth's history was repeated somewhere else. All animals, plants and fungi evolved from one ancestor, the first ever complex, or "eukaryotic", cell. This common ancestor had itself evolved from simple bacteria, but it has long been a mystery why this seems to have happened only once: bacteria, after all, have been around for billions of years. The answer, say Nick Lane of University College London and Bill Martin of the University of Dusseldorf in Germany, is that whenever simple cells start to become more complex, they run into problems generating enough energy. "It required a kind of industrial revolution in terms of energy production," says Lane. The Siren's Call Of Complexity: How Legacy Businesses Get Led Astray.

I've talked in the past about the importance of understanding the concept of the Innovator's Dilemma, as put forth by Clayton Christensen years ago.

The Siren's Call Of Complexity: How Legacy Businesses Get Led Astray

This is the idea that legacy companies often struggle with recognizing disruptive innovation, since when it first appears the offering appears to be not as good as the current offering in many ways. That is, a car might not have seemed as good as a horse-drawn carriage when automobiles were first invented, because the infrastructure wasn't in place, cars broke down more frequently, they were noisy, etc. But the problem is that those making the judgment often misjudge both the trends for improvement, as well as what the customer is really basing his or her buying decision on. Thus, as the quality of the innovative product improves, at some point -- even if the product is still seen as "worse" by the legacy business folks -- it becomes good enough, often at a much cheaper price for the buyers. That's when the real disruption occurs. Complexity and Test-first 0. It recently occurred to me to run a Cyclomatic Complexity tool over a codebase I know to have been largely written test-first/code/refactor (and often test-driven).

Complexity and Test-first 0

The code is Java, so I used this Eclispe plugin to measure the per-method complexity. The distribution of complexity per method looked like this: Note that the count of methods is shown on a logarithmic scale. There were 19,917 methods in this codebase. The mean complexity per method was 1.46, and the median complexity is 4.5 Not shown on the chart are a few outliers: one with complexity 91, one with 47, and one with 35. The Extrema The 91 complexity method turned out to be the doGet of a servlet providing a simple web service, crammed full of if (method.equals("getLocales")) printLocales(out, ids); type dispatching code. Down at the other end of the scale the tens of thousands of complexity 1 and 2 methods are mostly of these sorts: Interpretation Wait a minute though...

Something about the shape of that chart caught my eye.