Hacker News new | ask | show | jobs
by socalgal2 234 days ago
Sound like coding to the metrics would lead to hard to read code as you find creative and convoluted ways to multiply by one and zero so to pretend you aren’t branching
3 comments

"When a measure becomes a target, it ceases to be a good measure."

You are free to interpret the score within the broader context of your own experience, the problem domain your code addresses, time constraints, etc.

Measuring complexity shouldn’t lead to finding creative ways to avoid complexity, but instead be used as a tool to encapsulate complexity well.

It could be misapplied, of course, like every other principle. For example, DRY is a big one. Just like DRY, there are cases where complexity is deserved: if nothing else, simply considering that no code used in real world context can ever be perfect, it is useful to have another measure that could hint on what to focus on in future iterations.

Oh, it does. That's what experience teaches you - that the measure is not the target.