<?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[Stories by Francesco De Liva on Medium]]></title>
        <description><![CDATA[Stories by Francesco De Liva on Medium]]></description>
        <link>https://medium.com/@francescodeliva?source=rss-4c7826618a52------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*W25juwirvjWRSF2EPkrYUQ.jpeg</url>
            <title>Stories by Francesco De Liva on Medium</title>
            <link>https://medium.com/@francescodeliva?source=rss-4c7826618a52------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 18:11:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@francescodeliva/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Investors Funding AI Were Still Using Excel. So I Fixed That.]]></title>
            <link>https://francescodeliva.medium.com/the-investors-funding-ai-were-still-using-excel-so-i-fixed-that-210f7bd1c789?source=rss-4c7826618a52------2</link>
            <guid isPermaLink="false">https://medium.com/p/210f7bd1c789</guid>
            <dc:creator><![CDATA[Francesco De Liva]]></dc:creator>
            <pubDate>Wed, 30 Jul 2025 05:02:42 GMT</pubDate>
            <atom:updated>2025-07-30T05:02:42.034Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How Kruncher’s AI Analyst is democratizing venture capital by giving smaller funds the same analytical power as industry giants.</em></p><p><em>Author: </em><a href="https://updates.kruncher.ai/meetings/francesco-de-liva"><em>Francesco De Liva</em></a></p><p><strong>July 2025 — Redwood City, CA</strong> — At heart, I am a tech guy. I spent years at Microsoft and Accenture, helping banks embrace AI and digital transformation. I witnessed the incredible innovation wave of generative AI firsthand and onboarded enterprises to utilize it.</p><p>It was at an AI conference when a VC, rather sheepishly, approached me for help. Dominic and his fund are still using Excel spreadsheets to do their work. They knew about modern CRMs and integrations and all that jazz. Yet he just can’t get on the bandwagon and modernize. I realized something surprising: while investors were funding the future, they were still stuck in the past themselves.</p><p>The implications struck me immediately. The manual work shaved off his team’s precious time. As disciplined and principled VCs are, it is still a number’s game at the core. You have piles of pitch decks and proposals to go through.</p><p>With no automation in play, they could only focus on a few deals at a time, forcing them to reject or proceed with companies too early. Many times, great innovators failed to fundraise simply because investor time and attention were limited resources.</p><p>“Can you make something that actually works?” Dominic asked, and his request gave me a pause. He went on as I thought deeply. “Look, I’m tired of working manually too. But we’ve tried using automated solutions before. They miss way more than they hit. I just can’t accept if a unicorn fell through the cracks.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X3Y4PRa7R5te8wASeSOoVA.png" /><figcaption>Kruncher’s Home Screen</figcaption></figure><p><em>Ah. </em>I understood what he was asking. But to bridge that isn’t simple. Over the past decade, leading funds like SignalFire, Headline, EarlyBird, and Sequoia have invested millions assembling teams of data scientists and engineers to turn proprietary information and third-party sources into measurable investment advantages.</p><p>GenAI presented an unprecedented opportunity to make investment more equitable, by having AI match the analytical powerhouse of big funds using only a sliver of the funds and time. They give investors the chance to process exponentially more data while focusing on what truly matters: meeting founders, listening to their stories, and building relationships. Meanwhile, AI could monitor and process thousands of companies simultaneously.</p><p>So I got to work. I left Microsoft to make something for Dominic, and ultimately other VCs who felt the same way. I knew the limitations of LLMs, and I set to dissecting and remaking one until it is specific enough to work for venture capital: surfacing high-potential companies, do portfolio monitoring, generating substantial investment memos, and helping with due diligence.</p><p>In late 2024, I finally registered Kruncher and launched. My vision is to equip smaller funds with the same capabilities as the big players. Ultimately, if my team and I succeed with Kruncher, we’ll help VCs and founders through successful exits, creating a network effect that helps new startups get funded and innovation flourish.</p><p>I returned to Dominic and let him try it. It sucked, and there were too many bugs, but I could see the vision. With enough tweaks and good user feedback, it could truly transform into the real thing.</p><p>Months later now, the experience and performance of Kruncher is much better. It is a truly intelligent AI Analyst for private markets. We serve 20+ funds and the platform has generated over 25,000 individual company reports with what industry analysts describe as “impressive relevance, breadth and depth.” It took 30+ specialized AI Analysts to get the platform working until investors are satisfied with the quality of insights made. Our intelligent algorithms work through funds’ internal data — financials, call transcripts, pitch decks — and augment them with 25+ public data sources including LinkedIn, Crunchbase, and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*R2kisdEqzNsXsePaI8fHZw.png" /><figcaption>Kruncher Report</figcaption></figure><p>For perspective, a mid-level analyst would need about 35 years of non-stop work to produce the same number of reports.</p><p>(And yes, Dominic is much happier now.)</p><p>I’ll be the first to say that it’s not perfect. But it doesn’t need to be. It just has to be better and more affordable than current solutions. And Kruncher is rapidly improving.</p><p>According to the Data-Driven Venture Capital Report 2025: “93% of VCs turn to data-driven strategies to boost efficiency, with 79% also aiming for better deal coverage and screening. This shift is driven by a need to focus on actual value drivers, avoid missing outlier opportunities, and ensure a more inclusive allocation of capital.”</p><p>In 2025, the new paradigm is a VC augmented by AI that enables partners to work through vastly more information. But for most firms, building a custom data stack isn’t practical — it requires massive upfront investment in capital, time, and technical talent. That’s why many are choosing to buy instead of build.</p><p>I built Kruncher to fit this narrow niche.</p><p>I envisioned a world where every fund has a dedicated analyst for each startup in its pipeline, constantly monitoring, analyzing, and generating insights. This technology is so much more than only helping deploy capital. It monitors existing investments and guides them through their next stages, all the way to successful exits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RUk9eF-y9wTb4uKR.jpg" /><figcaption>Watchlist Tracking in Kruncher</figcaption></figure><p>The landscape is changing fast. To keep up, VCs must embrace automation, move faster, and add more value-creation with the same number of resources. Kruncher is one of many such tools that enable VCs to find and support true gems among the noise.</p><p><strong>About Kruncher</strong></p><p>Founded in Singapore, Kruncher ( <a href="https://kruncher.ai/">https://kruncher.ai</a> ) is backed by 5I Ventures and raised $1M in pre-seed funding in late 2024 with the acquisition being supported by Aument Capital Partners. The company is led by CEO <strong>Francesco De Liva</strong>, who previously advised financial institutions on AI transformation at Microsoft and Accenture, <strong>Leonardo De Marchi</strong> (CAIO), <strong>Eugene Kim</strong> (CTO) and <strong>Laura Lugaresi</strong> (CDO). Kruncher now serves 20+ funds globally and operates from its U.S. headquarters in Redwood City, CA.</p><p><strong>About 5I Ventures</strong></p><p>5I Ventures is a Singapore based forward thinking investment firm focusing on empowering visionary tech start-ups across the globe to drive hyper-growth and fast-track their expansion.</p><p><strong>About Aument Capital Partners</strong></p><p>Aument Capital Partners is a Singapore based multi-family office that provides comprehensive investment services catered specifically to the needs of entrepreneurs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=210f7bd1c789" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Can cloud native go 20,000 transactions per second?]]></title>
            <link>https://francescodeliva.medium.com/can-cloud-native-go-20-000-transactions-per-second-42ce8022e4?source=rss-4c7826618a52------2</link>
            <guid isPermaLink="false">https://medium.com/p/42ce8022e4</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[performance-testing]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[problem-solving]]></category>
            <category><![CDATA[api-management]]></category>
            <dc:creator><![CDATA[Francesco De Liva]]></dc:creator>
            <pubDate>Fri, 08 Apr 2022 14:56:33 GMT</pubDate>
            <atom:updated>2022-04-08T14:56:33.153Z</atom:updated>
            <content:encoded><![CDATA[<p>The short answer is: Yes!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B4-nflJlYMOp4_921QMm8A.png" /><figcaption>Azure Load Testing stressing a cloud native architecture (API Managment, Function App and Cosmos DB)</figcaption></figure><p>This article provides several techniques and procedures for understanding bottlenecks and scaling your architecture to reach your wished application SLA, focusing on performance and latency optimization.</p><p>FYI: a Cloud-Native solution can easily process more than <a href="https://azure.microsoft.com/en-us/blog/processing-100-000-events-per-second-on-azure-functions/">100,000 events per second</a>, but every use case might bring scalability challenges or opportunities.</p><h3>Prerequisite</h3><p>This article is intended for an audience of cloud practitioners dealing with <a href="https://github.com/Azure/Mission-Critical-Online">mission-critical application</a>.</p><p>We assume you are proficient in the following concepts/technologies:</p><ul><li><a href="https://azure.microsoft.com/en-us/overview/cloudnative/">Build cloud native architecture in Azure</a></li><li><a href="https://azure.microsoft.com/en-us/services/api-management/">API Management</a></li><li><a href="https://docs.microsoft.com/en-us/azure/azure-functions/#:~:text=Azure%20Functions%20is%20a%20cloud,provides%20serverless%20compute%20for%20Azure.">Azure Functions</a></li><li><a href="https://docs.microsoft.com/en-us/azure/cosmos-db/introduction">Cosmos DB</a></li><li><a href="https://jmeter.apache.org/">JMeter</a></li><li>A <a href="https://www.mckinsey.com/business-functions/strategy-and-corporate-finance/our-insights/six-problem-solving-mindsets-for-very-uncertain-times">problem solving mindset</a> [recommended: <a href="https://en.wikipedia.org/wiki/Apollo_13_(film)">Apollo 13</a>]</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8JgZ8fF5M_u4LV6T6UcoUQ.jpeg" /><figcaption>Apollo 13: Problem solving workshop</figcaption></figure><h3>The problem</h3><p>It was a typical day at Azure Space Center [this place might not exist], when I received an email from a customer having trouble managing more than 4,000 transactions per second (TPS) in a solution that was supposed to work with 20,000 TPS in both sunny and rainy days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*iZok7pjZN3gWZxgqlnE9Xg.png" /><figcaption>Initial architecture</figcaption></figure><p>The most relevant observations on their architecture were:</p><ul><li>APIM and Function App using Premium SKU, but no Virtual Network integration or private endpoints</li><li>Customer scaled up manually APIM, Function App and Cosmos DB to support a high volume of request</li><li><a href="https://github.com/Azure-Samples/jmeter-aci-terraform">Load testing</a> Pipeline with JMeter, ACI and Terraform</li></ul><h3>Solution</h3><p>The reality is that there is no one-size-fits-all solution, and overtime when requirements change, your perfect solution becomes obsolete. Managing a mission-critical architecture requires constant monitoring, improvements, and architectural trade-offs.<br>We have been working for weeks on these issues, investigating, improving and monitoring the entire architecture, component by component.<br>The challenges and expertise required to work with an extended team of product experts, network experts, developers, performance engineers, principal architects and supports teams from Microsoft.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NmCz2ULS6ekgn8W9rrHsEg.jpeg" /><figcaption>A picture of our team at the <em>Azure Space Center</em></figcaption></figure><h3>First step: “I Was Blind But Now I See” <strong>John 9:25</strong></h3><p>The only information we were using to investigate our issue was the monitor feature of API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IHSIby2Z0xMl8sBs7fTaiw.png" /><figcaption>APIM built-in monitoring</figcaption></figure><p>It was helpful to understand that we had a problem, but not enough to understand the root cause. In this situation, you need full observability of your end-to-end architecture. <a href="https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview">Application Insights</a> helps you here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*Wwa1hTG1Gr4rEyl-jxy6hg.png" /><figcaption>Add Azure Monitor and Application Insights</figcaption></figure><p>In this case, it is essential to enable diagnostic logs and Application Insights in all the services and make sure they are pointing to the same workspace.</p><h3>Second step: Be precise and read logs</h3><p>Being precise is vital in this exercise. It would help if you annotated when a performance testing starts, finished, how many nodes you are using, etc. I recommend you to use a spreadsheet to annotate all this information and avoid leveraging on memory.</p><p>After a test is performed, you will need to investigate component by component your performance and failures:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LoQ7FwS8TK0WV7VB66h5oA.png" /><figcaption>1. App Insights Performance tab; 2. Select the exact time and date of your test</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*y6rtoxtzcUjV2kpscWto_A.png" /><figcaption>You can investigate specific instances. To enable it: 1. click on Roles; 2. Check/uncheck the instances that you would like to investigate</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9vmbv8JZrSSEGkKxWFKaIA.png" /><figcaption>1. App Insights Failure tab; 2. Summary of your endpoint/functions triggered; 3. Overview of the most common errors: recommended to explore each of those issues.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d_RIUUxI4EqAD3E_RtyCzA.png" /><figcaption>When you investigate a specific issue, you can explore your requests, the transactions (1), the details about a request (2) and the call stack (3)</figcaption></figure><p>We strongly recommend you open a bug or a task in your favourite project management tool for each of the issues you discover while investigating logs and exceptions. There might be different root causes for those issues: misconfiguration, development issues, networking, etc.<br>An additional source of information during the investigation is logs: Traces and Sessions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nRdrxd4YtgL9sjxcQrFmbQ.png" /><figcaption>Quering “traces” provides all the console logs of your application</figcaption></figure><h3>Third step: Performance testing tools</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/0*JqKSI1gDiekKi3eA.png" /><figcaption>Initial load testing architecture</figcaption></figure><p>While running tests using JMeter and the <a href="https://github.com/Azure-Samples/jmeter-aci-terraform">ACI architecture</a>, several issues were encountered:</p><ul><li>Understanding the correct number of virtual users for each node (it depends on the computational power of your node)</li><li>Understand the maximum number of nodes that your controller can support. The maximum was just ten nodes in the initial load testing architecture: insufficient to generate enough load.</li><li>Deploy the performance testing cluster as closely as possible to your application to minimize latency</li><li>After several tests and defining average latency, you should estimate the total number of virtual users needed:</li><li>(concurrent users) x (requests per user per seconds) = total requests per seconds</li><li><em>requests per user per second </em>depend by your overall processing time and latency</li></ul><p>After encountering several issues with the above architecture, we decide to leverage a new PaaS service to run performance testing: <a href="https://azure.microsoft.com/en-us/services/load-testing/">Azure Load Testing</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NCwMH76EWgAWLT8Yw7YIxg.png" /><figcaption>Screenshot from Azure Load Testing (dummy data)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U06YADCyeRllFH2dYPCXtw.png" /><figcaption>Screenshot from Azure Load Testing (dummy data): detail on monitored resources</figcaption></figure><p>The key advantages of using azure load testing are:</p><ul><li>PaaS solution: no need to provision or scale the load testing cluster</li><li>Supporting JMeter</li><li>Integrated monitoring features for real-time monitoring during a test</li><li>Low latency</li></ul><h3>Fourth step: Ask for help</h3><p>After days of running tests and checking logs, our crucial takeaway was that 40–50% of requests reaching APIM were not forwarded to Azure Function. At that point, I learned that not all the logs are available in application insights. Moreover, some internal logs (mainly networking related) of app service, APIM and other PaaS services are not shared with the customer to avoid data leakage and reverse engineering of IP. So, we triggered Microsoft Support.<br>We checked several diagnostic logs, and we learned that additional information on the platform can be gathered by the tab “Diagnose and solve problem” of each service:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z5k7avVwka5qkl9MC4Varg.png" /><figcaption>APIM, Diagnose and solve problmes</figcaption></figure><p>We didn’t see any problem with the CPU or memory consumption of APIM, but they found a networking issue. The support team helped us understand that we were experiencing a <a href="https://docs.microsoft.com/en-us/azure/load-balancer/troubleshoot-outbound-connection">SNAT Port exhaustion issue</a> in APIM. What is it?</p><blockquote><a href="https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-connections"><em>Ephemeral ports</em></a><em> used for </em><a href="https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-connections"><em>PAT</em></a><em> are an exhaustible resource, as described in </em><a href="https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-connections"><em>Standalone VM without a Public IP address</em></a><em> and </em><a href="https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-connections"><em>Load-balanced VM without a Public IP address</em></a><em>. You can monitor your usage of ephemeral ports and compare with your current allocation to determine the risk of or to confirm SNAT exhaustion using </em><a href="https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-standard-diagnostics#how-do-i-check-my-snat-port-usage-and-allocation"><em>this</em></a><em> guide.</em></blockquote><blockquote><em>If you know that you’re initiating many outbound TCP or UDP connections to the same destination IP address and port, and you observe failing outbound connections or are advised by support that you’re exhausting SNAT ports (preallocated </em><a href="https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-connections#preallocatedports"><em>ephemeral ports</em></a><em> used by </em><a href="https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-connections"><em>PAT</em></a><em>), you have several general mitigation options. Review these options and decide what is available and best for your scenario. It’s possible that one or more can help manage this scenario.<br>From </em><a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-to-resource-group?tabs=azure-cli#deploy-to-multiple-resource-groups"><em>Microsoft Documentation</em></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*1mHfisnnJGc8yaO6k18kgQ.png" /><figcaption>SNAT Port exhaustion in the internal LB of APIM</figcaption></figure><p><a href="https://www.linkedin.com/in/rezamahmood/">Reza</a> (our most senior architect in the team) recommended understanding how to solve the SNAT port exhaustion for each component. Unblocking APIM would have caused the Function App to experience the same issues after.</p><p>Two additional interesting reading were:</p><ul><li><a href="https://docs.microsoft.com/en-us/azure/api-management/troubleshoot-response-timeout-and-errors">Troubleshooting client response timeouts and errors with API Management</a></li><li><a href="https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-intermittent-outbound-connection-errors">Troubleshooting intermittent outbound connection errors in Azure App Service</a></li></ul><h3>Fifth step: A better networking architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*1uFIeQu2JJz_mTPemO2Wiw.jpeg" /><figcaption>SNAT exhaustion solution: private endpoint!</figcaption></figure><p>The SNAT port exhaustion issue could be resolved by introducing a private endpoint between the services. Private endpoints bypass the internal load balance and are not subject to SNAT port exhaustion, at least at this scale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*RD06QrW_zeE5Yzg9acXGew.png" /><figcaption>Networking architecture (Target)</figcaption></figure><p>The target architecture required us to re-deploy APIM and logic app inside Virtual Networks and expose Cosmos DB via private endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iigsumg1YHfV1asbXdLNLA.png" /><figcaption>Function App Networking configuration</figcaption></figure><p>In the diagram below you can find some implementation annotation that might be helpful if you are planning to do a similar change:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*5EhsVJ1QWLdMZpqP-4YWdg.png" /><figcaption>Networking architecture (Target): implementation details. Point 2: <a href="https://docs.microsoft.com/en-us/azure/api-management/api-management-using-with-vnet?tabs=stv2#configure-nsg-rules">Configure NSG</a></figcaption></figure><p>Implementing this change solved the SNAT port issues.</p><h3>Sixth step: CI/CD and private service</h3><p>After changing the Function App to private, the customer started to experience failure in their CI/CD pipeline. The troubleshoot was easy: Azure DevOps can’t deploy to a private network with no inbound connectivity. The customer needed to deploy a <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&amp;tabs=browser#install">self-hosted virtual machine</a> inside their VNet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*VJ6kkN2xJCGQwG8dwOuTvg.png" /><figcaption>1. <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&amp;tabs=browser">Install agent and configure ADO</a> 2. The communication between the self hosted agent and ADO requires outgoing traffic on port 443 (tcp) and 53 (udp). The best practice is to use a firewall to manage outgoing traffic.</figcaption></figure><p>After provisioning and configuring a new self-hosted agent, the last step required is to update the pipeline to leverage the self-hosted agent pool instead of the default one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*C50w6UI4B58W--wGwyxZzQ.png" /><figcaption>A quick reference on how to update the pipeline in Azure DevOps</figcaption></figure><h3>Seventh step: Look inside the code</h3><p>After implementing the VNet integration and private endpoint, we hoped to go back home and focus on a new customer issue, but it was not the case. We could see from the new logs that the new bottleneck became the function app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*TJYpPH-z7ueS__tly9TjDA.jpeg" /><figcaption>Like Gary in Apollo 13, we had to get our hands dirty with coding</figcaption></figure><p>We finally had to understand the whole picture and look at the code.</p><p>First of all, let’s describe better the use case. The endpoint that we were testing is a user-facing endpoint. It should perform reads and write in the database and then it should return a value to the user in less than 100 milliseconds.</p><p>A single execution of the endpoint, whit no stress test ongoing, took from 10 to 15 milliseconds. The problem, of course, changes when you start to have thousands of concurrent execution.</p><p>We can’t share the code at this point, but we would like to highlight the areas that you should consider when scanning your code for performance issues:</p><ol><li>Profile your code;</li><li>Introduce cache wherever it is possible (best scenario: cache at APIM level);</li><li>Utilize connection pooling, reuse client connections for external services as much as possible (typically static HttpClient in Functions and singleton CosmosClient);</li><li>Read carefully all the guidelines on any SDK you are using. In our case, using Cosmos DB, we found <a href="https://docs.microsoft.com/en-us/azure/cosmos-db/sql/performance-tips-dotnet-sdk-v3-sql?tabs=trace-net-core">this helpful resource</a>;</li><li>Investigate every integration point with other services and their SLAs; if possible, remove outside dependency;</li><li>Consider splitting a read and write endpoint in two different endpoints and introducing an asynchronous mechanism. Please consider the following patterns: <a href="https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs">CQRS pattern</a> and <a href="https://docs.microsoft.com/en-us/azure/architecture/patterns/async-request-reply">Asynchronous Request-Reply Pattern</a></li><li>Try to reduce as much as possible the processing time;</li><li>If there is any retry mechanism, implement it less aggressively;</li><li>Ensure that Cosmos DB has enough RUs;</li><li>Implement error handling and logging for any exception: it will help you understand corner cases;</li><li>Avoid any blocking call.</li></ol><p>Writing the atomic function is a best practice that can help you avoid this long troubleshooting.</p><p>Improving the customer code is still ongoing as of today. Every week we improve something, and step by step, we reach our target. You might think: why are they so slow? Some customers might have other 1,000 endpoints with similar issues and limited time to optimize them.</p><h3>Conclusion</h3><p>Optimization of architecture is a never-ending process. This article covers some of the problem solving and methodology required to improve performance in a cloud-native architecture.</p><p>The most important lesson learnt that we would like to share are:</p><ol><li>Make sure your architecture is fully observable (Application insight is a must-have tool, always enable it in every service you deploy);</li><li>Performance testing is a matter of process and precision;</li><li>Troubleshooting an issue is not a job for a lonely wolf: when needed, ask for help!</li><li>Your source code quality will always be the most tedious bottleneck to achieving your performance target, and increasing resources is not the answer…</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*0J4KCm2T3XdnjkyV3b4VPw.jpeg" /><figcaption>Be successful is a metter of team working, proper processes, problem solving and a bit of creativity ❤</figcaption></figure><h3>About the author</h3><p>Since 2012, <a href="https://www.linkedin.com/in/francescodeliva/">Francesco</a> managed seven mobile projects as a Mobile Lead or CTO. He covered several industries, from banking to lifestyle. Francesco led teams from one to seventy developers on four continents. He used technologies such as JavaScript, PhoneGap, Objective-C, Java, Kotlin, Swift, ReactNative and Flutter in his project. His most successful project has almost 8 million active users a month.</p><p>Today, Francesco is working as Cloud Solution Architect for one of the major cloud providers, providing advice and supporting the customer journeys on application innovation and developer velocity.</p><p><em>Disclaimer</em></p><p>This article reflects my personal opinions, and it should not be attributed to the view of any of my past or present employers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42ce8022e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevSecOps with GitHub]]></title>
            <link>https://francescodeliva.medium.com/devsecops-with-github-f8b9d07702c3?source=rss-4c7826618a52------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8b9d07702c3</guid>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[codeql]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[shiftleft]]></category>
            <dc:creator><![CDATA[Francesco De Liva]]></dc:creator>
            <pubDate>Wed, 24 Nov 2021 09:08:38 GMT</pubDate>
            <atom:updated>2021-11-24T09:20:50.429Z</atom:updated>
            <content:encoded><![CDATA[<p>A DevSecOps architecture built on top of GitHub Actions and Advanced Security. The key objectives of this software development solution are to improve <a href="https://www.mckinsey.com/industries/technology-media-and-telecommunications/our-insights/developer-velocity-how-software-excellence-fuels-business-performance">developer velocity</a>, “<a href="https://whatis.techtarget.com/definition/fail-fast">fail-fast</a>”, and “<a href="https://devops.com/devops-shift-left-avoid-failure/">shift-left</a>”. Project/product managers, delivery leads, and tech leads are the perfect audience for this article. It is not a “One size fits all” solution, but it could give you some relevant inspiration on land DevSecOps in your organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CAA1C4FfhHhdhXFHGseQbQ.png" /><figcaption>DevSecOps with GitHub ❤</figcaption></figure><p>We strongly recommend you to read and use the official DevSecOps architectures from <a href="https://docs.microsoft.com/en-us/azure/architecture/solution-ideas/articles/devsecops-in-github">Microsoft</a> and <a href="https://docs.github.com/en/code-security/getting-started/securing-your-organization">GitHub</a> as reference. This article will focus more on the developer point of view and how DevSecOps should integrate with your branching strategy.</p><h3>Prerequisite</h3><p>This article is intended for an audience of business and technical people who are already clear on why they need DevSecOps and are looking for a possible architecture to implement it. We assume there is no need to explain why security is essential in today’s landscape (“Global cyber attacks increased by 29%, as hackers continue to exploit the COVID-19 pandemic and shift to remote work”, <a href="https://pages.checkpoint.com/cyber-attack-2021-trends.html">Check Point</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_zcfYoKXRzq5S4BzKXV_fQ.jpeg" /><figcaption>For somebody, the <a href="https://en.wikipedia.org/wiki/Hacker_culture">hacker culture</a> is a subculture of individuals who enjoy the intellectual challenge of creatively overcoming the limitations of software systems to achieve novel and clever outcomes.</figcaption></figure><p>We assume you are proficient in the following concepts/technologies:</p><ul><li><a href="https://en.wikipedia.org/wiki/DevOps">DevOps</a> and <a href="https://www.redhat.com/en/topics/devops/what-is-devsecops">DevSecOps</a></li><li><a href="https://git-scm.com/">git</a>, <a href="https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell#:~:text=A%20branch%20in%20Git%20is,to%20one%20of%20these%20commits.&amp;text=As%20you%20start%20making%20commits,is%20not%20a%20special%20branch.">branch</a>, <a href="https://docs.github.com/en/get-started/quickstart/hello-world">GitHub</a></li><li><a href="https://www.docker.com/resources/what-container">Container</a>, <a href="https://en.wikipedia.org/wiki/Docker_(software)">docker</a> and <a href="https://docs.microsoft.com/en-us/azure/container-registry/">Azure Container Registry</a></li><li><a href="https://en.wikipedia.org/wiki/Project_management_software">Project management tools for software development</a> and <a href="https://azure.microsoft.com/en-us/services/devops/boards/">Azure Boards</a></li><li><a href="https://azure.microsoft.com/en-us/overview/what-is-paas/">PaaS</a>, <a href="https://docs.microsoft.com/en-us/azure/architecture/guide/technology-choices/compute-decision-tree">compute service in Azure</a> and <a href="https://azure.microsoft.com/en-us/services/app-service/">App Service</a></li><li><a href="https://owasp.org/">OWASP</a></li><li><em>[</em>Recommended<em>]</em> <a href="https://en.wikipedia.org/wiki/V_for_Vendetta_(film)">V for Vendetta</a></li></ul><h3>Objective</h3><p>In late 2021 majority of companies developing software have implemented some DevOps. The most common challenge in becoming a mature DevOps organization is improving developers productivity by working on developer velocity and including security as part of the CI/CD.</p><blockquote>One of my key takeaways from my Accenture days is to do your best to discover a bug, a vulnerability or a design gap as soon as possible during the development lifecycle. And the best moment is, of course, during the design phase.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*MoDsviXWFKY9rDHzPLtrYQ.jpeg" /><figcaption>V spent 10 years for his project design phase</figcaption></figure><p>Our objective translates into three significant challenges: improve developer velocity, “fail-fast”, and “shift-left”.</p><p>Improve <a href="https://azure.microsoft.com/en-us/overview/developer-velocity/">developer velocity</a> by automating everything (code build, scan and deployment) provides excellent benefit to your organization like up to 200 times more frequent code deployment, up to 100 times faster to set up a dev environment, up to 7 times less few failures on deployments, and so on.</p><p>The point of <a href="https://techgenix.com/fail-fast-devops/#:~:text=The%20point%20of%20fail%2Dfast,improve%20upon%20systems%20and%20products.">fail-fast</a> in DevOps is not to maximize failure but rather to encourage development teams to experiment in a structured environment. Thus, the quicker they fail, the faster they can discover ways to improve systems and products.</p><p>By using a <a href="https://devops.com/devops-shift-left-avoid-failure/">shift-left</a> strategy, DevSecOps redirects the security focus. Instead of pointing toward auditing at the end, it shifts to development in the beginning. Besides producing robust code, this fails fast approach helps resolve problems early on when they’re easy to fix. Try to imagine the difference in cost between fixing a vulnerability discovered in development vs during a breach?</p><h4>Bonus 1: Open-source security</h4><p>As measured by <a href="https://www.mckinsey.com/industries/technology-media-and-telecommunications/our-insights/developer-velocity-how-software-excellence-fuels-business-performance">McKinsey</a>, the top-performing organizations showed that open-source adoption is the biggest differentiator. These organizations are seeing three times more impact from adopting open source than the rest of the industry.</p><p>When decomposing most organization software, up to 95% of the code comes from the open-source community. Most of the time, the security scanning focuses on the code that your company is writing and not on the millions of lines that you might include with a third-party library. An additional objective of this architecture is to secure and scan all your software and not only the code that you write.</p><h4>Bonus 2: Hacker don’t sleep</h4><p>In several companies, the security scan is performed between UAT and production; then, vulnerabilities are fixed and (maybe) the product is secure today. What about tomorrow or in 3 months? What if nobody is performing any scan periodically?</p><p>Our architecture should periodically scan the code, find vulnerabilities and alert the development team.</p><h3>Components</h3><p>The architecture that we will introduce uses several components that you can discover by checking below definition and material:</p><ul><li><a href="https://github.com/features/packages">GitHub package / release</a><br>It is the GitHub public (or private) repository for package, libraries and applications, similar to other products like Jfrog, npm or Maven; key tool to improve reusability and modularity in your software.</li><li><a href="https://github.com/features/actions">GitHub Action</a><br>The engine that is enables your CI/CD to work, similar to Jenkins or Azure DevOps</li><li><a href="https://docs.github.com/en/get-started/learning-about-github/about-github-advanced-security">GitHub Advanced Security</a><br>It requires an additional license. Advance Security provide features to improve and maintain the quality of your code in three major areas:<br><a href="https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning"><strong>Code scanning</strong></a> — Search for potential security vulnerabilities and coding errors in your code. <br><a href="https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning"><strong>Secret scanning</strong> </a>— Detect secrets, for example keys and tokens, that have been checked into the repository. <br><a href="https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review"><strong>Dependency review</strong></a> — Show the full impact of changes to dependencies and see details of any vulnerable versions before you merge a pull request.</li><li><a href="https://docs.microsoft.com/en-us/azure/devops/boards/github/?view=azure-devops">GitHub — Azure Boards integration</a><br>By connecting Azure Boards with GitHub repositories, you enable linking between GitHub commits, pull requests, and issues to work items. You can use GitHub for software development while using Azure Boards to plan and track your work. Azure Boards provides the scalability to grow as your organization and business needs grow.</li><li><a href="https://sonarcloud.io/code-quality">SonarCloud</a><br>SonarCloud’s static analysis detects Bugs and Code Smells in your repositories and provides the feedback you need to write better code.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w8A1VJ0c3BTJQ3OiqzvsqA.jpeg" /><figcaption>V’s domino bricks</figcaption></figure><p>Each component plays a critical role in our architecture; We recommend reading more about those components you are not familiar with.</p><blockquote>Everything should be made as simple as possible, but not simpler.<br>- Albert Einstein</blockquote><h3>A DevSecOps Architecture</h3><p>After talking with several customers, we saw the need to envision and present a DevSecOps Architecture that could leverage several Microsoft products and bring the best from each.<br>At the heart of this architecture, GitHub (the Enterprise Cloud license or the Enterprise Server license are prerequisites to leverage on GitHub Advanced Security) is where your code lives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*L2bwJZscFhvqC2x5KchLAA.png" /><figcaption>Figure 1: A possible DevSecOps Architecture with GitHub</figcaption></figure><p>The GitHub repositories are integrated with Azure Boards to facilitate project management by linking commits and PR with tasks or bugs and your favourite IDEs to simplify the developer experience while committing his code. In addition, GitHub Package allows a developer to write reusable modules that can be referenced within their organization. <br>When GitHub Advanced Security (GHAS) is enabled, it automatically scans your repository over time. In addition, GHAS created a dependency graph of your code and checked that all your dependencies were not exposing vulnerabilities. If this is the case, GHAS dependabot will make a PR to upgrade your libraries.<br>The architecture shows an example of CI/CD for containers enabled by the GitHub Actions to configure workflows to build, test, scan and deploy your code. That activity can run in parallel or sequence, and it can be configured in multiple ways based on your organization needs. In the following section, “DevSecOps in action”, we will deep dive into our recommendations to implement an efficient branch strategy &amp; CI/CD.<br>GitHub Action offers a marketplace with more than 10,000 available tasks for your code, but don’t worry if you need any specific command. You can always leverage on the Linux bash or Windows PowerShell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B7DKyGzxty73cbskBgGCqQ.png" /><figcaption>Figure 2: Security overview generated by several GitHub Advanced Security features</figcaption></figure><p>The GitHub Advanced Security Code Scanning is triggered during the CI, and it runs on top of GitHub Actions. Code scanning is a feature you use to analyze the code in a GitHub repository to find security vulnerabilities and coding errors. Any problems identified by the analysis are shown in GitHub Security tab. You can use code scanning to find, triage, and prioritize fixes for existing or new issues in your code. If code scanning finds a potential vulnerability or error in your code, GitHub displays an alert in the repository. After fixing the code that triggered the alert, GitHub closes the alert.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bl6qhO6DwjvnG22XAaVZ_w.png" /><figcaption>Figure 3: Example of a security finding from Code Scanning</figcaption></figure><p>When a vulnerability is found, GitHub will help you understand it (figure 3) and also recommend how to fix it with coding examples (figure 4).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*0TBkA0gosLg5gfxch_JNHw.png" /><figcaption>Figure 4: Example of reccomendations on how to fix a vulnerability</figcaption></figure><h3>DevSecOps in action</h3><p>Every organization might have different processes or needs when talking about DevSecOps based on your building, testing and deploying strategies.</p><p>In figure 5, we are illustrating how a branching strategy based on a rolling master branch can help your project/product to:</p><ol><li>Build a container image only once and then promote it across environments</li><li>Map your live production environment with a specific branch (release)</li><li>Avoid that fix are overwritten by a new feature merged in the master branch</li><li>Avoid that new features are deployed with the last-minute production bug fix</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H7Fv1NlqUI8IL79BNwi_Zg.png" /><figcaption>Figure 5: Branch Strategy, Rolling Master Branch</figcaption></figure><p>The rolling master branch requires a branch manager who will create new release branches, protect them and ensure that the branches are periodically merged from an older release to more recent and never in the opposite direction.</p><p>The branch strategy should be based on a strict naming convention that the workflows will map to trigger CI, CD or security scan:</p><ul><li>Release/R* :<br>the release branch where all the features are merged and designed to become the main branch when his code is deployed in production</li><li>Features/F[0–9]+ (exclude Features/F*/*):<br>The feature branch of a feature. It is used as a collaboration branch between developers</li><li>Features/F[0–9]/Item[0–9]+:<br>Branch created by a developer to implement a task related to a feature</li><li>Hotfix/*:<br>Branch created for production hotfix.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tkBVs1WNpd1tUTCV9-s0Ag.png" /><figcaption>Figure 6: DevSecOps using Rolling Master Branch</figcaption></figure><p>In figure 6, we illustrate a possible way of how the DevSecOps workflows should be configured for the different branches. We will explore two scenarios:</p><p><strong>1) Release/R* :</strong></p><p>When a PR is created targeting this branch, several workloads are triggered to build the code and run tests, analyze the code quality, validate that the overall quality didn’t drop, and finally run the code scanning for static analysis of the vulnerability. You should configure to prevent merging the branch if any check fails (figure 7). The PR will require two reviewers to be merged.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*Z0HQnfb8TFzvcMceio1Low.png" /><figcaption>Figure 7: Example of several pipelines running in parallel</figcaption></figure><p>As soon as the code is merged in this branch, automatically (CI), it should build the image and upload it to container registry. When a new container is available, it will scan it and deploy it (CD) to the development environment. After the deployment an automated pentest validation is recommended. The promotion of the container to any other environment can be manual or automatic (after passing a UI or API testing).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xz_yoBE61C0_QXxJzgLs4w.png" /><figcaption>Figure 8: Approval is required to deploy to production</figcaption></figure><p>GitHub allows created environments owners (i.e. testing lead) who can approve or deny deployments to their environments, as shown in figure 8.</p><p><strong>2) Features/F[0–9]+:</strong></p><p>When a PR is created targeting this branch, there are several workloads that you can trigger to build the code and run tests, analyze the code quality and run the security scan. Some might fail since you are still in development. The PR can require just a reviewer to be merged.</p><p>As soon as the code is merged in this branch, automatically (CI), it should build the image and upload it to the container registry. When a new container is available, it will scan it and deploy it (CD) to a dedicated development environment for this feature.</p><p><strong>How does it work in practice</strong>?</p><p>Several different types of events can trigger GitHub Actions workflows. In the above branching example, we used only two events: A and B from figure 9.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*htKkHAwmk9cGJhLISpzWbQ.png" /><figcaption>Figure 9: How to configure it in a workflow</figcaption></figure><p>The branch manager will need to configure those pipeline files properly for each pipeline.</p><p>In figure 9, you can also see case C that will help you to trigger a security scan every X days or Y weeks based on your configuration. In this case, we start a security scan every Wednesday at 11:42 AM.</p><h3>A developer day</h3><p>Let’s do a bit of role-play here. Let’s assume Evey Hammond is one of your junior javascript developers. Evey’s day is illustrated in Figure 10.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*mIMQaus9VWlKtl7gwiENcg.jpeg" /><figcaption>Figure 10: Evey Hammond development day</figcaption></figure><p>Evey starts her day with Azure Boards. Her manager assigned her to fix a vulnerability discovered in her code by CodeQL (the GitHub Advanced Security AI for code scanning).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4CuBcl1zKJYfEWjHMrhWGQ.png" /><figcaption>Figure 11: Technical Debts and Security Vulnerabilities tracked in Azure Boards</figcaption></figure><p>She opens the link inside the Azure Board Task, and she jumps to GitHub Security, where she learns how to fix the vulnerability (Figure 3 and 4).</p><p>She created a new branch called Features/F653/Item778, and she developed her task in Visual Studio Code. Every time she commits her code, she adds a reference to the item in the commit message AB#778, and the commit appears in the item history inside Azure Board (figure 12).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1yjqd6ctwWaUMSmSq884uQ.png" /><figcaption>Figure 12: GitHub and Azure Boards integration</figcaption></figure><p>When she creates the PR and share the link with her manager for approval, her job is over. The PR will trigger all the validations (please check <em>DevSecOps in the action</em> section). And when the PR is approved, the task will be automatically marked as completed.</p><h3>Conclusion</h3><p>We have seen as this GitHub DevSecOps architecture (Figure 1) helps automate your software development lifecycle by providing a great engine to build, scan, test, deploy and secure your code from day 1 of your development journey. A similar architecture implemented in your organization will enable your team to experiment more and rely less on people for Ops. The effort required to implement CI/CD pipeline quickly pays back in terms of productivity, time to market, and cost savings for system administrators.</p><p>The great deal about this architecture is consolidating everything under one single service (GitHub) that acts as a dashboard and orchestrator for several different services that usually require context switch and complex integrations.</p><blockquote>DevOps is not a Goal, But a never-ending process of continual improvement<br><em>Jez Humble <br>(Author “The DevOps Handbook, Lean Enterprise”)</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6QO7vrdPs_CKRyMZ1rWW9Q.jpeg" /><figcaption>A small change in state can result in a large difference in a later state (Edward Lorenz)</figcaption></figure><p>Special thanks to <a href="https://www.linkedin.com/in/adrian-lee/?originalSubdomain=au">Adrian Lee</a> and <a href="https://www.youtube.com/coderdave">CoderDave</a> for answering all my questions on GitHub.</p><h3>About the author</h3><p>Since 2012, <a href="https://www.linkedin.com/in/francescodeliva/">Francesco</a> managed seven mobile projects as a Mobile Lead or CTO. He covered several industries, from banking to lifestyle. Francesco led teams from one to seventy developers on four continents. He used technologies such as JavaScript, PhoneGap, Objective-C, Java, Kotlin, Swift, ReactNative and Flutter in his project. His most successful project has almost 8 million active users a month.</p><p>Today, Francesco is working as Cloud Solution Architect for one of the major cloud providers, providing advice and supporting the customer journeys on application innovation and developer velocity.</p><p><em>Disclaimer</em></p><p>This article reflects my personal opinions, and it should not be attributed to the view of any of my past or present employers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8b9d07702c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrate GitLab with Azure Boards]]></title>
            <link>https://francescodeliva.medium.com/integrate-gitlab-with-azure-boards-40804e15b77?source=rss-4c7826618a52------2</link>
            <guid isPermaLink="false">https://medium.com/p/40804e15b77</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[azure-logic-apps]]></category>
            <category><![CDATA[azure-boards]]></category>
            <dc:creator><![CDATA[Francesco De Liva]]></dc:creator>
            <pubDate>Tue, 05 Oct 2021 13:58:39 GMT</pubDate>
            <atom:updated>2021-10-05T13:58:39.779Z</atom:updated>
            <content:encoded><![CDATA[<p>A do it yourself guide on how to integrate <a href="https://gitlab.com/">GitLab Repository</a> with Azure Boards (part of Azure DevOps) using Logic Apps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LXZqyHYcZxZn9FAcvHMmwQ.jpeg" /></figure><h3>Problem statement</h3><p>Working on a customer presentation, I prepared a demo to showcase how Azure Boards can improve customer’s <a href="https://azure.microsoft.com/en-us/overview/developer-velocity/">developer velocity</a>. The customer uses GitLab to host their repositories and I didn’t want to force them to migrate all their code from day one. So I explored how to integrate <a href="https://azure.microsoft.com/en-us/services/devops/boards/">Azure Boards</a> and <a href="https://gitlab.com/">GitLab Repository</a> to update the status of tasks or bugs when a <em>commit </em>or a <em>pull request</em> is added to a repo.</p><p>Guess what: there is no plugin to integrate GitLab and Azure Boards, so I had to integrate the two products by myself using <a href="https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-overview">Azure Logic Apps</a>. Maybe I am the only person having this problem :)</p><h3>The solution</h3><p>My objective was to demonstrate that integration is possible. I focused on the scenario of updating a work item with the code change info every time a new commit is created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZ-53CM9krTFitWf7jkr1A.png" /><figcaption>The integration between GitLab repository to Azure Boards is performed thanks to Logic Apps</figcaption></figure><p>In the above diagram, I summarized the following steps:</p><ol><li>A commit is added to a GitLab repository. The commit contains the Azure Boards <em>work item </em>written between two numeric symbols (FYI ‘#’). In this example, it is work item 250.</li><li>A GitLab webhook triggers the logic app with all the commit data.</li><li>The logic app parse those data and add the commit URL as a comment in the work item specified in the commit title.</li></ol><p>The proposed solution is one of the several integrations available, and I hope this small guide will help you implement it and then adapt it for your specific problem.</p><p>The Logic App is playing the key role of the middle layer by receiving the events from GitLab, processing them (parsing and extracting data) and calling <a href="https://docs.microsoft.com/en-us/connectors/visualstudioteamservices/">Azure DevOps via a connector</a>. A middle layer was mandatory here since there is no direct integration between the two products.</p><h3>Let’s implement it!</h3><h4>Prerequisite</h4><ul><li>A GitLab repository</li><li>An Azure DevOps account, a project and a work item</li><li>An Azure subscription</li></ul><h4>Step 1: create a HTTP triggered Logic App</h4><p>If it is the first time creating a Logic App, you can find an introduction to Logic Apps <a href="https://docs.microsoft.com/en-us/azure/logic-apps/">here</a>. Azure Logic App is a great tool to integrate applications using a low-code/no-code platform.</p><p>You pay logic apps only for their <a href="https://azure.microsoft.com/en-us/pricing/details/logic-apps/">usage</a> and the initial 4000 invocations are free, so don’t worry about any cost for running this proof of concept.</p><p>After login in Azure, please select “Logic Apps” from the search and create a new Logic App.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*V-2IxLPv7AANbtzsccxUkw.png" /></figure><p>Create the logic app and start with a common trigger <em>When a HTTP request is received</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ko7VOCLxsb4OH3vAT4PWjQ.png" /></figure><p>You will land on the Logic Apps Designer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*aZIr0rxbvh1L7k5F0C64Sw.png" /></figure><p>We need the Logic App URL and it will be available only after saving. Click on the <em>save </em>button in the top left corner and copy the generated URL:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*-REWVzOZrFo6jtWT_VEeNA.png" /></figure><h4>Step 2: create a web hook in GitLab</h4><p>From your GitLab repository, please click on Settings and select webhook:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*69IVy2Ng7QzIF6VVNxZeig.jpeg" /></figure><p>You can paste the URL in the corresponding field. In this example, I want to trigger the Logic App every time a new push is performed in the repository, but there are many options available as you can see from the above screenshot.</p><p>Now I would like to understand the payload of a webhook request and the best way is to <strong>commit some new code</strong> in the repository and come back to the <em>Logic App History</em> to visualize it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wkzKGzdfXAovY0DLuzA8kA.jpeg" /></figure><p>When you click on Show raw outputs of the “When a HTTP request is received” trigger, you will see the full input:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*eM5Vn7uWqH4ZSF-o3cPE8w.jpeg" /></figure><p>Please copy paste the request body in a file (<em>request.json</em>). Open the file with a JSON parser and explore it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q7QnTxCXytUktMalWeJ33w.png" /></figure><p>Exploring the JSON, I found the information that I need:</p><ol><li>The url of the commit is available in the JSON element <em>$.body.commits[0].url</em></li><li>The title of the commit is available in the JSON element <em>$.body.commits[0].message</em></li></ol><h4>Step 3: How to parse a POST request in Logic Apps</h4><p>You can resume the logic app designer session and select the <em>When a HTTP request is received</em> box. Click on <em>Use sample payload to generate schema</em> and paste there the content of request.json (created in the previous step). In this way the Logic App will be able to parse the request content and place it inside paramters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XpftVbzR7SURPZsj2d4dMA.png" /></figure><p>Add a new step and search for “Variables” and select “Initialize variable” from the list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ojd0e63Wfx4Toa5saiCMeQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5JNE1BLYkv5nnfpK7lxSDw.png" /></figure><p>You should proceed with naming the varibale with the following values:</p><ul><li>Name: commitUrl</li><li>Type: String</li><li>Value: triggerBody()?[‘commits’][0][‘url’]<br><em>(click on add dynamic content and select expression)</em></li></ul><p>As you can notice the expression is the Logic Apps translation of the element path founded in the previous step.</p><p>Please rename this step to <em>commitUrl</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oj_-_Llak-bfg_6u6SC2Ng.png" /></figure><p>Please repeat this step of adding a Initiate variable two times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*BYTmPG1gVjVT7s79UMWvWw.png" /></figure><p>Please write the following parameters, for <strong>commitMessage</strong>:</p><ul><li>Name: commitMessage</li><li>Type: String</li><li>Value: triggerBody()?[‘commits’][0][‘message’]<br><em>(click on add dynamic content and select expression)</em></li></ul><p>And for <strong>commitItem</strong>:</p><ul><li>Name: commitItem</li><li>Type: String</li><li>Value: <em>(click on add dynamic content and select expression)</em> split(variables(‘commitMessage’),’#’)[1]</li></ul><p>The commitItem variable is useful to extract the working item number from the commit message.</p><h4>Step 4: Azure DevOps Connector in Logic Apps</h4><p>In the last step of the logic app we should connect to Azure DevOps and update the relevant working item.</p><p>Please click on add next step and select “Azure DevOps”, you will see that there are several actions available:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*6V0B8QxQJ3Y04CXG52V5kQ.png" /></figure><p>Scroll down and select “Update a work item”. Logic apps requires to access to your Azure DevOps organization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*O6zuWRUEm8ZutC_lobktYw.png" /></figure><p>After granting access, you will be asked to provide the following information:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*Xhxl6PjNHS51P7dCYATtXQ.png" /></figure><p>Please select your organization and project and then add the commitItem and commitUrl variables as show below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*wXgtyE7V-PQePYzeci7gzQ.png" /></figure><p>Then save your logic app.</p><h4>Step 5: Test it!</h4><p>You can now change a file in your repository and a commit message that match a work item id. You will see that a new comment is added in your work item.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*49S-RSr3DBIFYS3Ae_AlsQ.png" /><figcaption>Change a file and remember to add the work item id in the commit message</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cqQWIW1ip-xOyoBWsQO4-Q.png" /><figcaption>Check the Logic Apps logs to validate that everything is working properly</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8YqO9xBIXbTl-WGu-bFJGA.png" /><figcaption>Check for the latest comment in the specific work item</figcaption></figure><h3>Future improvements</h3><p>In this solution, I illustrated a simple use case. Both GitLab and Azure Boards offers a lot of flexibility in their integrations:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*T0C4vb3_h0PMUza8Lc7TCg.jpeg" /><figcaption>Gitlab webhooks triggers</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*-ssF3ZoZVp_owz4Y6T8NvQ.png" /><figcaption>Azure DevOps Connector: available actions</figcaption></figure><p>By combining the triggers and actions available in GitLab and Azure DevOps, several use cases can be enabled, including:</p><ul><li>Visualize real-time development status leveraging on Azure Boards <a href="https://docs.microsoft.com/en-us/azure/devops/report/dashboards/overview?view=azure-devops"><em>Dashboards</em></a></li><li>Assign a task/issue to a developer to review a PR</li><li>Update a <em>working item</em> when a PR is merged with additional information on the reviewer and the target branch</li><li>And much more :)</li></ul><h3>About the author</h3><p>Since 2012, <a href="https://www.linkedin.com/in/francescodeliva/">Francesco</a> managed seven mobile projects as a Mobile Lead or CTO. He covered several industries, from banking to lifestyle. Francesco led teams from one to seventy developers on four continents. He used technologies such as JavaScript, PhoneGap, Objective-C, Java, Kotlin, Swift, ReactNative and Flutter in his project. His most successful project has almost 8 million active users a month.</p><p>Today, Francesco is working as Cloud Solution Architect for one of the primary cloud providers in the world, providing advice and supporting the customer journeys on application innovation.</p><p><em>Disclaimer</em></p><p>This article reflects my personal opinions, and it should not be attributed to the view of any of my past or present employers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40804e15b77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrate Bitbucket with Azure Boards]]></title>
            <link>https://francescodeliva.medium.com/integrate-bitbucket-with-azure-board-42c08033f958?source=rss-4c7826618a52------2</link>
            <guid isPermaLink="false">https://medium.com/p/42c08033f958</guid>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[azure-boards]]></category>
            <category><![CDATA[bitbucket]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[logic-apps]]></category>
            <dc:creator><![CDATA[Francesco De Liva]]></dc:creator>
            <pubDate>Sun, 03 Oct 2021 16:19:52 GMT</pubDate>
            <atom:updated>2021-10-04T06:31:35.576Z</atom:updated>
            <content:encoded><![CDATA[<p>A do it yourself guide on how to integrate Atlassian Bitbucket with Azure Boards (part of Azure DevOps) using Logic Apps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XvBN7rAP5tKvA1ihO_ASdw.jpeg" /></figure><h3>Problem statement</h3><p>Working on a customer presentation, I prepared a demo to showcase how Azure Boards can improve customer’s <a href="https://azure.microsoft.com/en-us/overview/developer-velocity/">developer velocity</a>. The customer uses bitbucket to host their repositories and I didn’t want to push them to migrate all their code from day one. So I explored how to integrate <a href="https://azure.microsoft.com/en-us/services/devops/boards/">Azure Boards</a> and <a href="https://www.atlassian.com/">Atlassian Bitbuket</a> to update the status of tasks or bugs when a <em>commit </em>or a <em>pull request</em> is added to a repo.</p><p>Guess what: there is no plugin to integrate BitBucket and Azure Boards, so I had to integrate the two products by myself using <a href="https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-overview">Azure Logic Apps</a>. Maybe I am the only person having this problem :)</p><h3>The solution</h3><p>My objective was to demonstrate that integration is possible. I focused on the scenario of updating a work item with the code change info every time a new commit is created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7mq2MtknMz5fUnn-Vb_5ng.png" /><figcaption>High level solution on how to integrate Bitbucket and Azure Boards using a Logic App</figcaption></figure><p>In the above diagram, I summarized the following steps:</p><ol><li>A commit is added to a bitbucket repository. The commit contains the Azure Boards <em>work item </em>written between two numeric symbols (FYI ‘#’). In this example, it is work item 250.</li><li>A Bitbucket webhook triggers the logic app with all the commit data.</li><li>The logic app parse those data and add the commit URL as a comment in the work item specified in the commit title.</li></ol><p>The proposed solution is one of the several integrations available, and I hope this small guide will help you implement it and then adapt it for your specific problem.</p><p>The Logic App is playing the key role of the middle layer by receiving the events from Bitbucket, processing them (parsing and extracting data) and calling <a href="https://docs.microsoft.com/en-us/connectors/visualstudioteamservices/">Azure DevOps via a connector</a>. A middle layer was mandatory here since there is no direct integration between the two products.</p><h3>Let’s implement it!</h3><h4>Prerequisite</h4><ul><li>A Bitbucket repository</li><li>An Azure DevOps account, a project and a work item</li><li>An Azure subscription</li></ul><h4>Step 1: create a web hook in Bitbucket</h4><p>From your bitbucket repository, please click on Repository Settings</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/324/1*n6bmOBH9_oVfDHA4qABHdQ.png" /></figure><p>Inside the repository settings, please select webhooks and add a new one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YdBwNuDFXPjrE4c22RK1yA.png" /></figure><p>At this moment, we still don’t have the URL of the Logic App, so you can write a dummy URL. In this example, I want to trigger the Logic App every time a new push is performed in the repository, but there are many options available as you can see from the above screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5MGP_6fEMxxOGKcphxCWcw.png" /></figure><p>Select View Request and enable the <em>history </em>inside.</p><p>Now I would like to understand the payload of a webhook request and the best way is to <strong>commit some new code</strong> in the repository and come back to the <em>View requests logs</em> section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*BIdqwJgg6j5jmYRXhTZsDQ.png" /></figure><p>Since the URL entered was dummy, we have an error, but it is not a problem, and we should explore the payload details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*IbzJPF_-E_u0K3i_elxkJw.png" /></figure><p>Scroll down until the <em>request </em>section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*lYKSUBJuTMwDfvOItnZYiA.png" /></figure><p>Please copy paste the request body in a file (<em>request.json</em>). Open the file with a JSON parser and explore it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NvtD6nDt9yhzl3jxkdKYWA.png" /></figure><p>Exploring the JSON, I found the information that I need:</p><ol><li>The url of the commit is available in the JSON element <em>$.push.changes[0].old.target.links.html.href</em></li><li>The title of the commit is available in the JSON element <em>$.push.changes[0].old.target.summary.raw</em></li></ol><h4>Step 2: create the Logic App</h4><p>If it is the first time creating a Logic App, you can find an introduction to Logic Apps <a href="https://docs.microsoft.com/en-us/azure/logic-apps/">here</a>. Azure Logic App is a great tool to integrate applications using a low-code/no-code platform.</p><p>You pay logic apps only for their <a href="https://azure.microsoft.com/en-us/pricing/details/logic-apps/">usage</a> and the initial 4000 invocations are free, so don’t worry about any cost for running this proof of concept.</p><p>After login in Azure, please select “Logic Apps” from the search and create a new Logic App.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*V-2IxLPv7AANbtzsccxUkw.png" /></figure><p>Create the logic app and start with a common trigger <em>When a HTTP request is received</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ko7VOCLxsb4OH3vAT4PWjQ.png" /></figure><p>You will land on the Logic Apps Designer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*aZIr0rxbvh1L7k5F0C64Sw.png" /></figure><p>Click on <em>Use sample payload to generate schema</em> and paste there the content of request.json (created in the previous step). In this way the Logic App will be able to parse the request content and place it inside paramters.</p><p>Add a new step and search for “Variables” and select “Initialize variable” from the list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ojd0e63Wfx4Toa5saiCMeQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5JNE1BLYkv5nnfpK7lxSDw.png" /></figure><p>You should proceed with naming the varibale with the following values:</p><ul><li>Name: commitUrl</li><li>Type: String</li><li>Value: <em>(click on add dynamic content and select expression)</em> triggerBody()?[‘push’][‘changes’][0][‘old’][‘target’][‘links’][‘html’][‘href’]</li></ul><p>As you can notice the expression is the Logic Apps translation of the element path founded in the previous step.</p><p>Please rename this step to <em>commitUrl</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oj_-_Llak-bfg_6u6SC2Ng.png" /></figure><p>Please repeat this step of adding a Initiate variable two times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*BYTmPG1gVjVT7s79UMWvWw.png" /></figure><p>Please write the following parameters, for <strong>commitMessage</strong>:</p><ul><li>Name: commitMessage</li><li>Type: String</li><li>Value: <em>(click on add dynamic content and select expression)</em> triggerBody()?[‘push’][‘changes’][0][‘old’][‘target’][‘summary’][‘raw’]</li></ul><p>And for <strong>commitItem</strong>:</p><ul><li>Name: commitItem</li><li>Type: String</li><li>Value: <em>(click on add dynamic content and select expression)</em> split(variables(‘commitMessage’),’#’)[1]</li></ul><p>The commitItem variable is useful to extract the working item number from the commit message.</p><p>In the last step of the logic app we should connect to Azure DevOps and update the relevant working item.</p><p>Please click on add next step and select “Azure DevOps”, you will see that there are several actions available:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*6V0B8QxQJ3Y04CXG52V5kQ.png" /></figure><p>Scroll down and select “Update a work item”. Logic apps requires to access to your Azure DevOps organization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*O6zuWRUEm8ZutC_lobktYw.png" /></figure><p>After granting access, you will be asked to provide the following information:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*Xhxl6PjNHS51P7dCYATtXQ.png" /></figure><p>Please select your organization and project and then add the commitItem and commitUrl variables as show below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*wXgtyE7V-PQePYzeci7gzQ.png" /></figure><p>Then save your logic app.</p><h4>Step 3: Update the webhook</h4><p>After saving the Logic App, please scroll to the first box (trigger) of the designer “When a HTTP request is received”and copy the HTTP Post URL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*-REWVzOZrFo6jtWT_VEeNA.png" /></figure><p>The URL should be pasted in the BitBucket webhook:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*5iUBSHooBs5RFyiNe0dIVQ.png" /></figure><p>And click save.</p><h4>Step 4: Test it!</h4><p>You can now change a file in your repository and a commit message that match a work item id. You will see that a new comment is added in your work item.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*rKmAj2ye6VmG2-Hdd3co_g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*XQoOsHKVuyAOaH03-3RRKg.png" /></figure><p>If you have any problem please check the following logs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*FXyOGpWz0ycIlt-pzdryng.png" /><figcaption>Webhooks request details</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gEpMf1RzR8l9Z6LCR4P3DQ.png" /><figcaption>Logic App Logs</figcaption></figure><h3>Future improvements</h3><p>In this solution, I illustrated a simple use case. Both Bitbucket and Azure Boards offers a lot of flexibility in their integrations:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*c3ro2M4ptJwj-ihs-xXlLw.png" /><figcaption>Bitbucket triggers</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*-ssF3ZoZVp_owz4Y6T8NvQ.png" /><figcaption>Azure DevOps Connector: available actions</figcaption></figure><p>By combining the triggers and actions available in Bitbucket and Azure DevOps, several use cases can be enabled, including:</p><ul><li>Visualize real-time development status leveraging on Azure Boards <a href="https://docs.microsoft.com/en-us/azure/devops/report/dashboards/overview?view=azure-devops"><em>Dashboards</em></a></li><li>Assign a task/issue to a developer to review a PR</li><li>Update a <em>working item</em> when a PR is merged with additional information on the reviewer and the target branch</li><li>And much more :)</li></ul><h3>About the author</h3><p>Since 2012, <a href="https://www.linkedin.com/in/francescodeliva/">Francesco</a> managed seven mobile projects as a Mobile Lead or CTO. He covered several industries, from banking to lifestyle. Francesco led teams from one to seventy developers on four continents. He used technologies such as JavaScript, PhoneGap, Objective-C, Java, Kotlin, Swift, ReactNative and Flutter in his project. His most successful project has almost 8 million active users a month.</p><p>Today, Francesco is working as Cloud Solution Architect for one of the primary cloud providers in the world, providing advice and supporting the customer journeys on application innovation.</p><p><em>Disclaimer</em></p><p>This article reflects my personal opinions, and it should not be attributed to the view of any of my past or present employers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42c08033f958" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iOS CI/CD: Azure Pipeline or GitHub Action?]]></title>
            <link>https://francescodeliva.medium.com/ios-ci-cd-azure-pipeline-or-github-action-8a67d5ae21ad?source=rss-4c7826618a52------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a67d5ae21ad</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Francesco De Liva]]></dc:creator>
            <pubDate>Fri, 02 Jul 2021 09:13:32 GMT</pubDate>
            <atom:updated>2021-07-04T12:24:48.694Z</atom:updated>
            <content:encoded><![CDATA[<h4>An hands-on comparison on how to setup a CD pipeline for an iOS app using the two products</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*Y4K1kMsuKmXS4QT_sW_VnA.jpeg" /><figcaption>Remember: all I’m offering is the truth. Nothing more. (The Matrix, Movie/1999)</figcaption></figure><p>A couple of days ago, a customer asked for help with continuous integration and continuous deployment (CI/CD) for an iOS App developed using React Native. The customer implemented her pipeline using <a href="https://azure.microsoft.com/en-us/services/devops/">Azure DevOps</a> and I asked myself: what about <a href="https://github.com/features/actions">GitHub Action</a>?</p><p>In this article I will deep-dive on how to perform continuous delivery of an iOS application using ADO and GitHub.</p><p>I will not compare holistically Azure DevOps (ADO for friends) and GitHub. For an high-leve comparison, you can read <a href="https://acloudguru.com/blog/engineering/azure-devops-vs-github-comparing-microsofts-devops-twins">this article</a> by A Cloud Guru.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yfz7SZavFqwv_Y4eLAN4Ng.jpeg" /><figcaption>Comparison provided by Lars Klint (A Cloud Guru) — Jan 2021</figcaption></figure><p>While reading the comparison, please remember that both products are evolving every day.</p><h3>Experiment setup</h3><p>I started my exercise looking for a simple iOS application and I found an app from AppBrewery: <a href="https://github.com/appbrewery/Dicee-iOS13">https://github.com/appbrewery/Dicee-iOS13</a></p><p>I forked the repository and I added a basic POD file:</p><pre>platform :ios, &#39;13.0&#39; <br>  target &#39;Dicee-iOS13&#39; do<br>  use_frameworks!   <br>  <br>  pod &#39;PKHUD&#39;, &#39;~&gt; 5.0&#39; </pre><pre>end</pre><p>Then I followed two different tutorials to setup the pipeline:</p><ul><li>For Azure DevOps: <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/xcode?view=azure-devops">https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/xcode?view=azure-devops</a></li><li>For Github: <a href="https://engineering.talkdesk.com/test-and-deploy-an-ios-app-with-github-actions-44de9a7dcef6">https://engineering.talkdesk.com/test-and-deploy-an-ios-app-with-github-actions-44de9a7dcef6</a></li></ul><p>… and nothing worked at the first attempt :)</p><h3>The pipelines</h3><p>The Azure Pipeline and the GitHub Action for distributing my dummy iOS app are doing the following steps:</p><ol><li>Installing my Apple Development Certificate and my Provision Profile</li><li>Installing dependency using <em>pod install</em></li><li>Building and archiving the iOS application</li><li>Saving the generated ipa as a pipeline artifact</li><li>Uploading the IPA file to <a href="https://appcenter.ms/">App Center</a> for testing / distribution</li></ol><p><strong>Azure DevOps</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/110fbc7812fe36cbfeeeaedc1450ec77/href">https://medium.com/media/110fbc7812fe36cbfeeeaedc1450ec77/href</a></iframe><p><strong>GitHub Action</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9a741dea2b1277fe7ec8df7b8add9936/href">https://medium.com/media/9a741dea2b1277fe7ec8df7b8add9936/href</a></iframe><h4>Code sample</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*TjZeXN1OMA80kd8EB80HRg.jpeg" /><figcaption>You get used to it, though. Your brain does the translating. I don’t even see the <strong>code</strong>. All I see is blonde, brunette, redhead. (The Matrix, Movie/1999)</figcaption></figure><p>I followed the above guide, and then I made several changes to the scripts. Below I will summarize the major challenges and benefits. My code is available for reference: <a href="https://github.com/fdelivamsft/Dicee-iOS13-Medium">https://github.com/fdelivamsft/Dicee-iOS13-Medium</a></p><p>Folder <em>.github </em>contains the github actions workflow and scripts. The workflow file is available here: <a href="https://github.com/fdelivamsft/Dicee-iOS13-Medium/blob/main/.github/workflows/deploy.yml">.github/workflows/deploy.yml</a> . The relevant scripts are in the folder <a href="https://github.com/fdelivamsft/Dicee-iOS13-Medium/tree/main/.github/workflows">workflows </a>and <a href="https://github.com/fdelivamsft/Dicee-iOS13-Medium/tree/main/.github/secrets">secrets</a>.</p><p>Folder <em>.azuredevops</em> contains the pipeline file here: <a href="https://github.com/fdelivamsft/Dicee-iOS13-Medium/blob/main/.azuredevops/pipeline.yaml">.azuredevops/pipeline.yaml</a></p><p>What is missing in the repo? The secrets, the certificate, the provision profiles. You will need to generate your own following those two guides: <a href="https://docs.microsoft.com/en-au/azure/devops/pipelines/apps/mobile/app-signing?view=azure-devops&amp;tabs=apple-install-during-build#sign-your-apple-ios-macos-tvos-or-watchos-app">ADO</a> or <a href="https://engineering.talkdesk.com/test-and-deploy-an-ios-app-with-github-actions-44de9a7dcef6">GitHub</a> (Deploy chapter). For this reason, the Pipeline and Workflow will not work by just copy-pasting.</p><h4>Results</h4><p>The great news is: both pipelines are working with the latest xcode version and configurations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EGwD7DBrIDGcaT1G4qtzxw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VBQjkICEZ7zCldfFrz4Xnw.jpeg" /><figcaption>Successful pipelines</figcaption></figure><p>The app was uploaded successfuly to App Center:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nF4yiUGDRb6FRmzIshk2gQ.jpeg" /></figure><h3>Considerations</h3><p>It took almost a week from reading the tutorials to a working CD pipeline. I will summarize the main challenges that I faced. My comments might not be exhaustive or completed, but they are related to my experience with this example.</p><h4>Performance</h4><p>The two products are comparable from a performance point of view. Running the pipelines multiple times, I noticed that the execution was always taking between 3 to 4 minutes. The maximum waiting time for the agent to become available was around a minute.</p><h4>Maturity &amp; UX</h4><p>I agree with A Cloud Guru: Azure DevOps offers “Mature and feature-rich pipelines”. The interface is user friendly, and you can manage everything without writing any ad-hoc script.</p><p>GitHub Action is younger than Azure Pipelines, but they do not lack of any functionality. Both core and advanced features are available, but most of the time it requires some scripting to enable it. In my example, I could not leverage on a pre-defined script, so I prefered to build the bash script manually to build and export the IPA.</p><h4>Build &amp; Distribution Tasks</h4><p>One of the major differences is about ownership and reliability of the build and distribution tasks. Azure Pipeline offers a massive variety of predefined tasks maintained by Microsoft and working as mentioned in the documentation. GitHub Action are open source and managed by the community. As for any open-source library catalog, it might take a while before finding the right and reliable Action for your use case.</p><h4>Manage secrets</h4><p>Both products are thought with security in mind. How secrets are stored is a bit different but similar. ADO used variable and libraries that can be shared across pipelines to connect to Azure Key Vault. GitHub provides the secret feature to manage sensitive information.</p><p>Recently GitHub is investing on new DevSecOps that I didn’t have time to explore in this demo. I recommend you to have a look <a href="https://github.com/features/security">here</a>.</p><h4>Debug</h4><p>Both tools provide great capabilities to understand where the pipeline is failing and what went wrong. In addition, GitHub Pipeline editor can give a real-time syntax validation of the YML file.</p><h4>Common issues</h4><ol><li>The POD file requires an addon:<br>The <a href="https://raw.githubusercontent.com/fdelivamsft/Dicee-iOS13-Medium/main/Podfile">POD file</a> required some additions to let xcodebuild command succeed; I found the fix in the comment on Oct 31, 2015 by carrchr in this <a href="https://github.com/CocoaPods/CocoaPods/issues/4011">issue</a>.</li><li>Tutorial code is OLD<br>The syntax of iOS command and files has changed. I performed several changes to fix the pipeline script (i.e. <a href="https://stackoverflow.com/questions/45748140/xcode-9-distribution-build-fails-because-format-of-exportoptions-plist-has-chang">exportOptions.plist</a>). My advice for you is to follow the tutorial first and then compare the pipeline files and scripts with mine.</li><li>Your local environment is not working as a <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&amp;tabs=browser">build agent</a><br>xcodebuild (or the equivalent <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/xcode?view=azure-devops">Xcode@5</a>) in your local enviornment is able to generate a temporary provision profile for building and exporting an IPA, but xcode generated provision profile are not working in a build agent. So, you need to install and import the Development Certificate and the provision profile explicitly in the build agent</li></ol><h4>Must Do / Next Steps</h4><p>This article was focused on exploring continuous deployment and I didn’t cover several core areas like static analysis / code quality, unit testing and security.</p><p>Below there is a list of references on those topics:</p><ul><li>Azure DevOps: <a href="https://sonarcloud.io/azure-devops">static analysis</a>, <a href="https://stackoverflow.com/questions/55368889/is-there-any-way-to-run-unit-and-ui-tests-for-azure-devops-with-ios">unit testing</a> and <a href="https://secdevtools.azurewebsites.net/">security</a></li><li>GitHub Actions: <a href="https://docs.github.com/en/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning">static analysis</a>, <a href="https://augmentedcode.io/2021/04/26/running-tests-in-swift-package-with-github-actions/">unit testing</a> and <a href="https://docs.microsoft.com/en-us/azure/architecture/solution-ideas/articles/devsecops-in-github">security</a></li></ul><h4>Product roadmap and long term</h4><p>Both products have a long term roadmap of new features released every month: <a href="https://docs.microsoft.com/en-us/azure/devops/release-notes/features-timeline">Azure DevOps</a> and <a href="https://github.com/github/roadmap/projects/1">GitHub</a>. However, GitHub, lacking several key ADO’s features until last year, is now in a fast expansion phase. <a href="https://copilot.github.com/">For example, GitHub co-pilot</a> was released just a couple of days ago. With this innovation pace, GitHub becomes very attractive.</p><h3>Conclusion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*D8TetwpveZVlKL5KT7mZGQ.jpeg" /><figcaption>Young Monk: “Do not try and bend the spoon — that’s impossible. Instead, only try to realize the truth.” (The Matrix, Movie/1999)</figcaption></figure><p>Both products provide incredible capabilities in terms of CI/CD and performance. Azure DevOps is more mature and can be considered more straightforward to use thanks to several predefined and trusted pipeline tasks. GitHub Action requires a deeper technical understanding to write pipelines and write your bash scripts. Compared to ADO, GitHub Action are created by the community, and this open-source spirit is boosting the exponential growth of the GitHub Action available in the <a href="https://github.com/marketplace?type=actions">marketplace</a>.</p><p>In summary, no matter if you choose Azure DevOps or GitHub Action you will accomplish your goal of automating the distribution of your mobile application, and you will enjoy the ride.</p><p>Each company have a different tech stack and needs, making it hard to give a general recommendation. Azure DevOps is more mature today, but GitHub could be the undisputed innovator lead for this industry in the long term, thanks also to their open source community. Given that GitHub could be the right solution for greenfield automation.</p><h3>About the author</h3><p>Since 2012, <a href="https://sg.linkedin.com/in/francesco-de-liva-3a6a5625/en">Francesco</a> managed seven mobile projects as a Mobile Lead or CTO. He covered several industries, from banking to lifestyle. Francesco led teams from one to seventy developers on four continents. He used technologies such as JavaScript, PhoneGap, Objective-C, Java, Kotlin, Swift, ReactNative and Flutter in his project. His most successful project has almost 8 million active users a month.</p><p>Today, Francesco is working as Cloud Solution Architect for one of the primary cloud providers in the world, providing advice and supporting the customer journeys on application innovation.</p><p><em>Disclaimer</em></p><p>This article reflects my personal opinions, and it should not be attributed to the view of any of my past or present employers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a67d5ae21ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mobile Lead 101 — Lesson 3: Let your developers lead]]></title>
            <link>https://francescodeliva.medium.com/mobile-lead-101-lesson-3-let-your-developers-lead-fb27b0d6af5c?source=rss-4c7826618a52------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb27b0d6af5c</guid>
            <dc:creator><![CDATA[Francesco De Liva]]></dc:creator>
            <pubDate>Sun, 12 Apr 2020 05:16:55 GMT</pubDate>
            <atom:updated>2020-04-26T08:39:49.955Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mobile Lead 101 — Lesson 3: Let your developers lead</h3><h4>What I learned working as a Mobile Lead for seven years</h4><p>At work, many people speak about “dream teams” or the “A-Team”, how should my A-team look like?</p><p>Be able to build your team from scratch: it is a great advantage. But in both case, if you inherit a team or if you build, it is critical to take essential decision when a team member doesn’t fit.</p><p>To become effective during your hiring process, and while coaching your team, you should ask yourself the question: how should my development team be? <strong>My team should be empowered, focus and motivated!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*YfM8lsxgczWX8Y2Uxt3C8Q.png" /><figcaption>My dream-team!</figcaption></figure><h3>Empowered</h3><p>A team requires people that think. Developers must receive clear guidelines and processes, but, at the same time, be put in a position to be able to fail, learn/adapt and try again.</p><p>Empowering is not like mentoring. It is a complex topic that can’t be summarized with an algorithm or procedure as you might understand reading those <a href="https://www.quora.com/How-does-one-empower-people">Quora answers</a>.</p><p>It is a pull approach and not push, and listening is a critical skill. Each developer has a different relationship with me. I know that some people are shy, and others are more talkative. It is important to remember everyone to avoid to fail to recognize silent talents. A monthly feedback session might be crucial. Be equal with your team is an essential value that pay-back in a long time frame. Also, I tried to focus on the future rather than the past with my team. If there somebody went wrong, it is crucial to perform the proper root cause analysis to understand what went wrong to understand what can be done better in the future. For example, should we change the procedure or stick to it more carefully? It is important to avoid blaming anybody and avoid creating this kind of culture.</p><p>The objective of empowering the team is to make sure that each developer will show ownership for the project and not just for the small component they developed. Leading with example is essential to achieve it.</p><p>Some developers might enjoy adding some gamification or healthy competition between squads on the number of story points delivered of bugs fixed. But it might not be appreciated by everybody. In the past, I worked with a team that appreciated the irony, and we were awarded significant failure trophies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*UyskutvocxKxVZ7cNFlsuQ.png" /><figcaption>Things not to do while empowering people</figcaption></figure><p>We were doing since we were 100% sure that failure was not impacting our performance, but in Asia, I strongly recommend not to try a similar approach.</p><p>Please try your best to have a diverse team. In some countries, it might be a complex challenge, <a href="https://hbr.org/2016/09/diverse-teams-feel-less-comfortable-and-thats-why-they-perform-better">but it will pay-back</a>.</p><p>Empowering is not a perfect science, I recommend it, but it is better to know when it <a href="https://hbr.org/2018/03/when-empowering-employees-works-and-when-it-doesnt">might fail</a>.</p><h3>Motivated</h3><p>You can make some assumptions on what motivates your team. But if you never ask, you will never know. Usually, after a few months, I organize a poll, and anonymously I ask an open question such as“What are your motivations to come to work?”.<br>The answers are always different. I would like to share some example from one of my projects after I will also share some of the actions I did to improve the overall team satisfaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*rVCyl1O9UprDVXZginp_xg.png" /><figcaption>Some motivations that might drive your developers</figcaption></figure><p>In this project, the developers had different needs from improving the code to have a better understanding of the whole project (see above figure). Some were more beneficial for an individual and other more for the project. I could not improve all of them at the same time.</p><p>Also, at that moment, there were two significant problems that I would have like to solve:</p><ul><li>the recurrent slack fights between new joiners and seasoned developers on the introduction of new patterns;</li><li>the project complains about the lack of communications between teams causing bugs and delays.</li></ul><p>After several brainstorming with my team, we decided to introduce a weekly forum to discuss the code and give the ability to anybody junior or senior to bring any topic to discuss, called <strong>Tech Debts meetings, </strong>and<strong> t</strong>he rotation program (called internally “the internship project”).</p><h4>Tech Debts Meetings</h4><p>Before starting the meetings, I decided to create a structured process to open and review technical debts. I gave the ability to any developer to add Jira tickets in this tech debts board. Those tickets could include code refactoring, the introduction of new design patterns, upgrade of libraries and even introduction of new coding guidelines.</p><p>Every Wednesday, the team was reviewing the proposed design. If they were able to finalize their solution, the item would be assigned to me for the final review and the backlog prioritization.</p><p>These meetings were constructive to empower them better and make them feel ownership for their project.</p><h4>The rotation program</h4><p>Since months I was spending a lot of time explaining the different teams’ challenges in the project, but most of my developers didn’t want to put themself in other shoes. So for the developers that wished to “see the full picture” or “learn new technologies”, they might benefit in joining a different team for a short period.</p><p>We started an internship program of 2 weeks for the developers to experience the work in application design, back-end development, testing. The objective was to let people explore other areas of interests and perform <strong>knowledge sharing</strong>. It helped remove barriers between teams. We didn’t lose any developer, and we benefit a lot by creating more reliable connections with other groups.</p><p>In addition to this process, I strongly recommend organizing <strong>retrospective</strong> sessions at the end of each sprint or release to understand better and take action on the day to day issues faced by your team.</p><h3>Focused</h3><p>How can a team be on time, with high-quality standard and collaborative at the same time? The activities that I found useful are:</p><ul><li><strong>Design together:</strong> <br>Design is the most formative moment to share guidelines, directions and challenge the solution. It is vital to remind how important is this meeting and to share it with all the senior developers (front-end and back-end). The entire team should join as an essential moment to align the whole team on a single objective. It is critical to keep all the people in the loop, and for this reason, we were always creating a feature’s channel in slack to enable a fast communication channel in case any change was needed.</li><li><strong>A common goal: the development exit-criteria<br></strong>After many years, I created and updated a list of questions and validations that are my definition of done for the mobile team. The checklists include questions about: unit-testing, e2e test, SonarQube, PO and design reviews. This maker and checker approach helped me to decrease bugs up to 20% in each release.</li><li><strong>Peer reviews:</strong> <br>How do you measure the collaboration within a team? Especially when you are managing several groups, the visibility on the internal dynamics might be limited. To overcome this issue, every three months, we organize a peer review session. Each developer should provide an evaluation for his/her team member and himself/herself on several topics ranging from attitude to technical skills.<br> Thanks to this process, I was able to acknowledge issues such as low performant team members, bad attitudes with other teammates and in the codebase and to award team players.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*Yy20sNJLyaD3K2o4_9lbPA.png" /><figcaption>A design together session in jail</figcaption></figure><h3>My first 100 days</h3><p>This article didn’t cover so far a critical activity that a leader should do: build her/his credibility. My formula is usually the following:</p><ol><li>I start a project as mobile lead with an in-depth hands-on experience</li><li>I spend some time to develop my opinion about the code and processes in place.</li><li>I start to write down all the improvements I would like to do</li><li>I engage in informal chats with the developers to understand their pain points and their recommendations about the code/projects.</li><li>I define the new processes, architectures and guidelines, but before presenting it to the big audience, I validated it with the senior developers trying to understand what can be achieved and what should be changed.</li><li>When I finally present the change, I try to provide a 360 degrees view on the benefits and the motivations behind my decisions.</li><li>I start to execute the plan. Be coherent, and a hard worker will explain who you are to your team.</li></ol><p>Focusing on the ground job in the first weeks or months of a project instead of trying to take substantial architectural decision will help you bond with the team and have a more in-depth technical understanding. I learn to work with developers and engineers that you don’t build trust overnight or with an inspirational speech, but working with them fixing code until late nights.</p><h3>Conclusions</h3><p>Managing a mobile team requires some technical skills at the beginning to gain trust, but in the long term, it requires more to develop your emotional intelligence. The critical activity to let your developers lead, it is to listen to them. You should adapt your process and your problem solving to find the most efficient way for your team to be productive.</p><p>Don’t work on assumptions and don’t think that all the teams should work in the same ways. The developers’ cultures change a lot between different companies and countries; please ask them what motivates them and try to adapt the working style to make the moving experience better.</p><p>The technical debts meetings and rotation programs can be an exciting exercise that you can replicate in your project. The exit criteria checklist was a way to improve quality, but there might be others, please <a href="/service/mailto:francescodeliva@gmail.com">contact me</a> for any feedback about this article. I would love to discuss this topic and collect a different point of view about it.</p><h4>About the author</h4><p>Since 2012, <a href="https://sg.linkedin.com/in/francesco-de-liva-3a6a5625/en">Francesco</a> managed six mobile projects as a Mobile Lead or CTO. He covered several industries, from banking to lifestyle. Francesco led teams from one to sixty developers in four continents. In his project, he used technologies such as PhoneGap, Objective-C, Java, Kotlin, Swift, ReactNative and Flutter. His most successful project has almost 8 million active users a month.</p><p><em>Disclaimer</em><br>This article reflects my personal opinions, and it should not be attributed to the view of any my past or present employers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb27b0d6af5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mobile Lead 101 — Lesson 2: Move fast, fail fast, fail-safe]]></title>
            <link>https://francescodeliva.medium.com/mobile-lead-101-lesson-2-move-fast-fail-fast-fail-safe-5ad8d7045dfd?source=rss-4c7826618a52------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ad8d7045dfd</guid>
            <dc:creator><![CDATA[Francesco De Liva]]></dc:creator>
            <pubDate>Sun, 12 Apr 2020 05:12:25 GMT</pubDate>
            <atom:updated>2020-04-26T08:26:13.616Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mobile Lead 101 — Lesson 2: Move fast, fail fast, fail-safe</h3><h4>What I learned working as a Mobile Lead for seven years</h4><p>This article describes some of the tools that helped my teams to deliver several projects on time and with high quality. Achieving this, it is a fragile trade-off between architectural foundations, technical debts, designing for growth and the velocity of new relevant releases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*wzOhvofsEP7Z2ar7QJnfsg.png" /><figcaption>The move fast, fail fast, fail-safe manifesto.</figcaption></figure><h4>Move fast: It is a classic!</h4><p>Have you ever worked in a company that is not interested in adding an incredible amount of new features or upgrades in the next release?<br> In some companies, you can experience a constant fight between PM/POs and developers. The PM/POs thinks that the developers are lazy or too interested in their technical details and the developers believe that the PM/POs don’t understand anything technical (coding is not like doing a PPT).</p><p>The development of new features or a new project is a complex trade-off between timing, quality, people and future scalability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*3UHzj66O2X1uGDHILRPNBA.png" /><figcaption>Hey, man, it’s, it’s <strong>quality,</strong> not quantity. ~ <strong>Dazed and Confused</strong> (1993)</figcaption></figure><p>It is not just a matter of how many features can a team develop in the next release, but also how. What is the level of reusability, code quality, maintainability expected? How can you explain to the business that you can rush today, but then you will pay the price tomorrow when developers take three days to fix a bug, or they resign because the code is too messy?</p><p>It is hard to stay in the middle between the technical and the business worlds. Having a robust delivery track record helps, but you can’t argue to your bosses by just saying: “Please trust me”. I created a few equations to explain it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UzW8I4jm_YkbaWVg6w42xQ.png" /></figure><p><strong>Variable definitions:</strong></p><ul><li><em>New features:</em> it represents an estimate of the number of new features that could be delivered by a team in a release;</li><li><em>Squad capacity:</em> it is a measure based on the past track record of how many epics (defined with a t-shirt sizing methodology) are delivered in a release; it takes into account several parameters from technical seniority to the percentage of new joiners in the team</li><li><em>rqmtsClarify</em>: this variable express the detail of the business request and the quality of the requirements</li><li><em>targetQuality</em>: it might be a hidden variable of many projects. Usually, it is not explicit told, but the timeline and the code itself can imply it. It takes into account the expected code quality of the new releases.</li><li><em>codeBaseQuality</em>: it measures if the project is easily maintainable and scalable. Are the proper design patterns and architecture in place? What is the size of the project and how different features are connected?</li></ul><p>The above three equations help explain to management how the ability of a team in delivering new features is impacted by the current codebase quality, the seniority of the team and the new features target quality.</p><p>In the short-term, an organization under stress can deliver features faster, but there are relevant implications in the long term to remember. In this scenario, the team will invest less time in creating reusable components, reviewing the code and refactoring with the proper architecture.</p><p>The goal of explaining the relationship between reusability and long term scalability, it is critical to buy time from management to put in place the proper foundation. Besides, when the code becomes a nightmare, and the administration is pushing hard for deadlines, many developers will not last in the company causing a vicious circle that usually causes an entire project to derail.</p><p>The above three equations are not a perfect science like the Pythagorean theorem. They can be useful to remember about all the factors that are impacting software development. It might be helpful to drive your conversation with the PM/POs to explain the implications of some decisions.</p><h4>The move fast enablers</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*o6wTwgXB0rG7wm_r7E6-sw.png" /><figcaption>The move fast enablers</figcaption></figure><p>In my experience, the primary enabler for a scalable, maintainable long term mobile project are:</p><ul><li><strong>Design for growth</strong> <br>The development team should be engaged since the earliest conversations to be able to understand the scope and the long term roadmap. Before writing hundreds of lines of code, the team should meet face to face agree on basic design and architecture principles. It is a crucial moment to make a decision that will help improve the scalability of the project. Some project needs (number of screens, number of contributors, number of Regions) might have a substantial impact on the architectural decision. <br>According to the complexity of a project, I recommend some essential tools to help a project growing over time such as the clean architecture (<a href="https://www.raywenderlich.com/3595916-clean-architecture-tutorial-for-android-getting-started">android</a> and <a href="https://clean-swift.com/">iOS</a>), the modularization (<a href="https://proandroiddev.com/modularization-in-android-architecture-point-of-view-from-a-to-z-part-i-7a86e6e03799">android</a> and <a href="https://tech.just-eat.com/2019/12/18/modular-ios-architecture-just-eat/">iOS</a>) and the <a href="https://micro-frontends.org/">micro-frontend</a> architecture. All the previous patterns are not mandatory. It is vital to pick the few that your team is willing to adopt, and it is compulsory to be consistent across the entire project. <br>This accent on design will help not only to scale faster but also to implement the proper separation of concerns that is a pivotal achievement to increase the code maintainability.</li><li><strong>Code standards</strong><br>In every project, developers have a different point of views on coding. I recommend creating and updating weekly confluence pages on guidelines, best practice, checklists (entry/exit criteria, the definition of done, etc.) and new joiners guides. <br>It is a critical exercise to align different development teams and keep only one source of truth about the project. Your project will benefit by improving the code reusability and maintainability. Also, your organization might be decreasing the time to onboard new developers.<br>A recommended book about coding guidelines is “<a href="https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship-ebook/dp/B001GSTOAM">the clean code” book</a> by Uncle Bob (Robert C. Martin).</li><li><strong>DevOps for mobile</strong><br>The principle is natural: all the repetitive task of CI/CD should be automated. You will benefit from higher efficiency and less human errors. But it isn’t trivial: iPhone requires MacOS machine to run the pipeline that is not available on AWS or Azure. My preferred tools are <a href="https://fastlane.tools/">Fastlane</a>, <a href="https://jenkins.io/">Jenkins</a>, <a href="https://www.sonarqube.org/">SonarQube</a> and <a href="https://firebase.google.com/docs/app-distribution">Firebase</a>. Your developers will help more time for coding. Also, I recommend the introduction of a mobile release manager to coordinate all the efforts of your team.</li><li><strong>Test-driven development<br></strong>TDD is an innovative software development approach where tests are written by the developers, before writing the bare minimum of code required for the test to be fulfilled. The app code can be refactored, as often as necessary, to pass the test, with the process repeated for each piece of functionality. In this way, instead of writing useless and not in sync documentation of your code, your tests became your software requirements. Indeed, it helps to create better modularized, extensible and flexible applications. There are some guides (<a href="https://www.raywenderlich.com/7109-test-driven-development-tutorial-for-android-getting-started">android</a> and <a href="https://clean-swift.com/step-by-step-walkthrough-of-ios-test-driven-development-in-swift/">iOS</a>) that might help you start, but it will require years to become a pro.</li></ul><h4>Fail fast: the MVP principle</h4><p>According to Wikipedia: “<em>A </em><strong><em>minimum viable product</em></strong><em> (</em><strong><em>MVP</em></strong><em>) is a version of a product with just enough features to satisfy early customers and provide feedback for future </em><a href="https://en.wikipedia.org/wiki/New_product_development"><em>product development</em></a>”. You can apply this concept also to features. Nobody can be so sure about what your customers want.</p><blockquote>“In order to innovate, you have to experiment” <br><strong>Mike Schroepfer, CTO @ Facebook</strong></blockquote><p>Waiting for months to go live with a super detailed feature instead of delivering iterative upgrades since week one postpone revenues and increase the costs and the risks of royalty screw a project. I think MVP is a well-known principle that doesn’t require further explanations. Remember that you can apply to each level of a project from small features to enterprise solutions. As a lead, please make sure that it is always brought to the attention of project teams, especially during prioritization or grooming sessions. If you would like to know more, you can read this famous book “The Lean Startup” by Eric Ries (a <a href="https://medium.com/west-stringfellow/the-lean-startup-summary-and-review-5054675ff095">summary</a>).</p><h4>Fail-safe with feature toggling</h4><p>Should we wait for all the approvals before starting to develop this feature? Of course not. In some project, with this attitude, you will never deliver anything. Please try always to start working on a feature as soon as possible.</p><p>There are many reasons why a feature might not go live:</p><ul><li>The business team (i.e. marketing is not ready; some details are not yet approved by leadership, etc.) is not prepared.</li><li>The feature needs legal or regulatory approval that will arrive late.</li><li>Other technical teams are not ready.</li></ul><p>Some project manages this risk by avoiding to merging the code until the last minute, but in the long term is not a good practice. The code, after a few weeks, is out of sync and you will need much more time fixing conflict when everyone is finally ready.</p><p>The approach to addressing this problem is to create a feature toggling mechanism. This mechanism will allow the developer to merge their code and to enable or disable a feature from the back-end side. Sometime it might require to add some additional code, like to keep version one and version two of functionality. Still, the benefits in terms of flexibility are way higher compared to the small application size increase you might end up gaining.</p><p>How does it work?</p><ol><li>Ask your back-end team to develop a new service that will accept your user or device identifier, and it will return a list of service enable/disabled and the current version. This service should be super optimized for fast response time.</li><li>Your mobile team should change the logic for application start. At every app start (or with a tailored caching mechanism) while loading, it should call the feature toggling endpoint and retrieve the app configuration.</li><li>Based on this response, the proper entry points of the relevant features should be displayed or hide.</li></ol><p>This feature can also be used to enable an A/B testing capability by adding additional logic on the back-end and by allowing some functions only for some target users.</p><h4>Conclusions</h4><p>Moving fast is essential for a project; it enables to anticipate revenue that might be critical for a company. But the development team should not be a victim of the business decisions. There is a complicated relationship between speed, quality, team motivation that should be brought to the attention of your business team. Listen to the technical point of view on the different delivering timeline plans, and it will help you to improve code quality that implies higher maintainability and scalability for the future.</p><p>In this article, I described several enablers for the technical team that might be helpful to deliver faster and safer. The proper design and principles like the TDD, clean architecture, modularization and MVP principles are foundations for any project that is willing to change to user needs and scale.</p><p>Please <a href="/service/mailto:francescodeliva@gmail.com">contact me</a> for any feedback about this article. I would love to discuss this topic and collect a different point of view about it.</p><h4>About the author</h4><p>Since 2012, <a href="https://sg.linkedin.com/in/francesco-de-liva-3a6a5625/en">Francesco</a> managed six mobile projects as a Mobile Lead or CTO. He covered several industries, from banking to lifestyle. Francesco led teams from one to sixty developers in four continents. In his project, he used technologies such as PhoneGap, Objective-C, Java, Kotlin, Swift, ReactNative and Flutter. His most successful project has almost 8 million active users a month.</p><p><em>Disclaimer</em><br>This article reflects my personal opinions, and it should not be attributed to the view of any my past or present employers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ad8d7045dfd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mobile Lead 101 — Lesson 1: Listen to your customers]]></title>
            <link>https://francescodeliva.medium.com/mobile-lead-101-lesson-1-listen-to-your-customers-3171db2740d2?source=rss-4c7826618a52------2</link>
            <guid isPermaLink="false">https://medium.com/p/3171db2740d2</guid>
            <dc:creator><![CDATA[Francesco De Liva]]></dc:creator>
            <pubDate>Sun, 12 Apr 2020 05:06:29 GMT</pubDate>
            <atom:updated>2020-04-26T08:24:08.646Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mobile Lead 101 — Lesson 1: Listen to your customers</h3><h4>What I learned working as a Mobile Lead for seven years</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*B2Sr3V5VZyZhcvHHFAtK3w.png" /><figcaption>He might be your customer ❤</figcaption></figure><p>This article covers a bottom-up approach that can be used by a technical team to inspire the organization to become more user-centric.</p><p>The scenarios described fit very well for startups, and they also apply to several companies in a transformation process. If your company is already data-driven with more data engineers than developers, things explained in this article might already be familiar to you. But if it is not and you want to focus on help solving this problem, then this is a guide on how the development teams can help your company to build better products.</p><h4>Listening to your customers — is it obvious?</h4><p>It is not! Often it is a shared value within the working team, but not within the whole organization. I don’t want to go into details of this well-known problem. Solving it requires a huge mindset change in the company’s working culture and is out of scope. Working both in Europe and in Asia, I noticed that several cultural implications might harder this transition, especially in top-down cultures such as Italy or China. Besides, it requires to design new processes that change how decisions are made. It empowers product manager who should become powerful than CEOs. But it works only if the entire team is focusing on listening, interpreting and understanding all the signals and messages sent by their customers.<br>It is all about listening to your user more than anybody else. I don’t want to repeat what others wrote better than me badly, so if you are not familiar with those topics, I can recommend widely adopted methodologies such as <a href="https://designthinking.ideo.com/">design thinking </a>and <a href="https://www.amazon.com/Business-Model-Generation-Visionaries-Challengers/dp/0470876417/ref=pd_sim_b_3">business model generation</a>. <br>I will focus on the next chapter in what you and your development team can do.</p><h4>How can the development team be the game-changer?</h4><p>Complaining is easy, but it will not change anything. The point here, it is not what your organization can do for you, but what you can do for them. The best way is to start as soon as you can.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*LBbUx96GL95FwN5yQfqD_w.png" /><figcaption>The user-centric journey from the development point of view</figcaption></figure><p>The process to achieve a user-centric product development can start internally by collecting data and sharing reports to all the teams in the project. After a few weeks that everybody sees your reports, you can start bringing those insights into the backlog grooming and prioritization conversations and use it to help shape a better product.</p><h4>Step 1: Collect data.</h4><p>It is the most natural step for the development team. The team should decide for a popular analytics tool such as Google Firebase, Apple Analytics, AppsFlyer or many <a href="https://medium.com/swlh/top-11-mobile-app-analytics-platforms-pricing-included-cdc553578fd">others</a>. Then the team should start to add events to each screen and each button, leveraging all the feature of the analytics SDKs like custom data, event parameters and user info. Again, I prefer not to enter in the details, and I recommend to read some guide on <a href="https://phiture.com/mobilegrowthstack/mobile-analytics-part-1-the-step-by-step-guide-62f13ff2ebd3/">data modelling for mobile analytics</a> and the SDK documentation.<br>Please remember that a client is not secure by definition and it will be essential to correlate the mobile data with the back-end data using a unique key for your user that does not contain personal data (i.e. hash of your userId).<br>If you are not logging any personal information and your industry is not highly regulated (i.e. children games, pharma, banking, etc.) you don’t need to ask any permission to add an analytic tool to your app. In this case, it will be better to ask for forgiveness rather than wait weeks the final approval.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*Z4iMvU7wCzQoepoFQDw8ng.png" /><figcaption>A possible victim of a <em>panchinaggio</em>.</figcaption></figure><p>Having mobile analytics is quite essential, but it might not be enough. I strongly recommend to partner with your design or marketing team and ask your users about their needs. <br>Some companies like a focus group, others send surveys, I like to speak with random people while they are waiting. I call it <em>panchinaggio</em> (translated from Italian: benching). <br> The target people of a <em>panchinaggio</em> are waiting at the bus stop or in a park. They usually are not busy, and they might enjoy spending a few minutes answering questions. It is imperative to focus on what you would like to achieve from this short customer interviews before doing it. Those interviews are a fundamental step of all my project because they help the team to understand the customer needs and the expectation on the UI/UX. Asking your developers to perform a <em>panchinaggio</em> will help them understand the user point of view, and it might be a boost for team morale.</p><p>Many teams have already an analytics team and several processes in place. There is always room for improvements. Sometimes the analytics team might not be aware of all the features available in an SDK. Also, especially in the early stages of many projects, the data collection might not be a project top priority. But, if your team succeed in squeezing this feature in the development timeline, the benefits might be huge for the whole organization.</p><h4>Step 2: Share insights and reports</h4><p>The data collected from interviews and analytics is compelling, but it is useless if nobody can see it. I usually nominate one of the developer of my team as the analytics person. He or she will be in charge of collecting data and structure it in an infographic report of the key metrics and their comparison over time. This report should be shared with all the member of the project from the interns up to the CEO. A best practice would be to provide access to your analytics tools to the entire working team to enable everybody to crunch data if they are willing to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*kTin6Ptbls2gNIm3Yh9gDQ.png" /><figcaption>A Firebase dashboard</figcaption></figure><p>The most important metrics that a report might have are:</p><ul><li>New downloads / new uninstall</li><li>Active users</li><li>Funnel of the main features</li><li>Orders or conversions</li><li>New features requested by users.</li><li>What users like/dislike in the app</li></ul><p>For each of this metric, there should be a breakdown of the values by age, gender, geography, etc.</p><p>Sending these reports to the entire project will improve the reputation of the development team. Everybody will understand that you care about the product, and it will help change the usual reputation of the development team who only cares about the small technical details.</p><h4>Step 3: Backlog prioritization based on customer insights</h4><p>The following step requires the onboarding of the product team. The backlog grooming or prioritization sessions should be based on the insight gained by data and interviews. It is quite important that in each conversation the development team uses the insights from the data and interviews to support his view.</p><p>Jira can help to facilitate a transition to customer-centric product development. You can add a mandatory field about the usage, impact and reach based on the analytics for each new epic or user story created in JIRA.</p><p>Besides, I would like to provide some examples of the most common insights you can gain from data and interviews and what are the implications for your backlog.</p><p><strong>A) A feature’s funnel is not performing as expected</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*b-1CHkIum2fQMVOIlqpvfw.png" /><figcaption>A feature’s funnel</figcaption></figure><p>Let’s imagine that we finally went live with a new feature and many users access the landing page, but traffic drops in the next screens of the funnel. It is important to analyze all the possible causes using data and interviews: is it a usability issue (a user doesn’t understand how to navigate next)? Is it a content issue? Is it normal?</p><p>Recommendation: a new item in the backlog should be added to investigate this issue and develop multiple solutions that can be tested with customers using <a href="https://www.usercrowd.com/">A/B testing tools for UX</a>.</p><p><strong>B) Feature 1 is not performing well</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*AMj7AHl77xJ8I2Ehj3vpFw.png" /><figcaption>Compare two features metrics.</figcaption></figure><p>Suddenly, the users are losing interest in one of your core features. In this case, there are only a few insights you can gain from data.</p><p>Recommendation: The analysis feature by feature is vital to understand how the user needs change over time. A focus group on this topic is required to know why and what should be the next step. This item is critical and requires a fast iteration process to ensure that a new version of the product can be delivered to the customer as early as possible.</p><p><strong>C) The user wants different features compared to your roadmap</strong></p><p>The focus group reports the needs of new features for the users. How can the team prioritise it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*NdJnvDFJFCHl4pahRyJPyw.png" /><figcaption>RICE score: a simple tool for prioritisation</figcaption></figure><p>Recommendation: List down all the features and perform a proper prioritisation analysis using methods like <a href="https://www.intercom.com/blog/rice-simple-prioritization-for-product-managers/">RICE</a>.</p><h4>Bonus: undercover different user needs</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*D1dICCgql7-DV4vvQA8eHw.png" /><figcaption>Customize the user experience<strong> </strong>based on the user’s segment</figcaption></figure><p>In several projects, I received the requirement to develop customised user experience based on the <a href="https://www.leanplum.com/blog/mobile-customer-segmentation/">customer base segments</a>. Integrating analytics enable the data team to define a segment based on complex behaviour (i.e. user A have checked an item three times, and then he bought a cheaper item from the same category) and not only demographics. To achieve this goal, you can develop a custom solution working closely with your back-end and data teams, or you can explore some enterprise solutions like <a href="https://www.adobe.com/sea/marketing-cloud.html">Adobe Marketing Cloud</a>.</p><h4>Conclusions</h4><p>The development team plays a critical role in facilitating a customer-centric product. The development onboarding is essential to start this process. Sometimes data might remain untouched waiting for a NASA’s data analyst to be hired (and she/he will never come). Instead of living this data in a sever, the reports can be shared with the teams to raise awareness of how the product is doing at all levels of your organization. A developer with a good database background can easily support this activity. <br>The following step requires the onboarding of the product team. That should understand the power of the insight gained by data or interviews. Every backlog prioritization conversations should be data-driven. When the project reaches a level where for each product meeting at least one person is asking for the user insight, you are on the right track.<br>Please <a href="/service/mailto:francescodeliva@gmail.com">contact me</a> for any feedback about this article. I would love to discuss this topic and collect a different point of view about it.</p><h4>About the author</h4><p>Since 2012, <a href="https://sg.linkedin.com/in/francesco-de-liva-3a6a5625/en">Francesco</a> managed six mobile projects as a Mobile Lead or CTO. He covered several industries from banking to lifestyle. Francesco led teams from one to sixty developers in four continents. In his project, he used technologies such as PhoneGap, Objective-C, Java, Kotlin, Swift, ReactNative and Flutter. His most successful project has almost 8 million active users a month.</p><p><em>Disclaimer</em><br>This article reflects my personal opinions, and it should not be attributed to the view of any my past or present employers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3171db2740d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>