Diff for "PolicyAndProcess/MaintenanceCosts"

Not logged in - Log In / Register

Differences between revisions 2 and 3
Revision 2 as of 2012-02-01 03:53:50
Size: 4112
Editor: lifeless
Comment: clarity (thanks stevenk)
Revision 3 as of 2012-02-10 19:02:17
Size: 5086
Editor: lifeless
Comment: \o/
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:

= This is a draft =

Feedback to RobertCollins or on the developers list please.
Line 27: Line 23:
== Experimental metrics ==

We are using lines of source code as a proxy for all these costs. While this is in some ways a poor metric, it is very simple to apply using the diffstat at the top of our merge proposals.

 * thou shalt not increase the LOC count for (the branch you are landing code in) unless:
   * your work has been blessed by project lead as being resourced in some way or you are on a resourced arc which will reduce code at the end (e.g. disclosure) needs a waiver from the LP Project lead or CDO Technical architect
   * you have a good claim for reducing non-code costs (e.g. less support tickets) - needs a waiver from the LP Project lead or CDO Technical architect
   * you are moving code to a smaller, leaner and more focused sub-project
   * Non-source boilerplate (e.g. copyright notices) ''may'' be ignored if folk can be bothered counting the lines.

The LP Project lead will do a review of the impact of this approach on the 24th of february, then the end of March, then the end of May.

=== Possible other metrics ===

 * We could use sloccount rather than the simple diffstat counters. This would automatically ignore some boilerplate like copyright notices, but may also ignore doctests (which have code in them.. and often break)
 * We could consider using cyclomatic complexity to estimate complexity, and use complexity as a proxy for driving defects
Line 29: Line 42:
Anyone that does code/design/project review for Launchpad needs to include maintenance costs in their review. You are expected to think about the cost of maintaining a project and allow for it in some fashion.  * '''code reviewers''': Must check that the branch (or a collection of branches - e.g. one cleanup + one feature) meet the LoC metric above.

 * '''other reviewers''': Consider the cost of maintenance in your review; be it of usability, feature set, etc... you are expected to think about the cost of maintaining a project and allow for it in some fashion.
Line 33: Line 48:
We don't have a simple rule for this, and given the size of LP it may be hard to come up with one.
Line 37: Line 50:
The drizzle project took a very similar approach - they took one metric for maintenance costs/complexity - lines of code - and then made a simple rule: no patch could land which increased the LoC in the project. This was very successful for them. The drizzle project took a very similar approach - they took one metric for maintenance costs/complexity - lines of code - and then used a simple test: patches which increased LoC were highly undesirable. This was very successful for them - they have massively reduced the size of the code base and increased its rate of change.
Line 45: Line 58:
== What things increase costs == == What things affect costs ==
Line 47: Line 60:
 * Increasing the number or difficulty of support tickets
 * Increasing the number or difficulty of bugs filed against launchpad-project
 * Making code review or contribution landings harder to do or more time consuming
 * Making operations harder, more complex or more resource hungry
 * Using components that do not scale as usage or time increase
 * Using features that are likely to be broken as Ubuntu (our platform) or web browsers (our other platform) evolve
 * Adding code (which then brings its own bugs)
 * Adding complexity to the system (in any of a number of different ways - more languages, more approaches to doing things, more choice)
 * The number or difficulty of support tickets
 * The number or difficulty of bugs filed against launchpad-project
 * Difficulty or time consumption of code review and landing contributions
 * difficulty, complexity and resource usage of operating launchpad.net
 * Usage of components that do not scale with time / users
 * Dependencies on features that are likely to be broken as Ubuntu (our platform) or web browsers (our other platform) evolve
 * The amount of code in the system
 * The amount of complexity in the system (in any of a number of different ways - more languages, more approaches to doing things, more choice)
Line 56: Line 69:
== What things decrease costs ==

 * Fixing things so users don't have to open support tickets
 * Fixing things so users don't need to open new (or duplicate) bugs
 * Making landings easier and code review more streamlined
 * Automation of operational tasks
 * Increasing the efficiency of the system
 * Replacing poor components with simple or scalable components
 * Removing unnecessary code
 * Removing unnecessary complexity

== XYZ is necessary, but is in the increases-costs list, what choices do I have? ==
== XYZ is necessary, but would increase costs, what choices do I have? ==
Line 79: Line 81:
We are starting this policy as soon as it has been approved. The LP Project lead approved this policy on the 17th Feb 2012.

  • Policy Name: Maintenance

  • Policy Owner: Francis Lacoste

  • Parent Process/Activity: None

  • Supported Policy: None

Policy Overview

Quite separate to adding new features and facilities we have to maintain Launchpad indefinitely. This policy is about containing the costs of maintenance while still allowing Launchpad to be changed and extended.

In short: all changes to Launchpad must decrease, or at worst not increase the overall cost of maintenance.

Maintenance means:

  • User support
  • Bug triage
  • Code review and contribution landings
  • operate the site(s)
  • fix things that break due to our users using Launchpad
  • fix things that break due to external environmental changes (new Ubuntu releases, new browsers releases etc)
  • make modest changes based on our bug database as time permits

Experimental metrics

We are using lines of source code as a proxy for all these costs. While this is in some ways a poor metric, it is very simple to apply using the diffstat at the top of our merge proposals.

  • thou shalt not increase the LOC count for (the branch you are landing code in) unless:
    • your work has been blessed by project lead as being resourced in some way or you are on a resourced arc which will reduce code at the end (e.g. disclosure) needs a waiver from the LP Project lead or CDO Technical architect
    • you have a good claim for reducing non-code costs (e.g. less support tickets) - needs a waiver from the LP Project lead or CDO Technical architect
    • you are moving code to a smaller, leaner and more focused sub-project
    • Non-source boilerplate (e.g. copyright notices) may be ignored if folk can be bothered counting the lines.

The LP Project lead will do a review of the impact of this approach on the 24th of february, then the end of March, then the end of May.

Possible other metrics

  • We could use sloccount rather than the simple diffstat counters. This would automatically ignore some boilerplate like copyright notices, but may also ignore doctests (which have code in them.. and often break)
  • We could consider using cyclomatic complexity to estimate complexity, and use complexity as a proxy for driving defects

Responsibilities

  • code reviewers: Must check that the branch (or a collection of branches - e.g. one cleanup + one feature) meet the LoC metric above.

  • other reviewers: Consider the cost of maintenance in your review; be it of usability, feature set, etc... you are expected to think about the cost of maintaining a project and allow for it in some fashion.

This may mean saying 'no' to a volunteer contributed patch because it would increase our maintenance costs. (But you could then offset the cost yourself somewhere else, or ask them to fix e.g. a tech-debt bug to counteract the increased costs).

Prior art

The drizzle project took a very similar approach - they took one metric for maintenance costs/complexity - lines of code - and then used a simple test: patches which increased LoC were highly undesirable. This was very successful for them - they have massively reduced the size of the code base and increased its rate of change.

Why this policy?

Launchpad is resourced with a (mostly) fixed size maintenance team: if the costs of maintenance increase, we will fall behind (with a corresponding decrease in how well we do our maintenance).

Launchpad is currently very expensive to maintain, and we can do much more interesting things if we make it cheap to maintain.

What things affect costs

  • The number or difficulty of support tickets
  • The number or difficulty of bugs filed against launchpad-project
  • Difficulty or time consumption of code review and landing contributions
  • difficulty, complexity and resource usage of operating launchpad.net
  • Usage of components that do not scale with time / users
  • Dependencies on features that are likely to be broken as Ubuntu (our platform) or web browsers (our other platform) evolve
  • The amount of code in the system
  • The amount of complexity in the system (in any of a number of different ways - more languages, more approaches to doing things, more choice)

XYZ is necessary, but would increase costs, what choices do I have?

  • Don't do XYZ
  • Pay for XYZ by tackling something that will decrease costs by about the same amount
  • Get special dispensation from the Launchpad project leader and/or CDO Technical Architect to increase the maintenance costs

I want to do a bunch of things that will increase costs, but eventually decrease them

Great. Do it - the policy is intended to apply to arc's of work, or stories, not to individual commits. (But sometimes individual commits are the right place to examine such things).

When

The LP Project lead approved this policy on the 17th Feb 2012.

PolicyAndProcess/MaintenanceCosts (last edited 2012-04-11 21:36:05 by lifeless)