views:

121

answers:

3

I am using code complexity metric, and line of code(per function).
This keeping the code short and readable.

What code metrics you using?

+4  A: 

I measure code quality by WTF's per minute: http://blog.energizedwork.com/2008/08/wtfs-per-minute.html

This specific image comes from the book Clean Code: http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882 It has a lot of info on how to keep your code clean and maintainable. Including guidelines on function length.

WoLpH
+3  A: 

I do not believe in metrics, they often give incentives to write metric friendly but bad code.

Note that low LOC and similar metrics are still usually good guidelines, when not used as a metric.

Ofir
So, you are using LOC, but avoiding other metrics.
Avram
No - I do not use it (or others) as a metric - but use them as guidlines (i.e. try to minimize LOC per function, minimize coupling, etc.)
Ofir
Good comment, you can read my question as guidlines not as metric in your meaning
Avram
A: 

we are tracking bunch of code change metrics including: number of lines changes, lines deleted, new lines added. Also we use our own product "programeter" to track code "knowhow" based on how many lines of code were written by specific developer. this helps us to understand who has the knowledge in certain components.

But, if tracking code metrics, I also suggest to pay enough attention on defect metrics. It helps to balance quality efforts between code quality and quality from customer perspective. Something like "defects found after release" or "defects found per 1,000 lines changed"

Mark Kofman
your metric tracking goal, is to understand who respond for changes/code-base, correct?
Avram