<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Technology @ Prospa - Medium]]></title>
        <description><![CDATA[Life, laughs and lightbulb moments from the Technology team @ Prospa - Medium]]></description>
        <link>https://medium.com/prospa-technology?source=rss----5a51d2e8c751---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Technology @ Prospa - Medium</title>
            <link>https://medium.com/prospa-technology?source=rss----5a51d2e8c751---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 08:13:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/prospa-technology" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Onboarding your new employee: GitHub Copilot and the importance of Documentation]]></title>
            <link>https://medium.com/prospa-technology/onboarding-your-new-employee-github-copilot-and-the-importance-of-documentation-dad95b23ddd8?source=rss----5a51d2e8c751---4</link>
            <guid isPermaLink="false">https://medium.com/p/dad95b23ddd8</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[onboarding]]></category>
            <category><![CDATA[github-copilot]]></category>
            <dc:creator><![CDATA[Sam Walsh]]></dc:creator>
            <pubDate>Fri, 31 May 2024 04:45:22 GMT</pubDate>
            <atom:updated>2024-05-31T06:14:38.392Z</atom:updated>
            <content:encoded><![CDATA[<h3>Onboarding your new employee: Copilot and the importance of Documentation</h3><figure><img alt="A robot with a puzzled look on its face with sticky notes falling from above with question marks on them. There’s a screenshot of code behind the robot." src="https://cdn-images-1.medium.com/max/1024/1*k0JgzF8uKcn86pSHu3DVWQ.png" /></figure><blockquote><strong>Disclaimer: </strong>This article offers a speculative glimpse into the future of software engineering, based on extrapolating on current and announced capabilities of tools in the GitHub Copilot ecosystem.</blockquote><blockquote>Since this is all highly speculative, <strong>the following blog post might not stand the test of time.</strong></blockquote><h3>The new employees: Human and GitHub Copilot</h3><h4><strong>Scenario 1 (Onboarding a human):</strong></h4><p>You’re a software engineer. You’re deep in code. You have a new employee thats recently joined your team. Today they’ve picked up their first Jira ticket. They’re interrupting you constantly with questions about the business and codebases. You field their questions, only for them to come back again with more questions; “How does this part of the system work?”, “How do I run this locally?”, “How do I deploy this?”, “Why did we do this <em>this</em> way and not <em>that</em> way?”.</p><p><strong>If they <em>don’t</em> ask questions,</strong> then this could go one of two ways:</p><ol><li><strong>Constant iterations: </strong>Their initial contribution is quick, but wrong. It requires many rounds of feedback and changes. You continue going back and forth until their contribution achieves the given task and goal, whilst aligning with the company’s best practices. It ends up taking up a lot of time — for the both of you.</li><li><strong>Deep-dive &amp; memory overload: </strong>They fall into a deep rabbit hole of <a href="https://en.wikipedia.org/wiki/Software_archaeology">software archaeology</a>. They piece together countless fragments of code and interweaving dependencies.<br>The human brain has something called <a href="https://en.wikipedia.org/wiki/Working_memory">‘working memory’</a>. Put simply, this is the amount of information the human brain can retain and process simultaneously. When a software engineer has to read and process all of this information and context at once, their working memory is at capacity. <a href="https://www.sciencedirect.com/science/article/abs/pii/S0301051100000399">Overworking the working memory leads to mental fatigue and a tendency towards risky and low-effort task strategies</a>. In other words, all that cognitive demand increases the chance that they take shortcuts, and ultimately might end up submitting buggy code. Best case, they’ve spent a long time completing the task.</li></ol><figure><img alt="A software engineer sitting at his desk with screens of code, in an office environment. Another software engineer is standing in front of him with a pose that indicates he’s asking a question." src="https://cdn-images-1.medium.com/max/1024/1*WhKFul7Zwz33ibaqMt1Owg.png" /></figure><h4><strong>Scenario 2 (GitHub Copilot):</strong></h4><p>Imagine you’re GitHub Copilot. You’ve just received two potentially unrelated and incomplete files, a chunk of code, followed by a text cursor, and then another chunk of code. You’re now asked to fill in the gap where the text cursor is.</p><p>You provide some code that appears to fill the gap quite nicely. You’re pleased with it.</p><p>The software engineer deletes it. “Try again.”</p><p><em>But why?</em></p><p>So, it turns out that the code that Copilot suggested is completely unusable in the context of the whole codebase. But how could Copilot have known?</p><p>There are two theoretical ways this could be remedied:</p><ol><li><strong>Constant iterations: </strong>The software engineer could keep crafting the prompt, trying trial and error, over and over until Copilot suggests the perfect code. Sounds inefficient, right?</li><li><strong>Deep-dive and memory overload: </strong>You could explore more expensive options like <a href="https://github.blog/2024-02-28-customizing-and-fine-tuning-llms-what-you-need-to-know/">fine-tuned models</a> that are trained on your entire codebase, or perhaps switch to an expensive model that can process large quantities of code at a time. The latter is otherwise known as increasing the ‘<a href="https://www.techtarget.com/whatis/definition/context-window">context window</a>’. Think of ‘context window’ as the amount of code (and written instructions) that Copilot can process at a time. This is similar to the new employee’s ‘working memory’ being stretched to their limits.<br>Both of the options previously listed are either expensive, slow, or a combination of the two. At present, with such a large context window, today’s Large Language Models (LLM’s) would likely result in <a href="https://en.wikipedia.org/wiki/Hallucination_(artificial_intelligence)">hallucinations</a> or buggy code anyway. Their <a href="https://arize.com/blog-course/the-needle-in-a-haystack-test-evaluating-the-performance-of-llm-rag-systems">needle-in-a-haystack performance</a> and logical-reasoning capabilities just aren’t sufficient enough for these large quantities of code.</li></ol><figure><img alt="A white robot sitting at a desk surrounded by countless pieces of paper and code snippets surrounding him and littering his desk with a laptop on it." src="https://cdn-images-1.medium.com/max/1024/1*c-Nc9q8hYG15hLAbjXmrVg.png" /></figure><h4>Common ground: a lack of context</h4><p>The <strong>new employee</strong> and <strong>Copilot</strong> both lack sufficient <em>context. </em>Most importantly, <em>refined, optimised, </em>and <em>accessible</em> context.</p><blockquote>To complete the task accurately, you need context.</blockquote><p><strong>The new employee </strong>probably wasn’t provided with sufficient onboarding and readily available documentation to answer any questions.</p><p><strong>Copilot</strong> didn’t know about the company’s coding standards, architecture, or available APIs and libraries. This led to code that was <em>objectively</em> reasonable, but <em>subjectively</em> wrong in the context of the wider system it was working with.</p><p>Reflecting back on the two scenarios again, you will notice a key trend; without providing sufficient context, they’ll both either…</p><ol><li><strong>Need constant human intervention and guidance</strong>, or…</li><li><strong>Experience cognitive/memory overload, and underperform.</strong></li></ol><h3>Copilot is your new employee.</h3><figure><img alt="GitHub Copilot mascot sitting at a desk in an office environment with a laptop and a stack of documentation on the desk." src="https://cdn-images-1.medium.com/max/1024/1*OMepP4M-pnKNc7HvJjqa7w.jpeg" /></figure><blockquote>What if I told you that GitHub Copilot is like a new employee?</blockquote><p>Think about it for a moment. When you prompt Copilot, <strong>it knows absolutely nothing </strong>about your company, codebase, or architecture. <em>Nada.</em> … <a href="https://github.blog/2023-05-17-how-github-copilot-is-getting-better-at-understanding-your-code/#how-github-copilot-understands-your-code">at least, other than a couple files, and the code before and after the text cursor</a>.</p><p>Every time you interact with Copilot, it’s like it’s starting it’s first day on the job, all over again, prompt after prompt.</p><blockquote>Copilot is like a new employee, with the memory of a goldfish.</blockquote><p>Where Copilot lacks in memory, it makes up for in reading speed. So let’s cater for Copilot’s limited ‘working memory’. Let’s help make sure that it can hit the ground running on it’s first day on the job, every time.</p><p>How do we give Copilot and our new employees the context they need?<br><strong>Documentation.</strong></p><h3>Documentation</h3><p>We don’t like to admit it, but we need it.</p><iframe src="https://cdn.embedly.com/widgets/media.html?type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=twitter&amp;url=https%3A//x.com/jcsrb/status/1392459191353286656&amp;image=" width="500" height="281" frameborder="0" scrolling="no"><a href="https://medium.com/media/89b30908106dec05cf8700ceb7e44bda/href">https://medium.com/media/89b30908106dec05cf8700ceb7e44bda/href</a></iframe><p>We could save <em>ourselves</em> a lot of time if we just <em>read</em> the documentation.</p><p>We could also save our <em>colleagues</em> a lot of time if we took a moment to <em>write</em> documentation, especially for our <em>new</em> colleagues, Copilot included.</p><p>If important information is only in your head, it’s inaccessible to others (both Copilot and Human). So, write it down.</p><h4>“Write it down, and share the link.”</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FFS1mnISoG7U%3Ffeature%3Doembed%26start%3D901%26end%3D953&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFS1mnISoG7U&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FFS1mnISoG7U%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/40079569222ec31b906490f468d5ded5/href">https://medium.com/media/40079569222ec31b906490f468d5ded5/href</a></iframe><p><a href="https://www.hanselman.com/blog/do-they-deserve-the-gift-of-your-keystrokes">Scott Hanselman wrote an insightful blog post titled “Do they deserve the gift of your keystrokes?”</a>, inspired by <a href="https://blog.jonudell.net/2007/04/10/too-busy-to-blog-count-your-keystrokes/">Jon Udell’s “Too busy to blog? Count your keystrokes”</a>.</p><p>In Hanselman’s blog, he discusses the idea that we all have a finite number of keystrokes in our lifetime. Every keystroke spent to answer <em>one </em>person’s question is a wasted keystroke.</p><blockquote>Slack and emails are where your keystrokes go to die.</blockquote><p>His main argument is that knowledge shared through emails or Slack often gets lost, benefiting only a few individuals.</p><p>Instead, he suggests generalising and publishing your knowledge in formats and platforms that can reach and benefit a wider audience.</p><p>In today’s world, that wider audience includes Copilot.</p><h3>Forms of Documentation</h3><p>Let’s dive into some of the various forms of documentation that our new employees and Copilot could both benefit from.</p><figure><img alt="A software programmers office desk with numerous sticky notes stuck to a monitor, desk and wall. There’s a small robot sitting on the top of the desk. There’s a software IDE open on the screen." src="https://cdn-images-1.medium.com/max/1024/1*mlebMVaD1340ktV2yROrjg.png" /></figure><h4>Code Comments</h4><blockquote>Copilot can read code, but not your mind.</blockquote><p>Writing code comments is usually considered good practice, where it makes sense. Typically, the code comments that matter most are the ones documenting the <em>‘why’</em> behind the code;</p><ul><li>Why did you write the code this way?</li><li>What problem have you been trying to solve?</li><li>What constraints were you working under?</li><li>What assumptions did you make?</li><li>Which trade-offs did you consider?</li></ul><p>This is all information that human readers and Copilot will appreciate.</p><h4>Markdown Documentation</h4><blockquote>The README file is the front door to your codebase.</blockquote><p>This document explains to Copilot and your colleagues at a high level what the codebase is about, how to run it, how to test it, and how to contribute to it.</p><p>It also acts as an index file. It redirects the reader and Copilot to more detailed information on various topics related to your codebase.</p><p>When you ask GitHub Copilot Chat questions using the @workspace command, it relies heavily on searching your codebase and documentation for related keywords, just as people do. When writing documentation, put on your SEO hat and think about how searchable you’re documentation is;</p><ul><li>“Are the most relevant and common keywords being included in the document?”</li><li>“Will Copilot and my employees be able to find this documentation via search?”</li><li>“Am I placing them in the most logical locations in the codebase so that Copilot and my employees are able to find this documentation by filename and folder structure?”</li></ul><h4>Architectural decisions</h4><blockquote><em>“Those who cannot remember the past are condemned to repeat it.” — George Santayana</em></blockquote><p>Your colleagues and Copilot both need to understand the history and context behind why you made particular decisions. Documenting these decisions—as well as the pros and cons, constraints and context behind the final decision—helps capture that decision in that moment of time.</p><p>When a new employee joins the company, they bring their own experiences and opinions. The decisions that you’ve made might make sense to you, but might not make sense to them—at least not in their opinion and based on their own lived experience. However, they don’t have the full context and history behind why the system was built the way it was.</p><p>But you can change that! How can we bring them along on this journey and provide them with the history? <a href="https://github.com/joelparkerhenderson/architecture-decision-record"><strong>Architectural Decision Records</strong></a><strong>.</strong></p><p>When you or your team make a technical or architectural decision, establish a new document. Capture a snapshot of the pros and cons, the constraints and the context that must be considered in your decision.</p><p>When you’ve made the decision, document what you decided and why.</p><p>When a new employee starts asking you why the system works a particular way, you can refer them to this documentation. With all the considerations documented, they can better appreciate the historical decision, or perhaps even challenge the decision, proposing new solutions that factor in the same constraints.</p><p>If you store these documents on a platform accessible to Copilot, then it might even read and reference these files, factoring in these decisions into it’s code generation. Or, perhaps GitHub Copilot Chat will reference it to answer questions from other colleagues about why a particular piece of code was written the way it was, or why a particular framework or library was used.</p><p>As it currently stands, the only place you could put these documents in a way that GitHub Copilot Chat can access them is to colocate them in your codebase. You can establish a suite of <a href="https://adr.github.io/">Architectural Decision Records (ADRs) in Markdown format</a> and store them in your code repository. That way GitHub Copilot Chat can look them up to answer any questions you have, with the <a href="https://code.visualstudio.com/docs/copilot/workspace-context">＠workspace<strong> </strong>command</a>, e.g:</p><pre>@workspace The rest of the company uses ConfigCat.<br>Why are we using LaunchDarkly instead of ConfigCat in this repository?</pre><p>If you can’t do this, or if your documentation is relevant for more than one codebase, then you may have to wait for GitHub Copilot Extensions to become publicly available, when hopefully there will be extensions for Confluence, GitHub wikis or lookups across multiple codebases.</p><h4>API Documentation</h4><p>How does Copilot know how to use your API, services, or integrations that live outside the codebase? It doesn’t — unless you tell it what APIs and services are available, what they do, and provide examples of how to use them.</p><p>Now, this might seem contradictory to the earlier points made in this blog post, but there are times when using code as your documentation is actually more effective. Documentation doesn’t have to be written in plain language. In fact, in many cases, simple API schemas and code examples of requests can be more effective. Consider using OpenAPI or GraphQL schemas to document your API. This will help Copilot understand your API and make better suggestions.</p><blockquote><strong><em>Side note: </em></strong><em>One of the most powerful uses of LLMs is for making API calls. These are also known as “Agents”. Tools like OpenAI and ChatGPT’s </em><a href="https://platform.openai.com/docs/actions/introduction"><em>Actions</em></a><em> and </em><a href="https://github.blog/2024-05-21-introducing-github-copilot-extensions/"><em>GitHub Copilot Extensions </em></a><em>showcase this potential. By refining your API specs now, it sets your company up for a powerful business opportunity; enabling AI assistants to interact with your API’s and services.</em></blockquote><h4>Architecture Diagrams</h4><p>AI assistants (like Copilot) can’t read your visual architecture diagrams accurately — at least not yet. But they can read your code.</p><p>Just like how OpenAPI and GraphQL schemas can help Copilot understand your API, architecture diagrams written in code (like PlantUML or Mermaid) can help Copilot understand your architecture. This helps Copilot make better suggestions and helps you troubleshoot your code.</p><h4>Infrastructure as Code (IaC)</h4><p>The easiest way for Copilot to understand your infrastructure is to establish your <a href="https://en.wikipedia.org/wiki/Infrastructure_as_code">infrastructure as code</a>. If you’ve been procrastinating migrating to IaC and are still doing ClickOps and configuring and modifying your infrastructure manually, then let this be the last straw on the camel’s back to encourage you to consider the migration.</p><p>By storing all the information about your infrastructure as code, Copilot has ready access to it and can consider it in it’s generated code, as well as when answer questions in GitHub Copilot Chat.</p><p>Even better, Copilot might want to make suggestions or modifications to your infrastructure. If it’s in code, it makes it more accessible to Copilot.</p><h4>Code Conventions</h4><p>Copilot can’t follow your company’s coding standards without guidance, and neither will your new employees, if you haven’t documented them.</p><p>Where possible, use linting and formatting tools to establish the majority of your code conventions and patterns. You can use tools like <a href="https://eslint.org/">ESLint</a>, <a href="https://prettier.io/">Prettier</a>, and <a href="https://typicode.github.io/husky/">Husky</a> to automatically enforce these standards. That way, even if Copilot or your colleagues write code that doesn’t follow the standards, your automated tooling will correct it.</p><p>For the code conventions that cannot be automated via linting and formatting tools, write them down in a Markdown document in the codebase.</p><p>You might think, “But if Copilot eventually has access to my entire codebase, then perhaps it will pick up on all the coding standards automatically.” Yes, it could well do. But you’re assuming your entire codebase is following your code standards. Realistically, often your best practices evolve over time, but the existing code doesn’t get updated to align with these best practices. And so, your codebase is left littered with bad examples.</p><p>We have all done this at some point; copied solutions from other files, otherwise known as “<a href="https://en.wikipedia.org/wiki/Copy-and-paste_programming">Copy-and-paste programming</a>”. Old or bad patterns can proliferate in your codebase because of this. Well, Copilot is no different. At the end of the day, Copilot just wants to finish your sentences. So, if your codebase is full of bad patterns, it will ‘learn’ those bad patterns and reproduce more code that looks like it.</p><p>By writing down your coding standards as an official document, in the future, you could potentially make Copilot aware of these conventions, encouraging it to follow them. But that’s all speculative. For now, at the very least, documenting these standards allows your colleagues to become aware of them, and follow them.</p><h4>Git history, commit messages and pull request descriptions</h4><blockquote>Commit messages and pull requests tell the story of your codebase.</blockquote><p>Commit messages are more than just a log of changes. They can explain why a change was made and what problem was being solved. Paired with a good Git history, they provide a roadmap of your codebase’s evolution.</p><p>Imagine a future where Copilot could read through all your commit messages and git history in an instant — it could help you quickly identify the origin of a new bug or understand the historical context behind a particular piece of code.</p><blockquote>Jon Cairns<strong> </strong>wrote an opinionated (yet thought-provoking) blog post similar to this concept called <a href="http://blog.joncairns.com/2015/09/use-git-to-comment-your-code/">“Use git to comment your code (and stop writing rubbish commit messages, please)”</a>. He takes this concept of using commit messages to document your code to another level, claiming that code comments aren’t required, and that git commit messages are better.</blockquote><p>Write good commit messages and pull request descriptions, including the <em>why</em> behind the change and the <em>why not</em> behind the alternatives.</p><blockquote>Did you know that in GitHub Copilot Enterprise you can <a href="https://docs.github.com/en/enterprise-cloud@latest/copilot/github-copilot-chat/copilot-chat-in-github/using-github-copilot-chat-in-githubcom#finding-out-about-the-changes-in-a-pull-request">use GitHub Copilot to ask questions about pull requests</a>?</blockquote><h4>Jira tickets and GitHub issues</h4><blockquote>Jira tickets tell the story of your product.</blockquote><p>Make sure your Jira tickets and GitHub issues are detailed and well-written. In the near future, tools like <a href="https://github.blog/2024-05-21-introducing-github-copilot-extensions/">GitHub Copilot Extensions</a> may be able to access external information (like Jira tickets), to provide better suggestions.</p><blockquote>As of February 2024, with Github Enterprise, you can <a href="https://docs.github.com/en/enterprise-cloud@latest/copilot/github-copilot-chat/copilot-chat-in-github/using-github-copilot-chat-in-githubcom#asking-a-question-about-a-specific-issue">use GitHub Copilot Chat to ask about your GitHub Issues</a>.</blockquote><p>Write clear acceptance criteria, and then a high-level plan on how you will <em>technically </em>achieve this task. This information will help Copilot understand what you’re trying to achieve. When things change, ensure you update the ticket accordingly.</p><p>Writing clear and detailed Jira tickets will soon be a key skill in software engineering. Now is a good time to start practicing.</p><p>Don’t believe me? Check out the <a href="https://github.blog/2024-04-29-github-copilot-workspace/">GitHub Copilot Workspaces</a> demo:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FpkotufZchjE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpkotufZchjE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FpkotufZchjE%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/df0918fdfb2ad1463a75269e740ee3a2/href">https://medium.com/media/df0918fdfb2ad1463a75269e740ee3a2/href</a></iframe><p>Sure, you might feel initially skeptical at first. This flow might seem a little ambitious now, but I’m sure you can see where this is going…</p><h4>Documentation-driven Development</h4><blockquote><strong>Get into the habit of writing first, and then build.</strong></blockquote><ol><li>Start with a Jira ticket.</li><li>Add acceptance criteria.</li><li>Document your approach and how everything will work together.</li><li>Write tests that assert the implementation will fulfill its acceptance criteria.</li><li>Write the pseudo-code for the implementation.</li><li>Then finally, code the implementation.</li></ol><p>By following this documentation-first approach, you’re not only solidifying and broadcasting your intentions on your approach and constraints, but you’re also providing Copilot more and more context it needs to get the job done, <em>correctly</em>.</p><p>Worst case, if you feel you don’t need the documentation after the job’s done, then delete it.</p><h3>Takeaways</h3><figure><img alt="Two people sitting at a table eating takeway lunch together in an office environment. One of the people is the GitHub Copilot with a “GitHub” hoodie on." src="https://cdn-images-1.medium.com/max/1024/1*qSJP8eY4bIb0m1ctC-56lQ.jpeg" /></figure><ul><li><strong>Optimise your onboarding documentation. </strong>By beefing up your documentation, you’re helping not just your colleagues, but Copilot too.</li><li><strong>Output is only ever as good as the input. </strong>Copilot’s performance depends on the quality and clarity of the input it receives; insufficient or illogical input will result in subpar output.</li><li><strong>Get into the habit of writing first. </strong>Start by aligning with your colleagues in writing, then evolve it into its implementation.</li><li><strong>Write for tomorrow. </strong>Assume that one day, many AI tools will be able to access and leverage your documentation. There’s a common phrase in the AI industry: “This is the worst AI will ever be.”</li><li><strong>Focus on <em>why,</em> not how. </strong>LLM’s can ‘read’ text, but they can’t read minds.</li><li><strong>Write it down.</strong><em> </em>If it’s only in your head, it’s inaccessible to others, and that includes Copilot.</li><li><strong>Treat Copilot like a new employee. </strong>If a new employee can’t onboard without interacting with another colleague, then don’t expect Copilot to be any better.</li></ul><blockquote><strong>Treat Copilot like a new employee</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dad95b23ddd8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prospa-technology/onboarding-your-new-employee-github-copilot-and-the-importance-of-documentation-dad95b23ddd8">Onboarding your new employee: GitHub Copilot and the importance of Documentation</a> was originally published in <a href="https://medium.com/prospa-technology">Technology @ Prospa</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Evolving Architecture]]></title>
            <link>https://medium.com/prospa-technology/evolving-architecture-849e017fd345?source=rss----5a51d2e8c751---4</link>
            <guid isPermaLink="false">https://medium.com/p/849e017fd345</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[software-maintenance]]></category>
            <category><![CDATA[agile-architecture]]></category>
            <dc:creator><![CDATA[Stephen Crockett]]></dc:creator>
            <pubDate>Tue, 30 Apr 2024 23:56:40 GMT</pubDate>
            <atom:updated>2024-04-30T23:56:40.244Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part 4 of the Agile Architecture Series</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UG5IHo1MfRfkNqhy" /><figcaption>Photo by <a href="https://unsplash.com/@jplenio?utm_source=medium&amp;utm_medium=referral">Johannes Plenio</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When do we know that it is time to update or move on from an architecture or system that has served us well for many years?</p><p>Here are the signs to watch out for -</p><ol><li>Your best engineering capacity is used for maintenance and break-fix rather than new product features.</li><li>The Software you are using is not supported or is many versions behind the current release.</li><li>Non-functional requirements are no longer good enough. Information is not available when needed, and overnight batch updates are no longer good enough.</li><li>Something like AI Large Language Models comes by, smacks you in the back of the head, and creates an arms race between you and your competitors.</li></ol><h3>Predicting the Future can be Too Hard</h3><p>In the previous article in this series, <a href="https://medium.com/prospa-technology/agile-enterprise-architecture-0c24aa5d5085">Agile Enterprise Architecture</a>, I suggested that Enterprise Architecture could be used to predict the future.</p><p>Even if we find it too hard to predict the future and implement the perfect architecture, Architecture should be ready to change and adapt, even if we don’t know how it needs to change (yet).</p><p>You must be prepared to —</p><ol><li>Keep the Architecture Clean.</li><li>Keep the Architecture Current</li></ol><h3>Cleaning Our Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MScOvEOHUDvmHIv5" /><figcaption>Photo by <a href="https://unsplash.com/@mkjr_?utm_source=medium&amp;utm_medium=referral">mkjr_</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>One of the ways that we get ready for change is to keep our Architecture contemporary and “clean”, many of you may have read <a href="https://amzn.to/4aBneEl">Clean Code by Robert C.Martin</a>. In “Uncle” Bob’s book, there are a couple of themes that we can learn from and apply to architecture as a whole.</p><ol><li><strong>First, write dirty code and then clean it</strong>. The architecture we produce will initially have Technical Debt; we can’t always afford (or even know) the perfect solution when we are building it. Be prepared to come back and clean it up.</li><li><strong>Successive Refinement.</strong> Just like a program module that started well but did not scale, an Architecture can become irrelevant or not meet our customers’ needs.</li></ol><h4>Change is Normal — Refactoring is Good</h4><p>If you were to look at your architecture now, what are the key problems consuming your precious engineering capacity, and how can architecture refactoring help. Here are some examples:</p><ul><li>Tight coupling between two of your systems means there needs to be more resilience when one system is unavailable. Can we re-architect the interfaces so there are fewer dependencies?</li><li>A system is strongly dependent on an outdated, expensive vendor solution. Can we implement an adaptor pattern that allows us to easily unplug and plug in a new provider?</li><li>Supporting an old system is complex and challenging. Can we uplift the monitoring and logging of the system to make it easier to detect and prevent issues?</li><li>The business is no longer happy to wait overnight for reports and key metrics from the core systems. Let’s introduce event streaming and replace some of the legacy batch processing.</li><li>There are many other examples; what’s your problem, and what can you do to solve it?</li></ul><p>Of course, this work must also compete with other essential features that the business has planned. So put on your best suit (or T-Shirt) and sell. Everyone loves a great story! Especially one that has a happy ending.</p><h3>Keep the Architecture Current</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*II5tAPfmhATB006C" /><figcaption>Photo by <a href="https://unsplash.com/@serhatbeyazkaya?utm_source=medium&amp;utm_medium=referral">Serhat Beyazkaya</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The best way to keep Architecture current is to keep it updated. I want to propose a simple architectural principle that encapsulates this concept: the<strong> N-1 Rule</strong>.</p><h4>The N-1 Rule</h4><p>The N-1 Rule (Principle) goes something like this -</p><p><strong>Principle: </strong>All software used should not fall behind more than one version from the Vendor’s major release cycle.</p><p><strong>Why is this important?</strong> It is quite easy to let vendor software, database versions, and frameworks get outdated. Continuous system updates are crucial for maintaining a robust and secure technology landscape. The rationale for doing this includes:</p><ul><li>Keep up to date with Security Enhancements and Software vulnerabilities.</li><li>Bug Fixing and improvement to system stability and performance.</li><li>Compatibility and Interoperability with other connected systems</li><li>Feature Enhancements in new releases can be leveraged.</li></ul><p>Using this principle is one of the easiest to follow. All (major) software vendors provide a timetable for their software release cycles — they don’t just announce it the week before. There is plenty of time to plan the cost of upgrades that can be included in your company’s budget cycles.</p><p>When your software is contemporary, you will have more choices and you can take advantage of investments that your vendors and SaaS providers are making.</p><h4>Consequences of doing nothing</h4><p>We’ve all seen the system that just keeps running. Perhaps the software is old, the source code is lost, frameworks and database versions are no longer supported.</p><p><strong>Step 1.</strong> The software just keeps running … until it doesn’t, there is a security breach, or the key person who maintains it leaves or some other calamity. Customer and business trust is broken!</p><p><strong>Step 2.</strong> In a panic management order a review of the system and find out that it has outdated software and needs updates and rewrites.</p><p>Usually, a one-off figure of a squillion dollars is needed to keep the system going. Starting an Evergreen program now could be a much better proposal (perhaps using the N-1 Rule as a guide).</p><h3>Summary</h3><p>Change is normal; don’t expect your architecture to live forever.</p><ol><li><strong>Watch out for signs that your architecture is outdated</strong>. Usually, that means that your engineering capacity is being consumed mostly by keeping the lights on.</li><li><strong>Look for Opportunities to refactor your architecture.</strong> And align these initiatives with the challenges that the business is having with this software system.</li><li><strong>Keep your Software and Vendor versions up to date. </strong>This is not only good hygiene, but it also allows you to quickly take advantage of new capabilities like AI LLM that vendors are starting to offer in their latest software releases.</li></ol><p><em>Thanks, and I hope you enjoyed this series on Agile Architecture. Other blogs in the series include:</em></p><p><a href="https://medium.com/prospa-technology/architecturally-significant-decisions-68ac47687277">Architecturally Significant Decisions | by Stephen Crockett | Technology @ Prospa | Medium</a></p><p><a href="https://medium.com/prospa-technology/emerging-vs-intentional-architecture-385071ae5d75">Emerging vs Intentional Architecture | by Stephen Crockett | Technology @ Prospa | Medium</a></p><p><a href="https://medium.com/prospa-technology/agile-enterprise-architecture-0c24aa5d5085">Agile Enterprise Architecture. Part 3 of the Agile Architecture Series | by Stephen Crockett | Technology @ Prospa | Medium</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=849e017fd345" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prospa-technology/evolving-architecture-849e017fd345">Evolving Architecture</a> was originally published in <a href="https://medium.com/prospa-technology">Technology @ Prospa</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimizing cloud cost: effective use of Azure savings plan for compute]]></title>
            <link>https://medium.com/prospa-technology/optimizing-cloud-cost-effective-use-of-azure-savings-plan-for-compute-99b7881785c3?source=rss----5a51d2e8c751---4</link>
            <guid isPermaLink="false">https://medium.com/p/99b7881785c3</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[prospa]]></category>
            <category><![CDATA[azure-cost-optimization]]></category>
            <category><![CDATA[azure-cost-management]]></category>
            <category><![CDATA[azure-savings]]></category>
            <dc:creator><![CDATA[Ritesh Patil]]></dc:creator>
            <pubDate>Mon, 01 Apr 2024 21:01:59 GMT</pubDate>
            <atom:updated>2024-04-01T21:01:58.746Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0XCaQfzt3Okpp2bn" /><figcaption>Photo by <a href="https://unsplash.com/@growtika?utm_source=medium&amp;utm_medium=referral">Growtika</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>While working in the cloud multiverse for the past few years, I have observed a phenomenon which affect almost all organisations irrespective of how big or small they are, their cloud budget getting out of hand.</p><p>During the initial phases of their cloud adaptation journey, many organisations pay very little attention to their cloud resource requirements like:</p><ul><li>Which services satisfy requirements</li><li>Which features are good to have v/s utmost important</li><li>What are the compute, storage requirements</li></ul><p>They end up paying huge costs for a large unused resource capacity as they have already purchased it.</p><p>I am a strong advocate of starting a cloud cost management journey with your cloud adoption journey. Cloud providers have many options available which can help us during this journey. But the issue I have faced in the past is an incomplete understanding of how these cost saving options work which ended up with us not being able to use these options effectively.</p><p>In this series of articles, I will try to demystify some of the lesser-known facts about these offers which I learnt over time and hope they will help you to maximize your cloud cost savings.</p><p>In this first article, let&#39;s talk about the Azures savings plan for compute !!!</p><p><strong>What is Azure savings plans for compute ?</strong></p><blockquote>According to Azure documentation, Azure savings plan for compute is a flexible pricing model. It provides savings up to 65% off pay-as-you-go pricing when you commit to spend a fixed hourly amount on compute services for one or three years. Committing to a savings plan allows you to get discounts, up to the hourly commitment amount, on the resources you use.</blockquote><p>In simpler terms, when you commit to Azure that you will pay <strong>$ X </strong>amount per hour for your compute resource, Azure will provide you discount on compute resource cost until you reach that hourly limit.</p><p><strong>How much savings can Azure savings plan for compute provide ?</strong></p><p>Percentage savings vary depending on factors like resource types, the compute family and region but in most general use cases you can save approximately 25% over 1 year and approximately 49% over 3 years.</p><p><strong>How its different from Azure Reserved Instances ?</strong></p><p>Although Azure savings plan for compute offer less savings as compared to Reserved Instances, Savings plan provide great flexibility as compared to Reserved Instances as it applies to any compute within scope of your plan irrespective of your compute family, region.</p><p>This makes the Savings plan the best saving option when your compute requirements are not consistent. Some of the use cases of these requirements are:</p><ol><li>You are running data pipelines in Azure Databricks clusters and you need different types of compute to run different pipelines.</li><li>You are running your Azure Kubernetes cluster with multiple agent pools of different compute families as per your application requirements which also scale up and down depend on workloads.</li><li>Your applications are hosted on Azure app services which scale in or scale out depending on workload.</li></ol><p>So far, the Azure savings plan for compute is looking very promising but it also raises two major questions:</p><ol><li>What if my hourly usage is less than the committed amount ?</li><li>What if my hourly usage is more than committed amount ?</li></ol><p>Short answer to these question are, If your usage is less than committed, you will end up paying more money and if your usage is more, you will not be able to get complete benefit of the savings plan.</p><p>This makes it very crucial to perform a thorough assessment of your current and future resource requirements to identify the amount you want to commit to the savings plan.</p><p>Lets discuss some of the key factors which can help you in this assessment.</p><ol><li><strong>What resources are covered as part of the Azure savings plan for compute ?</strong></li></ol><p>Before identifying your hourly commitment amount, it is important to identify all resource types your organisation will be using and which of them can be covered under the savings plan. <strong>Azure savings plan for compute</strong> covers different resource types in a single plan such as:</p><ul><li><strong>Azure Virtual Machines</strong> which also include virtual machines or scale sets deployed as part of AKS cluster, Azure Databricks, Azure Virtual Desktops etc.</li><li><strong>Azure App Service Plans</strong> which include Premium V3 and Isolated V2 only.</li><li><strong>Azure Functions</strong> Premium plans only.</li><li><strong>Azure Container Instances.</strong></li><li><strong>Azure Dedicated Hosts.</strong></li><li><strong>Azure Container Apps.</strong></li></ul><blockquote>Savings plan don&#39;t cover all App service plans and Function app plans. Pay close attention to plan details before including in your commitment amount.</blockquote><p><strong>2. How to choose a scope for the saving plan ?</strong></p><p>The scope of an Azure savings plan for compute can be:</p><ul><li>Shared across billing scope</li><li>A specific Azure management group</li><li>A specific Azure subscription</li><li>A specific resource group</li></ul><p>Although the savings plan offers different scopes, the effective way to maximize your savings is to apply it at <strong>billing scope</strong> as it covers multiple resource types in all regions and subscriptions.</p><p><strong>3. How to decide the virtual machine size which can maximize savings ?</strong></p><p>New versions of the Azure virtual machine families offer more saving than old versions. For example, a general purpose V5 virtual machine offers ~26% savings for 1 year against ~13% savings for 1 year offered on a general purpose V3 virtual machine.</p><p>Considering this, always try to use <strong>new versions of virtual machine families</strong> when creating new virtual machine resources and upgrade your existing virtual machines to new versions which will maximize your savings.</p><p>You can always refer to the <a href="https://azure.microsoft.com/en-us/pricing/calculator/"><strong>Azure pricing calculator</strong></a> to compare virtual machine sizes and identify virtual machine families suitable for your needs.</p><p><strong>4. Do not over commit !!!</strong></p><p>An Azure saving plans for compute <strong>cannot be cancelled</strong> once purchased but you can add new savings plan as per your requirement in the future.</p><p>It is always recommended to consider your current or next couple of months of compute requirements to identify your commitment amount. In the future if your compute consumption increases, you can purchase new savings plans to fulfil the requirement.</p><p><strong>5. Always review your consumption of the savings plan and do adjustments when needed.</strong></p><p>Always monitor your consumption pattern and make the necessary adjustments to your savings plan. For example, if you are already consuming 100% of your commitment, review your current compute consumption if its more than your commitment which might allow you to purchase an additional savings plan for that delta consumption.</p><p>Or if you are underutilizing your commitment, you can either widen the scope of your savings plan or you can plan your future resource deployments to use the savings plan. Scoping your plan at billing account is helpful in such a scenario where even if your one subscription consumption decreases, you might still be able to get benefits for other subscriptions in scope.</p><p><strong>Conclusion</strong></p><p>Azure savings plan for compute is a great way to start your cost saving journey as it provides flexibility by covering a large landscape of resources under a single umbrella.</p><p>Also, a word of caution, do a due diligent check on the requirements before committing to avoid overspending. I hope this article will help you with this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99b7881785c3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prospa-technology/optimizing-cloud-cost-effective-use-of-azure-savings-plan-for-compute-99b7881785c3">Optimizing cloud cost: effective use of Azure savings plan for compute</a> was originally published in <a href="https://medium.com/prospa-technology">Technology @ Prospa</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering the Transition: From React Web to React Native Development]]></title>
            <link>https://medium.com/prospa-technology/mastering-the-transition-from-react-web-to-react-native-development-8056589ad0b9?source=rss----5a51d2e8c751---4</link>
            <guid isPermaLink="false">https://medium.com/p/8056589ad0b9</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[prospa]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Sayantani Chaudhuri]]></dc:creator>
            <pubDate>Fri, 01 Mar 2024 00:25:47 GMT</pubDate>
            <atom:updated>2024-03-01T00:25:47.553Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aE6tIylyhjswpfU_" /><figcaption>photo by <a href="https://unsplash.com/@lautaroandreani?utm_source=medium&amp;utm_medium=referral">Lautaro Andreani</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Mastering the Transition: From React Web to React Native Development</strong></p><p>My journey from web to mobile developer using React Native has been both challenging and rewarding. With a solid foundation in web development, I understood the basics but had to navigate through a new set of challenges when transitioning to mobile development.</p><p>In this blog post, I am going to share how I learned React Native, the hurdles I encountered, and tips for making the transition smoother. This guide is tailored for those who, like me, come from a web development background and are eager to dive into the mobile development world using React Native.</p><h3>Understanding React Native</h3><p>React Native, an open-source framework developed by Facebook (now Meta), enables developers to build mobile apps using JavaScript and React. The beauty of React Native lies in its ability to allow for the development of both iOS and Android apps simultaneously with a single codebase. This was particularly appealing to me as it promised a smoother transition from web to mobile development.</p><p>To start, I immersed myself in the fundamentals of React Native. Understanding the core concepts such as components, state, and props, which were familiar from React, was straightforward. However, the introduction of mobile-specific components like ScrollView, TouchableHighlight, and the <a href="https://reactnavigation.org/docs/getting-started/">navigation</a> management was new territory. I spent time learning how React Native bridges the gap between web and mobile development, leveraging native components for a seamless user experience.</p><p><strong>React Native Architecture and Framework</strong></p><p>React Native’s architecture is designed to provide a bridge between JavaScript code and native platform components, enabling developers to write code once and deploy it on multiple platforms.</p><p>Following are the key components of React Native architecture:</p><ol><li><strong>JavaScript Codebase:</strong></li></ol><p>React Native applications are primarily written in JavaScript or TypeScript. Developers write their application logic, UI components, and business logic using JavaScript, leveraging the React library to create reusable UI components.</p><p>2. <strong>Bridge:</strong></p><p>The Bridge is a key architectural component of React Native that enables communication between JavaScript code and native platform code. It consists of two main parts:</p><p><strong>— Native Modules:</strong> These are JavaScript modules that act as a bridge between JavaScript and native code. Native modules expose native platform APIs to JavaScript code, allowing developers to access platform-specific features such as camera, geolocation, and push notifications.</p><p><strong>— JavaScript Runtime: </strong>React Native uses JavaScriptCore, the JavaScript engine built into iOS and Android, to execute JavaScript code. JavaScriptCore runs in a separate thread called the “JS thread.”</p><p>3. <strong>UI Components:</strong></p><p>React Native provides a set of UI components that map directly to native UI elements on each platform. These components are rendered using native platform APIs, resulting in a native look and feel. These UI components are highly customizable and can be styled using JavaScript or CSS-like syntax using <a href="https://reactnative.dev/docs/flexbox"><strong>Flexbox</strong></a>. Developers can also create their own custom UI components to meet specific design requirements.</p><p>4. <strong>Platform-specific Code:</strong></p><p>Despite its cross-platform nature, React Native allows developers to write platform-specific code when necessary. Developers can use platform-specific APIs, libraries, and components to access native functionality not available in React Native out of the box. This enables them to create truly native experiences tailored to each platform.</p><p>5. <strong>Threading Model:</strong></p><p>React Native uses a multi-threaded architecture to improve performance and responsiveness. It separates UI rendering (main thread) from JavaScript execution (JS thread) using the Bridge.</p><p>The UI thread is responsible for handling user interactions, layout calculations, and rendering UI components, while the JS thread executes JavaScript code, processes business logic, and communicates with native modules via the Bridge. To ensure smooth performance and prevent UI blocking, React Native employs asynchronous communication between the JS thread and the native platform.</p><h3>Challenges Faced</h3><p>As with learning any new skills, there were a number of challenges I faced, which are worth mentioning.</p><p><strong>Understanding Native Features:</strong> One of the biggest challenges I faced was wrapping my head around native functionalities such as push notifications, how to interact with device’ internal hardware. Unlike web development, mobile apps interact more deeply with the device’s hardware, requiring a different approach.</p><p><strong>Performance Optimization: </strong>Mobile devices have varying hardware capabilities, which made me realize the importance of optimizing performance to ensure a smooth user experience across all devices. Learning to efficiently manage memory and render components was a steep learning curve.</p><p><strong>Design Adaptability:</strong> Adapting to mobile design principles was another hurdle. The navigation patterns, gestures, and design elements like Material Design for Android and Human Interface Guidelines for iOS were areas I had to familiarize myself with to create intuitive and user-friendly interfaces.</p><h3>Overcoming the Challenges</h3><ol><li><strong>Understanding Native Features:</strong></li></ol><p>To handle native functionalities, I learned to integrate native modules and third-party libraries. This not only solved my problem with accessing native features but also helped me understand the bridge between JavaScript and native code. There are different approaches we can take such as</p><p><strong>— Built-in Modules:</strong> React Native provides a set of built-in modules (also known as APIs or components) that allow us to access native features directly from JavaScript. These modules abstract platform-specific functionality into a unified API that we can use in our React Native app.</p><p>Examples of built-in modules include AsyncStorage for storing data locally, and PermissionsAndroid or PermissionsIOS for requesting permissions from the user.</p><p><strong>— Native Modules: </strong>If the functionality we need is not available in React Native’s built-in modules, we can create our own custom native modules to access platform-specific APIs. Native modules are written in the native language of each platform (<strong>Java/Kotlin</strong> for Android, <strong>Objective-C/Swift</strong> for iOS) and expose methods and constants to JavaScript. The main entry point for iOS is AppDelegate.mm and for Android is MainActivity.java</p><p>We can create a custom native module in React Native by extending the ReactContextBaseJavaModule class in Android (<a href="https://reactnative.dev/docs/native-modules-android">https://reactnative.dev/docs/native-modules-android</a>) or the RCTEventEmitter class in iOS(<a href="https://reactnative.dev/docs/native-modules-ios">https://reactnative.dev/docs/native-modules-ios</a>), and implementing the necessary methods to interact with native functionality. Once we’ve created a native module, we can use the NativeModules API in JavaScript to access its methods and properties from our React Native components.</p><p>— <strong>Third-party Libraries: </strong>In addition to React Native’s built-in modules and custom native modules, we can also use third-party libraries to access native features in our React Native app. Many popular libraries provide wrappers around platform-specific APIs, making it easier to integrate native functionality into our app. Examples of third-party libraries include react-native-firebase for using Firebase services, and react-native-push-notification for handling push notifications.</p><p><strong>2. Performance Optimization:</strong></p><p>Some examples of performance optimization techniques I learned for React Native are listed below</p><p><strong>— Rendering optimization </strong>focuses on leveraging platform-specific UI components and optimizing layout calculations. Techniques such as using FlatList or SectionList for efficient list rendering, and using the flexbox layout for responsive UI design are common in React Native development.</p><p>—<strong> Styling optimization</strong> focuses on reducing layout thrashing and minimizing style recalculations. Using theStyleSheetAPI to create predefined styles, avoiding inline styles, and using flexbox layout for responsive design are recommended practices.</p><p>— <strong>Network performance optimization </strong>includes strategies like bundling assets with the app, reducing the size of network requests, and optimizing API responses for mobile devices.</p><p>Suppose if our React Native app uses a large number of third-party dependencies, we can optimize bundle size by implementing code splitting. For instance, we can use dynamic imports to load modules asynchronously only when they are needed, reducing the initial bundle size and improving app startup time.</p><p>Another approach to improve network performance would be instead of making multiple API requests to fetch data. we can optimize by batching similar requests together using libraries such as axios or Fetch API wrappers. This reduces the number of network round trips and also improves data fetching efficiency by supporting features like request batching, caching, and efficient error handling.</p><p>3. <strong>Design Adaptability:</strong></p><p>I also focused on learning mobile UI/UX design principles. Understanding how to use design tools like <a href="https://www.figma.com/">Figma</a>, along with React Native’s styling capabilities, creating responsive layouts and intuitive interfaces that cater to mobile users. I found <a href="https://www.nngroup.com/articles/ten-usability-heuristics/">Nielsen Norman Group</a> article very informative and it helped me build a mindset to build apps with simplistic design and to think about good user interfaces.</p><h3>More tips</h3><p>To overcome the challenges of learning React Native, I heavily relied on the <a href="https://reactnative.dev/">React Native official documentation</a>, as well as various tutorials and forums like Stack Overflow. The React Native community is vast and supportive, which provides much needed support to novice developers. Keeping abreast with the latest releases, new features, improvements, and changes and best practices helped me a lot.</p><p>Besides, having a strong foundation in React is very important and I found <a href="https://epicreact.dev/learn">epicReact</a> and <a href="https://frontendmasters.com/">Frontend Masters</a> training courses very useful.</p><p>One of the most important activities for learning anything new is lots of practice and a bit of experimentation. Building small projects and experimenting with different features was crucial. I started with simple applications, gradually incorporating more complex functionalities. This hands-on approach solidified my understanding and made me more confident in my ability to develop mobile apps.</p><p>Learning how to debug code is also very crucial. I made it a practice to use debugging tools and techniques like console.log, React Native Debugger, Flipper to diagnose and fix issues in React Native. Also checking for error messages, stack traces, and logging to identify bugs and troubleshoot effectively.</p><p>Finally, I learned the process to deploy and submission of the app for store releases (App Store and Google Play Store). Deploying React Native apps involves building platform-specific binaries (APK for Android, IPA for iOS) using build tools like Android Studio or Xcode and distributing them through app stores or over-the-air updates.</p><h3>Wrapping up</h3><p>Transitioning from web to mobile development using React Native was an enriching experience that broadened my skill set and opened up new opportunities.</p><p>Despite the challenges, the journey was incredibly rewarding. For web developers looking to make the leap into mobile development, React Native is a powerful tool that can ease the transition.</p><p>Remember, patience, continuous learning, and hands-on practice are key. Embrace the challenges, and you’ll find yourself growing not just as a mobile developer but as a versatile software developer capable of tackling a wide range of projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8056589ad0b9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prospa-technology/mastering-the-transition-from-react-web-to-react-native-development-8056589ad0b9">Mastering the Transition: From React Web to React Native Development</a> was originally published in <a href="https://medium.com/prospa-technology">Technology @ Prospa</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agile Enterprise Architecture]]></title>
            <link>https://medium.com/prospa-technology/agile-enterprise-architecture-0c24aa5d5085?source=rss----5a51d2e8c751---4</link>
            <guid isPermaLink="false">https://medium.com/p/0c24aa5d5085</guid>
            <category><![CDATA[enterprise-architecture]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[big-rock]]></category>
            <dc:creator><![CDATA[Stephen Crockett]]></dc:creator>
            <pubDate>Sun, 28 Jan 2024 23:34:34 GMT</pubDate>
            <atom:updated>2024-01-28T23:34:34.478Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part 3 of the Agile Architecture Series</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G236aob_gApge_Mf" /><figcaption>Photo by <a href="https://unsplash.com/@dbeamer_jpg?utm_source=medium&amp;utm_medium=referral">Drew Beamer</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Making it to number 35 in the Top 100 superpower list is being able to predict the future (“Precognition” ign.com). Besides the obvious personal gains, it could be pretty valuable for product design and architecture work.</p><p>Wouldn’t it be great if, when we are making arbitrary design solutions while building out our brand-new product, we could predict the future and know which design will be the best in 5 years?</p><p>What if our software was truly agile, and we could tweak it to take advantage of market changes and user demand.</p><p>How about maximising our engineering capacity without too much backtracking and waste?</p><h3>Enterprise Architecture</h3><p>In the first two parts of the Agile Architecture Series, I’ve been focusing more on Solution Architecture. Solution Architecture is about developing the “best” design/architecture for a particular problem or project.</p><p>One of the things missing, however, is a guiding light that sits outside the project and helps us choose the right pathway or solution for the overall product and organisation. … something that has a longer-term view and is aligned with the big goals (or Big Rocks) that the organisation aspires to.</p><h4>Solution Architecture vs Enterprise Architecture</h4><p>If you are lucky to have a title (or role) of just “Architect”, how do you know if you are doing Solution Architecture or Enterprise Architecture? I use this simple rule.</p><ul><li>Solution Architecture is what your boss asks you to work on. Usually they are the important and/or urgent projects.</li><li>Enterprise Architecture is what you need to work out for yourself which is critical for the business’s long-term success.</li></ul><h4>Can Enterprise Architecture Predict the Future?</h4><p>Sure! In a way ... maybe.</p><p>Enterprise Architecture can help predict the future by enabling organisations to build in an agile way. By creating flexible frameworks and architectures that adapt to changes, businesses can anticipate and respond to emerging trends and challenges more effectively.</p><p>Enterprise Architecture promotes a structured approach to understanding an organisation’s current state, defining its desired future state, and charting a path. Through this process, organisations can identify potential risks, opportunities, and market shifts, allowing them to proactively adjust their strategies and operations.</p><h4>What are the Steps to Developing an Enterprise Architecture (that can predict the future)?</h4><ol><li>Identify the important stuff or Big Rocks.</li><li>Know your Current State &amp; Status.</li><li>Map out your Future State.</li><li>Govern your Future State.</li></ol><p>These things are familiar in the world of Architecture and Strategy. We sometimes forget about developing and using our Enterprise Architecture when we are neck-deep in Agile sprints.</p><p>Having Current State and Future State roadmap artefacts produced from an Enterprise Architecture practice can help us with context and meaning when planning our agile delivery.</p><h3>The Important Stuff — The Big Rocks</h3><p>There will always be Urgent and Important work to do.</p><blockquote>“If everything is important, then nothing is.” ― Patrick Lencioni</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sFqQjRKJOgrOlXhB" /><figcaption>Photo by <a href="https://unsplash.com/@heftiba?utm_source=medium&amp;utm_medium=referral">Toa Heftiba</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you are surrounded by lots of urgent and vital work, these things are not your Big Rocks. You will need to look harder.</p><ul><li>What is the company’s Vision / Strategy / Goals?</li><li>Who are your stakeholders? Who are the leaders with the long-term vision?</li><li>It’s effortless to identify (and get distracted by) the low-hanging fruit. Let someone else take the lead on those things. Keep your focus on the Big Rocks.</li></ul><h3>Know your Current State &amp; Status</h3><p>After you work out your Big Rocks, you must understand what you have and how it works. In the words of the great TV personality —</p><blockquote>“You can’t change what you don’t acknowledge.” — Dr. Phil McGraw</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lUcKQ-tSxhjCPLk-" /><figcaption>Photo by <a href="https://unsplash.com/@ricardoviana?utm_source=medium&amp;utm_medium=referral">Ricardo Viana</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Capabilities, not Processes or Systems.</h4><p>When building out your current state, it’s easy to list all the systems and connect them together. But it doesn’t always tell you what you need to know.</p><p>If I was to have something like Salesforce in my current state. What is that telling me? Is that the Customer Master? Is it the customer service platform? Is it the Sales platform…</p><ol><li>Lead with your capability (E.g. Customer Management, Product Servicing, Payments, etc.).</li><li>Map the system to the capability.</li><li>Make an assessment of the capability. What are the issues?</li></ol><h4>Fast-tracking this part</h4><p>In general, generating a current state architecture takes time and effort. But there are some things that you can do to fast-track the process.</p><ul><li>Usually, a new Enterprise Architecture initiative can be built on the remains of a previous Enterprise Architecture attempt. If you dig hard enough, you might find some valuable artefacts.</li><li>Does the organisation have a CMDB? (Configuration Management Database). A good CMDB will have all your systems, descriptions and business and technology contacts.</li><li>Use an industry framework to give you a head start. Personally, I like BIAN (<a href="https://bian.org/">bian.org</a>). It has a great capability model for banks and financial institutions. Using a framework like BIAN will help you understand what capabilities you are missing, capability areas that are underdeveloped, and capability areas that are duplicated.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bw0xFc8w1i_rrQ1Jq46CIg.png" /><figcaption>BIAN Service Landscape</figcaption></figure><h3>Map out your Future State</h3><blockquote>“Without a clear destination in mind, every decision becomes arbitrary” — Unknown.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JPmURoVXYkZYcPtQ" /><figcaption>Photo by <a href="https://unsplash.com/@anniespratt?utm_source=medium&amp;utm_medium=referral">Annie Spratt</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>What does a Roadmap look like?</h4><p><strong>Part 1 — The Basics</strong></p><p>These are the essential ingredients that come out of an Enterprise Architecture practice.</p><ol><li><strong>Principles. </strong>Just a few principles aligned with the company’s values are enough. Principles are the “does it make sense” test when evaluating solutions.</li><li><strong>Standards.</strong> Standards help build consistency in your technology stack.</li><li><strong>Patterns</strong>. Help you to be more agile and consistent.</li></ol><p><strong>Part 2 — The Specifics — Capability and Portfolio Roadmaps</strong></p><p>Now that you have your current state worked out and have understood the issues and challenges around it, visualise what it will look like in a few years.</p><ul><li><strong>Capability Journeys. </strong>Express the change needed for Automation Targets, addressing Operational Risk, Scalability, etc. Work out what is essential to improve a capability to meet the “Big Rocks”.</li><li><strong>Portfolio Roadmaps.</strong> Now that we understand the capabilities that need to be uplifted to meet our Big Rocks, have a good look at the Product portfolios and start to think in terms of “Invest”, “Retire”, and “Transform”.</li></ul><h4>Create some Marketecture.</h4><p><em>Marketecture = A non-technical document to explain your architecture to anyone.</em></p><p>Now that you have worked out what you currently have and your target state, summarise it on a one-pager. Carry the one-pager around with you and show it to everyone.</p><p>Your Marketecture will show —</p><ol><li>Your current systems and capabilities</li><li>Systems and capabilities that you are investing in.</li><li>Systems that have issues or are on the way out (perhaps colour-coded)</li></ol><p><em>It might be more than one page, but not more than four. (I used to do an origami fold that showed a few different views on a single A3)</em>.</p><h3>Govern your Future State</h3><p>In <a href="https://medium.com/prospa-technology/emerging-vs-intentional-architecture-385071ae5d75">Part 2 of the Agile Architecture Series</a>, I talk about “Trust but Verify”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PnZoPlFNoD9BwluS" /><figcaption>Photo by <a href="https://unsplash.com/@marekpiwnicki?utm_source=medium&amp;utm_medium=referral">Marek Piwnicki</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>We want our Agile teams to run fast and build awesome stuff. We also don’t like them making arbitrary design decisions that don’t consider the organisation’s long-term “Big Rock” goals.</p><p>The Answer is (can be) simple.</p><ol><li>Ensure everyone knows the roadmaps, where we want our Capabilities and Product Portfolios to be in a few years.</li><li>Put some light governance in place to ensure that architecture and designs are reviewed before implementation.</li></ol><h3>Summary</h3><p>So, while Enterprise Architecture may not offer a crystal-clear view of the future, its emphasis on agility and adaptability empowers organizations to make informed decisions and navigate future challenges with greater confidence and resilience.</p><p>So —</p><ol><li>Know Your Big Rocks — What is truly important.</li><li>Understand your current state and status. (Think in terms of Capabilities)</li><li>Map out your Future State</li><li>Govern your Future State</li></ol><p><em>In the next and final part of the Agile Architecture series, I will address the issue of what we do with legacy and the need for Architecture refactoring.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c24aa5d5085" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prospa-technology/agile-enterprise-architecture-0c24aa5d5085">Agile Enterprise Architecture</a> was originally published in <a href="https://medium.com/prospa-technology">Technology @ Prospa</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Emerging vs Intentional Architecture]]></title>
            <link>https://medium.com/prospa-technology/emerging-vs-intentional-architecture-385071ae5d75?source=rss----5a51d2e8c751---4</link>
            <guid isPermaLink="false">https://medium.com/p/385071ae5d75</guid>
            <category><![CDATA[architecture-pattern]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[agile-architecture]]></category>
            <dc:creator><![CDATA[Stephen Crockett]]></dc:creator>
            <pubDate>Thu, 23 Nov 2023 01:01:57 GMT</pubDate>
            <atom:updated>2023-11-23T01:01:57.631Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part 2 of the Agile Architecture Series</em></p><p>If you’ve seen <a href="https://medium.com/prospa-technology/architecturally-significant-decisions-68ac47687277">Part 1 of the series</a>, you may be able to recognise One-way or Two-way decisions when it comes to Architecture (or life in general). How do we go about architecting solutions now that we know how vital or “permanent” the decision is?</p><p>Let’s start with the two extremes of architecting; Emerging and Intentional.</p><h4>Emerging Architecture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qn7AvH92tgb9Kyhm" /><figcaption>Photo by <a href="https://unsplash.com/@martijnbaudoin?utm_source=medium&amp;utm_medium=referral">Martijn Baudoin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Architecture is quite informal and is usually determined after the solution is built (or as part of building the solution).</p><p><em>Typical steps involved</em></p><ol><li>BUILD</li><li>Document Architecture (optional)</li></ol><h4>Intentional Architecture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GQPKu6wAET1EiFSy" /><figcaption>Photo by <a href="https://unsplash.com/@kellysikkema?utm_source=medium&amp;utm_medium=referral">Kelly Sikkema</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Architecture is planned, documented, debated, approved, and then the solution is built.</p><p><em>Typical Steps involved</em></p><ol><li>Discuss / Debate Architecture</li><li>Document Architecture</li><li>Approve Architecture</li><li>Build</li><li>Document actual Architecture (optional)</li></ol><p><strong>spoiler alert:</strong> I don’t think Emerging Architecture or Intentional Architecture is Agile Architecture.</p><p>A quick summary of One-way and Two-way decisions. One-way decisions are difficult to change and should be more considered, whereas Two-way decisions can be changed (without a lot of impact) and should have a lighter governance touch.</p><ul><li>Intentional Architecture is still needed when looking at One-Way decisions. You need to get a consensus that you are making the right choices and that all the stakeholders have bought into the future state architecture.</li><li>We can’t always afford the effort of Intentional architecture for our Two-Way decisions. We also don’t want our architecture to just emerge based on a conversation in a one-hour sprint planning session.</li></ul><h3>Trade-offs</h3><p>Emerging vs Intentional Architecture appears to be about trade-offs that you need to make when you are designing a system.</p><h4>Sometimes Agile = Emerging Architecture or “Architecture Free”</h4><p>When I think about Agile, it is usually about choosing</p><ol><li>Immediate Value (aka the MVP)</li><li>Ensuring Teams have the Autonomy to run as fast as they can</li><li>Being Agile and Responsive to Customer Needs.</li></ol><p>Interestingly enough, these Agile goals are usually the bane of the Architect, where teams use the Agile mantra to load up on Technical Debt and never quite tackle the big problems, or drive the big solutions that will help organisations with their long-term strategic goals.</p><p>On the other hand, when (formally) architecting a solution we look to</p><ol><li>Maximum Value at the expense of immediate value.</li><li>Seek Opportunities for Reuse and synergy across Teams instead of seeking Autonomy.</li><li>Be Forward-thinking (i.e. Slow) instead of Agile and Responsive.</li></ol><p>So what we appear to have is a fundamental dichotomy of goals that are equally important but seem to have trouble living together.</p><h4>Immediate Value vs Maximum Value</h4><p>So where do we set this dial?</p><ul><li>Do I want 50% of the possible value of an opportunity within 1 month or wait for 90% of the possible value in 10 months?</li></ul><p>And the answer is → It depends. What a great discussion to have with your stakeholders!</p><h4>Autonomy vs Reuse</h4><p>So what is more important?</p><ul><li>What you know? OR</li><li>Who you know?</li></ul><p>So a totally unsubstantiated hypothesis is that -</p><p>H1. Engineers like being autonomous and keeping to themselves because as a group they are mostly Introverts.</p><p>H2. Engineers are a very clever group of people and what they need to do can be done quicker if they don’t need to talk to anyone.</p><p>H3. Reuse won’t happen, unless Engineers are forced or have an incentive to look within the organisation for possible reuse.</p><p><em>Some ideas for unlocking reuse .. coming up</em></p><h4>Agile and Responsive vs Forward Thinking</h4><p>It is very rare, when looking at a plan for a new feature or some uplift of functionality that I see time carved out to understand and get the architecture right.</p><p>Usually, there is an expectation that “build” will start the week following the kick-off / sprint-planning / discovery workshop, etc. As architects, we don’t then have a lot of time to draw rectangles on whiteboards and stare out the window looking for inspiration.</p><p>So the challenge for the “Agile” Architect is how can we -</p><ul><li>Provide enough guidance to the Engineers to start build, without making them wait until we finalise the architecture.</li><li>Minimise any waste; yes a lot of incremental work are two-way decisions that can be reversed, but let’s not waste a sprint if we don’t need to.</li></ul><p><em>The usual approach to solve this is to complain that Product / Service Design etc have had months doing research and study and there is just not enough time to do a proper architecture. A different approach coming up.</em></p><h3>Problem 1 — Equating Agile Architecture with No Architecture</h3><p><em>Favouring the No Architecture Approach</em></p><h4>Technical Debt gets accumulated</h4><p>Actually, there is <strong>Bad</strong> technical debt and <strong>Not-So-Bad</strong> technical debt.</p><ul><li><strong>Bad</strong> technical debt is technical debt that we accumulate .. and we don’t know that we are creating it — until later.</li><li><strong>Not-So-Bad</strong> technical debt are short-cuts that we know about upfront and are still willing to pay the price because the “Value” is worth it.</li></ul><p>So the risk here is that we are creating Bad technical debt, and we don’t know it yet. Was the effort <strong>plus the new debt accumulated</strong> worth the Value we unlocked with this initiative?</p><h4>Can’t see the forest for the trees</h4><p>The Emerging Architecture / No Architecture approach lacks connection with a greater purpose. It can be difficult to see if this is moving us closer or further away from our medium and long-term goals for the system/portfolio/organisation.</p><h4>Reuse is not identified</h4><p>Refer to the Hypothesis above.</p><ul><li>H3: Engineers will not look to reuse assets if it is too hard or they are not told to.</li></ul><h3>Problem 2 — Thinking that Agile Architecture is just the same as what we used to do</h3><p><em>All Architecture is Intentional and sometimes Ivory Tower architecture</em></p><h4>Value opportunities are missed or diluted</h4><p>Every week we spend architecting the perfect solution, means a week longer to start realising value. The time we consume should be sympathetic to the value that is being unlocked and any expiry date on that potential value.</p><p>As an IT capability, we sometimes gather around and discuss how product can’t make up their minds and keep pivoting on direction. Actually what might be happening is that solutioning is taking too long and that the potential value has expired.</p><h4>Capacity is drained with reviews and decisioning</h4><p><em>… where no decision is needed</em></p><p>It’s not uncommon to have multiple layers of approval for a relatively minor architecture solution. Even if that solution is implementing a pattern that has been implemented many times before.</p><p>Time can be wasted in formal reviews and preparing for reviews, where we could perhaps put more trust in our senior engineers and a peer review process.</p><h3>Agile Architecture</h3><p>So bouncing from one sprint to the next and doing just enough design to keep the Engineers busy is not Agile Architecture and the old ways of pondering about a solution for months to produce all the “correct” architecture artefacts is not Agile Architecture. What can we say is Agile Architecture? What are the Steps?</p><h4>Step 1: The Architect Title and the Architect Role</h4><p><em>I’m An Architect so I do all the Architecture. Or this solution needs architecting.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*tEBqTk-cfAP3b3zYfYyaiQ.png" /><figcaption>Hi I’m from Architecture, I’m here to help</figcaption></figure><p>At the risk of putting some architects out of business. Not all architecture needs to be done by someone with the title of “Architect”. In fact, an Engineer in the Pod or Tribe may be much closer to the problem to be solved and the value that is being unlocked.</p><p>When creating a design for a new feature or enhancement, the person doing the architecture needs to consider -</p><ul><li>How do we usually solve these types of problems? Is there a Pattern or Guideline for this already? <strong>See Step 2</strong></li><li>Do I need help? Find an Architect or another Engineer to run your idea by.</li><li>Just like code reviews, get your solution peer-reviewed. <strong>See Step 3</strong></li></ul><h4>Step 2: Architecture Patterns &amp; Guidelines</h4><p><em>The Guardrails and Cheatsheets</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QhfIFS5ejf-cCYWf" /><figcaption>Photo by <a href="https://unsplash.com/@0ruofei0?utm_source=medium&amp;utm_medium=referral">Bournes senruoB</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>Extract from the TOGAF 9 Standard —</em></p><blockquote>Patterns offer the promise of helping the architect to identify combinations of Architecture and/or Solution Building Blocks (ABBs/SBBs) that have been proven to deliver effective solutions in the past, and may provide the basis for effective solutions in the future.</blockquote><p>Architecture patterns provide a systematic approach to solving common challenges. They not only expedite the solutioning process but also ensure that solutions adhere to best practices, promoting consistency and reliability across diverse projects.</p><p>Well-documented patterns solves the first challenge of reuse — How do we get Engineers (and other people doing architecture) to leverage the organisation’s knowledge.</p><p>Actually, can a lot of the detailed solutioning be distilled down to just a set of tick-a-boxes? For example -</p><p>☐ Does the solution use our documented OAuth pattern for Authentication</p><p>☐ Does the solution use the standard logging pattern</p><p>☐ Does the solution’s APIs conform to the API standard and are they published in the developer portal.</p><p>… you get the idea.</p><p><strong>How to Create Architecture Patterns</strong></p><ol><li>The best practice is extracting the architecture patterns out of the strategic projects within the organisation which leverages the depth and breadth of experiences gained during these significant initiatives. Many of the strategic projects include One-way decisions. We should be building patterns that consolidate our investment in these decisions.</li><li>Industry patterns are a great source of inspiration. The problem though is that there is more than one way (pattern) to do something. A process is needed to agree on the suitable patterns to use.</li><li>The most challenging way to produce patterns is a forensic analysis of what already exists in the organisation. This typically means multiple patterns have been used to solve the same type of problem. Work is needed to review the existing patterns and pick a winner for moving forward.</li></ol><h4>Step 3: Peer Reviews</h4><p><em>The Light Governance Approach</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DCVssL84iicy9HfU" /><figcaption>Photo by <a href="https://unsplash.com/@paulina_milde_jachowska?utm_source=medium&amp;utm_medium=referral">Paulina Milde-Jachowska</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In the words of one of America’s greatest Politicians and B-grade actors Ronald Reagan <strong>“Trust but verify”</strong> (Actually he borrowed it from a Russian proverb).</p><p>We want to trust people doing architecture to get on and do architecture, with a minimum of red tape. Especially for those two-way / noncritical solutions that are providing incremental value for their teams.</p><ul><li>Our Engineers are clever people who should not be slowed down by too much bureaucracy.</li></ul><p><strong>The Solution for ensuring conformance to architecture is -</strong></p><ol><li>Train Engineers / Architects to recognise Architectural significant solutions. Solutions that are systemically important need to have some more oversight and review.</li><li>Use the helpline / phone a friend to get to the right solution. This is especially important if you are colouring outside the lines or traveling too close to the guardrails.</li><li>Reviews should be open; foster debate and take us to a better place. They should not be so scary that they are avoided at all costs.</li></ol><h3>Summary</h3><h4>Large programs of work and One-Way Decisions</h4><p>When putting together an architecture for a significant piece of work or a One-Way decision, it is important to be intentional. Architecture should be well defined and endorsed, after all, it will be around for some time.</p><p>To get the most out of these types of investments, we should aim to produce Architecture Patterns. Architecture Patterns will help to ensure that enhancements and features that build on top of the work delivered are consistent and maximise value.</p><h4>Agile Architecture for Everything Else</h4><p>So now that we have sorted out the large significant projects and architectures …</p><ol><li><strong>Good architecture is not just done by Architects.</strong> Given the right tools and support, we can have good repeatable architecture solutions from within the Pods / Tribes without bringing in external consultants (ie architects)</li><li><strong>Invest “architecture time” in Patterns rather than Solution Architectures. </strong>We don’t need to lock up capacity building, documenting, and approving solutions for something that we already know the answer to. An architecture pattern documented once can serve many project initiatives.</li><li><strong>Trust but verify</strong>. Architecture solutions can be peer-reviewed as well. Engineers and architects should not be afraid to raise an architectural concern.</li></ol><h4>Next — Agile Enterprise Architecture?</h4><p>Did not get a chance to discuss how Agile architecture can / needs to align with the organisation strategy. Topic for next part in the series.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=385071ae5d75" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prospa-technology/emerging-vs-intentional-architecture-385071ae5d75">Emerging vs Intentional Architecture</a> was originally published in <a href="https://medium.com/prospa-technology">Technology @ Prospa</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How can Cypress work with Azure Table Storage]]></title>
            <link>https://medium.com/prospa-technology/how-can-cypress-work-with-azure-table-storage-388b93dfdf93?source=rss----5a51d2e8c751---4</link>
            <guid isPermaLink="false">https://medium.com/p/388b93dfdf93</guid>
            <category><![CDATA[azure-table-storage]]></category>
            <category><![CDATA[cypress]]></category>
            <dc:creator><![CDATA[Ivan Xue]]></dc:creator>
            <pubDate>Tue, 31 Oct 2023 19:38:05 GMT</pubDate>
            <atom:updated>2023-10-31T19:44:50.430Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*21fQrjAvjx92AzzvnweNPg.jpeg" /><figcaption>Azure storage</figcaption></figure><blockquote>Azure Table storage is a service that stores non-relational structured data (also known as structured NoSQL data) in the cloud, providing a key/attribute store with a schemaless design.</blockquote><p><strong>How can Cypress interact with Azure Table Storage?</strong></p><p>Firstly, in order to make table storage functions re-usable, we created a <a href="https://medium.com/cameron-nokes/the-30-second-guide-to-publishing-a-typescript-package-to-npm-89d93ff7bccd">private node package</a> to wrap up some common functions for table storage using <a href="https://www.npmjs.com/package/@azure/data-tables"><em>@azure/data-tables</em></a><em>.</em></p><p>package.json</p><pre>&quot;dependencies&quot;: {<br>    &quot;@azure/data-tables&quot;: &quot;^13.2.0&quot;,<br>    &quot;@azure/identity&quot;: &quot;^3.0.0&quot;,<br>    &quot;npm&quot;: &quot;^8.12.1&quot;<br>  }</pre><p>index.ts</p><p><em>AzureSASCredential and AzureNamedKeyCredential</em></p><pre>import { odata, TableClient, AzureSASCredential } from &#39;@azure/data-tables&#39;;<br><br>export async function listEntities(<br>  accountName: string,<br>  sasToken: string,<br>  tableName: string,<br>  partitionKey: string,<br>  top = 100<br>) {<br>  const tableClient = new TableClient(<br>    `https://${accountName}.table.core.windows.net`,<br>    tableName,<br>    new AzureSASCredential(sasToken)<br>  );<br><br>  const entities = tableClient.listEntities({<br>    queryOptions: { filter: odata`PartitionKey eq ${partitionKey}` },<br>  });<br><br>  let result: any = [];<br><br>  for await (const page of entities.byPage({ maxPageSize: top })) {<br>    result = [...page];<br>    break;<br>  }<br><br>  return result;<br>}</pre><pre>import { odata, TableClient, AzureNamedKeyCredential } from &#39;@azure/data-tables&#39;;<br><br>export async function listEntities(<br>  accountName: string,<br>  accountKey: string,<br>  tableName: string,<br>  partitionKey: string,<br>  top = 100<br>) {<br>  const tableClient = new TableClient(<br>    `https://${accountName}.table.core.windows.net`,<br>    tableName,<br>    new AzureNamedKeyCredential(accountName, accountKey)<br>  );<br><br>  const entities = tableClient.listEntities({<br>    queryOptions: { filter: odata`PartitionKey eq ${partitionKey}` },<br>  });<br><br>  let result: any = [];<br><br>  for await (const page of entities.byPage({ maxPageSize: top })) {<br>    result = [...page];<br>    break;<br>  }<br><br>  return result;<br>}</pre><p>Secondly, we need to install the above node module and call the function from Cypress to get data from table storage.</p><p>Since we are using AzureSASCredential, we need to generate <a href="https://learn.microsoft.com/en-gb/rest/api/storageservices/delegate-access-with-shared-access-signature">SAS token</a> for the storage account first and save it in Azure Key Vault for safety reason.</p><p><strong>What error we got from our first try?</strong></p><p>Initially we were using AzureNamedKeyCredential to create the table client and added this function in the support file, such as commands.tsbut it failed with the following error:</p><pre>export const listEntities = (partitionKey: string) =&gt; {<br>  return cy.waitUntil(<br>    () =&gt;<br>      listEntities(<br>        Cypress.env(&#39;STORAGEACCOUNTNAME&#39;),<br>        Cypress.env(&#39;STORAGEACCOUNTKEY&#39;),<br>        Cypress.env(&#39;TABLENAME&#39;),<br>        phoneNumber<br>      ).then((entities) =&gt; {<br>        return entities;<br>      }),<br>    { interval: 2000, timeout: Cypress.config(&#39;responseTimeout&#39;) }<br>  );<br>};</pre><blockquote>&gt; Cypress is not defined</blockquote><p><strong>How we made it work?</strong></p><p>After doing the research online and debugging for a long time, we found that the root cause is AzureNamedKeyCredential cannot work in a browser but Cypress is running all tests in a browser.</p><p>example from npm:</p><pre>const { TableClient, AzureNamedKeyCredential } = require(&quot;@azure/data-tables&quot;);<br><br>// Enter your storage account name and shared key<br>const account = &quot;&lt;account&gt;&quot;;<br>const accountKey = &quot;&lt;accountkey&gt;&quot;;<br>const tableName = &quot;&lt;tableName&gt;&quot;;<br><br>// Use AzureNamedKeyCredential with storage account and account key<br>// AzureNamedKeyCredential is only available in Node.js runtime, not in browsers<br>const credential = new AzureNamedKeyCredential(account, accountKey);<br>const client = new TableClient(`https://${account}.table.core.windows.net`, tableName, credential);</pre><p>So, we needed to find a way to run this function in a node environment. After checking the Cypress documents, we found <a href="https://docs.cypress.io/api/commands/task">cy.task</a> is the plugin we can utilize.</p><p>Step 1: Define the task in cypress.config.ts</p><pre>setupNodeEvents(on) {<br>      on(&#39;task&#39;, {<br>        async listEntities(dataTableInfo: DataTableListEntitiesInterface) {<br>          const entities = await listEntities(<br>            dataTableInfo.storageAccountName,<br>            dataTableInfo.storageAccountKey,<br>            dataTableInfo.tableName,<br>            dataTableInfo.partitionKey<br>          );<br>          return entities;<br>        },<br>      });<br>}</pre><p>Step 2: Call the function in the helper file or spec</p><pre>cy.task(&#39;listEntities&#39;, dataTableInfo).then((entities: entityInterface[]) =&gt; {<br>        entities.forEach((entity) =&gt; {<br>          console.log(entity);<br>          });<br>      });</pre><p><strong>What enhancement we made?</strong></p><p>After further digging for the above issue and reading the npm document carefully, we found that @azure/data-tables supports SAS token authorization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*4pcm9Jf8fVDvXhQtCiKJZw.png" /><figcaption>SAS token authorization</figcaption></figure><p>By using SAS token authorization, we can wrap listEntities funcion in commands.ts or cy.task in cypress.config.ts.</p><p>commands.ts</p><pre>export const get2FACode = (phoneNumber: string) =&gt; {<br>  return cy.waitUntil(<br>    () =&gt;<br>      listEntities(<br>        Cypress.env(&#39;STORAGEACCOUNTNAME&#39;),<br>        Cypress.env(&#39;STORAGEACCOUNTSASTOKEN&#39;),<br>        Cypress.env(&#39;TABLENAME&#39;),<br>        phoneNumber<br>      ).then((entities) =&gt; {<br>        return entities;<br>      }),<br>    { interval: 2000, timeout: Cypress.config(&#39;responseTimeout&#39;) }<br>  );<br>};</pre><p>cypress.config.ts</p><pre>setupNodeEvents(on) {<br>      on(&#39;task&#39;, {<br>        async listEntities(dataTableInfo: DataTableListEntitiesInterface) {<br>          const entities = await listEntities(<br>            dataTableInfo.storageAccountName,<br>            dataTableInfo.storageAccountSasToken,<br>            dataTableInfo.tableName,<br>            dataTableInfo.partitionKey<br>          );<br>          return entities;<br>        },<br>      });<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=388b93dfdf93" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prospa-technology/how-can-cypress-work-with-azure-table-storage-388b93dfdf93">How can Cypress work with Azure Table Storage</a> was originally published in <a href="https://medium.com/prospa-technology">Technology @ Prospa</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Architecturally Significant Decisions]]></title>
            <link>https://medium.com/prospa-technology/architecturally-significant-decisions-68ac47687277?source=rss----5a51d2e8c751---4</link>
            <guid isPermaLink="false">https://medium.com/p/68ac47687277</guid>
            <category><![CDATA[agile-architecture]]></category>
            <category><![CDATA[architecture-governance]]></category>
            <category><![CDATA[architecture-decisions]]></category>
            <dc:creator><![CDATA[Stephen Crockett]]></dc:creator>
            <pubDate>Mon, 02 Oct 2023 22:00:02 GMT</pubDate>
            <atom:updated>2023-10-02T22:00:02.850Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Part 1 of the Agile Architecture Series</em></strong></p><p>Engaging in architecture within a start-up or scale-up organisation offers a unique and exciting set of opportunities that distinguish it from traditional corporate environments.</p><p>It’s an environment where architects often find themselves navigating a dynamic landscape that demands adaptability and creativity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vh-RycuE_NL5Slcqgp7sBg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@mrtnpro?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Martin</a> on <a href="https://unsplash.com/photos/LQiXb7dA4Dk?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><strong>Scope and Diversity:</strong> Crucially, the scope and diversity of architectural challenges encountered across different domains can present architects with a uniquely rewarding yet equally demanding experience.</p><p>This diversity not only allows architects to explore a wide spectrum of problems but also challenges them to adapt and find innovative solutions, making their roles both intellectually stimulating and professionally enriching.</p><p><strong>Agility and Focus:</strong> Juggling Agility and Focus in such a vast scope can be tricky. But how do we decide what’s crucial?</p><p>Well, that’s where One-Way and Two-Way decisions come into play.</p><h3>One-Way and Two-Way Decisions</h3><p>As a kid, one of the classic hobbies I embraced was playing with model trains, and it was an endless source of fun and imagination.</p><p>One of the earliest and most significant “one-way” decisions I had to make was selecting the gauge of the model trains. It might seem like a small choice, but in the world of model trains, it’s the decision that sets the stage for everything else. The gauge determines the size and scale of the trains and tracks, dictating which models, accessories, and scenery would be compatible. It’s akin to choosing the foundation for your miniature railway universe.</p><p>This seemingly simple choice had a profound impact on the entire journey, as it guided subsequent decisions about track layouts, locomotives, carriages, and even the landscapes I would create. It’s amazing how a single decision in a childhood hobby can teach the importance of architecturally significant choices in the broader context of life and decision-making.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*R-4oCO28-v-4zJVhbvWKEw.jpeg" /><figcaption>Wikimedia Commons</figcaption></figure><p>I’m going to paraphrase a great visualisation from the <a href="https://www.opengroup.org/"><strong>The Open Group</strong></a></p><blockquote>Think about decisions as one-way or two-way doors [Think Like Amazon: Rossman 2019].</blockquote><blockquote>When you walk through a <strong>one- way door</strong>, if you do not like what you see on the other side, you cannot get back to the initial state. This type of decision, is difficult to reverse.</blockquote><blockquote>When you walk through a <strong>two-way door</strong>, if you do not like what you see on the other side, you can walk right back through the door and return to the previous state. This type of decision, is easy to reverse.</blockquote><h3>One-Way Decisions</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*1xa6Cal7leN031a987fGiQ.jpeg" /></figure><p>One-way decisions are choices that significantly impact a project, system, or organisation and are challenging to reverse or modify once implemented. These decisions typically include large programs of work that have a profound and enduring impact on an organisation.</p><p>Examples of One-Way Decisions can include -</p><ul><li>Re-platforming your core system. This can be akin to modernising the heart of your organisation. This typically involves migrating from an existing infrastructure or architecture to a new one, often driven by the need for improved functionality, scalability, security, or compliance.</li><li>Changing your Technology Stack (or Parts of). Another example of a one-way decision with significant implications. This decision involves migrating from one set of programming languages, frameworks, or tools to another, often with the aim of improving efficiency, reducing costs, or addressing emerging market trends.</li></ul><p>So when it comes to Focus, it becomes critical to identify your one-way decisions, spend more time evaluating them, testing them and architecting them.</p><p>When you figure out the big, game-changing “One-Way” decisions, the other choices (should just) fall into place. Those Two-Way decisions should go hand-in-hand with and match up to the main direction that has been set.</p><h3>Two-Way Decisions</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*tiLmefMZ-gpOJinMpx7o2w.jpeg" /></figure><p>Two-way decisions, on the other hand, are choices that offer flexibility and the possibility of revisiting the decision later in the project.</p><p>Key characteristics of two-way decisions include:</p><ol><li><strong>Flexibility: </strong>Two-way decisions allow the team to experiment and adjust based on evolving requirements or new information.</li><li><strong>Lower Impact:</strong> These decisions have a lower immediate impact on the overall architecture and can be revisited if necessary.</li><li><strong>Examples: </strong>Include adopting a specific library or building a feature for a mobile app. Also, many Two-Way decisions are usually made within the team or pod and don’t have a complex integration requirement.</li></ol><p>Actually, the Two-Way Decisions don’t always just fall into place. There can be a lot of wastage around doing things the wrong way, then needing to fix them up and trying again (<em>More on how to avoid this problem in Part 2 of this series</em>).</p><h3>Conclusion</h3><ul><li>Architecturally Significant Decisions hold the power to shape a project, system, or organisation. Recognising these decisions is crucial to channel time and resources effectively. Equally vital is avoiding unnecessary “governance” on less important decisions that can be easily undone.</li><li><strong>One-way decisions</strong> should have focus and oversight. These are the architecture decisions that are important to the organisation and set the stage for future work.</li><li><strong>Two-way decisions </strong>benefit from a lighter touch when it comes to governance and oversight. These choices empower teams to innovate and deliver swiftly, enabling flexibility and agility in response to evolving needs and opportunities.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68ac47687277" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prospa-technology/architecturally-significant-decisions-68ac47687277">Architecturally Significant Decisions</a> was originally published in <a href="https://medium.com/prospa-technology">Technology @ Prospa</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Type of Data Is It Anyway?]]></title>
            <link>https://medium.com/prospa-technology/what-type-of-data-is-it-anyway-c2eb290ff2ad?source=rss----5a51d2e8c751---4</link>
            <guid isPermaLink="false">https://medium.com/p/c2eb290ff2ad</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Brad Jenkinson]]></dc:creator>
            <pubDate>Thu, 31 Aug 2023 21:33:27 GMT</pubDate>
            <atom:updated>2023-08-31T21:33:26.972Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bt9vrOypFV5gLdecBFOXfA.jpeg" /></figure><h3>Overview</h3><p>Meet Squeek and Jinx (on the left and right, respectively). Aside from being a shameless plug for my furbabies, I’m enlisting their help to describe the different data types we all encounter daily. This article serves to give everyone who interacts with data (for data practitioners and non-data muggles alike) a deeper understanding of what sort of data we’re looking at, what functions we can and cannot use on the data, and some common pitfalls to avoid.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*u5mLwQ6n66Uo1Ki17MtNJA.png" /><figcaption>Math Cats</figcaption></figure><p>The table below summarises what this article covers and serves as a quick go-to reference once we’ve gained an intuition into the different types:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cUNJTGVUp-dRX7vqtB3KaA.png" /></figure><h3>The Nitty Gritty</h3><p>So let’s say for &lt;insert reason&gt; we decide to data capture the details of Squeek and Jinx into a data table, as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/344/1*9a4pv3gaapJwVdLu6cTBDQ.png" /></figure><h4>Nominal Data</h4><blockquote>nominal [<em>adjective</em>]<em>: </em>(of a role or status) existing in name only.</blockquote><p>Let’s start with the Name column in this table, which is a perfect example of nominal data. Intuitively we all know that we can confidently say that Squeek &lt;&gt; Jinx. But does it make sense to say Squeek &gt; Jinx? Or what about Squeek + Jinx = ? Or what about Jinx / Squeek = ? And can we average this column??</p><p>This list of questions illustrates the characteristics of nominal data in that this data type serves only to label a record/cat. But we cannot infer an order nor aggregate this information. When analysing this sort of data, at most we can count their occurrences, or if we want to get a sense of its central tendency (i.e. the typical behaviour of this information) we can’t use averages, but we can use the mode.</p><blockquote><strong>mode: </strong>the most frequently recurring value</blockquote><p>In this example, there is no mode because there exists one record for each furball. But if we recorded the same data for a rescue shelter, we may use the mode to identify the most frequently occurring name. Other examples of nominal data that we could have recorded are colour and breed.</p><p><strong>Watch out! </strong>The ‘Id’ column in this table looks temptingly numeric, but it’s just another nominal column. For example, is Jinx’s Id twice as big as Squeek’s Id? What is the average of Ids? While you can certainly apply these operations in a spreadsheet, the results would be nonsensical.</p><p>“But what about the order of the Ids, Brad? Surely having a larger Id means something about the time of allocation?” The answer to which is… Maybe… It all depends on how Ids are assigned (numbered in sequence or not) and what type of information you’re trying to uncover. It <strong>could</strong> be a proxy of determining order, but it’s probably best not to because we rely too heavily on potentially false assumptions of how these values are assigned.</p><h3>Ordinal Data</h3><blockquote>ordinal [<em>adjective</em>]<em>: </em>relating to the order of something in a series.</blockquote><p>Now to the Size column in our table. Seeing that Squeek is small and Jinx is large, what we now have is data with which we can infer order. In this example, we know that Jinx is larger than Squeek. But what we don’t know from this column is <strong><em>how much larger.</em></strong> This is a key distinction of ordinal data from interval and ratio data — we can see the hierarchical order, but the interval between ‘large’ and ‘small’ is not evenly-spaced or measurable. For this reason, we can’t add, subtract, divide, multiply, or average this column. We can, however, sort it. And to measure central tendency, we can again use mode.</p><p><strong>Watch out! </strong>This data type often catches us when they are turned into numbers instead of words. Consider a survey that asks us to rank, on a scale of 1–5 with 5 being total agreement and 1 being total disagreement, how much we agree with the statement that cats are better than dogs. We often see researchers report the results of these questions using averages or describing them as being <em>x</em> times more than the other, but that is not technically correct. In this example, if I answer 4 in this question and you answer 2, does that mean I like cats twice as much as you do? How can we be sure that the distance between your 2 and 4 are the same as mine? Simple — we can’t. This is what we mean when talking about evenly-spaced distances between values. With ordinal data, we have no concept of the distance between your and my numbers, but we do know the order.</p><p>Coincidentally, turning ordinal data into numeric scales (as in the example above) does afford us one advantage — we can measure its central tendency using medians (but not averages!). In simple terms — we get the median of a set of values by sorting them and picking the middle number.</p><blockquote><strong>median: </strong>the middle of a set of numbers</blockquote><h3>Interval Data</h3><blockquote>interval [<em>noun</em>]<em>: </em>a period between two events or times, or the space between two points.</blockquote><p>Now consider the ‘Year Born’ column in our table. As with the previous data types, we can infer:</p><ul><li>whether or not Jinx and Squeek were born in the same year or not; and</li><li>the order in which they were born</li></ul><p>But this data type gives us one extra detail — the <strong><em>distance</em></strong> between their birth years. We know that there are 365(-ish) days in a year, and Jinx was born two years before Squeek. Because of this aspect of this data type, we can meaningfully add or subtract values of this data type from each other as well as calculate their averages.</p><p>However, this data type doesn’t have a meaningful zero. Think about it — the year zero doesn’t mean that there are no years (and don’t forget those B.C. years). This is the same with temperature in Celsius or Fahrenheit — zero for these values doesn’t mean the absence of heat. (Temperature recorded in Kelvin is the exception here because its zero is the coldest cold there can be). Because of this aspect, we can’t meaningfully divide, multiply, square root, or calculate exponents for this data. E.g. is the year 2000 twice the year 1000?</p><p><strong>Watch out! </strong>This is the most difficult data type to differentiate from ratio data. Remember to ask yourself if zero is actually zero for your data.</p><h3>Ratio Data</h3><blockquote>ratio [<em>noun</em>]<em>: </em>the quantitative relation between two amounts showing the number of times one value contains or is contained within the other.</blockquote><p>Now consider the ‘No. of Teeth’ column. While I have no idea how many teeth Jinx has, Squeek actually has none (aside from being a touch drooly, he’s fine). With this data we can tell that 18 teeth is more than zero, and the space between 1 and 2 teeth is evenly spaced by one tooth. But what’s more— because this has a meaningful zero (zero teeth = no teeth), we can turn these into ratios! If Squeek had half the teeth of Jinx, he would have nine teeth. And we can apply all the operations and aggregations with this data, including geometric means (the description of which falls outside the scope of this article).</p><h3>Conclusion</h3><p>This article shows the different data types we interact with and how prevalent they are, even if we’re just creating a table of cat characteristics. Understanding the key differences between them will go some way to understanding how to interrogate your data more effectively without needing to be a flash data analyst or stats whizz.</p><p>This article is by no means exhaustive - and there are certainly more operations and tests that can only be applied to certain data types - but this knowledge forms the basis that you will need to explore these further…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2eb290ff2ad" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prospa-technology/what-type-of-data-is-it-anyway-c2eb290ff2ad">What Type of Data Is It Anyway?</a> was originally published in <a href="https://medium.com/prospa-technology">Technology @ Prospa</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to publish Cypress reports to Azure pipelines]]></title>
            <link>https://medium.com/prospa-technology/how-to-publish-cypress-reports-to-azure-pipelines-80c16d1fa7bc?source=rss----5a51d2e8c751---4</link>
            <guid isPermaLink="false">https://medium.com/p/80c16d1fa7bc</guid>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[cypress]]></category>
            <dc:creator><![CDATA[Ivan Xue]]></dc:creator>
            <pubDate>Mon, 14 Aug 2023 03:11:08 GMT</pubDate>
            <atom:updated>2023-08-14T03:26:35.025Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*m1Am-JFyz7edRcoq.png" /><figcaption>Cypress</figcaption></figure><p><strong>Why we use Cypress?</strong></p><p>With Cypress, we can use the same framework for both UI and API automation testing. Comparing with other automation testing tools, such as Selenium, Cypress waits and retries automatically for commands and assertions, we don’t need to add explicit waits. Cypress runs tests in real browsers, we don’t need to download different versions of browser drivers.</p><p><strong>Challenges we are facing</strong></p><p>We integrate Cypress tests with Azure CI/CD pipelines and record tests to Cypress Cloud. With Cypress Cloud, we can easily integrate with Slack to post the regression results to different slack channels. Based on this setup, it makes easy for QA engineers to be notified of the testing results and check the screenshots/videos of failures.</p><p>But this is not the case for developers, they prefer to check the test results from CI/CD pipelines directly without checking slack messages or logging in to Cypress Cloud. Time is Money. :) So we need to find out how to publish Cypress test results to Azure pipelines.</p><p><strong>How I made it work</strong></p><p>Firstly, I did some research online regarding the task to publish test reports and what format of reports that Azure supports. Fortunately, Azure has the built-in task <a href="https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-test-results-v2?view=azure-pipelines&amp;tabs=trx%2Ctrxattachments%2Cyaml">PublishTestResults</a> to publish test results.</p><pre># Publish Test Results v2<br># Publish test results to Azure Pipelines.<br>- task: PublishTestResults@2<br>  inputs:<br>    testResultsFormat: &#39;JUnit&#39; # &#39;JUnit&#39; | &#39;NUnit&#39; | &#39;VSTest&#39; | &#39;XUnit&#39; | &#39;CTest&#39;. Alias: testRunner. Required. Test result format. Default: JUnit.<br>    testResultsFiles: &#39;**/TEST-*.xml&#39; # string. Required. Test results files. Default: **/TEST-*.xml.<br>    #searchFolder: &#39;$(System.DefaultWorkingDirectory)&#39; # string. Search folder. Default: $(System.DefaultWorkingDirectory).<br>    #mergeTestResults: false # boolean. Merge test results. Default: false.<br>    #failTaskOnFailedTests: false # boolean. Fail if there are test failures. Default: false.<br>    #testRunTitle: # string. Test run title. <br>  # Advanced<br>    #buildPlatform: # string. Alias: platform. Build Platform. <br>    #buildConfiguration: # string. Alias: configuration. Build Configuration. <br>    #publishRunAttachments: true # boolean. Upload test results files. Default: true.</pre><p>This task supports the following formats: JUnit, NUnit, VSTest, XUnit, CTest. Apart from JUnit, other reports are mainly for .Net framework.</p><p>So the next step is to check whether Cypress supports JUnit report. The answer is YES.</p><blockquote>Because Cypress is built on top of Mocha, that means any reporter built for Mocha can be used with Cypress. Here is a list of built in Mocha reporters.</blockquote><blockquote><a href="https://mochajs.org/#reporters">Mocha’s built-in reporters</a></blockquote><blockquote>By default, Cypress uses the spec reporter to output information to STDOUT.</blockquote><blockquote>We’ve also added the two most common 3rd party reporters for Mocha. These are built into Cypress and you can use them without installing anything.</blockquote><blockquote><a href="https://github.com/cypress-io/mocha-teamcity-reporter">teamcity</a></blockquote><blockquote><a href="https://github.com/michaelleeallen/mocha-junit-reporter">junit</a></blockquote><blockquote>Finally, we support creating your own custom reporters or using any kind of 3rd party reporter.</blockquote><p>Source: <a href="https://docs.cypress.io/guides/tooling/reporters">https://docs.cypress.io/guides/tooling/reporters</a></p><p>Since we want to generate multiple reporters, such as specand Junit , we utilize npm package <a href="https://www.npmjs.com/package/mocha-multi-reporters">mocha-multi-reporters</a> to achieve this.</p><p>Step 1: install the npm packages</p><pre>npm i -D mocha-multi-reporters<br>npm i -D mocha-junit-reporter</pre><p>Step 2: update Cypress config to use mocha-multi-reporters</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*FyNeaAmMf4U1h9nZwtuBHQ.png" /><figcaption>Cypress config example</figcaption></figure><pre>reporter: &#39;mocha-multi-reporters&#39;,<br>reporterOptions: {<br>  configFile: &#39;reporter-config.json&#39;,<br>},</pre><p>Step 3: create reporter-config.json to specify the reporters to be used</p><pre>{<br>  &quot;reporterEnabled&quot;: &quot;spec, mocha-junit-reporter&quot;,<br>  &quot;mochaJunitReporterReporterOptions&quot;: {<br>    &quot;mochaFile&quot;: &quot;results/test-result-[hash].xml&quot;<br>  }<br>}</pre><p>Step 4: add task in YAML file to publish the JUnit reporters</p><pre>- task: PublishTestResults@2<br>    displayName: &#39;Publish test results&#39;<br>    inputs:<br>      testResultsFiles: &#39;test-result-*.xml&#39;<br>      searchFolder: &#39;$(Build.Repository.LocalPath)/$(repo.repoName)/${{ parameters.testFolder }}/results&#39;<br>      mergeTestResults: true<br>      failTaskOnFailedTests: true<br>    continueOnError: true<br>    condition: succeededOrFailed()</pre><p>Now developers can simply check the results under theTests tab from the CI/CD pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*THXvfYNsJ4Ao-a09wekYCQ.png" /></figure><p><strong>Bonus Point</strong></p><p>Test reports are published to the CI/CD pipeline, but when we check the report, we can only see the error messages for failed tests without any screenshots or videos.</p><p>After spending a lot of time online, I found and updated the following powershell script to attach screenshots to the reports.</p><pre># Configuration<br>$global:cwd = Get-Location<br>$global:screenshotPath = Join-Path -Path $global:cwd -ChildPath &quot;cypress/screenshots&quot;<br><br># Global Variables<br>$screenshotsHashtable = @{ } # Key = test name, Value = Full screenshot filename<br><br># Authentication - Azure DevOps<br><br>$accessToken = $env:SYSTEM_ACCESSTOKEN<br>$teamFoundationCollectionUri = $env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI<br>$teamProjectId = $env:SYSTEM_TEAMPROJECTID<br>$buildId = $env:BUILD_BUILDID<br>$headers = @{ Authorization = &quot;Bearer &quot; + $accessToken }<br><br># Functions<br><br>function Save-Screenshots-Hashtable {<br> Write-Host &quot;Searching for screenshots in &#39;$($global:screenshotPath)&#39;&quot;<br><br> $screenshots = Get-ChildItem -Path $screenshotPath  -Filter *.png -Recurse -File | Select-Object -Property FullName, Name<br> <br> foreach ($screenshot in $screenshots) {<br><br>  $testName = $screenshot.Name -replace &quot; --&quot;, &quot;&quot;<br>  $testName = $testName -replace &quot; \(failed\).png&quot;, &quot;&quot;<br><br>  $screenshotsHashtable[$testName] = $screenshot.FullName<br><br>  Write-Host &quot;Found screenshot &#39;$($screenshot)&#39; for test &#39;$($testName)&#39;&quot;<br> }<br>}<br><br>function Get-TestRuns {<br><br> $today = Get-Date<br> $tomorrow = $today.AddDays(1)<br> $yesterday = $today.AddDays(-1)<br><br> $minLastUpdatedDate = $yesterday.ToString(&quot;yyyy-MM-dd&quot;)<br> $maxLastUpdatedDate = $tomorrow.ToString(&quot;yyyy-MM-dd&quot;)<br><br> $testRunUrl = &quot;$($teamFoundationCollectionUri)$($teamProjectId)/_apis/test/runs?api-version=5.1&amp;minLastUpdatedDate=$($minLastUpdatedDate)&amp;maxLastUpdatedDate=$($maxLastUpdatedDate)&amp;buildIds=$($buildId)&quot;<br> Write-Host &quot;Getting Test Runs from &#39;$testRunUrl&#39;&quot;<br><br> $testRunResponse = Invoke-RestMethod -Uri $testRunUrl -Headers $headers<br><br> $latestRun = $testRunResponse.value[$testRunResponse.count - 1];<br><br> Get-Test-Results -runId $latestRun.id<br>}<br><br>function Find-Screenshot-From-Test-Result {<br> param($testName)<br><br> Write-Host &quot;Searching screenshot for test &#39;$($testName)&#39;&quot;<br><br> $screenshotFilename = $screenshotsHashtable[$testName]<br><br> if ($null -ne $screenshotFilename) {<br>  Write-Host -ForegroundColor:Green &quot;Found screenshot &#39;$($screenshotFilename)&#39; matching test &#39;$($testName)&#39;&quot;<br> }<br>  else {<br>  Write-Host -ForegroundColor:Red &quot;No screenshot found matching test &#39;$($name)&#39;&quot;<br> }<br><br> return $screenshotFilename<br>}<br><br>function Add-Attachment-To-TestResult {<br> param($screenshotFilename, $testResultId)<br><br> $screenshotFilenameWithoutPath = Split-Path $screenshotFilename -leaf<br><br> $createTestResultsAttachmentUrl = &quot;$teamFoundationCollectionUri$teamProjectId/_apis/test/runs/$($runId)/results/$($testResultId)/attachments?api-version=5.1-preview&amp;outcomes=Failed&quot;<br><br> $base64string = [Convert]::ToBase64String([IO.File]::ReadAllBytes($screenshotFilename))<br><br> $body = @{<br>  fileName       = $screenshotFilenameWithoutPath<br>  comment        = &quot;Attaching screenshot&quot;<br>  attachmentType = &quot;GeneralAttachment&quot;<br>  stream         = $base64string<br> }<br><br> $json = $body | ConvertTo-Json<br><br> Write-Host &quot;Attaching screenshot by posting to &#39;$($createTestResultsAttachmentUrl)&#39;&quot;<br><br> $response = Invoke-RestMethod $createTestResultsAttachmentUrl -Headers $headers -Method Post -Body $json -ContentType &quot;application/json&quot;<br><br> Write-Host &quot;Response from posting screenshot &#39;$($response)&#39;&quot;<br>}<br><br>function Get-Test-Results {<br> param($runId)<br><br> $testResultsUrl = &quot;$teamFoundationCollectionUri$teamProjectId/_apis/test/runs/$($runId)/results?api-version=5.1&amp;outcomes=Failed&quot;<br><br> Write-Host &quot;Getting Test Results from &#39;$($testResultsUrl)&#39;&quot;<br><br> $testResultsResponse = Invoke-RestMethod -Uri $testResultsUrl -Headers $headers<br><br> foreach ($testResult in $testResultsResponse.value) {<br><br>  Write-Host &quot;Found failing test &#39;$($testResult.testCase.name)&#39;&quot;<br><br>  $screenshotFilename = Find-Screenshot-From-Test-Result -testName ($testResult.testCase.name -replace &#39;&quot;&#39;, &quot;&quot;)<br><br>  if ($null -ne $screenshotFilename) {<br>   Add-Attachment-To-TestResult -screenshotFilename $screenshotFilename -testResultId $testResult.id<br>  }<br> }<br>}<br><br># Entry Point<br>Write-Host &quot;TeamFoundationCollectionUri: $teamFoundationCollectionUri&quot;<br>Write-Host &quot;TeamProjectId: $teamProjectId&quot;<br>Write-Host &quot;BuildId: $buildId&quot;<br>Write-Host &quot;&quot;<br><br>Save-Screenshots-Hashtable<br>Get-TestRuns</pre><p><strong>Conclusion</strong></p><p>The above setup can save time for deployment especially for developers, they can simply get the clear reports for the regression tests in one place, if all tests pass, they can make the decision quickly to release changes to Production.</p><p>If there are any failed tests, we can check the results and screenshots, but such information is not very clear comparing with the videos captured in Cypress Cloud. If your organization has enough licenses, I would suggest to give developers access to Cypress Cloud so that they can check and debug the failures much more easily.</p><p>Moreover, with Cypress Cloud’s powerful integrations, you can integrate Cypress Cloud with GitHub, so that developers will have the ability to check the regression testing results from PR in GitHub directly. You can also configure the integration in Cypress Cloud to add PR comments based on the results.</p><p>PS: I will create another story for GitHub integration with Cypress Cloud in the next few weeks. Happy testing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80c16d1fa7bc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prospa-technology/how-to-publish-cypress-reports-to-azure-pipelines-80c16d1fa7bc">How to publish Cypress reports to Azure pipelines</a> was originally published in <a href="https://medium.com/prospa-technology">Technology @ Prospa</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>