{"id":770,"date":"2010-07-14T17:09:09","date_gmt":"2010-07-14T15:09:09","guid":{"rendered":"http:\/\/complexitymaze.com\/?p=770"},"modified":"2010-07-14T17:09:09","modified_gmt":"2010-07-14T15:09:09","slug":"cheat-your-way-to-a-liveable-codebase","status":"publish","type":"post","link":"https:\/\/complexitymaze.com\/?p=770","title":{"rendered":"Cheat your way to a liveable codebase"},"content":{"rendered":"<blockquote><p>Our industry is plagued by an epidemic of very bad code<\/p><\/blockquote>\n<p> \u2013 Robert C. Martin (known as Uncle Bob), founder of ObjectMentor and author of several books including <a href=\"http:\/\/www.amazon.com\/gp\/product\/0132350882?ie=UTF8&#038;tag=compex08-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0132350882\">Clean Code: A Handbook of Agile Software Craftsmanship<\/a>.<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.assoc-amazon.com\/e\/ir?t=compex08-20&#038;l=as2&#038;o=1&#038;a=0132350882\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><\/p>\n<p>Of course Uncle Bob would say that because it serves his purpose of selling the Clean Code-book, but I would still agree with him on this one. I often hear a lot of programmers complaining that in a world of perpetual recurring short deadlines there will be a lot of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Technical_debt\">technical debt and code debt<\/a> in our line of work. Unfortunately. <\/p>\n<p>But what can we do about it? There is never time for a spring cleaning and the business usually can&#8217;t see the point of such an activity, but hey, they are not the ones having to live in that messed up codebase.<\/p>\n<p>Sometimes I even hear the technical debt argument as a anti-agile argument &#8211; because an organic not-designed-up-front architecture is inevitably going to end up with a lot of technical debt IF NOT REFACTORED on a regular basis. My answer to that, is that refactoring is a part of any agile programmers job &#8211; your story is not finished before you have refactored the code and considering architectural refactoring should be part of sprint planning.<\/p>\n<p>A similar point is made by Uncle Bob in this video from the IT-conference <a href=\"http:\/\/www.jaoo.dk\">JAOO<\/a> (about 7 minutes in);<br \/>\nWhen Uncle Bob asks Pete McBreen how a programmer can get the time to write good code and his answer is: &#8220;you should <em>cheat the boss<\/em> \u2013 just write good code without permission to use the time&#8221;, Uncle Bob comments, that he doesn\u2019t consider that cheating \u2013 he considers that professionalism!<\/p>\n<p> I still believe that an organic REFACTORED architecture is better than an up-front-planned architecture, that is outdated and worked around when adding new features.<\/p>\n<p><embed src=\"http:\/\/blip.tv\/play\/6Va55HEC\" type=\"application\/x-shockwave-flash\" width=\"576\" height=\"360\" allowscriptaccess=\"always\" allowfullscreen=\"true\"><\/embed><\/p>\n<p>Is your work also impeded by bad code? Do you consider it professionalism to cheat your way to a liveable codebase?<\/p>\n<p>P.S. Michael Feathers (also in the video) just wrote a blog post about <a href=\"http:\/\/michaelfeathers.typepad.com\/michael_feathers_blog\/2010\/07\/the-bad-code-kata.html\">learning from bad code<\/a>. Please consider helping him with this project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Our industry is plagued by an epidemic of very bad code \u2013 Robert C. Martin (known as Uncle Bob), founder of ObjectMentor and author of several books including Clean Code: A Handbook of Agile Software Craftsmanship. Of course Uncle Bob would say that because it serves his purpose of selling the Clean Code-book, but I [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[20,26,32,83,155,238,260,278,284,347,352],"class_list":["post-770","post","type-post","status-publish","format-standard","hentry","category-geeky","tag-agile","tag-architecture","tag-bad-code","tag-clean-code","tag-good-code","tag-michael-feathers","tag-pete-mcbreen","tag-refactoring","tag-robert-c-martin","tag-uncle-bob","tag-video"],"_links":{"self":[{"href":"https:\/\/complexitymaze.com\/index.php?rest_route=\/wp\/v2\/posts\/770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/complexitymaze.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/complexitymaze.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/complexitymaze.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/complexitymaze.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=770"}],"version-history":[{"count":0,"href":"https:\/\/complexitymaze.com\/index.php?rest_route=\/wp\/v2\/posts\/770\/revisions"}],"wp:attachment":[{"href":"https:\/\/complexitymaze.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/complexitymaze.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/complexitymaze.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}