<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Panopticode Blog: New Metric: C.R.A.P.</title>
    <link>http://blog.panopticode.org/articles/2007/10/07/new-metric-c-r-a-p</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>New Metric: C.R.A.P.</title>
      <description>&lt;p&gt;The good folks at &lt;a href="http://www.agitar.com/"&gt;Agitar&lt;/a&gt; have proposed a new metric, C.R.A.P and an Eclipse plugin &lt;a href="http://www.artima.com/weblogs/viewpost.jsp?thread=215899"&gt;crap4j&lt;/a&gt; for executing it.&lt;/p&gt;

&lt;p&gt;C.R.A.P. combines a method&amp;#8217;s complexity with its coverage to come up with a single number that can help you determine if somebody will say, &lt;em&gt;&amp;#8220;Oh crap!&amp;#8221;&lt;/em&gt; when they have to work with it.  The formula is: &lt;/p&gt;

&lt;p&gt;&lt;code&gt;CRAP(m) = comp(m)^2 * (1 – cov(m)/100)^3 + comp(m)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Read their &lt;a href="http://www.artima.com/weblogs/viewpost.jsp?thread=215899"&gt;article&lt;/a&gt; for details on deciding if a system is crappy or not.&lt;/p&gt;

&lt;p&gt;To test the flexibility of Panopticode I decided to implement a C.R.A.P. Supplement.  It took a little over an hour.&lt;/p&gt;

&lt;p&gt;Looking at the results I was pleased to find that only one method in Panopticode exceeds Agitar&amp;#8217;s 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;&lt;/p&gt;</description>
      <pubDate>Sun, 07 Oct 2007 16:17:00 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:8a678c8a-0e3f-40c7-8452-cf962ea67344</guid>
      <author>Julias Shaw</author>
      <link>http://blog.panopticode.org/articles/2007/10/07/new-metric-c-r-a-p</link>
      <category>Metrics</category>
    </item>
  </channel>
</rss>
