{"id":26916,"date":"2016-11-20T20:48:01","date_gmt":"2016-11-20T18:48:01","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=26916"},"modified":"2016-11-20T20:48:01","modified_gmt":"2016-11-20T18:48:01","slug":"how-to-read-and-improve-the-c-r-a-p-index-of-your-code","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2016\/11\/20\/how-to-read-and-improve-the-c-r-a-p-index-of-your-code\/","title":{"rendered":"How to Read and Improve the C.R.A.P Index of your code"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"26917\" data-permalink=\"https:\/\/mamchenkov.net\/wordpress\/2016\/11\/20\/how-to-read-and-improve-the-c-r-a-p-index-of-your-code\/crapclasscompletetest\/\" data-orig-file=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/11\/crapClassCompleteTest.png?fit=1219%2C142&amp;ssl=1\" data-orig-size=\"1219,142\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"crapclasscompletetest\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/11\/crapClassCompleteTest.png?fit=660%2C77&amp;ssl=1\" class=\"aligncenter size-medium wp-image-26917\" src=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/11\/crapClassCompleteTest-500x58.png?resize=500%2C58&#038;ssl=1\" alt=\"crapclasscompletetest\" width=\"500\" height=\"58\" srcset=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/11\/crapClassCompleteTest.png?resize=500%2C58&amp;ssl=1 500w, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/11\/crapClassCompleteTest.png?resize=768%2C89&amp;ssl=1 768w, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/11\/crapClassCompleteTest.png?resize=1024%2C119&amp;ssl=1 1024w, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/11\/crapClassCompleteTest.png?w=1219&amp;ssl=1 1219w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>Levi Hackwith has an excellent post explaining &#8220;<a href=\"http:\/\/www.levihackwith.com\/how-to-read-and-improve-the-c-r-a-p-index-of-your-code\/\">How to Read and Improve the C.R.A.P Index of your code<\/a>&#8220;:<\/p>\n<blockquote><p>The C.R.A.P. (Change Risk Analysis and Predictions) index is designed to analyze and predict the amount of effort, pain, and time required to maintain an existing body of code.<\/p><\/blockquote>\n<p>It iterates over the old bits of wisdom &#8211; write simpler code and cover it with unit tests &#8211; but it does so in a very simple and measurable way.<\/p>\n<p>He also reminds us that:<\/p>\n<blockquote><p>\u2026software metrics, in general, are just tools. No single metric can tell the whole story; it\u2019s just one more data point. Metrics are meant to be used by developers, not the other way around \u2013 the metric should work for you, you should not have to work for the metric. Metrics should never be an end unto themselves. Metrics are meant to help you think, not to do the thinking for you. ~Alberto Savoia<\/p><\/blockquote>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>Levi Hackwith has an excellent post explaining &#8220;How to Read and Improve the C.R.A.P Index of your code&#8220;: The C.R.A.P. (Change Risk Analysis and Predictions) index is designed to analyze and predict the amount of effort, pain, and time required to maintain an existing body of code. It iterates over the old bits of wisdom &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2016\/11\/20\/how-to-read-and-improve-the-c-r-a-p-index-of-your-code\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How to Read and Improve the C.R.A.P Index of your code<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"How to Read and Improve the C.R.A.P Index of your code #WebDev #testing #QA","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,18,62,1334],"tags":[38,3074,1108,1330],"keyring_services":[],"class_list":["post-26916","post","type-post","status-publish","format-standard","hentry","category-general","category-programming","category-technology","category-web-work","tag-php","tag-quality-assurance","tag-testing","tag-web-development"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":10070,"url":"https:\/\/mamchenkov.net\/wordpress\/2006\/04\/23\/daily-del-icio-us-bookmarks\/","url_meta":{"origin":26916,"position":0},"title":"Daily del.icio.us bookmarks","author":"Leonid Mamchenkov","date":"April 23, 2006","format":false,"excerpt":"Shared bookmarks for del.icio.us user tvset on 2006-04-22 Interesting Google Calendars Tagged as: calendar calendars cool culture events google history holidays internet lists social software time tools gethuman database -- Per-company instructions on how to get through to a live person, bypassing infinite answering machines, and questions. Tagged as: automation\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26069,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/04\/26\/common-files-in-php-packages\/","url_meta":{"origin":26916,"position":1},"title":"Common files in PHP packages","author":"Leonid Mamchenkov","date":"April 26, 2016","format":false,"excerpt":"Jordi Boggiano looks at some common files in PHP packages, using Packagist as a data source. \u00a0There are some interesting metrics in there. \u00a0For example: 58% of packages include a src\/ directory and 5% a lib\/ one. That's surprisingly low to me, that means a lot have the code simply\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":18182,"url":"https:\/\/mamchenkov.net\/wordpress\/2013\/05\/20\/quinico-web-insights\/","url_meta":{"origin":26916,"position":2},"title":"Quinico web insights","author":"Leonid Mamchenkov","date":"May 20, 2013","format":"link","excerpt":"Quinico web insights Quinico is an open source web application designed to help you easily improve your website's performance, reduce errors and optimize for search engines (SEO). \u00a0Quinico can constantly monitor your websites and alert you when there is a problem that requires attention. \u00a0Using Quinico, you can automate the\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":18404,"url":"https:\/\/mamchenkov.net\/wordpress\/2013\/06\/25\/librato-metrics-monitoring-and-alerts\/","url_meta":{"origin":26916,"position":3},"title":"librato &#8211; metrics, monitoring and alerts","author":"Leonid Mamchenkov","date":"June 25, 2013","format":"link","excerpt":"librato - metrics, monitoring and alerts","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":21405,"url":"https:\/\/mamchenkov.net\/wordpress\/2014\/03\/27\/ngxtop-real-time-metrics-for-nginx-server\/","url_meta":{"origin":26916,"position":4},"title":"ngxtop &#8211; real-time metrics for nginx server","author":"Leonid Mamchenkov","date":"March 27, 2014","format":"link","excerpt":"ngxtop - real-time metrics for nginx server","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":22476,"url":"https:\/\/mamchenkov.net\/wordpress\/2014\/09\/03\/grafana-an-open-source-feature-rich-metrics-dashboard-and-graph-editor-for-graphite-influxdb-opentsdb\/","url_meta":{"origin":26916,"position":5},"title":"Grafana &#8211; an open source, feature rich metrics dashboard and graph editor for  Graphite, InfluxDB &#038; OpenTSDB","author":"Leonid Mamchenkov","date":"September 3, 2014","format":"link","excerpt":"Grafana - an open source, feature rich metrics dashboard and graph editor for \u00a0Graphite, InfluxDB & OpenTSDB","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"grafana dashboard","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2014\/09\/grafana-dashboard-500x129.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/26916","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=26916"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/26916\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=26916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=26916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=26916"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=26916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}