{"id":2601,"date":"2011-03-02T08:49:09","date_gmt":"2011-03-02T16:49:09","guid":{"rendered":"http:\/\/www.chesnok.com\/daily\/?p=2601"},"modified":"2012-03-26T03:07:25","modified_gmt":"2012-03-26T11:07:25","slug":"broken-windows-broken-code-broken-systems","status":"publish","type":"post","link":"https:\/\/www.chesnok.com\/daily\/2011\/03\/02\/broken-windows-broken-code-broken-systems\/","title":{"rendered":"Broken windows, broken code, broken systems"},"content":{"rendered":"<p>A few days ago, I asked: <\/p>\n<p><a href=\"http:\/\/www.chesnok.com\/daily\/wp-content\/uploads\/2011\/03\/Twitter-_-@Selena-Deckelmann_-Is-there-a-_broken-window_-....png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.chesnok.com\/daily\/wp-content\/uploads\/2011\/03\/Twitter-_-@Selena-Deckelmann_-Is-there-a-_broken-window_-...-300x116.png\" alt=\"\" title=\"Twitter _ @Selena Deckelmann_ Is there a _broken window_ ...\" width=\"300\" height=\"116\" class=\"aligncenter size-medium wp-image-2665\" srcset=\"https:\/\/www.chesnok.com\/daily\/wp-content\/uploads\/2011\/03\/Twitter-_-@Selena-Deckelmann_-Is-there-a-_broken-window_-...-300x116.png 300w, https:\/\/www.chesnok.com\/daily\/wp-content\/uploads\/2011\/03\/Twitter-_-@Selena-Deckelmann_-Is-there-a-_broken-window_-....png 497w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I spend a lot of time thinking about the little details in systems &#8211; like the number of ephemeral ports consumed, number of open file descriptors and per-process memory utilization over time. Small changes across 50 machines can add up to a large overall change in performance. <\/p>\n<p>And then, today, I saw <a href=\"http:\/\/infoworld.com\/print\/152375\">this article<\/a>: <\/p>\n<blockquote><p>One of the more telling comments I received was the idea that since the advent of virtualization, there&#8217;s no point in trying to fix anything anymore. If a weird error pops up, just redeploy the original template and toss the old VM on the scrap heap. Similar ideas revolved around re-imaging laptops and desktops rather than fixing the problem. OK. Full stop. A laptop or desktop is most certainly not a server, and servers should not be treated that way. But even that&#8217;s not the full reality of the situation.<\/p>\n<p>I&#8217;m starting to think that current server virtualization technologies are contributing to the decline of real server administration skills.<\/p><\/blockquote>\n<p>There definitely has been a shift &#8211; &#8220;real server administration skills&#8221; are now more about packaging, software selection and managing dramatic shifts in utilization. It&#8217;s less important know to know exactly how to manage M4 with sendmail, and more important that you know you should probably use postfix instead. I don&#8217;t spend much time convincing clients that they need connection pooling; I debug the connection pooler that was chosen.<\/p>\n<p>The available software for web development and operations is quite broad &#8211; the version of Linux you select, whether you are vendor supported or not, and the volume of open source tools to support applications. <\/p>\n<p>Inevitably, the industry has shifted to configuration management, rather than configuration. And, honestly, the shift started about 15 years ago with <a href=\"http:\/\/cfengine.com\/pages\/history\">cfengine<\/a>.<\/p>\n<p>Now we call this <a href=\"http:\/\/www.kitchensoap.com\/2009\/12\/12\/devops-cooperation-doesnt-just-happen-with-deployment\/\">DevOps<\/a>, the idea that systems management should be programmable. Burgess called this &#8220;Computer Immunology&#8221;. DevOps is a much better marketing term, but I think the core ideas remain the same: Make programmatic interfaces to manage systems and automate.<\/p>\n<p>But, back to the broken window thing! I did some searching for development and broken windows and found that in 2007, a developer <a href=\"http:\/\/www.simonfl.com\/2007\/11\/broken-windows-theory-for-software.html\">talked about Broken Window Theory<\/a>: <\/p>\n<blockquote><p>People are reluctant to break something that works, but not so much when it doesn&#8217;t. If the build is already broken, then people won&#8217;t spend much time making sure their change doesn&#8217;t break it (well, break it further). But if the build is pristine green, then they will be very careful about it.<\/p><\/blockquote>\n<p>In 2005, Jeff Atwood <a href=\"http:\/\/www.codinghorror.com\/blog\/2005\/06\/the-broken-window-theory.html\">mentioned<\/a> the <a href=\"http:\/\/www.codinghorror.com\/blog\/files\/Atlantic%20Monthly%20-%20Broken%20Windows.htm\">original source<\/a>, and said &#8220;Maybe we should be sweating the small stuff.&#8221; <\/p>\n<p>That stuck with me because I admit that I focus on the little details first. I try to fix and automate where I can, but for political or practical reasons, I often am unable to make the comprehensive system changes I&#8217;d like to see.<\/p>\n<p>So, given that most of us live in the real world where some things are just left undone, where do we draw the line? What do we consider a bit of acceptable street litter, and what do we consider a broken window? When is it ok to just reboot the system, and when do you really need to figure out exactly what went wrong?<\/p>\n<p>This decision making process is often the difference between a productive work day, and one filled with frustration.<\/p>\n<p>The strategies that we use to make this choice are probably the most important aspects of system administration and devops today. There, of course, is never a single right answer for every business. But I&#8217;m sure there are some themes. <\/p>\n<p>For example:<\/p>\n<ul>\n<li>My boss wrote about <a href=\"http:\/\/tech.myemma.com\/python-pep8-git-hooks\/\">PEP8 and standards in formatting code<\/a>, and automating this with a githook.<\/li>\n<li>PostgreSQL code <a href=\"http:\/\/git.postgresql.org\/gitweb?p=postgresql.git&#038;a=search&#038;h=HEAD&#038;st=commit&#038;s=pgindent\">goes through a reformatting pass<\/a> before we release.<\/li>\n<li>Etsy <a href=\"http:\/\/codeascraft.etsy.com\/2010\/12\/08\/track-every-release\/\">tracks their PHP warnings<\/a> for every release<\/li>\n<\/ul>\n<p>James posted &#8220;<a href=\"http:\/\/www.kartar.net\/2010\/03\/james-whites-rules-for-infrastructure\/\">Rules for Infrastructure<\/a>&#8221; just the other day, which is a repost of the <a href=\"https:\/\/gist.github.com\/161265\">original gist<\/a>. What I like about this is that they are phrased philosophically: here are the lines in the sand, and the definitions that we&#8217;re all going to agree to. <\/p>\n<p>Where do you draw the line? And how do you communicate to your colleagues where the line is?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few days ago, I asked: I spend a lot of time thinking about the little details in systems &#8211; like the number of ephemeral ports consumed, number of open file descriptors and per-process memory utilization over time. Small changes &hellip; <a href=\"https:\/\/www.chesnok.com\/daily\/2011\/03\/02\/broken-windows-broken-code-broken-systems\/\">Continue reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[425,97,9],"tags":[426,661,647,623],"class_list":["post-2601","post","type-post","status-publish","format-standard","hentry","category-devops","category-postgres","category-postgresql","tag-broken-windows","tag-devops","tag-postgres","tag-sysadmin"],"_links":{"self":[{"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/posts\/2601","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/comments?post=2601"}],"version-history":[{"count":10,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/posts\/2601\/revisions"}],"predecessor-version":[{"id":4071,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/posts\/2601\/revisions\/4071"}],"wp:attachment":[{"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/media?parent=2601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/categories?post=2601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/tags?post=2601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}