3 ms·
What metrics do you use to determine "actual cost-benefit"? Well, if one were to take into account hard metrics for every 4 line snippet of code, then I'm not
by stcredzero 15y ago
What metrics do you use to determine "actual cost-benefit"?
Well, if one were to take into account hard metrics for every 4 line snippet of code, then I'm not sure enough would get done fast enough. In the context of everyday programming and of the 3 examples I quoted, it's enough to ask yourself questions like: what would a newbie understand? What would an average programmer recognize immediately? If there's a quick obvious answer to either of those questions, and no onerous externalities involved, then that's what you write. (The code being 10X longer or too slow or too likely to contain bugs would be an onerous externality.)
This isn't to say that metrics aren't useful here. The question is how to apply them at a low enough cost. In a large company, perhaps one could A/B test variations on coding standards. In a diverse group of small programming shops with internally consistent coding standards or styles, one might gather metrics on bugs per line of code versus features of coding styles.
Something to think about. It's not as if metrics are commonly used to make these decisions now. Either edicts come from on high, or the local alpha-coder declarers what's best in her/his experience.