[from CodeSmellMetrics]
Metrics are generally used to measure progress towards some goal. A boolean metric won't tell you if you're moving toward the goal or away from it, only that you've reached the goal or have failed to reach it.
Imagine a car with a red light instead of a speedometer!
There are boolean indicators in my car that tell me if something has passed a threshold (low on oil, door ajar, etc.) My unit tests each have a pass/fail criteria. I use these like the lights in my car; if a test fails, it requires further attention. In the case of regression tests, I find it useful to know the answer to the question "Did I break anything?" If I broke something that I didn't intend to, then I'm moving farther away from my goal. -- DavidNoble
I don't think a boolean indicator is a metric. I'm trying form a definition of metric in my head, but I'm having trouble. To me, a metric is like a vector or a set of line segments all having the same or substantially the same direction, but different lengths. A single boolean indicator, to me, is nothing better than a point. Certainly a large number of points can be used to approximate a line, but a single one isn't much help. -- MarkAddleman
Long term, a single boolean is utterly useless.
But a steady stream of booleans... that's a different story altogether!
Exactly: As I exercise on the electronic bicycle at the gym, it displays "pedal faster" and "pedal slower" boolean lights. Both provide valuable feedback. (...which I ignore most of the time. ;-)
A simultaneous collection of booleans is also useful: We have 16 red lights and 5 green ones, so we know where to put our attention, and can judge whether something is "good enough" to ship right now. Over time we can track the number of reds and greens to see progress.
Also, we can consider fuzzy logic:
A boolean metric won't tell you if you're moving toward the goal or away from it, only that you've reached the goal or have failed to reach it. Which is very useful. When the boolean metric tells you that you've reached your goal, stop trying to move towards it.
But just because an indicator is useful, does that make it a metric? WhatAreMetrics?
Nope, but being useful does make something not useless, whether it is a metric or not. As to the second question, see MetricsRant, and the related AreTheseMetrics, which gives some examples of things that aren't.
See DynamicAttractor.