<?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[Ro Engineering Blog - Medium]]></title>
        <description><![CDATA[We’re Ro, The Patient Company. Today, we enable you to connect with a doctor and get treatment when and where you need it. Tomorrow, we aspire to be your first call for all your healthcare needs. - Medium]]></description>
        <link>https://medium.com/ro-engineering-blog?source=rss----f3e4bb9b8f68---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Ro Engineering Blog - Medium</title>
            <link>https://medium.com/ro-engineering-blog?source=rss----f3e4bb9b8f68---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 14:14:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/ro-engineering-blog" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Beyond the Code: Building the Infrastructure for a Lasting Mentorship Program]]></title>
            <link>https://medium.com/ro-engineering-blog/beyond-the-code-building-the-infrastructure-for-a-lasting-mentorship-program-27ec7ae744d8?source=rss----f3e4bb9b8f68---4</link>
            <guid isPermaLink="false">https://medium.com/p/27ec7ae744d8</guid>
            <dc:creator><![CDATA[Kelly Froelich]]></dc:creator>
            <pubDate>Wed, 14 Oct 2020 19:57:12 GMT</pubDate>
            <atom:updated>2020-10-14T20:14:15.254Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4jdIVE9KPEUcaTBEBaaIgw.png" /></figure><p>In the Tech Org at Ro, and particularly on the Engineering team, we are focused on building the best infrastructure and architecture for products and services that meet our patients at eye level and help Ro to become a patient’s first call.</p><p>While building the technical infrastructure to support Ro’s telehealth platform and digital clinics may seem like the 10,000 ft. view, we like to go even higher and ask “how can we help reimagine healthcare to deliver the greatest possible patient experience?”</p><p>We believe that Ro can drive incredible progress toward this goal, but recognize that we can amplify our impact by supporting others who are similarly committed to this mission. We found a valuable opportunity to do just that by partnering with HITLAB for their <a href="https://www.hitlab.org/wht">Women’s Health Tech Challenge</a> aimed at empowering entrepreneurs who are developing new and innovative healthcare technologies.</p><p>The Women’s Health Tech Challenge invites innovators, entrepreneurs, and startups to propose novel concepts to fulfill unmet healthcare needs or improve healthcare access, quality, and outcomes for women all over the world. The top five Challenge finalists have the opportunity to pitch their ideas to investors during a pitch day, culminating in prizes to help support their businesses.</p><p>This past spring, Ro partnered with HITLAB to create a “Bootcamp” prior to the Spring 2020 pitch day. During the Bootcamp, each finalist was paired with a Ro mentor of their choice — with diverse expertise ranging in fields from engineering and data to communications and recruiting. For example, <a href="https://www.linkedin.com/in/suconick/">Michelle Suconic</a>k shared how to structure a company or product story when launching; <a href="https://www.linkedin.com/in/crstlh/">Crystal Han</a> shared how to recruit and build the highest quality tech team; and, <a href="https://www.linkedin.com/in/zacharycleary/">Zack Cleary</a> shared how to build, launch, and scale healthcare technology. The finalists then had dedicated time with the Ro mentor to use for reviewing their deck, refining their pitch, or talking through advice on building and insights from scaling a successful health tech venture.</p><p>Was the Bootcamp a success? We heard a resounding yes from both the finalists and the Ro mentors who participated. That’s why, when HITLAB asked if Ro would like to run the Bootcamp for the next Challenge in November — we answered with another resounding yes.</p><p>Equipped with feedback from the first Challenge, we worked together with HITLAB to develop an even better Bootcamp curriculum for the fall. We crafted a more structured and uniform Bootcamp experience to ensure each participant, finalists and mentors alike, can make the most of their time together. In addition, we learned that finalists had questions for experts across a variety of domains, so we created more chances for them to ask those questions of relevant subject matter experts.</p><p>This November, the Bootcamp will kick off with a panel discussion featuring Ro’s <a href="https://www.linkedin.com/in/melyndabarnes/">Dr. Melynda Barnes</a>, SVP of Medical Affairs and Research, and <a href="https://www.linkedin.com/in/jessicamprager/">Jess Prager</a>, VP of Product, discussing how tech teams can work in conjunction with clinical experts to build healthcare technology. Afterward, the five finalist teams will split into virtual breakout rooms where several Ro mentors will listen to their pitch and provide feedback on both the presentation and the company’s product or service. The finalist teams will then rotate rooms two to three times in a true bootcamp fashion for additional work sessions with Ro mentors with a variety of technical, clinical, and product perspectives.</p><p>One of the greatest takeaways from the first Bootcamp was how the experience truly ignited a passion for mentorship at Ro. One of the Ro mentors from the Spring 2020 Bootcamp will not only be back as a mentor for the Fall 2020 Bootcamp, but has also volunteered in a mentorship program with <a href="https://www.builtbygirls.com/">Built By Girls</a>. Personally, I have joined the Young Professionals Group for <a href="https://ceoworks.org/">CEO (Center for Employment Opportunities)</a> on its Volunteer Committee to help the formerly incarcerated prepare to re-enter the workforce.</p><p>It has been incredible to watch how the opportunity for mentorship in the Spring 2020 Women’s Health Challenge has evolved to a lasting partnership with HITLAB, while serving as a launch pad for so many Ro employees to engage even further in community involvement. We can’t wait for this fall’s Women Health Tech Challenge!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27ec7ae744d8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ro-engineering-blog/beyond-the-code-building-the-infrastructure-for-a-lasting-mentorship-program-27ec7ae744d8">Beyond the Code: Building the Infrastructure for a Lasting Mentorship Program</a> was originally published in <a href="https://medium.com/ro-engineering-blog">Ro Engineering Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Different Kind of Software Internship]]></title>
            <link>https://medium.com/ro-engineering-blog/a-different-kind-of-software-internship-51bf3cb69317?source=rss----f3e4bb9b8f68---4</link>
            <guid isPermaLink="false">https://medium.com/p/51bf3cb69317</guid>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[fellowship]]></category>
            <dc:creator><![CDATA[Ben Gershuny]]></dc:creator>
            <pubDate>Fri, 14 Aug 2020 17:58:19 GMT</pubDate>
            <atom:updated>2020-08-14T19:21:20.201Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sLApnQbGXTmEiAA1-PdrWA.jpeg" /><figcaption>Business vector created by freepik — <a href="http://www.freepik.com/">www.freepik.com</a></figcaption></figure><p>Just about every computer science student undergoes an internship recruiting frenzy, full of irrelevant coding puzzles and under-the-table comparisons of who pays most massively, and whose office has the most exciting amenities. I want to believe that this disillusioned process merely <em>overshadows</em> students’ underlying passion for software engineering or problem solving, though I do start to wonder if that passion isn’t actually lost altogether.</p><p>I’m lucky to say that my summer experience at Ro was a complete contrast to this. A summer internship is a rare opportunity to devote three months to learning, growth, and developing relationships. To make the most of that opportunity, I’ve learned how valuable it is to determine your goals before starting. For me, doing this led me right in the direction of Ro.</p><h3>Finding Ro</h3><p>My own long-term goal is to build and lead organizations. I spent the previous summer building a startup in a venture accelerator, and I determined afterward that I wanted to experience working in an established startup to understand how a well-run organization operates.</p><p>I quickly realized, though, that the most interesting companies to work at for a summer had not invested in the traditional internship programs where they’d play hard-to-get at my school’s career fairs and require disheartening automated applications. I came across Ro in a list of the “happiest places to work in NYC” — a funny title that struck me as an incredible way to characterize an organization.</p><p>Given my passion for the intersection of healthcare and technology, I reached out cold with a resume and cover letter to Ro’s Director of Recruiting on LinkedIn. I was surprised to quickly receive a warm response and a connection to <a href="https://medium.com/@chandler_28266">Chandler Moisen</a>, who was already piloting a first-ever <em>Summer Fellowship</em> program at Ro. From there ensued an extensive interview process that officially landed me my summer position at Ro.</p><h3>Real Responsibilities</h3><p>Within the first week of my fellowship, I was given real responsibility as a contributor on my team. Thankfully, I was already comfortable in Ro’s tech stack, and before I arrived I made sure to brush up my skills in the specific frameworks I knew I would be encountering. I had a few days to become familiar with Ro’s current applications and its roadmap for upcoming projects. Then I was brought to pair with a senior software engineer on an instrumental feature within a massive new project. That’s to say, I was thrown into the deep end. Luckily for me, the engineer I was working with was unendingly willing to support me, answer my questions, and familiarize me with Ro’s approaches to architecting and implementing features. I was dropped right into a feature stampede by my second week, and I was suddenly part of the pack, sprinting like everyone else.</p><p>Being given this level of responsibility from the very beginning brought the best out of me every day. By the end of the fellowship, I surprised myself by the amount of value I was able to contribute — all thanks to Ro’s trust in me and the supportive culture around me. As an engineer at Ro, the big picture is as accessible as the smallest details. You’re not a cog in the wheel, but an instrument providing value on a massive scale, always in touch with the “why” for everything you do. Past my engineering work, I was also given the opportunity to explore and lead a new project for Ro, to gain some parallel experience in the product manager realm. I spent the last few weeks of the fellowship compiling research and developing a roadmap for a brand new product initiative. This was a stark contrast to what many of my friends were doing at their internships at other firms — something I’m glad I had no part of.</p><h3>The Power of Relationships</h3><p>Relationships proved to be an invaluable part of my fellowship experience. The most important ones were with my closest mentors, who helped me draw out my personal goals for the fellowship and were committed to helping me achieve them. Thanks to advice from my early mentors at Ro, I learned the importance of sharing my individual goals with everyone I met so that they could best offer their expertise for my own growth. This harkens back to the importance of spending time to define my own goals and values in order to get the most out of my summer experience</p><p>I finished my fellowship connected with dozens of incredible people throughout Ro — albeit quite challenging to really <em>connect</em> when meeting people remotely. After speaking with friends about their internship experiences elsewhere, I learned that not only was building relationships not a focus for them, but it didn’t even feel possible. Software internships tend to be solely focused on developing young engineers within a low-stakes sandbox, grooming talent for returning full-time. At Ro, building relationships was at the forefront of my experience. This was thanks not only to the unique freedom within Ro’s fellowship program, but also to the community of compassionate, multidimensional Ro’ers who were consistently willing to meet and connect with me.</p><h3>Takeaways from Ro</h3><p>Ro is a unique organization. It’s an extremely fast-paced, high-growth business, though it’s people-first, patient-first, empathy-first, and happy. I felt this since my very first interview for the fellowship — a sort of <em>magic</em> that left me feeling fulfilled after every interaction with others at Ro. This magic is contagious and permeates the entire organization. Ro is also built upon openness and transparency, principles which allowed me to engage with every piece of the organization, even as just a summer engineering fellow.</p><p>Ro’s organizational structure follows a fascinating model, which it calls the “team of teams.” The product and software side of Ro is not broken down into siloed engineering, product, and design groups, but rather into cross-functional “squads” with high levels of autonomy within a specific realm of the business. These squads are generally made up of a variety of engineers, a PM, a designer, and an engineering manager, who work as a collective force to solve problems from the ground up.</p><p>Throughout the summer, my squad began to implement a new product development process which integrates the entire squad, including engineers, into every piece of product development. This is a stark contrast to the traditional “waterfall” approach, where a PM and designer map out a new product and merely allow the engineers to pick up tasks to implement it. This new process empowers the entire team to be invested in all that they build, which I believe ultimately leads to a faster pace, better products, and more fulfilled employees.</p><p>I’m hoping that Ro continues to invest in product development processes like this as it expands its “team of teams” approach. And past this, I hope other organizations can learn from the magic in Ro’s culture and its commitment to openness, relentlessness, and trust. This was a different kind of “software internship,” and Ro is a different kind of organization.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51bf3cb69317" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ro-engineering-blog/a-different-kind-of-software-internship-51bf3cb69317">A Different Kind of Software Internship</a> was originally published in <a href="https://medium.com/ro-engineering-blog">Ro Engineering Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using GitHub Actions to Automate Web App Vulnerability Scanning]]></title>
            <link>https://medium.com/ro-engineering-blog/using-github-actions-to-automate-web-app-vulnerability-scanning-3f4bcaf21ffc?source=rss----f3e4bb9b8f68---4</link>
            <guid isPermaLink="false">https://medium.com/p/3f4bcaf21ffc</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[owasp]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Austin Hervias]]></dc:creator>
            <pubDate>Tue, 11 Aug 2020 18:26:01 GMT</pubDate>
            <atom:updated>2020-08-11T18:26:01.052Z</atom:updated>
            <content:encoded><![CDATA[<p>Securing a web application that deals with sensitive data is a must. Vulnerabilities in web applications can be dangerous, since this is the primary way a user interacts with your environment. How do you know where to start looking?</p><h3>Vulnerability Scanning</h3><p>Typically, you’ll begin by running a tool locally on your computer that scans a web app for security vulnerabilities, such as <a href="https://www.zaproxy.org/">OWASP ZAP</a> or <a href="https://portswigger.net/burp">Burp Suite</a>. These tools profile an application by “spidering” or “crawling” a site. Basically, this means following each link on a given “root” page and following their associated links, so on and so forth, until you have a map of the site or web application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a1j9UpMgJYBrozNhhHIBUA.png" /><figcaption>OWASP ZAP’s main interface</figcaption></figure><p>From here, a vulnerability scanner will typically passively scan the site by looking at the page source and responses generated by the web app, searching for patterns that could be indicative of a security vulnerability. Scanners can also run an active scan, where it sends the application malformed requests. These requests can attempt to exploit vulnerabilities such as SQL injection, cross-site scripting, and more (such as those listed in the <a href="https://owasp.org/www-project-top-ten/">OWASP Top 10</a>). This is the same technique penetration testers use when starting assessments, later validating their findings manually.</p><p>All of this can be done in-house in a reasonably straightforward manner. However, running these scans locally on your machine takes time. Additionally, while active scans are handy, they can be very noisy. Sometimes a scanner might hit an interesting endpoint repeatedly with garbage data in an attempt to exploit a vulnerability. This in turn creates a lot of alerts and errors, which then get attention from various engineering teams. To mitigate this, active scans should <strong>always</strong> be announced in advance. It’s just common courtesy.</p><h3>Automating Scans, Minus The Noise</h3><p>Here at Ro, we’re utilizing <a href="https://github.com/features/actions">GitHub Actions</a> for automation. GitHub Actions are an awesome way to create custom automation workflows directly in a GitHub repository. <a href="https://github.com/marketplace/actions/owasp-zap-baseline-scan">OWASP ZAP now has a GitHub Action</a> we can use to automate these scans all in GitHub! The baseline scan action will spider a given application for 1 minute, to get a profile of the app. Then it will passively scan the scoped app for any vulnerabilities or information disclosure using a provided ruleset. It will <strong>not</strong> send malformed requests, avoiding the noise of active scans.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*IbYn0mmYBxz5yQ4gP-df3Q.png" /><figcaption>OWASP ZAP GitHub Action… in action</figcaption></figure><p>We have a repository in our GitHub organization where the OWASP ZAP action is stored and runs. We run the baseline scan action on a routine cadence against our production web applications. Each web application scan runs in its own separate job simultaneously during the workflow. The scan is typically completed in about 2–3 minutes. Once the scan completes, an HTML report is generated and stored as an artifact for each job. If a new vulnerability is found on any web app, a job will fail and a ticket will be created automatically for us on the security team. From there we can take a look at it as soon as possible and determine what action should be taken.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q3Vwm20ouTt9mO9tPr5kDw.png" /><figcaption>OWASP ZAP GitHub Action workflow visualized</figcaption></figure><p>Scaling this workflow for new apps in scope for testing is very easy. We can create a new job by copying the YAML configuration of an existing job and changing the URL being scanned.</p><p>That’s it.</p><p>Furthermore, this can be extended into the build and testing process using the active scan action. This way, active scans can be completed without generating production or staging environment alerts.</p><h3>What Are The Benefits?</h3><p>Automating these scans reduces the time spent on setting up scans to run locally. Since projects like OWASP ZAP are open source, it gives us an opportunity to craft it to our needs. As a result, ZAP is now usable as a customizable GitHub Action we can use for free. Similar paid solutions for web application scanning can cost tens of thousands of dollars per year. With a lot of these solutions, you are paying for a fancy wrapper around a core that’s essentially OWASP ZAP. We try to use the open-source tools we already have available to us to their full potential, rather than buy a pre-made solution.</p><p>A potential attacker will run scans like this to get a rough idea of an application’s security posture, so this serves as a good periodic check of your application. <strong>Disclaimer: This is not a replacement for a penetration test, nor is it a replacement for a full assessment with an active scan.</strong> These scans are meant to “knock on the front door”, so to speak.</p><p>Having an automated process for finding and reporting new web app vulnerabilities should help you focus more on finding the fixes. Combining automation with GitHub actions and OWASP ZAP can make for a fun and insightful security project, as it has here at Ro.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f4bcaf21ffc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ro-engineering-blog/using-github-actions-to-automate-web-app-vulnerability-scanning-3f4bcaf21ffc">Using GitHub Actions to Automate Web App Vulnerability Scanning</a> was originally published in <a href="https://medium.com/ro-engineering-blog">Ro Engineering Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Measuring Modularity]]></title>
            <link>https://medium.com/ro-engineering-blog/measuring-modularity-45abe4297896?source=rss----f3e4bb9b8f68---4</link>
            <guid isPermaLink="false">https://medium.com/p/45abe4297896</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[measure]]></category>
            <category><![CDATA[interdependency]]></category>
            <category><![CDATA[modularity]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Mike Mason]]></dc:creator>
            <pubDate>Thu, 06 Aug 2020 18:35:35 GMT</pubDate>
            <atom:updated>2020-08-06T18:35:35.693Z</atom:updated>
            <content:encoded><![CDATA[<h4>Creating Objective Measures of Modularity in Python</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hnE64Pn2Gf9dQcIYGV4HFQ.jpeg" /></figure><p>I’ve spent most of my career in monolithic codebases. C, C++, Python, Javascript — none are safe from our temptation to paint outside the lines, mixing disparate areas of code.</p><p>When working in a monolith, it is essential to maintain modularity. Keeping modules small and well-isolated with clearly defined APIs <a href="https://static.wixstatic.com/ugd/5f8518_658a7c0082bd4cf8ab80a06869fe9721.pdf">reduces the chances of introducing bugs and shortens development time</a>. A fully modular, or <em>polylithic</em> project, gives us the flexibility of modular design and the benefit of transactions and synchronous execution inherent in monolithic development. Let’s look at how we might structure and validate such a polylith in Python.</p><h3>Defining Modularity</h3><p>Modularity is a measure of interdependence within modules and independence between modules. Measuring that independence is a matter of counting the dependencies between files inside and outside of each module.</p><p>Note that it is vital that modularity be objectively <em>measurable</em>. It is the inverse of <em>invalid interdependency</em>, i.e., interdependency between modules that bypasses defined interfaces. We can therefore numerically represent modularity as a number between 0 and 1:</p><pre>modularity = valid_dependencies / total_dependencies</pre><p>For example, let us say that <strong>Module A</strong> depends on <strong>Module B</strong>. There are several valid dependencies in which Module A is calling interface functions of Module B. However, there is one invalid dependency in which Module A calls the internal logic of Module B directly, bypassing that module’s interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/0*5jz5kmmO4hCylWBg" /><figcaption>Figure 1: Module dependencies</figcaption></figure><p>The more invalid interdependencies, the lower the modularity score. To achieve a polylithic structure, we need to detect and remove these invalid dependencies.</p><h3>Modularity and Python</h3><p>In the simplest structure, modules — as we define them here — have at least two parts: an interface and a core. The interface should be the only file depended on by any file outside of the module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/169/1*-k8cDu5sYpk9jDyCNVdp1Q.png" /><figcaption>The Simplest Polylith</figcaption></figure><p>In this structure, an invalid dependency would look like this:</p><p><strong>module_b/core.py</strong></p><pre># Module B core logic - do not access outside Module B</pre><pre>def module_b_core_function_one():<br>    pass</pre><pre>def module_b_core_function_two():<br>    pass</pre><p><strong>module_b/interface.py</strong></p><pre># Module B public interface</pre><pre>from module_b.core import module_b_core_function_one<br>from module_b.core import module_b_core_function_two</pre><pre>def do_some_work():<br>    module_b_core_function_one()<br>    module_b_core_function_two()</pre><p><strong>module_a/logic.py</strong></p><pre>import module_b</pre><pre>module_b.interface.do_some_work() # ok, it uses the interface<br>module_b.core.module_b_core_function_one() # interface violation</pre><h3>Detecting Invalid Dependencies</h3><p>Invalid interdependencies can be detected using static analysis (parsing and evaluating code without running it). Using a tool like SciTools Understand, we can parse and extract entities and relationships. I will use Understand in this example, but anything that can parse and analyze Python should work. Detecting dependencies happens in four steps:</p><ol><li>Extract a list of all files used in the system</li><li>Extract a list of which entities (classes, functions, vars, etc.) are “owned” by which files</li><li>Use entity relationships to infer file relationships</li><li>Validate that any relationships between modules use only interface files</li></ol><h4>Step One — Extract Files</h4><p>Everything is an <strong>entity</strong> to Understand. Entities can be classes, files, functions, variables, and more. For this step, we need to extract every <strong>file entity</strong> in the system into a list.</p><h4>Step Two — Extract Ownership</h4><p>Understand does not have a clean way to identify which functions, classes, etc. are defined inside a particular file. In some languages (Java, C#, etc.) it’s possible to have definitions span multiple files (such as partial classes). For Python, we need to identify the relationship between file entities and other entities that are a “Declare” or “Define” type, that will tell us which file own which entities.</p><h4>Step Three — Get File Relationships</h4><p>Now that we have relationships between entities (refs) and file entity ownership, we can infer which files are related to other files by examining how the entities are used across them. Note that for this step, we ignore “import” references and only look at real usage.</p><p>Note that a quick and dirty way to do this is to look only at import statements. It is possible, though, to both import something that is not used and use something that is not directly imported (such as a function of an imported module that may be defined in some other module entirely).</p><h4>Step Four — Validate Module Definitions</h4><p>In the final step, we need to validate that the relationships between files match our understanding of the defined interfaces. To do this, we will need to provide some information about how an interface should look. We can do this in a variety of formats (YAML, JSON, etc.), but I will use JSON here as an example:</p><pre>[{<br>    “name”: “module_a”,<br>    “files”: [“module_a/*”],<br>    “interfaces”: [“module_a/interface.py”]<br>},<br>{<br>    “name”: “module_b”,<br>    “files”: [“module_b/*”],<br>    “interfaces”: [“module_b/interface.py”]<br>}]</pre><p>The above defines two modules. For each module, we need to check that any references into the module from outside of the module reference <em>only</em> the files marked as interfaces. If there are any violations, they can be listed. It is also possible here to use Understand to find the exact file path and line number of the violation.</p><h3>Conclusion</h3><p>When we think of clean code, we often focus on entities inside a single file: classes, functions, etc. In monolithic development, it is essential to also look at the overall hidden structure of the code and how files relate to each other. By measuring modularity and identifying interface violations automatically, we can ensure that our code stays in well-isolated and easily digestible modules.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45abe4297896" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ro-engineering-blog/measuring-modularity-45abe4297896">Measuring Modularity</a> was originally published in <a href="https://medium.com/ro-engineering-blog">Ro Engineering Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Things I’ve Learned About The Tech Lead Role]]></title>
            <link>https://medium.com/ro-engineering-blog/things-ive-learned-about-the-tech-lead-role-f8d70e8ce05b?source=rss----f3e4bb9b8f68---4</link>
            <guid isPermaLink="false">https://medium.com/p/f8d70e8ce05b</guid>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[pair-programming]]></category>
            <category><![CDATA[mentorship]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Chandler Moisen]]></dc:creator>
            <pubDate>Thu, 06 Aug 2020 16:41:46 GMT</pubDate>
            <atom:updated>2020-08-06T16:42:59.715Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K9reS0lZqXp-8Z7PWixUGQ.jpeg" /><figcaption>People vector created by pch.vector — <a href="http://www.freepik.com/">www.freepik.com</a></figcaption></figure><h4>Tips to help you make the transition</h4><p>At the beginning of the year, I transitioned into the tech lead role on my squad at Ro. Needless to say, I was a bit timid! From what I had heard, a tech lead mixes two opposing sets of skills — manager-esque activities and software engineer expectations — with not exactly enough time to really focus on both.</p><p>While there is no shortage of fantastic writing on the tech lead role and its functions, I wanted to contribute my thoughts to the discussion by sharing ten things I have learned about the role since I stepped into it. Hopefully, these reflections will help aspiring tech leads navigate their own transition.</p><h3>1. Be Patient</h3><p>Make sure that you are patient with yourself as you transition into the role. You will be departing from a familiar routine you’ve spent your career mastering and picking up an entirely new set of responsibilities. Leaving your comfort zone is scary. No one, including yourself, will expect you to navigate this transition seamlessly. You will have questions. You will be uncertain of yourself. Yes, you might even make mistakes. Just remember, you were given the role for a reason.</p><h3>2. Lead By Example</h3><p>A particular challenge of the role is that you must rely on influence, as opposed to authority, to see your vision for the team carried out. The number one strategy here is to be the change you wish to see and lead by example. If you want clear acceptance criteria on tickets, be sure to write clear acceptance criteria for your tickets. If you want the team to share knowledge, publicly offer to pair on a ticket and share your knowledge first.</p><p>Another tip: be sure to praise behaviors you wish to see more of publically. Whether you realize it or not, you are in a position of leadership and the team is looking at you for guidance on how you work together.</p><h3>3. Strengthen the Team</h3><p>The team is your number one responsibility as a tech lead. Learn to embrace the role of “multiplier” as your job is to strengthen the skills and confidence of your fellow team members with the end goal being to improve the overall output and quality of work of the team. There are several ways to go about this.</p><p>First and foremost, get to know a bit more about each member of your team. Ask them what they are trying to learn and how you can help. For example, is a team member trying to expand their knowledge across the stack? Does a QA engineer want to focus on more product work? Be sure to regularly remind your teammates that you are there to help them grow as it can be difficult to get some people to take you up on this offer.</p><p>Once you understand what your teammates are looking to learn, work with your engineering and product managers to identify well-scoped challenges your teammates grow. Make sure you become an advocate for your teammates here. Always be on the lookout for ways they can improve and communicate this with them frequently.</p><p>Don’t expect your work to end there: be prepared to spend a lot of your time pair programming. Invest time in learning <a href="https://martinfowler.com/articles/on-pair-programming.html">pair programming strategies</a> and how to do it effectively. You have valuable experience to share, and it is your job to share it! That said, do not be surprised if your teammates do not immediately take you up on your offer to pair. It takes time to build trust to a point where someone might reach out to you for help.</p><p>Lastly, your responsibility to the team does not end with your fellow engineers. Be sure you are working to support the designers and product people on your team as well.</p><h3>4. Promote Ownership</h3><p>Autonomy as an engineer is important. We want to feel that we have a stake in what we are building and that we are useful to the organization beyond just implementing code. Likewise, we want to work in highly autonomous, empowered teams that often feel more motivated and productive. Be sure to encourage ownership amongst your team members. Get them excited to lead initiatives, no matter the size.</p><h3>5. Take A Back Seat</h3><p>Don’t be afraid to let someone else lead. You might feel that because of the “lead” in your title that you alone are responsible for every decision the team makes. This could not be further from the truth. Again, your job is to strengthen your team and what better way to do so than by taking a back seat and encouraging your teammates to lead.</p><p>Beyond taking ownership of projects as mentioned above, there are many other ways to promote leadership. It can be as small as asking someone for their opinion during a meeting. If you are discussing a ticket during planning and you have questions about how the ticket will be QA’ed, make sure to publicly ask the QA engineer. Even if you know the answer, giving your teammates center stage and the ability to share their expertise is important.</p><p>Another great way to promote leadership, especially among your more junior colleagues, is to get their input on implementations. Better yet, ask to pair with them and have them walk through a problem they are working on or a piece of the system they are familiar with. This has a dual benefit of providing your teammate with confidence in their abilities, and you might even get to learn something new. Search “<a href="https://hbr.org/2019/10/why-reverse-mentoring-works-and-how-to-do-it-right">reverse mentoring</a>” for more details.</p><h3>6. Code Less</h3><p>Expect the time you spend coding to decrease. By how much will depend on your firm, the size of your team, and the size of your backlog. I struggled with this point. It was difficult passing on tickets I knew I could rip through to focus on other work. It took a few months to understand that it was perfectly acceptable if I did not commit against the codebase every day.</p><p>Of course, you will not be abandoning the codebase entirely either, but expect to work more on architecture and systems design problems and get ready to read and write lots of technical documentation.</p><p>If you are still itching to contribute directly to sprint work, remember to look for ways beyond coding to help move your team’s work along: offer to pair with someone on a challenging ticket, help write tests, perform QA, and pick up the work that nobody else wants.</p><h3>7. Listen More</h3><p>Expect the time you spend in meetings to increase. You will be getting much more face-time with product managers, designers, and various stakeholders. Spend time preparing for these meetings. While your primary job is to strengthen your immediate team, you should also be working on gaining the trust of stakeholders from across the organization. Listen, take notes, and ask responsible questions. Show these stakeholders that the person charged with delivering their software solution cares deeply about their problem area.</p><p>Also, take advantage of these meetings to observe the product development process at your firm and look for small ways to improve upon it. For example, advocate for increased representation from engineering earlier in the product development process.</p><h3>8. Manage your Time</h3><p>A great piece of advice my manager gave me when I moved into the role was not to stretch myself thin. I recall laughing inside as I was a master of my time — how wrong I was. It is very easy to overload yourself in this role. Between writing technical design documents, shadowing designers on user interviews, planning the next sprint, and pairing with a team member, and putting out fires the role exposes you to a lot very quickly. Do yourself a favor and take the first few months slower than usual. You don’t want to burn out before you get started.</p><h3>9. Learn the Business</h3><p>While you should hopefully be familiar with the business your software supports, take it upon yourself to invest in building a detailed knowledge of your business’s internals. Start with the basics: how the company generates revenue and how your team contributes to the bottom line.</p><p>To move beyond the basics, reach out to the leaders of the internal teams your software supports and ask for a question/answer session. One of my most impactful meetings at Ro was with a senior leader on the operations team who took the time to share his vision for the product and what success looked like for his team.</p><h3>10. Support the Organization</h3><p>At the end of the day, you and your team are writing code to support the organization. Thus, it only makes sense to get to know members of the organization beyond the engineering and product teams. Start with getting to know the non-technical people your code supports — become a resource to them. If they are relying on your code, be sure to let them know you care. Put on your product manager / design lead hat and set aside time to watch them use it. Ask about their workflows and what could be better. These conversations are invaluable as a tech lead: you become more acquainted with your users and their problems. At the same time, the organization as a whole begins to see you as a relatable engineer who cares about the product.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8d70e8ce05b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ro-engineering-blog/things-ive-learned-about-the-tech-lead-role-f8d70e8ce05b">Things I’ve Learned About The Tech Lead Role</a> was originally published in <a href="https://medium.com/ro-engineering-blog">Ro Engineering Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In the Wild: Monitoring and Alerting on Applications in Production]]></title>
            <link>https://medium.com/ro-engineering-blog/in-the-wild-monitoring-and-alerting-on-applications-in-production-ef4c8c538d34?source=rss----f3e4bb9b8f68---4</link>
            <guid isPermaLink="false">https://medium.com/p/ef4c8c538d34</guid>
            <dc:creator><![CDATA[Kelly Froelich]]></dc:creator>
            <pubDate>Fri, 17 Jan 2020 17:53:45 GMT</pubDate>
            <atom:updated>2020-01-17T17:53:45.465Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2DwxWqb8WRuGDQs0" /></figure><p>You release your application to production. Now what? Here at Ro, we test and monitor at all stages of production from the first stages of building a feature to when the feature is live in production.</p><p>Monitoring and alerting on applications in production is the backstop to ensuring a high-quality product. The goal of monitoring and alerting, in a metaphor to baseball, is <em>not</em> to prevent wild pitches from getting past the catcher (or bugs from getting into production), but rather to catch them early, resulting in a single stolen base instead of a steal at home plate.</p><p><strong>Alerting</strong></p><p>Our philosophy on alerting is that if everything is alerted on, then nothing is alerted on. Instead, we have <strong>3–5 key business metrics for each application</strong> that indicate its health. These metrics have set thresholds that fire an email if breached.</p><p>The first firing is a “warning shot”, indicating that a threshold was softly breached and there may be a business-affecting bug. The second firing is the alert, indicating that a hard threshold was breached and that investigation is necessary to confirm a bug and communicate with the affected stakeholders if a true positive. <em>More on communication below.</em></p><p>No alerts does <em>not</em> guarantee no bugs. Rather, no alerts mean that any bugs in production are not materially affecting the business in the metrics that we care about most. In addition, as these alerts fire proactively, it allows the team to continue with the day-to-day without constantly remembering to refresh a dashboard on health metrics to see if anything is breached.</p><p><strong>Monitoring</strong></p><p>While alerting is a science (if metrics falls below X, then alert), monitoring is an art. For each application, we have dashboards built in Looker that show visualizations of key metrics, such as hourly conversion rate compared to the average conversion rates of the previous three weeks and the percent delta between those numbers. Here, our team is able to identify patterns in the data and discern anomalous behavior from these patterns.</p><p>For example, a few weeks ago, a teammate of mine noticed a dip in the number of renewals we had on a given day. The dip was not large — nothing to sound an alarm — but after investigation found that we were sending out a broken renewal link. Fix implemented, bug fixed. We had a business-affecting bug in the system for only 24 hours instead of, perhaps, 24 days.</p><p><strong>Incident Response</strong></p><p>Alerting and monitoring become null and void if nothing is done about it. Therefore, when we launched application health monitoring, we also launched it with a protocol for investigation. Our QA team leads the investigative process on a rotating on-call schedule. If an alert fires or if the monitoring shows an anomaly, the point person conducts an investigation to determine if there truly is a problem, utilizing the application experts for where the anomaly is occurring.</p><p>For instance, a low top of funnel may indicate a problem on our webpage or an expected dip in traffic. To determine if it is the former or the latter, we rely on our domain experts and reach out directly to work together if we receive an alert or see a pattern in the data. However, if and when the problem is confirmed, it is time to implement the process. For severe business-affecting bugs, we trigger our incident response protocol. For bugs that do not require incident response, we have a dedicated Slack channel where representatives from across the company, in addition to engineering, are present and are tagged specifically so that they are aware.</p><p>Our goal is to be the first in the company to catch a bug and the first in the company to communicate the bug <em>without</em> being known for crying wolf (but to err on the side of crying wolf instead of silence).</p><p><strong>Communication</strong></p><p>Communication is key. Just as alerting and monitoring are null and void if nothing is done, incident response is null and void if nothing is communicated. The first step in communication is ensuring the response team is equipped with all needed information to tackle the issue, so we like to provide both high-level numbers on the scope of the problem (e.g. number of people affected) but also specific examples to investigate.</p><p>The second, and equally important, step in communication is with key stakeholders. Communication with stakeholders is not one-way nor is it purely downstream. Rather, we utilized the expertise of these stakeholders to determine what metrics were most important to monitor when we began building the application monitoring and alerting process. We reviewed the monitoring and alerting metrics for feedback with these stakeholders and gave them full access and training to the dashboards so we can align on the data we are seeing. We created a two-way, instant communication channel in Slack for if these metrics were breached for discussion on the root cause. We conduct “exterminator reports”, which are brief Slack messages to recap any bugs caught in the previous week and, more importantly, their business impact. Ultimately, we make sure we are all on the same team in ensuring the health of our applications.</p><p><strong>System &lt;&gt; Business</strong></p><p>Our next frontier is combining our system metrics monitoring (e.g. what is our latency) with our business metrics monitoring (e.g. what is our conversion rate). The importance of this combination is that we will be able to understand how our system affects our business. “The site is down” evolves into “the site is down so we lost Y potential customers”. As engineers, it is easier to stay in the frame of mind of the former, but it is the latter where we use our understanding of the business to create a better system.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef4c8c538d34" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ro-engineering-blog/in-the-wild-monitoring-and-alerting-on-applications-in-production-ef4c8c538d34">In the Wild: Monitoring and Alerting on Applications in Production</a> was originally published in <a href="https://medium.com/ro-engineering-blog">Ro Engineering Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ro.Codes: Building Products in HealthTech]]></title>
            <link>https://medium.com/ro-engineering-blog/ro-codes-building-products-in-healthtech-9b7ab1121198?source=rss----f3e4bb9b8f68---4</link>
            <guid isPermaLink="false">https://medium.com/p/9b7ab1121198</guid>
            <category><![CDATA[healthcare]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[speaker-series]]></category>
            <category><![CDATA[health-technology]]></category>
            <dc:creator><![CDATA[Kelly Froelich]]></dc:creator>
            <pubDate>Tue, 14 Jan 2020 16:06:41 GMT</pubDate>
            <atom:updated>2020-01-14T16:06:41.117Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*guBql7Kg2NVODYul-QcNQg.jpeg" /></figure><h3>Building innovative user experiences in highly regulated industries</h3><p>While Zuck’s motto “move fast and break things” became playbook advice for every growing startup, does this adage apply to healthcare technology startups? What are the constraints and opportunities of innovating in the highly regulated healthcare industry where patient safety is paramount?</p><p>In our inaugural Ro.codes panel, we’ll chat with Product leaders from leading healthcare technology companies in NYC to discuss the challenges and opportunities around innovating in healthcare technology. We’ll ask questions such as:</p><ul><li>How can you quickly launch products that help bridge the gap for unmet needs while keeping patient safety at the forefront of planning?</li><li>What are the gaps that currently exist in the healthcare tech landscape?</li><li>How do you balance the tension between the need for rapid growth and the careful consideration required in a healthcare company?</li></ul><p>Join us on Thursday, February 6th at 6:30 pm for an engaging panel moderated by Danika Cleary Laszuk, GM of Betaworks Camp (formerly with Jawbone and Apple), as she sits down with:</p><ul><li>Elizabeth Burstein, Head of Product at Maven (formerly with Zocdoc, Blue Apron, and LinkedIn)</li><li>Michele Gregory, Product leader at Capital One and former Manager of Web Development at WebMD with over 17 years of experience in the tech sector</li><li>Jess Prager, VP of Product at Ro (formerly with ClassPass and Warby Parker)</li></ul><h3>Schedule</h3><p>6:30–7:00: Check-In; Bites &amp; Refreshments</p><p>7:00–7:45: Panel</p><p>7:45–8:00: Audience Q&amp;A</p><p>8:00–8:30: Networking; Bites &amp; Refreshments</p><h3>Registration</h3><p><a href="https://www.eventbrite.com/e/rocodes-building-products-in-healthtech-tickets-88730586573">https://www.eventbrite.com/e/rocodes-building-products-in-healthtech-tickets-88730586573</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b7ab1121198" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ro-engineering-blog/ro-codes-building-products-in-healthtech-9b7ab1121198">Ro.Codes: Building Products in HealthTech</a> was originally published in <a href="https://medium.com/ro-engineering-blog">Ro Engineering Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Standup Tip for Remote Teams: Check Tickets Rather than People]]></title>
            <link>https://medium.com/ro-engineering-blog/standup-tip-for-remote-teams-check-tickets-rather-than-people-928fb8e4936c?source=rss----f3e4bb9b8f68---4</link>
            <guid isPermaLink="false">https://medium.com/p/928fb8e4936c</guid>
            <category><![CDATA[stand-up]]></category>
            <category><![CDATA[remote-work]]></category>
            <category><![CDATA[scrum]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[agile]]></category>
            <dc:creator><![CDATA[Mike Mason]]></dc:creator>
            <pubDate>Fri, 15 Nov 2019 22:13:33 GMT</pubDate>
            <atom:updated>2019-11-15T22:13:33.586Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*srmLaJjuX1GZPA29pXHDmw.jpeg" /></figure><p>Engineering at Ro isn’t constrained by traditional agile as we are keen on experimentation. Most recently, we’ve tried several different variants of stand-up, and we’re excited to share our results with you. The stand-up experiment was particularly interesting to us because we are a distributed team and were curious if an alternative to the classic model of stand-up could yield better results. Let’s take a look at a few different methods we experimented with and the results of each one.</p><h4>Round-Robin</h4><p>Traditionally, standups take place in a conference room or huddle area with all the team members physically standing up in a circle. One person starts and then the rest of the team gives a status update in order around the ring.</p><p>Our team is mostly remote, so many times we’re not standing and we’re in no particular order. Using the Moderator and Popcorn methods below, we’ve tried to emulate the round-robin style in a remote context.</p><h4>Moderator</h4><p>This version required one person to act as the moderator and call out the next person in line for a status update. This created a problem because often people on the line weren’t ready when they were called or would give their update and then tune out. It also added an extra burden for someone to “run” the standup.</p><h4>Popcorn</h4><p>In the popcorn style, the person who just finished their update is responsible for calling on who goes next. This was useful for a while because it kept the team more engaged because they had to track who had and hadn’t had a turn yet. But with a medium-size (15 members) team it became difficult to track who was left, causing minor confusion to net out the value it originally added.</p><h4>Ticket Focus</h4><p>What worked best for our team was to toss out the idea of going person-by-person and instead focus on the work. We now review tickets, not people, one at a time via a screen share. We look at tickets in Jira from right to left, omitting anything that was completed or hasn’t been started.</p><p>The major benefit of this is that tickets in limbo don’t get stuck. Sometimes an engineer might assume that a tester has taken it, or a tester may assume that an engineer is working on a fix and then nothing gets done. By looking at the work, we know immediately who is responsible for the next steps. We are able to easily identify blockers by checking where a task is in the flow.</p><p>Instead of the typical questions “what did you do yesterday?/what will you do today?” we’re asking questions like “what progress has been made on this ticket since yesterday?” and “How can we move it forward?”</p><p>This method creates a lot of engagement and participation from everyone on the team.</p><h4>Conclusion</h4><p>For in-person standups without a task board to look at, round-robin still seems to be king. For remote standups and screen shares, ticket focus is our new favorite.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=928fb8e4936c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ro-engineering-blog/standup-tip-for-remote-teams-check-tickets-rather-than-people-928fb8e4936c">Standup Tip for Remote Teams: Check Tickets Rather than People</a> was originally published in <a href="https://medium.com/ro-engineering-blog">Ro Engineering Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Refactor with Purpose]]></title>
            <link>https://medium.com/ro-engineering-blog/refactor-with-purpose-7daf7c7cf86d?source=rss----f3e4bb9b8f68---4</link>
            <guid isPermaLink="false">https://medium.com/p/7daf7c7cf86d</guid>
            <category><![CDATA[refactoring]]></category>
            <category><![CDATA[economic-software]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[tech-debt]]></category>
            <dc:creator><![CDATA[Mike Mason]]></dc:creator>
            <pubDate>Wed, 13 Nov 2019 04:35:12 GMT</pubDate>
            <atom:updated>2019-11-13T04:35:12.384Z</atom:updated>
            <content:encoded><![CDATA[<h4>Avoid the Easy Win</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*U1sjaw3JR5FIbB-S8WsjXg.jpeg" /></figure><p>When pursuing a refactoring effort, it is important to avoid tasks that are considered an “easy win”. More difficult fixes reap greater rewards. Let’s take a look at the most beneficial ways to spend our precious refactoring time.</p><p>Many engineers have experienced the slog of working in a bloated codebase that seems to break at the drop of a hat. Asking for time to fix ingrained complexity is a tough sell for product managers: engineers want time to change the code, but not add any features nor fix any bugs.</p><p>It is understandably difficult to see how refactoring can be a good financial investment, but with the right strategy, we can earn a significant return.</p><p>First, let’s look closely at <em>technical debt</em> and <em>technical interest</em>.</p><h4>Technical Debt</h4><p>Technical debt builds up when engineers take shortcuts to get features out faster. It is the difference between optimal and realistic release dates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YHA4aevY6X-yX8U9rFNcpA.png" /><figcaption>Remaining Work vs Time</figcaption></figure><p>Tech debt in a codebase is not an immediate indication that software quality is suffering. Rather, tech debt is perfectly normal and sometimes an indication of healthy growth.</p><p>Let’s draw an analogy to financial debt. If a business owner can sell a product faster than she can make it, she might take out a loan to expand operations to turn a greater profit. In this case, the debt indicates the company is growing very fast — a sign of financial health.</p><p>Similarly, an engineer might take out “tech loans” to build a system out more quickly so it can start making money faster.</p><p>The difference is financial debt must be repaid or the bank will come knocking on the door. Technical debt can accumulate for years, silently taking its interest payment in the form of reduced productivity, defined here as <em>technical interest</em>.</p><h4>Technical Interest</h4><p>The fact that technical debt carries interest is often overlooked. Every time a technical loan is taken, future changes are just slightly more difficult, and we slightly increase the chance of introducing bugs down the line.</p><p>Over time, this added difficulty becomes noticeable by engineering as a general feeling that things are getting harder to change. Inevitably project velocity will drop due to increased complexity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k-_9YMKdAjzcUzo2UWSKyA.png" /><figcaption>Effort vs Time</figcaption></figure><p>Some types of tech debt have higher interest rates than others. For example, a snippet of code that might need some better inline documentation but likely won’t be touched by anyone for a few years is low interest. Conversely, a set of core files that are interdependent and excessively complex have a much higher chance of having a negative impact, so they are considered high interest.</p><p>Eventually, tech loans need to be paid down or the software can risk “technical insolvency” — the point at which 100% of the engineering effort is used to maintain the project and fix bugs. Technical insolvency usually leads to a company labeling some code as “legacy” and rebuilding its product from scratch.</p><p>To pay down technical debt, we use the process of <em>refactoring</em>.</p><h4>Refactoring</h4><p><a href="https://refactoring.com/">Martin Fowler</a>, an authority on the subject, describes refactoring as:</p><blockquote>“… a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.”</blockquote><p>This statement is true, but to refactor <em>with purpose</em> we must go beyond this definition and understand <em>why</em> we want to refactor in the first place.</p><p>By applying refactoring to a complex system, we end up with software that is functionally equivalent to what it was before. However, time to develop new features, the chance of introducing bugs, and the learning curve for new engineers are all significantly reduced.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*dfcYB0Uvc-QqNV-i2nCljA.png" /><figcaption>Effort vs Time</figcaption></figure><p><strong>By refactoring, we lower our overall tech debt interest rate and gain a return on our investment of the time it takes to refactor.</strong></p><p>As with any project, before beginning a refactoring effort we need to answer these two questions:</p><ol><li>Where do we start?</li><li>How do we know when we’re done?</li></ol><h4>Where do we start?</h4><p>Let’s again compare with financial debt. Let’s pretend we have taken the following loans:</p><p>$10,000 @ 20% APR</p><p>$1,000 @ 5% APR</p><p>If you have $1,000 to spend on paying down loans, where do you spend it? It should be obvious that even though we could afford to pay off the smaller loan first, the money should go to the larger loan because it has a higher interest rate. The smaller loan is an “easy win”, it makes us feel good now but it is not the best long-term decision.</p><p>In this case, the answer to the question “where do we start” is to start with the loan that has the highest interest rate, because that will have the most downstream impact.</p><p>The same is true of software. When engineers get time to pay down tech debt, they often gravitate toward low-interest changes, the easy wins. The trouble is, there will <em>always</em> be more easy things to clean up and the highest interest rate debt will go unchecked.</p><h4>How do we know when we’re done?</h4><p>The simplest answer is “when the debt is gone”, but that’s not realistic. Both financially and in software development, the answer is “when the debt is no longer a burden”.</p><p>We should strive to keep our tech debt interest rate at a comfortable level, that is, at a point that it doesn’t impact our ability to be agile developers.</p><h4>Conclusion</h4><p>I know that sometimes on Friday afternoon we’re just looking to fill out our day and want a quick cleanup task to work on. There’s nothing wrong with that.</p><p>When it comes to concentrated refactoring efforts aimed at making the code easier to read, modify, and test — ignore the easy wins and go for the hard stuff. In the long run, you’ll have a greater impact on everyone.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7daf7c7cf86d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ro-engineering-blog/refactor-with-purpose-7daf7c7cf86d">Refactor with Purpose</a> was originally published in <a href="https://medium.com/ro-engineering-blog">Ro Engineering Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>