<?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[Dangerous Engineering - Medium]]></title>
        <description><![CDATA[Jack Danger on building teams and technology - Medium]]></description>
        <link>https://medium.com/dangerous-engineering?source=rss----31e5c6c2b0d4---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Dangerous Engineering - Medium</title>
            <link>https://medium.com/dangerous-engineering?source=rss----31e5c6c2b0d4---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 13:57:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/dangerous-engineering" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understanding ‘Technical Coherence’]]></title>
            <link>https://medium.com/dangerous-engineering/understanding-technical-coherence-7380adcccaef?source=rss----31e5c6c2b0d4---4</link>
            <guid isPermaLink="false">https://medium.com/p/7380adcccaef</guid>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[engineering-leadership]]></category>
            <category><![CDATA[engineering-management]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[organizational-design]]></category>
            <dc:creator><![CDATA[Jack Danger]]></dc:creator>
            <pubDate>Tue, 23 Apr 2024 04:39:55 GMT</pubDate>
            <atom:updated>2024-04-23T04:39:55.542Z</atom:updated>
            <content:encoded><![CDATA[<p>Some product suites are easy and fun to add features on top of. Others are more of a big ball of mud, a pile of technical debt that fights you as you add any new value.</p><p>The best approach I know to turn the bad systems into good ones is called <a href="https://jackdanger.com/technical-coherence/">Technical Coherence and the full write-up is here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7380adcccaef" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dangerous-engineering/understanding-technical-coherence-7380adcccaef">Understanding ‘Technical Coherence’</a> was originally published in <a href="https://medium.com/dangerous-engineering">Dangerous Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Book launch – Executive Engineering now available]]></title>
            <link>https://medium.com/dangerous-engineering/book-launch-executive-engineering-now-available-35b5ce7dbe4d?source=rss----31e5c6c2b0d4---4</link>
            <guid isPermaLink="false">https://medium.com/p/35b5ce7dbe4d</guid>
            <category><![CDATA[product-leadership]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[engineering-leadership]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[cto]]></category>
            <dc:creator><![CDATA[Jack Danger]]></dc:creator>
            <pubDate>Mon, 08 Apr 2024 19:32:02 GMT</pubDate>
            <atom:updated>2024-04-08T19:31:43.682Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve spent the last two years distilling my decades of startup experience into a book. <a href="https://www.amazon.com/gp/product/B0CZNZDTMV">It’s now available for purchase</a></p><figure><a href="https://www.amazon.com/gp/product/B0CZNZDTMV"><img alt="" src="https://cdn-images-1.medium.com/max/321/0*EkLyPwohjW9kg9NZ.png" /></a><figcaption>Executive Engineering now available on Amazon</figcaption></figure><p><em>A preview of the first chapter is below</em></p><p>Your company might run out of money.</p><p>This is a foundational truth of business and a reason for your CEO’s restless nights. Your job, as CTO, is to help remove your CEO’s worry and to ensure your engineers take the least time to deliver the maximum value.</p><p>Some lucky startups do everything wrong and still have revenue. Trying to copy their internal processes is useful only if we’ve also got their luck. For most of us, at most companies, even doing everything right may end with us closing our doors. Therefore every executive needs to ensure their function of the company costs less than the value it delivers. If we can’t do this, we’re not yet operating at the executive level; we’re just a really senior manager.</p><p>Doing this is hard for executives of any function but it’s super hard for whoever leads Engineering. The work that Engineering does only results in revenue after it passes through many layers of abstraction and ultimately through Sales, Marketing and Customer Support. So even identifying the value that Engineering provides is a herculean task, to say nothing of trying to increase it.</p><p>And yet, that’s the job. To ensure Engineering is delivering for the company and to prove that to some degree. Enough for the CEO and your peer executives to not worry if you’ve got this handled.</p><p>You might be tempted to borrow the habits of large, rich, established companies here. If you have a monopoly on hardware or ad publishing or defense contracts then it’s best to use the practices entrenched at Apple, Google, and Microsoft, respectively. If not, you’ll need to be much more careful about understanding what you’re doing, what you’re not doing, how it connects to the business plan, and how it’s all going at any given time.</p><p><a href="https://www.amazon.com/gp/product/B0CZNZDTMV">Continue reading</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35b5ce7dbe4d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dangerous-engineering/book-launch-executive-engineering-now-available-35b5ce7dbe4d">Book launch – Executive Engineering now available</a> was originally published in <a href="https://medium.com/dangerous-engineering">Dangerous Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You must not measure individual software engineer performance]]></title>
            <link>https://medium.com/dangerous-engineering/you-must-not-measure-individual-software-engineer-performance-3b68cc45cacb?source=rss----31e5c6c2b0d4---4</link>
            <guid isPermaLink="false">https://medium.com/p/3b68cc45cacb</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[performance-management]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Jack Danger]]></dc:creator>
            <pubDate>Fri, 08 Oct 2021 06:13:53 GMT</pubDate>
            <atom:updated>2021-10-08T17:24:09.827Z</atom:updated>
            <content:encoded><![CDATA[<p>It is very difficult to explain the nature of software engineering work to stakeholders who don’t work in engineering. We compensate salespeople, for example, partly with commissions that reflect their individual performance. That’s because someone in sales is able to individually improve some small metric for the company. And anyone working in operations or customer support can be judged at least in part by the number of issues they’ve handled and how satisfied the company is with the outcomes of those issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HWOSdZAeD0Ar2IAg0KInjA.png" /></figure><p>But effective engineering is a collaborative and creative discipline, where the team is the performative unit rather than the individual, and the performance cannot be measured by the team’s actions but rather by the outcomes of the system that the team produces.</p><p>Like any heist film, a software engineering team comprises multiple individuals with relative strengths and weaknesses that complement each other. One engineer might love to make new features while another might be entirely consumed by improving the quality of the team’s existing software. Either one working alone, given enough time, would eventually become entirely useless to the company. Together, as a team, they can produce value while lowering cost indefinitely.</p><p>Attempting to reward or discipline either of these two individuals would throw the team itself off balance. Incentivize new feature addition and the quarter-over-quarter feature development speed will consistently slow. Incentivize improvements and no feature will ever again launch. But what if we reward them, individually, for their specific and different contributions? Yes, we can do that and all we’ll need is to create a metric for the engineer who likes to build features and another metric for the one who fixes existing features. Then measure each engineer by the appropriate metric.</p><p>But what are the units of that measurement? How do you compare 6 clumsy features launched in a month against 1 extremely hard to find bug that took all month to discover and required only a one-line change? What if an engineer did neither of these activities but mentored their colleagues?</p><p>It’s impossible to say one person performs better than another without a shared measurement. And, while the outputs of these two hypothetical (yet all too real) engineers cannot be compared, their daily activities can be. Number of changes to a code base. Number of lines added or removed. Time spent in the office. Number of messages sent to colleagues. Number of bugs noticed by a QA team.</p><p>I know of companies that have, at one point, used all of the above to measure the ‘performance’ of their software developers. And, in each case, the company got a lot of useless (or harmful) activity and enormous employee attrition.</p><p>So, if we can’t compare engineers against each other without incentivizing the wrong behavior, we must accept that their success or failure is inherently collaborative. Like a surgical operating team in a hospital whose success is tied to the patient’s. Or a unit of firefighters who enter a hot building together.</p><p>One would naturally, then, try to measure the performance of the team instead of the individual.</p><p>But software is a unique art: It’s the encoding of human decision-making into machines. The performance that matters isn’t that of the team that builds the software but of the computers themselves.</p><p>Imagine if the surgical operating team in a hospital were a robotic AI. Or the firefighters entering a 4-alarm blaze were fire-retardant autonomous robots. We would reward the engineers who created these tools for the outcomes of the surgeries and the lives saved from the fires. No one would ever care if the engineers worked late or took extra vacation — what matters is the outcomes.</p><p>All software engineering teams produce these same outcomes, and always indirectly. The way the engineers manage their software is much like how a sales executive manages their team. Throughput, latency, and quality can all be measured and charted over time. A sales leader can identify problem areas and intervene when an individual account executive underperforms. Engineers do the same thing but call it ‘debugging’.</p><p>This inherent indirection — that the engineers produce the system that produces value — is what makes software engineering a creative discipline.</p><p>Like a gardener thoughtfully removing a blight, any engineer at any time can increase the value of the company in unexpected ways. Or, like a gardener rewarded only for the sheer number of weeds removed, we can task them with goals that produce huge activity while the company gets outpaced by competitors with more creative teams.</p><p>The solution is to define what, precisely you want from your engineering teams. It’s never sheer activity. And it’s likely not blindly implementing whatever they’re asked to build because that’s how consultancies operate. And a consultancy only makes money because it doesn’t have to deal with the inevitable failure of most of the things they build for poorly-informed clients.</p><p>What you want from your engineering team is to produce the maximum number of market-impactful launches. It’s on your product leadership to effectively measure the market and maximize what that impact is. But it’s up to your engineering leadership to maximize the sheer number of launches that your product function believes could be useful.</p><p>Define those top-level metrics, install competent leaders with an unyielding devotion to coaching and developing their people, and watch as your engineers work together to make something impossibly beautiful.</p><p>Whatever you do, don’t create metric to measure the performance of your individual engineers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b68cc45cacb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dangerous-engineering/you-must-not-measure-individual-software-engineer-performance-3b68cc45cacb">You must not measure individual software engineer performance</a> was originally published in <a href="https://medium.com/dangerous-engineering">Dangerous Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A reference guide for fintech & small-data engineering]]></title>
            <link>https://medium.com/dangerous-engineering/a-reference-guide-for-fintech-small-data-engineering-bd65b9796d90?source=rss----31e5c6c2b0d4---4</link>
            <guid isPermaLink="false">https://medium.com/p/bd65b9796d90</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[product-engineering]]></category>
            <category><![CDATA[monolithic-architecture]]></category>
            <category><![CDATA[security-engineering]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Jack Danger]]></dc:creator>
            <pubDate>Wed, 06 Mar 2019 22:21:51 GMT</pubDate>
            <atom:updated>2019-08-21T20:57:54.627Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I spent 2018 and the beginning of 2019 leading the Infrastructure teams at </em><a href="https://gusto.com/"><em>Gusto</em></a><em>. Before moving on I composed a message to help future Gusto engineers — particularly those who are still in the first half-dozen years of their career and acting as technical leads— understand secure, domain-driven product engineering. This post is an adaptation of that message with some company details elided.</em></p><p>Most software engineering literature assumes you need to process data efficiently. The algorithm-focused, Google-style CS questions that dominate software interviews put particular focus on this — we test candidates on code that works well when data size increases.</p><p>In my time leading engineering teams at Square and Gusto I’ve found that this big-data approach to software engineering is a poor fit for many product companies. Rather, product scalability problems are along a different axis: Sprawling domains and massive schemas implementing those domains. These companies face three very specific, very hard problems:</p><ul><li>Correctly modeling the domain</li><li>Creating clear interfaces between parts of the system</li><li>Finding ways to continually accelerate product development speed</li></ul><h4>Secure, small-data product engineering</h4><p>This problem isn’t unique to Gusto or Square — there’s a huge set of companies that have small amounts of critical data in complex domains. It’s every fintech company, every product company with a heavy operations arm, and any company trying to model an existing regulatory system.</p><p>Here’s a highly inaccurate but illustrative plot of how companies fall on this tradeoff of concerns:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-nyBixxoP188Qz2_zzzdTQ.png" /></figure><p>If we’re building Twitter or Instagram we’ll need to process hexabytes of simple information. If we’re building Flexport or Gusto or even Square¹ we’ll be hard-pressed to even find <em>terabytes</em> of information. The scalability challenges are still very real, they’re just along the axes of domain complexity and security.</p><h4>Welcome to small-data product engineering</h4><p>If you’re at one of these small-data companies you can’t mitigate the core scalability problems by optimizing source code. Your company probably has enough folks working at that low, focused level. They need people to zoom out and address the whole system.</p><h3>The three levels of engineering sophistication</h3><p>There are three levels of sophistication an engineer grows through in their career:</p><ol><li>Working with code</li><li>Working with applications</li><li>Working with systems of applications</li></ol><h4>#1 Working with code</h4><p>When we start our career we work with logic in a single method, function, or class. The skills at this level are extremely basic: Editing source code, expressing basic concepts in the given language, storing basic data, etc. This is where features are made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xchA13vQfBaIw_ox1vQbwA.png" /></figure><h4>#2 Working with applications</h4><p>When we become senior we can work with a whole application at a time. We store lots of relational data and model complex business logic across many files and directories. This is where products are made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L-zDDpNRJON2HOFJjqrUFg.png" /></figure><h4>#3 Working with systems of applications</h4><p>And then we become<em> </em>grizzled veterans working with whole constellations of applications in multiple environments. At this level we perform major migrations, simplify dependencies within the distributed data model, and shepherd the whole multi-application system. This is where companies are made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*bx0K_IkzsQ3dTKr69L8CAQ.png" /><figcaption>source: <a href="https://medium.com/dangerous-engineering/the-four-interfaces-of-saas-product-suites-fb4d516169ed">The Four Interfaces of a SaaS Product Suite</a></figcaption></figure><p>The way we work at each level is quite different. The phrase ‘refactoring’ usually applies to the level of source code and, less commonly, at the level of an application. The phrase ‘tech debt’ is more common for working with an application as we handle major framework upgrades and make the data model more expressive.</p><p>But at the level of systems both ‘refactoring’ and ‘tech debt’ are inappropriate concepts. At this level of the system there are only two activities you should permit yourself to do:</p><ul><li>Bring a system in line with its design</li><li>Design a replacement system</li></ul><p>Anything else is busywork.</p><p>Both of those activities assume that the thing we’re building is designed. For this reason, if you feel like a senior engineer your job is now primarily an engineering designer. You should design and help implement software systems that solve the Product team’s current and future needs. If you imagine your job is just the implementation you’ll miss the design step and the overall system won’t make sense.</p><h3>Levels of PM sophistication</h3><p>Speaking of Product, these same levels of sophistication apply to PMs. Early-career PMs can launch and steward features. This is valuable and helpful, though at this level the PM can introduce tension between product and engineering. Shipping a single feature quickly is just about never the best thing for the long term health of the interconnected product suite.</p><p>Mid-career PMs can launch and steward whole products. This is hugely valuable and here the tension between product and engineering is eased. The PM takes a long-term view of the whole feature-shipping cadence and can work with engineers to make calculated investments to increase shipping speed.</p><p>Late-career PMs can launch and steward entire product suites. At this level the PM takes responsibility for an entire ecosystem of engineering and product. They are natural allies to engineers and will often push for systemic simplifications and increased coherence between parts of the product suite — something that allows engineers to make dramatic simplifications to the underlying system.</p><h3>Growing technology at a product company</h3><p>If your product’s production dataset is smaller than a terabyte then you have no data. None. 100% of your data can fit on two iPhones. The solutions from Google, LinkedIn, and other big companies are useless here. Your peers are Square, Flexport, Gusto, Stripe, Coinbase, and any place with huge amounts of logic but small, critically important pieces of data.</p><p>Your problems give you four focus areas that are more important to you than to the average company:</p><ul><li>Prioritizing domain model correctness over computational efficiency</li><li>Refactoring the data model early and often</li><li>Ensuring data is encrypted by default everywhere except in your product’s memory space</li><li>Separating data by sensitivity (PHI, PII, PCI) to empower your Security team</li></ul><p>And straight-up disregard any blog post from a company that has any of the following:</p><ul><li>Lots of data</li><li>A ridiculous amount of money</li><li>Low security restrictions</li></ul><p>Twitter can lose a tweet. LinkedIn can lose a ‘like’ on a post. Square can’t lose a payment. Gusto can’t lose an IRS filing.</p><p>So your problems are different. Instead of using something that works well when you process trillions of records per minute you need to use tools that are simple to operate and that support encryption powered by role-based access control (i.e. if service A produces data then service B can only decrypt A’s data if it’s allowed to).</p><p>Other small-data, security-conscious companies have solved these problems. But as of yet none of their in-house tools for securely handling data in prod have been open sourced². So you’ll have to just build something very simple and design it carefully.</p><h3>How to select technologies</h3><p>Which brings us to the rule for when to build technology in-house or use something that exists externally:</p><blockquote>“If a problem is unique to your product offering then you may invent an appropriate solution. Otherwise go with an industry standard approach — and only use one approach at a time.”</blockquote><p>Invent software that extends your competitive business advantage. And for everything else just use off-the-shelf tools. Your deployment system should look eerily similar to one of the top ten results for a generic search like “AWS deployment EC2”. Your cloud networking setup should look identical to the AWS official <a href="https://docs.aws.amazon.com/quickstart/latest/compliance-pci/overview.html#figure-2">standardized architecture for PCI compliant systems</a>. Your database tables should use the <a href="http://blog.seriousfox.co.uk/2014/02/03/rails-performance-the-database/">third normal form</a>.</p><h3>Performing Migrations</h3><p>Note that last phrase in the above rule: “–and use only one approach at a time.” You’ll need a way to move from one version to another. This means you and your team need to get good at performing migrations.</p><p>Whether you’re making a tiny change to a database column or overhauling a major system all good migrations have five stages:</p><ol><li>Design the v2 and the path to get there</li><li>Fix v1</li><li>Implement v2</li><li>Carefully migrate from v1 to v2 in atomic, safe steps</li><li>Delete v1</li></ol><p>Most teams forget steps <strong>#2</strong> and <strong>#5</strong>. If v1 is poorly factored you’ll inevitably have to make significant changes to v1 before it’s in a shape to be migrated. Since we need to do that work <em>anyway</em> we might as well stop pretending v2 will rid us of v1. Fix v1 in place before you start building v2.</p><p>And don’t accept any migration that doesn’t have, as its last step, an act like “drop these tables” or “delete this code”. If you can’t actually replace the current thing don’t bother with the migration. Do it right or don’t do it.</p><h3>What teams should ‘own’</h3><p>Some companies allow teams to carve out juicy projects for themselves and prevent other folks from working on them. This kind of technical bureaucracy cuts through engineering morale like a hot knife through butter. Teams shouldn’t claim projects, they should claim problems. And they should accept as much help from any direction when solving those problems.</p><p>Don’t say “We’re going to roll out a new frontend technology” when you can say “We’re going to solve that adding new storage classes in the frontend is hard”. Then you can have an open debate across all interested stakeholders in how that problem should be solved. Once there’s agreement you start work and you gratefully accept commits from everybody.</p><h3>No architecture astronautics</h3><p>As Alyssa Henry (founder of AWS S3, Head of Engineering at Square) sometimes says: “The ideal system in your head is never as good as the working system in front of you.” Beware of <a href="https://www.joelonsoftware.com/2001/04/21/dont-let-architecture-astronauts-scare-you/">architecture astronauts</a>. And be even more wary of becoming one.</p><p>You can identify architecture astronautics when someone (including yourself) starts to believe that there’s a technological solution to poor design.</p><p>If I create a React component that mixes a signup form, account approval, and uploading a user’s avatar all in one Javascript function that’s just poor design. I cannot fix this problem by porting it to a new Javascript framework.</p><p>If I create an HTTP endpoint that performs five separate operations and also calls out to a different service multiple times — that’s poor design. That cannot be solved by introducing new service boundary technology.</p><p>The work of building long-term value is really hard but really simple: Decide what it is you’re actually trying to build and then implement that in the simplest way possible.</p><h3>How to prioritize systemic fixes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/0*HnwMZsl0fkMTPBVp" /><figcaption>© <a href="https://balancedaction.me/2012/10/17/the-jar-of-life-first-things-first/">Philipp Schneider</a></figcaption></figure><p>Imagine putting sand into a jar, then pebbles, then big rocks. The big rocks don’t fit.</p><p>We have to do the big rocks first. When the right solution to a problem takes 10 engineers for a year then put 10 engineers on it for a year and make sure it’s solved well. And if it takes longer let it take longer. Don’t put 3 engineers on it for a quarter. That just adds sand to the jar. Small wins are great and easy to prioritize but at some point you need more in the jar than just sand.</p><h3>Building a product platform for your customers</h3><p>See: <a href="https://medium.com/dangerous-engineering/the-four-interfaces-of-saas-product-suites-fb4d516169ed">The four interfaces of SaaS product suites</a></p><p>If you have any customers then you’ve already solved one of the hardest problems. Now you can create and sell other products to your existing customer base — massively increasing the value of your company and your competitive advantage against competitors.</p><p>Unfortunately, you may have built your entire engineering system to support just your first product.</p><p><a href="https://medium.freecodecamp.org/service-objects-explained-simply-for-ruby-on-rails-5-a8cc42a5441f">Service classes</a> are an encapsulation of logic that separates the ‘what’ of its purpose from the ‘how’ of its implementation. Building a platform that allows you to rapidly compose new products for your existing customers is merely the small matter of creating interfaces that perform valuable product operations. Imagine a hundred single-purpose APIs in your system that allow you to move money, sign up customers, list resources belonging to those customers, etc. all encapsulated such that you can use each one in isolation.</p><p>Creating those APIs will allow product engineers to build products quickly on top of them, while folks working on the underlying platform carefully move data around behind the APIs. The two tracks of work don’t need to be coordinated — the API gives us a decoupling.</p><p>You can move from this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CABbmmrdlsapTe93S_PZxQ.png" /></figure><p>To this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XuCx8P2XbTON6bLT22pF6w.png" /></figure><p>You’ll know you’re on the right track if your product engineering teams spend less time coordinating with whatever teams work on the internal platform. An interface replaces enormous amounts of tightly-coupled planning.</p><h3>How to think about security</h3><p>Now that you’re working at the level of a whole system, let’s address security. No matter what engineering roles you’ve had you’ll do great security engineering work if you keep this one rule in mind:</p><blockquote>Simplicity, correctness, security, scalability, and maintainability are all neighbors. When we’re far from one of them we’re far from all of them.</blockquote><p>Twitter had trouble scaling in the early days. Nick Kallen popularized the idea that you can’t make something scale by adding “<a href="https://www.ultrasaurus.com/2009/04/magic-scaling-sprinkles/">magic scaling sprinkles</a>.” The same is true for correctness, maintainability, and security. You can’t bolt on correctness to a busted system. You can’t just “do security” for a quarter to prevent security breaches.</p><p>Security is, more than anything else, a result of a simple design implemented correctly. Something is either simple and obviously secure, simple and obviously insecure, or it’s too complex to ever make secure. Your security team can only help you after you’ve refactored your system into a thing that’s so obvious any new hire can immediately make sense of it.</p><p>If a company is valuable with small amounts of data then that data is likely very important. That means a data breach is worse for you than for other companies. Leaking sensitive data functionally ends your company . That’s bad, but the damage to your customers is even larger. Your data is people’s home addresses and names and bank accounts and personal preferences. A breach in your system means that data is now in the hands of the highest bidder. If you have git access to a system that might expose sensitive customer data it’s your professional responsibility to fix it. Don’t wait for your manager or CTO or PM to ‘allow’ you to fix it . Just fix it. These are people’s lives.</p><h3>How to prioritize product work versus maintenance</h3><p>There are two investment models for engineering:</p><ol><li>Creating new value</li><li>minimizing the cost of existing value</li></ol><p>Product engineering uses #1, platform/foundation/infrastructure engineering uses #2. If there’s a single leadership team trying to prioritize projects from both groups they will always pick maximizing new value. They’ll do this until the cost of that value is so high that it wipes out the gains.</p><p>The way around this is to determine how fast you’d like to go now versus how fast you’d like to go in the future. And use that model to fund the percentage of people you put on increasing value versus minimizing cost. These need to be separate leadership teams, each focused on just one of those investment models.</p><p>For many companies it works out like this:</p><ul><li>When you’re starting out you want 100% of people maximizing value because there may not be a tomorrow, much less a next year.</li><li>When you’ve reached product market fit it’s important to switch this up and see if you can lose a year of value creation to gain a year of cost reductions — earning yourself a step-function for future growth.</li><li>When you have a shot at becoming ecologically dominant in your industry it’s important to put nearly 100% of people on cost reductions until the competitive moat around you gets massive.</li><li>Then, if you’re ecologically dominant you can add huge new headcount to do value creation.</li></ul><p>This is a slider you can play with at any time to match the risk model of the company. But being unaware of the tradeoffs means you’ll either reduce cost without producing value (see: 90% of infrastructure/tools startups) or increase value until you choke yourself and a leaner competitor comes through and steals all your victories (see: every company that Amazon has annihilated).</p><p>If you’re an engineer on the side of the org that maximizes value then one of your main jobs is deciding when some component is so important that its cost needs to be minimized. Then you have to productionize that component and hand it over to the other side of the org.</p><p>If you’re an engineer on the cost-reduction side you need to consolidate all the technologies and make the whole system hum along with zero maintenance. You also need to help product engineers upgrade their best stuff until it’s in a shape that’s maintainable.</p><h3>How to extract services from a monolith</h3><p>Service extraction is now an entire field of engineering. But the basic rule here is simple: You cannot run from your poor domain modeling. No matter what application you send your poorly-factored code to the pain will only increase.</p><p>The problems with “let’s extract this into a microservice” are (1) there’s no such thing as a microservice and (2) you need to fix the data dependencies first or you’re in for a world of hurt.</p><p>That said, there are some simple patterns to follow that will help you as you extract things from a monolith into new applications (or parts of the monolith that are more separate).</p><h4>Extract verbs, not nouns</h4><p>You cannot extract User to a service. What would that service do? Just give you the data from the users table? Sounds like you’ve just moved a database table super far away from you. Have fun with that.</p><p>But if you extract the concept of, say, <em>approving a user</em> to a service then you’re simplifying things. The monolith used to know all the steps of how a user was approved. Now that you’ve extracted all that logic and the intermediate data to perform the approval, the monolith can just have an approved_at timestamp. If anyone wants more data on the approval they can go to your new UserApprovals service to look up the details.</p><h3>Learn in public and only do high-quality work.</h3><p>I’d like to leave you with one last exhortation. The best engineers I’ve ever worked with (<a href="https://en.wikipedia.org/wiki/Spencer_Kimball_(computer_programmer)">like</a> <a href="https://en.wikipedia.org/wiki/Peter_Mattis">these</a>) have two qualities I’ve observed:</p><ul><li>They never, ever do work that’s less than their best</li><li>They learn in public, never hiding their process or their mistakes.</li></ul><p>I’ve noticed that each engineer I know has roughly a specific speed at which they work. No matter how many hours we clock in our career the speed doesn’t really increase. And when we work at a higher level of quality the speed takes a hit, but only briefly. Then you’re back to full speed but you’re better.</p><p>Multiple times in my career I’ve made the decision to adopt a higher bar for my own work. Each time it slowed me for a bit but then I sped right back up. This, as far as I can tell, is how great software engineers get that way. Their brains aren’t different than yours or mine, they just have higher standards for themselves.</p><p>To that end:</p><ul><li>Put as much effort into naming things as possible. Never cut corners on naming, it’s basically the whole job.</li><li>Always write code comments that are as expressive and clear as possible, including ASCII art drawings if necessary. When you edit any code, update the comments. This is more work but it’s higher value. Do the highest value work.</li><li>Don’t leave TODOs in code unless you’ve tracked a ticket and link to the ticket in the TODO.</li><li>Never fix a bug without fixing the underlying design flaw that allowed it to happen. Even if the real fix takes two weeks, do it. Any place that doesn’t let you fundamentally fix the system that you’re in charge of is a place you don’t want to work.</li><li>Make data migrations as freely as you make code changes. If someone looks at your database they should not be able to guess at what your code <em>used</em> to be.</li><li>Before you merge a PR ask yourself “If I had more time, could I do this better?”. Take the time, do it better. Anyone who’s frustrated by that can be frustrated. They’ll be very, very happy in 9 months when the software works well and you’ve grown a lot.</li></ul><p>Many thanks to my dear friends at Gusto for my time there and for the opportunity to better articulate my approach to technical leadership.</p><p>[1] During the time of the Square IPO all of the data for the dozen-plus products still fit into a single MySQL database under one giant Rails app.</p><p>[2] Please tell me I’m wrong.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd65b9796d90" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dangerous-engineering/a-reference-guide-for-fintech-small-data-engineering-bd65b9796d90">A reference guide for fintech &amp; small-data engineering</a> was originally published in <a href="https://medium.com/dangerous-engineering">Dangerous Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[If you want to debate the Googler’s Manifesto and you’re also a good person]]></title>
            <link>https://medium.com/dangerous-engineering/if-you-want-to-debate-the-googlers-manifesto-and-you-re-also-a-good-person-64d845fbe75e?source=rss----31e5c6c2b0d4---4</link>
            <guid isPermaLink="false">https://medium.com/p/64d845fbe75e</guid>
            <category><![CDATA[google-manifesto]]></category>
            <category><![CDATA[diversity]]></category>
            <category><![CDATA[feminism]]></category>
            <category><![CDATA[free-speech]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <dc:creator><![CDATA[Jack Danger]]></dc:creator>
            <pubDate>Sun, 21 Oct 2018 20:40:51 GMT</pubDate>
            <atom:updated>2017-08-10T19:15:11.075Z</atom:updated>
            <content:encoded><![CDATA[<p>[this is written for people who are dismayed that Google fired the author of the recent diversity manifesto]</p><p>I get it. When I read <a href="https://gizmodo.com/exclusive-heres-the-full-10-page-anti-diversity-screed-1797564320/amp">the following words</a> it felt like I was reading someone who sees things like I do:</p><blockquote>I value diversity and inclusion, am not denying that sexism exists, and don’t endorse using stereotypes. […] If we can’t have an honest discussion about this, then we can never truly solve the problem.</blockquote><p>This sounds sincere and, what’s more, it reminds me of what other guys have told me for years: That they have a slightly different perspective on a current political trend but are afraid that if they attempt to share it they’ll be shamed back into silence and possibly fired.</p><p>The fear is real. Shame, condescension, and mocking are your inheritance when you show up unpopularly in issues of social justice. So instead of talking to the people at work whose hearts are in the right place but don’t know about, say, <a href="https://en.wikipedia.org/wiki/Berkson%27s_paradox">Berkson’s Paradox</a> (a statistical explanation for why minorities may not appear to be the highest performers at work) you just keep your head down. And then somebody writes a piece like the one linked above and it’s like you can breathe again. We’re <em>finally</em> talking about it!</p><h4>Thoughtcrime versus scaring people at work</h4><p>Here’s the problem: If you have a controversial opinion and you express it alone in your home or to trusted friends that’s obviously fine. If you express it in public but in a way where it causes no harm that is fine. But if you have a controversial opinion that, by its very nature, sparks a conversation that causes people harm, then it causes harm to express it.</p><p>That last sentence is a deliberate tautology. It’s up to our communities to decide what to do about the damage, but some discussions are harmful, and those who push for them bear responsibility (regardless of if the majority opinion where it’s taking place supports or opposes the main points).</p><p>“That’s absurd,” you say. “How can a rational discussion cause harm?” Again, I get it. That does sound absurd on its face. And it is absurd as long as you’re seeing it from the position of someone with power. If you lack power, then it becomes clear how mere conversations cause harm.</p><p>Imagine your name is Mike. You’re nine. Two bullies several years older have you on your belly in an alley and one holds a knife. They begin to calmly, rationally have a discussion about whether people named ‘Mike’ are too populous and whether the world even needs you. They, precociously, pull out bar charts of name distributions over time to show that your name is well outside the standard deviation of use. They discuss the Hebrew and Aramaic origins of your name and wonder if you, a WASP kid, really even came by it honestly. The knife twirls.</p><p>Maybe these two bullies have a low heart rate and low levels of cortisol (a stress hormone). They are relaxed. It’s a totally rational discussion! We’re just talking about facts! Why are you panicking, Mike?!</p><p>That’s effectively what we’re doing when we debate, say, whether women are less inclined to computer engineering. There are two separate things happening.</p><p>The man at Google <a href="http://www.businessinsider.com/google-sundar-pichai-anti-diversity-manifesto-fired-2017-8">was fired</a> not because of the discussion but because of the knife-twirling. Twirling that he wasn’t even aware he was doing. I sympathize with those who are baffled and hurt by the firing — I really do. Because not being able to discuss what we think and why we think it is a giant problem. We absolutely need to have good science on what’s really at work here. But carefully. And not at all like this.</p><h4>How is a discussion hurtful?</h4><p>Just right out of the gate <a href="https://en.wikipedia.org/wiki/Stereotype_threat">stereotype threat</a> means having the discussion in public is going to make it harder for any minorities mentioned to summon the energy to do their job. Would you fire somebody if they went from desk to desk distracting hundreds of employees for personal reasons?</p><p>Then the document conjoins discussion of race, gender, political leaning, service oriented architecture, the role of data in decisions, and epistemological closure. All of that should be discussed but each discussion is very different and must be handled separately. To mix them is as if the writer had said “Black people might not like to code because of genetics and lunch should be moved back one hour” and now it’s impossible to discuss appropriate meal scheduling. Because even the fact that we’re accepting the invitation to discussion sends a signal to all readers that we might take the rest of the claims seriously.</p><p>So, no, we can’t talk about the document at all as it’s written. Furthermore, we can’t have men talk publicly about their opinions on gender like this. Is that super frustrating? Yes. But it’s because women face a <a href="http://geekfeminism.wikia.com/wiki/Timeline_of_incidents">very</a> <a href="https://www.theatlantic.com/technology/archive/2016/05/when-will-the-internet-be-safe-for-women/483473/">real</a> <a href="http://abcnews.go.com/Technology/women-battle-online-anti-women-hate-manosphere/story?id=20579038">presence</a> <a href="http://www.techtimes.com/articles/123647/20160112/harrasment-discrimination-and-other-issues-women-in-tech-face-exposed-by-elephant-in-the-valley.htm">of</a> <a href="http://www.newyorker.com/tech/elements/for-alt-right-trolls-star-trek-discovery-is-an-unsafe-space">physical</a> <a href="https://www.buzzfeed.com/courtneystanton/a-woman-walks-into-a-tech-conference?utm_term=.osXQ6doGW#.ju9BdXe3x">violence</a> when they are visible in digital communities. We men face shame and firing if we say the wrong thing. Women face the same plus rape threats, death threats, and all kinds of sustained harassment. So women can’t speak up safely and therefore they would have to watch their male colleagues discuss how a woman’s brain determines her interests. How impossibly maddening that would be.</p><h4>Also racism. Yes, racism. Really. Yes, that racism.</h4><p>And I didn’t realize that the Googler’s manifesto had racial implications until it was pointed out to me. Give me a second to convince you because I think you’ll see what I see. Here’s the argument laid out at the beginning:</p><blockquote>* The lack of discussion fosters the most <strong>extreme</strong> and <strong>authoritarian</strong> elements of this ideology.<br>* <strong>Extreme</strong>: all disparities in representation are due to oppression<br>* <strong>Authoritarian</strong>: we should discriminate to correct for this oppression<br>* Differences in distributions of traits between <strong>men and women</strong> may in part explain why we don’t have 50% representation of women in tech and leadership. <strong>Discrimination to reach equal representation is unfair</strong>, divisive, and bad for business.</blockquote><p>[emphases mine]</p><p>Do you see what happened? This person started to talk about diversity initiatives and how maybe not all disparities in representation are due to oppression. And then focused on gender. But a huge amount of diversity works to bring people who’re members of other minorities into tech.</p><p>I’m going to give the author the benefit of the doubt and say that questioning the need for diversity because of gender essentialism and thereby implying there may also be racial essentialism was inartful, not ill-intended. It was still, however, harmful. It was, unknowingly, knife-twirling. The author doesn’t have to think about how careless words might cause harm because nobody holds a knife over him (well, maybe now he thinks about it). But to publicly ask whether the reason that <a href="https://en.wikipedia.org/wiki/Latinx">Latinxs</a> and African Americans are underrepresented is due to innate bias — and state that we majority-ethnic-group men would like to publicly discuss our opinions on the data — is a discussion that causes needless harm.</p><p>This carelessness makes it impossible to talk frankly about issues of race and gender because folks who feel safe at work don’t realize that what’s an interesting intellectual issue for them is sometimes quite literally life and death for women, people of color and other minorities.</p><p>(While we’re at it, let’s make sure we’re all on the same page about the Google hiring bar: Google doesn’t discriminate when making job offers. They discriminate in getting traditionally-underrepresented people to apply and into the start of the hiring funnel. It’s a way to fix systemic biases in who normally would consider applying to Google. This is an important distinction.)</p><h4>But what if I<em> really </em>want to talk about it?</h4><p><em>How</em> we discuss this is important and can’t be decided unilaterally by a person who doesn’t understand the stakes. Broaching the topics of essential racial and gender preferences is going to cause a bunch of people to be so on their guard that they cannot do their jobs.</p><p>If I’m a cisgender straight white male who works at Google doing software engineering, the discussion I want to have is not possible as I imagine it. What I think is an abstract, rational discussion is so incredibly emotionally charged for others. When people seem to overreact I’ll say “They’re not thinking clearly”. I’ll link to a study showing that men’s brains are larger than women’s. The knife twirls.</p><h4>How we can have this conversation</h4><p>You have insight into how we should be doing diversity. Your unique background gives you that. Everybody has something to contribute. If we want to share our opinions we must first understand that we’re a person standing on a shore attempting to converse with someone drowning. The fact that women and people of color in tech have held down their jobs and educated us about diversity and endured social biases against them <em>all at the same time</em> is amazing. When we initiate discussions on diversity it’s like we’re trying to convince the drowning person that it’s best to wait for the low tide and they’re there, gulping water, carefully rebutting our proposal, hoping for a rope. It’s nothing less than supernatural what some of our bravest and most vulnerable colleagues have endured.</p><p>So can we talk about this stuff? Yes. But we have to talk <em>to</em> the people who’re involved, not just talk <em>about</em> them<em>. </em>The conversation has to start <em>in person</em> and only with people who already know they can trust you. Any of us who want to discuss the capabilities or preferences of minorities must first see the biases at work in our industry and then show that we see what people put up with. That’ll build trust. Then we’ll have a real discussion. It’ll be so good.</p><h4>How we can never have this conversation</h4><p>Publicly, with only majority-culture men participating. We’ll learn nothing and we’ll cause so much damage that we’ll never hear about because people won’t trust us enough to speak up about their pain. They’ll just leave.</p><p>Which is precisely why we have trouble retaining women and other minorities in this field. Not because they can’t do the work, they just don’t want to do it while putting up with the environment we’ve created.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64d845fbe75e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dangerous-engineering/if-you-want-to-debate-the-googlers-manifesto-and-you-re-also-a-good-person-64d845fbe75e">If you want to debate the Googler’s Manifesto and you’re also a good person</a> was originally published in <a href="https://medium.com/dangerous-engineering">Dangerous Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Four Interfaces of SaaS product suites]]></title>
            <link>https://medium.com/dangerous-engineering/the-four-interfaces-of-saas-product-suites-fb4d516169ed?source=rss----31e5c6c2b0d4---4</link>
            <guid isPermaLink="false">https://medium.com/p/fb4d516169ed</guid>
            <category><![CDATA[product-engineering]]></category>
            <category><![CDATA[monolithic]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[saas]]></category>
            <dc:creator><![CDATA[Jack Danger]]></dc:creator>
            <pubDate>Sun, 21 Oct 2018 20:39:33 GMT</pubDate>
            <atom:updated>2020-10-29T18:01:44.522Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Four Interfaces of SaaS products</h3><p>There needs to be a handbook for migrating a monolithic application into a service-oriented SaaS product suite.</p><p>The same things keep going wrong at every company: Moving code without moving the data that code needs, language proliferation, conflating synchronous and asynchronous work, not anticipating the need for backfilling data, etc.</p><p>This post is a guide to help navigate just one of the problems your team will face: Picking the right technologies for your four different interfaces.</p><p>Four? Yeah, four. A SaaS product suite eventually implements four interfaces for four different kinds of clients:</p><ol><li>The one your <strong>customers</strong> use</li><li>The ones your <strong>employees</strong> use to manage customer data</li><li>What you offer to <strong>third-parties</strong> to extend the value of your products</li><li>The <strong>internal</strong> server-to-server connections that power your SoA</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*bx0K_IkzsQ3dTKr69L8CAQ.png" /></figure><p>But that’s not how it starts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*0kMM231RGxATyGIqPy_lhg.png" /></figure><p>When you’re first building your system you probably have a single application. Customers connect directly to this and it’s… well it’s your whole product. This is the code that has access to all of your data so when you need to build an admin view of your system you build it more or less right there where the data is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/309/1*IG1fyZjvkXqiG9jXqQEYHw.png" /></figure><p>This works great for the v1 of your admin interface. You didn’t have to duplicate a bunch of work and you can operate your product.</p><p>When you need a 3rd-party API you might build it on that same application as the other two interfaces or maybe you’ll put it off to the side because you’re starting to decouple your growing monolith.</p><p>By then you’ll have something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*CefwY1sV-8G7DHL4HHqH1g.png" /></figure><p>Which is… well, it’s starting to get complicated. Those circles in the middle represent different applications. Managing all of those is hard. But what’s really going to bite you is that the authentication and authorization logic for at least two very different customer types is coupled with your legacy code in the original application. How do you provide an admin interface to these other applications that are showing up?</p><p>Well, you could add an admin interface to each application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*m8CxxBXC5tqF0XwauxN-qQ.png" /></figure><p>But this means you need to implement that authentication system in multiple places. And, depending on how you’ve built the admin UI, you may even need to ship the admin views in multiple applications.</p><p>Service-oriented architecture is notoriously hard to get right. Not because the technology is difficult to implement (it’s now a <a href="https://www.google.com/url?q=https://thrift.apache.org/&amp;sa=D&amp;ust=1540089046592000">solved</a> <a href="https://www.google.com/url?q=https://grpc.io/&amp;sa=D&amp;ust=1540089046592000">problem</a>). SoA is tricky because when you have many places to put something it’s costly to have anything in the wrong place.</p><p>In a monolith putting some code in ‘./lib’ or ‘./models’ is mostly an aesthetic difference. But if you put some code in, say, the customer lookup service when it actually needs to be in the highly-available report-generating service you might have destabilized the whole system. If you’re moving to multiple services you’re not simplifying your system, you’re making it more complex and hoping it’s worth the tradeoff.</p><p>There is some core functionality in your product. It does something meaningful. If you conflate the different interfaces together you may have to implement that meaningful core functionality up to four times. But if you can clearly separate the authentication you can implement your core product value just once and provide windows to it through your authentication layers.</p><p>Put another way: if you can separate “who is this and which features can they use?” from the feature implementation then you can put all your effort into making the features themselves really good.</p><h3>Four technologies for four interfaces</h3><p>A common mistake when rolling out one of these interfaces is to reuse the technology from one of the others. Just because, say, HTTP + JSON is how you communicate with your customers doesn’t mean it’s the right choice for your internal service-to-service calls. And no matter what the other interfaces use your admin interface pretty much has to be a plain web app because that’s the cheapest thing to maintain.</p><p>Let’s review the needs of the different interfaces to help us pick a good technology for each one.</p><h3>1. The first-party customer interface</h3><p>The first API is the one you already have. No matter what your product does there is a frontend to your system that your customers use. This could be an HTTP-based HTML or JSON frontend. If you offer an email service maybe it’s over SMTP. If you’re Dropbox this is your own proprietary sync protocol. Whatever the transport system, your customers use your product through some kind of front door.</p><p>This API is one you control both sides of. You change server endpoints and client/display behavior in lockstep, creating a coherent user experience.</p><p>If you find your team calling this ‘the api’ you might be in trouble. There are three more to go.</p><p>A good technology for this is anything that your customers can use. This is where you sweat the UX until the customer experience is straight-up joyful.</p><p>The authentication layer for this needs to identify a single user and enforce that any data passing out of the system is data that is specific to that user.</p><p>In terms of actual implementation you have two choices:</p><ul><li>You can have a highly-available frontend that performs the authentication and passes credentials along to your product code</li><li>You can have a highly-available authentication service that each service uses when responding to user requests.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*6l4XHvINpaqBYqg962cL5Q.png" /></figure><p>In either case the authentication for a customer of your product is located in one place and separate from the actual features of your product.</p><h3>2. The Admin Interface</h3><p>Most companies build a half-assed version of this at first to gain any visibility at all into the system. Over time the admin interface becomes generally useful: Engineers diagnose production data problems with it, operations teams build their core workflows into it, and it becomes the primary tool for customer support.</p><p>The authentication layer here is more robust and needs to integrate with your IT system. You need to ensure only people who are currently employed at your company can access this and you need to audit everything anyone does — because through this interface a user can access the data of <em>any</em> user in your system.</p><p>The most scalable, sustainable way to build an admin system like this is a web application separate from the product services by a routing layer. This routing layer both performs authentication and translates HTTP+JSON or whatever the new web hotness is into standard service-to-service calls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*_wx-Ue1_7lh_g_dhSP1gXw.png" /></figure><h3>3. Third-party REST API</h3><p>Most products will, at some point, benefit from offering a third-party API. Your customers get more value from you when they can opt in to extensions of your product.</p><p>This API basically has to be RESTful HTTP. That’s the standard that most other developers understand and it’s the easiest to document. Tools like <a href="https://www.google.com/url?q=https://www.openapis.org/&amp;sa=D&amp;ust=1540089046598000">OpenAPI</a> let you generate clients for it automatically in any language. This interface must have clear versioned releases (with old versions supported indefinitely) because you don’t have control over the clients.</p><p>The implementation will look an awful lot like the admin one but with a different permission model. The routing layer will need to check if the 3rd party making a call is allowed to access a specific user’s data. This requires a complex system of registering 3rd-party applications, generating tokens, allowing users to enable/disable individual apps for their account, and rate-limiting. All of which would really complicate your product if this kind of logic leaked into core features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/344/1*fSwlt2HATtlsVIykLHW33Q.png" /></figure><h3>4. The internal SoA</h3><p>The fourth interface is fully internal — it’s the inter-process communication between server-side systems. You can use any technology for this but some are much friendlier to your engineers than others.</p><h4>RPC: Verbs over Nouns</h4><p>REST is all about nouns and it forces all operations to be reasonably simple. When you don’t know who’s using your API that’s a good fit. But when the other users of your API are your colleagues you need something more sophisticated.</p><p>An RPC (‘remote procedure call’) system allows your team to express their full intent, iterating on the API between services at the same cadence that they iterate on method and class signatures.</p><h4>Structured schema</h4><p>At some point your system becomes too large to run all of the different applications on a laptop. Before you reach that point you’ll benefit from implementing structured, strongly typed APIs between your internal services. You want to be able to automatically generate running mocks of dependent services (maintaining them by hand <em>will</em> fail) and you need to rely on the API type system in your unit tests to catch bugs. Something like <a href="https://www.google.com/url?q=https://thrift.apache.org/&amp;sa=D&amp;ust=1540089046600000">Thrift</a> or <a href="https://www.google.com/url?q=https://developers.google.com/protocol-buffers/&amp;sa=D&amp;ust=1540089046600000">Protocol Buffers</a> or <a href="https://www.google.com/url?q=https://capnproto.org/&amp;sa=D&amp;ust=1540089046600000">Cap’n Proto</a> will give you this natively.</p><h4>Forwards- and backwards-compatible</h4><p>You’ll make gradual changes to this API forever. How do you ensure that deploying one part of your system doesn’t introduce an API incompatibility between the new and the old code? How do you ensure that you can always read data encoded in a version of the API from last year with today’s API?</p><p>Tools (like the 3 mentioned above) ensure you can always read new data even in old clients (and vice versa) from any language.</p><h4>Mutual SSL and Access Control Lists</h4><p>Authentication and authorization for your internal interfaces is very different than the other three. You still need to ask “who is performing this action?” but the ‘who’ here isn’t a person, it’s a service. So you need some way to identify services (authentication) and some way to permit them to do stuff (authorization).</p><p>Here there’s likely an ACL where specific services are allowed to use specific endpoints. Defining permissions at this level of granularity is tedious but it lets you easily verify that low-security parts of your system aren’t gaining access to higher-security parts and it provides the means to generate a dependency graph of your services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*w59ayutUavR_4DBdbIyRfQ.png" /></figure><h3>Focusing on your product</h3><p>When your company is big enough your interfaces become products in themselves. But even while you’re small keeping them isolated at the edges of your system means you can get them right and you can more easily prove that they’re secure.</p><p>It also frees your team up to focus on the actual product work. When the interfaces are defined and separated from the core features then everybody — your customers, your employees, your 3rd-party partners, and other products— benefit from every improvement you make.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb4d516169ed" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dangerous-engineering/the-four-interfaces-of-saas-product-suites-fb4d516169ed">The Four Interfaces of SaaS product suites</a> was originally published in <a href="https://medium.com/dangerous-engineering">Dangerous Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>