in reply to Re^2: API complexity measures
in thread API complexity measures

You asked about a measure. That measure is how you would determine between the first and the second cases. Otherwise, you have your gut to go on. Guts are very poor measures of anything.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^4: API complexity measures
by zby (Vicar) on Jun 11, 2008 at 14:32 UTC
    I am not sure if I understand your point - but if what you say is that you can never tell if the complexity measured by some measure is below the practical lower bound of complexity - and so any measure is impractical? Then I don't agree - you can argument if a module does all we want it to do (and thus that it is above the minimal practical complexity) separately from measuring it's complexity. And the difficulties with the first don't make the second just 'gut feeling'.
      You asked about a measure, the question initiated because you felt that a given API was overly complex. Both stvn and I replied back indicating both that
      • complexity is a very hard thing to measure with the tools we have
      • most people who think they understand the complexity of an API usually don't
      This isn't a slam on you. Both stvn and I gave you examples from our own CPAN module where people asked us to reduce complexity in an API when they didn't understand the full measure of the requirements. A lot of that is our fault - OSS developers tend to hack first and document at some undefined "later". This leads to users (quite understandably) assuming that their usage of the module is the primary one because there is no indication otherwise. stvn has dealt with this almost weekly with Moose and Class::MOP. mst deals with this constantly with Catalyst and DBIx::Class, often from me.

      This reminds of the three-body problem. Analyzability starts to break down very quickly.


      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
        You seem to conflate understanding what a module does with measuring the complexity of it's API, but those are two different things, and they can be discussed and analysed separately. I also don't agree that measuring complexity is hard - there can be many measures - and some are rather simple, for example you can just count the number of objects and methods in the API. And even such a simple measure can be practical - if we could show that all other things are equal (which can be hard or impossible, I agree, but doable in some cases).