{"id":226,"date":"2024-05-14T19:29:05","date_gmt":"2024-05-14T19:29:05","guid":{"rendered":"https:\/\/permutationcity.co.uk\/bp\/?p=226"},"modified":"2024-08-25T19:08:30","modified_gmt":"2024-08-25T19:08:30","slug":"forever-change","status":"publish","type":"post","link":"https:\/\/permutationcity.co.uk\/bp\/2024\/05\/14\/forever-change\/","title":{"rendered":"Forever change"},"content":{"rendered":"\n<p>Let&#8217;s start with a few updates about the blogs.<\/p>\n\n\n\n<p>I&#8217;m going to be busier in the coming weeks so, for now, posts will only be once a week.\nIt might be possible to go back to twice a week once things have settled down.\nWe&#8217;ll have to see.<\/p>\n\n\n\n<p>If you&#8217;ve been reading from the start you may have noticed the change in my code samples.\nThey have gone from the\n<a href=\"https:\/\/wordpress.org\/documentation\/article\/code-block\/\">default WordPress code block<\/a> to \n<a href=\"https:\/\/wordpress.org\/plugins\/wp-codemirror-block\/\">CodeMirror Blocks<\/a>.\nHopefully they&#8217;re clearer.\nI&#8217;d like the option to present multiple language code samples, maybe a block with tabs,\nso the reader can choose a preferred language.\nHowever I&#8217;ve not yet found a WordPress block that would support this.<\/p>\n\n\n\n<p>Who would have thought things would change?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"the-only-constant-is-change\">The only constant is change<\/h2>\n\n\n\n<p>I&#8217;ve mentioned the consistency of change before.\nIndeed I&#8217;ve mentioned it&#8230;\n<a href=\"https:\/\/permutationcity.co.uk\/bp\/2024\/02\/06\/what-is-simple-anyway\/\">once<\/a>,\n<a href=\"https:\/\/permutationcity.co.uk\/bp\/2024\/02\/20\/no-comment-code\/\">twice<\/a>,\n<a href=\"https:\/\/permutationcity.co.uk\/bp\/2024\/03\/12\/how-often\/\">thrice<\/a>,\n<a href=\"https:\/\/permutationcity.co.uk\/bp\/2024\/04\/30\/learning-from-jigsaws\/\">four times<\/a>,\n<a href=\"https:\/\/permutationcity.co.uk\/bp\/2024\/05\/07\/rust\/\">five times<\/a>\nthat I can see.\nSo apparently I think it&#8217;s important.\nI don&#8217;t have a study to point to but it&#8217;s been my experience that it&#8217;s the case.\nThe projects that I&#8217;ve been on have not normally followed a straight line.\nThey curve from release to release under changing demands.<\/p>\n\n\n\n<p>I can imagine projects that would follow a straighter line.\nAt university I was taught about the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Waterfall_model\">waterfall model<\/a>.\nIt&#8217;s rigid phases of: requirements capture, analysis, design, coding and testing.\nI can see that with a specific requirement you <em>could<\/em> design something that was just right and stick with it,\nno further changes necessary.\nI&#8217;m sure these do happen.<\/p>\n\n\n\n<p>However my experience is still that things often do change.\nGiven a specific target platform of MacOS for my project and nothing else but, four years later,\nsuddenly a Linux version was needed.\nSo the platform might change, performance targets might change, interfaces might change, functionality might change.\nEven if no-one means for things to change they may change.\nBudgets get cut or increased, limitations in hardware or software dependencies are discovered,\nsecurity vulnerabilities become apparent.\nThings change.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"planning-for-change\">Planning for change<\/h2>\n\n\n\n<p>Given all of that you should try to plan for it.\nOf course you cannot know exactly <em>what<\/em> will change only that adaptability is useful.\nI got this post together quickly so this is some brainstorming.\nWhat can you do:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Most projects have some parts with variation. Important numbers tend to be zero, one and <em>many<\/em>. If you have something with two options then consider setting it up to have <em>many<\/em> options. If you already setting up for two options then it can be an easy step to allow an arbitrary number.<\/li>\n\n\n\n<li>If you collected related code together and <a href=\"https:\/\/permutationcity.co.uk\/bp\/2024\/03\/12\/how-often\/\">don&#8217;t repeat yourself<\/a> then changes can be localised as well.<\/li>\n\n\n\n<li>Make use of tools that are available on multiple platforms. If someone has already gone to the effort of writing something that can do it everywhere then you won&#8217;t have to.<\/li>\n\n\n\n<li>Ideally choose tools that have long service history and active support. That&#8217;s not always possible but if not you might have to be caution in other ways.<\/li>\n\n\n\n<li>This sounds trite but don&#8217;t put all your eggs in one basket. If there are multiple projects running then consider using different tools just to gain experience with them. If there are problems with one tool, or maybe if it just turns out to be better, then you can switch.<\/li>\n\n\n\n<li>Use interfaces and wrappers to provide separation. This applies on all sorts of levels: in your own code providing an interface rather than a specific class, in using a library or web service using a light wrapper rather than direct access. Having a slight separation means you can more easily swap out for an alternate system.<\/li>\n\n\n\n<li>Spend time on interfaces between different systems and different times. Joins between different systems can be particularly difficult to change. It may mean negotiating a change between different owners. It may mean organising a simultaneous change on different systems or supporting multiple standards simultaneously. Thinking through the API beforehand is worth it. By different times I mean persisting information, saving files or databases. Here you cannot negotiate the old format it is what it is. You can make sure to have version numbers from the start, you can break the data into parts and allow for new data to be added, you can try to seamlessly load old files into new systems.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"in-the-end\">In the end<\/h2>\n\n\n\n<p>You won&#8217;t be able to predict all the changes, that&#8217;s part of the point. You can anticipate <em>some<\/em> changes and organise the project to make others <em>easier<\/em>. There is a cost, a bit more thought up front, but it can really pay off.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s start with a few updates about the blogs. I&#8217;m going to be busier in the coming weeks so, for now, posts will only be once a week. It might be possible to go back to twice a week once things have settled down. We&#8217;ll have to see. If you&#8217;ve been reading from the start [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[1],"tags":[6,11],"class_list":["post-226","post","type-post","status-publish","format-standard","hentry","category-general","tag-blogging","tag-planning"],"_links":{"self":[{"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/posts\/226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/comments?post=226"}],"version-history":[{"count":2,"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/posts\/226\/revisions"}],"predecessor-version":[{"id":323,"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/posts\/226\/revisions\/323"}],"wp:attachment":[{"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/media?parent=226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/categories?post=226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/tags?post=226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}