{"id":1336,"date":"2018-11-13T01:19:27","date_gmt":"2018-11-13T01:19:27","guid":{"rendered":"http:\/\/sdi.thoughtstorms.info\/?p=1336"},"modified":"2018-11-13T01:19:27","modified_gmt":"2018-11-13T01:19:27","slug":"a-tower-of-simple-systems","status":"publish","type":"post","link":"https:\/\/sdi.thoughtstorms.info\/?p=1336","title":{"rendered":"A Tower of Simple Systems"},"content":{"rendered":"<p>I posted this on Future Programming at Quora : <a href=\"https:\/\/www.quora.com\/q\/qqylyzqgpwisoecc\/A-Tower-of-Simple-Systems\">A Tower of Simple Systems<\/a><\/p>\n<blockquote><p>\nRe-reading the answer I reposted here a couple of days ago about the \u201cHoly Grail\u201d of programming language design : modification.<br \/>\n<a href=\"https:\/\/www.quora.com\/q\/qqylyzqgpwisoecc\/What-is-the-Holy-Grail-of-programming-language-design\">https:\/\/www.quora.com\/q\/qqylyzqgpwisoecc\/What-is-the-Holy-Grail-of-programming-language-design<\/a><br \/>\nSo here\u2019s a question.<br \/>\n<strong>A dumb solution &#8230;<\/strong><br \/>\nBut what if we created a system as a tower of \u201csnapshots\u201d of solutions?<br \/>\nGit and other source control systems already store our development history as a series of snapshots.<br \/>\nContainers already give us the way to snapshot full systems.<br \/>\nThings like Amazon Lambda give us the ability to spin-up functions quickly and cheaply on demand.<br \/>\nSo \u2026<br \/>\n\u2026 what if, when I build a system, I just make a system that handles the first use-case or user story.<br \/>\nThat\u2019s now \u201cfrozen\u201d at the base of my tower.<br \/>\nThen a new use-case or user story comes in. Instead of trying to slot handling this use-case into my existing program, I just create a new, trivially simple, solution to handle it. That gets added as the next \u201cfloor\u201d of the tower.<br \/>\nNow the system is up and running. A user interaction happens.<br \/>\nThe system first tries to see if the current top-floor of the tower can handle the behaviour. If it can, fine. If not then we simply drop down to the layer of the tower below it to see if that can handle the story.<br \/>\nAnd so on \u2026<br \/>\nEffectively our tower of old versions of the system is acting rather like an immutable database, \u201cstory-handlers\u201d. For any user-story we can keep adding new handlers for it to the top of the tower (where it supersedes older versions). Other user stories which haven\u2019t changed, we just fall down the tower until we find a handler for them.<br \/>\nWould this simplify trying to compose complex systems?<br \/>\nObviously this will work best when each user-story handler is a purely functional program (easy and cheap to spin up) and state is kept in an external database.<br \/>\nWhat does everyone think? Is this just crazy or a viable way of approaching the problem of growing a system? Ie. embrace the fact that you\u2019re going to get cruft (or layers of archaeology) building up anyway, so just handle that explicitly?<br \/>\nCan we call it \u201cCruft-oriented programming\u201d \ud83d\ude42 ?\n<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I posted this on Future Programming at Quora : A Tower of Simple Systems Re-reading the answer I reposted here a couple of days ago about the \u201cHoly Grail\u201d of programming language design : modification. https:\/\/www.quora.com\/q\/qqylyzqgpwisoecc\/What-is-the-Holy-Grail-of-programming-language-design So here\u2019s a question. A dumb solution &#8230; But what if we created a system as a tower of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[24,87,164,193],"class_list":["post-1336","post","type-post","status-publish","format-standard","hentry","category-opinion","tag-architecture","tag-containerization","tag-functional-programming","tag-growing-a-system"],"_links":{"self":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts\/1336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1336"}],"version-history":[{"count":0,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts\/1336\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}