<?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[Inside League - Medium]]></title>
        <description><![CDATA[League is a platform technology company powering next-generation healthcare consumer experiences. Millions of people use solutions powered by League to access, navigate and pay for care. Interested in learning more about League? Visit www.league.com - Medium]]></description>
        <link>https://medium.com/inside-league?source=rss----def796f8d2dd---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Inside League - Medium</title>
            <link>https://medium.com/inside-league?source=rss----def796f8d2dd---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 08:32:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/inside-league" 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 Future of AI Governance in Healthcare is Here]]></title>
            <link>https://medium.com/inside-league/the-future-of-ai-governance-in-healthcare-is-here-dfc442906448?source=rss----def796f8d2dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/dfc442906448</guid>
            <category><![CDATA[nist-framework]]></category>
            <category><![CDATA[responsible-ai]]></category>
            <category><![CDATA[ai-governance]]></category>
            <dc:creator><![CDATA[Leo Espindle]]></dc:creator>
            <pubDate>Wed, 01 Oct 2025 21:10:08 GMT</pubDate>
            <atom:updated>2025-10-02T19:39:43.837Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*r1XIdnk7VAC9OdqyhhiT1w.png" /><figcaption>Image generated by Gemini.</figcaption></figure><p>I recently attended the <a href="https://iapp.org/conference/iapp-ai-governance-global-north-america/">IAPP AI Governance Conference</a> in Boston, and the energy from over 1,000 of my fellow compliance professionals was incredible. It was a powerful reminder that while the future of AI governance may feel uncertain to some, at <a href="https://league.com/">League</a>, we’re already doing it, and positioned to lead because — quite frankly — it’s just the right thing to do.</p><p><strong>The core theme was that much depends on context.</strong> There are no “one size fits all” standards or laws that tell compliance professionals exactly what to do with this new technology.</p><p>In particular, I helped instruct a lively (and fun!) AI Governance in Healthcare Workshop. My key takeaways:</p><h3><strong>Takeaway #1: Recognize the Risks</strong></h3><p>Health-related AI features will generally be considered a high-risk use case, and a robust governance process, compliance and security controls are a necessity, not an option.</p><h3><strong>Takeaway #2: But also the Benefits!</strong></h3><p>That being said, the benefits to deploying AI systems in healthcare are so large, that the choice to do nothing is itself an unacceptable risk to organizations. Members and patients deserve better.</p><h3><strong>Takeaway #3: The Tech Alone is Insufficient</strong></h3><p>The sophistication of the technology itself, while an enabler, is not as important as the unique context in which the healthcare deployer operates.</p><h3><strong>Takeaway #4: The Way Forward — Trust and Transparency</strong></h3><p>Controlling the risk pre- and post-launch requires rigor, defense-in-depth, human oversight, and engagement and feedback from diverse stakeholders including users and customers themselves. To paraphrase one participant in the workshop, when they look at a vendor, they ask:</p><ul><li>Are they existing or new?</li><li>Do they understand the specific healthcare context or are they general purpose?</li><li>What governance and other compliance controls are in place?</li></ul><p>What gives me great confidence is that our governance strategy at League aligns well with the best practices discussed at the conference. For example:</p><ul><li>Rather than building a separate, siloed program, we have strategically chosen to integrate and expand our existing privacy and risk management program aligned with HITRUST requirements to encompass AI governance as well. Basically, we have focused less on the “how” and more on the “what” of AI governance and trust.</li><li>A common phrase I heard was “follow NIST”. By implementing the <a href="https://nvlpubs.nist.gov/nistpubs/ai/nist.ai.100-1.pdf">NIST AI RMF 1.0 framework</a>, we are not just meeting a standard; we are providing our customers and partners with a credible and defensible foundation for responsible AI innovation. Our early adoption of this framework puts us in a strong competitive position.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qu2iDx2mcnbxOz8SMedEmQ.png" /><figcaption>Photo of the panel at the AI Governance in Healthcare Workshop, September 2025.</figcaption></figure><p>I observed that the most popular conference sessions focused on practical, technical content like red teaming, <a href="https://www.nist.gov/ai-test-evaluation-validation-and-verification-tevv">TEVV</a>, and building compliance into the agentic product design itself. Therefore, a structured approach to software design and development, along with the technical talent, experience, and cross-functional software development expertise to relentlessly identify and adopt leading edge tools, standards, and techniques in this rapidly evolving area, is essential.</p><p>For current and potential customers, the conference highlighted a cautious willingness to explore AI. They want assurance that even small-scale pilots will have appropriate controls, clear KPIs, and operational impacts to be considered to inform a “go/no-go” decision for full launch. This is exactly the kind of hands-on, transparent, risk-based partnership we at League are prepared to offer.</p><p>Many organizations today are struggling with similar challenges like “<a href="https://www.cisco.com/site/us/en/learn/topics/security/what-is-shadow-it.html">shadow IT</a>” and a plethora of new, inexperienced vendor entrants offering “too good to be true” promises (including, in some cases, model developers themselves).</p><p>At League, we’ve taken a proactive, integrated, transparent, and NIST-based approach to AI governance, and our over 10 years in the healthcare industry developing and operating an AI-powered platform allows us to move with confidence. We are responsibly building and deploying <a href="https://league.com/ai-leadership/">the next generation of AI-powered healthcare experiences</a> for our customers.</p><p><a href="https://www.linkedin.com/in/leoespindle/"><strong><em>Follow me on LinkedIn</em></strong></a><strong><em> for other great insights from the world of compliance and AI in healthcare</em></strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfc442906448" width="1" height="1" alt=""><hr><p><a href="https://medium.com/inside-league/the-future-of-ai-governance-in-healthcare-is-here-dfc442906448">The Future of AI Governance in Healthcare is Here</a> was originally published in <a href="https://medium.com/inside-league">Inside League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Interview Catfishes: Reflections on AI from a Data Hiring Manager]]></title>
            <link>https://medium.com/inside-league/interview-catfishes-reflections-on-ai-from-a-data-hiring-manager-5ad5eef93e95?source=rss----def796f8d2dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/5ad5eef93e95</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[hiring]]></category>
            <dc:creator><![CDATA[Emilie Corcoran]]></dc:creator>
            <pubDate>Tue, 22 Apr 2025 14:53:46 GMT</pubDate>
            <atom:updated>2025-04-23T13:00:12.777Z</atom:updated>
            <content:encoded><![CDATA[<p>We’re living in exciting times with AI tools at our fingertips. Whether I’m meal planning, searching for an error in my code, organizing a vacation, summarizing meetings and threads, or trying to remember that catchy song, AI has disrupted the way I operate in all parts of my life. At League, it’s so exciting to be building AI-driven features, and I believe that AI is crucial to how we advance technology. <strong>As a data leader, I truly agree with the saying that if we aren’t using AI, we are falling behind.</strong></p><h3>There’s always a but…</h3><p>Now comes the dreaded “but”: while the benefits of AI are fantastic from a productivity and innovation perspective, this post is about the downsides of over-reliance on AI, specifically in the context of job interviews if a candidate uses it dishonestly.</p><p>My new major <em>ick</em> is dishonest use of AI interview assistance, where candidates read their answers off a screen teleprompter style, generated by an AI service that listens for your questions in real-time. In the past three months with over 50 interviews, about 20% of our candidates were immediately disqualified due to obvious AI assistant usage. While I encourage using AI in your job search, my goal is to find balance between “a helpful tool” versus something that misrepresents your skillset and doesn’t leave room for an authentic conversation.</p><p><strong>It’s the modern day catfish and it sets everyone involved up for failure.</strong> For candidates, it’s hurting their chances, and for hiring managers, it’s a headache to navigate and avoid. Of course this excludes aids necessary for accessibility purposes, such as speech-to-text or closed captioning.</p><p>Picture this: I’ve got a great candidate on paper, exactly what we asked for in the posting and more. Excellent.<br>They join the interview and start off by reading a scripted introduction of themselves.<br>I politely explain that this is an informal interview and that while I appreciate their prep ahead of time, ask that they please try not read directly from a script.<br>They shrug and continue reading<em>. </em>Cue vague answers to direct questions, with inconsistent, contradicting statements that they can’t elaborate on.<br>Cue glazed over eyes, emotionless reading (it’s obvious even if you think it’s not), and in worse cases sometimes tripping up while reading their sentence.<br>They stall while their prompter is catching up.</p><p>I’ll remind them again to please keep it informal and not read their answers word for word, only for them to deny, in a completely different tone than their previous robotic reading.</p><p>The interview is cold, impersonal, and I leave the interview disappointed not to have gotten to know the candidate. Next!</p><h3>Why Everyone Loses</h3><p>Recognizing that there is a power dynamic here and that the job market is especially tough these days, I needed to dig deeper into <em>why </em>this type of catfishing irked me so much (I’m a Data Engineer — I need more information!) and I started to think back to the hierarchy of skillsets for any role I’d hire. In order of importance, they are:</p><ol><li><strong>Trust:</strong> Honesty and trustworthiness are essential for remote work and a positive team dynamic, regardless if the role is technical or not.</li><li><strong>Communication Skills: </strong>Effective oral and written communication is crucial for understanding instructions, articulating thoughts, and collaborating within a team.</li><li><strong>Technical Savviness &amp; Willingness to Learn: </strong>Adaptability and the ability to learn new skills are valued over expertise in specific technologies. Ironically, the ability to make good use of AI tooling falls into this category, and I love to hear about how candidates leverage it!</li><li><strong>Specific Skillset: </strong>While relevant specific skills and experience are beneficial, they are not always the most critical factor for success, given how rapidly technology changes anyways.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*SdbSZQtRmaAk1xmqo8pO0g.png" /></figure><p>So, what happens when someone’s over-relying on an AI assistant after being asked not to in an interview? Right off the bat, there goes honesty/trust (1). If a candidate needs to rely on reading their answers without any room for real discussion, it would indicate subpar communication skills (2). Since I can’t trust their answers, their technical savviness (3) and skillset (4) are out the window as well. The candidate will not pass the interview, and everyone leaves disappointed.</p><p>Let’s think about this from an odds perspective. Say Sue knows SQL really well but uses another type of batch data processing software than we do (Airflow). And she’s heard of infrastructure as code software (Terraform), but she’s not that familiar with it beyond high-level theoretical knowledge. We’d have a couple possible scenarios:</p><ul><li>If she’s honest about her skillset, maybe she’d get an intermediate role with mentorship and space to grow in the gaps we’ve identified (Airflow, Terraform).</li><li>If Sue uses an AI assistant to read off of, she would most likely be disqualified. But in the rare possibility that she did so without any detection, her skillset would be misrepresented. She’d get the role but be given responsibilities based on skills that she doesn’t have (Airflow, Terraform), and she would likely not pass her first 3 month probationary period.</li></ul><p>In all of the above, the only positive outcome is a result of both parties showing up as their authentic selves, even if that risks for the candidate missing out on the job. They’d be better off with a “soft no” due to missing skills than a “hard no” due to cheating, or a dismissal a few weeks into the job. With a soft no due to missing skills, a candidate can leave the interview knowing what areas they need to grow, but with the AI assistant muddling the reality, candidates aren’t learning anything.</p><h3>Ways to Fix This</h3><p>So, what do we do about this problem? We need to remind ourselves that we are human above all else. In a sea of prompt-reading candidates, talking to an authentic person feels like a breath of fresh air, and I find myself valuing the imperfections of general back and forth conversations. In those cases, I leave an interview with a good idea of what a real technical discussion would be like between peers and as a result I have much more confidence in my perception of the candidate. Due to the high use of dishonest AI assistance I’ve experienced, I have actually adjusted my own expectations for candidates by focusing on behavioral priorities such as communication, trust, willingness to learn, and transferable skills. Here’s what I recommend:</p><p><strong>What interviewers should do:</strong></p><ul><li>Ask the candidate if there are any accessibility needs at the start of the interview, and accommodate them as needed.</li><li>Let your candidates know that you value authenticity and transferable skills over scripted perfection. Ask them not to rely on AI assistants directly!</li><li>Focus on communication skills — can a candidate clearly and directly answer a question you’ve asked?</li><li>Learn to detect AI assistants (ask direct questions, ask for examples).</li><li>Stop the emphasis on a perfect resume / conversation and focus on transferable and soft skills instead.</li></ul><p><strong>What job seekers should do:</strong></p><ul><li>Continue to use tools to cater your resume, cover letter, etc. as long as it remains truthful.</li><li>Practice for interviews! Whether with a friend, or with an AI tool, mock interviews are a great idea.</li><li>It’s ok to have notes in your interview, and kudos for being prepared! Just be ready for an unscripted conversation.</li><li>If you are comfortable, disclose with your interviewer if you are using accessibility tools.</li><li>Be your authentic self in your interview! Someone who uses AI to read a scripted answer will be disqualified immediately and barred from other roles. Not to be confused with the use of AI in general, which we completely encourage.</li></ul><p>In conclusion, AI is awesome for productivity and innovation. I’ve used it to edit this very post, including shortening some wordy sentences and spellchecking along the way. However, the negatives outweigh the positives when it comes to tooling during job interviews when used dishonestly, especially if it results in a candidate reading their full answers off a screen. I’d much prefer to have an authentic conversation with a candidate, and I welcome sharing tips on productive ways to use AI.</p><p>A genuine, imperfect candidate will leave a much stronger impression and will result in a greater rate of success down the road, fostering an honest, vulnerable, and mutually beneficial relationship. Companies are hiring a person, not perfection, and the sooner both sides of an interview value that, the better.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ad5eef93e95" width="1" height="1" alt=""><hr><p><a href="https://medium.com/inside-league/interview-catfishes-reflections-on-ai-from-a-data-hiring-manager-5ad5eef93e95">Interview Catfishes: Reflections on AI from a Data Hiring Manager</a> was originally published in <a href="https://medium.com/inside-league">Inside League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 Tips for New Engineering Managers]]></title>
            <link>https://medium.com/inside-league/3-tips-for-new-engineering-managers-4744de925fe9?source=rss----def796f8d2dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/4744de925fe9</guid>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[lessons-learned]]></category>
            <dc:creator><![CDATA[Frances Karulas]]></dc:creator>
            <pubDate>Mon, 31 Mar 2025 21:43:41 GMT</pubDate>
            <atom:updated>2025-04-01T14:03:32.176Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EssikSiL3G79nixrhqwIRA.jpeg" /><figcaption><em>Photo by </em><a href="https://unsplash.com/@brookecagle"><em>Brooke Cagle</em></a></figcaption></figure><p>It took me quite a while to finally decide to make the jump from software development to managing a team. Honestly, <em>years</em>. I reminisced about that time while re-reading my <a href="https://medium.com/inside-league/exploring-career-paths-at-league-b751fed6b6dc">previous blog post</a>, wishing I could whisper to my old self, “<em>don’t worry, it’s going to be ok, you’re going to love it!</em>”.</p><p>It turns out engineering leadership has been a bit of a sweet spot for me — all the familiar technical problem solving that I enjoy, with the added emphasis on people and helping folks grow in their careers.</p><p>It’s been almost three years since those early days and in that time I’ve managed three different teams, all supporting different parts of League’s platform.</p><p>These distinct experiences have taught me a lot about the skills it takes to be an effective engineering manager (EM) and, more importantly, how to leverage my own specific strengths to ensure I can be successful in this role. Reflecting on these experiences, I’ve compiled a list of some lessons I thought were important take-aways for anyone else who might be new to management.</p><ol><li><strong>Find ways to navigate different working styles</strong>.</li></ol><p>This lesson has applied in a few different ways in my EM adventures; not all of your coworkers, whether on your team or on the teams that you collaborate with, are going to be folks that you naturally mesh with. Your communication style, working habits or collaboration preferences aren’t always going to be aligned and some interactions are just going to be more difficult.</p><p>I’m not going to lie to you, it can be really tough at times, but you have to find creative ways to work with everyone. This might mean focusing on the common ground in your approaches or seeking clarification more often to ensure you’re on the same page ( you’ll figure out what works best in different scenarios) but know that everyone experiences this. And while this lesson can be applied broadly to most jobs, it is especially important when managing a team since the way you tackle this problem can have an immense impact on those that report to you and also on how your team is able to collaborate with the broader engineering organization.</p><p><strong>2. Leverage your own unique strengths</strong>.</p><p>During the course of my career I’ve had the opportunity to interact with and watch many leaders in action, both as my own managers, but also leaders of other teams. I’ve also had quite a few women manage me throughout the years (especially here at League) and that’s been a huge help in having a blueprint for how I want to manage my own teams.</p><p>I’ve incorporated the things I’ve admired and tried not to make the same mistakes (while making plenty of my own new ones). One realization I made pretty early on was that it’s tough to stick to behaviours that just don’t fit (even if they work for others); it’s better to incorporate the positive attributes that suit your own personal style and to plot your own course for the other responsibilities. Being yourself and playing to your own nature is ultimately going to serve you best.</p><p><strong>3. Build your village.</strong></p><p>One of the most unexpected gifts that has come out of the past few years of my professional life has been the wonderful group of women I’ve become close with. I’ve been fortunate to have had the opportunity to learn from many extraordinary women at League in my years here. And even as our paths have diverged work-wise, we’ve maintained the close friendships and the support circles. We don’t all work at the same place anymore, but we lean on each other to talk through problems we’re having at work (and in life!) and to learn from each others’ experiences.</p><p>The immense benefit and joy that comes from such a group cannot be overstated. Whatever happens at your workplace, be sure to hang onto those friendships that you build along the way; the projects will come and go, but the support and camaraderie will last a lifetime if you nurture it.</p><p>There have, of course, been many, many more learnings, but these are some of the things that have really stuck out. Reading through this list it occurs to me that they’re also pretty decent tips on how to deal with everyday human interactions as well. Go figure!</p><p>So that’s my list. As you’ve read through it, maybe it’s made you think of important lessons that you’ve learned on your professional (or personal) journey as well or made you think about how you might like to manage a team? If it has, and you feel so inclined, I’d love to hear about them in the comments. As I’ve learned from my village, there’s nothing quite like learning from each other.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4744de925fe9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/inside-league/3-tips-for-new-engineering-managers-4744de925fe9">3 Tips for New Engineering Managers</a> was originally published in <a href="https://medium.com/inside-league">Inside League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Simple Do’s and Don’ts: Jetpack Compose Accessibility Guide]]></title>
            <link>https://medium.com/inside-league/5-simple-dos-and-don-ts-jetpack-compose-accessibility-guide-daab0346550b?source=rss----def796f8d2dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/daab0346550b</guid>
            <category><![CDATA[jetpack-compose]]></category>
            <category><![CDATA[wcag]]></category>
            <category><![CDATA[native-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[accessibility]]></category>
            <dc:creator><![CDATA[Stefan Kramreither]]></dc:creator>
            <pubDate>Wed, 12 Mar 2025 10:07:19 GMT</pubDate>
            <atom:updated>2025-03-12T10:07:19.451Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VqdGYwffMxbWJvmOwmdHFg.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/photo/person-holding-white-smartphone-141362/">kote baeza</a></figcaption></figure><p>Let’s talk about accessibility in Jetpack Compose, a modern and declarative framework for building native Android UI. It’s not just a “nice to have” anymore, it’s a <strong>necessity</strong>. Building apps that everyone can use, regardless of their abilities, is not just ethically sound, it’s also good business. Accessibility legislation is becoming more and more prevalent. The possibility that you must build an accessible experience or potentially face legal consequences is something businesses can not ignore.</p><p>As a senior Android engineer at League, and an accessibility champion for our entire Android group, I’ve seen firsthand the impact of prioritizing accessibility. My role involves ensuring our code is accessible, organizing and reviewing audits, and providing support to the team. My experience leading audits has directly informed the simple fixes I’ll discuss in this guide. These fixes can dramatically reduce the number of accessibility issues found during audits, saving significant time and resources.</p><p>Now, you might be thinking, “Accessibility? Sounds complicated.” But with Jetpack Compose, it’s surprisingly straightforward. Compose’s declarative nature and <a href="https://developer.android.com/develop/ui/compose/accessibility/semantics">semantics framework</a> makes it easier to build accessible UIs compared to the traditional Android XML layouts. However, there are certain “gotchas” and bad defaults that you need to watch out for that can easily be remedied to ensure what you are building has the best chance of being <strong>accessible by default</strong>.</p><h4>Web Content Accessibility Guidelines (WCAG)</h4><p>All of the examples in this article reference the WCAG when outlining why something is inaccessible. <a href="https://www.w3.org/TR/WCAG22/">WCAG is a standard</a> that accessibility legislation uses when determining how accessible an application is. Because native mobile does not have an equivalent, we need to apply the same rules that are used on web. In the vast majority of cases, the rules are easily transferable allowing all platforms to follow the same standard.</p><h3>Roles</h3><p>A role is a way for a developer to provide semantic meaning to UI elements. Roles are announced by assistive technology to let users know what kind of UI element they are interacting with. <a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/Role#summary">Learn more about the available roles </a>Jetpack Compose supports.</p><h4><strong>What to do ✅</strong></h4><p>Whenever the clickable , selectable , or toggleable modifiers are used, the role parameter should be set to a non-null role.</p><pre>@Composable<br>fun MyScreen() {<br>    Box(<br>        modifier = Modifier<br>            .clickable(role = Role.Button) {} // Use Role.Button<br>    ) {}<br><br>    Box(<br>        modifier = Modifier<br>            .selectable(role = Role.RadioButton) {} // Use Role.RadioButton<br>    ) {}<br><br>    Box(<br>        modifier = Modifier<br>            .togglable(role = Role.Checkbox) {} // Use Role.Checkbox<br>    ) {}<br>}</pre><h4>What not to do ❌</h4><p>Using clickable , selectable , or toggleable modifiers without a role is inaccessible.</p><pre>@Composable<br>fun MyScreen() {<br>    Box(<br>        modifier = Modifier.clickable {} // No role set<br>    ) {}<br><br>    Box(<br>        modifier = Modifier.selectable {} // No role set<br>    ) {}<br><br>    Box(<br>        modifier = Modifier.togglable {} // No role set<br>    ) {}<br>}</pre><h4>Why is this important?</h4><p>The WCAG has the following success criterion:</p><blockquote><strong>Success Criterion 4.1.2 Name, Role, Value — Level A</strong><br>For all <a href="https://www.w3.org/TR/WCAG21/#dfn-user-interface-components">user interface components</a> (including but not limited to: form elements, links and components generated by scripts), the <a href="https://www.w3.org/TR/WCAG21/#dfn-name">name</a> and <a href="https://www.w3.org/TR/WCAG21/#dfn-role">role</a> can be <a href="https://www.w3.org/TR/WCAG21/#dfn-programmatically-determinable">programmatically determined</a>; states, properties, and values that can be set by the user can be <a href="https://www.w3.org/TR/WCAG21/#dfn-programmatically-set">programmatically set</a>; and notification of changes to these items is available to <a href="https://www.w3.org/TR/WCAG21/#dfn-user-agents">user agents</a>, including <a href="https://www.w3.org/TR/WCAG21/#dfn-assistive-technologies">assistive technologies</a>.</blockquote><p>It states that all UI elements <strong>must</strong> have a programmatically set <strong>role</strong>. Without a role set, the UI element is <strong>inaccessible</strong>. This is important for users using assistive technology (i.e. screen readers) so that they are aware of the type of control they are interacting with. Knowing that something is a checkbox provides much more context compared to a generic clickable component.</p><h3>Labels &amp; Descriptions</h3><p>A form field label is text that describes the purpose of a form field. A form field description is text that describes how to fill in a form field (i.e. a hint, validation information). All form field labels and descriptions <strong>must </strong>be associated with the form field it describes.</p><h4>What to do ✅</h4><p>All form field components should set their contentDescription to the associated label and/or description text.</p><pre>@Composable<br>fun MyCustomTextField() {<br>    Column {<br>        Row(horizontalArrangement = Arrangement.SpaceBetween) {<br>            Text(&quot;Email&quot;)<br>            Text(&quot;(ex: me@example.com)&quot;)<br>        }<br><br>        BasicTextField(    <br>            modifier = Modifier.semantics {<br>                // Set content description to label and description text<br>                contentDescription = &quot;Email, (ex: me@example.com)&quot;<br>            }<br>        )<br>    }<br>}</pre><h4>What not to do ❌</h4><p>A form field with label and/or description text that is only visually associated with it (and not programmatically), is inaccessible.</p><pre>@Composable<br>fun MyCustomTextField() {<br>    Column {<br>        Row(horizontalArrangement = Arrangement.SpaceBetween) {<br>            Text(&quot;Email&quot;)<br>            Text(&quot;(ex: me@example.com)&quot;)<br>        }<br><br>        // Text field has no label<br>        BasicTextField()<br>    }<br>}</pre><h4>Why is this important?</h4><p>The WCAG has the following success criterion:</p><blockquote><strong>Success Criterion 1.3.1 Info and Relationships — Level A</strong><br>Information, <a href="https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships#dfn-structure">structure</a>, and <a href="https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships#dfn-relationships">relationships</a> conveyed through <a href="https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships#dfn-presentation">presentation</a> can be <a href="https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships#dfn-programmatically-determined">programmatically determined</a> or are available in text.</blockquote><p>This states that relationships between UI elements must be programmatically determined (i.e. in code). The label and descriptions of a text field must be associated with the field in our code. Unfortunately, unlike in XML layouts where we have android:labelFor=&quot;...&quot; , we are unable to associate two separate composables in this way requiring us to repeat the text in the content description.</p><p>A user using a screen reader will often jump between the different form fields on a page to quickly fill in a form. If the form field does not announce all relevant information that is visually associated with it, a user will find it difficult if not impossible to complete the form.</p><h3>Collection Info &amp; Collection Item Info</h3><p><a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/CollectionInfo">Collection semantics</a> are special properties we can apply to a composable and its children to indicate that the layout is a <strong>list</strong>. This allows users who are using assistive technology to know that they have entered a list of content, which item they are currently on, and how many items are in the list.</p><h4>What to do ✅</h4><p>The parent layout that surrounds the list should set collectionInfo semantics while each list item should set collectionItemInfo semantics.</p><pre>@Composable<br>fun MyCustomList() {<br>    Text(&quot;Favourite Fruits&quot;)<br><br>    Column(<br>        // Setting colleciton info on parent<br>        modifier = Modifier.semantics {<br>            collectionInfo = CollectionInfo(rowCount = 3, columnCount = 1)<br>        }<br>    ) {<br>        // Setting collection item info on each child<br>        Text(<br>            modifier = Modifier.semantics {<br>                collectionItemInfo = CollectionItemInfo(rowIndex = 0, rowSpan = 1, columnIndex = 0, columnSpan = 1)<br>            },<br>            text = &quot;Apple&quot;<br>        )<br>        Text(<br>            modifier = Modifier.semantics {<br>                collectionItemInfo = CollectionItemInfo(rowIndex = 1, rowSpan = 1, columnIndex = 0, columnSpan = 1)<br>            },<br>            text = &quot;Pear&quot;<br>        )<br>        Text(<br>            modifier = Modifier.semantics {<br>                collectionItemInfo = CollectionItemInfo(rowIndex = 2, rowSpan = 1, columnIndex = 0, columnSpan = 1)<br>            },<br>            text = &quot;Banana&quot;<br>        )<br>    }<br>}</pre><p><strong>Sidenote</strong>: Using LazyColumn or LazyRow will only let users of assistive technology know that they’ve entered a list, and <strong>will not </strong>convey which item the user is currently on nor the total items in the list. If you are using a lazy layout to display a list, consider using collection semantics to ensure it is accessible.</p><h4>What not to do ❌</h4><p>Not using collectionInfo and collectionItemInfo means the list of content is inaccessible.</p><pre>@Composable<br>fun MyCustomList() {<br>    Text(&quot;Favourite Fruits&quot;)<br>    Column {<br>        Text(&quot;Apple&quot;)<br>        Text(&quot;Pear&quot;)<br>        Text(&quot;Banana&quot;)<br>    }<br>}</pre><h4>Why is this important?</h4><p>Just like Labels &amp; Descriptions, Success Criterion 1.3.1 applies here:</p><blockquote><strong>Success Criterion 1.3.1 Info and Relationships — Level A</strong><br>Information, <a href="https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships#dfn-structure">structure</a>, and <a href="https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships#dfn-relationships">relationships</a> conveyed through <a href="https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships#dfn-presentation">presentation</a> can be <a href="https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships#dfn-programmatically-determined">programmatically determined</a> or are available in text.</blockquote><p>Because we are visually presenting content in a list, we must convey this information programmatically using semantics. Users using assistive technology will gain more context about the type of content presented to them when collection semantics are set.</p><h3>Headings</h3><p>A heading is text that visually separates sections of content on a page. A general best practice is for every page to have at least one heading. In Compose, we can indicate that text is a heading by applying heading semantics.</p><h4>What to do ✅</h4><p>Text that is visually presented as a heading should set heading semantics.</p><pre>@Composable<br>fun MyScreen() {<br>    Column {<br>        Text(<br>            // Setting heading semantics on heading text<br>            modifier = Modifier.semantics { heading() },<br>            style = MaterialTheme.typography.headlineLarge,<br>            text = &quot;Welcome&quot;<br>        )<br><br>        Text(&quot;This is a custom screen with a valid heading.&quot;)<br>    }<br>}</pre><h4>What not to do ❌</h4><p>Using Text to display a heading without setting heading semantics is inaccessible.</p><pre>@Composable<br>fun MyScreen() {<br>    Column {<br>        // Assistive technology will not announce this as a heading<br>        Text(<br>            style = MaterialTheme.typography.headlineLarge,<br>            text = &quot;Welcome&quot;<br>        )<br><br>        Text(&quot;This is a custom screen with no semantic heading.&quot;)<br>    }<br>}</pre><h4>Why is this important?</h4><p>Just like in Collection Info &amp; Collection Item Info and Labels &amp; Descriptions, Success Criterion 1.3.1 applies here:</p><blockquote><strong>Success Criterion 1.3.1 Info and Relationships — Level A</strong><br>Information, <a href="https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships#dfn-structure">structure</a>, and <a href="https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships#dfn-relationships">relationships</a> conveyed through <a href="https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships#dfn-presentation">presentation</a> can be <a href="https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships#dfn-programmatically-determined">programmatically determined</a> or are available in text.</blockquote><p>Because we are visually presenting content as a heading, we must convey this information programmatically using semantics.</p><p>As an example, A user who is blind and uses a screen reader to navigate an app, will often jump between headings to navigate to the part of the screen they are most interested in. Not using heading semantics will prevent users from being able to do this.</p><h3>Live Region</h3><p>A live region is a semantic property that can be applied to any UI element to indicate that the content inside of it may change — and that any changes should be automatically announced by assistive technology. A common use case is to announce when a loading indicator is displayed so that the user knows content on the page will change.</p><p>Unfortunately, live regions in Jetpack Compose seem to be buggy and often don’t work as expected. I recommend manually announcing changes via AccessibilityManager .</p><h4>What to do ✅</h4><p>When there are status updates on a page (i.e. content is loading), the app must announce the status updates to users using assistive technology.</p><pre>fun Context.announceForAccessibility(message: String) {<br>    val a11yManager = applicationContext.getSystemService(Context.ACCESSIBILITY_SERVICE) as AccessibilityManager<br><br>    if (a11yManager.isEnabled) {<br>        val event = if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.R) {<br>            AccessibilityEvent(AccessibilityEvent.TYPE_ANNOUNCEMENT)<br>        } else {<br>            AccessibilityEvent.obtain(AccessibilityEvent.TYPE_ANNOUNCEMENT)<br>        }.also {<br>            it.packageName = this.packageName<br>            it.text.add(message)<br>        }<br><br>        a11yManager.sendAccessibilityEvent(event)<br>    }<br>}<br><br>@Composable<br>fun MyScreen(isLoading: Boolean) {<br>    val context = LocalContext.current<br><br>    LaunchedEffect(context, isLoading) {<br>        if (isLoading) {<br>            context.announceForAccessibility(&quot;Loading&quot;)<br>        }<br>    }<br><br>    if (isLoading) {<br>        CircularProgressIndicator()<br>    } else {<br>        Text(&quot;Content&quot;)<br>    }<br>}</pre><h4>What not to do ❌</h4><p>Status updates that are not announced to users using assistive technology is not accessible.</p><pre>@Composable<br>fun MyScreen(isLoading: Boolean) {<br>    if (isLoading) {<br>        CircularProgressIndicator()<br>    } else {<br>        Text(&quot;Content&quot;)<br>    }<br>}</pre><h4>Why is this important?</h4><p>The WCAG has the following success criterion:</p><blockquote><strong>Success Criterion 4.1.3 Status Messages — Level AA</strong><br>In content implemented using markup languages, <a href="https://www.w3.org/TR/WCAG21/#dfn-status-messages">status messages</a> can be <a href="https://www.w3.org/TR/WCAG21/#dfn-programmatically-determinable">programmatically determined</a> through <a href="https://www.w3.org/TR/WCAG21/#dfn-role">role</a> or properties such that they can be presented to the user by <a href="https://www.w3.org/TR/WCAG21/#dfn-assistive-technologies">assistive technologies</a> without receiving focus.</blockquote><p>This states that when there is a status update (i.e. loading indicator display, error state shown), assistive technologies must be notified so that they can announce this information to their users <strong>without the users having to focus on the UI element </strong>that is updating. Users using assistive technology need status updates as they are helpful clues that something is happening on the page that they might not be aware of. Otherwise, users may have a confusing and frustrating experience when they are unaware of content that changes.</p><h3>Closing Thoughts</h3><p>Generally, Jetpack Compose is a step in the right direction for building accessible UIs. The semantics framework is extensive and allows us to set many semantic properties which were cumbersome to previously apply using AccessibilityDelegate in the XML days.</p><p>However, I would like to see the following improvements made which would make a massive difference in ensuring that we are building experiences that are accessible by default:</p><ol><li>Making the role property required for clickable , selectable , and togglable modifiers (or at least have it default to a non-null role).</li><li>Allow form field composables to be labelled or described by a separate composable using IDs (similar to android:labelFor )</li><li>Provide an easier way to create semantic lists via dedicated composable layouts or less verbose semantics.</li><li>Provide an easier way to create headings via a dedicated composable (i.e. HeadingText in addition to Text )</li><li>Live regions should behave more predictably. If a composable appears on a page with a content description in a live region, it should be announced by assistive technology.</li></ol><p>Lastly, always make sure to test your app with assistive technology (i.e. screen readers, keyboard) to ensure it’s working as expected and is accessible.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=daab0346550b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/inside-league/5-simple-dos-and-don-ts-jetpack-compose-accessibility-guide-daab0346550b">5 Simple Do’s and Don’ts: Jetpack Compose Accessibility Guide</a> was originally published in <a href="https://medium.com/inside-league">Inside League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Segmentation at Scale to Enable Better Health Outcomes]]></title>
            <link>https://medium.com/inside-league/segmentation-at-scale-to-enable-better-health-outcomes-e2f4f7fe7fa6?source=rss----def796f8d2dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/e2f4f7fe7fa6</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[engagement]]></category>
            <category><![CDATA[segmentation]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Henrik Kowalkowski]]></dc:creator>
            <pubDate>Mon, 13 Mar 2023 16:03:42 GMT</pubDate>
            <atom:updated>2023-03-13T22:10:27.563Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IMiTU6AuFungE3ByWRqs5A.png" /><figcaption>An illustrative example of the segmentation of a member’s journey</figcaption></figure><h3>Motivation</h3><p>At League it is our <a href="https://league.com/about/">mission</a> to empower people to live happier, healthier lives. In order to best serve our members it is imperative that we are able to predict their individual level of engagement. For example, if we notice a segment of members is unlikely to return to the app in the next week we can send them notifications to nudge them to return. In doing so we can help promote healthy habits like being active and eating well. We call our engagement prediction and segmentation service “Retention Engine”.</p><p>So how does all of this work?</p><h3>TLDR; the Model and Segmentation Logic</h3><p>We use a <a href="https://lifetimes.readthedocs.io/en/latest/Quickstart.html">Recency, Frequency, Monetary Value</a> (RFM) style model in conjunction with a <a href="https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html">Logistic Regression</a> classifier to calculate the probability a member will return in a given week. (For our purposes we are only interested in the engagement components of the model so we omit the monetary value feature). We break these probabilities into segments using business logic to determine the segment a member is predicted to belong to in a given week. After these probability cutoffs are applied, we group members into four model based segments: unengaged, atrisk, engaged, and loyal. In the next week unengaged members are very unlikely to return to the platform, whereas atrisk members require immediate action to retain. The engaged and loyal members have a high predicted probability of returning. We segment the remaining unclassified members using simple rules based logic.</p><h3>Technical Considerations</h3><p><strong>Tech Stack</strong></p><p>League is a <a href="https://league.com/resource/transforming-healthcare-experiences-with-google-cloud/">strategic partner</a> of Google Cloud (GCP). For this project we wanted to leverage a variety of services that GCP provides:</p><ul><li>Structured data is managed with BigQuery which provides low latency big data processing at scale.</li><li>Python functions are executed using Cloud Run.</li><li>Models are saved and loaded from Cloud Storage on a weekly basis.</li><li>Artifact Registry is used to manage image versions.</li><li>Processes are scheduled using Cloud Composer.</li><li>Looker is used to visualize segment counts day to day.</li><li>Salesforce Marketing Cloud is linked to BigQuery to customize messaging to the individual member.</li><li>Finally, as League is a FHIR native healthcare company, we write the results to Cloud Healthcare API as <a href="https://www.hl7.org/fhir/observation.html">FHIR Observations</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*-A29wqGF1RMG8ylP9VNWiQ.png" /></figure><p><strong>Data Granularity and Period</strong></p><p>The granularity of the data plays a large role in the performance and complexity of a model. To simplify the inputs for those consuming the results downstream, we use weekly engagement data. If the member logged in within a given week then they receive a value of 1, if not then 0. The outputs of the RFM model, recency, frequency, and t (time since the member entered the data window) are also of interest for further segmentation.</p><p>Another consideration is the length of data to make predictions with, also known as the data window. This period is set using business context and performance requirements. From a performance perspective, the data window can be considered a <a href="https://en.wikipedia.org/wiki/Hyperparameter_(machine_learning)">hyperparameter</a> and is relatively easy to select for. From the business perspective it is the stakeholders, the downstream users of the segments and associated outputs, that need to be consulted to ensure that the window makes sense. For example, we may work with a client whose member base experiences high churn so a longer data window may not be suitable for messaging.</p><p><strong>Performance Evaluation</strong></p><p>Transparent performance evaluation is key to getting stakeholders to buy into the results of a model. This can be accomplished by considering the baseline performance context in which the downstream consumers of the model previously had to operate. If the retention model can beat out comparator baselines, it becomes clear to stakeholders that they can trust the results and apply them on a machine to machine basis at scale.</p><p>For our segmentation model we compare its performance to that of two separate baselines. The first baseline (Majority Classifier) is the most naive as it assumes that the majority action of members from the last week will be the action all members take in the next week. So if most members logged in within the last week, it will predict all members will log in within the next week. The second baseline is more tailored (Last Label Classifier). In this case it predicts on a member basis that last week’s action is the action the member will take in the next week.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qwVi1wXKMgfFkMi_DdzUXQ.png" /></figure><p>For the area under the <a href="https://en.wikipedia.org/wiki/Receiver_operating_characteristic">receiver operating characteristic curve</a> (ROC AUC) a higher score is better and the score ranges [0, 1]. Since the Majority Classifier is a no skill classifier that predicts the same value for all members, it receives a score of 0.5 each week. Comparatively, the performance of the Last Label Classifier is greater as it is personalized to the member level. The Retention Engine performs the best, using the RFM and Logistic Regression combination. Knowing a member’s previous engagement is quite indicative of their subsequent engagement as the performance curves for Retention Engine and the Last Label Classifier curves mirror each other.</p><p><strong>Obstacles</strong></p><p>During development we encountered a couple of challenges that ultimately improved the results of our model. In previous iterations we had tightly constrained the data window. This had the benefit of restricting our predictions to members that our capability teams thought would be most actionable. However, the constrained window resulted in convergence errors as our model had too few different data points to fit with.</p><p>Increasing the length of the data window ameliorated this issue but resulted in the model predicting on more members than we might actually wish to take action on. Working with our marketing team we were able to create a fourth segment, unengaged, that could be classified but restricted from messaging. This also reduced the amount of data that we needed to write to Cloud Healthcare API, improving our write times which had been considerable. With these tweaks we were able to increase the performance/efficiency of the model/process without compromising its business application. In the figure below we provide an example of what a member journey might look like through Retention Engine:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IMiTU6AuFungE3ByWRqs5A.png" /></figure><p>The member begins their journey on day 1 and is active for the first 2 days (black stars). They are labeled as new for the first 2 weeks. After 2 weeks the model has enough data to make a prediction and classifies them as atrisk as the member only logged in within the first week of the period (during the first 2 days). In the week they are classified as atrisk the member does not log in so in the following week they are classified as unengaged. After 3 weeks as unengaged and without logins, the member falls out of the model and is marked dormant. After 90 days without login the member moves from dormant to lapsed. On the 99th day the member returns and is marked reactivated. In the following week the member is picked back up by the model and classified as atrisk. Over the next several weeks the member continues to log back in and moves from engaged to loyal.</p><h3>Conclusion</h3><p>Building this service took input from Data Scientists, Analysts, Engineers, Marketing, and Clients. This holistic approach allowed us to overcome several obstacles and produce a performant model to better understand our members. Our Retention Engine is just one of the exciting ways we are working to drive healthier outcomes as our platform grows!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2f4f7fe7fa6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/inside-league/segmentation-at-scale-to-enable-better-health-outcomes-e2f4f7fe7fa6">Segmentation at Scale to Enable Better Health Outcomes</a> was originally published in <a href="https://medium.com/inside-league">Inside League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How becoming a pilot made me a better engineer]]></title>
            <link>https://medium.com/inside-league/how-becoming-a-pilot-made-me-a-better-engineer-a7c208c90395?source=rss----def796f8d2dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/a7c208c90395</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Maciej Kozlowski]]></dc:creator>
            <pubDate>Tue, 11 Oct 2022 15:30:16 GMT</pubDate>
            <atom:updated>2022-10-11T15:30:16.199Z</atom:updated>
            <content:encoded><![CDATA[<p>A retrospective of a data migration at League</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*5OekfU-8vcFCvyFX" /><figcaption>Photo by <a href="https://unsplash.com/@cleipelt">Chris Leipelt</a> on <a href="https://unsplash.com/photos/4UgUpo3YdKk">Unsplash</a></figcaption></figure><p>Flying is often touted as the safest method of transportation. Many small planes that we continue to use for general aviation are over 50 years old. When I decided to pursue my childhood dream of being a pilot a few years ago, I didn’t expect to learn the reasons behind these statements. I certainly never thought I would be able to apply this new knowledge to software.</p><p>A few weeks ago, our team at League successfully migrated a dataset between two stores hosted using Google’s Cloud Healthcare service. The migration required five hours of down time, during which, some of our features weren’t usable. We needed to stop several of our services and revoke various permissions in order to prevent any writes that would impact data integrity. When restoring services, we needed to throttle some data ingestion since we had accumulated a small backlog during the five hour time frame. I believe that a large part of why this process went so smoothly was due to key factors that also keep aviation so safe and reliable.</p><h4>Checklists</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IzsZWCtnbVcaIZX8" /><figcaption>A selection from a Cessna 172N checklist [<a href="https://studylib.net/doc/8358537/cessna-172n-normal-checklist-cessna-172n-normal-checklist">source</a>]</figcaption></figure><p>My favorite take away from aviation is the use of checklists. Pilots use checklists for nearly everything that they do; inspecting the plane, starting the engine, preparing for takeoff and landing. A checklist is simply a list of instructions or items to verify. They are such a simple yet immensely useful tool for staying organized, on track and ensuring all actions are carried out. By writing out all the required steps, we can reduce our mental load and focus on one item at a time. In order to ensure that the steps are followed, the <a href="https://www.flightsafetyaustralia.com/2018/01/point-it-call-it-get-it-right/">point and call method</a> can be used to be more mindful of the actions taken. We should of course strive to automate where possible and reasonable, but I would argue that’s just creating a fancy checklist for the computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*oaecmFcXVfiEAkF0" /><figcaption>A pilot verifying the runway by using the point and call method. Credit: <a href="https://code7700.com/pointing_and_calling.htm">Steven Foltz</a></figcaption></figure><p>When planning the migration, we prepared a checklist outlining all the steps that needed to be carried out. After testing with our staging data we were able to include time estimates, which gave us a rough schedule in addition to a checklist. Each item on our checklist included links to the relevant pull requests and resources that made the process even easier. Would it have been possible to automate this process? Certainly! Was it worth doing? Absolutely not! In addition to the time it would have taken to write the script — like any software — it would have also required testing and error handling. Since this was a one time event, it simply wasn’t worth investing the effort. One benefit of automation is that the process becomes less error-prone; however, when following a detailed checklist, the exact same results can be achieved manually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*HOdDR6bDJnZPKqHN" /><figcaption>Part of the checklist used for the data migration</figcaption></figure><p>Beyond this, I also believe that the concept of checklists can be applied to documentation in general. From my experience, most documentation is written in a “here is how this works” style. This is very helpful when it comes to maintaining and developing a product. However, it is equally important to have documentation that tells you “here is how you do things”. Some perfect examples are:</p><ul><li>This is how you deploy a new version or roll back to a previous one</li><li>This is how you troubleshoot</li><li>Here is how you run this script</li></ul><h4>Redundancy</h4><p>In aviation, everything is made and designed with redundancy in mind. Piston engines have two independent magnetos that each power a set of spark plugs. Fuel is stored in two separate fuel tanks. A magnetic compass is required as well as a gyroscopic heading indicator. Redundant and independent systems are highly important because they guarantee that a problem with one part doesn’t lead to overall failure. In software, redundancy is also everywhere; backups, multiple instances and fail-over systems. Pair programming is an example of redundancy that perfectly mirrors the role of two pilots on commercial flights. The “driver” in pair programming is the pilot flying, and the “observer” is the pilot monitoring. Redundancy is also, by definition, how you manage a company’s or project’s bus factor.</p><blockquote>The bus factor is the minimum number of people on a project that can “get hit by a bus” before it puts the project in jeopardy.</blockquote><p><a href="https://medium.com/management-matters/whats-the-bus-factor-of-your-team-and-how-to-increase-it-8bdfb63361fc">What’s the bus factor of your team and how to increase it</a></p><p>During our migration, redundancy also played a major role. We ensured that there were at least two engineers capable of doing the work across all impacted domains. When executing the plan, these engineers were observing and monitoring to confirm that everything was performed properly. Finally, to allow for fast fail-over and rollback to the old data store, we continued to write to the old instance to ensure consistent data accuracy. If, at any point, there were some issues after services were restored, we could simply flip a flag and revert to using the previous store.</p><h4>Emergency planning</h4><p>Over half of the time in my flight training was focused on emergencies and recovery from undesirable circumstances. Practicing steep turns, stalls, spiral dives, spins and slips may seem like acrobatics, but these are all critical lessons that can some day save a pilot’s life. When it comes to software, many companies are often severely underprepared to deal with emergency situations. The <a href="https://www.cbc.ca/news/business/rogers-outage-cell-mobile-wifi-1.6514373">Rogers Communications outage</a> earlier this year prevented 9–1–1 calls and took down the Interac payment service. In 2016, millions of <a href="https://www.theguardian.com/business/2016/jan/05/hsbc-customers-vent-fury-over-online-banking-problems">HSBC customers weren’t able to access online accounts</a>, with service only being restored two days later. Having backups and a disaster recovery plan are a critical first step, but often, the second, equally important step is forgotten; testing and practice.</p><p>When planning for our data migration, we prepared for multiple adverse scenarios and created an emergency checklist, just like ones that exist in aviation. Our scenarios included low impact possibilities such as errors with the data import or the import process taking longer than expected. In these cases we would simply abort the process, recover to the old instance and try again on a different day after a post-mortem. We also considered higher impact scenarios where the migration would succeed but we would encounter problems after bringing back services. As mentioned in the previous section, in these situations, we could quickly toggle a flag and revert to using the previous data store.</p><p>Following any sort of incident is a step that many engineers are already familiar with — a post-mortem. This is what helps us improve and apply the lessons learned in the future. This, once again, has a corresponding step in aviation. When an incident is reported to Transport Canada, a <a href="https://tc.canada.ca/en/aviation/publications/aviation-safety-letter/issue-2-2021/civil-aviation-daily-occurrence-reporting-system-cadors">CADORS</a> (Civil Aviation Daily Occurrence Reporting System) report is created. Documenting and analyzing these reports can reveal gaps and lead to systemic improvements. It could be that some instruction is missing from flight training, additional regulations are needed or safety reviews are required on a particular aircraft.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_3VYJA2mrSvhUNzt" /><figcaption>A selection from a CADORS report. CADORS #2022O1912</figcaption></figure><p>As I continue my journey in aviation, I’m certain that I will discover other concepts that can be applied to my engineering career at League. One aspect that seems rife with possible learnings is the robust and regular maintenance that planes undergo, which keep them operational for such long periods of time. Similarly, situational awareness, which played a massive role in my flight training, can be very beneficial in many other fields.</p><p>In terms of our migration, thinking like a pilot made us well prepared with a detailed checklist that greatly reduced room for error. We had redundancies in place and were ready for any unfortunate circumstances with clear steps to recovery. The end result was a well executed and successful plan and a debrief that sparked the idea behind this blog post.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7c208c90395" width="1" height="1" alt=""><hr><p><a href="https://medium.com/inside-league/how-becoming-a-pilot-made-me-a-better-engineer-a7c208c90395">How becoming a pilot made me a better engineer</a> was originally published in <a href="https://medium.com/inside-league">Inside League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrating a large Go codebase to support generics]]></title>
            <link>https://medium.com/inside-league/migrating-a-large-go-codebase-to-support-generics-e4e3e2a980c6?source=rss----def796f8d2dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/e4e3e2a980c6</guid>
            <dc:creator><![CDATA[Reilly Watson]]></dc:creator>
            <pubDate>Mon, 12 Sep 2022 14:12:26 GMT</pubDate>
            <atom:updated>2022-09-12T14:12:25.915Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="A big pile of Lego minifig heads" src="https://cdn-images-1.medium.com/max/1024/1*V10ybvSuOCAKwXth3PMC3A.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@carsonarias?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Carson Arias</a> on <a href="https://unsplash.com/s/photos/lego?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Since we started building in 2014, League’s backend has been almost entirely developed using Go. Over this time, we’ve built up a large-ish codebase — our main repository currently holds around 1.4 million lines of Go code, excluding third-party dependencies!</p><p>Go 1.18 introduced the largest language change since its initial release: the ability to write code that can operate on multiple types (i.e. generics).</p><p>Before this release, if I wanted to write a function like Max(x,y), I had a few options:</p><ol><li>Set some specific type for x and y and the return value. Maybe float64? This is what the <a href="https://pkg.go.dev/math#Max">standard library</a> does. Do a bunch of typecasting everywhere that I call it with any other type.</li><li>Write a bunch of different versions of Max: MaxInt(), MaxFloat(), MaxMyIntAlias(), etc.</li><li>Write some code generation thing that does #2 for me, for whatever types I have.</li></ol><p>None of those options are great: typecasting is awkward to read and can introduce precision bugs, writing “N” different versions means writing and maintaining a bunch of nearly-identical functions, and code generation introduces a bunch of extra tooling complexity that complicates the build process. This has been a major complaint that’s surfaced in Go’s annual developer survey year after year (see the <a href="https://go.dev/blog/survey2016-results">2016</a>, <a href="https://go.dev/blog/survey2017-results">2017</a>, <a href="https://go.dev/blog/survey2018-results">2018</a>, <a href="https://go.dev/blog/survey2019-results">2019</a>, <a href="https://go.dev/blog/survey2020-results">2020</a>, and <a href="https://go.dev/blog/survey2021-results">2021</a> surveys, searching “generics” in each will show the relevant data).</p><p>Anyway, after years of various proposed implementations, this is a real thing you can do now! Instead of any of those three bad options, I can now write this and it’ll work for all the different number types:</p><pre>func Max[T constraints.Ordered](x, y T) T {<br>  if y &gt; x {<br>    return y<br>  }<br>  return x<br>}</pre><p>Neat!</p><h3>Migrating to Go 1.18</h3><p>Go’s <a href="https://tip.golang.org/doc/go1compat">compatibility promise</a> has historically made updating our Go version quite painless! We started using Go with version 1.3 and have been able to keep up to date on each new major version. Out of those 14 updates (from 1.3 up to 1.17), nearly all of them have essentially been as simple as sed s/go1.X/go1.Y/g.</p><p>This latest version is a bit different in that respect. Not because of anything in the standard library or toolchain, but because of CI (Continuous Integration) tooling. We run a large suite of static analysis tools on every pull request opened in our backend, including things like <a href="https://staticcheck.io/">staticcheck</a>, <a href="https://pkg.go.dev/cmd/vet">go vet</a>, <a href="https://github.com/kisielk/errcheck">errcheck</a>, <a href="https://github.com/securego/gosec">gosec</a>, and a couple dozen analyzers that are specific to our codebase (see the “Writing your own static analyzers” section of <a href="https://medium.com/inside-league/dont-fix-the-bug-fix-the-system-3e239afee6d2">this post</a> for an example). Each of those tools does some sort of parsing of Go source code to do its checking, and since there’s now this weird new square bracket stuff that might show up in the code, each of those tools needs to be updated to understand that.</p><p>This meant we needed to patch some of our tooling dependencies and disable a few checks. In particular, a few of our checks relied on some Single Static Assignment support that’s <a href="https://github.com/golang/go/issues/48525">still in-progress</a>, so they needed to be temporarily disabled. We also needed to patch golang.org/x/tools to fix some issues with parsing generics code (see <a href="https://go-review.googlesource.com/c/tools/+/400034">here</a>).</p><p>After we got all that sorted out, we were ready to go!</p><h3>Where we use generics</h3><p>There are a couple categories of things we were doing that generics are well-suited for — type conversion and event aggregation.</p><h3>Type conversion</h3><p>We had quite a few places where we needed to check if an element is in a list. We had a helper function for this for strings, StringInList(). But if your thing was a string-backed type (type UserId string; var userIds []UserId or what have you), this helper function couldn’t be called. So we had another function ToStringList() that took an empty interface (which had to be a slice of string-backed things), and converted it to a []string using reflection. StringInList(ToStringList(userIds), string(someId))was something we had in quite a few places in our code. Not great performance-wise (all this converting and reflecting wasn’t free!), or safety-wise (the compiler wouldn’t tell you if you passed the wrong thing to ToStringList()).</p><p>Now instead of any of that, we can call <a href="https://pkg.go.dev/golang.org/x/exp/slices#Contains">slices.Contains</a>(userIds, someId) and it’ll do all the right things, including erroring out when “userIds” and “someId” are different types.</p><p>We also wrote a generic version of ToStringList(), because there are some times we still need to do that kind of conversion.</p><p>Before (reflection-based):</p><pre>// ToStringList converts a slice of string-like things (ie where the underlying type is a string) into a []string.<br>func ToStringList(list interface{}) []string {<br>  if list == nil {<br>    return nil<br>  }<br>  val := reflect.ValueOf(list)<br>  if val.Kind() != reflect.Slice {<br>    return nil<br>  }<br>  result := make([]string, 0, val.Len())<br>  for i := 0; i &lt; val.Len(); i++ {<br>    ival := val.Index(i)<br>    if ival.Kind() == reflect.String {<br>      result = append(result, ival.String())<br>    }<br>  }<br>  return result<br>}</pre><p>After (generics):</p><pre>// ToStringList converts a slice of string-like things (ie where the underlying type is a string) into a []string.<br>func ToStringList[T ~string](list []T) []string {<br>  if list == nil {<br>    return nil<br>  }<br>  result := make([]string, len(list))<br>  for i, v := range list {<br>    result[i] = string(v)<br>  }<br>  return result<br>}</pre><p>Much better! That earlier version had weird and surprising behavior if you passed it anything other than a slice of string-like things, whereas the new version tells you at compile time that you’re doing something wrong.</p><h3>Event aggregation</h3><p>Many of the updates to our data model are done using an event aggregation model, wherein you construct an event representing your change and an aggregator function that applies that change to your model. This lets us maintain a nice audit trail of changes to our system and helps manage concurrency issues for changes.</p><p>Previously, our aggregation functions took an interface “Aggregateable”, which each aggregator then had to cast to the type they cared about. So there was a lot of code like this:</p><pre>func aggregatePrice(ctx context.Context, id model.BenefitPriceId, eventType event_model.EventType, info map[string]any, aggregator func(context.Context, *model.EmployerBenefitPrice, map[string]any) (bool, error)) (*model.EmployerBenefitPrice, error) {<br>  benefitPrice := &amp;model.EmployerBenefitPrice{<br>    Id: id,<br>  }<br>  result, err := aggregate.Aggregate(ctx, benefitPrice, entity.EntityId(id), info, aggregate.EventType(eventType), func(ctx context.Context, agg aggregate.Aggregateable, msg map[string]any) (bool, error) {<br>    return aggregator(ctx, <strong>agg.(*model.EmployerBenefitPrice)</strong>, msg)<br>  })<br>  if result != nil {<br>    return <strong>result.(*model.EmployerBenefitPrice)</strong>, err<br>  }<br>  return nil, err<br>}</pre><p>Notice the casting of agg and result, and how we need this whole extra anonymous function just to transform things into a reasonable typed interface for callers.</p><p>Instead, now Aggregate() is a generic function. The function signature is a bit hairy:</p><pre>func Aggregate[T Aggregateable](ctx context.Context, agg T, entityId entity.EntityId, info map[string]any, eventType EventType, aggFn func(context.Context, T, map[string]any) (bool, error)) (T, error)</pre><p>The key thing here is that it takes any type that implements the Aggregateable interface, but it uses the exact type passed when returning results and when defining the aggregator function. So callers get a much nicer experience, the above aggregatePrice() function now becomes:</p><pre>func aggregatePrice(ctx context.Context, id model.BenefitPriceId, eventType event_model.EventType, info map[string]any, aggregator func(context.Context, *model.EmployerBenefitPrice, map[string]any) (bool, error)) (*model.EmployerBenefitPrice, error) {<br>  benefitPrice := &amp;model.EmployerBenefitPrice{<br>    Id: id,<br>  }<br>  return aggregate.Aggregate(ctx, benefitPrice, entity.EntityId(id), info, aggregate.EventType(eventType), aggregator)<br>}</pre><p>No more anonymous function, no casting, everything just works nicely.</p><p>Note that the Go team’s blog post <a href="https://go.dev/blog/when-generics">When to Use Generics</a> says “don’t replace interface types with type parameters”, but this case (where you’re passing an interface, but also a function that operates on the same concrete type) feels like an exception to that guideline.</p><h3>What’s next?</h3><p>This is just our first baby steps into adapting our system to use more generic code. In the future we expect to start introducing more kinds of typesafe containers (an LRU cache and concurrent map are particularly interesting candidates), generic libraries for easier handling of different concurrency patterns, and possibly higher-level functional programming operations (map/reduce/filter etc, although the usability of these may depend on the outcome of <a href="https://github.com/golang/go/issues/21498#issuecomment-1132271548">this proposal</a>).</p><p>So far we’ve been quite happy with things though! We had some concerns that generics would complicate a bunch of code, but so far these have been unfounded; people mostly just write the same code as before, but now in some cases they just need to write a bit less of it :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4e3e2a980c6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/inside-league/migrating-a-large-go-codebase-to-support-generics-e4e3e2a980c6">Migrating a large Go codebase to support generics</a> was originally published in <a href="https://medium.com/inside-league">Inside League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring career paths at League]]></title>
            <link>https://medium.com/inside-league/exploring-career-paths-at-league-b751fed6b6dc?source=rss----def796f8d2dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/b751fed6b6dc</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[league]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[career-change]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Frances Karulas]]></dc:creator>
            <pubDate>Wed, 24 Aug 2022 16:19:31 GMT</pubDate>
            <atom:updated>2022-08-26T18:19:49.554Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/780/0*5kjS5CftiNI7Cl_y" /></figure><p>When I took my first computer science course in university I was already well into a degree for something completely different. I had taken the course as an elective to make up the credits I needed to graduate, so I had no idea going in that during that semester I’d find something I was going to be really passionate about. It was only a week into the class when I first made those two magical words appear on screen, “Hello, World!”, and I was completely hooked.</p><p>My first few development roles after university were all in the financial industry. That’s where I met some fellow developers who introduced me to the wonderful world of consulting. Consulting is most definitely not for everyone, but it ended up being a fun and exciting part of my career. I loved the new projects and new teams and, most importantly, learning about new technologies. This lifestyle provided me with a constant stream of new challenges and the rush of continuously having to tackle different technical problems.</p><p>While I did eventually grow tired of consulting, all these years later I still love the things that drew me to programming in the first place; the logic, the puzzles, the problem solving — these components still make me excited to come to work every day and have been the main reason I’ve been hesitant to leave programming behind. I’ve often wondered if I might enjoy a role in management, so that I could help drive what problems my team is solving instead of just helping come up with solutions, however, I’ve been really wary of leaving development roles behind. Until I came to <a href="https://league.com/us/">League</a> that is.</p><p>My role as engineering manager (EM) at League is quite different than the same role at other companies. While in past organizations the focus of these types of roles was always on the project management and people management parts of the job, here an EM is also required to be very technical — we even assess for this skill through an architecture challenge during our interview process. I’d always worried in the past that taking a management role would mean slowly losing all the technical expertise I’d spent years cultivating, but that definitely isn’t how things work at League.</p><p>Features are still designed and built by engineers, but managers are expected to provide input and be able to speak to why certain design decisions were made. We have a very robust architectural process which encourages participation across the entire engineering organization, very much including the leadership team as well. Here at League, by taking an EM role you’re gaining management and leadership skills, while still driving architectural decisions and guiding engineers toward solid technical solutions.</p><p>And the reassuring part is, if after making the career change you find that you miss the unique challenges that development work provides, there is always a road back to a purely technical career path. This means it’s not risky to embrace these types of career changes and flex your leadership muscles in a traditional “managerial” way even if you end up deciding what you ultimately want is day-to-day work with a more technical focus.</p><p>This summer I’m embarking on my first EM role (wish me luck!). I’m exceptionally thankful to have an amazing support system of folks at League who have already made this jump. And while I’m equal parts nervous and excited about this new challenge, I know for sure that given what this role means at League my days will still be filled with the problem solving and puzzles I’ve loved so much throughout my career.</p><p>P.S. Being an EM it’s now my official duty to tell you, we’re hiring! Check out all our awesome open roles <a href="https://league.com/ca/careers/">here</a> and come work with our #DreamTeam.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b751fed6b6dc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/inside-league/exploring-career-paths-at-league-b751fed6b6dc">Exploring career paths at League</a> was originally published in <a href="https://medium.com/inside-league">Inside League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scalable CI/CD in Multi-Module applications using Gradle plugins ]]></title>
            <link>https://medium.com/inside-league/scalable-ci-cd-in-multi-module-applications-using-gradle-plugins-e2c29c202695?source=rss----def796f8d2dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/e2c29c202695</guid>
            <category><![CDATA[androiddev]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[circleci]]></category>
            <dc:creator><![CDATA[Shalom Mathews]]></dc:creator>
            <pubDate>Tue, 05 Jul 2022 14:13:33 GMT</pubDate>
            <atom:updated>2022-07-05T14:13:33.557Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="building blocks" src="https://cdn-images-1.medium.com/max/1000/0*h5e-CWVrqAjxyL-v" /><figcaption><a href="https://unsplash.com/photos/kn-UmDZQDjM">https://unsplash.com/photos/kn-UmDZQDjM</a></figcaption></figure><p>As League has been rapidly growing, we realized that we needed to evolve into a product-as-a-service (PaaS) company. In order for us to make such a move, we needed a robust continuous integration and delivery (CI/CD) pipeline that could be easily extended to incorporate new feature modules.</p><p>Before using the Gradle Plugin, each developer had to configure the CI/CD pipeline after making changes to modules or adding new modules. This type of continuous configuration lead to a lot of broken builds and wasted development time.</p><p><strong>Problem requirement</strong></p><p>We needed a solution which would require zero configuration from the developers, would be scalable and use the same source of truth for CI and android build. The solution would also need to abstract the testing, linting and publishing part from the developers, so they would not need to worry about creating and extending the configuration once they created a new module.</p><p><strong>The solution</strong></p><p>We ended up building a custom Gradle plugin which generates the CircleCI configuration for each module based on the module definition. Gradle<strong> 👷🏻‍♀️</strong> is a build automation tool for compilation, packaging, testing, deploying and publishing projects. It supports Kotlin, Groovy, Scala, C/C++ and JavaScript natively. Gradle plugins allow us to extend a project’s capabilities.</p><p>Android has its own<a href="https://developer.android.com/studio/releases/gradle-plugin"> Android Gradle Plugin</a> that provides added functionality just for Android apps .</p><p>The plugin generates the config for:</p><p><strong>Code quality</strong></p><ul><li>Lint tests</li><li>Detekt checks</li><li>KTlint checks</li></ul><p><strong>Testing</strong></p><ul><li>Unit tests</li><li>Integration tests</li><li>UI tests</li></ul><p><strong>Publishing</strong></p><ul><li>Publish module as an SDK</li></ul><h3>Getting started</h3><p>This article is going to go through the process of creating a simple Gradle plugin that will generate the testing and lint CircleCi configs for all the modules in an Android project.</p><p>The Git repository of the project can be found <a href="https://github.com/shalom06/gradle">here</a>.</p><h3>Create a new Android project</h3><p>Let’s begin by creating a new android project.</p><p>Open up Android studio<strong> : File → New → New Project → Basic Activity → Finish</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XXcLJRKGQnuoHwme" /><figcaption>settings.gradle location</figcaption></figure><p>Once created, we need to rename the <strong><em>settings.gradle</em></strong> file to <strong><em>settings.gradle.kts</em></strong> in order to use Kotlin DSL instead of Groovy.</p><blockquote><strong>We might need to update include ‘:app’ to include (“:app”) to follow kotlin syntax.</strong></blockquote><p>The structure of the project should be :</p><p>project<br>├── app<br>│ └── build.gradle<br>├── settings.gradle.kts<br>└── build.gradle</p><h3>Creating a plugin directory</h3><p>We need to create the following directory structure so Gradle can recognize our plugin module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/0*rIFlThJlbYPtu13A" /><figcaption>buildSrc Structure</figcaption></figure><p><strong>buildSrc/<br>├── src/<br>│ └── main/<br>│ └── kotlin/<br>│ <br>└── build.gradle.kts</strong></p><p>Create a <strong><em>build.gradle.kts</em> </strong>file.</p><pre>plugins {<br> id (“org.gradle.kotlin.kotlin-dsl”) version “2.1.6”<br>}</pre><pre>repositories {<br> google()<br> mavenCentral()<br>}</pre><p>The above code adds the Kotlin DSL plugin.</p><p>We need to rebuild the project so Gradle recognizes our plugin module.</p><p><strong>Build → Rebuild Project</strong></p><p>Once the rebuild is complete .gradle and build folders will be generated by Gradle for the plugin module.</p><h3>Setup libraries</h3><p>Let’s create some<strong> </strong>Android modules named library_one and library_two.We will generate the configs for these two libraries.</p><p><strong>File → New → New Module → Android Library → Module name → library_one → Finish</strong></p><p><strong>File → New → New Module → Android Library → Module name → library_two</strong> <strong>→</strong> <strong>Finish</strong></p><p>Once finished we have two modules with sample units tests.</p><h3>Plugin architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/0*9mOn4qGkJpL4BKgu" /><figcaption>Plugin Architecture</figcaption></figure><h3>Configure settings.gradle.kts</h3><p><strong><em>settings.gradle</em></strong> is a file used to configure the project and initialize it. We can use Gradle hooks to add custom functionality to the build process.</p><p>We need to provide the plugin with a list of all the modules present in the project.</p><p>Let’s start by creating a setup function in<strong> <em>settings.gradle.kts</em> </strong>that will provide a map of all the modules present in the project using extensions.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bbcbd4f8fb94e00b7da7e4d61b9fced8/href">https://medium.com/media/bbcbd4f8fb94e00b7da7e4d61b9fced8/href</a></iframe><blockquote>1.Gradle executes the file from top to bottom so we call the setup function .</blockquote><blockquote>2. Creates a list of Modules using a rootProject.children method provided by gradle.</blockquote><blockquote>3. We load the modules as a list of maps to the settings extensions with the key “modules”.</blockquote><h3>Creating the plugin</h3><p>Let’s begin by creating a Kotlin file named GenerateConfigPlugin in the <strong><em>buildSrc/src/main/kotlin</em></strong> directory.</p><p>In order to create a Gradle plugin, we need to implement the <strong><em>Plugin&lt;Project&gt;</em></strong> and override the apply method.</p><p>When we apply a plugin to a project the <strong><em>Plugin.apply(T)</em></strong> function is called.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8d59b5f0dc19303ead8940f14243840b/href">https://medium.com/media/8d59b5f0dc19303ead8940f14243840b/href</a></iframe><p>Next, we need to fetch the list of modules so that we can generate the config for each module.</p><p>Let’s create a module data class:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d4764305deb008a9fb3f2009e23aabe4/href">https://medium.com/media/d4764305deb008a9fb3f2009e23aabe4/href</a></iframe><p>getFilePath and createDependencyCacheKey methods are for later <strong>use</strong>.</p><blockquote>1.<strong> sha1</strong> creates a <strong>hash</strong> <strong>for</strong> <strong>each</strong> <strong>file</strong> so that we can <strong>check</strong> <strong>if</strong> the <strong>file</strong> has <strong>changed</strong>.</blockquote><blockquote>2. createDependencyCacheKey <strong>is</strong> used <strong>to</strong> <strong>create</strong> a <strong>cache</strong> <strong>key</strong>.</blockquote><blockquote>3. getFilePath() converts <strong>:module:submodule</strong> <strong>to /module/submodule</strong></blockquote><p>A Gradle plugin provides functionality using tasks.</p><p>Let’s register a task generateModuleTestsConfig and import the library modules from extensions.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4080828ce29f39edd3be3a9b28680955/href">https://medium.com/media/4080828ce29f39edd3be3a9b28680955/href</a></iframe><h3>CircleCI</h3><p>CircleCI uses the .<strong><em>circleci </em></strong>directory for fetching its config.</p><p>CircleCI requires a <strong><em>config.yml </em></strong>file to run the CI/CD pipeline.</p><p>Let’s start by creating a <strong><em>.circleci </em></strong>directory in the root of the project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/0*TtmsuxJlqeSrDsK-" /><figcaption>.circleci directory structure</figcaption></figure><p>Once created, we need to create a template file which will be used to generate the config.</p><p>Let’s create a file called <strong><em>config_tempalate.yml</em></strong> in the <strong><em>.circleci </em></strong>directory.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cab5805049991b8d879ae68bdbf3e8a3/href">https://medium.com/media/cab5805049991b8d879ae68bdbf3e8a3/href</a></iframe><blockquote>1. Specifies version of config.</blockquote><blockquote>2. Creates a Job.</blockquote><blockquote>3. Specifies android docker image to run on.</blockquote><blockquote>4. Declares the parameters which are going to be passed to the job.</blockquote><blockquote>5. Checks out latest code from origin and restores cache of items which need to be reused .</blockquote><blockquote>6. Run the gradle commands specified in parameters.gradleTasks.</blockquote><p>This creates a template for<strong><em> build_test_check</em></strong> job which takes parameters to build and lint check the modules.</p><p>The image<strong><em>: cimg/android:2022.01 </em></strong>provided by CircleCI is an Android docker image.</p><p>The template needs to be used by the plugin to generate the config.</p><p>Let’s go back to the GenerateConfigPlugin file.</p><p>Let’s start by creating an extension function which will call the <strong><em>build_test_check:</em></strong> for each module.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8396c52eb247fb0b74752cfa558e8d9a/href">https://medium.com/media/8396c52eb247fb0b74752cfa558e8d9a/href</a></iframe><blockquote><strong>generateModuleBuildConfiguration</strong> will do <strong>“assembleRelease”</strong> “<strong>assembleAndroidTest” “lintRelease”</strong> and “t<strong>estRelease</strong>” for each module .</blockquote><p>Once we generate the code, we need to write it into a file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7744c369f6849549f270ac20679b57b8/href">https://medium.com/media/7744c369f6849549f270ac20679b57b8/href</a></iframe><p>Now that we have the support function, we need to actually generate the config in the plugin.</p><p>In the apply method of <strong><em>GenerateConfigPlugin</em></strong> we add the following code, which will use the template to generate the config and write it into a <strong><em>generated_config.yml </em></strong>file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5a99a9bb1613b13f87dc5f8f974e90ea/href">https://medium.com/media/5a99a9bb1613b13f87dc5f8f974e90ea/href</a></iframe><blockquote>1.<strong> Registers a task called “generateModuleTestsConfig”.</strong></blockquote><blockquote>2.<strong> Fetches the modules from the extensions.</strong></blockquote><blockquote>3.<strong> Generates the config.</strong></blockquote><blockquote>4.<strong> Writes the config to a file.</strong></blockquote><p>Let’s add the module to the project’s build.gradle apply <strong><em>plugin: GenerateConfigPlugin.class.</em></strong></p><p>We can check if our code is working by running <strong><em>./gradlew</em></strong> generateModuleTestsConfig from the root directory.</p><p>It will generate a file called<strong><em> generated_config.yml</em></strong> in the <strong><em>.circleci</em></strong> directory.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6d6d3f8c8539681770243979965f885b/href">https://medium.com/media/6d6d3f8c8539681770243979965f885b/href</a></iframe><p>CircleCI uses <strong><em>config.yml </em></strong>in the <strong><em>.circleci </em></strong>directory to begin the CI/CD pipeline. We need to call generateModuleTestsConfig from the <strong><em>config.yml </em></strong>file.</p><p>So our <strong><em>config.yml</em></strong> should look like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d0eb02ca855ad854a1a575b4b333bba8/href">https://medium.com/media/d0eb02ca855ad854a1a575b4b333bba8/href</a></iframe><blockquote><strong>config.yml </strong>is configured to call generateModuleTestsConfig and use the continuation orb provided by CircleCI to run the code in the <strong>generated_config</strong>.yml file.</blockquote><h3>Enable CircleCI</h3><p>Before enabling CircleCI, the code needs to be pushed to a remote git repository. At League, we use Github as it integrates easily with CircleCI.</p><p>Tutorial to set up the Github project can be found<a href="https://docs.github.com/en/get-started/importing-your-projects-to-github/importing-source-code-to-github/adding-locally-hosted-code-to-github"> here</a>.</p><h3>Once we log into CircleCI using Github, it shows all our projects.</h3><p>We set up CircleCI by selecting our project and using the fastest option, as we already have the .circleci/config.yml present.</p><p>​​</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*kjg38ZyuHeI3J5LK" /></figure><p>After configuration, the build will fail because dynamic config is not enabled.</p><pre><strong>#!/bin/sh -eo pipefail<br># Use of setup workflows must be enabled in project settings (Project settings &gt; Advanced -&gt; Dynamic config using setup workflows)<br># <br># -------<br># Warning: This configuration was auto-generated to show you the message above.<br># Don&#39;t rerun this job. Rerunning will have no effect.</strong></pre><p>As the error suggests we need to enable it Project settings &gt; Advanced -&gt; Enable dynamic config using setup workflows.</p><h3>Rerun</h3><p>After enabling dynamic configs, we can rerun the project and the tasks would get run in parallel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*53bMlHvTqpoVaB7d" /></figure><p>This is a simple solution which can be adapted to automate a lot of the tasks in CI/CD.</p><h3>Working with League</h3><p>If you want to learn more or help us in CI/CD aspirations, you can apply for the multitude of jobs available at League<a href="https://grnh.se/087b3b3e4us"> here</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2c29c202695" width="1" height="1" alt=""><hr><p><a href="https://medium.com/inside-league/scalable-ci-cd-in-multi-module-applications-using-gradle-plugins-e2c29c202695">Scalable CI/CD in Multi-Module applications using Gradle plugins 🔌</a> was originally published in <a href="https://medium.com/inside-league">Inside League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Honoring your accomplishments with #IamRemarkable]]></title>
            <link>https://medium.com/inside-league/honoring-your-accomplishments-with-iamremarkable-b4f4bbfe837b?source=rss----def796f8d2dd---4</link>
            <guid isPermaLink="false">https://medium.com/p/b4f4bbfe837b</guid>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[personal-growth]]></category>
            <category><![CDATA[support]]></category>
            <category><![CDATA[self-love]]></category>
            <dc:creator><![CDATA[Elba Ornelas]]></dc:creator>
            <pubDate>Mon, 06 Jun 2022 18:55:20 GMT</pubDate>
            <atom:updated>2022-06-06T18:55:19.919Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Fireworks with bokeh effect" src="https://cdn-images-1.medium.com/max/1024/1*i5le2-nHjB1RAffhVHtDmA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@munmuns?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">MUNMUN SINGH</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Talking about our own achievements is both an act of courage and an act of self-love. Doing so can positively impact your personal journey and set the right path for your professional growth. However, I can’t think of many workplaces that are interested, and follow through, in fostering and celebrating their employees.</p><p>At <a href="https://league.com/">League</a>, I kicked-off a series of workshops from the initiative <a href="https://iamremarkable.withgoogle.com/">#IamRemarkable</a>, originally led by Google. Back in 2015, Anna Vainer and Anna Zapesochini started off a workshop to empower women in their workplace. This came about after observing the hard times that women have when it comes to talking about what they have accomplished in their workplace. Fast forwarding to today with over 300,000 attendees worldwide, this workshop stands as a means to facilitate the difficult conversations that women and underrepresented groups have to deal with because of social norms and unconscious bias.</p><p>For our first session together, 15 amazing women Leaguers joined and left with a better understanding for how they can start feeling more comfortable when sharing their personal and/or professional accomplishments</p><h3>How it works</h3><p>The workshop runs through three key steps: laying the land, exercising and celebrating. <br>When laying the land, we dedicate time to understanding the reasons behind people not celebrating their accomplishments. It’s not a subjective topic: it’s backed up with data from extensive and global research. As an example, the Hewlett Consulting Partners consultancy found out that without diverse leadership, women are 20% less likely than straight white men to win endorsement and praise for their ideas; people of color are 24% less likely; and LGBTQIA+s are 21% less likely.¹</p><p>Next up, we dive into practical exercises to tap into ways we can find our inner voice — and silence the inner critic. At League, we hold ourselves accountable with an internal Slack channel that acts as a continuation of the safe space we created in our session. We even have a set reminder every Wednesday to share a win!</p><p>The third and final key aspect of this initiative is celebration. Any accomplishment is worth celebrating! I like to tell the people who join my workshops that there are no big or small accomplishments; they are accomplishments, period. The moment we start labeling them in size, is the moment we let the comparison creep in; it’s the moment we lose to social norms.</p><h3>Building a culture of empowerment</h3><p>In a world where individualism and competition among ourselves is the default, I believe breaking that mold is of the upmost importance right now. Companies that take the initiative to actually empower their employees are the ones that will thrive from the inside.</p><p>I’m glad I could bring this distinct workshop to League and create another pillar for our DEI initiative — driving allyship and support even further. These workshops are tightly knitted to other initiatives running at our company that aim to bring us all together. We have Employee Resource Groups (ERGs) which aim to bring people with similar backgrounds and heritage together while externalizing knowledge, awareness and empathy within the company. At League we describe ERGs as employee-led and employee-driven groups. They create a safe space for Leaguers to discuss their professional development and increase interaction and relationship building within League teams and departments.</p><p>Having these groups that generate a safe space for everyone illustrates the importance of diversity to our company., League makes a point to nourish our culture in a way I haven’t experienced before.</p><p>Bringing voices together fosters the right space for everyone to feel listened to, and supported. Creating awareness of how difficult it can beto navigate the workplace when imposter syndrome, pay gaps, discrimination, unconscious biases and more threats to personal and professional growth is critical. It’s the number one thing that any company should be emphasizing right now.</p><p>The second thing? Actually creating a workspace where anyone can grow without fear of judgment.</p><p>Research references</p><ol><li>Sherbin, Sylvia Ann Hewlett Melinda Marshall Laura. “How Diversity Can Drive Innovation.” Harvard Business Review, 31 July 2014</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4f4bbfe837b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/inside-league/honoring-your-accomplishments-with-iamremarkable-b4f4bbfe837b">Honoring your accomplishments with #IamRemarkable</a> was originally published in <a href="https://medium.com/inside-league">Inside League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>