<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Robert Chang on Medium]]></title>
        <description><![CDATA[Stories by Robert Chang on Medium]]></description>
        <link>https://medium.com/@rchang?source=rss-c00b242128fe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EguVA0HsIGqUy0gaDS1VgA.png</url>
            <title>Stories by Robert Chang on Medium</title>
            <link>https://medium.com/@rchang?source=rss-c00b242128fe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Sep 2026 23:04:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rchang/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Reflections on Airbnb]]></title>
            <link>https://medium.com/@rchang/reflections-on-airbnb-6c213b027c69?source=rss-c00b242128fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c213b027c69</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Robert Chang]]></dc:creator>
            <pubDate>Fri, 31 Jul 2026 07:33:16 GMT</pubDate>
            <atom:updated>2026-08-05T06:28:42.657Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XE0Kj1QnDtXHhIIdKrRFWw.png" /></figure><h3>Introduction</h3><p>I left Airbnb a few weeks ago, a decade after joining in early 2016.</p><p>Taking inspiration from<a href="https://nabeelqu.substack.com/p/reflections-on-palantir"> Reflections on Palantir</a> and<a href="https://calv.info/openai-reflections"> Reflections on OpenAI</a>, I want to write down some reflections on my time there while the memory is still fresh. This post is part about what I think makes Airbnb unique, and part a recollection of lessons learned over the years. All in all, I left the company with a lot of gratitude, and that’s the spirit I’m writing this in.</p><h3>Company</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kWaYJvQ0C7mdiWBoyxXVcQ.png" /><figcaption>Airbnb’s San Francisco HQ, ahead of the 2026 Summer Release</figcaption></figure><h4>Business</h4><p>When I joined in early 2016, the company was in full growth mode, and I spent my first few years growing the host side of the marketplace. That’s where I learned that running a two-sided marketplace is mostly about designing incentives and rules that don’t overly favor one side or the other. Take <a href="https://www.airbnb.com/help/article/523">Instant Book</a>, where guests can book without host approval. It’s convenient for guests, and it also means hosts have less control over who stays in their home. Or <a href="https://www.airbnb.com/help/article/472">House Rules</a>, useful for setting expectations. Pile up too many of them and you’ve created a hassle for guests. Growing a marketplace means the market design matters just as much as the growth curve.</p><p>After several years of high growth, Airbnb <a href="https://news.airbnb.com/airbnb-announces-intention-to-become-a-publicly-traded-company-during-2020/">announced</a> its intention to go public in late 2019. Then COVID hit: by April 2020, gross nights booked were down 72% year over year, and net bookings turned negative, an unprecedented situation, as cancellations skyrocketed. After raising capital and cutting costs everywhere else, Airbnb made the hard decision to lay off about 25% of its workforce, roughly 1,900 people, which remains the largest layoff in Airbnb’s history.</p><p>As the world slowly adapted to life with COVID, business recovery came faster than it did for most of our peers, as travel demand shifted toward domestic trips and rural destinations. Having supply across <a href="https://www.sec.gov/Archives/edgar/data/1559720/000155972022000006/abnb-20211231.htm">100,000 cities and towns and 220 countries and regions</a> meant that wherever demand reappeared, we already had listings there. In a miraculous turn of events, Airbnb went public that December, ringing the bell with hosts around the world. After the year everyone had just been through, it was an emotional moment.</p><p>Airbnb has spent the years since perfecting the core product, and it’s now expanding beyond it. Services, Experiences, and a push into boutique hotels are among the newest bets. It’s also exploring what AI can do for the product and the business. Most of these are early and unproven, but a new chapter has begun.</p><h4>Culture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P6ZRUJJwNzRZYGBq9ZBy8Q.png" /><figcaption>The colorful fourth-floor wall a lot of us used to hang out by</figcaption></figure><p>For a company whose business is predicated on 99% of humans being good (after all, you’re staying at a stranger’s home), Airbnb looks for many of those same qualities in hiring. Beyond the standard interview process, Airbnb runs culture interviews to assess a candidate’s fit with its <a href="https://careers.airbnb.com/life-at-airbnb/">core values</a>. In mine, I talked about a trip I’d helped plan to Peru. I was told later that the stories I shared embodied the core value of “Be a Host.”</p><p>It’s no surprise, then, that my favorite core value is “Be a Host,” and it shows up in small but telling ways. On my first day at Airbnb’s HQ, people were opening and holding doors for me and for each other. That kind of behavior extended beyond small daily etiquette into how people actually worked together. My coworkers were brilliant, and brilliant assholes were rare. People were competitive, rarely combative. It was, on the whole, a place of low drama, where people treated each other with a lot of respect.</p><p>On the flip side, this desire to be a great host can sometimes get overextended into playing nice, or even conflict avoidance. This shows up often in consensus building, which can be a slow and sometimes painful process. It often comes as a shock to those used to a culture of direct, blunt feedback.</p><p>I do think the cofounders <a href="https://medium.com/@bchesky/dont-fuck-up-the-culture-597cde9ee9d4">don’t want to fuck up the culture</a>, and they’ve tried to hold onto the early spirit every time the company outgrows itself. That said, it’s hard not to miss some of the early days, when the company was smaller and less formal. Every Friday we had nerds@, where engineers shared what they’d learned or built that week. At world@, product leads frequently showed early snippets of what we were about to launch. Some of that faded as we grew, and I wish we’d kept more of it.</p><h4>Operating Model</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3kynxrQrBsQzC6Z647TmAw.png" /><figcaption>The host and guest journey fames, inspired by how Walt Disney designed Snow White</figcaption></figure><p>Given that Brian Chesky, co-founder and CEO, is a designer by training, it’s no surprise that he applies that same design mindset to building the company itself, and he’s never shy about learning from iconic companies.</p><p>On the fourth floor of Airbnb HQ, frames hang on the walls describing the host and guest journey, inspired by how Walt Disney designed the storyline of Snow White. In the years leading up to COVID, Brian drew heavily on Amazon, with the ambition to grow Airbnb into a Trip platform that went beyond just accommodation. More recently, he’s turned to Apple, reshaping how we do product marketing, launches, and roadmap planning. Each era brought its own ambitions and its own way of working, often under new leadership too.</p><p>Every change, though, came with its own growing pains. Pre-COVID, that meant unfocused sprawl: Airbnb was simultaneously pursuing experiences, magazine, business travel, hotels, and even flights, spread across four largely independent business units. Post-COVID, the pendulum swung toward bi-annual, big-bang releases: high-stakes, all-or-nothing launches that made it harder to isolate what was working. And Brian’s<a href="https://paulgraham.com/foundermode.html"> founder mode</a> talk spun up its own debates, internally and externally. Despite this thrash, I appreciate that Brian has the ambition to build an iconic company and isn’t afraid to adapt and experiment, treating the company itself as an iterative design problem.</p><p>One more operating model choice worth mentioning: Airbnb is one of the few companies that genuinely committed to remote-first since COVID. I’ve benefited from the flexibility, but I miss standing at a whiteboard with a coworker and working a problem out. Keeping that kind of collaboration alive is a hard problem. We’ve hired strong people in places we couldn’t have reached otherwise, though it’s harder to screen for candidates who want the job rather than the flexibility. The remote-versus-office question is challenging, and Airbnb is still working hard to find the right balance.</p><h3>Data at Airbnb</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8gkLx_ZBuzZVMLyQoCpz9A.png" /><figcaption>The inaugural class of Data University instructors at Airbnb (<a href="https://medium.com/airbnb-engineering/how-airbnb-democratizes-data-science-with-data-university-3eccc71e073a">source</a>)</figcaption></figure><h4>Teams</h4><p>In the early days, the <a href="https://medium.com/airbnb-engineering/at-airbnb-data-science-belongs-everywhere-917250c6beba">entire data team</a>, known internally as the A-team, was small enough to fit in a single room. It skewed toward early-career PhDs from a mix of backgrounds: economics, statistics, operations research, and the social sciences. All of them were sharp thinkers, deeply data-driven, and product-focused.</p><p>Organizationally, individual contributors owned specific domains and became experts in them, but they all reported up to a Head of Data. In more recent years, they report to various leads in engineering in a decentralized fashion. By the time I left, Airbnb had hired its first VP of Data Science, so perhaps the pendulum will swing back toward a more centralized data organization. These swings are not uncommon: LinkedIn and Facebook went through similar evolutions.</p><p>Airbnb’s relationship with Data Engineering has been a complicated one. The investment started early: many of the founding data engineers came from Facebook, and our early warehouse showed it. The <a href="https://medium.com/airbnb-engineering/data-infrastructure-at-airbnb-8adfb34f169c">medallion architecture</a> and <a href="https://medium.com/data-science/an-island-of-truth-practical-data-advice-from-facebook-and-airbnb-a0d9c355e5a0">core data</a> were heavily inspired by what they’d built there. Around 2018, the org dismantled the Data Engineering team, and in my opinion it was one of the costliest mistakes data leadership at Airbnb made.</p><p>Luckily, we retained some of the strongest engineers, many of whom moved to Data Platform. Under new leadership, Airbnb reinvested in data engineering hiring in 2019, and the community is strong again today. Airbnb was also one of the first companies at this scale to create an Analytics Engineering organization, thanks in part to its investment in tooling like Minerva, our semantic layer.</p><p>Overall, the roles are increasingly specialized: data scientists and analysts focus on product work, analytics and data engineers build company-wide datasets, and software engineers build the underlying platform.</p><h4>Platform</h4><p>Airbnb historically leaned “build” over “buy,” and several successful open-source projects were born here, most notably Airflow and Superset.</p><p>For offline data, everything lives in a lakehouse: data on S3, stored as Parquet files in <a href="https://www.youtube.com/watch?v=BP9wUnq_OLI">Iceberg</a> tables. Data is typically date-partitioned, and we compute incrementally wherever possible, though some late-arriving data (think cancellations or alterations) forces a full history rewrite. Spark is the main engine for batch, Flink for streaming, and Trino for interactive queries. For orchestration, Airbnb runs one of the largest Airflow deployments in the world, often at a scale the open source community isn’t equipped for.</p><p>Airbnb leans heavily on config-driven frameworks, so much so that some joke that our data contracts are entirely built on fragile YAML files. The frameworks built this way are still widely adopted: ML feature platform<a href="https://medium.com/airbnb-engineering/chronon-a-declarative-feature-engineering-framework-b7b8ce796e04"> Chronon</a>, Minerva as our semantic layer, and an <a href="https://medium.com/airbnb-engineering/how-airbnb-safeguards-changes-in-production-9fc9024f3446">experimentation platform</a> called ERF, to name a few. Python is the primary language for building these data frameworks.</p><p>We invest just as heavily on the consumption side. <a href="https://medium.com/airbnb-engineering/democratizing-data-at-airbnb-852d76c51770">Dataportal</a> is a catalog and UI that helps people find the right data, and a unified metadata service sits underneath it, storing the metadata every other data tool depends on, such as ownership, landing times, and asset tagging. More recently we built an internal data agent, and it has shown real promise, largely because the semantic layer and metadata service were already there for it to stand on.</p><p>I’m biased here. I think Airbnb’s data ecosystem is sophisticated and underrated compared to peer companies. Investment in data was one of the reasons I joined, and it held up.</p><h4>Semantic Layer</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MIaP3Ww4Pf5tm9PiJYLNWQ.png" /><figcaption>Where Minerva, Airbnb’s semantic layer, sits relative to the rest of the data platform</figcaption></figure><p>For seven of my ten years at Airbnb, I worked on the company’s semantic layer, <a href="https://medium.com/airbnb-engineering/how-airbnb-achieved-metric-consistency-at-scale-f23cc53dea70">Minerva</a>. People at other companies often ask how we scaled it across the entire organization. There wasn’t one standout strategy. It came down to aligning with company initiatives, finding champions, and a relentless ownership mindset.</p><p>As early as mid-2018, we were already thinking about consolidating definitions across business metrics and experimentation metrics under a single source of truth. The real catalyst came around 2019, as Airbnb prepared to go public and data quality, or the lack of it, became an existential problem. Years earlier, we’d made the mistake of dismantling our Data Engineering team, and we’d been paying for it ever since. Different teams built their own versions of “bookings,” “active listings,” and “revenue.” When Brian asked for last week’s bookings number, he’d get a different answer depending on who he asked. For a company about to report to public markets, that was untenable. Our CTO was so concerned he declared “data bankruptcy.”</p><p>Out of that urgency came three efforts. First, a <a href="https://medium.com/airbnb-engineering/data-quality-at-airbnb-e582465f3ef7">company-wide data quality initiative</a> to rebuild the most business-critical data models from the ground up. Rebuilding models once wasn’t enough to keep them trustworthy, so we created a <a href="https://medium.com/airbnb-engineering/data-quality-at-airbnb-870d03080469">certification process</a> called MIDAS to hold data to a consistent bar of quality. Finally, we invested in infrastructure: a way for data producers to define a single source of truth for business metrics and dimensions that could actually be certified. <a href="https://medium.com/airbnb-engineering/how-airbnb-achieved-metric-consistency-at-scale-f23cc53dea70">Minerva</a> became the natural home for that.</p><p>IPO-readiness created the urgency. MIDAS gave us the program and process to act on it, and Minerva ended up being the paved path that came out of it. We worked closely with key leaders early on to position it that way, then expanded team by team as wins built momentum. It took about two years before Minerva became the standard tool for Analytics. In some ways, the analytics engineering role at Airbnb exists because we had this central piece of technology sitting in the middle.</p><h3>Work Lessons</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lTNVZIv8Z5MmPLa7mYpzKQ.png" /><figcaption>My coworker Krist made this for me right before I left, celebrating what I’d contributed.</figcaption></figure><h4>On Building Software</h4><p>Working at the intersection of software and data engineering, I got to learn from several exceptional software and data engineers who taught me how to think about the craft.</p><p>My first big takeaway is that “software engineering is programming integrated over time,” a definition popularized by the book <a href="https://abseil.io/resources/swe-book">Software Engineering at Google</a>. Design patterns and abstractions are tools for managing complexity, more than ends in themselves. When a group of people with different levels of understanding and mental models work on the same codebase, having these at our disposal is a proven way to evolve the software while keeping everyone’s understanding aligned.</p><p>Speaking of design patterns, I learned that they are a useful vocabulary for identifying common problems and possible solutions. Several came up again and again: <a href="https://refactoring.guru/design-patterns/adapter">Adapter pattern</a>, which let us wrap different backend databases behind a consistent interface; <a href="https://refactoring.guru/design-patterns/bridge">Bridge pattern</a>, which we used to decouple the Airflow operator from the unit of work it carries (what we call Step); and <a href="https://refactoring.guru/design-patterns/strategy">Strategy pattern</a>, which became the backbone of our audit framework for checking data quality.</p><p>On abstraction: I started off writing procedural code to implement our write-audit-publish (<a href="https://www.youtube.com/watch?v=fXHdeBnpXrg&amp;t=990s">WAP</a>) pattern, then watched more experienced engineers replace it with abstractions that simplified the code I’d written and made writing new code easier. In another example, we introduced a Spell abstraction that lets developers add codemod capabilities, invoked by both developers and CI for config validation. It replaced a series of very fragile shell scripts strung together over the years. Nowadays, if I find myself writing similar code with unnecessary implementation detail for the task at hand more than once, I pause and ask whether there’s a useful abstraction we can introduce to hide that complexity.</p><p>I’ve also picked up several other technical lessons along the way: domain modeling, why <a href="https://mcfunley.com/choose-boring-technology">choosing boring technology</a> is usually the wiser choice, composition over inheritance, dependency injection and inversion, and snapshot testing. Each one probably deserves its own blog post. The common thread is that all of these took time to internalize. I only appreciated them after working in the same codebase long enough to see why they mattered.</p><h4>On Maintaining Software</h4><p>There was a period where we were heads down building and re-architecting. There are also periods that call for reliability and stability over agility and speed of change. Navigating different phases of a software lifecycle requires shifting how you think and where you focus, and for me, it took a few painful incidents before I really internalized that.</p><p>For a while we treated every dataset roughly with the same priority. Once the platform was adopted company-wide, it became clear that financial reporting and executive dashboards were far more critical than someone’s ad-hoc report. We introduced a data tiering system that lets us prioritize compute resources according to each dataset’s tier and SLA requirements. We also invested in observability. For a long time we didn’t know what “healthy” looked like for most of our systems, so we built layered observability: real-time, intraday, daily, and defined “good” for each tier. To keep low-signal alerts from burying the real issues, we routed alerts to the right owners and tuned thresholds until the ones that fired were worth acting on.</p><p>To harden our system, we learned from every incident for corrective action. One recurring lesson: big-bang releases are risky because the blast radius is enormous. We leaned into gradual rollouts, feature flags, and staged deployments, and over time deployments got calmer. We also surveyed the team on which parts of the job were intolerably repetitive and automated as much of it as we could. Restarting failed jobs, validating releases, and clearing alerts by hand were the biggest offenders, and we automated most of them over time.</p><p>At times, we needed to make much bigger changes. The accumulated weight of new use cases and tech debt made the architecture itself unmaintainable, and the only real fix was to rebuild the foundation. We did that twice with Minerva over seven years, and I expect it will happen again as requirements and use cases continue to evolve.</p><h4>On Ownership Mindset</h4><p>Having worked on Airbnb’s Data Platform for many years, I’ve come to believe that one of the keys separating a successful project from a mediocre one is the level of care contributors bring, the ownership mindset that makes you take pride in your work.</p><p>For us, that mindset showed up in everyday choices. While it was often tempting to build the intellectually interesting thing, we pushed back on our own over-designed proposals, and more than once killed them, in favor of something simpler that unblocked users. We cleaned up technical debt when the opportunity came, not because we treated debt as something to avoid at all costs, but because we knew it would help other developers down the line, even if users never noticed. And when users ran into issues, we took pride in unblocking them fast. Our on-call rotation was where we learned what was broken, not just a chore to rotate through.</p><p>Ownership mindset mattered even more during difficult times. There were periods when reliability problems hurt our team’s reputation, voluntary attrition left us severely under-resourced, and we couldn’t prioritize the work users were asking for. In moments like those, we called out the problems honestly and took steps to address them before they turned into fires. When the difficulty was structural, organizational misalignment rather than a technical gap, we weren’t shy about rallying leadership to make bigger changes.</p><p>I was lucky to work on a team where everyone showed a high level of agency and ownership. That’s part of why Minerva stuck with Airbnb’s data community for as long as it did.</p><h3>Personal Lessons</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*949Vo3pnfXg1hh6ld6yTIw.png" /><figcaption>personalized stickers I got from One Airbnb in 2017</figcaption></figure><h4>Switching Roles</h4><p>Some of the defining moments of my time at Airbnb came when I stepped outside my existing role and started over from scratch.</p><p>From 2016–2019, I worked as a data scientist helping grow our host community across several marketplace tiers (remember Airbnb Plus?). When the company dismantled its data engineering org, I was one of the few data scientists who dove into the wreckage and rebuilt from there, and found I enjoyed the work. Building pipelines and producing high-quality datasets taught me how much leverage comes from the right tooling, so from 2019 to 2021, I pivoted into product management to help scale Airbnb’s semantic layer from 0.5 to 100. From 2021 on, I worked as a SWE on the Minerva team to rebuild our stack from the ground up.</p><p>A shift in your interests doesn’t automatically earn the organization’s trust that you can execute in a new role. Every stretch into something new is a bet the org makes on you, and it’s on you to make it pay off. My playbook stayed the same each time: do great work, earn a reputation that precedes you, find an adjacent area that interests you, identify a sponsor, then pivot if that move propels growth.</p><p>Switching functions re-accelerates your growth. It isn’t free, either. It can slow your climb up any single ladder, and the expertise you’ve built fades into the background, at least for a while. You have to be willing to sit with that discomfort and be honest about your own learning curve (more on that in the next section).</p><p>Looking back, this is the main reason I stayed at Airbnb as long as I did. It felt like three different jobs packed into one decade, each giving me a distinct experience and its own growth opportunities. In the age of AI, I think the people who can operate beyond any single role are the ones best positioned to thrive, and I’m curious where that takes me next.</p><h4>Growing Pains</h4><p>With each transition come growing pains. Two stories from my time at Airbnb still stick with me. In one, I leaned in immediately. In the other, I flinched for months before turning it around.</p><p>In my first week (yes, first!) as the new product manager for the Minerva team, we had the largest incident in the team’s history, internally known as CIM-198. It was big enough that we had to put a moratorium on Minerva, blocking users from contributing new semantics to our platform. My immediate job was to communicate the scope of the incident and how we’d fix it. My broader job was to work with engineers to find the gaps in our system and build both short- and long-term fixes so it couldn’t happen again.</p><p>The whole thing felt like an extended interview, testing product management skills I barely had yet. Our users were patient, leadership gave us room to work, and I partnered closely with engineering to build a solid plan. We shipped several new features, including offline backfill, which still plays a key role in the architecture today. The incident was memorable enough that we eventually printed T-shirts reading “I survived CIM-198,” a badge of honor I hope we never have to award again. I had fond memories of that first week and thought I handled it well.</p><p>The second story is from when I first transitioned to software engineering. I worked with a mentor who was extremely capable and had a high bar. His style and presence could be dominating, which made me feel insecure. Unlike the CIM-198 crisis, there was no deadline compelling me to act here, so instead of leaning in, I did the opposite. I worried constantly about people’s perception of me, afraid of wasting his time, asking naive questions, and looking dumb. I’d charge ahead on implementations without checking in, only to surface a PR too late for meaningful feedback. It got bad enough that one day he asked me, point blank, “Are you avoiding me?” That was a rude awakening.</p><p>Something he told me afterward has stuck with me since: even if my judgment was 99% bad starting out, as long as I was willing to reflect on why, my taste would improve over time. That was the actual path to growth. It took some psychological work, but I realized a strong re-start meant embracing the growing pains and letting go of my ego. I eventually leaned into the discomfort and changed how I conduct myself. I started pair programming more, asking questions earlier, and letting myself look unsure. Six months later, that same mentor told me another respected engineer on the team considered me one of the most reliable people he worked with.</p><p>The difference between the two stories was how quickly I let go of my ego and embraced the growing pains. I’d like to think I’ve gotten faster at that over time.</p><h4>Seeking Impact</h4><p>In most companies, growth is measured by your level on the career ladder. It’s a useful external scorecard, but orient your whole career around it and you might end up chasing levels and labels instead of the work that energizes you.</p><p>I learned this the hard way as a PM scaling Minerva. By most external measures, things were going well. I had real impact, worked with great people, and the product was growing fast. The day-to-day was wearing me down anyway: constant context switching, no time to think deeply, managing up, down, and sideways all at once. I started seriously thinking about leaving the company.</p><p>What changed my mind was a conversation with my partner. She listened to me vent, then said: “It seems like you’re still very passionate about the company and the team’s mission. You’re just in the wrong job.” She was right. I still cared about Airbnb, the team, and the mission. What had happened was that I’d drifted into a shape of work that didn’t fit me, and I hadn’t been honest with myself about it. I’d gotten pulled in by the feeling of having impact and stopped asking whether the work itself was right.</p><p>That conversation pushed me to advocate for a move back into a more technical role, one built for deep problem solving. It wasn’t a straightforward move on paper, giving up a PM role to start over as an IC in engineering. It was the right call for what I wanted my days to look like, and it set up the most fulfilling chapter of my time at Airbnb.</p><p>Nobody will advocate for the work you love more than you will. Your manager has other priorities to juggle, the org has its own gravity, and the career ladder keeps pulling you toward the next level whether or not that’s what you want. Knowing yourself well enough to push back, and having the courage to do it, matters more than any promotion I got.</p><h3>Parting Thoughts</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iN6Ds99yf7DnreCM9l8FRQ.png" /><figcaption>The meeting room where I gave my onsite presentation to a panel of interviewers many years ago, I thought I bombed the interview! (<a href="https://time.com/4139121/airbnb-officies-conference-rooms/">source</a>)</figcaption></figure><p>I never thought I’d stay at Airbnb this long.</p><p>Looking back, it felt like working three distinct jobs across three different companies. Careers are non-linear, and staying self-aware is what let me course correct along the way. In the process, I came to understand what I’m good at, what I enjoy, and what I want more of. I made a real impact, and I was lucky to work alongside some of the kindest and most talented people I know, some of whom I now consider dear friends.</p><p>I’ll miss Airbnb dearly. I’m excited to see what the next chapter looks like, and this decade has given me what I need to navigate it.</p><p>—</p><p><em>Thank you, Jason, for onboarding me to Airbnb, which led to a decade-long friendship. Thank you, Vaughn, for teaching me everything about Airbnb and what it means to do right by the business. Thank you, Aaron and Hamel, for teaching me all things data. Thank you, Ricardo and Cuky, for believing in me as a Data Scientist. Thank you, Jeff, for betting on me to lead the Minerva team when I had no PM experience. Thank you, Shao, Dave, and Vyl, for helping me transition to SWE when I asked for it. Thank you to the whole Minerva team for working alongside me all those years. Thank you, Philip, Krist, and Clark, for being constants on the Minerva team and going through the ups and downs together. Thank you, Toby, Chris, Barak, and Ginter, for showing me what it means to be an outstanding engineer.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c213b027c69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Five Short Lessons To Improve Infrastructure Reliability]]></title>
            <link>https://medium.com/@rchang/five-short-lessons-to-improve-infrastructure-reliability-4e230c891256?source=rss-c00b242128fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e230c891256</guid>
            <dc:creator><![CDATA[Robert Chang]]></dc:creator>
            <pubDate>Mon, 26 May 2025 00:05:16 GMT</pubDate>
            <atom:updated>2025-05-26T00:05:16.292Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rpLxfdLou35YvYYy" /><figcaption>Photo by <a href="https://unsplash.com/@honza_kahanek?utm_source=medium&amp;utm_medium=referral">Jan Kahánek</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Recently, a few incidents prompted my team to re-examine our approach to reliability. As a result, we invested deeply in tooling, observability, alerting, and deployment safety. Along the way, we uncovered several important lessons — not just for our team, but for any team operating complex, business-critical data infrastructure.</p><p>Here are five of the short lessons.</p><h3>1. Not All Data Is Equal — Tier Accordingly</h3><p>One of the most important realizations was that we were treating all datasets more or less the same — even though some were clearly more critical. For example, financial reporting data, executive dashboards, and launch metrics have much higher business impact than internal experimentation logs or ad hoc data.</p><p>We introduced a <strong>tiering system</strong> to classify datasets based on business importance. This helped us allocate engineering attention and infrastructure resources more effectively. It also paved the way for differentiated alerting, recovery priorities, and SLA expectations.</p><p>If you’re running a data platform, ask yourself: <strong>Do you know which data is truly critical to the business?</strong> If not, it’s time to map that out — and start treating your top-tier assets with the extra care they deserve.</p><h3>2. You Can’t Improve What You Don’t Measure</h3><p>As cliche as it might sound, we realized we lacked a reliable definition of platform health. We had dashboards, but they weren’t comprehensive. We had metrics, but not always the right ones. And without a clear picture, it was hard to know where to focus or whether we were making progress.</p><p>We tackled this by building layered <strong>observability views</strong> — real-time, intraday, and daily dashboards that gave us a cockpit-style look at system performance. We also worked with stakeholders to define what “healthy” looked like, and used that to formalize incident criteria and drive alerting improvements.</p><p>This effort underscored a core principle: <strong>visibility is the foundation of reliability</strong>. Without good measurement, you’re flying blind.</p><h3>3. If Alerts Aren’t Actionable, They’re Just Noise</h3><p>Another root cause of incidents — was alert noise and fatigue. We had too many low-signal alerts, often triggered by datasets that weren’t even business-critical. Engineers were getting paged, but not always with clear next steps or ownership.</p><p>We addressed this by routing dataset-level alerts to the appropriate owners, fine-tuning thresholds, and improving our on-call runbook with clear triage steps. The result was fewer false positives, less fatigue, and faster response to real issues.</p><p>Alerting hygiene doesn’t sound glamorous, but it’s essential. Audit your alert surface regularly, kill flaky or redundant signals, and make sure every alert includes enough context for someone to act.</p><h3>4. Avoid Big-bang deployment, roll out gradually</h3><p>Several incidents were caused — or worsened — by risky changes rolled out all at once. We had good testing practices, but we lacked safety mechanisms to gradually roll out new behavior or catch issues before they hit production.</p><p>So we leaned hard into <strong>gradual rollouts</strong>. We started using feature flags for high-risk changes, implemented staged deployment pipelines, and made sure every release was thoroughly baked in staging before going live.</p><p>This shift transformed our deployment culture. Releases became calmer, confidence went up, and reversions were much faster when needed. If your deployments feel risky or stressful, consider what parts of the rollout you can decouple, stage, or flag off until proven stable.</p><h3>5. Manual Operations Don’t Scale</h3><p>Finally, we looked at all the places where engineers were doing repetitive manual work: restarting DAGs, tagging releases, validating deployments, clearing alerts. Not only were these steps tedious — they were also prone to human error.</p><p>We invested in automation: Airflow utilities for bulk operations, scripts to validate release readiness, and tooling to reduce friction in our library release process. The result was a more reliable platform and happier engineers.</p><p>A good first step for any team: <strong>track how often you’re doing the same task by hand</strong>, and ask whether a script or tool could do it instead. Small automations add up — and often unlock disproportionate leverage.</p><h3>Looking Ahead</h3><p>The exercise to improve reliability wasn’t easy — but it was necessary. It forced us to ask hard questions, build better tools, and recommit to the discipline of operational excellence. Today, our infrastructure is more observable, safer to operate, and better aligned with the needs of the business.</p><p>If you’re building a data platform or operating critical analytics infrastructure, I hope these takeaways help you strengthen your own reliability practices.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e230c891256" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Luck Favors the Prepared: My Journey Across Three Roles at Airbnb]]></title>
            <link>https://medium.com/@rchang/luck-favors-the-prepared-my-journey-across-three-roles-at-airbnb-eefb7a321ed4?source=rss-c00b242128fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/eefb7a321ed4</guid>
            <dc:creator><![CDATA[Robert Chang]]></dc:creator>
            <pubDate>Sat, 08 Mar 2025 22:38:51 GMT</pubDate>
            <atom:updated>2025-05-19T00:26:41.891Z</atom:updated>
            <content:encoded><![CDATA[<p>Career growth doesn’t always mean switching companies — sometimes, the best opportunities are right where you are</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fdk-eBSz4a_Y%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Ddk-eBSz4a_Y&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fdk-eBSz4a_Y%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e23b1bd7bdb52740badd8461e5a2ec3/href">https://medium.com/media/0e23b1bd7bdb52740badd8461e5a2ec3/href</a></iframe><h3>Introduction</h3><p>I joined Airbnb in early 2016 and recently celebrated my ninth anniversary at the company. Many, including myself, are surprised by how long I’ve stayed with a single company. In Silicon Valley, where the average employee tenure is usually no more than four years, nine years at one company feels like an eternity.</p><p>When people ask why I’ve stayed so long, I often explain that rather than sticking to the <a href="https://marcgg.com/blog/2025/02/07/years-of-experience/"><strong>same job</strong></a> for nine years, I’ve explored three different roles across distinct functions. Over the years, several colleagues have reached out for advice on navigating similar transitions, since I’ve successfully made this shift not once, but twice.</p><p>While luck certainly played a big role, in this post, I would like to share a few things that I did that increases my odds of expanding my skill sets and career paths.</p><h3>My Path</h3><p>I started at Airbnb as a data scientist in early 2016, focusing on growing Airbnb’s supply. Over the years, I contributed to key projects and was always fascinated by some of the internal tools we built at Airbnb. From 2017 to 2019, Airbnb’s Data Science team faced a challenging time. We no longer had a dedicated Data Engineering team, which meant data scientists, including myself, had to take on engineering responsibilities. While some found this shift frustrating, I was passionate about the field and embraced the opportunity to learn as much as I could.</p><p>In 2019, Airbnb revamped its data strategy, and an opening to lead the Metric Infrastructure team came up. Despite my lack of formal product management experience, the hiring manager took a chance on me. From 2019 to 2021, I worked with a fantastic team of engineers to scale Minerva, Airbnb’s metrics platform, from a handful of use cases to a core component of the company’s data quality initiatives. <a href="https://medium.com/airbnb-engineering/how-airbnb-achieved-metric-consistency-at-scale-f23cc53dea70">Minerva</a> transformed how analytics is done at Airbnb and remains the primary tool for creating trustworthy datasets.</p><p>By 2021, Minerva had become highly successful, but some of its early technical decisions were showing limitations. We decided to rebuild Minerva from the ground up to serve users for the long term. Seeing this as an exciting opportunity, I transitioned into engineering, with support from my engineering partner and my director. Since then, I’ve been a software engineer on the same team I once managed as a PM. By early 2025, we successfully migrated the entire stack to a new, more powerful system.</p><h3>How to Improve Your Odds</h3><p>While my path might seem straightforward, each transition involved strategic exploration, seeking sponsorship, and advocating for myself. While luck plays a huge role, it’s something beyond our control. Instead, I want to focus on the actions you can take before formally considering a transition.</p><h3>Do Good Work</h3><p>This should be obvious: if you can’t excel in your current role, it’s hard to convince others that you’re ready for more responsibility or something new. On the other hand, showing excellence makes it easier for others to envision you succeeding in different areas.</p><p>When Airbnb’s Data Science team needed to build critical data pipelines, I became one of the lead contributors on the Host team. I collaborated closely with data platform partners, learning a lot from them. I was also frequently on call for data issues and proactively proposed new ways to improve reliability and enhance our data tools. By taking ownership and rapidly improving my data engineering skills, I stood out during this time.</p><p>As Charlie Munger once said:</p><blockquote><em>“To get what you want, you have to deserve what you want.</em></blockquote><h3>Establish a Good Reputation</h3><p>Around the same time, I worked closely with the Data Platform team, particularly the Machine Learning Infrastructure group. As an early adopter of Zipline, our feature store, I faced numerous usability issues. Rather than getting frustrated, I turned these into constructive feedback and detailed documentation to improve the developer experience.</p><p>Witnessing the power of these new tools firsthand, I proactively advocated for them on behalf of the platform team and encouraged my fellow data scientists to give them a try. I partnered with individual users, led brown bag sessions, and conducted training workshops — each crucial to driving the adoption of these tools.</p><p>These efforts helped me build trust with my Data Platform peers, earning a reputation as someone who understood user workflows and could translate pain points into actionable requirements. I also became known as a natural developer advocate who could evangelize impartially. Little did I know, these would be key traits for a Product Manager.</p><h3>Identify Adjacent Opportunities</h3><p>While the transition from Data Science to Product Management might seem like a huge shift, it felt more like a natural progression for me. The role involved leading an internal product in the data space, rather than a highly visible product like the Airbnb app.</p><p>Given my background, I had deep empathy for how users might want to use the tools. Plus, my proven ability to collaborate with Data Platform engineers as an early adopter of Zipline was a huge asset. The hiring manager valued this experience to offset my lack of formal PM experience.</p><p>Similarly, when transitioning from PM to Engineering, I didn’t switch to a completely different domain. I focused on honing my engineering skills within the same team, which minimized context switching. This decision allowed me to focus my cognitive energy on learning engineering without the added complexity of learning an entirely new domain.</p><p>Identifying adjacent opportunities is, to me, a crucial aspect of successfully switching roles. Just as I advocate for learning adjacent skills, I believe the best way to achieve that is by pursuing adjacent opportunities.</p><h3>Finding Sponsorship</h3><p>No matter how qualified you are or how much desire you have to try new roles, you’ll need a sponsor — someone who is willing to bet on you. The best approach isn’t to ask for opportunities but to create and propose them. Clearly articulate why being in those roles will help address the sponsor’s challenges.</p><p>In fact, I didn’t initially consider the PM opportunity. It was the PM who asked if I knew anyone in my network who would be a good fit. After receiving some guidance on the ideal candidate the hiring manager was looking for, I reached out to a few people, only to realize later that I might be uniquely qualified for the role myself. I engaged with the hiring manager, and we went through several rounds of discussions. It wasn’t until after a few conversations that we both felt comfortable and confident that this would be a safe bet for both of us.</p><p>For my transition to engineering, my sponsor was the senior staff engineer who leads the overall team effort. I shared with him my long history and interest in building great data tools and explained what basic engineering skills I had (and those I still lacked). After reviewing some of my earlier work as a data scientist, he believed there was a good chance I could excel in the role and decided to advocate for me in front of our director. The director trusted the senior staff engineer’s judgment, and that’s how I began my engineering trial, which I eventually completed successfully.</p><h3>Conclusion</h3><p>Looking back on my time at Airbnb, I’ve realized that career transitions aren’t just about jumping into a new role. They’re about positioning yourself for new opportunities, embracing challenges, and continuously learning. Each transition I made was about taking the next step thoughtfully and strategically, building on what I already knew, and finding new areas to grow. Just as Fortune favors the prepared mind, luck favors the prepared.</p><p>Doing great work in your current role is key to proving you’re ready for more. Building a strong reputation for reliability and adaptability helps others see your potential to succeed in new roles. Focusing on adjacent opportunities, where you can leverage existing skills while learning new ones, makes transitions smoother. And remember, having a sponsor — someone who believes in you — is essential to opening doors.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eefb7a321ed4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Make Your Codebase a Little Better Every Day]]></title>
            <link>https://medium.com/@rchang/make-your-codebase-a-little-better-every-day-3e158f917c26?source=rss-c00b242128fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e158f917c26</guid>
            <dc:creator><![CDATA[Robert Chang]]></dc:creator>
            <pubDate>Sun, 23 Feb 2025 23:47:20 GMT</pubDate>
            <atom:updated>2025-02-23T23:49:04.823Z</atom:updated>
            <content:encoded><![CDATA[<p>What we can learn from the Boy Scout Rule</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*buYzQh_ena8CUM4O.jpg" /></figure><h3>Introduction</h3><p>I recently came across Sean Goedecke’s post on <a href="https://writing-robert-chang.ghost.io/how-i-build-learning-projects-part-ii/"><em>What Can Strong Engineers Do That Weak Engineers Can’t?</em></a>, and I found it to be a compelling read. His thesis is that strong engineers can tackle tasks that others simply cannot. While I agree with much of what he describes, translating those observations into actionable advice that helps one become a stronger engineer is not always straightforward.</p><p>Among the many skills an engineer can develop, one mindset stands out to me: proactively make the codebase you contribute to and maintain better. In this post, I want to share a few practical tips to make your codebase better every day.</p><h3>A Shared Codebase Is Like a Shared Campground</h3><p>Camping at a well-maintained campsite is a wonderful experience. A clean and organized campsite means you can set up your tent and enjoy nature immediately without worrying about leftover mess. In contrast, arriving at a disorganized and dirty site can be frustrating — you have to clean up before you can even start to enjoy your surroundings.</p><p>A software codebase functions similarly to a shared campsite. While each engineer can work independently to ship code, the final product is the collective effort of everyone involved — past, present, and future. Software engineering is inherently collaborative, relying on design discussions, code reviews, and shared knowledge to function effectively. This is especially true for any sufficiently large software project.</p><p>When you modify a piece of code, chances are that someone else wrote it before you. Your task then becomes understanding what was built, what the author’s intent was, and why certain implementation choices were made. If the original code was not thoughtfully written, future engineers are left guessing about its purpose, how to modify it without introducing bugs, and whether they might trigger hidden landmines in the process.</p><h3>Strategic Mindset</h3><p>Some of the best engineers I know approach software development with a long-term mindset. When writing code, they use meaningful variable names, write complete docstrings, and ensure clarity in their implementations. When shipping new features, they aim for minimal, well-structured changes to extend functionality. When introducing major components, they consider not just development costs but also long-term maintenance.</p><p>Most importantly, they think about the future state of the codebase — from the perspective of their future selves and teammates. They strive to make the codebase cleaner, even if they don’t refactor everything immediately. They have a keen sense of which parts of the codebase need improvement and take pragmatic steps to address them. They embody the <em>Boy Scout Rule</em>: <em>Always leave the campground cleaner than you found it.</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=twitter&amp;url=https%3A//x.com/unclebobmartin/status/1591443936836747264&amp;image=" width="500" height="281" frameborder="0" scrolling="no"><a href="https://medium.com/media/968e86e76e5b1bf5c65a2a233757d743/href">https://medium.com/media/968e86e76e5b1bf5c65a2a233757d743/href</a></iframe><h3>What Strategic Mindset Looks Like</h3><p>Here’s a non-exhaustive list of actions starting today to make your codebase cleaner everyday, using strategic mindset:</p><ol><li><strong>Proactively Addressing Issues</strong> — Instead of waiting for a bug to escalate into a customer complaint or a system outage, proactive engineers fix problems early. They take responsibility for issues, even if they didn’t create them.</li><li><strong>Thinking Beyond Immediate Tasks</strong> — While a typical engineer might implement a feature as specified, a proactive engineer asks deeper questions: <em>Is this the right approach? How will this scale? What are the potential failure modes?</em></li><li><strong>Maintaining a High-Quality Codebase</strong> — They don’t just ship code that works; they ensure it’s maintainable, well-documented, and efficient. If they encounter a confusing or outdated module, they take the time to improve it.</li><li><strong>Caring About the Developer Experience</strong> — They recognize that engineering is a team effort and work to improve tooling, documentation, and onboarding processes to make life easier for their colleagues.</li></ol><h3>What Tactical Mindset Looks Like</h3><p>On the other hand, engineers who lack a strategic mindset are tactical by nature. They tend to let problems fester, sometimes allowing them to escalate into significant issues. These engineers often adopt a “not my problem” mentality, leaving inefficiencies, technical debt, and small bugs unresolved until they become intractable. This undermines the collective effort of the team, creating friction and slowing down progress.</p><p>Signs of a lack of strategic mindset include:</p><ul><li><strong>Neglecting minor issues</strong> because they fall outside the scope of immediate tasks, rather than addressing them as opportunities for improvement.</li><li><strong>Writing code that meets the minimum requirements</strong> but lacks consideration for future maintainability, scalability, or integration with the broader system</li><li><strong>Avoiding proactive improvements</strong>, such as refactoring, updating documentation, or adopting better design practices, even when they know such changes would benefit the team in the long term.</li><li><strong>Failing to migrate legacy systems</strong> or communicate necessary changes, leaving teammates in the dark or users unprepared for migration or system upgrades.</li></ul><p>A highly skilled engineer with only tactical mindset can still be a liability to the team. They might write impressive code but leave behind technical debt, make short-sighted decisions, or be indifferent to the long-term health of the system.</p><h3>Conclusion</h3><p>Every team should encourage strategic mindset when it comes to software development. Otherwise, the maintenance burden of critical infrastructure often falls on a small group of engineers who deeply understand the system. This increases the <em>bus factor</em> and can lead to burnout and frustration.</p><p>Building a strong engineering culture and strategic mindset means fostering an environment where engineers take pride in their work, think about long-term maintainability, and actively contribute to the overall health of the codebase. A cleaner, more maintainable codebase benefits everyone — not just today, but for years to come. This mindset is not just psychology; it’s about contributing to a healthier, more sustainable engineering culture.</p><p>When engineers take responsibility for the codebase, they create an environment where innovation can thrive, technical debt is minimized, and collaboration is seamless. So next time you touch a piece of code, ask yourself: Am I leaving this better than I found it?</p><h3>Bonus</h3><p>I found the book, <a href="https://web.stanford.edu/~ouster/cgi-bin/book.php">A Philosophy of Software Design</a>, extremely relevant to this topic. If you don’t have time to read the whole book (though I highly recommend it), here’s a great talk summarizing its philosophy.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FbmSAYlu0NcY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DbmSAYlu0NcY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FbmSAYlu0NcY%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5a8478aa8b38f24c9e09971d3ab4783/href">https://medium.com/media/b5a8478aa8b38f24c9e09971d3ab4783/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e158f917c26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Airbnb achieved metric consistency at scale]]></title>
            <link>https://medium.com/airbnb-engineering/how-airbnb-achieved-metric-consistency-at-scale-f23cc53dea70?source=rss-c00b242128fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/f23cc53dea70</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Robert Chang]]></dc:creator>
            <pubDate>Fri, 30 Apr 2021 18:25:08 GMT</pubDate>
            <atom:updated>2026-04-24T22:40:56.139Z</atom:updated>
            <content:encoded><![CDATA[<h4>Part-I: Introducing Minerva — Airbnb’s metric platform.</h4><figure><img alt="Dark-blue world map overlaid with glowing light-blue lines and dots that trace dense networks of connections among major cities — especially across the United States, Europe, and East Asia — suggesting global flight routes or digital traffic paths." src="https://cdn-images-1.medium.com/max/1024/1*rB53PQsJi73IeA-eIeucIg.png" /><figcaption>Data is the voice of our users at scale. In the midst of the COVID-19 pandemic, we saw that travel with Airbnb has become hyper-local.</figcaption></figure><p><strong>By</strong>: <a href="https://www.linkedin.com/in/apahwa/">Amit Pahwa</a>, <a href="https://www.linkedin.com/in/cristianrfr/">Cristian Figueroa</a>, <a href="https://www.linkedin.com/in/donghan-zhang-670990135/">Donghan Zhang</a>, <a href="https://www.linkedin.com/in/haimgrosman/">Haim Grosman</a>, <a href="https://www.linkedin.com/in/john-bodley-a13327133/">John Bodley</a>, <a href="https://www.linkedin.com/in/jonathan-parks-15617820/">Jonathan Parks</a>, <a href="https://www.linkedin.com/in/shengnan-zhu-89403124/">Maggie Zhu</a>, <a href="https://www.linkedin.com/in/philip-weiss-391021b1/">Philip Weiss</a>, <a href="https://www.linkedin.com/in/robert-ih-chang/">Robert Chang</a>, <a href="https://www.linkedin.com/in/shao-xie-0b84b64/">Shao Xie</a>, <a href="https://www.linkedin.com/in/sylviatomiyama/">Sylvia Tomiyama</a>, <a href="https://www.linkedin.com/in/xiaohui-sun-24bb3017/">Xiaohui Sun</a></p><h3>Introduction</h3><p>At Airbnb, we lean on data to inform our critical decisions. We validate product ideas through randomized controlled experiments, and we track our business performance rigorously to ensure that we maximize values for our stakeholders. To achieve these goals, we needed to build a robust data platform that serves the internal users’ end-to-end needs.</p><p>While we have previously shared how we <a href="https://medium.com/airbnb-engineering/scaling-spark-streaming-for-logging-event-ingestion-4a03141d135d">ingest data</a> into our data warehouse and how to enable users to conduct their own <a href="https://medium.com/airbnb-engineering/supercharging-apache-superset-b1a2393278bd">analyses with contextual data</a>, we have not yet discussed the middle layer: how to properly model and transform data into accurate, analysis-ready datasets.</p><p>In this post, we will share our journey in building Minerva, Airbnb’s metric platform that is used across the company as the single source of truth for analytics, reporting, and experimentation. Specifically, we will set the context on why we built it, describe its core features and the ecosystem of tools it has enabled, and highlight the impact it has had on Airbnb. In upcoming posts, we will deep dive into the <a href="https://medium.com/airbnb-engineering/airbnb-metric-computation-with-minerva-part-2-9afe6695b486">technology behind Minerva</a> and share the lessons we learned along the way. By publishing this series, we hope our readers will appreciate the power of a system like Minerva and be inspired to create something similar for their organizations!</p><h3>A brief history of analytics at Airbnb</h3><p>Like many data-driven companies, Airbnb had a humble start at the beginning of its data journey. Circa 2010, there was only one full-time analyst at the company working on data, and his laptop was effectively the company’s data warehouse. Queries were often run directly against the production databases, and expensive queries occasionally caused serious incidents and took down Airbnb.com. In spite of the pitfalls, this simple solution helped Airbnb identify many growth opportunities over the years.</p><p>As Airbnb’s footprint continued to grow in the early 2010s, more data scientists were <a href="https://medium.com/airbnb-engineering/at-airbnb-data-science-belongs-everywhere-917250c6beba">brought on to the company</a> and data kept growing both in terms of size and of variety. It was around then that we went through the first phase of changes, <a href="https://medium.com/airbnb-engineering/data-infrastructure-at-airbnb-8adfb34f169c">upgrading and stabilizing</a> our data infrastructure. We switched from Chronos to our home-grown, now open sourced, Apache <a href="https://medium.com/airbnb-engineering/airflow-a-workflow-management-platform-46318b977fd8">Airflow</a> for workflow orchestration and invested in building a set of highly critical data tables called `core_data`.</p><figure><img alt="Side-by-side ‘then vs. now’ collage. Left column (labeled 2008) shows: • a simple, early Airbnb webpage with basic text links and a small photo of a San Francisco rooftop; • a small office scene where about a dozen people work at shared desks with laptops. Right column (labeled 2017) shows: • a modern Airbnb search results page with property photos and a world map; • a large group photo of dozens of employees posing and smiling outdoors next to a llama, illustrating company growth." src="https://cdn-images-1.medium.com/max/1024/0*AqJoWcwj7duvOrtr" /><figcaption>Airbnb and the data that fuels it has grown substantially over the years.</figcaption></figure><p>With `core data` serving as the foundation, analytics at Airbnb began to blossom. First, we brought the culture of A/B testing to Airbnb by <a href="https://medium.com/airbnb-engineering/experiment-reporting-framework-4e3fcd29e6c0">building</a> and <a href="https://medium.com/airbnb-engineering/https-medium-com-jonathan-parks-scaling-erf-23fd17c91166">scaling</a> Airbnb’s experimentation platform. We built an in-house data catalog, <a href="https://medium.com/airbnb-engineering/democratizing-data-at-airbnb-852d76c51770">Dataportal</a>, to organize and document our data and created, now open sourced, Apache <a href="https://medium.com/airbnb-engineering/caravel-airbnb-s-data-exploration-platform-15a72aa610e5">Superset</a> so more users could analyze data independently and interactively. Last but not least, we focused on data education by launching <a href="https://medium.com/airbnb-engineering/how-airbnb-democratizes-data-science-with-data-university-3eccc71e073a">Data University</a>, a program to teach non-data scientists useful skills in an effort to democratize data analysis at Airbnb.</p><h3>Growing pains</h3><p>While `core_data` brought several step-function changes to Airbnb’s data capabilities, our success did not come without some significant cost. In fact, the proliferation of data and use cases caused serious growing pains, both for data producers and for data consumers.</p><p>First, as `core_data` continued to rise in popularity, more data producers wanted to use it for analytics, forecasting, and experimentation. New tables were created manually on top of `core_data` tables every other day, but there was no way to tell if similar tables already existed. The complexity of our warehouse continued to grow, and data lineage became impossible to track. When a data issue upstream was discovered and fixed, there was no guarantee that the fix would propagate to all downstream jobs. As a result, data scientists and engineers spent countless hours debugging data discrepancies, fighting fires, and often feeling unproductive and defeated.</p><figure><img alt="Flow diagram of analytics stack. 1. Raw data (DB exports, logging, 3rd-party data) feeds into core data tables — multiple fact tables (red) and dimension tables (blue), plus a ‘wide dimension table’ and a ‘fact table with dimensions.’ 2. Those join into even larger, increasingly wide fact tables with many dimensions. 3. The derived tables power downstream BI tools such as ERF, Superset, Tableau, and other analytics dashboards." src="https://cdn-images-1.medium.com/max/1024/0*DGqa6USgQiX21F62" /><figcaption>Proliferation of derived tables built on top of `core_data` caused some serious growing pains.</figcaption></figure><p>For data consumption, we heard complaints from decision makers that different teams reported different numbers for very simple business questions, and there was no easy way to know which number was correct. Years ago, when Brian, our CEO, would ask simple questions like which city had the most bookings in the previous week, Data Science and Finance would sometimes provide diverging answers using slightly different tables, metric definitions, and business logic. Over time, even data scientists started to second guess their own data, confidence in data quality fell, and trust from decision makers degraded.</p><h3>Overcoming our growing pains with Minerva</h3><p>As these pain points worsened, Airbnb embarked on a <a href="https://medium.com/airbnb-engineering/data-quality-at-airbnb-e582465f3ef7">multi-year journey</a> to revamp its data warehouse with the goal of drastically improving data quality at the company. As a first step, our data engineering team rebuilt several key business data models from scratch, which resulted in a set of certified, lean, normalized tables that do not use unnecessary joins. These vetted tables now served as the new foundation for our analytics warehouse.</p><p>Our work hardly stopped there, however. In order to translate these tables into insights, we needed to be able to programmatically join them together to create analysis-friendly datasets. We needed to be able to backfill data whenever business logic changed. Finally, we needed data to be presented consistently and correctly in different consumption tools.</p><p>This is when Minerva — Airbnb’s metric platform — came onto the scene. Minerva takes fact and dimension tables as inputs, performs data denormalization, and serves the aggregated data to downstream applications. The Minerva API bridges the gap between upstream data and downstream consumption, enabling Data Engineering teams the flexibility to modify core tables while maintaining support for various downstream consumers. This API serves a vital role in Airbnb’s next-generation data warehouse architecture.</p><figure><img alt="Flowchart of Airbnb’s data pipeline. Four stages (left to right): 1. Raw Data sources — ‘DB Exports,’ ‘Logging,’ ‘3rd Party Data.’ 2. Normalized Upstream Tables — multiple small tables plus ‘Bot Detection’ and ‘Device Mapping’ processes. 3. Programmatic Denormalization — a central block labeled ‘Minerva’ that aggregates everything. 4. Downstream Consumption — data sent to ‘Superset,’ ‘Metric Explorer,’ ‘ERF,’ and ‘Tableau.’ Arrows show data moving sequentially through each stage." src="https://cdn-images-1.medium.com/max/1024/0*SCOkdySJO68BS8OJ" /><figcaption>Minerva, Airbnb’s metric platform, plays a central role in Airbnb’s new data warehouse architecture.</figcaption></figure><p>To date, we have more than 12,000 metrics and 4,000 dimensions in Minerva, with more than 200 data producers spanning across different functions (e.g., Data, Product Management, Finance, Engineering) and teams (e.g., Core Product, Trust, Payments). Most teams now regard Minerva as their preferred framework for analytics, reporting, and experimentation at Airbnb.</p><figure><img alt="Screenshot of a ‘Highlighted Metrics’ dashboard displaying three KPI cards, each with a mini-timeseries chart (solid line = this year; dashed = two years ago) and summary stats: 1. Minerva SLA Rate — runtime SLA hovers near 1.0, last 7 days value 0.9984. 2. Minerva Metrics — count of metrics stays just above 10 k; last 7 days value 12.7 k (4.7× higher than two years ago). 3. Minerva Dimensions — count remains near 4 k; last 7 days value 4.89 k (4.0× higher than two years ago)." src="https://cdn-images-1.medium.com/max/1024/0*3KyF0UdLxSok8FyF" /><figcaption>Adoption of Minerva at Airbnb has grown tremendously in the past two years.</figcaption></figure><h3>Data production in Minerva</h3><p>From an infrastructure perspective, Minerva is built on top of open-source projects. It uses Airflow for workflow orchestration, Apache Hive and Apache Spark as the compute engine, and Presto and Apache Druid for consumption. From metric creation through computation, serving, consumption, and eventually deprecation, Minerva covers the full life cycle of a metric.</p><figure><img alt="Architecture diagram: Raw data (DB exports, logs, 3rd-party feeds) flows into the Minerva Metrics Platform, which handles definition, testing, orchestration, runtime, retention, management, backfill, and serving layers, then exposes data to downstream tools — dashboards, ERF, Superset/Tableau, anomaly detection, metadata service, data pipelines, and executive reporting." src="https://cdn-images-1.medium.com/max/1024/0*MStjNvO4kb-XNNur" /><figcaption>Minerva manages the entire lifecycle of metrics at Airbnb.</figcaption></figure><ul><li><strong>Metrics definition</strong>: Minerva defines key business metrics, dimensions, and other metadata in a centralized Github repository that can be viewed and updated by anyone at the company.</li><li><strong>Validated workflow</strong>: The Minerva development flow enforces best data engineering practices such as code review, static validation, and test runs.</li><li><strong>DAG orchestration: </strong>Minerva performs data denormalization efficiently by maximizing data reuse and intermediate joined results.</li><li><strong>Computation runtime: </strong>Minerva has a sophisticated computation flow that can<strong> </strong>automatically self-heal after job failures and has built-in checks to ensure data quality.</li><li><strong>Metrics / metadata serving: </strong>Minerva provides a unified data API to serve both aggregated and raw metrics on demand.</li><li><strong>Flexible backfills: </strong>Minerva<strong> </strong>version controls data definitions, so major changes to the datasets are automatically tracked and backfilled.</li><li><strong>Data management</strong>: Minerva has built-in capabilities such as cost attribution, GDPR selective deletion, data access control, and an auto-deprecation policy.</li><li><strong>Data retention:</strong> Minerva establishes usage-based retention and garbage collection, so expensive but infrequently utilized datasets are removed.</li></ul><p>The above mentioned features allow us to standardize metric creation, data computation, and data delivering. In the next post, we will deep dive into these features and explain them in more detail!</p><h3>Data consumption in Minerva</h3><p>Minerva’s product vision is to allow users to “define metrics once, use them everywhere”. That is, a metric created in Minerva should be easily accessed in company dashboarding tools like <a href="https://medium.com/airbnb-engineering/supercharging-apache-superset-b1a2393278b">Superset</a>, tracked in our A/B testing framework <a href="https://medium.com/airbnb-engineering/experiment-reporting-framework-4e3fcd29e6c0">ERF</a>, or processed by our anomaly detection algorithms to spot business anomalies, just to name a few. Over the last few years, we have partnered closely with other teams to create an ecosystem of tools built on top of Minerva.</p><figure><img alt="Layered diagram of the Minerva data stack. • Top (yellow) — Data Configuration: ‘Minerva Configs’ defined once. • Middle (green) — Standardized Computation: configs flow into ‘Minerva Pipelines,’ then into the ‘Minerva Data API (Inquiry).’ • Bottom (blue) — Data Consumption: the API feeds multiple use-cases — Data Catalog (Dataportal), Data Exploration (Metric Explorer &amp; Superset), A/B Testing (ERF), Data Analysis (R/Python), and Executive Reporting (XRF)." src="https://cdn-images-1.medium.com/max/1024/0*3JIcR8l97r90lqf5" /><figcaption>Minerva’s vision is “define once, use everywhere”.</figcaption></figure><h4>Data catalog</h4><p>First, we partnered closely with the Analytics Product team to index all Minerva metrics and dimensions in the <a href="https://medium.com/airbnb-engineering/democratizing-data-at-airbnb-852d76c51770">Dataportal</a>, Airbnb’s data catalog. When a user interfaces with the Dataportal and searches for a metric, it ranks Minerva metrics at the top of the search results. The Dataportal also surfaces contextual information, such as certification status, ownership, and popularity so that users can gauge the relative importance of metrics. For most non-technical users, the Dataportal is their first entry point to metrics in Minerva.</p><figure><img alt="Screenshot of Airbnb’s internal ‘Dataportal’ search bar with the word ‘bookings’ typed. An autocomplete dropdown lists Minerva metrics: ‘bookings’ (highlighted), ‘bookings_china_bu’, ‘booking_requests_to_bookings’, ‘bookings_homes_bu’, and ‘bookings_china_listing’. Below, additional options let users ‘Search in metrics…’ or ‘Search in all Airbnb data…’. In the results list under the dropdown, a metric titled ‘nights_booked’ appears with its description and engagement icons (likes and views)." src="https://cdn-images-1.medium.com/max/1024/0*o7XX523HFOUjyNrn" /><figcaption>Minerva metrics are indexed and catalogued in the Dataportal UI.</figcaption></figure><h4>Data exploration</h4><p>Upon selecting a metric, users are redirected to Metric Explorer, a component of the Dataportal that enables out-of-the-box data exploration. On a metric page, users can see trends of a metric with additional slicing and drill down options such as `Group By` and `Filter`. Those who wish to dig deeper can click into the Superset view to perform more advanced analytics. Throughout this experience, Metric Explorer surfaces metadata such as metric owners, historical landing time, and metric description to enrich the data context. This design balances the needs of both technical and non-technical users so they can <a href="https://medium.com/airbnb-engineering/supercharging-apache-superset-b1a2393278bd">uncover data insights in-place seamlessly</a>.</p><figure><img alt="Composite screenshot: On the left, an Airbnb Dataportal page displays a time-series chart of a metric with options to filter, group, and view last-90-day trends. An orange arrow points from a ‘Superset’ button on this page to the right side, which shows the Superset interface where the same metric (‘bookings’) is selected, grouped by dimensions, and visualized as a line chart for deeper analysis." src="https://cdn-images-1.medium.com/max/1024/0*rxkHxALysVnkzxxz" /><figcaption>Users can investigate trends and anomalies in Metric Explorer and Superset seamlessly.</figcaption></figure><h4>A/B testing</h4><p>Historically, Airbnb’s Experimentation Reporting Framework (ERF) had its own experiment metrics repository called “metrics repo”. Experimenters could add any business metric to an experiment and compare the results of the control and treatment group. Unfortunately, the metrics repo couldn’t be used for other use cases beyond experimentation, so we decided to integrate Minerva with ERF so all base events for A/B tests are defined and sourced from Minerva. Using the same source across experimentation and analytics means data scientists can be confident in their understanding of <a href="https://medium.com/airbnb-engineering/designing-experimentation-guardrails-ed6a976ec669">how certain experiments could affect the top line business metrics</a>.</p><h4>Executive reporting</h4><p>Long since Airbnb became a public company, we have adopted a practice of reviewing Airbnb’s business performance on weekly, monthly, and quarterly cadences. In these meetings, leaders across different functions meet and discuss the current state of the business. This type of meeting requires executive reports that are high-level and succinct. Data are often aggregated, trends are analyzed and plotted, and metrics movements are presented as running aggregations (e.g., year to date) and time ratio comparison (e.g., year over year).</p><figure><img alt="Screenshot of two dark-themed code editor windows: left shows `covid_global.yaml`, defining a ‘covid_global’ Minerva page and its metric collections; right shows `covid_weekly.yaml`, an export job that references `page: covid_global` and sets parameters like start date, frequency, and aggregations." src="https://cdn-images-1.medium.com/max/1024/0*RWmZcLerJV5JoRtP" /><figcaption>Here is an example of the reporting configuration for COVID-19 dashboard, built on top of Minerva.</figcaption></figure><p>To enable this type of reporting, we built an eXecutive Reporting Framework (XRF). XRF takes a list of user-specified Minerva metrics and dimensions and turns them into aggregated metric time series that are report-friendly. This framework automates a lot of the manual work and allows us to standardize high-fidelity, business-critical reports by leveraging the same Minerva metrics and dimensions used for analysis and experimentation.</p><h4>Data analysis</h4><p>Last but not least, Minerva data is exposed to Airbnb’s custom R and Python clients through Minerva’s API. This allows data scientists to query Minerva data in a notebook environment with ease. Importantly, the data that’s being surfaced in the notebook environment is computed and surfaced exactly the same way as they were in the aforementioned tools, such as Superset and Metric Explorer. This saves enormous amounts of time for data scientists as they can pick and choose the right tool for the job depending on the complexity of the analysis. Notably, this data API encourages lightweight prototyping of internal tooling, which can later be productionalized and shared across the company. For example, data scientists have built a time series analysis tool and an email reporting framework using this API over the last two years.</p><figure><img alt="Screenshot of a Python snippet querying Airbnb’s Minerva: imports pandas and `inquiry_groupby`, then creates a DataFrame for the `bookings` metric grouped by `dim_is_instant_booked` and `dim_trip_nights`, limited to July 1–Oct 9 2019 with a global filter `dim_origin_china=”False”`. The head of the DataFrame is printed, showing columns for instant-book flag, trip nights, timestamp, and bookings." src="https://cdn-images-1.medium.com/max/972/0*AvWgz6qImCriZUBn" /><figcaption>A data scientist can use our Python client to retrieve aggregated data in Minerva and conduct analyses.</figcaption></figure><h3>How we responded to the COVID-19 crisis with Minerva data</h3><p>As Minerva became a centerpiece of analytics at Airbnb, we saw again and again the power and productivity gain it has brought to the data community at Airbnb. In this last section, we want to give a concrete example of how Minerva aided the business during the COVID-19 crisis.</p><p>In March 2020, global travel came to a halt due to COVID-19. Almost overnight, Airbnb bookings plummeted and cancellations skyrocketed. This was a scary moment for us, and it raised many important business questions: How was the coronavirus affecting our nights backlog? How was it affecting our occupancy rate? What was the financial impact of rising cancellations? How had the coronavirus altered travel demand in terms of travel distance? We needed to answer all these questions quickly and correctly.</p><figure><img alt="Split view: a planning Google Sheet listing COVID-19 dashboard questions, charts, and Minerva data sources; below it, three line charts track ‘Nights Booked’ by travel-distance bands (total, year-over-year change, and share), all showing a sharp dip in early April and a stronger rebound for short-distance trips." src="https://cdn-images-1.medium.com/max/1024/0*M0Dzpgwz7633v1SB" /><figcaption>We were able to dramatically shorten the time from data curation to insight discovery and assess the impact of COVID-19 on Airbnb’s business because of Minerva!</figcaption></figure><p>In response to this influx of inquiries, our data science team gathered the questions and started to brainstorm how we could leverage data to answer them. Crucially, since many important business metrics and dimensions for supply, demand, finance, and customer support were already defined in Minerva, our Central Analytics team was able to wireframe an executive dashboard and roll out the initial version in just under a few days. The COVID-19 dashboard quickly became the single authoritative source of truth and was reviewed closely by our executive team in the midst of the crisis. Since then, it has amassed more than 11,000 views and 1,500 distinct viewers. Not surprisingly, the COVID-19 dashboard was the most viewed Superset dashboard at Airbnb in 2020.</p><p>Insights generated from Minerva metrics also allowed the company to confidently pinpoint the rapidly changing landscape. For example, we uncovered market opportunities such as demand shift to local travel and longer-term stays. These findings led us to redesign several important touch points of our product pages to meet the shift in user preference. In moments of crisis, the ability to answer questions and uncover insights is more important than ever. We are able to do this efficiently and effectively, thanks to the single source of truth data in Minerva!</p><h3>Closing</h3><p>In this post, we briefly summarized the history of Airbnb’s analytics journey, the growing pains we faced in the last few years, and why we built Minerva, Airbnb’s metric infrastructure. In particular, we covered how data is produced and consumed via Minerva. Toward the end of the post, we also highlighted a recent example of how Minerva helped Airbnb to react to the COVID-19 crisis.</p><p>In the <a href="https://medium.com/airbnb-engineering/airbnb-metric-computation-with-minerva-part-2-9afe6695b486">next post</a>, we will deep dive into Minerva’s technical architecture, including the design principles, the user development flow, as well as the data computation graph. In the last post of the series, we will introduce Minerva API, which is our single layer of data abstraction that made all the integrations outlined above possible. We will close the series by sharing the lessons that we’ve learned from building Minerva in the hope that these lessons will be helpful for others building similar systems.</p><p>Until then, stay tuned for our next post!</p><h3>Acknowledgments</h3><p>Minerva is made possible only because of the care and dedication from those who worked on it. We would also like to thank <a href="https://www.linkedin.com/in/lchircus/">Lauren Chircus</a>, <a href="https://www.linkedin.com/in/aaronkeys/">Aaron Keys</a>, <a href="https://www.linkedin.com/in/michaelcl/">Mike Lin</a>, <a href="https://www.linkedin.com/in/adriankuhn/">Adrian Kuhn</a>, <a href="https://www.linkedin.com/in/krishna-bhupatiraju-1ba1a524/">Krishna Bhupatiraju</a>, <a href="https://www.linkedin.com/in/michelleethomas/">Michelle Thomas</a>, <a href="https://www.linkedin.com/in/erikrit/">Erik Ritter</a>, <a href="https://www.linkedin.com/in/serena-jiang/">Serena Jiang</a>, <a href="https://www.linkedin.com/in/krist-wongsuphasawat-279b1617/">Krist Wongsuphasawat</a>, <a href="https://www.linkedin.com/in/chris-williams-1bb8b936/">Chris Williams</a>, <a href="https://www.linkedin.com/in/kenchendesign/">Ken Chen</a>, <a href="https://www.linkedin.com/in/yguang11/">Guang Yang</a>, <a href="https://www.linkedin.com/in/jinyang-li-607690143/">Jinyang Li</a>, <a href="https://www.linkedin.com/in/clark-wright-67955537/">Clark Wright</a>, <a href="https://www.linkedin.com/in/vquoss/">Vaughn Quoss</a>, <a href="https://www.linkedin.com/in/zi-jerry-chu/">Jerry Chu</a>, <a href="https://www.linkedin.com/in/palanieppan-muthiah-b7088924/">Pala Muthiah</a>, <a href="https://www.linkedin.com/in/ruiqinyang/">Kevin Yang</a>, <a href="https://www.linkedin.com/in/ellen-huynh/">Ellen Huynh</a>, and many more who partnered with us to make Minerva more accessible across the company. Finally, thank you <a href="https://www.linkedin.com/in/bulam/">Bill Ulammandakh</a> for creating the beautiful visualization so we can use it as our header image!</p><p><em>Apache®, Apache Airflow, Apache Superset, Apache Hive, Apache Spark and Apache druid are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries.</em></p><p><em>Presto is the registered trademark of LF Projects, LLC.</em></p><p><em>GITHUB® is the exclusive trademark registered in the United States by GitHub, Inc.</em></p><p><em>All product names, logos, and brands are property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f23cc53dea70" width="1" height="1" alt=""><hr><p><a href="https://medium.com/airbnb-engineering/how-airbnb-achieved-metric-consistency-at-scale-f23cc53dea70">How Airbnb achieved metric consistency at scale</a> was originally published in <a href="https://medium.com/airbnb-engineering">The Airbnb Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Build Learning Projects — Part II]]></title>
            <link>https://medium.com/@rchang/how-i-build-learning-projects-part-ii-3c5ab4b3dd98?source=rss-c00b242128fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c5ab4b3dd98</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Robert Chang]]></dc:creator>
            <pubDate>Sun, 29 Mar 2020 01:01:00 GMT</pubDate>
            <atom:updated>2020-03-29T01:01:00.935Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I Build Learning Projects — Part II</h3><h4>Habits Are Too Light To Be Felt Until They Are Too Heavy to Be Broken</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*swL0WOzlj0ycZaC80BSXFg.png" /><figcaption><a href="https://unsplash.com/photos/Oaqk7qqNh_c">Image Credit</a>: Are you ready to build your learning habits?</figcaption></figure><h3>Recap</h3><p>In my <a href="https://medium.com/@rchang/how-i-build-learning-projects-part-i-54dbaad68961">earlier post</a>, I shared my approach to building self-directed learning projects. I emphasized, before jumping into any project, you should pick carefully and strategically what skills to invest in. In particular, prioritizing skills that are foundational, transferrable, and adjacent to your core competency are some of my criteria for acquiring new professional skills.</p><p>I also highlighted the importance of planning — from defining the objectives and key results, decomposing a project into concrete milestones, to surveying and sampling learning materials, these planning exercises can significantly reduce logistical complexity and enable you to deeply focus on learning itself.</p><p>In this second post, I will pick up where we left off and describe how you can develop habits and rituals to reliably execute against your plan. Furthermore, We will cover techniques that will further solidify your learnings such as doing drills for procedural learning, building mental models for conceptual learning, and using free recall and spaced repetition to remember facts. By the end of this post, I hope you will be inspired to develop your learning system as <a href="https://superorganizers.substack.com/">many others</a> have.</p><h3>From Strategy to Execution: Habits and Rituals</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FGrPgB48KfgP3UJk3vibOw.png" /><figcaption><a href="https://unsplash.com/photos/BfphcCvhl6E">Image Credit</a>: Many high performers (such as in sports) have designed habits and routines to support their high performance</figcaption></figure><p>While most people agreed with “strategy without execution is useless”, many still fall short when it comes to learning project execution. For example, the chart below shows the view progression for some of the most popular online courses on YouTube. In the aggregate, people tend to drop off quickly just a few lectures into the courses, and many people fail to take their studies to the finish line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lbHNIKvUhmBt7lvmt_EYmg.png" /><figcaption><a href="https://gist.github.com/robert8138/aa0e08bd56b6597f278d2622397a2505">Code</a>: View trends of free, popular MOOC on Youtube — people rarely pass through the 3rd lecture!</figcaption></figure><p>The key to fighting against the odds, in my opinion, lies in the book “<a href="https://jamesclear.com/books">Atomic Habit</a>”. The author James Clear argues that all great performers, be them athletes, musicians, and any professionals, have rituals and routines designed to support their high performance. I believe, to get the most out of your projects, you too should design <strong>learning habits </strong>to support your deliberate practice. These learning habits are the key to finishing a good project.</p><h4>The Habit Loop</h4><p>Drawing from a wide variety of research and interviews, Clear develops a framework that describes <a href="https://jamesclear.com/three-steps-habit-change">the mechanics of habit formation</a>. In his words:</p><blockquote>The cue triggers a craving, which motivates a response, which provides a reward, which satisfies the craving and, ultimately, becomes associated with the cue. Together, these four steps form a neurological feedback loop — <strong>cue, craving, response, reward</strong>;<strong> cue, craving, response, reward</strong> — that ultimately allows you to create automatic habits.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*SBtbix-E4x4CXRNSiaj4dg.png" /><figcaption><a href="https://jamesclear.com/three-steps-habit-change">Image credit</a>: The cue-craving-response-reward habit loop</figcaption></figure><p>If you analyze some of your habits that are seemingly automatic, they all follow the same habit loop described above. For example, early in the morning, the act of waking up is a <em>cue</em> for you to go to the bathroom, and your mere presence in the bathroom triggers a <em>craving</em> to freshen up. You then react to this craving by brushing your teeth or taking a shower. Once you complete these <em>responses</em>, you feel refreshed and <em>rewarded</em>. In the background, this process completes a habit loop and repeats itself the next morning.</p><p>Many high performers understood that this very cycle can be leveraged to design rituals and routines to support their professional pursuits. Michael Phelps trained for 5–6 hours a day in the water, and the consistency made him one of the greatest swimmers in the world. The late Kobe Bryant woke up at 4:30 a.m. every day just so he could get a few extra hours of practice, and this dedication made him one of the most legendary basketball players in NBA history. The pursuit of excellence is never just achieved through will powers, it is also supported by well-designed habits and routines.</p><h4>The Four Laws of Good Habit Formation</h4><p>Certainly, putting habits in place is easier said than done, so what can we do to foster these habits? Clear explains, once you understand how habits work, you can follow a simple set of rules to create good habits and even break bad ones. He called these the<strong> Four Laws of Good Habit Formation:</strong></p><ul><li><strong>Make it obvious: </strong>If you want to reliably kickstart a habit loop, make the <em>cues </em>that remind you about the habit extremely obvious</li><li><strong>Make it attractive: </strong>If the triggered cue is associated with a strong <em>craving</em>, you are more likely to follow through with the habit</li><li><strong>Make it easy: </strong>For you to execute on the habit itself, the action or response needed to fulfill the craving must be very easy to perform</li><li><strong>Make it satisfying: </strong>Finally, to complete the loop, the reward you get from completing the action must be satisfying to satisfy the craving</li></ul><p>By understanding these principles, you can now design tactics to make a good habit stick. If you often forget to do a learning project, find cues to remind you of this priority. If you often don’t have enough motivation to return to a project, find ways to make it more desirable. If your projects are too hard to execute on, simplify and make it easy to do. Finally, if your projects don’t give you enough satisfaction, find alternative ways to make it rewarding.</p><h3>Engineer Habits &amp; Routines For Learning Projects</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IFo-KtorcGN3uO0NIoTXFQ.png" /><figcaption><a href="https://unsplash.com/photos/Wiu3w-99tNg">Image credit</a>: How will you engineer your habits and routines to support your learnings every day?</figcaption></figure><p>Ever since I learned about the <strong>Four Laws of Good Habit Formation</strong>, I have become more intentional about how I execute my projects. While my previous learnings succeeded because I pushed myself hard, my more recent projects succeeded because of the routines that I designed. To make it concrete, I will use a Machine Learning project that I completed in 2018 as a case study.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zRhATTkIaLV4DdHdG4tCjA.png" /><figcaption>My <a href="https://github.com/robert8138/deep-learning-deliberate-practice">Project Plan Document</a> — similar to a Product Requirement Document (PRD) in Product Development</figcaption></figure><p>First, I would encourage you to read my <a href="https://github.com/robert8138/deep-learning-deliberate-practice">Project Plan Document</a> to understand the motivation of this project. Next, you can read through my detailed time log to see my learning <a href="https://github.com/robert8138/deep-learning-deliberate-practice/blob/master/TIMELINE.md">progression</a> by the week. With those contexts in mind, I will go beyond what I have written down on Github and highlight the habits and routines that I practiced throughout the project.</p><h4>Make It Obvious: Use Implementation Intention As My Cue</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9mEja8Y6JnD9ICdG5qGWRQ.png" /><figcaption><a href="https://unsplash.com/photos/XVoyX7l9ocY">Image Credit</a>: I jumpstart my learning projects the moment I hop on a train for 50 minutes</figcaption></figure><p>Like many other brave souls in Silicon Valley, I spend a few hours a day in commuting. Recognizing that my time is valuable, I was determined to not waste it. Each morning, as I stepped onto the waiting platform, I would tell myself that today is a new day, and I will re-engage with my learning projects for 50 minutes until I arrive at San Francisco. The act of pre-committing to a specific action at a specific time and a specific place is a goal-setting technique called <a href="https://jamesclear.com/implementation-intentions"><strong>Implementation Intention</strong></a>.</p><p>This technique has been used widely in many situations and has been proven to be extremely effective. The reason that it works is that it removes the decision making ahead of time and lowers the activation energy to kickstart a routine. When you pair this technique with an environment where you regularly interact, you effectively design a recurring cue that serves as a powerful reminder to prioritize what is important to you in that environment.</p><p>Note, interruptions and disruptions do occur in life: e.g. the train could be late, you could feel sick every once a while, or you might not be able to find a seat on the train because it’s too crowded. These things do happen, and that’s ok. As long as you treat your implementation intention seriously, you can adapt and still follow through your commitments.</p><h4><strong>Make It Attractive: Increase Craving Through Temptation Bundling</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KrLcvyQQogcHgsnRBi6GLA.png" /><figcaption><a href="https://unsplash.com/photos/6SOc_IqY9mk">Image Credit</a>: Is your learning project attractive enough to get you taking action?</figcaption></figure><p>Suppose the train is on time, and I found a good seat, it can still feel like a struggle to dive right back into the learning materials. In these situations, a technique called <a href="https://jamesclear.com/temptation-bundling"><strong>Temptation Bundling</strong></a> can be very handy. At its core, the idea is to link behavior that you <em>need</em> to do with a behavior that you <em>want</em> to do. By bundling the hard thing with the pleasurable thing together, the hard thing becomes more attractive.</p><p>As a concrete example, grokking intellectually challenging concepts in Deep Learning isn’t always the easiest. On the other hand, I always really enjoy writing a neat learning summary whenever I finish a new concept, as I find that process soothing. By bundling these two activities, I convinced myself that if I could engage with the materials and learn a new concept (what I <em>need to do</em>), I will be able to produce a well-written summary by the end of the session (what I <em>want to do</em>). Furthermore, the fact that these two activities are sequentially related, means that bundling can be particularly effective.</p><p>Not every person struggling with Deep Learning is obsessed with well-written <a href="https://github.com/robert8138/deep-learning-deliberate-practice/tree/master/concepts">documentation</a>. The general lesson here, however, is to identify what things you <em>need</em> to do, what things you <em>want</em> to do and think of ways of linking some of them together. By going through this design exercise, you can drastically improve your motivation to carry your routines forward.</p><h4><strong>Make It Easy: Remove Logistical Complexity Ahead of Time</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ca-ZuhLYH3YutaC-liYH9A.png" /><figcaption><a href="https://unsplash.com/photos/dCAKIpxs3eE">Image Credit</a>: If the task you need to perform is too hard to do, you won’t do it</figcaption></figure><p>Even when I am already engaging with my learnings during my commute, there could still be challenges. As an example, if I am working through a MOOC, I generally do not like to consume video lectures on my tiny phone screen. In addition, the internet connection can be unstable and the streaming experience can be sporadic, the whole experience can feel inconvenient. These logistical complexities can easily creep up on me and kill productivity. As a result, I decided to simplify and remove these complexities ahead of time.</p><p>For example, to overcome the inconvenience, I always pre-<a href="https://en.savefrom.net/1-youtube-video-downloader-1/">download</a> the video lectures to my laptop before my commute. Once I am on the train, I could then play the lectures in 2X the speed, or even play back and forth without any internet interruptions. Furthermore, the logistics of deciding what materials to download on a given day is also solved, because I can go back to my learning schedule and my time log to identify which lessons to pursue next. The preparation process is lightweight and seamless.</p><p>Depending on the task at hand, there could be many ways to make it easier. Tactics such as <a href="https://jamesclear.com/small-habits">starting small</a>, reducing scope, and leveraging <a href="https://jamesclear.com/akrasia">commitment devices</a> are all worth trying when designing your routines.</p><h4><strong>Make It Satisfying: Using Github to Keep Track of My Progress</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RynYCpN1X7r0j-tby8RY4g.png" /><figcaption>I used Github’s commit heat map to visually see my progress</figcaption></figure><p>Finally, to celebrate the progress that I made, I used a combination of visual cues and public artifacts to reward myself. For example, I use Github’s commit heat map to visually track my progress. As much as I know the number of commits is a vanity metric, being able to visualize them at a glance is still very powerful. <a href="https://jamesclear.com/stop-procrastinating-seinfeld-strategy">Jerry Seinfeld</a>, the legendary comedian, uses this very same technique to motivate himself to write jokes every day:</p><blockquote>“After a few days, you’ll have a chain. Just keep at it and the chain will grow longer every day. You’ll like seeing that chain, especially when you get a few weeks under your belt. Your only job is to not break the chain.”</blockquote><p>While never breaking the chain is very difficult, Clear proposed a slightly more lenient version called <a href="https://www.youtube.com/watch?v=dMwnQO8MUjw"><strong>Never Miss Twice</strong></a>, which I find both practical and empathetic.<strong> </strong>The idea is the following — it is acceptable to break the chain every once a while, but when you do, never miss your routine twice in a row. It is not just about adhering to a routine, but it is also about how fast and how consistent you can get back on track. Grit is the key to success.</p><p>Designing good learning habits takes time and thoughtful thinking. But once you have the right designs in place, they are not as hard to follow as you originally imagined. By following the strategies derived from the <strong>Four Laws of Good Habit Formation</strong>, you can greatly increase the odds of completing your work to drive high performance.</p><h3>Transform Learnings Into Tools In Your Toolkit</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zgsn95NzmKcr_EYAn5DXHQ.png" /><figcaption><a href="https://unsplash.com/photos/IClZBVw5W5A">Image Credit</a>: Are you adding new tools to your toolkit from your learning projects?</figcaption></figure><p>Without continuous training and consistent practice, over time, even the greatest athletes and musicians would experience skill deterioration. This is even more true among knowledge workers, many of whom “practice” and “training” are less tangible and more abstract.</p><p>For example, even for some of my well-executed projects, without further practice, I tend to forget about 30% to 50% of what I initially learned in the following six months. Without more investments, knowledge and skills that are fresh to our memory can go away rather quickly. The good news is, depending on whether you are trying to learn <em>procedures</em>, <em>concepts</em>, or <em>facts</em>, we can adopt different strategies to extend the half-life of our learnings.</p><h4>Procedures: Find Opportunity To Do “Practice Drills” On the Job</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-wDwkaoZS0qV9K1tTxz8HQ.png" /><figcaption><a href="https://unsplash.com/photos/uvMSarsRHzo">Image Credit</a>: What are some of the ways you can do practice drills on the job?</figcaption></figure><p>One strategy to effectively sharpen your skills is to <em>directly</em> <em>practice</em> and <em>apply</em> that skill on the job. Not only will you be able to correlate your current level of expertise with the quality of your output, but this strategy will also create urgency and accountability that vehemently forces you to do your work better.</p><p>In the early days of my self-directed learning journey, I largely saw these projects as standalone intellectual exercises — whether I applied the skills or not is not that consequential. Nowadays, I see self-directed learning as an investment in my career, and there is no better feedback than to see how well I can deploy these skills to facilitate my work. As an example, after my push to deliberately <a href="https://github.com/robert8138/python-deliberate-practice">improve my Python skills</a>, I forced myself to conduct analyses at work in Python to see how efficient I could be. Similarly, I took on projects where reading and writing Python code is essential to completing the work. I also proactively studied how Object-oriented Python is used to design some of Airbnb’s Data Engineering frameworks. Every activity deepened my muscle memory and made me more familiar with the core skills involved.</p><p>The road to mastery is a long one, and it is only through many practices will we get closer. Given that we spend a disproportionate amount of time at work, identifying work projects that will take your skill to the next level <em>on the job</em> is a high leverage exercise. At times, this might give you a feeling of defeat or a temporary loss in productivity, but by enduring the discomfort and working through the feedback, you will get better at these procedural learnings.</p><h4>Concepts: Build Mental Models And Teach Others</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AMmDlyZSSMYs7KoY_JxWvg.png" /><figcaption><a href="https://unsplash.com/photos/7e2pe9wjL9M">Image Credit</a>: Have you ever experienced a eureka moment where you started to “get it”?</figcaption></figure><p>Have you ever experienced a eureka moment where, all of a sudden, many ideas and concepts you previously struggled with now started to make sense? I certainly have, and I suppose these “aha moments” are not uncommon among avid learners. When these moments arrive, it is critically important to slow down and capture those thoughts. Here is a process that I recommend:</p><ul><li><strong>Write those insights down: </strong>As it has been said, <a href="https://medium.learningbyshipping.com/writing-is-thinking-an-annotated-twitter-thread-2a75fe07fade?gi=bc12710a469">writing is thinking</a>. By writing things down, it helps you to develop a logical narrative of your understanding, and it helps you to confront fuzzy ideas and half-baked thoughts. Writing is one of the most powerful ways to drive clarity.</li><li><strong>Validate your mental models with experts: </strong>With your mental models written down, share them with subject-matter experts who, in terms, have their mental model of the same subject. By learning and comparing different mental models, you can gut check if you are on the right track.</li><li><strong>Voraciously teach others what you learned: </strong>After confirming your intuition, find opportunities to teach and share your mental models. By articulating and sharing your perspectives, the power of teaching and explaining will help you to refine what you have learned.</li></ul><p>The process above is a powerful way to translate amorphous understanding into concrete mental models. As an example, when things started to click for me for Data Engineering, I wrote down my thoughts and shared them with other experts in the company to get feedback. I summarized them in a series of <a href="https://medium.com/@rchang/a-beginners-guide-to-data-engineering-part-i-4227c5c457d7">blog posts</a> and I found every possible opportunity to teach new hires about this topic. By applying my mental model in various situations, these exercises helped me to draw an increasingly clear mental picture in my mind.</p><h4>Facts: Use Free Recall, Spaced Repetition, and Interleaving</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*51jxxlH9qpmeWQcE6-btRA.png" /><figcaption><a href="https://unsplash.com/photos/hgFY1mZY-Y0">Image Credit</a>: Have you ever used free recall to remember facts you have learned?</figcaption></figure><p>Despite living in a world where facts are just a few keystrokes away, active memory recall can still be very useful in many situations. For example, being able to retrieve known facts from your brain can help you triangulate and validate new information on the spot. In a debate, being able to cite relevant facts can make your argument more compelling. Being able to remember facts well is quite underrated in this information age. When it comes to fact-based learning, I have found the following techniques quite useful:</p><ul><li><strong>Free Recall: </strong>After consuming some new materials, immediately force yourself to summarize the main points from memory without looking at it</li><li><strong>Spaced Repetition</strong>: Spread out your exercises over time, repeat them often and do not force the materials onto yourself in a short cramming session</li><li><a href="https://www.scientificamerican.com/article/the-interleaving-effect-mixing-it-up-boosts-learning/"><strong>Interleaving</strong></a><strong>: </strong>Mix several topics together and use free recall and spaced repetition together. Instead of reviewing topic A &amp; B in a sequence “AAAAAA” and “BBBBBB”, interleave them with “AAA-BBB-AAA-BBB”</li></ul><p>For example, when trying to digest facts and ideas from a book, I often found free recall a more effective technique than sentence highlighting. By closing the book and forcing myself to reiterate the main points, I often realized how incoherent I was or how little I could explain these points the first time around. However, by repeating this retrieval process several times, and connecting them with other related materials (of which I also practice free recall), these spaced-out, interleaved exercises helped me to internalize facts much more effectively.</p><h3>Closing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MSYrQzglSdhN7wsXVq4TKA.png" /><figcaption><a href="https://visme.co/blog/amazing-leaders-who-once-had-crippling-stage-fright-and-how-they-overcame-it/">Image credit</a>: Warren Buffett, a creature of habits</figcaption></figure><p><a href="https://www.youtube.com/watch?v=RYHPlLsdW0A">Warren Buffett</a>, also known as the “Oracle of Omaha”, is one of the world’s most renowned investors and philanthropists. In addition to those two public roles, he always considered himself a teacher. Notably, he always advises young people to seek role models whose qualities and traits they admire and encourage them to make those qualities as their own.</p><p>To me, in addition to Buffett’s <a href="https://www.youtube.com/watch?v=ldPh0_zEykU#t=12m15s">whimsical humor</a> and <a href="https://www.youtube.com/watch?v=O0R_9L_D2Yk">strong integrity</a>, what I admire him the most, is not his wealth, but his consistency. He still lives in the modest house he bought in 1958, he still drives by the same McDonald’s for breakfast every day, and he continues to conduct his life with the same principles and philosophies. His long-time investment partner and friend Charlie Munger calls him an absolute “<strong>lifelong learning machine</strong>”, and I suspect he did not become one without his habits for learning. He once said:</p><blockquote><a href="https://www.youtube.com/watch?v=ldPh0_zEykU#t=08m35s">[Chains of habit are] too light to be felt until they are too heavy to be broken</a></blockquote><p>I wrote this series partly because I believe many of us have a strong desire to learn and grow, but I also believe we do not discuss enough how to design and build systems and routines to support our learnings. I hope by sharing some of my own experiences and research from others, you too can be inspired to build your system and become a lifelong learning machine!</p><p>Happy learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c5ab4b3dd98" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Build Learning Projects — Part I]]></title>
            <link>https://medium.com/@rchang/how-i-build-learning-projects-part-i-54dbaad68961?source=rss-c00b242128fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/54dbaad68961</guid>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Robert Chang]]></dc:creator>
            <pubDate>Sun, 21 Jul 2019 00:18:28 GMT</pubDate>
            <atom:updated>2019-07-21T00:18:28.468Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I Build Learning Projects — Part I</h3><h4>A Little Bit of Slope Makes Up For A Lot of Y-Intercept</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PNViZtLN_8qn0oX-55UKig.png" /><figcaption><a href="https://unsplash.com/photos/eMP4sYPJ9x0">Image credit</a>: When was the last time that you built a learning project?</figcaption></figure><h3>Motivation</h3><p>Recently, I came across a<a href="https://sirupsen.com/read/"> blog post</a> written by Simon Hørup Eskildsen on how he approaches reading. It was an inspiring read because I did not know anyone this deliberate about the pursuit of reading. This kind of meticulous, thoughtful, system-level design thinking reminds me of <a href="https://www.principles.com/">Ray Dalio’s Principle</a>:</p><blockquote>Think of yourself as a machine operating within a machine and know that you have the ability to alter your machines to produce better outcomes</blockquote><p>While I do not see myself as a machine, I did examine various aspects of my life and found that I tend to apply this type of thinking more rigorously when it comes to learning. In graduate school, I experimented with various studying strategies to make my day more effective. At work, I have been asked by my coworkers how I managed to find time to pursue learning projects.</p><p>Like many others, I am easily distracted by Netflix and are often bombarded by social media like Twitter and Facebook. Nevertheless, over the years, I have designed a system to make my self-directed learning easier and more effective. In this post, I will share my approach to building technical learning projects, and I hope it will inspire you to design your own as well. If you already have a system that works well for you, I would love to hear it!</p><h3>A Bit of Slope Makes Up For A Lot of Y-Intercept</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9F4Y91yLWAXOHN4Ff-mdRw.png" /><figcaption><a href="https://unsplash.com/photos/VfUN94cUy4o">image credit</a>: Which slope are you climbing at the moment?</figcaption></figure><p>Before I go into the details of my still-evolving system, it’s useful to first talk about why I even pursue learning projects in the first place. Among my many reasons, the most important one came from Stanford professor<a href="https://web.stanford.edu/~ouster/cgi-bin/home.php"> John Ousterhout</a>. In his “<a href="https://www.quora.com/What-are-the-most-profound-life-lessons-from-Stanford-Professor-John-Ousterhout?share=1">Thoughts for the Weekend</a>” series, Professor Outsterhout once shared with his students a concept called “A little bit of slope makes up for a lot of Y-intercept”.</p><blockquote>If you have two lines, the red line and the blue line, and the red line has a lower Y-intercept but a greater slope […] then eventually the red line will cross the blue line. In a mathematical sense, it’s kind of obvious [a little bit of slope makes up for a lot of Y-intercept].</blockquote><blockquote>I think this is a pretty good guideline for life. What I mean is that how fast you learn is a lot more important than how much you know to begin with. So in general I say that people emphasize too much on how much they know and not how fast they’re learning.</blockquote><p>When I took my first Data Science job in 2012, I barely knew git, SQL, and have never heard the term Data Engineering. I didn’t know how to design good experiments, and I<a href="https://medium.com/@rchang/getting-better-at-machine-learning-16b4dd913a1f"> </a>know very little about Machine Learning beyond math and theory. Arguably, my Y-intercept was pretty low, but I focused on my slope anyway.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7LhoF1hRs4Ws8xYcIne4Kw.png" /></figure><p>I love this philosophy, because it not only gives me more motivation to keep improving myself, but it also helps me to stay humble when working with less experienced people. We are all working along with our version of the slope, and in the long run, your learning rate is what determines your long-term success.</p><p>In this two-part series, I will talk about various strategies that I adopted along my journey climbing my slope. These include, but are not limited to:</p><ul><li><strong>How to choose a useful learning project</strong></li><li><strong>How to design and iterate on a learning plan</strong></li><li>How to execute on a learning project persistently</li><li>How to internalize my learnings and make it useful for others</li></ul><p>This post, part-I of the series, will explain several criteria I used when it comes to subject picking. Furthermore, I will talk about how to effectively design a learning plan, and explain why it is important to spend time doing so. In Part-II of this series, I will discuss the ingredients of good habits and how to leverage them to learn persistently. Finally, I will discuss why teaching and writing are the best ways to internalize what you have learned.</p><p>Let’s dive right in!</p><h3>1. Choosing a Learning Project</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FQX_q58GyLogqYhhvuTEyQ.png" /><figcaption><a href="https://unsplash.com/photos/KmGMMxVv0_Q">Image credit</a>: Which learning projects should you choose?</figcaption></figure><p>In an era where learning resources are easily accessible via MOOCs, Youtube, and blog posts, the question is now less about accessibility but more about what subjects to learn. Some advocates to learn what you love until you love learning, others suggest learning skills that can withstand the test of time. My strategy, especially for developing professional skills, is heavily influenced by<a href="http://dilbertblog.typepad.com/the_dilbert_blog/2007/07/career-advice.html"> Scott Adams</a>, the creator of the Dilbert comic strip.</p><blockquote>If you want an average successful life, it doesn’t take much planning. Just stay out of trouble, go to school, and apply for jobs you might like. But if you want something extraordinary, you have two paths:</blockquote><blockquote>1. Become the best at one specific thing.<br>2. Become very good (top 25%) at two or more things.</blockquote><blockquote>The first strategy is difficult to the point of near impossibility. Few people will ever play in the NBA or make a platinum album. I don’t recommend anyone even try. The second strategy is fairly easy. Everyone has at least a few areas in which they could be in the top 25% with some effort […] Capitalism rewards things that are both rare and valuable. You make yourself rare by combining two or more “pretty goods” until no one else has your mix.</blockquote><p>I adopted the second strategy because I enjoy having breath and diversity in my skill sets. As such, I spent a lot of time thinking about what my repertoire of skills should be, and they generally boil down to skills that are foundational, adjacent, and transferable. Let me explain each of them below.</p><h4>Prioritize Foundational Skills</h4><p>In the present world, the rate of technological change is often far too fast for any single person to digest. In a growing field where many people are contributing and competing, there is often an unending streak of new updates and announcements. As an example, in Deep Learning, we often hear debates about which learning framework will be the <em>lingua franca</em> of AI. Many of the technologies in debate today were not even popularized until a few years ago.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_dpZ4CKk6lSW0BUWQI8fzA.png" /><figcaption>A common mistake for skill building is to focus too much on the tooling and not the workflow underneath it</figcaption></figure><p>With this rate of change, I argue that the ability to use any particular framework or tool is <strong>not</strong> by itself a foundational skill. Instead, it is the <em>workflow patterns</em> that these tools enabled that are foundational. Frameworks and tooling are often useful because they abstract away tedious parts of our workflow, but without knowing why we are following these workflows in the first place, we are simply using the tools mechanically without souls.</p><p>I tried to follow this principle when pursuing my learning projects. For Deep Learning, instead of obsessing over whether to use Keras or PyTorch, I spent most of my time understanding the conceptual difference between shallow models v.s. deep models. I learned why Transfer Learning is a standard workflow in the era of deep modeling, and I investigated why certain embeddings are powerful for different learning tasks. Similarly, when I practiced Data Engineering, I looked beyond Airflow’s simple building blocks such as sensors, operators, and transfers. Instead, I tried to understand the core activities involved in doing good data engineering work — data modeling, backfilling, testing and monitoring, … etc.</p><p>Over time, I learned that by mastering the core concepts associated with a workflow, the mental model one develops can be easily re-applied when picking up new tools and frameworks. This is perhaps why great engineers can typically pick up new languages without too much struggle — they understand the core concepts underneath that are universally foundational.</p><h4>Explore Adjacent Skills</h4><p>Once I feel I have mastered a particular skill, I often expanded it by tapping into <a href="http://www.effectiveengineer.com/blog/master-adjacent-disciplines">adjacent discipline</a>, a term coined by Steven Sinofsky and advocated by Edmond Lau. Accordingly to Steven, adjacent disciplines as those that are immediately to the left or right of your own core expertise. For example, if you are a data scientist, your adjacent disciplines might be Data Engineering or Data Visualization. As a product manager, your adjacent disciplines might be A/B testing or product design. As a musician, your adjacent disciplines might be music composition or music production, so on and so forth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WktvV-yPatZddbBBAGgbxg.png" /><figcaption>A few examples of Adjacent disciplines for becoming a <a href="https://blogs.msdn.microsoft.com/techtalk/2005/09/19/the-path-to-gm-some-thoughts-on-becoming-a-general-manager/">GM</a> &amp; <a href="https://mindfulmachines.io/blog/2018/3/17/the-flavors-of-data-science-and-data-engineering">Data Scientist</a></figcaption></figure><p>The first obvious advantage of exploring adjacent skills is that it will make you more self-sufficient on the job. If you are a data scientist who needs a feature pipeline for machine learning, having the skill to build your own ETL pipeline means that you can iterate on feature engineering more efficiently. If you are an analyst who needs to include more dimensional cuts for a report, having the ability to modify table schema can help you to deliver results faster. This is why I believe data scientists who learned <a href="https://medium.com/@rchang/a-beginners-guide-to-data-engineering-part-i-4227c5c457d7">data engineering</a> can usually take on bigger and more ambitious data projects.</p><p>Aside from this first benefit, learning adjacent disciplines often mean your knowledge compounds. Having learned Python and Object-Oriented Programming, these skills enabled me to understand better how different <a href="https://medium.com/@rchang/a-beginners-guide-to-data-engineering-the-series-finale-2cc92ff14b0">Data Engineering frameworks</a> are implemented under the hood. By learning the challenges of building ETL jobs, I can appreciate much better why feature engineering in Machine Learning can be so time-consuming. Adjacent disciplines not only help you to transition into new areas, but it also helps you to connect related knowledge together.</p><p>The last and more subtle advantage of learning adjacent discipline is that it makes you a better cross-functional partner. By understanding the complexities and intricacies of your colleagues’ works, you can better empathize with the challenges that they face on the job.</p><h4>Focus on Transferable Skills</h4><p>A few years ago, I was interested in building a website using Flask and Python. While dabbling into the world of web development, I came across a template engine called<a href="http://jinja.pocoo.org/"> Jinja</a>. I soon learned that it is commonly used by developers because it simplifies writing HTML significantly via control flow and inheritance. I was very impressed by the ingenuity of this template engine at the time, but I never really used it again as a data scientist, not until when I arrived at Airbnb.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HbedYVY0XqSjq19OkFh7ZA.png" /><figcaption><a href="https://multithreaded.stitchfix.com/blog/2017/07/06/one-weird-trick/">Source</a>: Jinja, originally invented for HTML, can be applied to SQL as well</figcaption></figure><p>At Airbnb, I learned from experienced data engineers that many of the ideas in Jinja can be<a href="https://multithreaded.stitchfix.com/blog/2017/07/06/one-weird-trick/"> applied</a> to Hive queries directly. By leveraging for-loop in Jinja, I can greatly shorten the SELECT statement. By using the if-else control flow, I can incorporate backfilling logic into the same SQL query.</p><p>When thinking about writing HTML and writing SQL, I realize that there’s a lot of similarity between the two activities. Both workflows leverage an expressive language to achieve certain tasks: HTML for rendering web pages, SQL for data computation, so it wasn’t surprising to see that the same technique can be transferred from one domain to another.</p><p>Transferable skills are like superpowers — learned once, and you get to apply it in several places. The initial cost of acquiring those skills might be high, but the variable cost for applying it elsewhere is relatively low. When thinking about what skills to master, focusing on transferable skill.</p><h4>Takeaways</h4><ul><li><strong>Prioritize foundational skills:</strong> you will learn activities associated with a workflow and appreciate how tooling can abstract them away for you</li><li><strong>Explore adjacent disciplines:</strong> you will become more self-sufficient on the job, can take on larger and more ambitious projects, and develop more empathy for your colleagues</li><li><strong>Focus on transferable skills:</strong> you can apply these skills in different domains without much extra costs</li></ul><p>Our society values what’s rare and valuable, and by being selective of what to learn, you are more likely to develop your own <em>mix</em> that is unique and not easily replaceable.</p><h3>2. Designing a Learning Plan</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VnyMwkgaZuix_CWp2Lau4A.png" /><figcaption><a href="https://unsplash.com/photos/ZSPBhokqDMc">Source</a>: How much time do you spend designing your learning plan before learning something?</figcaption></figure><p>Once you have chosen a specific skill to focus on, the next step is to develop a learning plan. In my opinion, the biggest mind shift here is that you need to treat yourself not only as a student but also as your own teacher. Playing these dual roles can seem a little bit daunting at first, especially if you are used to learning from an authority figure like a teacher or professor.</p><p>However, imagine what a teacher has to do before teaching a course. She has to define learning objectives for her students first. He most likely needs to sample different learning materials and develop a curriculum. Finally, she would need to set milestones to make sure students are held accountable.</p><p>Similarly, as a designer of your learning project, you will also need to go through these exercises to design an effective learning plan. Let us go over each of these activities in more detail.</p><h4>Define Your Learning Objectives</h4><p>One of the mistakes that I made in my earlier learning projects was that I rarely stated upfront what learning objectives I would like to achieve. I dived into one learning project after another haphazardly, with the hope that someday I will apply these skills to some problems — It never happened.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EqvB-bGuPfPJ4Wu2vV7Z3A.png" /><figcaption>A comparison: (Left) a learning project without clear learning objectives v.s. one that does (Right)</figcaption></figure><p>It does not hurt to be biased to action, but following unguided actions also means you could spend a lot of energy wandering around aimlessly. Reflecting on the lessons learned from earlier failures, I now try to identify one or two learning objectives upfront before diving into a learning project.</p><p>For example, when I pursued my Python learning project, I wrote down the learning objective that I want to eventually converge all my Data Science work from R to Python by the end of the calendar year. When pursuing my Deep Learning project, I set the goal to understand how Airbnb’s<a href="https://www.youtube.com/watch?v=tPb2u9kwh2w"> room classification model</a> works under the hood. The key here is to set concrete, time-bounded, measurable goals. i.e. I can check exactly if I have achieved what I set out to do by a specific deadline.</p><p>For technical learning projects that are aimed to improve my professional skills, my learning objectives usually revolve around:</p><ul><li>adopting or making a specific change in how I work</li><li>achieving a better understanding of a problem or solution, or</li><li>generating learning materials that can be consumed by others</li></ul><p>I will talk more about generating public work in Part-II of this series.</p><h4>Identify Project Milestones</h4><p>If your learning objective is relatively ambitious, then it is important to break down your learning objectives into tangible and achievable milestones. This “divide and conquer” approach has proven to be very effective for me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v1XLd2xIrlKHrD257ZEYoA.png" /><figcaption>Source: A truncated list of project milestones that I defined for my Flask learning project (see the full list <a href="https://github.com/robert8138/flask-google-calendar-api-project">here</a>)</figcaption></figure><p>As a concrete example, for my Flask learning project, I defined a learning objective to deploy a website that will render my Google calendar time logs in an interactive<a href="https://d3js.org/"> d3</a> visualization. I identified specific milestones for this goal: from reading the<a href="https://developers.google.com/calendar/"> Google Calendar API</a>, pulling and storing my data in a local database, to finally rendering the data in a d3 visualization. After completing many small milestones, I finally built a website that did exactly what I set out to you. I still remember the day when I rendered all the data on a heat map, it was magical!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PNsNIyM4duQKx7Umrd7V8A.png" /><figcaption>Without setting project milestones, I might have never been able to build this beautiful heap map!</figcaption></figure><h4>Develop a Curriculum</h4><p>In my experience, one of the most important but under-appreciated skills in learning is the ability to identify materials that are accessible and approachable to your learning patterns. For most of my learning projects, I usually spent about 2–3 weeks sampling materials until I develop a curriculum that I feel excited about. This is the period where I would browse the internet to identify any free or paid materials that are relevant to my topic — be it blog posts, online courses, books, or the like. I typically do this by creating a<a href="https://help.github.com/en/articles/create-a-repo"> new github repository</a> to keep track of all the materials that I find relevant, and slowly organize them into something more structured like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uDgHRwEhNav5WCP5E7TiDw.png" /><figcaption><a href="https://github.com/robert8138/deep-learning-deliberate-practice">Source</a>: Curriculum that I built for my Deep Learning project. You can find my Python one <a href="https://github.com/robert8138/python-deliberate-practice">here</a>.</figcaption></figure><p>There are two reasons why sampling and developing your curriculum is important. First, without a very strong mental model, it is hard to know exactly what are the important concepts to learn. By standing on the shoulders of people who understand the materials very well, you will start to see the same core concepts emerging again and again. In my opinion, this is the first step toward understanding.</p><p>The second reason is that as a life-long student, you are no longer constrained by the textbook or teaching style of any single teacher. Depending on your background, you might want to mix and match between different learning materials that help you learn better. Over and over again, I have seen how the same concept can be explained horribly but also articulately, and it makes a world of a difference. It’s up to you to find the resources that resonant with your learning patterns.</p><p>As an example, during my Deep Learning project, I simultaneously sample materials from Stanford’s <a href="http://cs231n.stanford.edu/">on-campus course</a>, Coursera’s <a href="https://www.coursera.org/specializations/deep-learning">Deep Learning specialization</a>, and a<a href="http://fast.ai"> fast.ai</a> course. I generally find Coursera’s material great for developing intuition at first, but almost always gravitated toward the Stanford course because I want to understand the math better. Furthermore, to practice with more hands-on exercise, I would usually go to the<a href="http://fast.ai"> fast.ai</a> course, where notebooks and code examples are abundantly available. It was quite common that I would study the same subject using three different materials in a given week.</p><p>One final note, if you are not yet confident in your ability to source your own learning materials, be sure to solicit feedback from friends or coworkers who are knowledgeable on the subject. This is a good way to make sure your curriculum has covered all the basic grounds.</p><h4>Takeaways</h4><p>When it comes to self-directed learning, it is very important to design a learning plan. This includes:</p><ul><li><strong>Define your learning objectives</strong>: set clear goals on what behaviors or outcomes you would like to achieve</li><li><strong>Identify project milestones</strong>: divide and conquer so you can make steady progress without getting intimidated</li><li><strong>Develop a curriculum:</strong> find materials that you would enjoy according to your learning patterns. Consult experts to validate your curriculum</li></ul><p>By the end of this design process, you would have a pretty solid learning plan, and that’s really half of the job done! The common mistake is that people generally do not spend enough time in this step.</p><h3>Conclusion</h3><p>Even if you have a strong desire to learn, it often still feels like a struggle to balance between self-directed learning and other important life priorities, just think about all the responsibilities, obligations, and distractions in life!</p><p>Without a system, chances are, we will not achieve our goals. In this post, I shared my approach to choosing and building a learning project, using my previous successes and failures. I hope by sharing some of my learnings, you will be inspire to design your own learning methods.</p><p>In the next post, I will talk about how to make steady progress on a learning project, and how to internalize your learnings by teaching others and producing public artifacts.</p><p>Happy learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54dbaad68961" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[So You Want Become a Data Science Manager?]]></title>
            <link>https://medium.com/deliberate-data-science/so-you-want-become-a-data-science-manager-4ff9544e6827?source=rss-c00b242128fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ff9544e6827</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Robert Chang]]></dc:creator>
            <pubDate>Thu, 21 Feb 2019 04:01:00 GMT</pubDate>
            <atom:updated>2019-02-22T06:01:16.003Z</atom:updated>
            <content:encoded><![CDATA[<h3>So You Want to Become a Data Science Manager?</h3><h4>How to think about the IC to Management transition</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t5x4yrbKc8Tyd24GHQ8w3g.png" /></figure><h3><strong>Motivation</strong></h3><p>I recently came across a great book called “<a href="https://www.amazon.com/Managers-Path-Leaders-Navigating-Growth-ebook/dp/B06XP3GJ7F/ref=as_li_ss_tl?s=books&amp;ie=UTF8&amp;qid=1515860472&amp;sr=1-1&amp;keywords=manager%27s+path&amp;linkCode=sl1&amp;tag=elidebranc-20&amp;linkId=1debd573dbbe4189ff620dff2885a518">The Manager’s Path</a>”, written by <a href="https://medium.com/@skamille">Camille Fournier</a>. In this book, Camille describes the possible career paths of a technical individual contributor (IC) as one continues to grow in her career. I find this book illuminating because it touches on a rather common topic in the tech industry — “Should I transition from IC track to management track? If so, when is the right time?”. If you have been working as an IC for the past few years, chances are, you have pondered on this question already.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IEDgCjTa-oVlhUw4" /><figcaption>Image Credit (me): Typical career paths in tech</figcaption></figure><p>Given that this topic is discussed so extensively in engineering (see<a href="http://www.camilletalk.com/whilefalse/2015/11/truth-and-consequences-of-technical.html"> here</a>,<a href="https://charity.wtf/2017/05/11/the-engineer-manager-pendulum/"> here</a>, and<a href="https://charity.wtf/2019/01/04/engineering-management-the-pendulum-or-the-ladder/"> here</a>) and design (see<a href="https://medium.com/the-year-of-the-looking-glass/unintuitive-things-i-ve-learned-about-management-f2c42d68604b"> here</a>,<a href="https://medium.com/the-year-of-the-looking-glass/unintuitive-things-i-ve-learned-about-management-part-2-7c22fc9d87ed"> here</a>, and<a href="https://medium.com/the-year-of-the-looking-glass/managing-more-experienced-people-9893f9903649"> here</a>), you would think it is all figured out by now. However, for a field as new as data science, I haven’t seen a whole lot of discussions about this topic just yet. After working in the field for more than half a decade, I have developed my own perspectives on how to think about this topic, so here we go!</p><h3><strong>First, My Experience</strong></h3><p>I am not a data science manager, nor have I ever been one. During the past six years of my data science career, I have definitely considered becoming one, and have even been encouraged to. However, like any other important career decision, I am always convinced that this transition, if made, should be a deliberate one. Far too often, I have seen ICs turned managers for the wrong reasons, which made them and their teams suffer.</p><p>Recently, I worked with our data science leadership team to build the first data science tech lead pilot at Airbnb. Through various discussions with ICs and managers, we debated the pros and cons of staying on the IC track v.s. going into management. These conversations not only helped me to launch the pilot but also helped me to contextualize some of my own, often implicit, preferences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*FlgYMcHfDTPdBukw.jpg" /></figure><p>On the one hand, I have always aspired to become a hands-on data scientist, and enjoy doing so from the trenches. On the other hand, I sometimes experience the challenge and inertia of <a href="https://writing.jeanhsu.com/how-do-you-become-a-leader-without-explicit-authority-f0c5001d864b">leading without authority</a>. Some people say that there’s diminishing returns for remaining as an IC for too long, and other managers have lamented how far they are drifted away from technical work. While all of these might ring true, I wanted to dig deeper to my inner compass.</p><h3><strong>The Framework From The Book “Drive”</strong></h3><p>A few years ago, I came across Daniel Pink’s bestselling book “<a href="https://www.youtube.com/watch?v=u6XAPnuFjJc">Drive: The surprising truth of what motivates us</a>“. In his book, Daniel talked about three important ingredients that make our works motivating:</p><ul><li><strong>Purpose: </strong>the goal to do something meaningful</li><li><strong>Mastery: </strong>the urge to get better at stuff</li><li><strong>Autonomy: </strong>the desire to be self-directed</li></ul><p>Since then, I have been using his framework for evaluating projects, jobs, or more generally career opportunities. In the next couple of sections, I will again use this framework to talk about the pros and cons of being an IC v.s. becoming a manager.</p><h4><strong>Purpose</strong></h4><p>In a well-run startup, everyone knows exactly what the company is trying to achieve — the cost of communication is low, and decisions are made swiftly. As the company continues to grow, communication and decision making become more localized, and misalignments could occur among people who do not communicate effectively. This is why we often hear the phrase “the first casualty of growth is communication”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QSU-Ocip2c39aRFK6OpOIg.png" /><figcaption><a href="https://pixabay.com/en/chairs-series-sit-row-hall-event-2593531/">Image Source</a>: A manager’s primary responsibility is to build alignment</figcaption></figure><p>In a sufficiently large company, the purpose of managers is to clearly understand the goals of the company and consistently reinforce the company’s vision in order to align teams and individuals to work toward that vision in a fulfilling way. Very different from the role of an IC, a manager’s responsibility is to synthesize information, to provide context, creating the right environment, and do so consistently to create trust.</p><p>As described in Julie Zhou’s “<a href="https://medium.com/the-year-of-the-looking-glass/unintuitive-things-i-ve-learned-about-management-part-2-7c22fc9d87ed">Unintuitive Things I learned About Management</a>”, one of the unintuitive things she learned as a manager is that it’s a lot more important to focus on the “<em>why are we doing X?</em>” rather than “<em>how are we going to execute on X?”</em>. The “why” is built on information sharing, trust, and alignment.</p><p>This is why <strong>management is a career change, not a promotion</strong> (see <a href="https://charity.wtf/2019/01/04/engineering-management-the-pendulum-or-the-ladder/">here</a>). If you are ready to serve the mission by amplifying others, by coordinating with partners, and living by the company’s vision, then the managerial path might be a great fit for you. If not, then you should think carefully if you are serving the right purpose.</p><h4>Mastery</h4><p>This leap and transition from IC to management track is far greater than just a title change. It’s a fundamental shift of one’s core identity and how one functions. Your technical skill is no longer your most valuable currency, trust is. Code is no longer what you produce, it is relationships. Finally, be prepared to spend a lot of time talking, meeting, and writing Google docs with other people.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ykoL5gAfu9pKopfjJc8GZw.png" /><figcaption><a href="https://pixabay.com/en/adult-artisan-tools-workshop-1866533/">Image Source</a>: Want to become a manager? Time to learn new skills</figcaption></figure><p>To adapt to this new reality, you need to develop soft skills with a higher bar — communication, active listening, empathy, … etc. Many ICs, especially the most effective ones, find this transition challenging, because getting better at these skills is often a lot more amorphous than say, writing more code or conducting more rigorous analyses. The path of mastery is fundamentally different.</p><p>In addition to learning new skills, you have to learn how to let go of skills that you have already mastered. You need to know how to delegate effectively and not spend too much time dwelling on execution. If you cannot change this mindset, you severely limit the potential of your team and their output. Paradoxically, the right behavior of a good manager is not to try to be the most technical person in the room.</p><p>When you learn new skills, you put other skills in the background. This is natural given the shift of focus. Having said that, this combination of needing to let go of the skills you have already mastered and expanding new skills beyond your comfort zone is a bitter pill to swallow. But, if you are ready to embrace new challenges, this can be an incredible opportunity building foundational and transferable skills.</p><h4>Autonomy</h4><p>Finally, as a manager, your schedule will also look fundamentally different. On this topic, I found Paul Graham’s essay “<a href="http://www.paulgraham.com/makersschedule.html">Maker’s Schedule, Manager’s Schedule</a>” extremely relevant. Paul explains that “makers” need concentrated and uninterrupted time to create, usually in half-day chunks. Managers, on the other hand, typically jump in between meetings in hourly chunks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2OH-ZPebWQvKaH4zZTzfmg.png" /><figcaption><a href="https://pixabay.com/en/time-timer-clock-watch-hour-371226/">Image Source</a>: Are you on maker’s schedule or manager’s schedule?</figcaption></figure><p>As a manager, you largely need to keep your calendar open so you could have 1:1s, context sharing, communication, alignment, or even fire fighting. This schedule is a pretty big departure from what ICs are used to, and mixing the two schedules can lead to very poor productivity.</p><p>If you are someone who deeply subscribed to the philosophy of<a href="http://calnewport.com/books/deep-work/"> deep work</a>, you probably strongly prefer the maker’s schedule. As a manager, you need to be more creative and creating the equivalent of deep working time for yourself. I have heard stories of how CEOs of large companies typically block off time so they can “think”. Deep work in the context of managerial work is possible, but you need to create that space for yourself.</p><h3><strong>The Concept of a Tour of Duty</strong></h3><p>Reid Hoffman, cofounder of LinkedIn, proposed the concept of a <strong>Tour of Duty</strong> in his 2014 book “<a href="http://www.theallianceframework.com/">The Alliance</a>”. He characterizes a tour of duty as: <em>a commitment by the employer and employee to a specific mission of finite duration.</em> Transitioning to management, unarguably, will be a big shift, but I think when looking through the lens of the concept of a tour of duty, it is actually quite liberating.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R_cOrUJ5M77VdGha0XWhIQ.png" /><figcaption><a href="https://pixabay.com/en/parachute-skydiving-parachuting-658397/">Image Source</a>: Are you ready to jump right into your next Tour of Duty?</figcaption></figure><p>For young working professionals (myself included), your first rodeo in management does not need to be a permanent one. A much healthier and liberating way to look at this transition is to think of it as a tour of duty. Think of it as a mission that is tailored for you in which you can learn orthogonal skills that are different from the technical skills you already have, and think of it as another way for you to provide value to the organization.</p><p>As you approach the end of the tour, you can work with your manager to analyze if such a tour is the right fit for you and for the company. It might not work out for you, but even then you have eliminate this career path, which is very useful for career planning. But if you do like it, new doors are opened for you.</p><h3><strong>Summary, Not Conclusion</strong></h3><p>It is probably clear by now that I am not being very prescriptive in this post (I myself am still trying to figure out). The lesson I am trying to preach, perhaps, is to recognize that your goals and aspirations will change over time, and that’s completely normal. The important thing is to make deliberate and informed choices that are aligned with your inner compass as transitions are made, and think from first principles on why you want what you want. It’s hard, but it’s worth trying.</p><p>Are you ready to become a data science manager?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ff9544e6827" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deliberate-data-science/so-you-want-become-a-data-science-manager-4ff9544e6827">So You Want Become a Data Science Manager?</a> was originally published in <a href="https://medium.com/deliberate-data-science">Deliberate Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Better at Machine Learning]]></title>
            <link>https://medium.com/@rchang/getting-better-at-machine-learning-16b4dd913a1f?source=rss-c00b242128fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/16b4dd913a1f</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Robert Chang]]></dc:creator>
            <pubDate>Wed, 26 Sep 2018 02:53:41 GMT</pubDate>
            <atom:updated>2018-09-26T02:53:41.623Z</atom:updated>
            <content:encoded><![CDATA[<h4>Moving Beyond model.fit(X, y)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CA_RgxCdZz2ptWmzGaqdpg.png" /><figcaption><a href="https://pixabay.com/en/spot-runs-start-la-stadion-862274/">Image credit</a>: Getting better at machine learning takes time, effort, and practice!</figcaption></figure><h3><strong>Motivation</strong></h3><p>In <a href="https://medium.com/@rchang/a-beginners-guide-to-data-engineering-part-i-4227c5c457d7">A Beginner’s Guide to Data Engineering</a> series, I argued that academic institutions typically do not teach students the proper <em>mental models</em><strong> </strong>when it comes to analytics workflows in real-life. Far too many classes only focus on the mechanics of data analysis without teaching concepts such as ETL or the importance of building robust data pipelines. Unfortunately, I see a similar pattern in machine learning education as well. Surely, studying the <a href="https://blog.ycombinator.com/learning-math-for-machine-learning/">math behind ML</a> and learning <a href="http://scikit-learn.org/stable/tutorial/machine_learning_map/index.html">different algorithms</a> are valuable. Yet, there exist crucial steps beyond model.fit(X, y) that are important in practice. In this post, I will share some of my learnings that I did not learn in school.</p><p>First, I will highlight the rise of Kaggle: why it has transformed our industry, what critical role it plays, but also where it fell short. In particular, I will contrast the workflow Kaggle reinforced with the typical development workflow of a real-life machine learning project. Throughout the post, I will give coloring examples around topics such as problem definition, feature engineering, model debugging, productionization, and feedback loops. By the end of this post, I hope readers will appreciate some of the complexity and challenges, but also joys, of real-life machine learning.</p><h3>The Rise of Kaggle Competition</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O2jevBVe3vpYGdryMDWEmA.png" /><figcaption>Kaggle’s <a href="https://www.kaggle.com/challenge-yourself">Competition Landing Page</a>: Fancy to Join one?</figcaption></figure><p>Ever since its inception in 2010, <a href="https://www.kaggle.com/">Kaggle</a> has become the platform where data enthusiasts around the world compete to solve a wide variety of problems using machine learning. Over time, Kaggle has built an incredible repository of useful benchmark datasets and example notebooks (called <a href="https://www.kaggle.com/kernels">kernels</a>), turned modeling into a sport, and made some practitioners into Kaggle <a href="https://www.wired.com/story/solve-these-tough-data-problems-and-watch-job-offers-roll-in/">stars</a>.</p><h4>Common Task Framework</h4><p>The model that Kaggle follows, is what Professor David Donoho referred to as the <em>Common Task Framework</em> (CTF) in his paper “<a href="https://courses.csail.mit.edu/18.337/2015/docs/50YearsDataScience.pdf">50 years of Data Science</a>”. Donoho argued that the secret sauce to machine learning’s success is partially driven by competitions:</p><blockquote>It is no exaggeration to say that the combination of a predictive modeling culture together with CTF is the ‘secret sauce’ of machine learning. This combination leads directly to a total focus on optimization of empirical performance, which […] allows large numbers of researchers to compete at any given common task challenge, and allows for efficient […] judging of challenge winners.</blockquote><p>Indeed, from DARPA’s machine translation research in the 1980s, the famous 2009 <a href="https://www.netflixprize.com/">Netflix Prize</a>, to the recent success of deep learning due to <a href="http://www.image-net.org/challenges/LSVRC/">ImageNet</a> challenge, the machine learning community continues to bring innovation to the mass under common task framework.</p><h4>Where Kaggle Competition Fall Short</h4><p>While Kaggle competitions have been tremendously educational, their workflows generally only reflect a small subset of what is involved in real-life machine learning projects. First of all, Kaggle hosts formulate the problems, not the participants. Not only are the loss functions and golden datasets used for evaluation pre-determined, but training labels / data are often handed to the participants on a silver platter. Furthermore, there is very little concern regarding how to integrate models into a decision process or a product. These are all conditions real projects are unlikely to meet in practice. As a result, a lot of the considerations in machine learning projects are lost in translation.</p><h3>Machine Learning Workflow</h3><p>When building a machine learning product, we are no longer developing <em>models </em>in isolation (what people sometimes called “<strong>Laptop Data Science</strong>”). Rather, we are building a <em>system </em>that interacts with real human beings. Not only do we need to think strategically about the problems we are solving for the end users, but we also need to ensure that the user experience is intuitive, predictions are accurate, and inference is efficient.</p><h4>Think and Build a System End-to-End</h4><p>These conditions mean that we almost never jump to modeling immediately, we have to think and build the <em>system</em> end-to-end. In Rachel Thomas’ fantastic post “<a href="http://www.fast.ai/2018/07/12/auto-ml-1/">What do machine learning practitioners actually do?</a>”, she explains the typical workflow of a machine learning project:</p><blockquote>Building a machine learning product is a multi-faceted and complex task […] machine learning practitioners may need to do during the process: <strong>understanding the context, preparing the data, building the model, productionization, </strong>and<strong> monitoring. </strong>[…] Certainly, not every machine learning practitioner needs to do all of the above steps, but components of this process will be a part of many machine learning applications.</blockquote><p>Kaggle is an amazing platform that focuses on model building, but less so on the rest of the steps described above. To help readers to better understand these other topics, I will highlight them using a combination of my personal experience and illuminating examples from other companies that I find useful. Below, I will discuss:</p><ul><li><strong>Problem Definition</strong>: why thinking hard about your problem is crucial</li><li><strong>Data Collection: </strong>why setting up your {X, y} right is half of the job done</li><li><strong>Model Building:</strong> how to debug your model when it does not perform well</li><li><strong>Productionization:</strong> what “putting model into production” really means</li><li><strong>Feedback Loop: </strong>how unintended feedback loop can affect your system</li></ul><h3>1. Defining Problem Is Hard and Not Always Obvious</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VE8tyll3F_D__s0804H5_g.png" /><figcaption><a href="https://pixabay.com/en/architecture-house-3d-design-1477041/">Image source</a>: Do you think this house can be an Airbnb Plus Home?</figcaption></figure><p>Let’s start with a case study, <a href="https://www.airbnb.com/plus">Airbnb Plus</a>, a product whose mission is to bring high-quality homes to the Airbnb marketplace. While many employees are passionate about finding homes suitable for Plus, doing this at scale can be challenging. On our team, we use a combination of human evaluation and machine learning to identify high potential homes. This type of problem, which involves human evaluations + machine predictions, are becoming increasingly <a href="https://www.slideshare.net/EricColson/blending-human-computing-and-recommender-systems-for-personalized-style-recommendations?ref=https://www.linkedin.com/in/ecolson/detail/treasury/position:283490153/?entityUrn=urn%3Ali%3Afs_treasuryMedia%3A(ACoAAAAgRpcBysMEEbZcn2KCJyUlezpKXYs2nYs%2C50371553)&amp;section=position%3A283490153&amp;treasuryCount=3">common</a>.</p><h4>Your First Iteration of the Model Is Often Not Your Last</h4><p>As our human evaluators assess homes, training labels are generated as a by-product. Given that we already have a lot of features about a listing (price, bookings, reviews … etc), it was rather convenient to combine the two data sources (labels + features) to train our first home targeting model. At first, this approach worked well, and it brought enormous gains to our efficiency.</p><p>However, as the product continued to evolve, we started to experience the limitation of this simple approach. Specifically, as we evolved what <a href="https://www.airbnb.com/plus/host/requirements">qualifies</a> a home to be “Plus” at the program level, the semantic meanings of our outcome labels had also changed. This business evolution posed non-trivial challenges to our learning task because our labels can become outdated rather quickly. We were essentially learning to predict a moving target!</p><h4>Decomposing the Learning Task Requires Thinking</h4><p>To de-risk our modeling effort, we had to re-think the problem formulation. Eventually, we decided to decompose our single, monolithic learning task into several independent modular tasks. This means that instead of directly classifying whether a listing is high potential or not, we focused on predicting more stable attributes that are indicative of high-quality. For example, instead of classifying the label is_home_high_potential directly, we framed the problem as is_home_high_potential = <strong>f</strong>(style, design, ...) , where <strong>f</strong> is our rule-based approach to codify how humans might use these modular predictions to make a final assessment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oe5ojwhM6-YH4BXpCqFXzA.png" /><figcaption><a href="https://pixabay.com/en/hand-rubik-cube-puzzle-game-2208491/">Image credit</a>: It’s useful to decompose a learning task into smaller tasks when the label is not straightforward</figcaption></figure><p>More often than not, problem formulation requires deep domain knowledge, the ability to decompose problems, and a lot of patience. The most convenient training dataset should not drive how we formulate the problem, rather it should be the other way around. This is an important first skill to becoming an effective problem solver in machine learning.</p><p><strong>Takeaway:</strong> <em>Like software engineering, the principle of decomposition can be very important in machine learning as well. It allows us to break a complex problem or system into parts that are easier to conceive, understand, and learn.</em></p><h3>2. Data Collection Is Often Non-trivial</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1BuvNymrXVgV6GC6MN6mTg.png" /><figcaption><a href="https://pixabay.com/en/assortment-box-collection-container-1868297/">Image source</a>: Data collection for machine learning is analogous to picking ingredients before cooking a great dish</figcaption></figure><p>At work, our data scientists and ML engineers often get together to talk about machine learning ideas passionately. While these discussions are always inspirational, they generally do not translate to project roadmaps immediately due to a common blocker — <em>lack of training labels and feature pipelines.</em></p><h4>Acquiring Quality Labels Is Challenging</h4><p>On Airbnb Plus, we are lucky to have training labels generated as a by-product from our home assessments, but dedicated labelings are often rare because collecting them comes with a hefty time and monetary cost. In the absence of actual training labels, we could use other data as proxies for training labels, but they are not always high fidelity.</p><p>For example, when Airbnb developed its <a href="https://medium.com/airbnb-engineering/categorizing-listing-photos-at-airbnb-f9483f3ab7e3">room classification</a> model, we used image captions as our proxy label for the ground truth. While this approach gave us convenient labels as a head start, the label quality tends to be low for certain room types, especially for smaller spaces. For instance, scenes in a studio tend to be crammed together: a kitchen could be right next to a living room that is adjacent to a bedroom. This makes evaluation of ground truth hard to interpret, sometimes even in the eyes of human labelers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*98FN1KxORE2kehrC_FgZ2w.png" /><figcaption><a href="http://www.home-designing.com/5-beautiful-studio-apartments">Image source</a>: Should we label the room type of this image as a kitchen or a bedroom?</figcaption></figure><p>In general, labeling in real-life is far trickier than simple tasks like telling apart hotdogs v.s. non-hotdogs. This nuance often makes <a href="https://en.wikipedia.org/wiki/Inter-rater_reliability">inter-rater agreement</a> hard to achieve, and is rather universal for serious modeling pursuits across different domains. Andrej Karpathy, in his talk <a href="https://www.figure-eight.com/building-the-software-2-0-stack-by-andrej-karpathy-from-tesla/">building the software 2.0 stack</a>, highlights some of Tesla’s labeling challenges for building self-driving cars. For example, he explains that labeling traffic lights and traffic lanes can sound simple but in reality difficult because the diversity of how different cities design the roads. More generally, he argues that in the <a href="https://medium.com/@karpathy/software-2-0-a64152b37c35">software 2.0</a> world, we have not yet figure out the right IDEs or labeling tools to build software. These are all real data challenges that are not taught in school.</p><h4>Building Feature Pipelines Is Time Consuming</h4><p>Even when we have high quality labels, building feature pipelines can be a tedious and time-consuming process. For the model described in the previous section, we were lucky to re-use some of the listing-level features from another <a href="https://medium.com/airbnb-engineering/using-machine-learning-to-predict-value-of-homes-on-airbnb-9272d3d4739d">existing project</a>. For problems that involved images as input, the feature engineering work is a lot more complex.</p><p>For example, before our room classification model, there was no image pipeline in place on our team that could be reused. A lot of data engineering work, from data ingestion, resizing images to size 224 x 224, using base64 encoding to storing thumbnails were required before we could build image models. Had this image pipeline not been in place, it would have slowed down a lot of our modeling work significantly. This is precisely why larger companies are building frameworks to make feature engineering easier (see Uber’s <a href="https://eng.uber.com/michelangelo/">Michelangelo</a>, Netflix’s <a href="https://medium.com/netflix-techblog/distributed-time-travel-for-feature-generation-389cccdd3907">Delorean</a>, and Airbnb’s <a href="https://vimeo.com/274397629">Zipline</a>). When planning ML projects, it is always wise to budget time for feature engineering, because training data will not be handed to you on a silver platter.</p><p><strong>Takeaway:</strong> <em>You need to work hard to get your training data, it is often earned rather than given. Acquiring high-quality labels can be non-trivial, and building feature pipelines can be time-consuming. To the extent you can, reuse common features or even labels to solve similar problems in the same domain space.</em></p><h3>3. Debugging and Improving ML Models is Hard</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PsfnGDdDLrAKjSbpAlcfPg.png" /><figcaption><a href="https://pixabay.com/en/hacking-cyber-blackandwhite-crime-2903156/">Image source</a>: Debugging machine learning models can be a lonely pursuit</figcaption></figure><p>Suppose you have gone through the steps of defining a problem, acquiring labels and building a feature pipeline, you then moved on to build your first iteration of the model only to learn that the result is not so stellar. What would you do in this case to debug and improve your model?</p><h4>Debugging Machine Learning Is Hard</h4><p>The scenario described above is very common and is at the heart of any machine learning project. In his post “<a href="http://ai.stanford.edu/~zayd/why-is-machine-learning-hard.html">Why is Machine Learning Hard?</a>”, Zayd Enam pointed out that machine learning is fundamentally a hard debugging problem because there are many possible paths of exploration and unfortunately the feedback loop is generally very slow.</p><blockquote>Debugging for machine learning happens in two cases: 1) <strong>your algorithm doesn’t work</strong>, or 2) <strong>your algorithm doesn’t work <em>well enough</em>.</strong></blockquote><blockquote>What is unique about machine learning is that it is ‘exponentially’ harder to figure out what is wrong […]. There is often a delay in debugging cycles between implementing a fix or upgrade and seeing the result. Very rarely does an algorithm work the first time and so this ends up being where the time is spent.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2pP9xcrdl1iKXHvL2n7iqw.png" /><figcaption><a href="http://ai.stanford.edu/~zayd/why-is-machine-learning-hard.html">Image source</a>: Debugging ML models are often slow and convoluted</figcaption></figure><p>Debugging machine learning is a skill, and far too often we just try the most immediate, convenient, or “obvious” thing even though it might not be the right first thing to try. Of all the resources out there, I particularly appreciate Andrew Ng’s book <a href="http://www.mlyearning.org/">Machine Learning Yearning</a>. This approachable reference is very practical and he talks about things that I wish I had known way earlier!</p><h4>Some Basic Debugging Skills</h4><p>While I highly recommend everyone to read Andrew’s book, for the impatient, I will highlight a few tricks that I personally found to be useful in practice:</p><ul><li><strong>Error Analysis: </strong>Learn from your model’s mistake. Specifically, hand picks 100 examples that your model got wrong from the development set and tally up the reasons why it got wrong. This can help you inspire new directions and prioritize improvement plans.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H0YnmAehpVPMZZ8-IJepoA.png" /><figcaption><a href="http://www.mlyearning.org/">Image Source</a>: For a dog v.s. cat classifier, look at 100 misclassified examples and tally up the reasons</figcaption></figure><p>Error analysis is important because it gives you a very data-informed view of why your model is not performing well. This is something that I used to avoid doing because of its tedious nature, but over time have really come to embrace it as it gives me a lot of insight about the data and my models’ behavior.</p><ul><li><a href="http://scott.fortmann-roe.com/docs/BiasVariance.html"><strong>Understand Bias-Variance</strong></a><strong>: </strong>There are two major sources of error in machine learning: bias and variance. High bias often means that your model is too simple to capture the complexity of the data, and high variance indicates that you have only learned the pattern at hand. To understand bias and variance in your models, the most effective debugging tool here is to plot the <a href="http://scikit-learn.org/stable/auto_examples/model_selection/plot_learning_curve.html">learning curve</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E3fkaAqcZLuuxkwM7JQAmQ.png" /><figcaption><a href="http://www.mlyearning.org/">Image Source</a>: Use the learning curve to understand if you are overfitting or underfitting</figcaption></figure><p>When both your training error and development set error are way higher than the desired performance, you are suffering from a <strong>high bias</strong> problem (under-fitting). In such a case, increasing your model capacity or switching to a more complex algorithm is likely to help you to learn the patterns better.</p><p>On the other hand, when your development set error is way higher than the training error, while the training error is relatively close to the desired performance, you are suffering the <strong>high variance</strong> problem (over-fitting). In such a case, you might want to try a simpler model, or use <a href="https://en.wikipedia.org/wiki/Regularization_(mathematics)">regularization</a>. Alternatively, if the gap between training and development error is closing with more training examples, you might consider adding more training data to your learning task.</p><p><strong>Takeaway: </strong><em>debugging machine learning is hard and the feedback loop is generally slow. Instead of tackling what you think is the next obvious thing, it’s important to be more principled about debugging. Error analysis, learning curve are all good starts, and I strongly encourage you to read Andrew’s </em><a href="http://www.mlyearning.org/"><em>Machine Learning Yearnin</em></a><em>g to improve your debugging skill.</em></p><h3>4. Your Paths to Model Productionization Might Vary</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f0nBNfi-c86Rz9pTYT66nQ.png" /><figcaption><a href="https://pixabay.com/en/industry-lost-places-factory-1801661/">Image source</a>: Model productionization has been talked about a lot, but what exactly does it mean?</figcaption></figure><p>Assuming that you now have a satisfactory model to deploy, it is time to integrate your model into a decision process or product. This is what we refer to as model productionization. But what exactly does it mean? The answer depends on your use cases. Sometimes, the predictions will live outside of products completely and will be used only for strategic or business decisions. Other times, they will be an integrated part of a product experience.</p><h4>Not Everything is Low Latency &amp; Context Sensitive</h4><p>The most useful framework I learned about this topic came from <a href="https://twitter.com/sharathrao?lang=en">Sharath Rao</a>, who currently leads machine learning efforts for consumer products at Instacart. In his <a href="https://www.youtube.com/watch?v=wG5EyHYrJGE&amp;t=854s">DataEngConf</a> talk, Sharath explains that implementation of machine learning models can usually be considered from two<strong> </strong>dimensions:</p><ul><li><strong>Latency: </strong><em>How fast do the predictions need to be served to the end users?</em></li><li><strong>Context Sensitivity: </strong><em>Will we know the features ahead of inference time?</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kukn5JLFNZztpAjJOy2obg.png" /><figcaption><a href="https://www.slideshare.net/SharathRao6/lessons-from-integrating-machine-learning-models-into-data-products/22">Image source</a>: Sharath Rao’s talk, “lessons from integrating ML models into data products”</figcaption></figure><p>In the simplest case (bottom-left), for applications where predictions are mostly used for offline decisions, the model can be productionized simply as a batch scoring job. On the other hand, for models that are an integrated part of a product experience, e.g. search ranking, input features are generally not available until a user interacts with the product, and results often need to be returned really fast. In this case (top-right), online inference or real-time scoring is needed and <a href="https://en.wikipedia.org/wiki/Service-level_agreement">SLA</a> requirements are generally higher. Knowing the profile of your ML model can directly inform your implementation strategy.</p><h4>Revenue Prediction Model, Illustrated in Multiple Use Cases</h4><p>Let’s use the listing LTV model that I introduced earlier as an illustrative example. Suppose we are interested in using this model to prioritize markets to go after next year. Such an application is not consumer-facing, and we are only using the predictions for offline decision making, not in an online product. For this use case, we only need to productionize the model as an offline training, offline scoring, batch job so other data scientists can easily query the predictions from a table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uwwzj9Xct-3T1y-iU9oCcA.png" /><figcaption><a href="https://www.airbnb.com/host/homes">Image source</a>: How should we productionize the ML model for such a product use case?</figcaption></figure><p>However, suppose we are now interested in showcasing the predicted host payouts in a consumer-facing product in order to inform users their financial potentials. One challenge we need to consider is how to surface the predictions within a product.</p><p>In the case where contextual data is not needed, one common strategy is to store the model results as key-value pairs in a key-value store, e.g. in the form of {key: dim_market, value: revenue prediction}. For this use case, the revenue prediction can be easily looked up based on the market in which the listing is located. A more involved product might allow users to specify their location, room size, and capacity so earning potentials can be personalized. In such a use case, we will not know the features until a user enters the information, so predictions need to be computed in real-time. Depending on the use cases, your path to productionization might vary.</p><p><strong>Takeaway: </strong><em>Taking models to production can mean different things depending on the context, use cases, and infrastructure at the company. Having basic familiarity with concepts such as latency and context sensitivity will greatly inform your implementation strategy.</em></p><h3>5. Feedback Loop Can Help You or Hurt You</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pGbHGnBVtzhWH_wqXgDJig.png" /><figcaption><a href="https://pixabay.com/en/rollercoaster-looping-amusement-801833/">Image source</a>: Creating and dealing with feedback loops is yet another important topic</figcaption></figure><p>Models that are an integrated part of a product experience, or what we referred to as data products, often involve feedback loops. When done right, feedback loops can help us to create better experiences. However, feedback loops can also create unintended negative consequences, such as bias or inaccurate model performance measurements.</p><h4>User Feedback Can Make Your Model Better</h4><p>One of the most unexpected skills that I learned about real-life machine learning is the ability to spot opportunities for users to provide model feedback via product interactions. These decisions might seem only relevant to UI/UX at first, but they can actually have a profound impact on the quality of the features that the data product offers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r0FP1iOEHherdYdbWFkicg.png" /><figcaption><a href="https://chatbotnewsdaily.com/10-more-lessons-learned-from-building-real-life-ml-systems-part-i-b309cafc7b5e">Image source</a>: From <a href="https://chatbotnewsdaily.com/@xamat?source=post_header_lockup">Xavier Amatriain</a>’s post “10 more lessons learned from building real-life ML system”</figcaption></figure><p>For example, Netflix <a href="https://www.theatlantic.com/entertainment/archive/2017/03/netflix-believes-in-the-power-of-thumbs/520242/">decided</a> last year to move away from the star-rating system to a thumbs up/down system, reportedly because its simplicity prompts more users to provide feedback, which in terms help Netflix to make their recommendations better. Similarly, Facebook, Twitter, Quora, and other social networks have long designed features such as likes, retweets, and comments which not only make the product more interactive, but also allow these companies to monetize better via personalization.</p><p>Creating feedback opportunities in product, instrumenting and capturing these feedback, and integrating it back into model development is important for both improving user experience as well as optimizing the companies’ business objectives and bottom lines.</p><h4>Feedback Loops Can Also Bias Model Performance</h4><p>While feedback loops can be powerful, they can also have unintended, negative consequences. One important topic is that models that are biased will amplify the bias the feedback loop introduces (see <a href="https://developers.google.com/machine-learning/fairness-overview/">here</a>). Other times, feedback loop can affect our ability to measure model performance accurately.</p><p>This latter phenomenon is best illustrated by Michael Manapat, who explains this bias based on his experience building fraud models at Stripe. In his example, he pointed out that when a live fraud model enforces certain policy (e.g. block a transaction if its fraud score is above certain threshold), the system never gets to observe the ground truth for those blocked transactions, regardless of whether they are fraudulent or not. This blind spot can affect our ability to measure the effectiveness of a model running live in production.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FQWCSxAKR-h0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DQWCSxAKR-h0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FQWCSxAKR-h0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f5fe8b056ddd1cb790ad18921d00ab33/href">https://medium.com/media/f5fe8b056ddd1cb790ad18921d00ab33/href</a></iframe><p>Why? When obvious fraudulent transactions are blocked, the ones that remained with ground truth that we can observe are typically false negative transactions that are harder to get right. When we re-train our models on these “harder” examples, our model performance will necessarily be worse than what it really is performing in production.</p><p>Michael’s solution to this bias is to inject randomness in production traffic to understand the counterfactuals. Specifically, for transactions that are deemed fraudulent, we will let a small percentage of transactions pass, regardless of their scores, so we can observe the ground truth. Using these additional labels, we can then re-adjust the calculation for model performance. This approach is simple but not entirely obvious. In fact, it took me a long while before spotting the same feedback loop in my model, and it is not until I encountered Michael’s talk that I found a solution.</p><p><strong>Takeaway: </strong><em>Feedback loops in machine learning models are subtle. Knowing how to leverage feedback loops can help you to build a better user experience, and being aware of feedback loops can inform you to calculate the performance of your live system more accurately.</em></p><h3>Conclusion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XsxocBbIzoQaqwdehmG3XQ.png" /><figcaption><a href="https://papers.nips.cc/paper/5656-hidden-technical-debt-in-machine-learning-systems.pdf">Source</a>: From the paper “Hidden Technical Debt in Machine Learning System” by D. Sculley et al</figcaption></figure><p>Throughout this post, I gave concrete examples around topics such as problem definition, feature engineering, model debugging, productionization, and dealing with feedback loops. The main underlying theme here is that building a machine learning system involves a lot more nuances than just fitting a model on a laptop. While the materials that I have covered here are only a <a href="https://github.com/robert8138/deep-learning-deliberate-practice#machine-learning-in-general">subset</a> of the topics that one would encounter in practice, I hope that they have been informative in helping you to move beyond “<strong>Laptop Data Science</strong>”.</p><p>Happy Machine Learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16b4dd913a1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Beginner’s Guide to Data Engineering — The Series Finale]]></title>
            <link>https://medium.com/@rchang/a-beginners-guide-to-data-engineering-the-series-finale-2cc92ff14b0?source=rss-c00b242128fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cc92ff14b0</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Robert Chang]]></dc:creator>
            <pubDate>Sun, 24 Jun 2018 22:33:02 GMT</pubDate>
            <atom:updated>2018-06-25T01:10:38.528Z</atom:updated>
            <content:encoded><![CDATA[<h4>From ETL Pipelines To Data Engineering Frameworks</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JsZuJ2aUFgNsZk9cTv_61w.png" /><figcaption><a href="https://divisare.com/projects/172974-inaqui-carnicero-virseda-vila-architects-roland-halbe-new-exhibition-center-in-madrid-s-old-slaughter-house#lg=1&amp;slide=0">Image credit</a>: Well-designed Data Engineering Frameworks Can Open a Lot of Doors and New Possibilities :)</figcaption></figure><h3>At Last, The Finale</h3><p>From <a href="https://medium.com/@rchang/a-beginners-guide-to-data-engineering-part-i-4227c5c457d7"><strong>Part I</strong></a><strong> </strong>of this series, we learned that a robust data foundation is an important prerequisite for pursuing analytics, be it business intelligence, experimentation, or machine learning. From <a href="https://medium.com/@rchang/a-beginners-guide-to-data-engineering-part-ii-47c4e7cbda71"><strong>Part II</strong></a>, we delved deeply into the specifics of Airflow and discussed techniques such as data modeling, star schema, and normalization. Furthermore, we walked through examples of data pipelines and covered ETL best practices. These are all important skills to learn to become an effective data scientist.</p><p>Typically, as companies climb up the <a href="https://hackernoon.com/the-ai-hierarchy-of-needs-18f111fcc007">hierarchy of data analytics</a> and scale beyond a small team, complexity and development costs often increase. At Airbnb, we have more than 100+ contributors who authored Airflow pipelines. This makes enforcing ETL best practices, upholding data quality, and standardizing workflows increasingly challenging. Luckily, one of the antidotes to complexity is the power of <strong>abstraction</strong>. This principle, of course, is no exception when it comes to data engineering.</p><p>In data engineering, abstraction often means identifying and automating <strong>ETL patterns </strong>that are <strong>common in peoples’ workflows</strong>. In this final post, we will define the concept of a data engineering framework. We will dissect typical design patterns for building such frameworks, and finally, highlight a few specific examples we frequently use at Airbnb. By the end of this final post, I hope readers will be able to leverage the power of abstractions to build their own frameworks.</p><h3>A Common Scenario</h3><p>Suppose your company is now big enough to have several teams working on different parts of its product. Each team has its own <a href="https://en.wikipedia.org/wiki/OKR">OKR</a>, product roadmap, and key performance indicators. As the embedded data scientist on the team, you are responsible for creating an analytics dashboard to track how the business is doing. You roll up your sleeves and get to work.</p><p>You start with data modeling and schema design. You identify relevant fact and dimension tables in order to calculate meaningful metrics organized by various useful dimensional cuts. You spend quite some time joining the tables to create a final denormalized table, and finally you backfill all the historical data. While this work is impactful, after working on a few dashboards, you have come to feel that the ETL workflow has become rather repetitive. In fact, many data scientists you talk to at the company are also creating dashboards using a similar workflow for their respective teams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_iE8D0TtXzrb-8S1NMNv_A.png" /><figcaption><a href="https://superset.apache.org/">Source</a>: A Lot of ETL Hard Work Is Required to Power a Simple Dashboard like This (Referenced from Superset)</figcaption></figure><p>Not surprisingly, with product launches comes experiment deep dives — you carefully join an experiment assignment table with a fact table in order to aggregate user-level metrics. You compute test statistics from different treatment arms in order to calculate p-values and confidence intervals for your experiment. After talking to a few other data scientists, you once again realized that this is yet another workflow that is common among data scientists. In fact, it feels like a lot of what data scientists do on a day-to-day basis can be bucketed into a few distinct but common workflows.</p><p><strong>This makes you wonder</strong> — is it possible to automate (at least partially) these workflows? The answer, is, of course, a resounding yes!</p><h3>From Pipelines To Frameworks</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6D46R9q8wc2gwa1K5rvCHQ.png" /><figcaption><a href="https://pixabay.com/en/pipe-valve-industrial-industry-433609/">Image credit</a>: From ETL pipelines to ETL frameworks</figcaption></figure><p>As we have already learned from <a href="https://medium.com/@rchang/a-beginners-guide-to-data-engineering-part-ii-47c4e7cbda71"><strong>Part II</strong></a>, Airflow DAGs can be arbitrarily complex. Sometimes, the data computation even follows a control-flow like logic. For example, if you are interested in branching out the data flow after a specific conditional check, you can apply the <a href="https://airflow.incubator.apache.org/concepts.html#branching">BranchPythonOperator</a>. If you want a workflow to continue only if a condition is met, you can use the <a href="https://github.com/apache/incubator-airflow/blob/master/airflow/example_dags/example_short_circuit_operator.py#L34-L35">ShortCircuitOpeartor</a>. These operators, combined with the principle of <strong>configuration as code </strong>are what makes Airflow ETLs versatile and flexible. However, Airflow can do even more.</p><p>Our discussion so far has been limited to the design of a single, standalone pipeline, but we can apply the same principle to <em>pipeline generation — </em>a way to programmatically and dynamically generate DAGs on the fly. This is essentially what a <strong>data engineering framework</strong> does: it generates different <em>instantiations</em> of Airflow DAGs that automate data workflows. Here is how Maxime, the original author of Airflow, <a href="https://news.ycombinator.com/item?id=13761071">describes</a> it:</p><blockquote>To build workflows dynamically from code ... A very simple example would be an Airflow script that reads a YAML config file with a list of table names, and creates a little workflow for each table, that may do things like loading the table into a target database, perhaps apply rules from the config file around sampling, data retention, anonymization … Now you have this abstraction … you can create new chunks of workflows without doing much work. It turns out there are tons of use cases for this type of approach.</blockquote><p>These tools are important because they enable data scientists to move up the data<em> value chain </em>much more quickly than they otherwise could.</p><ul><li>Imagine that when an <a href="https://medium.com/airbnb-engineering/https-medium-com-jonathan-parks-scaling-erf-23fd17c91166">experiment reporting framework</a> auto-generates user-level metrics and computes statistics for an experiment, data scientists could now devote more time to analyzing changes in key metrics, interpreting user behavior, and highlighting the impact of product changes.</li><li>Similarly, when a metrics framework automatically generates OLAP tables on the fly, data scientists can spend more time understanding trends, identifying gaps, and relaying product changes to business changes.</li><li>Another example is a <a href="https://medium.com/airbnb-engineering/using-machine-learning-to-predict-value-of-homes-on-airbnb-9272d3d4739d">framework</a> that abstracts away the engineering work required for productionizing an offline batch ML model. Data scientists no longer need to worry about package dependencies, setting up a virtual environment, or deployment. They can spend time on modeling instead.</li></ul><p>The implication of these frameworks is profound because they drastically improve how data scientists work. These are precisely technologies that enable data scientists to provide value at scale.</p><h3>Design Patterns For Data Engineering Frameworks</h3><p>As useful as they are, DE frameworks are rarely born out of thin air. I once asked Airbnb’s first data engineer how he was able to create so many useful frameworks for everyone. His response was: “<em>There really is no magic, when you have done certain task enough times, you started to see patterns that can be automated.</em>” When you see your work as workflows, new possibilities arise.</p><p>When thinking about which workflow to automate, the framework designer needs to start by thinking about the end user’s experience. There are generally three layers of a well-designed data engineering framework: the <strong>input </strong>layer, the <strong>data processing </strong>layer, and the <strong>output </strong>layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iDfX-IBcwGu8R0PbiXw-Bg.png" /><figcaption><a href="https://www.youtube.com/watch?v=bCKt-MfMXt8&amp;t=2m">Source</a>: From Max’s meet-up talk titled “Advanced Data Engineering Patterns using Apache Airflow”</figcaption></figure><ul><li><strong>Input:</strong> This is where an end user specifies how their DAGs should be configured. User experience really matters here. Typically, the input could be a static configuration file (e.g. YAML or HOCON), or it could be something as elaborate as a web UI. The goal here is to capture user needs.</li><li><strong>Data Processing:</strong> This is the core of any data engineering framework, where ETL pipelines are instantiated dynamically. The code that achieves this is generally referred to as a <em>DAG factory</em>, which whimsically captures the notion that DAGs are being created one at a time, like in a factory.</li><li><strong>Output: </strong>The DAGs generated from the previous step create derived data, and the output is often saved in a downstream Hive table, presented in a well-designed UI / visualization layer, or simply consumed by downstream pipelines or frameworks.</li></ul><p>This might all sound rather abstract. Therefore, in the next few sections, I will highlight specific examples that we leverage at Airbnb to make this more concrete. When reading the sections below, keep in mind which workflow each framework is trying to automate and pay attention to the input and output layers of the framework.</p><h3>1. Incremental Computation Framework</h3><p>It is quite common for data scientists to calculate computationally intensive metrics like a cumulative sum or the time since the first or last event. For example, we might wish to report the total number of users who ever engaged with a new product or to compute a histogram of days since users have last returned. The naive approach would be to query a fact table and take the <em>sum</em>, <em>max</em>, or <em>min </em>over<em> </em>all date partitions in order to calculate these desired metrics. However, this querying pattern is rather inefficient.</p><p>Why? This solution violates the ETL principle of <em>load data incrementally</em> since the required computation scans the entire fact table. Ideally, we would build a summary table to pre-compute these metrics so an end-user only needs to reference the metric in a single or latest date partition of the summary table. This pattern is so common that our data engineer built a framework called <strong>Incremental Computation Framework</strong>.</p><ul><li><strong>Input: </strong>A HOCON configuration file where a user specifies which metrics or events to pre-compute, which subject key to group by, and which fact table to query from in order to build the summary table.</li><li><strong>Data Processing: </strong>An Airflow script that builds the summary table incrementally: namely, union the summary table from the previous date partition with today’s fact table to update the expensive metrics: cumsum_metric_today = f(cumsum_metric_yesterday, metric_today), where <em>f </em>can be a <em>sum</em>, <em>min/max</em>, or any other aggregation functions.</li><li><strong>Output: </strong>Optimized summary table where cumulative sum, days since first / last event or other expensive metrics can be queried from one and only one single date partition from the summary table.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MrZeunAzDfm2eHsyZXk0EA.png" /><figcaption><a href="https://speakerdeck.com/artwr/using-apache-airflow-as-a-platform-for-data-engineering-frameworks">Reference</a>: An illustration of Incremental Computation Framework</figcaption></figure><p><strong>What workflow does this framework automate?</strong> It helps users to avoid inefficient querying patterns and automates away the tedious aggregation that we otherwise would need to do, one date partition at a time.</p><h3>2. Backfill Framework</h3><p>As we have already discussed in <a href="https://medium.com/@rchang/a-beginners-guide-to-data-engineering-part-ii-47c4e7cbda71"><strong>Part II</strong></a>, backfilling is an important but time-consuming step in any data engineering work. Once an ETL pipeline is built, we need to retrospectively visit earlier data in order to reconstruct history. Some of the backfilling strategies we have discussed include dynamic partitions and baking backfill logic into SQL using <a href="http://jinja.pocoo.org/docs/2.10/">Jinja templates</a>. However, even with these techniques, backfilling can still be tedious. An engineer once told me: “<em>I do not ever want to hear the word backfill again</em>”, which gives you some idea how tedious backfilling can be :)</p><p>For example, if we need to backfill a few years worth of data, it would be much more efficient to break and parallelize such a task into mini-backfills. However, managing these long-running parallel processes can be rather cumbersome. In addition, we often need to perform sanity checks before inserting backfilled data into a production table. Given that backfilling is such a common but far too often unpleasant experience, we built a <strong>Backfill Framework </strong>to automate this workflow:</p><ul><li><strong>Input: </strong>A simple UI where users can specify the job name, the start_date and end_date of the backfill job, how many processes we want to parallelize the backfill for, and how many days each process should backfill for.</li><li><strong>Data Processing</strong>: Once a user specifies how the backfill job would be run, the framework creates a Airflow pipeline that automatically parallelizes the backfill tasks, performs sanity-checks, and swaps staging tables with production tables.</li><li><strong>Output:</strong> A fully backfilled table ready for consumption.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eR0I__mi5VXU5_BkbFyL6g.png" /><figcaption><a href="https://speakerdeck.com/artwr/using-apache-airflow-as-a-platform-for-data-engineering-frameworks">Reference</a>: An illustration of the backfill framework</figcaption></figure><p><strong>What workflow does this framework automate?</strong> It automates away many of the ad-hoc backfilling scripts people have to run on their own machines. It automates quality assurance by setting up automatic comparison. Finally, it swaps the staging table with the production table after QA tests.</p><h3>3. Global Metrics Framework</h3><p>Up until recently, data scientists at Airbnb spent quite a lot of time when it came to building ETLs for analytics and dashboards. As we discussed earlier, a lot of work here is to identify the correct data sources, to define metrics and dimensions, and to create the final denormalized tables. While different teams might have different key performance metrics and, as a result, different fact tables, important dimensions for the business are usually quite consistent and slowly changing.</p><p>For example, data scientists who work on the host-side of the marketplace typically care about dimensional cuts such as the listing’s market, type, or capacity. Similarly, data scientists on the guest-side care about dimensions such as guest stage, origin market, or destination market. With this insight, it became clear that a lot of ETL pipelines actually involved joins of many fact tables with a much smaller set of dimension tables. This is what motivated the creation of <strong>Global Metrics Framework</strong>.</p><ul><li><strong>Input: </strong>A much more involved HOCON configuration file that specifies one or more metrics in an atomic fact table, dimension sets that one wishes to include in the final table, primary keys and foreign keys to be used for joins, and a slew of other useful information to track table creations.</li><li><strong>Data Processing</strong>: The framework identifies the metrics and the dimensional cuts that it needs to aggregate and cut by, joins the dimension tables with the atomic fact tables to create the denormalized tables automatically.</li><li><strong>Output:</strong> One or more Hive tables with the same set of metrics but possibly different sets of dimensions are created. This means that one or more denormalized tables can be created on the fly, and all these data sources are further made available in Druid for visualization in <a href="https://superset.apache.org/">Superset</a>.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FrpgBge-qJnM%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrpgBge-qJnM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FrpgBge-qJnM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ea835fc3e64edd6e727dac4251d878a5/href">https://medium.com/media/ea835fc3e64edd6e727dac4251d878a5/href</a></iframe><p><strong>What workflow does this framework automate?</strong> It automates away the common data engineering work that is required for the creation of denormalized tables that can be later used for dashboards, analytics, and more. The product manager of this project called it the “<em>Denormalization Machine</em>”.</p><h3>4. Experimentation Reporting Framework</h3><p>Many of the data-driven technology companies have built their own internal experimentation platforms, and Airbnb is no exception. Given that I had worked on a similar team at Twitter, I can appreciate how complex ETL in experimentation pipelines can be. They often involve several modular DAGs, each consisting of thousands of tasks.</p><p>Despite its complexity, our experimentation reporting framework actually follows the same design pattern described above. The only difference here is that each layer is far more complex than the layers mentioned in all the examples earlier. However, such an investment is often worthwhile and even necessary, because it enables product teams in the company to run hundreds or thousands of experiments concurrently without needing to hire hundreds or thousands of data scientists.</p><ul><li><strong>Input: </strong>Instead of a simple configuration file or a simple UI, a fully fledged UI is built here so users can specify the type of experiment to run, which target or secondary metrics to track, what are the experiment buckets and their relative sizes, etc. Anything that is relevant for launching and computing the experiment data is captured in this step.</li><li><strong>Data Processing: </strong>The metrics pipeline that computes, for each experiment, the subject-level metrics and their corresponding dimensions. The sheer combinations of these metrics and dimensions are what makes the computation super complex. In fact, it is often the case that experimentation pipelines are the most complex ETL job at a company.</li><li><strong>Output: </strong>Instead of a simple output table, there is a lot of downstream processing involved in this step. For example, statistics such as p-value, confidence interval, significance, and minimum detectable effect are calculated here. Depending on the maturity of the reporting framework, users might be able to do metrics capping or variance reduction. Each step requires a separate calculation before being served in the final UI.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1bJye64wHKTX81-AD2DBEA.png" /><figcaption><a href="https://medium.com/airbnb-engineering/https-medium-com-jonathan-parks-scaling-erf-23fd17c91166">Reference</a>: An illustration of Experimentation Reporting Framework</figcaption></figure><p><strong>What workflow does this framework automate?</strong> The hundreds and thousands of experiment deep dives that data scientists otherwise need to carry out.</p><h3>Conclusion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PP9ZX6IoizG1neT1hcRbEQ.png" /><figcaption><a href="https://pixabay.com/en/tunnel-pipe-tube-underground-20180/">Image credit</a>: We Have Finally Reached the End of the Data Engineering Tunnel :)</figcaption></figure><p>By now, I hope you have come to appreciate the power of abstraction in DE frameworks. These frameworks are incredible multipliers to data scientists’ work and workflow. It was really mind-blowing when I learned about how much of my day-to-day work can be abstracted away. As a strong believer of the <a href="https://hackernoon.com/the-ai-hierarchy-of-needs-18f111fcc007">philosophy</a> that analytics are built upon layers, I see these frameworks as the foundational pieces that need to be in place first. With <a href="https://blog.twitter.com/engineering/en_us/topics/insights/2018/ml-workflows.html">more</a> and more of these frameworks shared and discussed, I am curious what our work will look like in the next few years to come.</p><p><strong>That’s it for the series:</strong> if you have gotten this far, I want to congratulate you for learning the basics of data engineering. More importantly, thank you for reading along. As I mentioned many times, none of these ideas are my own, but I was really fortunate to learn these concepts from some of the best data engineering talents today. Given that data engineering is a very important but often under-appreciated area, I hope I have done a small part in advocating for it! If you are intrigued by this series and want to learn more about data engineering and specifically Airflow, I would recommend starting with this <a href="https://github.com/jghoman/awesome-apache-airflow">list of resources</a>.</p><p>Keep learning, and happy data engineering!</p><p><em>I want to thank once again my friend </em><a href="https://medium.com/@jasonkgoodman"><em>Jason Goodman</em></a><em> for providing feedback for this series. All third party trademarks in this post are the property of their respective owners. Special thanks to </em><a href="https://medium.com/@maximebeauchemin"><em>Max</em></a><em>, Arthur, Aaron, Michael, and Lauren for teaching me (directly or indirectly) all things Data Engineering related.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cc92ff14b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>