On Tue, 24 Jun 2014 13:54:19 +0200 Arvin Schnell <aschnell@suse.de> wrote:
On Tue, Jun 24, 2014 at 01:48:42PM +0200, Josef Reidinger wrote:
For me success measurement is also how much developer worry that he brake something. It usually is solved by tests and it can be measured - https://github.com/mbj/mutant
So for me reasonable metrics on which we should focus for refactoring:
- test coverage + mutation testing ( to not scare modify code ) - file size ( noone want to read too long files, hard to search, hard to test, hard to keep all dependencies ) - method size ( hard to understand method that do too much and also hard to change it with keeping all stuff in mind ) - public interface size ( smaller better, provide good API, that do all needed and not more, easier to keep things backward compatible ), in converted code it is number of methods in publish, for new code public methods on classes - http://pdepend.org/documentation/software-metrics/number-of-public-methods.h...
In general we can be inspired by already existing metrics, e.g. for object oriented code - http://agile.csc.ncsu.edu/SEMaterials/OOMetrics.htm
Please keep in mind that we have code in several languages, e.g. Ruby, C++, Perl, Bash, Python, and also plain data, e.g. XML.
Regards, Arvin
Good point, there is two ways how to see it - we are going to unify it to ruby and c++ and of course data in various formats, so in current world, where is two main ways of coding ( functional and object ) make more sense for us to use object one as we need states and also ruby support it quite nicely. - principles of object oriented code can be used in always all languages, it is just question how hard it is. Even gtk in pure C use objects (BTW target map passed to some storage methods also simulate object, just it is not coupled with its methods). I think a lot of principles written above make sense even in not pure object oriented language. Josef -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org