← Back to team overview

launchpad-dev team mailing list archive

Re: APIs and len() of collections

 

On Mon, Jul 26, 2010 at 11:53 AM, Jonathan Lange <jml@xxxxxxxxxxxxx> wrote:
> On Sat, Jul 24, 2010 at 10:08 AM, Robert Collins
> <robert.collins@xxxxxxxxxxxxx> wrote:
> ...
>> I need input here - where do people use len(), why do they use len(),
>> what would the impact of nuking it be? We need this input to build
>> better interfaces - ones that scale and perform well.
>>
>
> As a webservice user, I use len() on collections to get an accurate
> count of the number of things I care about, so I can plot them.
>
> In fact, just the other day someone asked me to make a public burndown
> chart of the number of oops & timeout bugs in Launchpad. :P

I think we can do something that will preserve your ability to do this
broadly but not impose as heavily on us.

A few initial thoughts:
 - you're graphing absolute figures, you could get a delta and sum an
arbitrary start point. E.g. if we said when you start the exercise
'hundreds of oops bugs' and then called you back with each bug that
becomes an oops bug (or stops being one), you could track that
hundreds down and requery the aggregate estimate whenever you like.
 - or we could provide a 'delta aggregate' which would be pretty
accurate (e.g. +4 today) even with the same precision limits the
overall aggregates have
 - we could issue an API key for users we're willing to serve exact figures to.
 - we could provide a dedicated get-exact-figures interface, so that
people really have to choose it - and further to that we can document
our preferred interfaces.

What do you think?
Rob



Follow ups

References