<?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[Omada Health Engineering - Medium]]></title>
        <description><![CDATA[Behind the scenes with Omada Health Engineering - Medium]]></description>
        <link>https://medium.com/omada-health-tech?source=rss----c337ce816c8a---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Omada Health Engineering - Medium</title>
            <link>https://medium.com/omada-health-tech?source=rss----c337ce816c8a---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 00:00:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/omada-health-tech" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Standardization = Self-Service]]></title>
            <link>https://medium.com/omada-health-tech/standardization-self-service-7a72e5355706?source=rss----c337ce816c8a---4</link>
            <guid isPermaLink="false">https://medium.com/p/7a72e5355706</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[health-technology]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Omada Health Engineering]]></dc:creator>
            <pubDate>Mon, 12 Oct 2020 16:43:46 GMT</pubDate>
            <atom:updated>2020-10-12T16:44:24.221Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Written by </em><a href="https://www.linkedin.com/in/jacob-smith-871812149/"><em>Jake Smith</em></a><em>, Platform Engineer II</em></p><p><strong>Platform &amp; Developer Productivity Creating Self-Service for Devs</strong></p><p>At Omada Health, we like shipping software fast. It allows us to inspire and engage participants and work them more effectively for healthy lifestyle changes. In order to do that, we need to have a team that is well-integrated and responsive to the needs of our developers so that developers can do what they do best — develop! The platform team at Omada fills that need and is constantly looking out for how to streamline our processes and code to enable collaboration and understanding. Over the past year, we have identified several areas that we believe need improvement and this blog post, the first in a series, will focus on SNS/SQS.</p><p><strong>SNS/SQS</strong></p><p>SNS (Simple Notification Service) and SQS (Simple Queue Service) are two Amazon services that allow for services to communicate with each other by passing messages through a publish-subscribe pattern. As Omada has continued to scale up, SNS/SQS has been invaluable as a way for microservices to communicate with one another.</p><p>In the early days of our use of SNS/SQS everything was hand rolled via UI in AWS and for the most part it worked pretty well. There were not that many apps, and our topic-queue mappings were fairly straightforward. As we started to scale, everything still worked pretty — for a time — as the service itself scales well. But as we began to add new applications, it became harder and harder to get it “right” every time. When we began using terraform, we simply imported what we had and it allowed us to continue on in more or less the same way for a number of years.</p><p>Then a new spate of new applications needed to be built for a big microservices push. Our old process required team members to wait for the platform team to dedicate time. Even on the platform team itself, this knowledge was not widely available, so only one or two team members could build the resources correctly. It became clear that the process needed to scale to meet the demands of our growing business.</p><p>If waiting on a platform engineer had been the only pitfall, some documentation would have sufficed, and business as usual could continue. But the further we explored the problem, additional issues arose. First, every queue and topic was not named for a specific environment, but for whether or not it was a production queue or topic. For production queues and topics, it mapped cleanly to production, but the system broke down when various non-production environments had a generic name assigned instead of associating it with the type of environment it was meant to be used for. Second, permissioning needed to be more granularly handled without causing any unintended consequences during deployment. Additional security policies necessitated more refined queue management. Finally, every time we attempted to fix issues, it became clear we had to rethink <em>how </em>we addressed resources without inadvertently impacting other applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hMGe0KHMKp0mi1QO" /></figure><p><strong>The solution</strong></p><p>The solution lay in a bit of trial and error. We had to revoke certain permission to see what broke! For the first time, we had to define how we expected applications to use the service. Here were the results:</p><ol><li>Each topic had to be owned by a single application and its associated environment. This requires a well defined structure such as &lt;APP&gt;_&lt;TOPIC&gt;_&lt;ENV&gt; so that we can establish a clear responsibility for that resource in any given associated application</li><li>Each queue can subscribe to m/any topic that it wants to, but each queue is only consumed by a single application</li><li>All sqs information for an application + environment must be defined in a single place</li><li>Permissioning<br>- Every application has the ability to publish to APP_*_ENV, this is defined when an application user is created<br>- Every application is only allowed to publish to queues that are created</li></ol><p>With those parameters in mind, we created a terraform module that would adequately fit the needs of all applications. We failed. A LOT. But we persevered — and eventually, cracked it!</p><p>Before, developers had to book time on a platform team member’s calendar with one to two weeks notice. Depending on the scope of the change, it might take multiple sessions. Now, developers can create new queues and topics that can be merged the same day with minimal feedback from a platform team member. With the conclusion of these changes, we have a streamlined process for developers to make changes and we are able to audit the path of each message with the clear permissions adding more security to our applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/0*Hk2atTLU97vyJKtP" /></figure><p><strong>Databases</strong></p><p>Some of the first databases at Omada were on dedicated Linux hosts, if you can believe it. Back then, we had two databases: one for “The App,” and one for everything else. This worked for a number of years. When we moved our databases to RDS, we continued that model. RDS freed us from the overhead of running the system the database ran on and allowed us to better tune our databases and optimize costs. We frequently ran into two problems: the time it would take to spin up a new application — and noisy neighbors.</p><p>Like with SNS/SQS, developers frequently had to wait on the platform team members to allocate them a new database inside the host that held everything else. There were some attempts at automating this, but it was a fairly manual process, and required an ansible commit at its conclusion. The second problem: noisy neighbors proved to be a persistent problem up through the end of the standardization work. To start, seemingly innocuous code changes in one app could significantly degrade the performance of another app if the database usage changed <em>ever</em> so slightly. Along with that, we would sometimes have somewhat random outages for issues out of our control — in one memorable case, an update to Grafana caused it to continually read JSON dashboards out of the database and cause the ETL to fail. We tried two mitigations: outscaling the problem and splitting out some databases. Outscaling worked for a time, but it became clear that we would need to continually double our database spend. The second, splitting out databases, worked to some degree and generally helped with performance; however, the Grafana issue happened after the worst offenders were split out. Furthermore, after we had split out a few it became hard to track what databases were on which hosts so we started thinking that a certain application was the cause of the problem only to find out it was not in the database anymore. It eventually became clear that we needed a general case solution.</p><p>The solution was to split each database out to its own host with a robust terraform module. The first thing we had to do was to create a terraform module, and like with any other groundbreaking foundational changes we failed at first. One notable early failure was creating two parameter groups per database so that we could update the database to PG11 at some point in the future and quickly running into AWS resource limits. Eventually we had a robust module and generated enough documentation that developers could easily make a merge request for their new database. Now, we have each database independent of each other and they can grow as their apps dictate.</p><p><strong>Closing</strong></p><p>These features above are just a couple of examples of enabling our internal development teams to scale and be productive by being able to declare complex series of resources without needing to have detailed knowledge of the overall underneath systems. This way we are able to decrease ramp up time for developers, increase their velocity, significantly reduce deployment complexity and free up the Platform team to continue looking for future improvements.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a72e5355706" width="1" height="1" alt=""><hr><p><a href="https://medium.com/omada-health-tech/standardization-self-service-7a72e5355706">Standardization = Self-Service</a> was originally published in <a href="https://medium.com/omada-health-tech">Omada Health Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Omada and Apache Airflow]]></title>
            <link>https://medium.com/omada-health-tech/omada-and-apache-airflow-cd8e66445097?source=rss----c337ce816c8a---4</link>
            <guid isPermaLink="false">https://medium.com/p/cd8e66445097</guid>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[workflow-management]]></category>
            <category><![CDATA[apache-airflow]]></category>
            <dc:creator><![CDATA[Vivek Bhansali]]></dc:creator>
            <pubDate>Tue, 16 Jun 2020 17:49:57 GMT</pubDate>
            <atom:updated>2020-06-16T17:49:57.746Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q53qdiLWqnJgeVqhLSmGSQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@omarg247?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Omar Flores</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Apache Airflow is a popular open source data orchestration framework which allows developers to programmatically author and schedule workflows. At Omada, we use Airflow to dynamically create, schedule and monitor complex workflows that support various business needs.</p><p>This post assumes you have basic knowledge of Airflow and focuses on a high-level overview of how the data engineers at Omada have integrated Airflow as a core tool for creating and managing various Data and Machine Learning pipelines, triggering report generation and various data extracts from third party applications.</p><h3>Omada’s Airflow Fork</h3><p>At Omada, we decided to fork the Airflow repository and modified the original implementation in order to create a custom “DAG Dependency” feature — which enables explicitly defining upstream DAG dependencies in DAG definition. As it happened, many of our pipeline designs contained multiple DAGs that had various upstream and downstream DAGs. As a result, we heavily depended on Airflow Sensors to maintain the correct order of execution. Adding a sensor for all of our DAGs added additional overhead on workers and also used up many of the worker slots, sometimes blocking other operators. Instead of using Airflow’s sensors, we implemented our own solution that allows us to explicitly define DAG dependencies within the DAG definition. Let us try to understand the DAG dependency feature implemented at Omada in some more detail.</p><h4>DAG Dependency Feature</h4><p>Consider an example of defining non-cyclic DAG dependencies for a given DAG, <em>dag_1</em>. Based on the image below, <em>dag_2</em> has an upstream dependency on <em>dag_1</em>. Similar to the way successful task completion triggers the next task in Airflow, here, <em>dag_2</em> will wait for <em>dag_1</em> to complete before it continues executing its tasks. Omada’s “DAG dependency” feature enables us to create a data pipeline by linking different workflows together without relying on Airflow sensors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*XFtSy3rsgr_nFwjP9oyTqA.png" /><figcaption>DAG Dependency</figcaption></figure><p>The approach of creating explicit inter- DAG dependency allows us to <strong>NOT</strong> define sensors for each DAG thus giving scheduling preference for other tasks to run and still get the ability to define the order of execution of DAGs. This enabled us to not depend on the sensors in our Airflow deployment.</p><h3>Data Pipeline</h3><p>One of the important workflows currently supported by Apache Airflow at Omada is the Data Pipeline. Data Pipeline consists of multiple extract and transform DAGs that as the name suggests extracts data from various internal Omada applications, transforms that data which is then used for reporting and analytics and finally stored in our warehouse. We will expand more on both types of workflows and explain the dependencies between them.</p><h4>Extract DAGs</h4><p>Extract DAGs serves as the starting point of our pipeline and are the first ones to run. “Extract DAGs” are all the DAGs that we have defined that extracts data from various internal Omada applications and stores it in our data warehouse (Redshift). We run all the DAGs for Data Pipeline once a day.</p><p>We have defined a single DAG for each table that we extract from some Omada application. For instance, if we are extracting `table_1`, then we will have a corresponding `app_table_1` DAG that will carry out different tasks to extract data from the corresponding “app” and insert into Redshift. Similarly, we have multiple DAGs corresponding to different tables we extract from many of Omada applications. These DAGs collectively are classified as Extract DAGs and the classification is only for contextual purpose so it is easy to understand the structure of our Data Pipeline.</p><p>Since extract DAGs are the first ones to run, it is important to note that none of the other DAGs will run until all of the Extract DAGs are completed because these DAGs serve as upstream dependencies for all the other DAGs in the pipeline (remember DAG Dependency? That’s right).</p><h4>Transform DAGs</h4><p>In addition to Extract DAGs, “Transform DAGs” further carry forward our Data Pipeline which uses an Operator that executes SQL on tables that were extracted and writes the result to a set of new tables. These Transform DAGs essentially transform and/or aggregate data from various sources and turn them into tables which are then used for analytics and reporting purposes. Naturally, these DAGs depend on data from other Omada applications, so we have to wait for all the extracts to complete before we can run them. Therefore, it has a dependency on Extract DAGs.</p><p>Together, the above two sets of DAGs make our Data Pipeline workflow in Airflow and once all of DAGs run in correct order and complete successfully, that concludes our pipeline as well. At the end of this workflow, we have all the latest data from various Omada applications in Redshift for our downstream consumers to consume.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*2RGlU-X0ejKjtONpxRcy5Q.png" /><figcaption><strong><em>Relation between Extract DAGs and Transform DAGs</em></strong></figcaption></figure><h4>Self-Serve DAG Definition</h4><p>While creating an automated workflow for extracting and transforming data is awesome, our approach wasn’t very scalable. As our company grows and changes shape, so does our data. Therefore, our Data Analysts and Data Scientists must have the ability to change the type of data that they have access to. It would be inefficient to require a Data Engineer’s time to make each modification. We have created a “self-serve” option for Data Analysts and Data Scientists to create, update and delete data extracts and transforms.</p><p>The “self-serve” feature for creating new extractions can be used by updating a configuration file which contains details of all the tables and its corresponding columns that Airflow uses to create corresponding Extract DAG.<strong><em> </em></strong>Similarly, the “self-serve” feature for creating new transforms can be used by updating a configuration file that lists all the upstream DAG dependencies for that particular transform along with uploading a SQL file for a transform.</p><p>This configuration file is then used to dynamically create DAGs to be included in the data pipeline. This has allowed us to standardize all the DAGs that makes it easier for updating DAGs across the board.</p><h3>Report Generation</h3><p>In addition to the Data Pipeline workflow, Airflow also supports triggering the generation of various internal and external reports. We generate multiple internal and external reports to send out to our various clients and internal users. These reports have different cadence for delivery based on the report type or client requirements.</p><h4>Report DAGs</h4><p>Airflow has knowledge of different reports that needs to be generated along with their cadence on when it needs to be generated. Triggering of report generation is done by creating Report DAGs in Airflow, where each Report DAG corresponds to a single report. Each of these Report DAGs have a report generation task which is responsible for triggering report generation in another application. Everyday at the conclusion of the Data Pipeline, all of the Report DAGs are scheduled to carry out a report generation task which generates the corresponding report.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*4ayTVJPgo1YKKns4i7dIVA.png" /><figcaption><strong><em>Report Generation behavior based on data pipeline</em></strong></figcaption></figure><h3>Machine Learning Pipeline</h3><p>Another important workflow supported by Airflow is the Machine Learning Pipeline. Our Data Scientists at Omada have created various models which provide great insights to engineering teams, product teams and other stakeholders. These models need to run everyday with the most recent data to generate predictions and insights.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*v--vXnGN1MxJ9wYQ0KpAPQ.png" /><figcaption><strong><em>ML Pipeline</em></strong></figcaption></figure><p>We have created a DAG for each of these models in Airflow which gets triggered as soon as all the extracts that these models depend on are completed. Thus, we can automate running models and generating predictions in Airflow on a daily basis which enables all the stakeholders to receive new insights or predictions everyday. Following diagram illustrates how each Data Science DAG depends on upstream extract DAGs before they can generate predictions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*zSBMpfPOUpBYjD2latVD5Q.png" /><figcaption><strong><em>ML Pipeline workflow</em></strong></figcaption></figure><p>Also, more importantly, this enables Data Scientists to only focus on building models or improving existing models without worrying about the pipeline completely. Once a model is changed/refactored, the pipeline picks it up and runs the newer model as per its schedule and delivers insights which are ready to be consumed.</p><h3>Data Empowerment</h3><p>In conclusion, I would like to say that at Omada we truly leverage the power of Airflow to carry out various operations and it has been an integral part of the Data Platform. It has truly empowered Data Analysts and Scientists by providing them with data from other Omada apps and various external sources consistently and without any data quality issues. This has enabled Data Analysts to report on data gathered from different sources which are then sent to our clients and Data Scientists to run different models on regular cadence; thus providing new insights.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd8e66445097" width="1" height="1" alt=""><hr><p><a href="https://medium.com/omada-health-tech/omada-and-apache-airflow-cd8e66445097">Omada and Apache Airflow</a> was originally published in <a href="https://medium.com/omada-health-tech">Omada Health Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[New-hire Onboarding is an Investment]]></title>
            <link>https://medium.com/omada-health-tech/new-hire-onboarding-is-an-investment-e5529819734?source=rss----c337ce816c8a---4</link>
            <guid isPermaLink="false">https://medium.com/p/e5529819734</guid>
            <category><![CDATA[onboarding]]></category>
            <category><![CDATA[new-hire-onboarding]]></category>
            <category><![CDATA[new-hire]]></category>
            <dc:creator><![CDATA[Omada Health Engineering]]></dc:creator>
            <pubDate>Tue, 09 Jun 2020 16:01:01 GMT</pubDate>
            <atom:updated>2020-06-09T16:01:01.285Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Written by </em><a href="https://www.linkedin.com/in/scottstebleton"><em>Scott Stebleton</em></a><em>, Senior Engineering Manager</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-od2ZSIpgwgP5kxEs4hS8g.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@davidmarcu?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">David Marcu</a> on <a href="https://unsplash.com/s/photos/biking?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>You never get a second chance to make a first impression. First impressions last in just about every human interaction, from friendships to dating to schools and politics. It’s equally true when bringing a newly-hired employee onto a team: a department’s onboarding process shapes a person’s trajectory in the organization, from how quickly they ramp up to how engaged they feel, and everything in between.</p><p>At Omada Health, one of our company’s guiding values is <em>Grow Together</em>. For a new hire, that growth requires initiative and guidance from their leadership team. For a manager, onboarding is the best opportunity to set expectations about a new hire’s level, their role, and the rules that apply to everyone in the department.</p><p>More broadly, hiring someone is an investment. Obviously, there’s the financial investment, expressed through salary and benefits. Then there’s the time and effort (and possibly money) spent in the hiring process. But it’s important to consider what comes after: it’s essential that every new employee learns our norms and practices, and gains knowledge of our systems and the tools we use — all in service of being a productive, and integrated, member of our team. Doing this requires the investment of building an effective onboarding process.</p><p>At Omada, new-hire onboarding includes steps that everyone goes through, regardless of their department, as well as department-specific steps. Our People &amp; Culture team has gotten company-wide onboarding down to an art, including thorough introductions to the company, HR and benefits, and IT and Security procedures.</p><p>In this post, I describe the steps we took in developing a new onboarding process for the Engineering department, why we had to do so, what the new system looks like, and how it’s worked out for us so far, including with employees who joined us under shelter-in-place restrictions.</p><h3>How Engineering onboarding was falling short</h3><p>Prior to our most recent adjustments, Engineering onboarding consisted of a couple presentations and a patchwork of trainings and resources specific to each team. This led to inconsistent expectations of new hires across teams: standards were often confined to the team scope, with department-wide expectations left to osmosis and exposure over time.</p><p>One consequence of this variability was a lack of standards for performing 90-day new-hire evaluations. Among other problems, inconsistencies like this can open the door to bias in those evaluations, and they can make it difficult to know if an engineer was hired at the correct level.</p><p>We found inconsistent awareness of our ecosystem among our engineers. There was a lack of knowledge about the systems we have and what they do, including how those systems support the business and the broader company strategy. People reported not knowing much about other teams in the department and what they do, nor about who to ask when domains or projects overlapped.</p><p>A survey of both team members and existing documentation found our reference materials to be lacking. We have a wiki, but a common problem with wikis is entropy; they atrophy without investment. Ultimately, we found ourselves relying on organic, person-to-person teaching in order to socialize knowledge. Legacy teams can get away with this kind of thing, but what happens when a team is composed largely of recent hires? Where does institutional knowledge come from then?</p><p>Finally, it bears mentioning that the shortcomings of our old system would have been even more stark once we went fully distributed in response to Covid-19. Relying on person-to-person teaching cannot work when person-to-person contact is impossible.</p><h3>Coming up with a new system</h3><p>As with any systemic issue, the first step of fixing it is acknowledging the problem. Our leadership team recognized the issue, and in response formed a working group of interested engineering leaders to tackle it. This group would wind up meeting once every two weeks for five months, brainstorming problem areas and possible solutions.</p><p>During our meetings, this working group probed a number of topics, most notably including:</p><ul><li>Expectations by level: what do we expect from junior engineers vs. senior engineers?</li><li>Department-wide expectations: what do we want people to know when they hit the 90-day mark, regardless of their level and team?</li><li>What are we doing now that’s not working well?</li><li>What actions are we already taking to improve the onboarding process?</li></ul><p>Through these discussions, we developed a tiered, clear set of expectations, which of course went through several iterations. We ultimately concluded that a successful onboarding meant that expectations needed to be paired with documentation, resources, and formal training. This meant eliminating the reliance on osmosis and informal learning, and spurred the creation of a lot of documentation, as well as identifying areas that require formal training sessions, and recruiting team and technical leaders from our ranks to produce and lead those sessions.</p><h3>What the new system looks like</h3><p>From a high level, our new onboarding plan is a somewhat long list of topics, ranked by priority. These topics can be lumped into broad categories:</p><ul><li><strong>Elements of how we work:</strong> security and compliance; our systems, environments, and data models; our departmental values; and operating standards like pair programming and test-driven development (TDD).</li><li><strong>Logistics:</strong> how our continuous integration and continuous delivery (CI/CD) system works, our software development lifecycle (ticket systems, the Agile methodologies we use, feature leading), and incident management.</li><li><strong>Technologies we use:</strong> containerization (Docker, Nomad), metrics gathering and monitoring, and various tools (New Relic, SumoLogic, Bugsnag)</li></ul><p>Within each topic, we have identified a concrete set of expectations for new hires to meet at the 90-day mark. Each topic has links to documentation and resources, most of which are internal, but some of which are external, such as guides to using tools like Pivotal Tracker.</p><p>For some of the more involved topics, such as Docker, we’ve created trainings and hands-on guided learning sessions, and the onboarding plan includes checkboxes indicating whether a new hire has completed them.</p><p>The plan also includes prompts for the new hire and their manager to check in at the 30-day and 60-day points, during which they’ll look for areas where knowledge is deficient and identify areas to focus on.</p><h3>Our experience using the new system</h3><p>Since completing the new onboarding plan, we have hired several people into the Engineering department across multiple teams. The new hires have been encouraged to work through the plan frequently, in small bites. (The list of topics is quite long, and can be intimidating to open up.)</p><p>The plan has received universally positive feedback for its organization and availability. Its presentation as a checklist makes it easy to navigate, plan tasks, and track progress. Expectations are clearly laid out, along with how to get the knowledge to meet them. It provides a broad understanding of our various applications and how to use them. One new hire had this to say: “It’s a great feeling to see Omada Engineering invest in a variety of trainings as part of the onboarding process.”</p><p>The plan helped each new hire and their team plan their immersion and ramp-up. This meant that the new hires were ready to join their teams’ firefighter rotations after about a month — way faster than our experience with previous onboardings. Plus, each of our teams saw a nice downstream effect: they were motivated to level-up their wiki pages and other documentation.</p><p>Perhaps most importantly, the new process made it relatively easy to onboard new hires while everyone was sheltering in place. (As of this writing, we still are, with no end in sight.) With everyone working from home, the old habits of osmosis and organic knowledge transfer would not have worked. The plan makes each expectation and its supporting resources and documentation easily discoverable, so the timing of its completion worked out very nicely for us.</p><h3>What’s next</h3><p>For the engineers we’ve hired since putting this process together, the next step is using the new 90-day plans in their new-hire evaluations. Beyond that, we plan to make the new resources and training sessions available to all engineers, so they can refresh their knowledge or close any gaps they may have.</p><p>Moving forward, we have distributed the responsibility for periodically refreshing all the documentation and resources, so that they are always current. We will also periodically revise the expectations laid out in the 90-day plan, so that they are also always current.</p><p>And now that we have leveled up our onboarding process, the next big thing to do is hire more people, of course. That will help us continue to see returns on this investment!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5529819734" width="1" height="1" alt=""><hr><p><a href="https://medium.com/omada-health-tech/new-hire-onboarding-is-an-investment-e5529819734">New-hire Onboarding is an Investment</a> was originally published in <a href="https://medium.com/omada-health-tech">Omada Health Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Internships: Good for the intern, great for the team]]></title>
            <link>https://medium.com/omada-health-tech/internships-good-for-the-intern-great-for-the-team-8b13c61cf4a7?source=rss----c337ce816c8a---4</link>
            <guid isPermaLink="false">https://medium.com/p/8b13c61cf4a7</guid>
            <category><![CDATA[internships]]></category>
            <dc:creator><![CDATA[Omada Health Engineering]]></dc:creator>
            <pubDate>Tue, 26 May 2020 15:01:13 GMT</pubDate>
            <atom:updated>2020-05-26T15:01:12.840Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Written by </em><a href="https://www.linkedin.com/in/lilliechilen/"><em>Lillie Chilen</em></a><em>, Engineering Manager</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o_7kCBjfp78GQdfJK4lVaA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@nesabymakers?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">NESA by Makers</a> on <a href="https://unsplash.com/s/photos/developer?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Hiring an intern is obviously beneficial to the intern: they get paid to learn to write better code, they get exposed to working with a team, and they get another line on their resume working toward being a “supes profesh” software engineer.</p><p>Less immediately obvious, though, is how great an intern can be for your team and your company. A good internship program provides an opportunity to look critically at your culture and your codebase to see where the weaknesses of both are.</p><p>(It’s unfortunately easy to run an internship program without learning from it, but if you set things up properly and ask the right questions, having an intern on your team will pay dividends beyond their comparatively cheap salary.)</p><p>I’ve talked to a lot of people about more and less successful internships they’ve had or witnessed. For the less successful ones, the saddest part is when the company didn’t look at their process or their code to see what could have contributed to an unproductive internship. It’s easy to say “Oh, we just hired a bad intern”, but rarely is just the intern the problem.</p><p>An internship might feel like a test of a junior engineer’s abilities, but it’s more-so an audit of your team: how well do you communicate? How complex is your codebase? You will certainly teaching your intern things about programming, but they will show you the things that your team is totally rocking, and the things that you need to work on, both in code and in process.</p><h3>Benefit #1: Code</h3><p>We all have parts of our codebase that we know are a mess, that have weird old names due to quirks of history, that are fragile and no one wants to change a thing for fear of subtle bugs. But we get used to them. We have Stockholm syndrome with our codebases, and we’ve forgotten how silly (or terrible) things are.</p><p>We need to feel the pain of explaining to an intern why that model is named the way it is. Or asking them to hold the context of seven classes in their head to understand how this process works. (Having interns come through <em>regularly</em> is helpful here, because any intern will also become numb to the more painful parts of the codebase.)</p><p>Having an intern around who will look around the codebase and find patterns to follow will highlight for you which patterns you don’t love any more, and remind you to fix them up at the next opportunity.</p><h3>Benefit #2: Culture</h3><p>Like explaining a complex bit of code, explaining how your team works and why you do the things you do will help you find gaps in your process. A team that can effectively onboard an intern is set up well to onboard any engineer, so that they can contribute meaningfully as quickly as possible. You’ll also learn how good your team is at teaching (or knowledge transfer, for those who like corporate lingo better). Good teaching leads to fewer silos, which leads to higher <a href="https://en.wikipedia.org/wiki/Bus_factor">bus numbers</a>. Yay!</p><p>Having an intern-ready culture means your team will have an easier time retaining people who are collaborative and empathetic. At Omada, we use an internship-like program to rotate engineers through other teams. Especially when someone is learning a totally new technology, having a structured format to get started is incredibly helpful. This has the excellent benefit of allowing our teams more opportunities to learn from each other-rotating team members cross-pollinate ideas and practices from their “home” team.</p><h3>Doubts</h3><p>Still not sure that your team is ready, or that you can spare the time?</p><p>The most common refrains I’ve heard from engineers that don’t think they should hire an intern yet include:</p><ul><li>We don’t have the time or resources to train them</li><li>Interns will write bad code that we’ll then have to maintain forever</li><li>Everyone on the team is so key to the codebase that we can’t have someone less than senior or else things would fall apart</li></ul><p>These are reasonable concerns, but point to larger issues in your engineering organization (beyond the very-real problem that hiring an all-senior engineering team is very expensive and very hard).</p><h4>Resources</h4><p>If you have fewer than three mid- to senior-level engineers, maybe you should wait on hiring an intern. A team of all interns probably isn’t an effective way to build a robust codebase, but a team of all seniors can tend to write more complex, clever code. Create a balanced team.</p><p>Running an internship program is absolutely an investment. You do need to take time to train people, but the ROI on your codebase and culture is worth it if you do it right. An internship program that doesn’t teach you about the existing team and its code is not worth running.</p><h4>Code Quality</h4><p>Your company should already have structures in place that prevent crappy code from getting onto production — probably something like code review or pair programming. If you don’t do either of those things, you should probably start! With your full-time engineers, not your interns.</p><p>So, when you hire an intern, put those structures to work. Give the intern actual production work, and see how good your team is at giving helpful, thoughtful feedback about the intern’s code.</p><h4>Not enough experience</h4><p>If your team believes only senior engineers can be beneficial to your codebase, then you are going to have a hard time hiring, and probably have a myriad of other issues. People leave companies, and they take their knowledge of the code with them. Good luck!</p><h3>Start with one</h3><p>Being good at teaching means being good at helping all of your engineers level up, which will help them want to stick around. Teaching reinforces what you know, and highlights things you thought you knew but don’t. Being good at information sharing means that you will have fewer silos and higher bus numbers.</p><p>I hear often that startups don’t think they have the resources to support interns, but the question is: where do senior engineers start? Not as senior engineers. Providing internships helps us have more balanced teams, and hiring mid- to senior-level engineers is pretty damn difficult in the current market.</p><p>It’s likely that your first intern ever will have a worse experience than later interns. You’re going to learn how good your mid-level and senior engineers are at teaching a junior, and which parts of the codebase are really hard to explain to someone just starting their career. But please don’t let that stop you from trying.</p><h3>Bonus!!</h3><p>All of the reasons above should be enough to start hiring interns. But there’s another benefit that I should mention: you can more easily increase the gender diversity of your team!</p><ul><li>16% of software engineers are women (<a href="https://business.linkedin.com/talent-solutions/blog/2014/03/women-in-engineering-the-sobering-stats">source</a>)</li><li>18% of computer science grads are women (<a href="http://www.nsf.gov/statistics/2015/nsf15311/digest/data/theme2/fig2c.png">source</a>)</li><li>38% of bootcamp grads are women (<a href="https://www.coursereport.com/reports/2014-coding-bootcamp-outcomes-demographics-report">source</a>)</li></ul><p>The <a href="https://www.coursereport.com/reports/2014-coding-bootcamp-outcomes-demographics-report">statistics for ethnic diversity</a> of bootcamp grads is less exciting, but you can still work on the diversity of your teams by posting internship opening in places like the jobs board ofs historically black colleges and univserities, or working with organizations like CODE2040 to hire black and latin@ fellows.</p><h3>How To</h3><p>Ready to start an effective internship program? <a href="https://medium.com/@OmadaEng/how-to-run-an-internship-program-2bb91065ac8">Read on</a> for how to do it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b13c61cf4a7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/omada-health-tech/internships-good-for-the-intern-great-for-the-team-8b13c61cf4a7">Internships: Good for the intern, great for the team</a> was originally published in <a href="https://medium.com/omada-health-tech">Omada Health Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Run an internship program]]></title>
            <link>https://medium.com/omada-health-tech/how-to-run-an-internship-program-2bb91065ac8?source=rss----c337ce816c8a---4</link>
            <guid isPermaLink="false">https://medium.com/p/2bb91065ac8</guid>
            <category><![CDATA[internships]]></category>
            <dc:creator><![CDATA[Omada Health Engineering]]></dc:creator>
            <pubDate>Tue, 26 May 2020 15:01:12 GMT</pubDate>
            <atom:updated>2020-05-26T15:01:12.853Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Written by </em><a href="https://www.linkedin.com/in/lilliechilen/"><em>Lillie Chilen</em></a><em>, Engineering Manager</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kGSGNr0mH5u4I2A-cgDTuw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@timmykp?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Tim van der Kuip</a> on <a href="https://unsplash.com/s/photos/office?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In <a href="https://medium.com/omada-health-tech/internships-good-for-the-intern-great-for-the-team-8b13c61cf4a7">a previous post</a>, I explored how running an internship program can benefit the team (and the company) more dramatically than you might expect. Now that you’re totally bought into why interns are awesome, you’re probably wondering how you can run an effective internship program at your company.</p><h3>How our internships work</h3><p>Whether the internship is three, four, or six months long, an Omada engineering internship follows the same general format: join the team and pair with everyone, do a solo project for a spell, and then rejoin the team. We’ve had 13 engineering interns so far, and each came to Omada with a different amount of experience with our stack. Having them start with the team gives us a chance to share our practices with them, and dump a heap of knowledge on their heads while they learn their way around the codebase. The solo project then gives them a chance to integrate some of that knowledge, and code review helps us and them see what they are still struggling with. When the intern’s solo is over and they triumphantly return to the team, their growth is evident.</p><h3>Interviewing</h3><p>Since interns are short-term employees, they go through an abbreviated application process — first, they complete a coding challenge that has some failing tests, then a general-purpose phone screen with questions about their technical interests and what recent code they’ve written that they are excited about, followed by a remote or in-person pairing session working on a small technical problem.</p><p>You clearly aren’t hiring an intern for their experience, so you should have a clear idea about what you <em>are</em> hiring them for. At Omada, we look for interns that ask a lot of good questions, display curiosity about how we ship software, and who seem to be able to pick up new concepts fairly quickly. Algorithms and white boarding sessions wouldn’t give us nearly as much insight into how the candidates actually write software, so we happily avoid them. (As we do with our full-time candidates, as well. White boarding interviews are terrible and people should stop doing them.)</p><h3>Pairing</h3><p>The biggest part of why we’re able to have an intern join the team and write production code immediately is that we do pair programming by default. Depending on the team, this can range from 40% to 90% pairing. Practicing our pairing skills with a junior developer makes us better pairs when we work with all of our teammates.</p><p>(Pair programming is where you have two keyboards, two mice, and one computer, and you take turns typing, and you work through the whole problem together. Pairing is not where you look over someone else’s shoulder when they get stuck, or white boarding architecture with a group of people, or working on similar code next to someone on separate computers.)</p><p>If your company does not currently have a pair programming practice, I wouldn’t recommend starting with pairing with your interns. Pairing across experience level is is a substantially different experience than pairing with an engineer more senior than you or at your level. It’s a skill not to hog the keyboard or go too fast when you’re on a roll, and properly get your pair’s buy-in for your idea when they know a lot less about the codebase than you. Sarah Mei has a <a href="https://www.devmynd.com/blog/2015-1-pairing-with-junior-developers/">great piece on precisely this problem</a>, and you should read it!</p><p>(I do recommend you start pairing! Just with people at the same skill level, then later try to expert-mode that is junior/senior pairing.)</p><p>If you do pair, some of these things have helped us let our juniors drive more:<br> * Really doing TDD and ping-pong pairing it (avoiding spikes, where the junior can get lost)<br> * Having toys and other things for the senior to do with their hands to avoid typing<br> * Unplugging the senior’s keyboard!</p><p>It’s <strong>really</strong> hard not to grab the keyboard when you don’t know why the test is failing. As much as you can, resist the urge, and work through the mystery with the intern driving. You can do it!</p><h3>On-boarding &amp; Mentorship</h3><p>Having regular interns keeps our on-boarding processes in tip-top shape. We also make sure that the intern’s laptop is used for coding as soon as possible — usually on the first day, but definitely by the second day of their internship. When you’re pairing, it’s easy to use the machine that’s already set up, but that’s a trap! It’s important for the new person’s environment to be set up ASAP.</p><p>Interns are paired with more senior developers who act as a mentor during the internship, answering technical and non-technical questions. The intern’s mentor isn’t the only person who reviews their pull requests, but especially during the solo project, the mentor checks in regularly with the intern to make sure they’re on a reasonable path with their project. Regularly, in our case, has often meant a daily, scheduled check-in, otherwise it doesn’t happen often enough. Having time every day during the solo has helped us prevent our interns from going totally off the rails on their projects. (Of course, if they have questions during the day, they’re welcome to ask any member of the team. We haven’t yet had an issue with an intern asking too many questions.)</p><h3>Solo Project</h3><p>Omada engineering interns have a lot of say in what they build during their solo project. We’ve had some interns make tools that never got used (and they still learned things, which is valuable!), but we are especially excited when an intern can learn a lot while working on a project that is useful to the company. We’ve had especially good luck with having interns work directly with a product manager for their solo project, and letting them figure out what to build together.</p><p>If you’ve got an intern that really wants to work with a cool new technology that is completely unrelated to your current stack, I’d suggest gently reminding them that the value of their internship is not just in the code they write, but the process of working with your team. Trying out new tech is a great thing to do in your free time, when you don’t have the wealth of resources of a team and customers to build things for!</p><h3>Code Review</h3><p>Since we pair program, we don’t normally do code review via pull request. The exception to this is when any engineer is soloing, and so interns on solo projects submit pull requests that are reviewed by their mentor or another person on the team. Since the intern has already had at least a month of pairing with the team, they are usually moderately aware of our practices and style, so the feedback on each pull request isn’t starting-from-scratch education about how we write code at Omada.</p><p>If your company doesn’t pair program, you’ll probably want to start with a project that is somewhat less than business critical. It is important, though, that the intern is collaborating with other people at the company as much as any other engineer would. You’ll only reap the benefits of having interns around if they are fully integrated into your typical engineering processes and working on your actual codebase.</p><h3>Hire them!</h3><p>At the end of someone’s internship, if they’ve been awesome and we have an opening, we offer them a full-time position. This is an excellent way to further leverage the time investment we’ve made, but we still get a lot out of mentoring the interns that don’t end up in full-time positions.</p><p>At Omada, our interns have been fantastic teammates and many have stayed around in full-time positions. Having interns around regularly has helped us improve our communication skills, our codebases, and has really helped us increase the gender diversity on our teams.</p><p>(For more on why running an internship is incredibly valuable to the whole team, take a <a href="https://medium.com/omada-health-tech/internships-good-for-the-intern-great-for-the-team-8b13c61cf4a7">gander at this post</a>.)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2bb91065ac8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/omada-health-tech/how-to-run-an-internship-program-2bb91065ac8">How to Run an internship program</a> was originally published in <a href="https://medium.com/omada-health-tech">Omada Health Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GraphQL Tips: The Backend]]></title>
            <link>https://medium.com/omada-health-tech/graphql-tips-the-backend-553375e1b669?source=rss----c337ce816c8a---4</link>
            <guid isPermaLink="false">https://medium.com/p/553375e1b669</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Omada Health Engineering]]></dc:creator>
            <pubDate>Tue, 19 May 2020 16:31:01 GMT</pubDate>
            <atom:updated>2020-05-19T16:31:01.183Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Written by </em><a href="https://www.linkedin.com/in/willhastings4"><em>Will Hastings</em></a><em>, Staff Engineer</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2qpvyIROBeBi4pTPvPKPbg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@joshuafuller?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Joshua Fuller</a> on <a href="https://unsplash.com/s/photos/ruby?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Welcome back to the saga of Omada Engineering’s adventures with GraphQL. In previous posts, I discussed <a href="https://medium.com/omada-health-tech/exploring-graphql-at-omada-f64133a50462">our processes for learning and adopting </a>GraphQL and <a href="https://medium.com/omada-health-tech/graphql-reaping-the-benefits-423daeb96be8">the benefits it brought us</a>. This time, I’ll share two technical tips we discovered while adding GraphQL support to our Ruby on Rails API server using the <a href="https://graphql-ruby.org/">graphql-ruby gem</a>. First, I’ll cover the code organization structure we chose and the benefits it gives us in terms of discoverability and maintainability. Second, I’ll demonstrate the solution we implemented for adding GraphQL-specific details to our server request logs.</p><h3>Code Organization</h3><p>By default, graphql-ruby generates the directory app/graphql/types for you to place the Ruby classes that define the types for your GraphQL schema. It also gives you the app/graphql/mutations directory for the Ruby classes that define your GraphQL mutations. We realized that adding all types and mutations to these directories without any further organization would quickly become a maintenance burden. So we chose to organize type and mutation classes into Ruby modules (and the corresponding directories on the filesystem) based on the category of data the types apply to.</p><p>For types, this often means grouping together classes for the following:</p><ul><li>A GraphQL type for a core part of our business domain (e.g. a community Discussion)</li><li>A corresponding <a href="https://graphql.org/learn/schema/#input-types">GraphQL input type</a></li><li>A collection type for representing paginated lists</li><li>Any associated <a href="https://graphql.org/learn/schema/#enumeration-types">GraphQL enums</a></li></ul><p>For example, the classes associated with our Discussion type are grouped in one directory like so:</p><ul><li>app/graphql/types/</li><li>discussion/</li><li>discussion_input_type.rb</li><li>discussion_topic_type.rb</li><li>discussion_topics_status_enum.rb</li><li>discussion_type.rb</li><li>discussions_collection_type.rb</li><li>discussions_sort_key_enum.rb</li></ul><p>When defining one of these classes, we place it in a Ruby module to match the directory. For example, DiscussionType:</p><pre>module Types<br>  module Discussion<br>    class DiscussionType &lt; Types::Base::BaseObject<br>        # ...<br>    end<br>  end<br>end</pre><p>For mutations, we group actions related to a core data type in one directory/Ruby module. For example, we have the following mutation classes for our BloodPressureReading type:</p><ul><li>app/graphql/mutations/</li><li>blood_pressure/</li><li>blood_pressure_reading_toggle_filter.rb</li><li>blood_pressure_reading_update.rb</li></ul><p>Using these patterns, we keep the code for our GraphQL mutations and types organized and related classes close together.</p><h3>Breaking Up the Query Type Implementation</h3><p>In GraphQL, the root of your schema’s types is the <a href="https://graphql.org/learn/schema/#the-query-and-mutation-types">Query type</a>, which provides fields for returning data for all of your types. The graphql-ruby gem generates a GraphQL type class at app/graphql/types/query_type.rb for defining your Query type. While it makes sense for your GraphQL schema to have a root type, defining all the fields on the Query type in one Ruby class would definitely lead to maintenance difficulties, as you would need to define methods for loading all your data types in one place. To keep us from ending up with a giant Query class, we took advantage of a graphql-ruby feature called <a href="https://graphql-ruby.org/fields/resolvers.html">Resolvers</a>.</p><p>A resolver class defines the signature and data lookup code for one field of a GraphQL type, including the field’s return type and those of any arguments it takes. For each field on our Query type, we’ve created a resolver class to implement it.</p><p>For example, our resolver for our Query’s accountProfile(account_id: Int!) field looks similar to the following:</p><pre>module Resolvers<br>  class AccountProfileResolver &lt; GraphQL::Schema::Resolver<br>    type Types::AccountProfile::AccountProfileType</pre><pre>    argument :account_id, Integer, required: true</pre><pre>    def resolve(account_id:)<br>        # Load account...<br>        # Check if current user has permission to access account data<br>        # Return account<br>    end<br>  end<br>end</pre><p>And so our QueryType class becomes simply a list of fields:</p><pre>module Types<br>  class QueryType &lt; Types::Base::BaseObject <br>    field :account_profile, resolver: Resolvers::AccountProfileResolver<br>    # Other fields...<br>  end<br>end</pre><p>While the graphql-ruby docs do recommend alternative approaches to code organization other than resolvers, we felt resolvers solved the problem best, as they allow the field signature definition and data lookup code to live in the same place, while keeping the QueryType class as minimal as possible.</p><h3>Logging Query Details</h3><p>In order to have access to better aggregate data on the queries and mutations our GraphQL API receives, we needed to work out a strategy to get more than the raw query string into the structured JSON we record in our general server request logs. We wanted a JSON representation of the query or mutation received so we could aggregate log entries to, for example, get a count of all requests that queried a certain field in our GraphQL schema. The challenge here was how to get that data out of graphql-ruby so that we could record it with the rest of the request data.</p><p>We found that we could use graphql-ruby’s <a href="https://graphql-ruby.org/queries/ast_analysis.html">Ahead-of-Time AST Analysis API</a>. The library parses the incoming GraphQL query into an <a href="https://en.wikipedia.org/wiki/Abstract_syntax_tree">abstract syntax tree</a>, and this API will run your code for each piece of a query, such as every field it accesses. To use this API, you create a class that extends GraphQL::Analysis::AST::Analyzer and implements one of the callback methods that class supports. In our case, we implemented on_leave_field so that we could record the name of each field an incoming query or mutation accessed. You also implement a result method to return the result of your analysis, which we’ll see how to access later.</p><p>Our class to collect a representation of each field accessed is as follows:</p><pre>class LoggingGraphqlQueryAnalyzer &lt; GraphQL::Analysis::AST::Analyzer<br>  def initialize(query_or_multiplex)<br>    super<br>    @nodes_map = {}<br>    @root_entries = []<br>    @operation_node = nil<br>  end</pre><pre>  def on_leave_field(node, parent_node, _visitor)<br>    @nodes_map[node] ||= { name: node.name }</pre><pre>    case parent_node<br>    when GraphQL::Language::Nodes::Field<br>      @nodes_map[parent_node] ||= { name: parent_node.name }<br>      parent_entry = @nodes_map[parent_node]<br>      parent_entry[:fields] ||= []<br>      parent_entry[:fields] &lt;&lt; @nodes_map[node]<br>    when GraphQL::Language::Nodes::OperationDefinition<br>      @root_entries &lt;&lt; @nodes_map[node]<br>      @operation_node = parent_node<br>    end<br>  end</pre><pre>  def result<br>    {<br>      type: @operation_node&amp;.operation_type,<br>      operation_name: @operation_node&amp;.name,<br>      query: { fields: @root_entries }<br>    }<br>  end<br>end</pre><p>Let’s consider how it would operate on the following query:</p><pre>query DiscussionQuery {<br>  discussion(discussionId: 1) {<br>    title<br>    message<br>    author {<br>      firstName<br>    }<br>  }<br>}</pre><p>The on_leave_field method receives a node object and a parent_node object. A node represents a piece of a GraphQL query, such as a field or a field argument. It has a name method which returns a string name, such as the name of a field. In our implementation of on_leave_field, we create a hash to store the name of the field the current node represents, and then store that hash in a larger hash called @nodes_map using the node object as the key. This allows us to look up the field-specific hash the next time we encounter that node.</p><p>Then we check if the current node’s parent node is a field node or an operation node. An operation node represents the root of the query. In our example, its name is DiscussionQuery. Fields whose parent is the operation node are the top level fields our query is accessing, such as discussion in this example.</p><p>If the current node’s parent is another field, which we can tell if the parent’s class is GraphQL::Language::Nodes::Field, we then know it is not a top-level field. So we add the hash representing the current node to a fields array on the hash representing the parent node, which we initialize and add to our @nodes_map if it doesn’t already exist. If the hash for the parent node already exists, we add to it, so that a parent field that contains multiple sub-fields will end up with all of them in its fields array.</p><p>If the current node’s parent is the operation node, which we can tell if the parent’s class is GraphQL::Language::Nodes::OperationDefinition, we then know it is a top-level field. So we add its hash to an array called @root_entries, which in our current example would only contain one element with the name discussion. We also store the parent node in the @operation_node instance variable so that we can access information about it in our implementation of result.</p><p>In our result method, we put together a final hash containing the data we want added to our request log. It includes the operation type (query or mutation), operation name (DiscussionQuery in our example), and the tree of hashes representing the fields we captured in on_leave_field. This final hash can then be serialized to JSON as part of the larger JSON structure we log for the request.</p><p>For this example, the JSON output would be the following:</p><pre>{<br>  &quot;type&quot;: &quot;query&quot;,<br>  &quot;operation_name&quot;: &quot;DiscussionQuery&quot;,<br>  &quot;query&quot;: {<br>    &quot;fields&quot;: [<br>      {<br>        &quot;name&quot;: &quot;discussion&quot;,<br>        &quot;fields&quot;: [<br>          {<br>            &quot;name&quot;: &quot;title&quot;<br>          },</pre><pre>          {<br>            &quot;name&quot;: &quot;message&quot;<br>          },</pre><pre>          {<br>            &quot;name&quot;: &quot;author&quot;,<br>            &quot;fields&quot;: [<br>              {<br>                &quot;name&quot;: &quot;firstName&quot;<br>              }<br>            ]<br>          }<br>        ]<br>      }<br>    ]<br>  }<br>}</pre><p>To run our analyzer class on each incoming request, we configure it in our schema class:</p><pre>class GraphqlSchema &lt; GraphQL::Schema<br>  use(GraphQL::Analysis::AST)<br>  query_analyzer(LoggingGraphqlQueryAnalyzer)<br>end</pre><p>Finally, we need to access the results of the analyzer in our Rails controller that handles incoming GraphQL requests. To do this, we leverage graphql-ruby’s <a href="https://graphql-ruby.org/queries/tracing.html">Tracing API</a>, which allows you to provide an object that can listen for different events the library fires as it’s processing a GraphQL query. It will call your object’s trace method with a key for the event and associated data, plus a block that executes the next segment of query processing.</p><p>We created a simple class that implements trace and for the analyze_query event saves the result from our query analyzer class so that we can access it from our controller:</p><pre>class GraphqlRequestTracer<br>  attr_accessor :log_data</pre><pre>  def trace(key, _data)<br>    result = yield<br>    if key == &#39;analyze_query&#39;<br>      self.log_data = result.first<br>    end<br>    result<br>  end<br>end</pre><p>In our GraphqlController, we pass an instance of the tracer along with the query context and then append the data from the analyzer to our log data in append_info_to_payload, which our logging system calls to get log data for the current request. It looks something like this:</p><pre>class GraphqlController &lt; ApplicationController<br>  def execute<br>    # ...</pre><pre>    context = {<br>      # ...<br>      tracers: [request_tracer],<br>    }</pre><pre>    @result = GraphqlSchema.execute(query, variables: variables, context: context, operation_name: operation_name)</pre><pre>    render json: @result</pre><pre>    # ...<br>  end</pre><pre>  protected</pre><pre>  def append_info_to_payload(payload)<br>    super</pre><pre>    return payload unless @result</pre><pre>    payload[:graphql] = {<br>      status: @result.has_key?(&#39;errors&#39;) ? &#39;error&#39; : &#39;success&#39;,<br>      errors: @result[&#39;errors&#39;],<br>    }.merge(request_tracer.log_data || {})</pre><pre>    payload<br>  end</pre><pre>  # ...</pre><pre>  private</pre><pre>  def request_tracer<br>    @request_tracer ||= GraphqlRequestTracer.new<br>  end</pre><pre>  # ...<br>end</pre><p>This adds the GraphQL-specific data to our log entry JSON under the graphql key. It was tricky to figure out that the way to get the analyzer data to the controller was through the tracing API, but now that it’s in place we could extend it for other query analysis concerns in the future.</p><h3>Conclusion</h3><p>So far we’re happy with the approaches we chose for organizing our GraphQL class file structure and separating the implementation of our QueryType into encapsulated classes. On the logging side, our addition of GraphQL-specific details in JSON format makes it easier for us to get aggregate data from our logging system on how often the fields and types in our GraphQL schema are accessed. If you’re using GraphQL with Rails and graphql-ruby like we are, I hope these tips give you a leg up in your GraphQL journey.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=553375e1b669" width="1" height="1" alt=""><hr><p><a href="https://medium.com/omada-health-tech/graphql-tips-the-backend-553375e1b669">GraphQL Tips: The Backend</a> was originally published in <a href="https://medium.com/omada-health-tech">Omada Health Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Brief Guide to Facilitating Retros]]></title>
            <link>https://medium.com/omada-health-tech/a-brief-guide-to-facilitating-retros-3c652ba02e2e?source=rss----c337ce816c8a---4</link>
            <guid isPermaLink="false">https://medium.com/p/3c652ba02e2e</guid>
            <category><![CDATA[retrospectives]]></category>
            <category><![CDATA[management-and-leadership]]></category>
            <dc:creator><![CDATA[Omada Health Engineering]]></dc:creator>
            <pubDate>Tue, 12 May 2020 14:11:01 GMT</pubDate>
            <atom:updated>2020-05-12T14:11:01.159Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Written by </em><a href="https://www.linkedin.com/in/lilliechilen/"><em>Lillie Chilen</em></a><em>, Engineering Manager</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nuM4B2F6Mrt6oNfmWwkRnA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@youxventures?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">You X Ventures</a> on <a href="https://unsplash.com/s/photos/meeting?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>One of the cornerstones of our engineering process at Omada is the retro (short for retrospective). A retro is a regularly scheduled time for the team to reflect on the past week and discuss what about our processes we should change to make the next week better. Most of our teams have retros at the same time each week, toward the end of the week.</p><p>Retros at Omada started with the engineering teams, and over the years we’ve introduced other parts of the organization to their magic. From the outside, retros can seem like post-mortems or complaining sessions. So it’s been important for us to emphasize that retros are regularly occurring and process-focused. (And that post-mortems and complaining sessions can also be very valuable — they just can’t replace retros.)</p><p>As new teams started having retros, we realized that we needed a guide to the basics of an Omada retro. Since the facilitator has a major impact on the pace and tenor of the retro, we focused on training more facilitators. (In some teams, the manager or team lead runs the retro every week; other teams rotate facilitators.) I made this one-page cheat sheet outlining how to effectively moderate a retro. Take a look, and maybe even print it out and take it to your next retro!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*T_iUjNrHILygpxDc.png" /></figure><p>Here are a few translations and notes!</p><ul><li><strong>EANABS</strong> are Equally Attractive Non-Alcoholic Beverages. We usually have a mix of beer-drinkers, whiskey-drinkers, and non-drinkers at our retros. While alcohol is a fun way to demarcate that this isn’t just a regular meeting, it’s important to make everyone on your team feel included, so if you are serving alcohol, other fun drinks should be available.</li><li>Learn more about the <strong>Five Whys</strong> (and why you might ask them) on <a href="https://en.wikipedia.org/wiki/5_Whys">this wikipedia page</a>.</li><li>The timeline is assuming a 60-minute long retro and a co-located team (thus the sticky notes and the pens). If your folks are remote, tools like <a href="https://stickies.io/login">Stickies.io</a> and <a href="https://www.retrospectus.com/">Retrospectus</a> are useful for collecting people’s thoughts and reflections.</li><li>This is just one style of retro — there are <a href="http://retrospectivewiki.org/index.php?title=Retrospective_Plans">many, many ways</a> to run a retro!</li></ul><p>( <a href="http://omadatech.wpengine.com/wp-content/uploads/2016/02/facilitate-retro-guide.pdf">Here’s the guide as a PDF</a>.)</p><p>Thank you to <a href="http://www.vincentcoste.co/">Vincent Coste</a>, who gave an internal presentation on our retro practices that inspired me to create this guide!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c652ba02e2e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/omada-health-tech/a-brief-guide-to-facilitating-retros-3c652ba02e2e">A Brief Guide to Facilitating Retros</a> was originally published in <a href="https://medium.com/omada-health-tech">Omada Health Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GraphQL: Reaping the Benefits]]></title>
            <link>https://medium.com/omada-health-tech/graphql-reaping-the-benefits-423daeb96be8?source=rss----c337ce816c8a---4</link>
            <guid isPermaLink="false">https://medium.com/p/423daeb96be8</guid>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[apollo-client]]></category>
            <dc:creator><![CDATA[Omada Health Engineering]]></dc:creator>
            <pubDate>Tue, 05 May 2020 16:31:01 GMT</pubDate>
            <atom:updated>2020-05-05T16:31:01.064Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Written by </em><a href="https://www.linkedin.com/in/willhastings4"><em>Will Hastings</em></a><em>, Staff Engineer</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HCXOY4JtxvY8IuAVvmhnpA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@alinnnaaaa?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Alina Grubnyak</a> on <a href="https://unsplash.com/s/photos/network?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In my <a href="https://medium.com/omada-health-tech/exploring-graphql-at-omada-f64133a50462">last post on our adoption of GraphQL</a>, I discussed the process our engineers took in evaluating and trialing GraphQL as a technology for improving how we develop APIs. Throughout that process, we confirmed that GraphQL solves or improves upon several of the shortcomings we identified with the way we traditionally developed APIs. In this post, I’ll enumerate those shortcomings and how starting to build several new APIs with GraphQL has led to numerous benefits.</p><h3>Documenting our API</h3><p>We’ve always faced the challenge of documenting the structures and data types of our API’s responses and expected request formats. Lack of good documentation places a challenge on our mobile developers, who sometimes would end up reading through our backend Ruby code trying to figure out just what type a particular data point would have in a response. We tried a few different solutions, such as handwriting API documentation in Google docs or code comments and describing our structure/types using a YAML-based format.</p><p>These approaches worked for the most part, but suffered from issues like:</p><ul><li>Requiring manual engineering effort to stay up-to-date</li><li>Supporting response types/structures out-of-the-box, but not requests</li></ul><p>Since writing an API with GraphQL requires that you define a <a href="https://graphql.org/learn/schema/">statically typed schema</a>, there are several great tools available to automatically generate documentation from your schema. We went with <a href="https://github.com/graphql/graphiql/tree/master/packages/graphiql#readme">GraphiQL</a> since it comes out-of-the-box with the <a href="https://graphql-ruby.org/">graphql-ruby gem</a> and easily mounts into a Rails app. So far, both web and mobile engineers have appreciated having complete and always up-to-date API documentation at their fingertips.</p><h3>Sending the Right Data Points in Fewer Requests</h3><p>Before GraphQL, we often struggled to balance the number of our API endpoints and the size of their responses. Initially, we had dedicated endpoints for each type of resource (such as meals tracked or messages received). But this often required our client apps to make multiple requests to get the data they needed, which could easily turn into a performance problem, particularly for our mobile apps when used on cellular data networks.</p><p>The next evolution was API endpoints tailored to particular pages or screens in the app. This allowed all the data for a particular section of an app to be retrieved in one request. But inevitably discrepancies would arise between platforms, and one platform might end up with data it didn’t need. For example, we sometimes decide to initially launch new features in only one of our mobile apps or only in our web app, so that we can learn about the use and value-add of the feature before investing in it more heavily. But with page/screen-based API endpoints, it becomes harder to exclude data from the responses to apps that don’t use it, and to avoid the associated backend data loading and processing.</p><p>GraphQL helps us with both the amount of requests and the data points loaded. A client app can load several different types of resources in one GraphQL query over one HTTP request. Additionally, since GraphQL only responds with the data points, or “fields” that the client app requested in a query, we can easily avoid loading data on an app that doesn’t need it.</p><h3>Increasing Ease-of-Use for our Mobile Engineers</h3><p>With our REST-based endpoints, our iOS and Android engineers have traditionally needed to write strongly-typed classes in Swift or Java/Kotlin to represent the data sent back from our API before they could start consuming data from a new endpoint. With <a href="https://www.apollographql.com/">Apollo’s</a> native mobile libraries, they can instead have these classes automatically generated from our API’s schema and the GraphQL queries and mutations they’ve written. This means less time before they can start loading data, and less human-generated code for them to maintain.</p><h3>Catching Integration-level Bugs</h3><p>Ensuring web and mobile client apps are making valid requests to our API has traditionally been time consuming to set up. Across both web and mobile, we’ve relied on often expensive end-to-end tests to run our apps against a running server. While these tests provide a high level of confidence that the integrations between our apps and server are sound, they often aren’t written until late in the feature development process, and existing ones aren’t usually run until an engineer pushes their work to our CI system. This increases the time from a bug being introduced in either the API or a client app to when it’s caught.</p><p>GraphQL improves on this situation due to its strongly-typed nature. Because tooling can statically analyze queries and mutations to validate them against our API schema, we can pick up on bugs more quickly than with end-to-end tests. On mobile, the automatic class generation process mentioned before will fail at compile time if they write an invalid query or mutation, or if we accidentally introduce a breaking change on the backend. We’ve also set up <a href="https://github.com/apollographql/eslint-plugin-graphql">eslint-plugin-graphql</a> to do the checks for our web frontend.</p><h3>Centralizing the Definition of a Resource Type</h3><p>In the past when we built page-based API endpoints, we sometimes found that the same data needed to be available in multiple endpoints for different pages (e.g. on our home page and on our Progress page), and in slightly different formats. This resulted in duplicate sources-of-truth for how a particular type of resource could be formatted in API responses, and more time writing similar code and tests.</p><p>In GraphQL, you’re encouraged to define a single type for a given resource (e.g. “meal” or “blood pressure reading”). Various fields on other types can return instances or lists of instances of that resource, but that resource is still implemented in the API by one type. That type can contain all the possible data a client might want to have access to, since GraphQL will only return the data points that the client explicitly queries for. Being defined in one place rather than several also makes it less likely that bugs will be introduced in the representation of a data type.</p><p>GraphQL provides a nice balance between the organization of RESTful APIs and the convenience of page-based APIs by allowing clients to mix-and-match the types and amount of data pulled in a given query or mutation result, according to the client’s needs.</p><h3>Simplifying Data Retrieval and Storage on Web</h3><p>For our participant and health coach-facing web apps, we’ve been using React and Redux for several years now. While they’ve given us a big productivity and maintainability boost, we found that they sometimes fall short when it comes to retrieving and managing data from our API. React is not a data loading library, so it gets a free pass. Redux, out of the box at least, is not a data loading library either, but rather a predictable state manager that does a great job at managing app and UI state that various disparate components need to access.</p><p>You can leverage other libraries to add data loading capabilities to Redux. But you’re often left writing a lot of repetitive code around making API requests and managing loading, success, and error states. You also have to figure out the best way to store your data and manage the relationships between different pieces of data, as well as work together to keep everyone’s code consistent. There are many libraries out there to help with these various concerns, but no one in particular has risen above the others as the best solution, so you’re left fighting decision fatigue.</p><p>We found that <a href="https://www.apollographql.com/docs/react/">Apollo Client and its React integration</a> for web bring some advantages over how we were doing data loading and management with Redux:</p><ul><li>Request Lifecycle: Not only does Apollo make the API request for you, it automatically re-renders your React component when the requests starts loading and upon completion, whether in success or error.</li><li>Data Normalization: With GraphQL, data comes back from the API in a nested format, with an object of one type of data containing one or more instances of other types of data, and so on. Apollo automatically normalizes this data into a store in which each object is stored under a key based on the object’s type and ID. This makes it easy to look up and update a particular object without having to traverse a nested data structure.</li><li>Standardization: Apollo’s API is more opinionated than Redux and its associated libraries. The patterns it provides make it easier for different developers to write more consistent code.</li><li>Reduced state management code: While Apollo still requires some work on your part to update the client-side store in some cases (add and delete), it can be simpler than what you might do in a Redux state tree since you can pull specific objects out of its normalized store by ID or by query.</li></ul><h3>Conclusion</h3><p>Overall, using GraphQL has been a boon to development, both in building and consuming APIs. These benefits make the learning curve and cost of adoption worthwhile.</p><p>In a future post, I’ll delve into the technical details around the tips, tricks, and watchpoints we’ve discovered so far when working with GraphQL. Stay tuned!</p><p><em>Thank you to the following fellow Omadans for their help with GraphQL adoption and/or this blog post: Franck Verrot, Chris Constantine, Ethan Ensler, Alexander Garbowitz, Scott Stebleton, Austin Putman, Jonathan Wrobel</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=423daeb96be8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/omada-health-tech/graphql-reaping-the-benefits-423daeb96be8">GraphQL: Reaping the Benefits</a> was originally published in <a href="https://medium.com/omada-health-tech">Omada Health Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Engineering Values: Mindful Collaboration]]></title>
            <link>https://medium.com/omada-health-tech/engineering-values-mindful-collaboration-bb7571174d57?source=rss----c337ce816c8a---4</link>
            <guid isPermaLink="false">https://medium.com/p/bb7571174d57</guid>
            <category><![CDATA[values]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[collaboration]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Omada Health Engineering]]></dc:creator>
            <pubDate>Tue, 28 Apr 2020 19:22:10 GMT</pubDate>
            <atom:updated>2020-04-28T19:22:10.424Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Written by </em><a href="https://www.linkedin.com/in/scottstebleton"><em>Scott Stebleton</em></a><em>, Senior Engineering Manager</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HDhaS8ed285Bb9L80C5U0g.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@sloppyperfectionist?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Hans-Peter Gauster</a> on <a href="https://unsplash.com/s/photos/collaboration?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>Previously on the blog…</h3><p>This is the second in a series of blog posts exploring the values held by our Engineering department, and how we put them into practice. As a refresher, our Engineering department’s values, in no particular order, are:</p><ul><li>Sustainability</li><li>Mindful Collaboration</li><li>Data-Driven Approach</li><li>Shipping Software</li><li>Diversity &amp; Inclusion</li><li>Learning &amp; Innovation</li></ul><p>In the <a href="https://medium.com/p/873ab3623219/">previous post</a>, I went into detail about the value of sustainability. Today I talk about mindful collaboration.</p><h3>Value: Mindful Collaboration</h3><p>At first glance, mindful collaboration may seem like a squishy subject that has little to do with software development. But in reality, the opposite is true: we are humans working together to build something we care about. Collaboration is a key feature of a successful company. (<em>Company</em>, after all, literally means <em>multiple people gathered together</em>.) So when we talk about mindful collaboration, we’re talking about building a culture and environment that is optimized for humans working together.</p><p>Specifically, this is what <em>mindful collaboration</em> means for Engineering at Omada Health:</p><ul><li>Leading with empathy</li><li>Minimization of ego</li><li>Proactively asking for feedback</li><li>Having clear expectations</li></ul><h3>Putting it into practice</h3><p>Probably the most important characteristic in mindful collaboration is empathy. No matter what we do, we must always consider the needs of other people: our teammates, our stakeholders, our target audience. When my team makes decisions, we must consider the impact of those decisions on other teams. Will there be any side effects? What assumptions and expectations are there about what our team works on? What don’t we know, that other teams might, about something we’re about to do?</p><p>We must understand that there will always be tension between requirements, available resources, and time. This often manifests as tension between developers and stakeholders. I believe this tension is healthy: it pushes us outside our comfort zones, which is how we grow as human beings, and it makes us question our assumptions, which helps us better understand each other.</p><p>To be an effective collaborator requires awareness of one’s ego, and the ability to set it aside. Doing so enables us to receive constructive feedback without taking it as a personal attack, and to participate in <a href="https://codeascraft.com/2012/05/22/blameless-postmortems/">blameless postmortems</a>. It allows us the freedom to acknowledge how we showed up to a meeting or a pairing session: maybe I wasn’t entirely present because I have a lot on my mind, or maybe I was more defensive in a conversation than I intended to be.</p><p>In addition to receiving constructive feedback, mindful collaboration includes proactively soliciting feedback, and graciously receiving it. This can happen anywhere: in team retrospective meetings, one-on-one conversations, formal feedback tools, or even in ad hoc hallway conversations. It can be as simple as asking, “Is there something I could have done a little better?” We find our retrospective meetings to be a good forum for this kind of feedback, especially when it comes to finding ways to improve our processes.</p><p>Empathy and a proactive feedback culture — one in which feedback is offered in a continuous cycle, in varying forms — allow us to engage in spirited debate, particularly when arguments are backed by data (more on this in a later post!).</p><p>When we work together as a team, and especially when multiple teams work together, it is key to set clear expectations of everyone involved. What are we trying to accomplish? By when? We ensure clear communication of expectations by clearly documenting requirements and acceptance criteria as early as possible — and regularly coming back to this documentation as we work on features, to check in on how we’re doing relative to the expectations we set at the start.</p><p>This often applies to meetings, as well. When I am running a meeting, I like to build an agenda before it starts. This helps me identify what I hope to get out of it, and will help keep it from going off the rails. (Everyone’s time is valuable.) During the meeting, I ask questions — and encourage others to ask questions — when things are unclear. At the end, if applicable, I run through the conclusions reached during the meeting, so that everyone is on the same page. This also helps ensure that I heard everyone correctly.</p><h3>What have we learned? How have we benefited?</h3><p>Doing this effectively, on an ongoing basis, is hard! Mindful collaboration requires mutual trust and a willingness to be vulnerable, on the part of everyone involved. It can feel awkward. It takes practice and reflection, performed in cycles, to get it right.</p><p>When we get it right, though, it is awesome. It leads to better function across teams. It helps teams identify potential problems early. Maybe that means a change in direction, or maybe it just means the affected teams have more time to prepare. Either way, everyone has benefited! Moreover, proactively looking for potential effects on other teams builds <em>their</em> trust in <em>my</em> team.</p><p>Mindful collaboration requires effective communication, and that needs to take multiple forms, and usually involves some amount of repetition. We’ll often see the same message communicated through both Slack and email, because not everyone uses both. Then there are the tools we use for things like project management, issue tracking, documentation, and so on. Even sticky notes can be effective. And there’s rarely a substitute for face-to-face communication.</p><p>The biggest benefit by far is the way it produces an inclusive work environment. When people feel valued, they’re happier. And when people are happier, they’re willing to invest more of themselves in their work. That feeling comes through in the office culture, which makes people want to stick around. And who wouldn’t prefer to work in an environment where their colleagues <em>actively want</em> to be there?</p><h3>Conclusion</h3><p>Mindfulness is difficult, and collaboration can be difficult, so it stands to reason that mindful collaboration poses a challenge. It’s complicated, it’s messy, and it takes practice. A lot of practice. But the benefits are so worth the effort: improved cross-team communication and function; a greater feeling of ownership and investment; happier teams; and a more inclusive environment. A team that works well together is a team that will last.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb7571174d57" width="1" height="1" alt=""><hr><p><a href="https://medium.com/omada-health-tech/engineering-values-mindful-collaboration-bb7571174d57">Engineering Values: Mindful Collaboration</a> was originally published in <a href="https://medium.com/omada-health-tech">Omada Health Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Engineering Values: Sustainability]]></title>
            <link>https://medium.com/omada-health-tech/engineering-values-sustainability-873ab3623219?source=rss----c337ce816c8a---4</link>
            <guid isPermaLink="false">https://medium.com/p/873ab3623219</guid>
            <category><![CDATA[sustainability]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[values]]></category>
            <dc:creator><![CDATA[Omada Health Engineering]]></dc:creator>
            <pubDate>Tue, 28 Apr 2020 19:14:55 GMT</pubDate>
            <atom:updated>2020-04-28T19:14:55.763Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Written by </em><a href="https://www.linkedin.com/in/scottstebleton"><em>Scott Stebleton</em></a><em>, Senior Engineering Manager</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lmj42PAmdqVvi8HIuLQMng.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@zburival?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Zbynek Burival</a> on <a href="https://unsplash.com/s/photos/sustainability?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>At <a href="https://www.omadahealth.com/">Omada Health</a>, we have a set of values that guide everything we do as a company. This post, however, is not about our company values, but the values held by our Engineering department. These are the principles that drive the work we do as software developers, data scientists, and infrastructure architects. These values are the product of brainstorming by the management team, and given shape by input and healthy debate across the entire department. (As with any exercise in identifying guiding principles, there was very little that was clear and obvious from the get-go.)</p><p>Our Engineering Department’s values, in no particular order, are:</p><ul><li>Sustainability</li><li>Data-Driven Approach</li><li>Mindful Collaboration</li><li>Shipping Software</li><li>Diversity &amp; Inclusion</li><li>Learning &amp; Innovation</li></ul><p>Today’s post concerns the first of those, and future posts will go into detail on the others.</p><h3>Value: Sustainability</h3><p>When we talk about sustainability, we aren’t referring to ecology or economics, so I’m not going to talk about renewable energy or fair-trade crops. For us, sustainability means pacing ourselves, thinking about the future without losing sight of present needs, and remembering that professional software development is a marathon, not a sprint.</p><p>As it applies to Engineering at Omada Health, sustainability means, among other things:</p><ul><li>Preventing turnover</li><li>Avoiding knowledge silos</li><li>Shipping quality, well-tested code</li><li>Having a strong relationship with our Product teams</li></ul><h3>Putting it into practice</h3><p>We’ve put this value into practice in a number of ways, whether it’s promoting a healthy work-life balance, practicing pair programming (it’s our default mode of operation), or taking the time to refactor old code. We practice test-driven and behavior-driven development (TDD and BDD), which we combine with comprehensive monitoring of key performance indicators (KPIs) and system health, to help surface anomalies and outages as quickly as possible.</p><p>In service of sustainability, we practice some tenets of Agile software development. The principles that are most important to us:</p><ul><li>Starting simple and improving iteratively</li><li>Continuous delivery of working software</li><li>Being responsive to changing requirements and circumstances, especially when they are beyond our control</li><li>Allowing our teams to organize and run themselves</li><li>Face-to-face communication</li><li>Close alignment between the Product and Engineering teams</li><li>Regular retrospective meetings to reflect on, and make adjustments to, team processes</li></ul><h3>How does practicing sustainability help us?</h3><p>First and foremost: teams made up of happy people are more productive. (Who knew?!) Through promoting a healthy work-life balance, reasonable working hours, a culture of inclusion (more on that in a future post), and building and nurturing cohesive teams, our people enjoy coming to work, and they are motivated to make Omada Health a leader in helping people live free of chronic disease.</p><p>On the more technical side, we know from experience that keeping things simple is challenging. How do we decide what needs to be included in an MVP, and what can be added in a later iteration? How do we identify what we need to do now, what we’ll definitely need in the future, and what we might need later on? Answering these questions requires a firm understanding of the problems we’re trying to solve, and putting those answers into practice requires buy-in from stakeholders. (Then there’s the question of identifying your stakeholders!)</p><p>Of course, we want the software we build to last. TDD, BDD, and pair programming are effective ways of preventing knowledge silos, documenting expected behavior, and getting input from multiple people. What’s more, we encourage everyone to include refactors of old code if it gets touched through the course of writing new code. And taking the time to do refactors now will make twelve-months-from-now you very happy.</p><p>Lastly, doing all these things is impossible if the relationship between the Product and Engineering teams is broken or lacking in trust. We encourage a healthy relationship between Product and Engineering by ensuring that they are constantly working closely together, and always able to communicate. Whether that’s in daily stand-ups, planning sessions, retrospectives, or ad-hoc conversations, the key is open, honest, and clear communication.</p><h3>Conclusion</h3><p>At the end of the day, we like feeling proud of the work we do. We want our work to have a profound and lasting impact on the lives of our participants. The surest way to ensure that our work will endure is to practice sustainability across the board, every day.</p><p>Further reading:</p><p><a href="https://www.agilealliance.org/agile101/12-principles-behind-the-agile-manifesto/">12 Principles Behind the Agile Manifesto</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=873ab3623219" width="1" height="1" alt=""><hr><p><a href="https://medium.com/omada-health-tech/engineering-values-sustainability-873ab3623219">Engineering Values: Sustainability</a> was originally published in <a href="https://medium.com/omada-health-tech">Omada Health Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>