{
    "href": "/post/2013/10/28/publish-your-failures-or-the-way-of-all-frameworks/",
    "relId": "2013/10/28/publish-your-failures-or-the-way-of-all-frameworks",
    "title": "Publish Your Failures; or, The Way Of All Frameworks",
    "author": "pmjones",
    "markup": "html",
    "tags": [
        {
            "href": "/tag/aura/",
            "relId": "aura",
            "title": "Aura",
            "author": null,
            "created": "2020-09-14 21:51:57 UTC",
            "updated": [
                "2020-09-14 21:51:57 UTC"
            ],
            "markup": "markdown"
        },
        {
            "href": "/tag/php/",
            "relId": "php",
            "title": "PHP",
            "author": null,
            "created": null,
            "updated": [],
            "markup": "markdown"
        },
        {
            "href": "/tag/programming/",
            "relId": "programming",
            "title": "Programming",
            "author": null,
            "created": null,
            "updated": [],
            "markup": "markdown"
        }
    ],
    "created": "2013-10-28 15:12:37 UTC",
    "updated": [
        "2013-10-28 15:12:37 UTC"
    ],
    "html": "<p>The blog post <a href=\"http://programmingarehard.com/2013/10/21/is-orm-abstraction-a-pipe-dream.html\">Is ORM Abstraction A Pipe Dream?</a> is one of the best technical articles I\u2019ve read in maybe a year. Not because it describes a successful technical solution, but because it describes an attempt <em>and a failure</em> to achieve a goal.  It reminds me of this quote from Feynman in <a href=\"http://www.lhup.edu/~DSIMANEK/cargocul.htm\">Cargo Cult Science</a>:</p>\n<blockquote>\n<p>If you\u2019ve made up your mind to test a theory, or you want to explain some<br>\nidea, you should always decide to publish it whichever way it comes out.<br>\nIf we only publish results of a certain kind, we can make the argument<br>\nlook good. We must publish both kinds of results.</p>\n</blockquote>\n<p>(Cargo Cult Science is one of those essays that <em>everyone</em> should read, especially programmers who think of themselves as scientists or science-minded.)</p>\n<p>What Feynman is saying here is that, when it comes to expanding a body of knowledge, the failures are just as important as the successes, perhaps more so in some cases.  (Be careful here; they have to be \u201chonest\u201d failures, where you had some reason to believe in advance that it had a good chance of working.)</p>\n<p>So what is it about the \u201cPipe Dream\u201d article that impressed me? It is that the the author first signals his tribe membership by mentioning his \u201cframework of choice\u201d, then proceeds to try to do some work outside of that tribe.  In doing so, he is expanding his knowledge and skills so that he can be useful <em>outside</em> the norms of that particular tribe.  He realizes that there are other ways to do things than the way his tribe does them, he does some work with those things, he tries to unify them, and he fails at the unification.  In the end, he has no technical artifact to show for his exploratory work, but he has now expanded his skills as a programmer beyond his \u201cframework of choice.\u201d</p>\n<h3>Your Framework Will Fail You</h3>\n<p>And being able to operate outside a framework is really important, because the framework you choose today, even if it\u2019s the self-described \u201c<a href=\"https://twitter.com/taylorotwell/status/390920323232567296\">greatest PHP framework of all time</a>\u201d, is going to fail you in some non-trivial way in 3 years or so, even if it has a \u201clong-term support\u201d version.  (After all, how long is long-term in the web world?)</p>\n<p>Take a look at some points from this article by Yannick Mahe titled <a href=\"http://blog.yannickmahe.com/symfony/2013/08/19/the-walking-dead.html\">The consequences of living with a legacy PHP framework</a> (note that \u201clegacy\u201d in this case is only 4-5 years):</p>\n<blockquote>\n<p>You can no longer rely on the community. \u2026</p>\n<p>Documentation can be hard to find now. \u2026</p>\n<p>I can effectively no longer use plugins. \u2026</p>\n<p>[This framework] used Prototype (scriptaculous) as its Javascript framework \u2026 UX advances which could require just a simple jQuery plugin have to be written from scratch. \u2026</p>\n<p>This framework is not compatible with newer versions of PHP. It was written for PHP 5.2, and is compatible with PHP 5.3 but no longer works on PHP 5.4. \u2026</p>\n<p>Basically I\u00e2\u0080\u0099m one third less productive when programming than I could be.</p>\n</blockquote>\n<p>Is that a slam against the framework or its defenders?  No more than saying \u201cthe sky is blue\u201d is a slam against the physics of light diffusion in atmosphere.  \u201cThe framework is going to fail you\u201d is a truism regardless of the framework.</p>\n<p>And <em>everybody</em> uses a framework, whether they recognize it or not.  I have said at other times that a \u201cframework\u201d can be defined as \u201cthat collection of tools and techniques you reuse on a regular basis from project to project\u201d.  So everyone uses a framework one way or another, whether formal or informal, well-architected or not, designed with intent or evolved through use.</p>\n<h3>How To Handle Failure</h3>\n<p>So if all frameworks are going to fail you, and you can\u2019t avoid using one, what are your options?</p>\n<p>All too often, software is like a complex system in that requires a constant input of energy, and <a href=\"http://paul-m-jones.com/archives/1404\">complex systems fail</a>.  So the key point here is not \u201cthe framework is going to fail you.\u201d  The key point is \u201chow easy will it be to handle that failure when it happens?\u201d</p>\n<p>A developer twin of <a href=\"https://en.wikipedia.org/wiki/Nassim_Nicholas_Taleb\">Nassim Taleb</a> might argue that whatever framework you have needs to be <a href=\"https://en.wikipedia.org/wiki/Antifragile:_Things_That_Gain_from_Disorder\">antifragile</a>. That is, when one subsystem fails or becomes obsolete, it should not render the rest of the system unusable.  Indeed, the failure of a subsystem should lead to a replacement that makes the system <em>stronger</em> in the future.</p>\n<p>Frameworks in general are especially susceptible to their subsystem failures: they are usually developed as a thing of whole cloth (yes, even the ones that advertise they are \u201ccomponent based\u201d \u2014 the <em>components</em> might be OK, but the <em>framework</em> often is not). The different parts depend on each other, and if one fails, you need to dive into the guts of the framework proper to fix it in place, which frequently leaves you worse off than before when it comes to maintainability.</p>\n<p>Instead, for a robust or antifragile system, you should be able to swap out the different subsystems when they no longer meet your needs. As each <em>piece</em> fails (and each one will eventually fail to meet your needs), you\u2019ll swap out each of the pieces at different times. Eventually the system will be composed entirely of replacements, but the whole thing will have kept running the whole time.</p>\n<p>And that\u2019s where we come back to the \u201cPipe Dream\u201d article. By taking some steps outside his \u201cframework of choice\u201d the author is beginning to get an idea of how to integrate independent and disparate systems into a whole.  In the long run, that ability is going to serve him better as a programmer than his knowledge of any particular framework.</p>\n<h3>Afterword: Aura for PHP</h3>\n<p>Of course, I\u2019m going to mention <a href=\"http://auraphp.com\">Aura</a> here.  The ideals illuminated by article are the ideals that drive the development of the Aura, even to the point of <a href=\"https://github.com/auraphp/Aura.Sql/issues/61\">prejudicially declining certain feature requests</a>.</p>\n<p>The Aura project is a collection of truly independent and fully decoupled libraries. None of the libraries has any external dependencies. The project is \u201clibrary-first\u201d and not \u201cframework-first\u201d, even though we do offer a framework built of the combined packages. The libraries evolve independently of the framework and can be incorporated individually or in any combination you like into any project.</p>\n<p>If you liked the ideas behind this article, then <a href=\"http://auraphp.com\">the Aura project</a> is for you. Download a single package and start using it in your project today, with no added dependencies.</p>\n<hr>\n<p><strong>UPDATE (30 Oct 2013):</strong> The title on the final section has been prefixed with the indicator \"Afterword\" since at least one person mistook it for a summary.</p>\n"
}
