{"id":1261,"date":"2014-10-03T04:43:33","date_gmt":"2014-10-03T11:43:33","guid":{"rendered":"http:\/\/10kdev.net\/?p=1261"},"modified":"2014-10-06T06:41:51","modified_gmt":"2014-10-06T13:41:51","slug":"qa-will-find-them-or-the-story-of-cowboy-coders-and-non-collaboration","status":"publish","type":"post","link":"http:\/\/10kdev.net\/?p=1261","title":{"rendered":"&#8220;QA Will Find Them&#8221; &#8212; Or The Story Of Cowboy Coders And Non-Collaboration"},"content":{"rendered":"<p><a href=\"http:\/\/10kdev.net\/wp-content\/uploads\/2014\/10\/496f65fadebee70208871ea2838b9810.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/10kdev.net\/wp-content\/uploads\/2014\/10\/496f65fadebee70208871ea2838b9810.png\" alt=\"\" width=\"514\" height=\"194\" \/><\/a><\/p>\n<p>I was on a project with a very tough defect assigned to me.\u00a0 The main class consisted of 1600 lines with zeee-ro unit tests, and a McAbe index of 67.\u00a0 I had found numerical\/scale\/precision errors in some of the underlying classes and knew the source data had fields that were not necessarily being used for what the columns were named to be.\u00a0 The effort to fix would involve collaboration with the business and some of the coders who authored this beauty &#8212; as I could see from their names in the repository.<!--more--><\/p>\n<p>When I approached these coders I was given a few dead ends and completely side-stepped.\u00a0 One of the coders told me literally to drop the bug, there was nothing to be done.\u00a0 That, and new management had taken down our servers we needed to have for development not realizing this application wasn&#8217;t a little gum-ball web application, it was a full on fat client dependent on SOAP, JMX, JDBC, remote call services and crappily implemented observer patterns, singletons and shifty-eyed mutex code.\u00a0 Oh and recursive calls &#8212; on all that threaded code.<\/p>\n<p>After about 6 hours of analysis, debug and discussion with these other coders, and a git branch of the start of its solution (I was the only one who understood the service side of the problem) I came to a decision that we needed a business talk before tech implementation.\u00a0 That talk never happened; I went back to my desk and found the two cohort coders working on the problem with the test example QA had given me &#8212; these co-workers had taken it off my desk without permission.\u00a0 I asked straight up if they were working on it, they said no, and I heard them continue on as well as talk about counter-information they had given me.\u00a0 They decided also that the business would have to deal with their solution without talking with them.\u00a0 The business involved a few thousand users critical to the sales of the company; training was more of a discovery process than a standard because of this kind of approach.<\/p>\n<p>Mind you, management had assigned me this defect.\u00a0 I told them I would have to be taken off that bug without a business discussion, and assigned it back to the defect stack with the addition of the information I had.\u00a0 Then I issued my warning:\u00a0 &#8220;you have to talk to the business about this, and you need to make some unit tests around this; we do not understand the business around this and more bugs will show up without testing. \u00a0Find the bugs before they get checked in.&#8221;<\/p>\n<p>Then I was told <em><strong>&#8220;QA Will Find Them.&#8221;<\/strong>\u00a0 <\/em>And QA *did* find them.<\/p>\n<div style=\"width: 197px\" class=\"wp-caption alignright\"><a href=\"http:\/\/10kdev.net\/wp-content\/uploads\/2014\/10\/5e02f25f8e778d2378af756cf97a3146.png\"><img decoding=\"async\" loading=\"lazy\" class=\"\" src=\"http:\/\/10kdev.net\/wp-content\/uploads\/2014\/10\/5e02f25f8e778d2378af756cf97a3146.png\" alt=\"\" width=\"187\" height=\"233\" \/><\/a><p class=\"wp-caption-text\">Is this guy coding for you?<\/p><\/div>\n<p>Two days later they decided the coding was good enough, and started to roll it out.\u00a0 It broke. \u00a0It kept breaking into the weekend &#8212; almost a week. \u00a0The patch cycle was incremental and non-retrospective: fix as fast as possible with no requirements drilling or unit testing. \u00a0 It took 3-4 people about 6-8 hours each\u00a0to repeatedly fix\/release the code just to get a halfway decent deployment.\u00a0\u00a0 The for\u00a0days the coders sat with QA fixing bugs here and there.\u00a0 I figured, due to not having those conversations, not stopping and breathing a bit, they soaked up about another 20+ hours of total company time. \u00a0Still not writing at least some tests, in the future this code will break more soaking up more hours.<\/p>\n<p>So I watched the fiasco with curiosity.\u00a0\u00a0 The lessons I draw from this scenario are:<\/p>\n<ul>\n<li>Write tests on code.\u00a0 If there are none, just write one.\u00a0 Over time it will build up.\u00a0 If they had followed this then a test could have broken for this scenario.<\/li>\n<li>If you solely depend on QA to find your bugs it means you are not a developer.\u00a0 It is a developer&#8217;s JOB to cover end cases and test our own code first.\u00a0 Throwing it to QA is a waste of time for the company and problems like the scale\/precision errors can bleed through because those can only be tested at the unit level properly, not the black box level.\u00a0 A decimal should have broke that code, but it didn&#8217;t!<\/li>\n<li>Being non-collaborative and dishonest to other developers, well, what can I say.\u00a0 Be careful it might get documented.\u00a0 Dishonesty is paid for by company dollars and that hurts everyone including customers as well as the integrity of the development profession.<\/li>\n<li>Cowboy coding with business rules is sure to end up in re-write. \u00a0You can&#8217;t &#8220;de-lite&#8221; you r customers like that.<\/li>\n<li>Good enough still has to be <strong><em>good<\/em><\/strong>.<\/li>\n<li>Quality will pay for itself.\u00a0 With code *and* with people.<\/li>\n<\/ul>\n<p>Since I&#8217;ve been through a million of these kinds of things I decided to write some tests around the problem on my end-of-day contributions in addition to the other code I had been writing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was on a project with a very tough defect assigned to me.\u00a0 The main class consisted of 1600 lines with zeee-ro unit tests, and a McAbe index of 67.\u00a0 I had found numerical\/scale\/precision errors in some of the underlying classes and knew the source data had fields that were not necessarily being used for [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[14,17],"tags":[],"_links":{"self":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/1261"}],"collection":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1261"}],"version-history":[{"count":6,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/1261\/revisions"}],"predecessor-version":[{"id":1274,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/1261\/revisions\/1274"}],"wp:attachment":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1261"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}