{"id":69,"date":"2007-10-07T10:05:57","date_gmt":"2007-10-07T17:05:57","guid":{"rendered":"http:\/\/www.juliasshaw.com\/blog\/?p=69"},"modified":"2007-10-07T10:05:57","modified_gmt":"2007-10-07T17:05:57","slug":"new-metric-crap","status":"publish","type":"post","link":"http:\/\/www.juliasshaw.com\/blog\/2007\/10\/07\/new-metric-crap\/","title":{"rendered":"New Metric: C.R.A.P."},"content":{"rendered":"<p>The good folks at\u00a0<a href=\"http:\/\/www.agitar.com\/\">Agitar<\/a>\u00a0have proposed a new metric, C.R.A.P and an Eclipse plugin\u00a0<a href=\"http:\/\/www.artima.com\/weblogs\/viewpost.jsp?thread=215899\">crap4j<\/a>\u00a0for executing it.<\/p>\n<p>C.R.A.P. combines a method\u2019s complexity with its coverage to come up with a single number that can help you determine if somebody will say,<em>\u201cOh crap!\u201d<\/em>\u00a0when they have to work with it. The formula is:<\/p>\n<p><code>CRAP(m) = comp(m)^2 * (1 \u2013 cov(m)\/100)^3 + comp(m)<\/code><\/p>\n<p>Read their\u00a0<a href=\"http:\/\/www.artima.com\/weblogs\/viewpost.jsp?thread=215899\">article<\/a>\u00a0for details on deciding if a system is crappy or not.<\/p>\n<p>To test the flexibility of Panopticode I decided to implement a C.R.A.P. Supplement. It took a little over an hour.<\/p>\n<p>Looking at the results I was pleased to find that only one method in Panopticode exceeds Agitar\u2019s C.R.A.P. threshold of 30. Unfortunately that leads me to believe that 30 is too high. Right now, there is a lot of spike code in Panopticode right now that I consider crappy ;-&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The good folks at Agitar have proposed a new metric, C.R.A.P and an Eclipse plugin crap4j for executing it. C.R.A.P. combines a method\u2019s complexity with its coverage to come up with a single number that can help you determine if somebody will say,\u201cOh crap!\u201d when they have to work with it. <a href=\"http:\/\/www.juliasshaw.com\/blog\/2007\/10\/07\/new-metric-crap\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[17,25],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-categories-suck-tags-rule","tag-metrics","tag-technology"],"_links":{"self":[{"href":"http:\/\/www.juliasshaw.com\/blog\/wp-json\/wp\/v2\/posts\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.juliasshaw.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.juliasshaw.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.juliasshaw.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.juliasshaw.com\/blog\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":0,"href":"http:\/\/www.juliasshaw.com\/blog\/wp-json\/wp\/v2\/posts\/69\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.juliasshaw.com\/blog\/wp-json\/wp\/v2\/media?parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.juliasshaw.com\/blog\/wp-json\/wp\/v2\/categories?post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.juliasshaw.com\/blog\/wp-json\/wp\/v2\/tags?post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}