What are the most useful software development metrics? [closed]

孤者浪人 提交于 2019-12-20 08:29:12

问题


I would like to track metrics that can be used to improve my team’s software development process, improve time estimates, and detect special case variations that need to be addressed during the project execution.

Please limit each answer to a single metric, describe how to use it, and vote up the good answers.


回答1:


       

(source: osnews.com)




回答2:


ROI.

The total amount of revenue brought in by the software minus the total amount of costs to produce the software. Breakdown the costs by percentage of total cost and isolate your poorest performing and most expensive area in terms of return-on-investment. Improve, automate, or eliminate that problem area if possible. Conversely, find your highest return-on-investment area and find ways to amplify its effects even further. If 80% of your ROI comes from 20% of your cost or effort, expand that particular area and minimize the rest by comparison.

Costs will include payroll, licenses, legal fees, hardware, office equipment, marketing, production, distribution, and support. This can be done on a macro level for a company as whole or a micro level for a team or individual. It can also be applied to time, tasks, and methods in addition to revenue.

This doesn't mean ignore all the details, but find a way to quantify everything and then concentrate on the areas that yield the best (objective) results.




回答3:


Inverse code coverage

Get a percentage of code not executed during a test. This is similiar to what Shafa mentioned, but the usage is different. If a line of code is ran during testing then we know it might be tested. But if a line of code has not been ran then we know for sure that is has not been tested. Targeting these areas for unit testing will improve quality and takes less time than auditing the code that has been covered. Ideally you can do both, but that never seams to happen.




回答4:


"improve my team’s software development process": Defect Find and Fix Rates

This relates to the number of defects or bugs raised against the number of fixes which have been committed or verified.

I'd have to say this is one of the really important metrics because it gives you two things:

  • 1. Code churn. How much code is being changed on a daily/weekly basis (which is important when you are trying to stabilize for a release), and,
  • 2. Shows you whether defects are ahead of fixes or vice-versa. This shows you how well the development team is responding to defects raised by the QA/testers.
  • A low fix rate indicates the team is busy working on other things (features perhaps). If the bug count is high, you might need to get developers to address some of the defects.
    A low find rate indicates either your solution is brilliant and almost bug free, or the QA team have been blocked or have another focus.




    回答5:


    Track how long is takes to do a task that has an estimate against it. If they were well under, question why. If they are well over, question why.

    Don't make it a negative thing, it's fine if tasks blow out or were way under estimated. Your goal is to continually improve your estimation process.




    回答6:


    Track the source and type of bugs that you find.

    The bug source represents the phase of development in which the bug was introduced. (eg. specification, design, implementation etc.)

    The bug type is the broad style of bug. eg. memory allocation, incorrect conditional.

    This should allow you to alter the procedures you follow in that phase of development and to tune your coding style guide to try to eliminate over represented bug types.




    回答7:


    Velocity: the number of features per given unit time.

    Up to you to determine how you define features, but they should be roughly the same order of magnitude otherwise velocity is less useful. For instance, you may classify your features by stories or use cases. These should be broken down so that they are all roughly the same size. Every iteration, figure out how many stories (use-cases) got implemented (completed). The average number of features/iteration is your velocity. Once you know your velocity based on your feature unit you can use it to help estimate how long it will take to complete new projects based on their features.

    [EDIT] Alternatively, you can assign a weight like function points or story points to each story as a measure of complexity, then add up the points for each completed feature and compute velocity in points/iteration.




    回答8:


    Track the number of clones (similar code snippets) in the source code.

    Get rid of clones by refactoring the code as soon as you spot the clones.




    回答9:


    Average function length, or possibly a histogram of function lengths to get a better feel.

    The longer a function is, the less obvious its correctness. If the code contains lots of long functions, it's probably a safe bet that there are a few bugs hiding in there.




    回答10:


    number of failing tests or broken builds per commit.




    回答11:


    interdependency between classes. how tightly your code is coupled.




    回答12:


    Track whether a piece of source has undergone review and, if so, what type. And later, track the number of bugs found in reviewed vs. unreviewed code.

    This will allow you to determine how effectively your code review process(es) are operating in terms of bugs found.




    回答13:


    If you're using Scrum, the backlog. How big is it after each sprint? Is it shrinking at a consistent rate? Or is stuff being pushed into the backlog because of (a) stuff that wasn't thought of to begin with ("We need another use case for an audit report that no one thought of, I'll just add it to the backlog.") or (b) not getting stuff done and pushing it into the backlog to meet the date instead of the promised features.




    回答14:


    http://cccc.sourceforge.net/

    Fan in and Fan out are my favorites.

    Fan in: How many other modules/classes use/know this module

    Fan out: How many other modules does this module use/know




    回答15:


    improve time estimates

    While Joel Spolsky's Evidence-based Scheduling isn't per se a metric, it sounds like exactly what you want. See http://www.joelonsoftware.com/items/2007/10/26.html




    回答16:


    I especially like and use the system that Mary Poppendieck recommends. This system is based on three holistic measurements that must be taken as a package (so no, I'm not going to provide 3 answers):

    1. Cycle time
      • From product concept to first release or
      • From feature request to feature deployment or
      • From bug detection to resolution
    2. Business Case Realization (without this, everything else is irrelevant)
      • P&L or
      • ROI or
      • Goal of investment
    3. Customer Satisfaction
      • e.g. Net Promoter Score

    I don't need more to know if we are in phase with the ultimate goal: providing value to users, and fast.




    回答17:


    number of similar lines. (copy/pasted code)




    回答18:


    improve my team’s software development process

    It is important to understand that metrics can do nothing to improve your team’s software development process. All they can be used for is measuring how well you are advancing toward improving your development process in regards to the particular metric you are using. Perhaps I am quibbling over semantics but the way you are expressing it is why most developers hate it. It sounds like you are trying to use metrics to drive a result instead of using metrics to measure the result.

    To put it another way, would you rather have 100% code coverage and lousy unit tests or fantastic unit tests and < 80% coverage?

    Your answer should be the latter. You could even want the perfect world and have both but you better focus on the unit tests first and let the coverage get there when it does.




    回答19:


    Most of the aforementioned metrics are interesting but won't help you improve team performance. Problem is your asking a management question in a development forum.

    Here are a few metrics: Estimates/vs/actuals at the project schedule level and personal level (see previous link to Joel's Evidence-based method), % defects removed at release (see my blog: http://redrockresearch.org/?p=58), Scope creep/month, and overall productivity rating (Putnam's productivity index). Also, developers bandwidth is good to measure.




    回答20:


    Every time a bug is reported by the QA team- analyze why that defect escaped unit-testing by the developers.

    Consider this as a perpetual-self-improvement exercise.




    回答21:


    I like Defect Resolution Efficiency metrics. DRE is ratio of defects resolved prior to software release against all defects found. I suggest tracking this metrics for each release of your software into production.




    回答22:


    Tracking metrics in QA has been a fundamental activity for quite some time now. But often, development teams do not fully look at how relevant these metrics are in relation to all aspects of the business. For example, the typical tracked metrics such as defect ratios, validity, test productivity, code coverage etc. are usually evaluated in terms of the functional aspects of the software, but few pay attention to how they matter to the business aspects of software.

    There are also other metrics that can add much value to the business aspects of the software, which is very important when an overall quality view of the software is looked at. These can be broadly classified into:

    1. Needs of the beta users captured by business analysts, marketing and sales folks
    2. End-user requirements defined by the product management team
    3. Ensuring availability of the software at peak loads and ability of the software to integrate with enterprise IT systems
    4. Support for high-volume transactions
    5. Security aspects depending on the industry that the software serves
    6. Availability of must-have and nice-to-have features in comparison to the competition
    7. And a few more….



    回答23:


    Code coverage percentage




    回答24:


    If you're using Scrum, you want to know how each day's Scrum went. Are people getting done what they said they'd get done?

    Personally, I'm bad at it. I chronically run over on my dailies.




    回答25:


    Perhaps you can test CodeHealer

    CodeHealer performs an in-depth analysis of source code, looking for problems in the following areas:

    • Audits Quality control rules such as unused or unreachable code, use of directive names and keywords as identifiers, identifiers hiding others of the same name at a higher scope, and more.
    • Checks Potential errors such as uninitialised or unreferenced identifiers, dangerous type casting, automatic type conversions, undefined function return values, unused assigned values, and more.
    • Metrics Quantification of code properties such as cyclomatic complexity, coupling between objects (Data Abstraction Coupling), comment ratio, number of classes, lines of code, and more.



    回答26:


    Size and frequency of source control commits.



    来源:https://stackoverflow.com/questions/189388/what-are-the-most-useful-software-development-metrics

    标签
    易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
    该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!