<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Standing on the Shoulders of Giants]]></title><description><![CDATA[A weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies.]]></description><link>https://newsletter.ongiants.com</link><image><url>https://substackcdn.com/image/fetch/$s_!xAh9!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0c84ef1-9dfd-42ec-997c-50c015f0e828_1200x1200.png</url><title>Standing on the Shoulders of Giants</title><link>https://newsletter.ongiants.com</link></image><generator>Substack</generator><lastBuildDate>Mon, 20 Apr 2026 23:43:59 GMT</lastBuildDate><atom:link href="https://newsletter.ongiants.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Mathias Griffe]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[sosg@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[sosg@substack.com]]></itunes:email><itunes:name><![CDATA[Mathias Griffe]]></itunes:name></itunes:owner><itunes:author><![CDATA[Mathias Griffe]]></itunes:author><googleplay:owner><![CDATA[sosg@substack.com]]></googleplay:owner><googleplay:email><![CDATA[sosg@substack.com]]></googleplay:email><googleplay:author><![CDATA[Mathias Griffe]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Learning from Giants #71]]></title><description><![CDATA[Stripe's global money tracking data system, Happy GMV as an alternative to NPS, the LSM tree data structure, and a fantastic re-post on how Engineering levels can't be indexed on scope only.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-71</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-71</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Wed, 29 May 2024 09:11:04 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KPkO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae30b1a-ba1e-4d7e-b879-632e88f0efca_1620x823.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hi! This is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p>I got feedback that not everyone reads work-related articles on Saturdays (fair enough). So I&#8217;ll try sending them on Tuesdays for a few weeks!</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also, <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>Ledger: Stripe&#8217;s system for tracking and validating money movement</h2><p>Payments are a complex industry to scale because you're functionally (and legally) required to care about every single penny, regardless of your scale. As they scale to billions of payments daily and hundreds of third parties, the full <strong>explainability</strong> and <strong>reconciliation</strong> of theory with the actual bank accounts can become a significant issue.</p><p>&#128073; That's what the <strong>Data Quality Platform</strong> <strong>and Ledger</strong> team at Stripe set out to solve.</p><blockquote><p>"Stripe supports more than 135 currencies and payment methods through partnerships with local banks and financial networks in 185 countries."</p><p>"Each day, <strong>Ledger sees</strong> <strong>five billion events</strong> and 99.99% of our dollar volume is fully ingested and verified within four days"</p></blockquote><h3>1. The Data Quality (DQ) Platform</h3><p>The data quality platform standardizes and centralizes all money movements at Stripe in a database they call Ledger. The platform then offers observability workflows on top of Ledger.</p><p>The centralization aspect is super important. Dozens of teams work separately to integrate with local banks and payment providers. They each make design decisions to optimize for their providers and end up with different systems. These systems are nearly impossible to track globally.</p><h3>2. Ledger: the underlying database</h3><blockquote><p>"We want to represent all activity on the Stripe platform in a <strong>common data structure</strong> that can be analyzed by a single system."</p><p>"Ledger encodes a state machine representation of producer systems, and models its behavior as a logical fund flow&#8212;the movement of balances (events) between accounts (states)."</p></blockquote><p>So Ledger <strong>tracks</strong> and analyses <strong>each transaction</strong> passing through dozens of distributed systems as if it were part of one unified system. Because it does double-entry bookkeeping with these events and accounts, if money gets repeatedly stuck in a system or state, the balance of that state will immediately grow and trigger alerts.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KPkO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae30b1a-ba1e-4d7e-b879-632e88f0efca_1620x823.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KPkO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae30b1a-ba1e-4d7e-b879-632e88f0efca_1620x823.png 424w, https://substackcdn.com/image/fetch/$s_!KPkO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae30b1a-ba1e-4d7e-b879-632e88f0efca_1620x823.png 848w, https://substackcdn.com/image/fetch/$s_!KPkO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae30b1a-ba1e-4d7e-b879-632e88f0efca_1620x823.png 1272w, https://substackcdn.com/image/fetch/$s_!KPkO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae30b1a-ba1e-4d7e-b879-632e88f0efca_1620x823.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KPkO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae30b1a-ba1e-4d7e-b879-632e88f0efca_1620x823.png" width="1456" height="740" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9ae30b1a-ba1e-4d7e-b879-632e88f0efca_1620x823.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:740,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:355366,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KPkO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae30b1a-ba1e-4d7e-b879-632e88f0efca_1620x823.png 424w, https://substackcdn.com/image/fetch/$s_!KPkO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae30b1a-ba1e-4d7e-b879-632e88f0efca_1620x823.png 848w, https://substackcdn.com/image/fetch/$s_!KPkO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae30b1a-ba1e-4d7e-b879-632e88f0efca_1620x823.png 1272w, https://substackcdn.com/image/fetch/$s_!KPkO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae30b1a-ba1e-4d7e-b879-632e88f0efca_1620x823.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The Ledger tracks each transaction as its own state machine with standardized states. Source: Stripe engineering.</figcaption></figure></div><h3>3. Data quality metrics, alerts, and remediation</h3><blockquote><p>"We analyze these [transaction-level data flows] with a set of trustworthy DQ metrics that measure the health of a fund flow. <strong>Clearing</strong> (did the fund flow complete correctly), <strong>Timeliness</strong> (did the data arrive on time), and <strong>Completeness</strong>."</p><p>"These measurements roll up to create a <strong>unified DQ score</strong> [...] turning a complex distributed analysis problem into a straightforward tabulation exercise"</p></blockquote><p>The team built an entire observability stack on top of Ledger. Because they know who owns what, teams are alerted in real-time of metric drops and can easily see the impact of deployment and bug fixes.</p><blockquote><p>"Combined, we have the ability to measure and analyze data quality, identify root-cause problems, and flexibly interact with the underlying data constructs to manage our problem load over time."</p></blockquote><p>&#128215; <strong>Ilya Ganelin</strong>'s <em>Ledger: Stripe's system for tracking and validating money movements</em> is a fascinating peek at the system, keeping the payment behemoth's systems sane, explainable, and reliable. It shows how much value can be created by solving problems with the right system design and abstractions and how that can scale to solve a global problem thanks to the software's near-infinite scale.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://stripe.com/blog/ledger-stripe-system-for-tracking-and-validating-money-movement&quot;,&quot;text&quot;:&quot;Read the full article on Stripe's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://stripe.com/blog/ledger-stripe-system-for-tracking-and-validating-money-movement"><span>Read the full article on Stripe's blog</span></a></p><div><hr></div><h2>Measuring Happy GMV, and why I&#8217;m over Net Promoter Score.</h2><h3>1. NPS may not be the right north star metric.</h3><blockquote><p>"How NPS is calculated makes it an <strong>easily gamed</strong>, statistically noisy measure of intent, not of behavior."</p></blockquote><p>It also is largely insignificant in early-stage companies because of the smaller sample size.</p><blockquote><p>"What&#8217;s critical for any company to keep in their purview is [..] how much happier a person is when they use your product versus any substitute."</p><p>"If you make your customers happy enough, you become <strong>indispensable</strong>. That&#8217;s the key to achieving net revenue retention (and organic growth). A noisy algorithm based on how likely someone says they are to refer a friend or colleague is not."</p></blockquote><h3>2. Tracking Happy GMV</h3><p><span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Sarah Tavel&quot;,&quot;id&quot;:883898,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a7be31f8-168a-4901-9ed7-5c57211a15ad_421x421.jpeg&quot;,&quot;uuid&quot;:&quot;cca1effb-0dec-4018-9904-aad25be9fc14&quot;}" data-component-name="MentionToDOM"></span> recommends looking at another metric she calls Happy GMV.</p><blockquote><p>"Ask yourself &#8220;<strong>what is my best guess at the buyer and seller experience that will lead to retention?</strong>&#8221; and then measure the percentage of your potential buyers and sellers that get that experience."</p><p>"The GMV that qualifies is your <strong>Happy GMV</strong>."</p></blockquote><p>She gives the example of a ride-sharing marketplace. An initial guess for rider-happy GMV could be the percentage of riders who find a driver quickly and rate them 4 or 5 stars.</p><p>Happy GMV is a leading metric and is much more actionable than NPS! You can use it to make daily operational decisions and prioritization.</p><blockquote><p>"Over time, as your understanding of your customers improves and you start to have statistical significance in your cohorts, you&#8217;ll be able to tune your &#8220;Happy GMV&#8221; thresholds to more accurately reflect the experience that leads to retention and keep you focused on the most important levers."</p></blockquote><p>&#128215; <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Sarah Tavel&quot;,&quot;id&quot;:883898,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a7be31f8-168a-4901-9ed7-5c57211a15ad_421x421.jpeg&quot;,&quot;uuid&quot;:&quot;b02f8649-9ca4-49bb-93ac-4c946ec4cc63&quot;}" data-component-name="MentionToDOM"></span> 's <em>Measuring Happy GMV and Why I&#8217;m Over Net Promoter Score is a super actionable article for most companies and, in particular, marketplaces. Sarah has been a long-time</em> partner at Benchmark, a Tier 1 super opinionated VC fund with deep expertise in marketplaces.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://sarahtavel.medium.com/measuring-happy-gmv-and-why-im-over-net-promoter-score-47a5748611bc&quot;,&quot;text&quot;:&quot;Read the full article on Sarah's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://sarahtavel.medium.com/measuring-happy-gmv-and-why-im-over-net-promoter-score-47a5748611bc"><span>Read the full article on Sarah's blog</span></a></p><div><hr></div><h2>Understanding LSM Trees: What Powers Write-Heavy Databases</h2><p>Cassandra, ScyllaDB, RocksDB, Google BigTable, and many other databases share one thing. They all use the same core data structure to read and write data, albeit with different implementations, because it allows for <strong>write-heavy workloads</strong>.</p><p>That data structure is the <strong>log-structured merge tree</strong> (LSM tree). Here's a super gentle introduction:</p><h3>1. The Write path</h3><blockquote><p>"The write path is optimized by only performing sequential writes"</p></blockquote><p>That's the main point. LSM trees only write large sequential (i.e. sorted by key) blobs of data to disk. Since they're sorted, they're a lot easier to query when looking for a specific key. These blobs are called segments or runs and are part of the <strong>Sorted String Table (SSTable).</strong></p><p>SSTable doesn't work independently because writes do not come as large, pre-sorted blobs of data. They come as individual, unorganized key+value instructions.</p><blockquote><p>"This is solved by using an in-memory tree structure. This is frequently referred to as a <strong>memtable</strong><em>."</em></p><p>"As writes come in, the data is added to this red-black tree. Our writes get stored in this red-black tree until the tree reaches a predefined size."</p></blockquote><p>When the Memtable is large enough, it's written to disk, adding a new segment to our SSTable.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!E301!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde5b29e9-110b-47cc-ab36-31dc0f8db7b3_2066x938.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!E301!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde5b29e9-110b-47cc-ab36-31dc0f8db7b3_2066x938.png 424w, https://substackcdn.com/image/fetch/$s_!E301!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde5b29e9-110b-47cc-ab36-31dc0f8db7b3_2066x938.png 848w, https://substackcdn.com/image/fetch/$s_!E301!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde5b29e9-110b-47cc-ab36-31dc0f8db7b3_2066x938.png 1272w, https://substackcdn.com/image/fetch/$s_!E301!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde5b29e9-110b-47cc-ab36-31dc0f8db7b3_2066x938.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!E301!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde5b29e9-110b-47cc-ab36-31dc0f8db7b3_2066x938.png" width="1456" height="661" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de5b29e9-110b-47cc-ab36-31dc0f8db7b3_2066x938.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:661,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:190230,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!E301!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde5b29e9-110b-47cc-ab36-31dc0f8db7b3_2066x938.png 424w, https://substackcdn.com/image/fetch/$s_!E301!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde5b29e9-110b-47cc-ab36-31dc0f8db7b3_2066x938.png 848w, https://substackcdn.com/image/fetch/$s_!E301!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde5b29e9-110b-47cc-ab36-31dc0f8db7b3_2066x938.png 1272w, https://substackcdn.com/image/fetch/$s_!E301!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde5b29e9-110b-47cc-ab36-31dc0f8db7b3_2066x938.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The memtable tree grows until it&#8217;s written as a new segment to the SSTable. Source: Braden Groom. </figcaption></figure></div><h3>2. The Read path.</h3><p>Finding a specific value in the SSTable requires scanning all segments from the most recent and stopping once the given key is found. In practice, databases use optimizations like indexes to help with scanning.</p><blockquote><p>"What about looking up records that do not exist? We will still end up looping over all segment files and fail to find the key in each segment. This is something that a <a href="https://web.archive.org/web/20220209213609/https://yetanotherdevblog.com/bloom-filters/">bloom filter</a> can help us out with."</p></blockquote><p>The Bloom filter can tell you it's 100% sure that some keys aren't in the dataset, with high compression, at the cost of being wrong in rare instances.</p><h3>3. Optimization</h3><p>You may think the performance must grow terribly with the number of segments. That is correct.</p><blockquote><p>"These segment files need to be cleaned up and maintained in order to prevent the number of segment files from getting out of hand. This is the responsibility of a process called compaction. Compaction continuously combines old segments together into newer segments."</p></blockquote><p>&#128215; <strong>Braden Groom</strong>'s <em>Understanding LSM Trees: What Powers Write-Heavy Databases</em> is the best quick introduction to the data structure you'll find online. It may seem simple in the article, but each concept varies widely in implementation from one database to the other, with some small tricks everywhere to push performance. Although it's a 2020 article, it's not even on the Internet anymore, so thanks to the Internet Archive for keeping it up!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://web.archive.org/web/20220209213609/https://yetanotherdevblog.com/lsm/&quot;,&quot;text&quot;:&quot;Read the full article on Braden's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://web.archive.org/web/20220209213609/https://yetanotherdevblog.com/lsm/"><span>Read the full article on Braden's blog</span></a></p><div><hr></div><h2>Top 0.1% re-post: Engineering Levels: Avoiding the Scope Trap</h2><p>All tech companies end up building an <strong>engineering ladder</strong>. It makes sense for engineers to have a clear path forward. When they do, they often are heavily inspired by the dozens of publicly shared ladders.</p><p>That&#8217;s what Honeycomb did at first, but soon they started seeing gaps and small unsettling details. The biggest one? The importance that they gave to <strong>growing scope</strong> compared to other criteria.</p><blockquote><p>&#8220;A ladder that conflates advancement with scope is a ladder that only rewards engineers who work on the largest projects. This doesn&#8217;t seem fair.&#8221;</p><p>&#8220;More often than not, scope is the enemy. We would rather reward engineers who find clever ways to limit scope by decomposing problems in both time and size.&#8221;</p></blockquote><p>&#128215; <strong>Honeycomb</strong>&#8217;s <em>Engineering Levels: Avoid the Scope Trap</em> is an eye-opening post on how the company defined engineer career growth. It&#8217;s great because <strong>Ben Darfler</strong> explains the problems with their current solution and how they fixed them. It's super actionable and relatable.</p><p>The main result is a two-dimensional ladder, adding ownership to balance the impact of scope.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bMXc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64aa66f-9d8c-4cda-9d7d-5cf9bdebb620_1999x1751.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bMXc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64aa66f-9d8c-4cda-9d7d-5cf9bdebb620_1999x1751.png 424w, https://substackcdn.com/image/fetch/$s_!bMXc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64aa66f-9d8c-4cda-9d7d-5cf9bdebb620_1999x1751.png 848w, https://substackcdn.com/image/fetch/$s_!bMXc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64aa66f-9d8c-4cda-9d7d-5cf9bdebb620_1999x1751.png 1272w, https://substackcdn.com/image/fetch/$s_!bMXc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64aa66f-9d8c-4cda-9d7d-5cf9bdebb620_1999x1751.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bMXc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64aa66f-9d8c-4cda-9d7d-5cf9bdebb620_1999x1751.png" width="640" height="560.4395604395604" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f64aa66f-9d8c-4cda-9d7d-5cf9bdebb620_1999x1751.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1275,&quot;width&quot;:1456,&quot;resizeWidth&quot;:640,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Diagram depicting new growth framework based on scope and ownership&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Diagram depicting new growth framework based on scope and ownership" title="Diagram depicting new growth framework based on scope and ownership" srcset="https://substackcdn.com/image/fetch/$s_!bMXc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64aa66f-9d8c-4cda-9d7d-5cf9bdebb620_1999x1751.png 424w, https://substackcdn.com/image/fetch/$s_!bMXc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64aa66f-9d8c-4cda-9d7d-5cf9bdebb620_1999x1751.png 848w, https://substackcdn.com/image/fetch/$s_!bMXc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64aa66f-9d8c-4cda-9d7d-5cf9bdebb620_1999x1751.png 1272w, https://substackcdn.com/image/fetch/$s_!bMXc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64aa66f-9d8c-4cda-9d7d-5cf9bdebb620_1999x1751.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Honeycomb&#8217;s engineering ladder, visualized. Source: Honeycomb</figcaption></figure></div><blockquote><p>&#8220;<strong>Scope</strong> progresses from focusing on tasks to features to projects, products, and the company as a whole.&#8221;</p><p>&#8220;<strong>Ownership</strong> progresses from focusing on the execution of work to the process of delivering work, to the discovery of solutions to deliver, to the discovery of problems to solve.&#8221;</p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.honeycomb.io/blog/engineering-levels-at-honeycomb/&quot;,&quot;text&quot;:&quot;Read the full article&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.honeycomb.io/blog/engineering-levels-at-honeycomb/"><span>Read the full article</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #70]]></title><description><![CDATA[10x your data viz skills and impact, 22 tips to pass (and grade) a coding interview, a deep dive into Neon DB's storage engine, and a fantastic re-post on Stripe's history and culture.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-70</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-70</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Tue, 09 Apr 2024 08:41:03 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b12613c-f73f-43f1-811d-7ce272d301f5_1600x900.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hi! This is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p>I got feedback that not everyone reads work-related articles on Saturdays (fair enough). So I&#8217;ll try sending them on Tuesdays for a few weeks!</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also, <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>From data to data viz</h2><p>Every chart tells a story, but not all stories are best told by a pie chart.</p><p>Using the <strong>appropriate graph</strong> can turn a vague illustration into a central part of your communication. There are dozens of graphs to pick from, including some complex ones like Chord diagrams, Sankeys, and sunbursts, so how can you make the right choice?</p><p>Use a <strong>decision tree</strong> made by experts!</p><blockquote><p>"Pick the main [data] type using the buttons below. Then let the decision tree guide you toward your graphic possibilities".</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wr7T!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24742448-1c3e-44a7-916b-3e06ed575c4b_3403x3236.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wr7T!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24742448-1c3e-44a7-916b-3e06ed575c4b_3403x3236.png 424w, https://substackcdn.com/image/fetch/$s_!wr7T!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24742448-1c3e-44a7-916b-3e06ed575c4b_3403x3236.png 848w, https://substackcdn.com/image/fetch/$s_!wr7T!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24742448-1c3e-44a7-916b-3e06ed575c4b_3403x3236.png 1272w, https://substackcdn.com/image/fetch/$s_!wr7T!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24742448-1c3e-44a7-916b-3e06ed575c4b_3403x3236.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wr7T!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24742448-1c3e-44a7-916b-3e06ed575c4b_3403x3236.png" width="614" height="584.059065934066" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/24742448-1c3e-44a7-916b-3e06ed575c4b_3403x3236.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1385,&quot;width&quot;:1456,&quot;resizeWidth&quot;:614,&quot;bytes&quot;:1066775,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wr7T!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24742448-1c3e-44a7-916b-3e06ed575c4b_3403x3236.png 424w, https://substackcdn.com/image/fetch/$s_!wr7T!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24742448-1c3e-44a7-916b-3e06ed575c4b_3403x3236.png 848w, https://substackcdn.com/image/fetch/$s_!wr7T!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24742448-1c3e-44a7-916b-3e06ed575c4b_3403x3236.png 1272w, https://substackcdn.com/image/fetch/$s_!wr7T!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24742448-1c3e-44a7-916b-3e06ed575c4b_3403x3236.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The dataviz decision tree. Source: data-to-viz.com</figcaption></figure></div><p>Once you've picked a chart, you still have a few layout and density decisions to make, and here again, you could make mistakes.</p><blockquote><p>"Avoid the rainbow color palette when you map a numeric variable."</p></blockquote><blockquote><p>"Placing individual plots horizontally or vertically is an important choice to make"</p></blockquote><p>Experts can help us here too!</p><p>&#128215; <strong>Yan Holtz</strong>'s <em>From data to Viz</em> is a precious resource to help you improve your data visualization skills with very simple heuristics. Use their graph decision tree and read the gallery of typical caveats to get started now!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.data-to-viz.com/&quot;,&quot;text&quot;:&quot;Read the full guide&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.data-to-viz.com/"><span>Read the full guide</span></a></p><div><hr></div><h2>How to pass a coding interview with Robert Heaton</h2><p>A large part of all coding interviews fail for dumb reasons. You can't claim you're the best engineer there is and take 10 minutes to get your IDE to run code.</p><p>So here are a few <strong>must-haves</strong> for any <strong>coding interview</strong>:</p><blockquote><ol><li><p>"Set up a basic hello-world program beforehand and make sure you can run it."</p></li></ol></blockquote><blockquote><ol start="2"><li><p>"Start by drafting your program using prose of pseudocode. Don't start by writing actual code."</p></li></ol></blockquote><blockquote><ol start="3"><li><p>"Once you've started writing code, run it as frequently as you can."</p></li></ol></blockquote><p>Ideally you should be doing that using unit tests. It's cleaner and safer than running by hand.</p><blockquote><p>"Don't use a testing framework unless you're required to or you're very confident with it."</p></blockquote><ol start="4"><li><p>Keep your code reasonably simple.</p></li></ol><blockquote><p>"<em>Don't abstract too soon</em> is good advice for the real world, but it's particularly important in an interview. The costs of choosing an incorrect abstraction are higher than normal."</p></blockquote><p>And don't try to cover all cases in your first iteration. Leave TODOs for edge cases and clean them up once the base case works.</p><p>Additionally, remember you're there to complete a coding challenge in a given amount of time, so everything you do should be optimized around time efficiency.</p><blockquote><ol start="5"><li><p>"Talk as much as you reasonably can". Use it to surface misunderstandings as early as possible.</p></li></ol></blockquote><blockquote><ol start="6"><li><p>"Consider asking for help." Succeeding after getting some help is often better than failing by staying stuck.</p></li></ol></blockquote><p>&#128215; <strong>Robert Heaton</strong>'s <em>How to pass a coding interview with me</em> is a collection of 22 very sound tips the author has learned by interviewing hundreds of candidates in their careers. If you're interviewing or considering interviewing you should definitely have a read.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://robertheaton.com/interview/&quot;,&quot;text&quot;:&quot;Read the full article on Robert's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://robertheaton.com/interview/"><span>Read the full article on Robert's blog</span></a></p><div><hr></div><h2>Deep dive into Neon&#8217;s storage engine</h2><p><strong>Separation of Compute and Storage</strong> is the hottest thing in databases. Combined with cloud storage services like AWS S3 and serverless technology like Kubernetes, this pattern allows for virtually infinite-sized databases.</p><p>How does this separate storage work in practice?</p><p><a href="https://neon.tech">Neon</a> defines itself as a <em>Serverless Postgres database</em> with separate storage and compute. The compute part is the actual Postgres engine, but the team swapped Postgres' on-disk storage with a remote solution: separate storage servers backed by cloud storage.</p><h4>Storage engine: under the hood</h4><p>Neon's storage engine manages Postgres' storage primitives: <strong>pages</strong> and <strong>write-ahead-log (WAL) entries</strong>.</p><blockquote><p>"In Neon, [the write-ahead-log of changes] is streamed to three safekeeper nodes, which provide durability and synchronous replication using Paxos-like consensus algorithm. The safekeeper nodes then stream the logs to the pageservers, where the logs are processed, reorganized, and written to immutable files. Finally, these files are uploaded to cloud storage for long-term storage."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!B9Eq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b12613c-f73f-43f1-811d-7ce272d301f5_1600x900.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!B9Eq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b12613c-f73f-43f1-811d-7ce272d301f5_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!B9Eq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b12613c-f73f-43f1-811d-7ce272d301f5_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!B9Eq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b12613c-f73f-43f1-811d-7ce272d301f5_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!B9Eq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b12613c-f73f-43f1-811d-7ce272d301f5_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!B9Eq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b12613c-f73f-43f1-811d-7ce272d301f5_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9b12613c-f73f-43f1-811d-7ce272d301f5_1600x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:166539,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!B9Eq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b12613c-f73f-43f1-811d-7ce272d301f5_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!B9Eq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b12613c-f73f-43f1-811d-7ce272d301f5_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!B9Eq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b12613c-f73f-43f1-811d-7ce272d301f5_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!B9Eq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b12613c-f73f-43f1-811d-7ce272d301f5_1600x900.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Neon&#8217;s read and write paths behind the Postgres engine. Source: neon.tech</figcaption></figure></div><h4>Write path</h4><p>All durable data is append-only: no data is ever modified.</p><blockquote><p>"Neon eliminates the distinction between active data and backups, treating all data the same in the storage system. Because old data is not modified, whenever new data is digested into the system, all the history stays accessible up to a configurable limit."</p></blockquote><p>Every update is given a monotonically integer number (the log sequence number, LSN) which acts as a cluster-wide clock.</p><blockquote><p>"When a read request comes in, the pageserver finds the last image of the page by the LSN, and any write-ahead-log (WAL) records on top of it, applies the WAL records if needed to reconstruct the page, and returns the materialized page to the caller."</p></blockquote><p>Every page is thus simply an ordered list of changes. Since all reads specify a sequence number, the storage server replays that change history up to the given number and returns the built page value.</p><p>But that solution slows down as the number of changes grows.</p><p>Neon fixes that by compacting the changes into <em>Image layers</em> which are complete images of the page at a given sequence number. This way, the pageserver only needs to apply the changes after the most recent image.</p><p>&#128215; <strong>Heikki Linnakangas</strong>' <em>Deep dive into Neon storage engine</em> is a simple introduction to storage and compute separation in data stores with a real-world example: Neon. Even though it states the separation simplifies the overall system, the article also shows how it opens the database to a new class of distributed systems challenges.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://neon.tech/blog/get-page-at-lsn&quot;,&quot;text&quot;:&quot;Read the full article on Neon's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://neon.tech/blog/get-page-at-lsn"><span>Read the full article on Neon's blog</span></a></p><div><hr></div><h2>Top 0.1% re-post: Stripe: Thinking Like a Civilization</h2><p>/dev/payments</p><p>That's the initial name of one of our time's biggest and most inspiring private companies. Do you have any idea which one?</p><p>Hint: its founders are siblings and probably two of the most brilliant business people on the planet.</p><blockquote><p>"In Patrick and John Collison, the payments company has a founding pair unusual in their intellect, rarer still in their ego-less vision. From that inspiration, the brothers have manifested an entire culture, characterized by long-term thinking, rapid execution, and the desire to build something meaningful. They've done so while constructing a remarkable business capable of dominating the internet's financial infrastructure even as it empowers millions of other merchants."</p></blockquote><blockquote><p>"All of which is to say that Stripe thinks like a civilization. It is well on its way to becoming one."</p></blockquote><p>&#128215; <strong>The Generalist</strong>'s <em>Stripe: Thinking Like a Civilization</em> may be a slight stretch from what I usually share, but I believe as a product or engineering leader, there are some stories you must know. Moreover, the essay is packed with anecdotes and details about Stripe's culture and how the Collison brothers see the world.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.readthegeneralist.com/briefing/stripe&quot;,&quot;text&quot;:&quot;Read the full article on the Generalist&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.readthegeneralist.com/briefing/stripe"><span>Read the full article on the Generalist</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #69]]></title><description><![CDATA[Examples of great URL design, When and how to build second products, Fly.io's solution to hiding credentials from Rails, and a fantastic re-post: the importance of writing.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-69</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-69</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 23 Mar 2024 10:11:55 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f66124-8ee4-4a79-8c00-f1a7b9d8ccef_1294x622.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hi! This is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also, <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>Examples of great URL design</h2><p><em>URLs don't have to be boring or, worse, opaque data blobs.</em></p><p>Even though browsers tend to hide them more and more, URLs are an essential element of web applications. When done right, they can help your user navigate faster by typing in specific URLs, understand links without clicking, or even participate in your brand's storytelling. Let's look at cool examples:</p><h4>StackOverflow appends an optional, human-readable slug to all their question URLs</h4><p>Example: <a href="https://stackoverflow.com/questions/16245767/creating-a-blob-from-a-base64-string-in-javascript/">stackoverflow.com/questions/16245767/creating-a-blob-from-a-base64-string-in-javascript/</a></p><blockquote><p>"The beauty is <code>:slug</code> is an optional parameter in the URL." It's only added for the human reading it! The computer only uses the preceding ID.</p></blockquote><h4>Slack uses clever URL design to promote their marketing campaign "Slack is ...".</h4><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HEMm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ccd601-626d-4ae3-b2d5-c08d5399ff57_1304x246.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HEMm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ccd601-626d-4ae3-b2d5-c08d5399ff57_1304x246.png 424w, https://substackcdn.com/image/fetch/$s_!HEMm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ccd601-626d-4ae3-b2d5-c08d5399ff57_1304x246.png 848w, https://substackcdn.com/image/fetch/$s_!HEMm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ccd601-626d-4ae3-b2d5-c08d5399ff57_1304x246.png 1272w, https://substackcdn.com/image/fetch/$s_!HEMm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ccd601-626d-4ae3-b2d5-c08d5399ff57_1304x246.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HEMm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ccd601-626d-4ae3-b2d5-c08d5399ff57_1304x246.png" width="1304" height="246" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/38ccd601-626d-4ae3-b2d5-c08d5399ff57_1304x246.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:246,&quot;width&quot;:1304,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:51652,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HEMm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ccd601-626d-4ae3-b2d5-c08d5399ff57_1304x246.png 424w, https://substackcdn.com/image/fetch/$s_!HEMm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ccd601-626d-4ae3-b2d5-c08d5399ff57_1304x246.png 848w, https://substackcdn.com/image/fetch/$s_!HEMm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ccd601-626d-4ae3-b2d5-c08d5399ff57_1304x246.png 1272w, https://substackcdn.com/image/fetch/$s_!HEMm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ccd601-626d-4ae3-b2d5-c08d5399ff57_1304x246.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Slack&#8217;s smart marketing URLs.</figcaption></figure></div><blockquote><p>"I've always found delight in URLs that try to form natural language sentences."</p></blockquote><h4>&#8220;The URL is the Product&#8221; in some technical products.</h4><p>The URL is the Product in technical products like Github and NPM, which can be powerful when it neatly maps domain semantics.</p><p>Example: <a href="http://github.com/django/django/compare/4.2.7...main">github.com/django/django/compare/4.2.7...main</a> compares two refs like it would in git.</p><p>&#128215; <strong>Jim Nielsen</strong>'s <em>Examples of Great URL Design</em> is a great reminder that URLs aren't just technical details. When crafted with care, they can make the user's experience delightful and sometimes even efficient!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jim-nielsen.com/2023/examples-of-great-urls/&quot;,&quot;text&quot;:&quot;Read the full article on Jim's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jim-nielsen.com/2023/examples-of-great-urls/"><span>Read the full article on Jim's blog</span></a></p><div><hr></div><h2>When and How to Build Second Products</h2><p><em>Building a Second Product can be a business-defining moment or a total miss.</em></p><p>Wild successes include Snapchat Stories and Uber Eats.</p><blockquote><p>"Most companies struggle to understand when they need to start investing in adding new product value vs. just continuing to grow off the traction of their initial product/market fit."</p></blockquote><h4>When to build a second product?</h4><blockquote><p>"Companies can rarely ride one product into the IPO sunset anymore. [...] it is becoming necessary earlier and earlier in a company's lifecycle due to a confluence of factors."</p></blockquote><p>There are multiple factors to explain it. Tech products are a lot easier to build nowadays, making every space more crowded and overall competition fiercer.</p><p>To answer the "When" question, you must <strong>analyze your growth and market dynamics</strong>. Can you grow 10x on your current product? Do your market size, retention, and acquisition metrics allow it?</p><p>For companies like Figma, the answer is Yes, and they can ride on a single product for a while. Others, like Canvas, had to keep moving to stay relevant and launch many new products. Adjacent spaces but widely different personas and market dynamics.</p><h4>How to build a second product?</h4><blockquote><p>"The <strong>main vectors</strong> on which product expansion should be evaluated is whether the expansion changes the product, changes the target market, or changes the core competencies required to deliver the product's value."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2Ut-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8c35949-89df-4045-a20a-5aee65496707_1176x673.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2Ut-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8c35949-89df-4045-a20a-5aee65496707_1176x673.png 424w, https://substackcdn.com/image/fetch/$s_!2Ut-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8c35949-89df-4045-a20a-5aee65496707_1176x673.png 848w, https://substackcdn.com/image/fetch/$s_!2Ut-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8c35949-89df-4045-a20a-5aee65496707_1176x673.png 1272w, https://substackcdn.com/image/fetch/$s_!2Ut-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8c35949-89df-4045-a20a-5aee65496707_1176x673.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2Ut-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8c35949-89df-4045-a20a-5aee65496707_1176x673.png" width="1176" height="673" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f8c35949-89df-4045-a20a-5aee65496707_1176x673.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:673,&quot;width&quot;:1176,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:96617,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2Ut-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8c35949-89df-4045-a20a-5aee65496707_1176x673.png 424w, https://substackcdn.com/image/fetch/$s_!2Ut-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8c35949-89df-4045-a20a-5aee65496707_1176x673.png 848w, https://substackcdn.com/image/fetch/$s_!2Ut-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8c35949-89df-4045-a20a-5aee65496707_1176x673.png 1272w, https://substackcdn.com/image/fetch/$s_!2Ut-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8c35949-89df-4045-a20a-5aee65496707_1176x673.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Types of product expansion. Source: Casey Winters.</figcaption></figure></div><p>But what matters is "how" success is defined for this new product and how it impacts the product-building model. And it's not the Product/Market fit!</p><blockquote><p>"New products may only need to influence one of the three (retention, monetization, growth) to be successful. But the key is, <strong>they need to influence it for the overall company</strong>, not just the product itself."</p></blockquote><p>That's why the <em>internal startup</em> or <em>innovation department</em> model rarely creates massively successful second products. They&#8217;re designed in silos and assess projects separately. Instead, <strong>new products must be large bets</strong> into which a company invests significant energy.</p><p>&#128215; <strong>Casey Winters</strong>' <em>When and How to Build Second Products</em> is a must-read for product leaders. It'll force you to reflect on your growth model and think analytically about new products. I did my best to summarize the main takeaways, but that&#8217;s really only 5% of the article. Go read it!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://caseyaccidental.com/second-products/&quot;,&quot;text&quot;:&quot;Read the full article on Casey's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://caseyaccidental.com/second-products/"><span>Read the full article on Casey's blog</span></a></p><div><hr></div><h2>Hiding credentials from Rails at Fly.io</h2><blockquote><p>"At the stage we're at, <strong>all secrets are hazmat.</strong> [...] And Rails itself is the portion of our attack surface we're least confident about."</p></blockquote><p>So the team at Fly.io developed a hardened solution to store and use secrets that never expose anything plaintext to Rails while still using Rails as their main app framework.</p><p>They call it <em>Tokenizer</em>.</p><blockquote><p>"Tokenizer is a <strong>stateless HTTP proxy</strong> that holds the private key of a Curve25519 keypair. When we get a new 3rd party API secret, we encrypt it to Tokenizer's public key."</p></blockquote><p>Tokenizer is written in Go, a strongly typed memory-safe language that makes it much safer than Rails.</p><p>Anytime the Rails app needs to make an HTTP request using these secrets, it does so through Tokenizer. It sends the original request with additional Proxy-Tokenizer headers containing the encrypted secrets and instructions to use them once decrypted.</p><blockquote><p>"Each Proxy-Tokenizer header carries an encrypted secret and instructions for Tokenizer to rewrite the request in some way, usually by injecting the decrypted plaintext into a header."</p></blockquote><p>Of course, these secrets can be locked down to specific hosts to prevent the most basic forms of extraction.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wGQJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f66124-8ee4-4a79-8c00-f1a7b9d8ccef_1294x622.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wGQJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f66124-8ee4-4a79-8c00-f1a7b9d8ccef_1294x622.png 424w, https://substackcdn.com/image/fetch/$s_!wGQJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f66124-8ee4-4a79-8c00-f1a7b9d8ccef_1294x622.png 848w, https://substackcdn.com/image/fetch/$s_!wGQJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f66124-8ee4-4a79-8c00-f1a7b9d8ccef_1294x622.png 1272w, https://substackcdn.com/image/fetch/$s_!wGQJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f66124-8ee4-4a79-8c00-f1a7b9d8ccef_1294x622.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wGQJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f66124-8ee4-4a79-8c00-f1a7b9d8ccef_1294x622.png" width="1294" height="622" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82f66124-8ee4-4a79-8c00-f1a7b9d8ccef_1294x622.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:622,&quot;width&quot;:1294,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:68811,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wGQJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f66124-8ee4-4a79-8c00-f1a7b9d8ccef_1294x622.png 424w, https://substackcdn.com/image/fetch/$s_!wGQJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f66124-8ee4-4a79-8c00-f1a7b9d8ccef_1294x622.png 848w, https://substackcdn.com/image/fetch/$s_!wGQJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f66124-8ee4-4a79-8c00-f1a7b9d8ccef_1294x622.png 1272w, https://substackcdn.com/image/fetch/$s_!wGQJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f66124-8ee4-4a79-8c00-f1a7b9d8ccef_1294x622.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">All calls from Rails go through the Tokenizer. Source: fly.io</figcaption></figure></div><p>And there is more! While Tokenizer handles most forms of Bearer tokens and request signatures, the Fly team created its sister system, <em>SSOkenizer</em>, to secure multi-step OAuth2 flows without exposing any step to Rails.</p><p>&#128215; <strong>Ben Toews</strong>' <em>Tokenized Tokens</em> is an excellent write-up on securing secrets without impacting the developer experience. It's a fantastic system design and, even better, <a href="https://github.com/superfly/tokenizer">it&#8217;s fully open-source</a>!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://fly.io/blog/tokenized-tokens/&quot;,&quot;text&quot;:&quot;Read the full article on Fly's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://fly.io/blog/tokenized-tokens/"><span>Read the full article on Fly's blog</span></a></p><div><hr></div><h2>Top 0.1% re-post: The Importance of Writing</h2><blockquote><p>"Writing is a normalizing medium. No matter what you look like, how old you are, how you speak, or how confident you are, you can sit on your own and formulate your thoughts [...] An impactful message is an impactful message."</p></blockquote><p>Writing helps in many ways, yet it takes effort to learn and improve.</p><blockquote><p>Firstly, the best way to get better at writing is just to write as much as you possibly can."</p></blockquote><p>&#128215; <strong>James Stanier</strong>'s <em>The importance of writing</em> is a post about the impact of writing at work. It will convince you of its usefulness if you're not already, but the article's value is in the actionable advice it contains. If you only have 2 minutes, skip to the five ways to practice being more impactful at work through your writing.</p><p>The one that resonated with me most is <strong>"Think through problems by writing them out."</strong> This practice has worked remarkably well for me over the past years.</p><blockquote><p>"Writing is so powerful. Wield that power for your benefit."</p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.theengineeringmanager.com/growth/the-importance-of-writing/&quot;,&quot;text&quot;:&quot;Read the full article on James' blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.theengineeringmanager.com/growth/the-importance-of-writing/"><span>Read the full article on James' blog</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #68]]></title><description><![CDATA[How Slack takes bigger product bets, Pinterest's wide-column database on RocksDB, Pattern parties to keep codebases consistent, and a fantastic re-post: a survey of API token solutions.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-68</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-68</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 09 Mar 2024 10:11:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!57FO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d564ef-1268-41a0-b00e-ad31de5a681d_1368x668.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hi! This is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also, <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h3>Slack's CPO&#8217;s principles to take Bigger, Bolder Product Bets</h3><p>As start-ups scale, small teams become organizations. With them, product development can almost halt as A/B-tested optimization replaces taking big bets.</p><p>Slack's Chief Product Officer, Noah Weiss, saw this happen at Slack and shares what he learned from trying to make bigger bets possible again.</p><blockquote><p>"Data can help solve easy problems, but it doesn't actually solve the hard problems."</p></blockquote><p>Noah draws his <strong>playbook</strong> from observing what small start-ups do that large organizations cannot and trying to set up processes and principles to offset these differences.</p><h4>1. Share context</h4><blockquote><p>"Does everyone making the decision have the same knowledge and information? Is everyone using the same backdrop to weigh the pros and cons fairly?"</p></blockquote><blockquote><p>"The two fundamental practices to start cracking this code are transparency and repetition."</p></blockquote><p>Transparency makes the right data widely available to everyone, and repetition ensures that context stays at the center of the decision-making process.</p><h4>2. Build trust</h4><blockquote><p>"If there's no trust, it's really hard for there to be conflict. And healthy conflict is necessary to get to any great resolution."</p></blockquote><p>Consistency is what builds trust. Leaders must be consistent in their commitments, feedback, and actions.</p><blockquote><p>"You need to have a culture where you're not putting individual blame when outcomes go wrong. On any individual decision, optimize for the pace of learning and the impact will follow."</p></blockquote><h4>3. Factor in risk</h4><blockquote><p>"A key skill for any seasoned product leader is knowing which choices warrant careful scrutiny and which don't require sweating the small stuff."</p></blockquote><p>Noah recommends using Amazon's famous "one-way/two-way doors" decision-making framework.</p><blockquote><p>"We have this saying at Slack that you should walk confidently through two-way door decisions. [...] The more two-way door decisions product leaders can identify, the faster they can move."</p></blockquote><p>&#128215; <strong>Noah Weiss</strong>' <em>How to take Bigger, Bolder Product Bets</em> is an essential reminder that if leaders don't intentionally set up their organization with operating principles focused on fast and good decision-making, it will ultimately plateau to local optima. Noah also recommends using the 70:20:10 product roadmap rule to manage your organization's global risk portfolio.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://review.firstround.com/how-to-take-bigger%2C-bolder-product-bets-lessons-from-slacks-chief-product-officer#hot-take-2-focus-on-your-own-hand-not-the-whole-card-table%23how-to-operationalize-for-quality-product-decisions-the-startup-leaders-playbook%23be-transparent-and-then-hit-repeat%232-build-trust%233-factor-in-risk%23one-way-vs-two-way-door-decisions%23diversify-your-risk-with-the-702010-product-roadmap-rule%23how-to-operationalize-for-quality-product-decisions-the-startup-leaders-playbook%23hot-take-2-focus-on-your-own-hand-not-the-whole-card-table%23hot-take-1-you-cant-experiment-your-way-out-of-every-product-problem&quot;,&quot;text&quot;:&quot;Read the full article&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://review.firstround.com/how-to-take-bigger%2C-bolder-product-bets-lessons-from-slacks-chief-product-officer#hot-take-2-focus-on-your-own-hand-not-the-whole-card-table%23how-to-operationalize-for-quality-product-decisions-the-startup-leaders-playbook%23be-transparent-and-then-hit-repeat%232-build-trust%233-factor-in-risk%23one-way-vs-two-way-door-decisions%23diversify-your-risk-with-the-702010-product-roadmap-rule%23how-to-operationalize-for-quality-product-decisions-the-startup-leaders-playbook%23hot-take-2-focus-on-your-own-hand-not-the-whole-card-table%23hot-take-1-you-cant-experiment-your-way-out-of-every-product-problem"><span>Read the full article</span></a></p><div><hr></div><h2>Building Pinterest&#8217;s wide column database using RocksDB</h2><blockquote><p>"In the past two years, we have onboarded more than 300 production use cases, and the service handles millions of requests per second, storing petabytes of data."</p></blockquote><p>That's Rockstorewidecolumn, Pinterest's wide-column distributed database built on top of RocksDB.</p><h4>1. What's a wide-column database?</h4><blockquote><p>"While a simple key value database can be viewed as a persistent hash map, a wide column database can be interpreted as a two dimensional key-value store with a flexible columnar structure."</p></blockquote><p>That means the database doesn't have a fixed schema. It has datasets that are collections of rows, each with as many columns with as many values as wanted.</p><h4>2. How is it built?</h4><p>The database relies on a distributed deployment of RocksDB, a key-value store built and maintained by Meta.</p><blockquote><p>"RocksDB is a single node key value store. In order to build a distributed and replicated service using RocksDB, we built a real time replicator library: Rocksplicator."</p></blockquote><p>The wide-column database is implemented on that simple key-value store interface:</p><blockquote><ol><li><p>"Every RocksDB key is a concatenation of row key, column name, and timestamp of the update operation."</p></li><li><p>"The value of the column is the RocksDB value."</p></li><li><p>"While data is sorted in ascending order by default in RocksDB, in our case, we use a custom comparator to sort the keys in descending timestamp order so that the latest versions of a value are accessed first."</p></li></ol></blockquote><p>That's how the database can handle not having a schema: it stores individual values separately, each in a different key and value. And because the key contains the write timestamp, it's "append only", which also enables value versioning and TTL.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!57FO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d564ef-1268-41a0-b00e-ad31de5a681d_1368x668.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!57FO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d564ef-1268-41a0-b00e-ad31de5a681d_1368x668.png 424w, https://substackcdn.com/image/fetch/$s_!57FO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d564ef-1268-41a0-b00e-ad31de5a681d_1368x668.png 848w, https://substackcdn.com/image/fetch/$s_!57FO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d564ef-1268-41a0-b00e-ad31de5a681d_1368x668.png 1272w, https://substackcdn.com/image/fetch/$s_!57FO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d564ef-1268-41a0-b00e-ad31de5a681d_1368x668.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!57FO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d564ef-1268-41a0-b00e-ad31de5a681d_1368x668.png" width="1368" height="668" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/63d564ef-1268-41a0-b00e-ad31de5a681d_1368x668.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:668,&quot;width&quot;:1368,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212846,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!57FO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d564ef-1268-41a0-b00e-ad31de5a681d_1368x668.png 424w, https://substackcdn.com/image/fetch/$s_!57FO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d564ef-1268-41a0-b00e-ad31de5a681d_1368x668.png 848w, https://substackcdn.com/image/fetch/$s_!57FO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d564ef-1268-41a0-b00e-ad31de5a681d_1368x668.png 1272w, https://substackcdn.com/image/fetch/$s_!57FO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d564ef-1268-41a0-b00e-ad31de5a681d_1368x668.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Logical view of a wide column database. Source: Pinterest.</figcaption></figure></div><h4>3. A use case: storing large user sequences</h4><p>Pinterest's core engine saves every content users consume to personalize their feed. That requires storing all user content views and having fast access to them to build feeds in real time.</p><blockquote><p>"The main requirement for the datastore supporting large-scale user sequences at Pinterest was to provide a persistent, append-only log for storing user events."</p></blockquote><p>&#128215; <strong>Rajath Prasad</strong>'s <em>Building Pinterest's new wide column database using RocksDB</em> details how the team built that datastore. Rockstorewidecolumn is another example of how simple distributed key/value stores can be the foundations of all kinds of databases. And if you want to build your own, Rocksplicator is open source.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://medium.com/pinterest-engineering/building-pinterests-new-wide-column-database-using-rocksdb-f5277ee4e3d2&quot;,&quot;text&quot;:&quot;Read the full article&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://medium.com/pinterest-engineering/building-pinterests-new-wide-column-database-using-rocksdb-f5277ee4e3d2"><span>Read the full article</span></a></p><div><hr></div><h2>Keeping the codebase consistent with pattern parties</h2><p>Consistency across a large codebase is the most underrated principle in software. And the upside is significant! With high consistency, teams ship much faster, common patterns are known to everyone, and engineers can debug and troubleshoot the entire codebase.</p><p>But it's also harmful when used to block all innovation or justify bad practices (e.g. <em>it's not my fault; I copied it from an existing file!</em>). And it is only a helpful principle when your codebase is already consistent.</p><p>The largest <strong>risk</strong> is slowly and silently <strong>diverging away</strong> from that consistent state.</p><blockquote><p>"At <a href="http://incident.io">incident.io</a>, we've introduced <strong>Pattern Parties</strong> as a way to keep our codebase consistent, our design pattern documentation up to date, and our engineers on top of the patterns."</p></blockquote><blockquote><p>"For a number of days, the engineering team is dedicated to the Pattern Party [...]. We choose a handful of related patterns that we think would be most impactful to implement across the entire codebase, and as a team we apply them as widely as possible."</p></blockquote><p>Each pattern party focuses on a specific pattern that is first agreed upon and then documented and explained to the team. Then, the entire team takes two days to apply the pattern to the whole codebase.</p><p>Pattern Parties are not just a way to keep the codebase healthy:</p><ul><li><p>They make patterns <strong>explicit</strong> and documented.</p></li><li><p>They <strong>onboard</strong> all engineers onto the patterns by having them apply them at least once.</p></li><li><p>They show everyone how <strong>important</strong> consistency is.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YtwE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb930cff7-03bb-4779-8be3-8264e3ac49ba_3840x2880.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YtwE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb930cff7-03bb-4779-8be3-8264e3ac49ba_3840x2880.png 424w, https://substackcdn.com/image/fetch/$s_!YtwE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb930cff7-03bb-4779-8be3-8264e3ac49ba_3840x2880.png 848w, https://substackcdn.com/image/fetch/$s_!YtwE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb930cff7-03bb-4779-8be3-8264e3ac49ba_3840x2880.png 1272w, https://substackcdn.com/image/fetch/$s_!YtwE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb930cff7-03bb-4779-8be3-8264e3ac49ba_3840x2880.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YtwE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb930cff7-03bb-4779-8be3-8264e3ac49ba_3840x2880.png" width="572" height="429" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b930cff7-03bb-4779-8be3-8264e3ac49ba_3840x2880.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:572,&quot;bytes&quot;:14384512,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YtwE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb930cff7-03bb-4779-8be3-8264e3ac49ba_3840x2880.png 424w, https://substackcdn.com/image/fetch/$s_!YtwE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb930cff7-03bb-4779-8be3-8264e3ac49ba_3840x2880.png 848w, https://substackcdn.com/image/fetch/$s_!YtwE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb930cff7-03bb-4779-8be3-8264e3ac49ba_3840x2880.png 1272w, https://substackcdn.com/image/fetch/$s_!YtwE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb930cff7-03bb-4779-8be3-8264e3ac49ba_3840x2880.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Pattern party progress. Source: Incident.io</figcaption></figure></div><p>&#128215; <strong>Kelsey Mills</strong>' <em>Keeping the codebase consistent with Pattern Parties</em> is another super insightful write-up by the <a href="http://incident.io">incident.io</a> team about their culture and processes. I love how it makes so many implicit things explicit.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://incident.io/blog/keeping-the-codebase-consistent-with-pattern-parties&quot;,&quot;text&quot;:&quot;Read the full article&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://incident.io/blog/keeping-the-codebase-consistent-with-pattern-parties"><span>Read the full article</span></a></p><div><hr></div><h2>Top 0.1% re-post: API tokens: a tedious survey</h2><p>As a software engineer, you probably know what JWTs are. But have you ever asked yourself if they were the right fit for your problem? How much do you know about their alternatives?</p><p>JWTs have become the go-to API token implementation for a lot of companies because:</p><ol><li><p>They're standardized: there's an IETF working group and multiple RFCs</p></li><li><p>BigCos like Google &amp; Apple widely use them.</p></li><li><p>They have an excellent library ecosystem due to 1. and 2.</p></li></ol><p>Yet apart from JWTs, there is a multitude of really good API token schemes:</p><ul><li><p>The <em>unreasonable</em>: username &amp; <strong>password</strong></p></li><li><p>The <em>boring</em> (which doesn't mean bad): random tokens in a <strong>database</strong></p></li><li><p>Somewhat <em>complex</em>: platform tokens, i.e. <strong>encrypted user data</strong></p></li><li><p><em>Hipster</em>: <strong>PASETO</strong> (Platform-Agnostic SEcurity TOkens) &amp; Protobuf Tokens</p></li><li><p><em>Token-less</em>: Cryptographic <strong>signature</strong> of requests with a secret key</p></li><li><p>(Too?) <em>smart</em>: Facebook's CATs, <strong>Macaroons</strong> and Biscuits</p></li></ul><p>&#128215; <strong>Thomas Ptacek</strong>'s <em>API Tokens: A Tedious Survey</em> enumerates all of these token schemes to solve the API token problem: "How can I authenticate and identify users calling a set of API endpoints?". It's a visibly passionate, opinionated, eye-opening article.</p><p>After starting with the usual boring options, Thomas rants against JWTs before writing a detailed introduction to Macaroons and their cousins. He then ends with a scorecard of solutions, rating their safety, hipsterism (yes! :), complexity, flexibility, and scalability.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KYGx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0fe666f-7877-44d9-9ef1-15bbe5893b08_1160x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KYGx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0fe666f-7877-44d9-9ef1-15bbe5893b08_1160x654.png 424w, https://substackcdn.com/image/fetch/$s_!KYGx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0fe666f-7877-44d9-9ef1-15bbe5893b08_1160x654.png 848w, https://substackcdn.com/image/fetch/$s_!KYGx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0fe666f-7877-44d9-9ef1-15bbe5893b08_1160x654.png 1272w, https://substackcdn.com/image/fetch/$s_!KYGx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0fe666f-7877-44d9-9ef1-15bbe5893b08_1160x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KYGx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0fe666f-7877-44d9-9ef1-15bbe5893b08_1160x654.png" width="658" height="370.9758620689655" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b0fe666f-7877-44d9-9ef1-15bbe5893b08_1160x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1160,&quot;resizeWidth&quot;:658,&quot;bytes&quot;:331218,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KYGx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0fe666f-7877-44d9-9ef1-15bbe5893b08_1160x654.png 424w, https://substackcdn.com/image/fetch/$s_!KYGx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0fe666f-7877-44d9-9ef1-15bbe5893b08_1160x654.png 848w, https://substackcdn.com/image/fetch/$s_!KYGx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0fe666f-7877-44d9-9ef1-15bbe5893b08_1160x654.png 1272w, https://substackcdn.com/image/fetch/$s_!KYGx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0fe666f-7877-44d9-9ef1-15bbe5893b08_1160x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">API token scorecards. Source: fly.io blog.</figcaption></figure></div><p>Lots of wisdom in the conclusion too:</p><blockquote><p>"I continue to believe that boring, trustworthy random tokens are underrated and that people burn a lot of complexity chasing statelessness they can't achieve and won&#8217;t need because token databases for most systems outside of Facebook aren&#8217;t hard to scale.</p></blockquote><blockquote><p>"A couple months ago, I&#8217;d have said that Macaroons are underrated in a different way, the way Big Star&#8217;s &#8220;#1 Record&#8221; is. Now I think there's merely underrated like the first Sex Pistols show; everyone who read about them created their own token format. [...] I&#8217;d hesitate to recommend them for a typical CRUD "application."</p></blockquote><blockquote><p>"But, don&#8217;t use JWT."</p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://fly.io/blog/api-tokens-a-tedious-survey/&quot;,&quot;text&quot;:&quot;Read the full article&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://fly.io/blog/api-tokens-a-tedious-survey/"><span>Read the full article</span></a></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #67]]></title><description><![CDATA[Small change-lists make Google fast, AWS S3's incredible emergent properties at scale, an introduction to CRDTs, and a fantastic re-post: the Power of Product Thinking.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-67</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-67</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 24 Feb 2024 10:11:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73683520-c487-4ff1-b1d2-7f40c72badf4_1340x595.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hi! This is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also, <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>Small Change-Lists make Google fast</h2><p><em>Google engineers' secret trick to ship 100x faster than the industry average.</em></p><p>Small change lists, really small ones, make a massive difference on a team's <strong>velocity</strong>. They're quicker, easier to visualize, better reviewed, and ultimately contain fewer bugs.</p><p>Why does everyone know about this rule, but most don't follow it?</p><h3>They don't truly know what is "small"</h3><blockquote><p>"The right size for a CL is <strong>one self-contained change.</strong> [...] The CL makes a minimal change that addresses just one thing."</p></blockquote><blockquote><p>"There are no hard and fast rules about how large is "too large." <strong>100 lines</strong> is usually a reasonable size for a CL, and 1000 lines is usually too large, but it's up to the judgment of your reviewer."</p></blockquote><p>Yes, Google recommends 100-line changes. If you're experienced, you know that's truly small. Still, that limited size shouldn't make the changes harder to understand or split away tests.</p><h3>The team isn't prioritizing reviews enough, and small CLs pile up</h3><blockquote><p>"You want to find some way to work that won't block you while you're waiting for review. This could involve having multiple projects to work on simultaneously, finding reviewers who agree to be immediately available, doing in-person reviews, pair programming, or splitting your CLs in a way that allows you to continue working immediately."</p></blockquote><p>High-velocity teams usually use all the above: efficient tooling to stack CLs, strict review SLAs, and a lot of sync review and work.</p><h3>They don't know how to split</h3><blockquote><p>"It's often useful to think about how to split and organize those CLs at a high level before diving into coding."</p></blockquote><p>There are many ways to split work: by file, feature, or layer. Sometimes, it's harder to do, but there are some general rules you must always follow:</p><ul><li><p>Separate refactorings. They're the hardest to review, so they should never be mixed up with new functionality.</p></li><li><p>CLs should include related test code.</p></li><li><p>Keep the CI green for every chunk.</p></li></ul><p>&#128215; <strong>Google</strong>'s <em>Small CLs</em> article is part of the company's published Code Review guidelines. It's small, super actionable, and probably the most impactful practice one can have on a team's velocity.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://google.github.io/eng-practices/review/developer/small-cls.html&quot;,&quot;text&quot;:&quot;Read the full guide&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://google.github.io/eng-practices/review/developer/small-cls.html"><span>Read the full guide</span></a></p><div><hr></div><h2>Building and operating a pretty big storage system called S3</h2><p>AWS's S3 is a lot more than disk storage as a service. Its massive scale leads to <strong>emergent properties</strong> that no disk can match.</p><p>Andrew Warfield worked on S3 for many years &#8211; in a recent presentation, he explains how he understands and reasons about the system:</p><blockquote><p>"S3 is an object storage service with an HTTP REST API. There is a frontend fleet with a REST API, a namespace service, a storage fleet that's full of hard disks, and a fleet that does background operations."</p></blockquote><p>The main feat of S3 is managing a very spiky workload on cheap hard drives, all while enabling extreme I/O performance. The 20TB hard drives are incredibly cheap storage, but their I/O performance doesn't scale with size.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vcTd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73683520-c487-4ff1-b1d2-7f40c72badf4_1340x595.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vcTd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73683520-c487-4ff1-b1d2-7f40c72badf4_1340x595.png 424w, https://substackcdn.com/image/fetch/$s_!vcTd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73683520-c487-4ff1-b1d2-7f40c72badf4_1340x595.png 848w, https://substackcdn.com/image/fetch/$s_!vcTd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73683520-c487-4ff1-b1d2-7f40c72badf4_1340x595.png 1272w, https://substackcdn.com/image/fetch/$s_!vcTd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73683520-c487-4ff1-b1d2-7f40c72badf4_1340x595.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vcTd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73683520-c487-4ff1-b1d2-7f40c72badf4_1340x595.png" width="1340" height="595" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/73683520-c487-4ff1-b1d2-7f40c72badf4_1340x595.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:595,&quot;width&quot;:1340,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:135546,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vcTd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73683520-c487-4ff1-b1d2-7f40c72badf4_1340x595.png 424w, https://substackcdn.com/image/fetch/$s_!vcTd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73683520-c487-4ff1-b1d2-7f40c72badf4_1340x595.png 848w, https://substackcdn.com/image/fetch/$s_!vcTd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73683520-c487-4ff1-b1d2-7f40c72badf4_1340x595.png 1272w, https://substackcdn.com/image/fetch/$s_!vcTd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73683520-c487-4ff1-b1d2-7f40c72badf4_1340x595.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">How S3 can manage spikes compared to HDDs.</figcaption></figure></div><blockquote><p>"This tension between HDDs growing in capacity but staying flat for performance is a central influence in S3's design. We need to scale the number of bytes we store by moving to the largest drives we can as aggressively as we can."</p></blockquote><p>That's solved by splitting data into chunks and replicating it across hundreds of drives, which enables the distribution of load so widely that spiky workloads are averaged out in the massive number of requests.</p><blockquote><p>"As I really started to understand the system I realized that it was the scale of customers and workloads using the system in aggregate that really allow it to be built differently, and building at this scale means that any one of those individual workloads is able to burst to a level of performance that just wouldn't be practical to build if they were building without this scale."</p></blockquote><p>&#128215; <strong>Andy Warfield</strong>'s <em>Building and operating a pretty big storage system called S3</em> is a fascinating read about the unique scale of S3. While Andy makes it look simple, the data distribution is probably only one half of the problem, the write path. I imagine choosing which disk to read from and orchestrating these reads is at least as interesting!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.allthingsdistributed.com/2023/07/building-and-operating-a-pretty-big-storage-system.html&quot;,&quot;text&quot;:&quot;Read the full article on W. Vogels' blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.allthingsdistributed.com/2023/07/building-and-operating-a-pretty-big-storage-system.html"><span>Read the full article on W. Vogels' blog</span></a></p><div><hr></div><h2>An interactive guide to CRDTs</h2><p><em>Every app has real-time collaboration now. Build yours with CRDTs!</em></p><p>And while you'll likely use an off-the-shelf solution (sponsors are welcome &#128521;), a little theory never hurts!</p><blockquote><p>"CRDT stands for <strong>Conflict-free Replicated Data Type</strong>."</p></blockquote><blockquote><p>It's a kind of data structure that can be stored on different computers (peers). Peers may have different states at different points in time, but are guaranteed to eventually converge on a single agreed-upon state."</p></blockquote><p>There's your real-time collaboration feature. Let's get a little more specific: there are two approaches to CRDTs: <strong>state</strong>-based or <strong>operation</strong>-based.</p><blockquote><p>"State-based CRDTs transmit their full state between peers, and a new state is obtained by merging all the states together. Operation-based CRDTs transmit only the actions that users take, which can be used to calculate a new state."</p></blockquote><p>As often happens in software, the best-looking solution is a lot more complex to get right. So, let's study the simplest first: state-based replication.</p><p>The theory behind state-based CRDTs is indeed simple. The peers exchange states to agree on a common one and rely on a <em>merge</em> function to <strong>apply others' changes to their local state</strong>. The CRDT works if this merge function satisfies the following mathematical properties: commutativity, associativity, and idempotency.</p><p>The magic is that because these properties are composable, you can build complex CRDTs by combining the simplest valid CRDT constructs.</p><p>One of these simple constructs is the <strong>Last Write Wins</strong> (LWW) register.</p><blockquote><p>"Last Write Wins Registers, as the name suggests, simply overwrite their current value with the last value written. They determine which write occurred last using timestamps, represented here by integers that increment whenever the value is updated."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!a74F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbea5ea-6f0e-4fe0-b524-00f6991711d2_1515x741.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!a74F!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbea5ea-6f0e-4fe0-b524-00f6991711d2_1515x741.png 424w, https://substackcdn.com/image/fetch/$s_!a74F!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbea5ea-6f0e-4fe0-b524-00f6991711d2_1515x741.png 848w, https://substackcdn.com/image/fetch/$s_!a74F!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbea5ea-6f0e-4fe0-b524-00f6991711d2_1515x741.png 1272w, https://substackcdn.com/image/fetch/$s_!a74F!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbea5ea-6f0e-4fe0-b524-00f6991711d2_1515x741.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!a74F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbea5ea-6f0e-4fe0-b524-00f6991711d2_1515x741.png" width="1456" height="712" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4dbea5ea-6f0e-4fe0-b524-00f6991711d2_1515x741.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:712,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:82837,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!a74F!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbea5ea-6f0e-4fe0-b524-00f6991711d2_1515x741.png 424w, https://substackcdn.com/image/fetch/$s_!a74F!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbea5ea-6f0e-4fe0-b524-00f6991711d2_1515x741.png 848w, https://substackcdn.com/image/fetch/$s_!a74F!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbea5ea-6f0e-4fe0-b524-00f6991711d2_1515x741.png 1272w, https://substackcdn.com/image/fetch/$s_!a74F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbea5ea-6f0e-4fe0-b524-00f6991711d2_1515x741.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The article has these small widgets to demo CRDTs in varying network conditions.</figcaption></figure></div><p>&#128215; <strong>Jake Lazaroff</strong>'s <em>An interactive guide to CRDTs</em> then builds an LWW register using Typescript, and combines multiple ones into an LWW Map. All of this is illustrated with brilliant interactive examples. The smoothest introduction to CRDTs!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jakelazaroff.com/words/an-interactive-intro-to-crdts/&quot;,&quot;text&quot;:&quot;Read the full interactive guide&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jakelazaroff.com/words/an-interactive-intro-to-crdts/"><span>Read the full interactive guide</span></a></p><div><hr></div><h2>Top 0.1% re-post: The power of Product Thinking</h2><p>If you're building a product, your job is to make hypotheses and guesses. Iterate and experiment, right?</p><p>Yet each of these iterations has a cost, so how do you avoid betting on guesswork?</p><p>&#128161; <strong>Product thinking.</strong></p><blockquote><p>"Product thinking is the skill of knowing what makes a product useful &#8212; and loved &#8212; by people. [...] Product thinking is a habit, an eye, a mindset."</p></blockquote><p>In a fast-changing environment, product thinking can make the difference between 0 and 1. And lucky us, it can be developed!</p><blockquote><p>"The two most important habits are observation and inquiry."</p></blockquote><blockquote><p>"<strong>Observation</strong> is about paying attention to people's reactions when they encounter products or services in their day-to-day lives."</p></blockquote><blockquote><p>"<strong>Inquiry</strong> comes from genuine curiosity about people and their behaviors, and can take different forms depending on how you learn best. The key is understanding the "why" behind the reactions."</p></blockquote><p>&#128215; <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Julie Zhuo&quot;,&quot;id&quot;:4039637,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/0b568695-42f5-4f5b-a0dc-77870d89e6df_2629x2520.png&quot;,&quot;uuid&quot;:&quot;26c17df7-328a-4692-a864-358beb90f1c0&quot;}" data-component-name="MentionToDOM"></span> 's <em>The Power of Product Thinking</em> is a reference article. After explaining that product thinking will make you and your products stand out, the author describes how to develop it with simple habits. With practice and curiosity, observation and inquiry become a defining mindset.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://future.com/product-thinking/&quot;,&quot;text&quot;:&quot;Read the full article&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://future.com/product-thinking/"><span>Read the full article</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #66]]></title><description><![CDATA[How Meta gives trusted time in their datacenters, why structure and systems are the essence of design work, ClickHouse's six join algorithms, and a fantastic re-post: Spotify's Golden Paths.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-66</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-66</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sun, 11 Feb 2024 17:26:09 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4eeb815d-73a6-4e7c-81d2-11655d9be61d_1920x1353.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hi! This is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also, <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>How Precision Time Protocol is being deployed at Meta</h2><p><em>How Meta spent millions to get time accuracy in its data centers from microseconds to nanoseconds.</em></p><p><strong>Synchronization</strong> is the main problem of distributed systems, but what makes it the toughest is that you can't <em>just use time</em>. That's because using time means agreeing on what time it is, which is itself a synchronization problem!</p><p>That's why most distributed systems like databases are built with the assumption that you <strong>can't trust machine time</strong>, which complicates many things and ultimately affects these systems' latency.</p><p>But time isn't just a virtual concept; the physics world defines it. If only machines could get access to a trustable <em>physics</em> time! It turns out that's what hardware engineers have iterated on for years, and as data centers and distributed systems grow even larger, that problem is as important as ever.</p><p>So, Meta research scientists and engineers built a full-stack solution from the GNSS antenna on the roof to the hardware appliance, the time server, the client, and their monitoring.</p><p>What's fascinating is that many tiny details become large challenges when you want to get to nanoseconds time accuracy.</p><ol><li><p>The <strong>time appliance</strong> needs to be configured on the fly to adapt its configuration to the state of all its components.</p></li><li><p>The <strong>travel time</strong> of the time information from the appliance to the client, located anywhere in the datacenter, needs to be accounted for as a "time offset".</p></li><li><p>Time isn't a strict value anymore, but a "<strong>window of uncertainty</strong>"</p></li></ol><blockquote><p>"As you may see, the API doesn't return the current time (aka time.Now()). Instead, it returns a window of time which contains the actual time with a very high degree of probability."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gyH4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4eeb815d-73a6-4e7c-81d2-11655d9be61d_1920x1353.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gyH4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4eeb815d-73a6-4e7c-81d2-11655d9be61d_1920x1353.png 424w, https://substackcdn.com/image/fetch/$s_!gyH4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4eeb815d-73a6-4e7c-81d2-11655d9be61d_1920x1353.png 848w, https://substackcdn.com/image/fetch/$s_!gyH4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4eeb815d-73a6-4e7c-81d2-11655d9be61d_1920x1353.png 1272w, https://substackcdn.com/image/fetch/$s_!gyH4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4eeb815d-73a6-4e7c-81d2-11655d9be61d_1920x1353.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gyH4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4eeb815d-73a6-4e7c-81d2-11655d9be61d_1920x1353.png" width="1456" height="1026" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4eeb815d-73a6-4e7c-81d2-11655d9be61d_1920x1353.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1026,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:352004,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gyH4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4eeb815d-73a6-4e7c-81d2-11655d9be61d_1920x1353.png 424w, https://substackcdn.com/image/fetch/$s_!gyH4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4eeb815d-73a6-4e7c-81d2-11655d9be61d_1920x1353.png 848w, https://substackcdn.com/image/fetch/$s_!gyH4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4eeb815d-73a6-4e7c-81d2-11655d9be61d_1920x1353.png 1272w, https://substackcdn.com/image/fetch/$s_!gyH4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4eeb815d-73a6-4e7c-81d2-11655d9be61d_1920x1353.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Meta&#8217;s entire PTP stack, from the antenna to the client. Source: Meta.</figcaption></figure></div><p>&#128215; <strong>Ahmad Byagowi</strong>'s <em>How Precision Time Protocol is being deployed at Meta</em> is a fascinating long read about the entire stack the Meta teams designed to get nanosecond time accuracy. If anything, it's a good reminder not to trust time.Now()!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://engineering.fb.com/2022/11/21/production-engineering/precision-time-protocol-at-meta/&quot;,&quot;text&quot;:&quot;Read the full article on Meta's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://engineering.fb.com/2022/11/21/production-engineering/precision-time-protocol-at-meta/"><span>Read the full article on Meta's blog</span></a></p><div><hr></div><h2>How to Turn Good Design Direction into a Good System</h2><div class="pullquote"><p>"Systematization is the rigor of design."</p></div><blockquote><p>"There's this myth in creative spaces that systems are where good ideas go to die. [...] But structure and systems are not just a designer's most important tools &#8212; they are, ultimately, what design is."</p></blockquote><p>And it's true in everything! We always give more credit to the initial idea than it deserves and less to execution. That leads people to spend too much time on ideation compared to the execution of structure and systems.</p><blockquote><p>"When this happens, I'll find myself in reviews of initial layouts or compositions asking why there are so many new ideas present."</p></blockquote><p>So Christopher Butler came up with the "Idea to Structure Ratio".</p><ol><li><p><strong>Idea Generation</strong> &#8212; 10%</p></li></ol><blockquote><p>"Good ideas probably account for about 10% of the effort in a design project. That's right. Just ten percent."</p></blockquote><blockquote><p>"The idea is to show how those elements can work together in a variety of different ways and secure your constituents' comfort with the visual language without asking them to approve specific layouts."</p></blockquote><ol start="2"><li><p><strong>Structure</strong> &#8212; 20%</p></li></ol><blockquote><p>"Creating a structure to support them &#8212; creating the pages, screens, or scenes that provide a consistent landscape for attention and use &#8212; is about 20%."</p></blockquote><p>This is the wireframing stage. The idea is to go from a very rough structure to "just enough detail to demonstrate the information architecture of the space as well as visually indicate the priority of information and possible actions."</p><ol start="3"><li><p><strong>Sub-Structure</strong> &#8212; 40%</p></li></ol><blockquote><p>"Integrating the sub-structure in design &#8212; considering taxonomies of information, connections between elements (both functional and conceptual), and the admin layer of user experience &#8212; is actually 40%."</p></blockquote><blockquote><p>"This is the comprehensive systematization of a thing. It's the largest portion of effort and value because of how detailed it is, how much collaboration it requires, and how much it impacts the strength, scalability, and overall elegance of the final product. [...] This is where designed components become system modules."</p></blockquote><ol start="4"><li><p><strong>Visual System</strong> &#8212; 20%</p></li></ol><blockquote><p>"Creating the final visual system &#8212; the complete visual language and pattern library that is the result of joining the initial idea to the outer and inner structures &#8212; is the next 20%."</p></blockquote><p>This is the high-fidelity design stage.</p><blockquote><p>"This is the stage where, if the previous two aren't handled well, I start to see a lot of unnecessary new creation that distracts from progress being made or obstructs a system from cohering or remaining together."</p></blockquote><ol start="5"><li><p><strong>Documentation</strong> &#8212; 10%</p></li></ol><blockquote><p>"Finally, the documentation of the visual system is the last 10%."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gH5p!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65b15bab-38ef-4755-bd2a-e83d512d4075_1208x969.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gH5p!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65b15bab-38ef-4755-bd2a-e83d512d4075_1208x969.png 424w, https://substackcdn.com/image/fetch/$s_!gH5p!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65b15bab-38ef-4755-bd2a-e83d512d4075_1208x969.png 848w, https://substackcdn.com/image/fetch/$s_!gH5p!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65b15bab-38ef-4755-bd2a-e83d512d4075_1208x969.png 1272w, https://substackcdn.com/image/fetch/$s_!gH5p!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65b15bab-38ef-4755-bd2a-e83d512d4075_1208x969.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gH5p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65b15bab-38ef-4755-bd2a-e83d512d4075_1208x969.png" width="564" height="452.4139072847682" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/65b15bab-38ef-4755-bd2a-e83d512d4075_1208x969.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:969,&quot;width&quot;:1208,&quot;resizeWidth&quot;:564,&quot;bytes&quot;:327757,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gH5p!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65b15bab-38ef-4755-bd2a-e83d512d4075_1208x969.png 424w, https://substackcdn.com/image/fetch/$s_!gH5p!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65b15bab-38ef-4755-bd2a-e83d512d4075_1208x969.png 848w, https://substackcdn.com/image/fetch/$s_!gH5p!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65b15bab-38ef-4755-bd2a-e83d512d4075_1208x969.png 1272w, https://substackcdn.com/image/fetch/$s_!gH5p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65b15bab-38ef-4755-bd2a-e83d512d4075_1208x969.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">How design time is spent mostly on structure and systems. Source: C. Butler.</figcaption></figure></div><p>&#128215; <strong>Christopher Butler</strong>'s <em>How to Turn Good Design Direction into a Good System</em> is a very dense explanation of how Chris runs his design projects and of the steps where he spends most of his time. Twenty years of iteration and experience that you should definitely read.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.chrbutler.com/how-to-turn-good-design-direction-into-a-good-system&quot;,&quot;text&quot;:&quot;Read the full article on Chris's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.chrbutler.com/how-to-turn-good-design-direction-into-a-good-system"><span>Read the full article on Chris's blog</span></a></p><div><hr></div><h2>Choosing the right join algorithm (ClickHouse)</h2><p>Database joins don't have a one-size-fits-all solution. Like most database operations, finding the optimal algorithm to execute a join statement is a <strong>latency vs. memory tradeoff</strong> that heavily depends on the pre-existing alignment of the data layout and the join sort order.</p><p>By thinking in reverse, we can design the best table layout by considering the most common query and join patterns the table will have to support. But you never request a specific JOIN algorithm, your database guesses for you! Let's learn how it does that so we can design the highest-performance tables.</p><p><strong>ClickHouse</strong> is an analytical database that can support massive datasets. For the reasons above, it supports six different JOIN algorithms that it'll pick depending on the situation.</p><ol><li><p>The <strong>Direct join</strong> applies when the right-hand side table supports fast key-value lookups. Thanks to this, it streams through the left table, requesting the right table for each row.</p></li></ol><blockquote><p>"The Direct join is ClickHouse's fastest join algorithm."</p></blockquote><ol start="2"><li><p>If it cannot do key-value lookups on the table, ClickHouse will build one using a hash table, preferably in memory if the dataset size allows. That's how the three <strong>Hash Joins</strong> work.</p></li></ol><blockquote><p>"The algorithm can be constrained by high memory usage. Plus, the creation of the in-memory hash table from the right-hand side table of the join is single-threaded and can become a bottleneck in terms of join execution time if the right-hand side table is very large."</p></blockquote><ol start="3"><li><p>When the tables' existing sort order matches and is along the join key, ClickHouse can use a third class of algorithms: merge joins. <strong>Merge joins</strong> can stream both tables in parallel, which brings significant memory improvements.</p></li></ol><blockquote><p>"In such cases, the join performance can be competitive with some of the hash join algorithms from the chart above while generally requiring significantly less main memory."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XXFq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc58a5a7f-6026-42ea-b71c-e3b11838f4aa_2708x1680.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XXFq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc58a5a7f-6026-42ea-b71c-e3b11838f4aa_2708x1680.png 424w, https://substackcdn.com/image/fetch/$s_!XXFq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc58a5a7f-6026-42ea-b71c-e3b11838f4aa_2708x1680.png 848w, https://substackcdn.com/image/fetch/$s_!XXFq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc58a5a7f-6026-42ea-b71c-e3b11838f4aa_2708x1680.png 1272w, https://substackcdn.com/image/fetch/$s_!XXFq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc58a5a7f-6026-42ea-b71c-e3b11838f4aa_2708x1680.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XXFq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc58a5a7f-6026-42ea-b71c-e3b11838f4aa_2708x1680.png" width="1456" height="903" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c58a5a7f-6026-42ea-b71c-e3b11838f4aa_2708x1680.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:903,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1175360,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XXFq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc58a5a7f-6026-42ea-b71c-e3b11838f4aa_2708x1680.png 424w, https://substackcdn.com/image/fetch/$s_!XXFq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc58a5a7f-6026-42ea-b71c-e3b11838f4aa_2708x1680.png 848w, https://substackcdn.com/image/fetch/$s_!XXFq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc58a5a7f-6026-42ea-b71c-e3b11838f4aa_2708x1680.png 1272w, https://substackcdn.com/image/fetch/$s_!XXFq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc58a5a7f-6026-42ea-b71c-e3b11838f4aa_2708x1680.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A decision tree to choose the right join algorithm. Source: ClickHouse.</figcaption></figure></div><p>&#128215; <strong>ClickHouse</strong>'s <em>Choosing the Right Join Algorithm</em> describes the six JOIN algorithms the database engine supports and how and when they perform best. The author also describes how ClickHouse chooses the best-fitting algorithm based on simple heuristics.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://clickhouse.com/blog/clickhouse-fully-supports-joins-how-to-choose-the-right-algorithm-part5&quot;,&quot;text&quot;:&quot;Read the full article&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://clickhouse.com/blog/clickhouse-fully-supports-joins-how-to-choose-the-right-algorithm-part5"><span>Read the full article</span></a></p><div><hr></div><h2>Top 0.1% re-post: How Spotify uses &#8220;Golden Paths&#8221; to solve fragmentation in their software ecosystem</h2><p>Tooling <strong>fragmentation and inconsistency kill software productivity</strong>. How long does onboarding to a new codebase or project take for an existing engineer? If the answer is more than one day, you probably have a fragmentation problem.</p><blockquote><p>"[...] the only way to find out how to do something was to ask your colleague. 'Rumour-driven development', we endearingly called it".</p></blockquote><p>Is it a price to pay to keep autonomous teams? Spotify's Platform Developer Experience teams said no, and introduced the idea of a <em>Golden Path</em>.</p><blockquote><p>"The <em>Golden Path</em> is the opinionated and supported path to build your system, and the Golden Path tutorial walks you through this path."</p></blockquote><p>&#128215; <strong>Spotify</strong>'s <em>How We Use Golden Paths to Solve Fragmentation in Our Software Ecosystem</em> is one of these simple but truly inspiring reads. <strong>Gary Niemen</strong> explains the Golden Path and Golden Path tutorials in the Spotify engineering org and how they helped the company solve its fragmentation problem.</p><blockquote><p>"There was a time when engineers at Spotify couldn't imagine life with Golden Paths; now we can't imagine life without them."</p></blockquote><p>Fun fact: the <em>Golden Path</em> name comes from Frank Herbert's "Children of Dune":</p><blockquote><p>"His spice-induced visions show him a myriad of possible futures where humanity has become extinct and only one where humanity survives. He names this future 'The Golden Path' and resolves to bring it to fruition.&#8221;</p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://engineering.atspotify.com/2020/08/how-we-use-golden-paths-to-solve-fragmentation-in-our-software-ecosystem/&quot;,&quot;text&quot;:&quot;Read the full article on Spotify's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://engineering.atspotify.com/2020/08/how-we-use-golden-paths-to-solve-fragmentation-in-our-software-ecosystem/"><span>Read the full article on Spotify's blog</span></a></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #65]]></title><description><![CDATA[A first look at React Server Components, Golden Rules for Organizational Structure, a survey of Analytics Databases, and a fantastic re-post: the Linear Method.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-65</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-65</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 27 Jan 2024 16:18:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!y47T!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9aa76cd-5c26-4313-b6e9-d67045b6f386_1460x947.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hi! This is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also, <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>Making sense of React Server Components</h2><p>React Server Components are the most confusing React update in many years. Thankfully, you will likely use them through a framework like Next.js that abstracts away complexity and will never have to deal with them directly. Yet RSCs are such a <strong>paradigm shift</strong> that learning about them is helpful.</p><h3>The main problem</h3><p><strong>Server-side rendering</strong> is everywhere now. Its initial idea was to simulate a client environment on the server to render a first HTML page and display it to the user while the large Javascript bundle is loading.</p><p>As the SSR frameworks expanded, developers started asking to customize that initial HTML page and fill it with user data to make it more relevant.</p><blockquote><p>"In order for this to work, we'd need to be able to give React a chunk of code that it <strong>runs exclusively on the server</strong>, to do the database query. But that hasn't been an option with React&#8230; even with Server Side Rendering, all of our components render on both the server and the client."</p></blockquote><h3>The solution: React Server Components</h3><p><strong>React Server Components</strong> solve that problem: they're guaranteed to only run on the server and won't be part of the browser Javascript bundle. The other components are called <em>Client Components</em>.</p><blockquote><p>"Server Components never re-render. They run once on the server to generate the UI. The rendered value is sent to the client and locked in place."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!y47T!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9aa76cd-5c26-4313-b6e9-d67045b6f386_1460x947.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!y47T!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9aa76cd-5c26-4313-b6e9-d67045b6f386_1460x947.png 424w, https://substackcdn.com/image/fetch/$s_!y47T!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9aa76cd-5c26-4313-b6e9-d67045b6f386_1460x947.png 848w, https://substackcdn.com/image/fetch/$s_!y47T!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9aa76cd-5c26-4313-b6e9-d67045b6f386_1460x947.png 1272w, https://substackcdn.com/image/fetch/$s_!y47T!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9aa76cd-5c26-4313-b6e9-d67045b6f386_1460x947.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!y47T!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9aa76cd-5c26-4313-b6e9-d67045b6f386_1460x947.png" width="654" height="424.02197802197804" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f9aa76cd-5c26-4313-b6e9-d67045b6f386_1460x947.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:944,&quot;width&quot;:1456,&quot;resizeWidth&quot;:654,&quot;bytes&quot;:155767,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!y47T!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9aa76cd-5c26-4313-b6e9-d67045b6f386_1460x947.png 424w, https://substackcdn.com/image/fetch/$s_!y47T!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9aa76cd-5c26-4313-b6e9-d67045b6f386_1460x947.png 848w, https://substackcdn.com/image/fetch/$s_!y47T!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9aa76cd-5c26-4313-b6e9-d67045b6f386_1460x947.png 1272w, https://substackcdn.com/image/fetch/$s_!y47T!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9aa76cd-5c26-4313-b6e9-d67045b6f386_1460x947.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The initial render already includes data, thanks to React Server Components. Source: Josh Comeau.</figcaption></figure></div><p>This paradigm has significant consequences on what RSCs can and cannot do:</p><ul><li><p>RSCs cannot hold mutable state.</p></li><li><p>RSCs cannot receive props from Client Components. Thus, they cannot be imported by Client Components. If they are, React automatically turns them into Client Components.</p></li><li><p>All components are considered React Server Components unless specified.</p></li></ul><blockquote><p>"One of the biggest "ah-ha" moments I had with React Server Components was the realization that this new paradigm is all about <strong>creating client boundaries.</strong>"</p></blockquote><p>Indeed, because of the propagation of the "Client-ness" in the import tree, boundaries and structure define what will be interactive and what will render only once on the server.</p><p>&#128215; <strong>Josh Comeau</strong>'s <em>Making Sense of React Server Components</em> is an excellent introduction to RSCs. Josh uses his creativity and React and animation skills to describe how they work in detail. While you will probably only use them through frameworks, the article details weird but logical design decisions that, once understood, will save you hours of madness.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.joshwcomeau.com/react/server-components/&quot;,&quot;text&quot;:&quot;Read the full article on Josh's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.joshwcomeau.com/react/server-components/"><span>Read the full article on Josh's blog</span></a></p><div><hr></div><h2>Golden Rules for Organizational Structure</h2><p><em>Your 200-person org doesn't need VPs, Directors AND managers. Here's how to fix it.</em></p><p>From ~100 FTEs up to thousands, it's a good practice for every tech organization to reflect on its <strong>structure</strong>. A periodic audit of the overall <strong>organization design</strong> can help uncover and fix flaws. What exactly should you look for?</p><p>Joshua Burgin has spent most of his 30-year career as a tech executive and gives Golden rules and numbers for organizational design.</p><blockquote><p>"The guidance principles are divided into the following areas: Span of control, Layers, PM to Engineering Ratios, Engineering Seniority Proportions"</p></blockquote><h3>Span of control</h3><blockquote><p>"This refers to the <strong>number of direct reports</strong> that a manager oversees and/or manages within an organization.</p><ul><li><p>Managers should oversee 6 to 10 reports. [...] Directors, VPs &amp; above are capable of managing 8-12 reports</p></li><li><p>No one with a Management title (including Directors and VPs) with less than 5 direct reports."</p></li></ul></blockquote><p>Senior ICs can also report to VPs or Director, which the author recommends, through this principle:</p><blockquote><p>"Managers, Directors, and VPs should ideally be at the same or higher level as the ICs they oversee."</p></blockquote><h3>Layers</h3><blockquote><p>"In organizational design, "layers" refer to the <strong>hierarchical levels</strong> or depth within a company's structure."</p></blockquote><p>It's no secret that organizations should be kept as flat as possible.</p><blockquote><ul><li><p>"The median gap between the lowest level ICs and VPs should be 2 layers of management (IC &#8594; Manager/Director &#8594; VP should be the norm)</p></li><li><p>The maximum gap between the lowest level ICs and VPs should not exceed 3 managers."</p></li></ul></blockquote><h3>Engineering ratios</h3><p>These are the rules that apply the earliest in a company's lifespan.</p><p>First, you should keep the <strong>feature teams vs. common services</strong> (sometimes called platform) teams <strong>ratio</strong> between 70/30 (usual) and 90/10 (high-performing orgs).</p><p>Second, you should <strong>balance seniority</strong> inside the organization and its teams.</p><blockquote><ul><li><p>"Aim for 30% of your org junior/entry level. You can have a little less or more, but not more than 40%.</p></li><li><p>40-50% of your org should be mid-career level."</p></li><li><p>20% of your org should be the senior-most ICs in technical leadership (typically "Senior Staff" and "Principal Engineers")."</p></li></ul></blockquote><p>&#128215; <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Joshua Burgin&quot;,&quot;id&quot;:61170559,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e31ba3d9-c870-4506-9bd3-b28b804e962c_1062x1065.jpeg&quot;,&quot;uuid&quot;:&quot;b4efd1d3-24c8-4b69-857d-88845336d39c&quot;}" data-component-name="MentionToDOM"></span>'s <em>Golden Rules for Organizational Structure</em> gives reference numbers to design healthy organizations. Beyond people ratios, he also mentions that every organization is different and may warrant breaking these rules as long as the organization's design is intentional and continuously questioned.</p><div class="embedded-post-wrap" data-attrs="{&quot;id&quot;:135912597,&quot;url&quot;:&quot;https://joshuaburgin.substack.com/p/golden-rules-for-organizational-structure&quot;,&quot;publication_id&quot;:1800282,&quot;publication_name&quot;:&quot;Joshua Burgin&#8217;s Substack&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22d0ded9-bfef-443d-9599-b1937d577e97_1062x1062.png&quot;,&quot;title&quot;:&quot;Golden Rules for Organizational Structure&quot;,&quot;truncated_body_text&quot;:&quot;In the realm of organizational structure inside a technology (or R&amp;D) org, I&#8217;ve observed many different structures over the last 25 years. Through that, I&#8217;ve developed a set of guiding principles and best practices I think provide broadly optimal results. While these aren't rigid mandates, they serve as valuable starting points for fostering productive &#8230;&quot;,&quot;date&quot;:&quot;2023-10-03T18:00:10.615Z&quot;,&quot;like_count&quot;:224,&quot;comment_count&quot;:14,&quot;bylines&quot;:[{&quot;id&quot;:61170559,&quot;name&quot;:&quot;Joshua Burgin&quot;,&quot;handle&quot;:&quot;joshuaburgin&quot;,&quot;previous_name&quot;:&quot;Joshua B&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e31ba3d9-c870-4506-9bd3-b28b804e962c_1062x1065.jpeg&quot;,&quot;bio&quot;:&quot;Technology executive with 25+ years of experience. One of Amazon's first 100 employees&quot;,&quot;profile_set_up_at&quot;:&quot;2023-01-03T20:42:36.392Z&quot;,&quot;publicationUsers&quot;:[{&quot;id&quot;:1784178,&quot;user_id&quot;:61170559,&quot;publication_id&quot;:1800282,&quot;role&quot;:&quot;admin&quot;,&quot;public&quot;:true,&quot;is_primary&quot;:false,&quot;publication&quot;:{&quot;id&quot;:1800282,&quot;name&quot;:&quot;Joshua Burgin&#8217;s Substack&quot;,&quot;subdomain&quot;:&quot;joshuaburgin&quot;,&quot;custom_domain&quot;:null,&quot;custom_domain_optional&quot;:false,&quot;hero_text&quot;:&quot;Diving into tech, business, management, and career tips, sprinkled with occasional detours into philosophy and economics&quot;,&quot;logo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/22d0ded9-bfef-443d-9599-b1937d577e97_1062x1062.png&quot;,&quot;author_id&quot;:61170559,&quot;theme_var_background_pop&quot;:&quot;#EA410B&quot;,&quot;created_at&quot;:&quot;2023-07-13T14:32:02.837Z&quot;,&quot;rss_website_url&quot;:null,&quot;email_from_name&quot;:&quot;Joshua Burgin from Joshua Burgin&#8217;s Substack&quot;,&quot;copyright&quot;:&quot;Joshua Burgin&quot;,&quot;founding_plan_name&quot;:null,&quot;community_enabled&quot;:true,&quot;invite_only&quot;:false,&quot;payments_state&quot;:&quot;disabled&quot;,&quot;language&quot;:null,&quot;explicit&quot;:false}}],&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;utm_campaign&quot;:null,&quot;belowTheFold&quot;:true,&quot;type&quot;:&quot;newsletter&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="EmbeddedPostToDOM"><a class="embedded-post" native="true" href="https://joshuaburgin.substack.com/p/golden-rules-for-organizational-structure?utm_source=substack&amp;utm_campaign=post_embed&amp;utm_medium=web"><div class="embedded-post-header"><img class="embedded-post-publication-logo" src="https://substackcdn.com/image/fetch/$s_!tJgA!,w_56,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22d0ded9-bfef-443d-9599-b1937d577e97_1062x1062.png" loading="lazy"><span class="embedded-post-publication-name">Joshua Burgin&#8217;s Substack</span></div><div class="embedded-post-title-wrapper"><div class="embedded-post-title">Golden Rules for Organizational Structure</div></div><div class="embedded-post-body">In the realm of organizational structure inside a technology (or R&amp;D) org, I&#8217;ve observed many different structures over the last 25 years. Through that, I&#8217;ve developed a set of guiding principles and best practices I think provide broadly optimal results. While these aren't rigid mandates, they serve as valuable starting points for fostering productive &#8230;</div><div class="embedded-post-cta-wrapper"><span class="embedded-post-cta">Read more</span></div><div class="embedded-post-meta">3 years ago &#183; 224 likes &#183; 14 comments &#183; Joshua Burgin</div></a></div><div><hr></div><h2>A shallow survey of OLAP and HTAP query engines</h2><p><em>Snowflake, ClickHouse, DuckDB, Velox... Are the hundreds of OLAP query engines really different?</em></p><p>As it turns out, many converge to similar designs over time. Yet studying these differences is a fantastic learning opportunity. Let's look at the main attributes:</p><h3>Data layout</h3><p>All systems seem to agree on the <strong>PAX</strong> <strong>layout </strong>(Partition Attributes Across) to store data. The idea is that rows are grouped together, and then the values are grouped by column within each row group. The main differences lie in the size of these partitions, usually in the hundreds of Mb range.</p><blockquote><p>"For hot data we still see PAX-like layouts, but with much smaller row groups because we want entire query pipelines (see below) to fit in cpu cache."</p></blockquote><h3>Compression</h3><p>The main question is <strong>generic vs. specialized compression.</strong> The issue with generic compression is that it usually requires unpacking an entire compressed block when reading random values. However, since compression significantly cuts storage and bandwidth costs, it's an acceptable trade-off.</p><blockquote><p>"For cold data most systems apply both one or more specialized algorithms and then some generic algorithm afterwards."</p></blockquote><h3>Vectorized vs pipelined queries</h3><ul><li><p><strong>Vectorized</strong> query execution processes multiple data elements (as a vector) in a single instruction, improving computational efficiency by reducing instruction overhead.</p></li><li><p><strong>Pipelined</strong> query execution splits a query into stages, allowing different stages to work concurrently on different parts of the data.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_oaG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cebb60a-38f8-46cb-8c76-580cfc935f69_1808x699.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_oaG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cebb60a-38f8-46cb-8c76-580cfc935f69_1808x699.png 424w, https://substackcdn.com/image/fetch/$s_!_oaG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cebb60a-38f8-46cb-8c76-580cfc935f69_1808x699.png 848w, https://substackcdn.com/image/fetch/$s_!_oaG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cebb60a-38f8-46cb-8c76-580cfc935f69_1808x699.png 1272w, https://substackcdn.com/image/fetch/$s_!_oaG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cebb60a-38f8-46cb-8c76-580cfc935f69_1808x699.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_oaG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cebb60a-38f8-46cb-8c76-580cfc935f69_1808x699.png" width="1456" height="563" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8cebb60a-38f8-46cb-8c76-580cfc935f69_1808x699.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:563,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:151429,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_oaG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cebb60a-38f8-46cb-8c76-580cfc935f69_1808x699.png 424w, https://substackcdn.com/image/fetch/$s_!_oaG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cebb60a-38f8-46cb-8c76-580cfc935f69_1808x699.png 848w, https://substackcdn.com/image/fetch/$s_!_oaG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cebb60a-38f8-46cb-8c76-580cfc935f69_1808x699.png 1272w, https://substackcdn.com/image/fetch/$s_!_oaG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cebb60a-38f8-46cb-8c76-580cfc935f69_1808x699.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Vectorized vs. pipeline query execution illustrated. Source: Jamie Brandon.</figcaption></figure></div><blockquote><p>"The pure OLAP systems generally use entirely vectorized style."</p></blockquote><p>&#128215; Jamie Brandon's <em>A shallow survey of OLAP and HTAP query engines</em> is an exploratory article into the design and trade-offs that characterize these systems. As it opens more doors than it closes, the article is an excellent entry point into the deep domain of query engine optimization.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.scattered-thoughts.net/writing/a-shallow-survey-of-olap-and-htap-query-engines&quot;,&quot;text&quot;:&quot;Read the full article on Jamie's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.scattered-thoughts.net/writing/a-shallow-survey-of-olap-and-htap-query-engines"><span>Read the full article on Jamie's blog</span></a></p><div><hr></div><h2>Top 0.1% re-post: The Linear Method</h2><p><em>Standing on the Shoulders of Giants is nearing two years, and 300 articles have been shared. Some articles are one in a thousand and deserve more than one post. Every week, I&#8217;ll re-post one of these fantastic pieces of knowledge. Starting with the Linear method, as my thoughts go to the Linear team that has had a bad database outage last week and has lived through what I imagine wasn&#8217;t their best week.</em></p><p>Successful products have "on-point" operating systems. And when they share them, it's an incredible learning opportunity. As an individual, there are plenty of ideas to bring to your team. As a founder, you can compare your processes against the best!</p><p>The Linear Method collects the aspirations and operating cadence of the team and how they continuously roadmap and build. It&#8217;s down to earth, opinionated, but also built on the principle that rules are guidelines, not laws. </p><blockquote><p>Overflowing inboxes are a good sign unless they're bug reports. Don&#8217;t worry too much about organizing all the [user] feedback. Collect it and use it as a research library when developing new features.</p></blockquote><blockquote><p>At Linear, we don&#8217;t write user stories and think they&#8217;re an anti-pattern in product development. We write short and simple issues that describe the task in plain language instead.</p></blockquote><p>&#128215; Linear's <em>The</em> <em>Linear Method</em> describes the foundational principles the Linear team used to create such a successful product. I found every section truly enlightening and helpful as a product leader. It takes a deep understanding to clearly lay out these principles with no jargon and short sentences.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://linear.app/method&quot;,&quot;text&quot;:&quot;Read the full method&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://linear.app/method"><span>Read the full method</span></a></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #64]]></title><description><![CDATA[The software architecture of the backbone of Cloudflare's 1.1.1.1, A framework to beat larger competitors, and the full theory behind graceful behavior when systems reach full capacity.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-64</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-64</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 23 Dec 2023 10:11:33 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!TCvn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da253c0-e5a9-4daa-81cf-712cf41435d9_1528x781.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#127877; Hi, this is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also: <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>How Rust and Wasm power Cloudflare's 1.1.1.1</h2><p>1.1.1.1, Cloudflare's DNS resolver, has grown exponentially since its 2018 release.</p><p>Unsurprisingly, Cloudflare started with an off-the-shelf solution called <em>Knot Resolver</em> but quickly outgrew it and needed more and safer customization.</p><blockquote><p>"We forged a platform that we are happy with, and we call it <em>BigPineapple</em>."</p></blockquote><p>BigPinneapple is Cloudflare's <strong>DNS resolution system</strong>, hosted in hundreds of edge data centers. It was built with the following goals in mind:</p><ul><li><p><strong>High performance and throughput</strong>. Total latency should be in the milliseconds.</p></li><li><p><strong>Correctness</strong>. DNS resolution is old and has many edge cases and non-RFC-compliant servers that must be supported.</p></li><li><p><strong>Extensibility</strong>. Cloudflare's value-add beyond a simple DNS resolver is in the customization and new use cases it can enable.</p></li></ul><p>The article describes BigPinneapple's system architecture and design choices. It's built using a Rust async framework called Tokio, and composed of separate components deployed together. Here are the most interesting ones:</p><ol><li><p>The <strong>server</strong> speaks many protocols because DNS is queried over many of them and turns these heterogeneous requests into common DNS query Cloudflare calls "Frames." It offloads query resolution to a set of workers.</p></li><li><p>The <strong>cache</strong> is central to the overall server performance. Because DNS resolution involves making multiple network requests, it can be slow, hence the caching needs. Because of how large the DNS space is, it can't fit in one cache. Cloudflare uses consistent hashing to distribute queries to different nodes in the same data center to split caches between nodes.</p></li><li><p><strong>Conductor</strong> manages outbound connections smartly. Every non-cached DNS query leads to network calls to upstream DNS nameservers with different performance, capacity, and availability. "The conductor is able to make these decisions by tracking the upstream server's metrics, such as RTT, QoS, etc."</p></li><li><p>The <strong>Sandbox</strong> is the extensibility component. It runs WebAssembly modules as "callbacks" that are registered at different points of the BigPinneaple request lifecycle.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TCvn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da253c0-e5a9-4daa-81cf-712cf41435d9_1528x781.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TCvn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da253c0-e5a9-4daa-81cf-712cf41435d9_1528x781.png 424w, https://substackcdn.com/image/fetch/$s_!TCvn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da253c0-e5a9-4daa-81cf-712cf41435d9_1528x781.png 848w, https://substackcdn.com/image/fetch/$s_!TCvn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da253c0-e5a9-4daa-81cf-712cf41435d9_1528x781.png 1272w, https://substackcdn.com/image/fetch/$s_!TCvn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da253c0-e5a9-4daa-81cf-712cf41435d9_1528x781.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TCvn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da253c0-e5a9-4daa-81cf-712cf41435d9_1528x781.png" width="1456" height="744" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1da253c0-e5a9-4daa-81cf-712cf41435d9_1528x781.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:744,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:151127,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TCvn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da253c0-e5a9-4daa-81cf-712cf41435d9_1528x781.png 424w, https://substackcdn.com/image/fetch/$s_!TCvn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da253c0-e5a9-4daa-81cf-712cf41435d9_1528x781.png 848w, https://substackcdn.com/image/fetch/$s_!TCvn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da253c0-e5a9-4daa-81cf-712cf41435d9_1528x781.png 1272w, https://substackcdn.com/image/fetch/$s_!TCvn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da253c0-e5a9-4daa-81cf-712cf41435d9_1528x781.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: Cloudflare blog.</figcaption></figure></div><blockquote><p>"BigPineapple's Wasm runtime is currently powered by <a href="https://wasmer.io/">Wasmer</a>. The runtime allows each module to run in its own instance, with an isolated memory and a signal trap, which naturally solved the module isolation problem we described before."</p></blockquote><p>&#128215; <strong>Ambang Wen</strong>'s <em>How Rust and Wasm power Cloudflare's 1.1.1.1</em> describes the architecture of one of the largest DNS resolvers on the planet. It goes into sufficient detail to be insightful, calling out protocols and techniques the team used to build and operate the system at such a scale.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.cloudflare.com/big-pineapple-intro/&quot;,&quot;text&quot;:&quot;Read the full article on Cloudflare&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.cloudflare.com/big-pineapple-intro/"><span>Read the full article on Cloudflare</span></a></p><div><hr></div><h2>How to Beat Larger Competitors</h2><blockquote><p>"It doesn't matter how big your company is, there is always someone bigger."</p></blockquote><p>Start-ups often <strong>shrug off larger companies</strong> when talking about competition. We build our two-dimensional competitive charts without them and fill them with smaller companies that look just like us. That's wrong in many ways. Even if large companies aren't your main risk or focus, their size can threaten your business.</p><blockquote><p>"Big companies can outlast you, so they don't need to win, they just need to wait for you to fail."</p></blockquote><p>So, you need a <strong>strategy</strong> to beat and protect yourself against them. You need to take the initiative. <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Sean Byrnes&quot;,&quot;id&quot;:429647,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa75f81bb-4ea6-4a6c-ab43-e975926b0e99_150x225.png&quot;,&quot;uuid&quot;:&quot;b91d7723-bb6c-4c20-98ab-9646add55c48&quot;}" data-component-name="MentionToDOM"></span> came up with a framework to think about your fight against these larger companies:</p><h3>Deposition</h3><blockquote><p>"Strategy 1: <strong>Deposition</strong>. You can [...] frame their product as "last generation" or "table stakes". This is called depositioning."</p></blockquote><p>Depositioning is a powerful marketing message, but it is even stronger when you build your entire company and product around that message. One example is all the new ERP-like companies whose central message is "Old ERPs are old and unusable, ERPs are dead, we're the future".</p><h3>Commoditize</h3><blockquote><p>"Strategy 2: <strong>Commoditize</strong>. Once a business is big, it cannot easily adjust to a new business model [...] If you can offer a similar service for 1/10th of the price it's unlikely they can find a way to compete."</p></blockquote><p>Driving price down is a risky strategy for your image and not always the best way to build a healthy business. Still, if it's powered by a fundamental change in how the business is done, it can be the best competitive advantage.</p><h3>Disrupt</h3><blockquote><p>"Strategy 3: <strong>Disrupt</strong>. If you do something that is radically different then you have a chance to disrupt their business."</p></blockquote><p>Delivering similar value in a better way is also a recipe for explosive growth because, depending on switching costs, the existing market can switch to your solution in a landslide. Think Uber vs. Taxis. While the word is overused, disruption is probably the most common way start-ups win. It's also the most common way they lose to smaller competitors once they're giants. A never-ending cycle!</p><blockquote><p>"Leaders in any given category are rarely leaders for more than a decade or two, as smaller competitors eventually find ways to chip away at their advantages."</p></blockquote><p>&#128215; <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Sean Byrnes&quot;,&quot;id&quot;:429647,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa75f81bb-4ea6-4a6c-ab43-e975926b0e99_150x225.png&quot;,&quot;uuid&quot;:&quot;7fd63aa7-4d6d-46cd-a236-953679368a7c&quot;}" data-component-name="MentionToDOM"></span> ' <em>How to Beat Larger Competitors</em> gives an actionable framework to think about big companies in your space. In some markets, beating larger competitors can also give you access to large existing markets without needing to create a new one, which can tremendously accelerate growth.</p><div class="embedded-post-wrap" data-attrs="{&quot;id&quot;:115100218,&quot;url&quot;:&quot;https://www.breakingpoint.tech/p/how-to-beat-larger-competitors&quot;,&quot;publication_id&quot;:861741,&quot;publication_name&quot;:&quot;The Breaking Point&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93a078f-aeee-4455-b512-bcfca07c0378_256x256.png&quot;,&quot;title&quot;:&quot;How to Beat Larger Competitors&quot;,&quot;truncated_body_text&quot;:&quot;If you liked reading this, please click the &#10084;&#65039; button on this post so more people can discover it on Substack. Thanks! It is inevitable that you will face competition from bigger companies. Any business that is growing and has happy customers becomes an attractive opportunity for a huge company looking for growth, or a threat they need to negate. It does&#8230;&quot;,&quot;date&quot;:&quot;2023-04-25T17:53:10.122Z&quot;,&quot;like_count&quot;:17,&quot;comment_count&quot;:0,&quot;bylines&quot;:[{&quot;id&quot;:429647,&quot;name&quot;:&quot;Sean Byrnes&quot;,&quot;handle&quot;:&quot;breakingpoint&quot;,&quot;previous_name&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa75f81bb-4ea6-4a6c-ab43-e975926b0e99_150x225.png&quot;,&quot;bio&quot;:&quot;CEO &amp; Co-founder of industry-defining companies like Outlier.ai and Flurry. Mentor &amp; coach to over 100 startup companies and investor in many more. &quot;,&quot;profile_set_up_at&quot;:&quot;2022-04-12T16:40:44.217Z&quot;,&quot;publicationUsers&quot;:[{&quot;id&quot;:802104,&quot;user_id&quot;:429647,&quot;publication_id&quot;:861741,&quot;role&quot;:&quot;admin&quot;,&quot;public&quot;:true,&quot;is_primary&quot;:false,&quot;publication&quot;:{&quot;id&quot;:861741,&quot;name&quot;:&quot;The Breaking Point&quot;,&quot;subdomain&quot;:&quot;breakingpoint&quot;,&quot;custom_domain&quot;:&quot;www.breakingpoint.tech&quot;,&quot;custom_domain_optional&quot;:false,&quot;hero_text&quot;:&quot;Advice for leaders on how to make better business decisions.&quot;,&quot;logo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/f93a078f-aeee-4455-b512-bcfca07c0378_256x256.png&quot;,&quot;author_id&quot;:429647,&quot;theme_var_background_pop&quot;:&quot;#67BDFC&quot;,&quot;created_at&quot;:&quot;2022-04-24T18:07:08.601Z&quot;,&quot;rss_website_url&quot;:null,&quot;email_from_name&quot;:null,&quot;copyright&quot;:&quot;Sean Byrnes&quot;,&quot;founding_plan_name&quot;:null,&quot;community_enabled&quot;:true,&quot;invite_only&quot;:false,&quot;payments_state&quot;:&quot;enabled&quot;,&quot;language&quot;:null,&quot;explicit&quot;:false}}],&quot;twitter_screen_name&quot;:&quot;sbyrnes&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;utm_campaign&quot;:null,&quot;belowTheFold&quot;:true,&quot;type&quot;:&quot;newsletter&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="EmbeddedPostToDOM"><a class="embedded-post" native="true" href="https://www.breakingpoint.tech/p/how-to-beat-larger-competitors?utm_source=substack&amp;utm_campaign=post_embed&amp;utm_medium=web"><div class="embedded-post-header"><img class="embedded-post-publication-logo" src="https://substackcdn.com/image/fetch/$s_!mxSV!,w_56,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93a078f-aeee-4455-b512-bcfca07c0378_256x256.png" loading="lazy"><span class="embedded-post-publication-name">The Breaking Point</span></div><div class="embedded-post-title-wrapper"><div class="embedded-post-title">How to Beat Larger Competitors</div></div><div class="embedded-post-body">If you liked reading this, please click the &#10084;&#65039; button on this post so more people can discover it on Substack. Thanks! It is inevitable that you will face competition from bigger companies. Any business that is growing and has happy customers becomes an attractive opportunity for a huge company looking for growth, or a threat they need to negate. It does&#8230;</div><div class="embedded-post-cta-wrapper"><span class="embedded-post-cta">Read more</span></div><div class="embedded-post-meta">3 years ago &#183; 17 likes &#183; Sean Byrnes</div></a></div><div><hr></div><h2>Graceful behavior at Capacity</h2><p><em>&#128658; "The database is stuck at 100% ; all requests are timing out!"</em></p><p><em>vs.</em></p><p><em>&#128526; "We're currently experiencing issues; clients may see elevated error rates."</em></p><p>This shows the difference between graceful degradation and total outage from the outside. Yet from the inside, the same thing may be happening: <strong>high contention</strong> for some shared resource, like a database. Without proper protection in place, high contention can spiral into <em>congestion collapse</em>.</p><blockquote><p>"<em>Congestion collapse</em> is when a system is receiving a high request rate but achieving throughput much lower than its capacity."</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6FeT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4fdffd1-ccba-4710-8b38-dc0ac48f9e22_1208x625.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6FeT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4fdffd1-ccba-4710-8b38-dc0ac48f9e22_1208x625.png 424w, https://substackcdn.com/image/fetch/$s_!6FeT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4fdffd1-ccba-4710-8b38-dc0ac48f9e22_1208x625.png 848w, https://substackcdn.com/image/fetch/$s_!6FeT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4fdffd1-ccba-4710-8b38-dc0ac48f9e22_1208x625.png 1272w, https://substackcdn.com/image/fetch/$s_!6FeT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4fdffd1-ccba-4710-8b38-dc0ac48f9e22_1208x625.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6FeT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4fdffd1-ccba-4710-8b38-dc0ac48f9e22_1208x625.png" width="1208" height="625" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c4fdffd1-ccba-4710-8b38-dc0ac48f9e22_1208x625.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:625,&quot;width&quot;:1208,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:71030,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6FeT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4fdffd1-ccba-4710-8b38-dc0ac48f9e22_1208x625.png 424w, https://substackcdn.com/image/fetch/$s_!6FeT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4fdffd1-ccba-4710-8b38-dc0ac48f9e22_1208x625.png 848w, https://substackcdn.com/image/fetch/$s_!6FeT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4fdffd1-ccba-4710-8b38-dc0ac48f9e22_1208x625.png 1272w, https://substackcdn.com/image/fetch/$s_!6FeT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4fdffd1-ccba-4710-8b38-dc0ac48f9e22_1208x625.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Congestion collapse. Source: Nelson Elhage.</figcaption></figure></div></blockquote><p>Once you've identified that bottleneck system (all systems are, at some point, but the first is the limiting one), there are different ways to protect it that all achieve the same goal:</p><blockquote><p>"The basic strategy to resolve contention is to deliberately <strong>limit concurrency</strong> to levels which don't cause undue contention."</p></blockquote><p>Adding a request queue can only solve traffic spikes, but under heavy load, queues will fill until either latency becomes too much or they're full.</p><blockquote><p>"There's only one solution: somehow have less work to do. We refer to either or both of these strategies as <strong>backpressure</strong>."</p></blockquote><p>There are two general ways to apply backpressure:</p><ol><li><p><strong>Flow control</strong> is a mechanism through which the server asks the client to slow down incoming requests only to receive what it can process. But that requires controlling most clients.</p></li><li><p><strong>Load shedding</strong> is simple: drop requests entering your system to accept what the system can process. Multiple strategies exist to select such requests, from random to request tiering.</p></li></ol><p>&#128215; <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Nelson Elhage&quot;,&quot;id&quot;:1597364,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:null,&quot;uuid&quot;:&quot;42b5a447-a82a-4f23-a058-574dfc9c8c15&quot;}" data-component-name="MentionToDOM"></span> 's <em>Graceful behavior at capacity</em> explains that because all systems have limits, it's essential to plan for when such limits are reached. The author then describes the main concepts and techniques commonly employed to protect systems under heavy load and ensure they don't degrade beyond their own capacity.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.nelhage.com/post/systems-at-capacity/&quot;,&quot;text&quot;:&quot;Read the full article on Nelson's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.nelhage.com/post/systems-at-capacity/"><span>Read the full article on Nelson's blog</span></a></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #63]]></title><description><![CDATA[The foundational article about the Log that gave birth to Kafka at LinkedIn, seing Marketplaces through the lens of transaction cost reduction, and how to become insanely well-connected.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-63</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-63</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 09 Dec 2023 10:11:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa84e1bf6-d7c1-4a6f-b12b-db0a8ef679df_1464x828.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#128075; Hi, this is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also: <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>The Log: What every software engineer should know about real-time data&#8217;s unifying abstraction</h2><p><em>Spoiler alert: This 2013 article leads to the origin story of Kafka, the now famous log-based system.</em></p><p>But first, let's start with a refresher on <strong>the Log.</strong></p><blockquote><p>"Sometimes called <strong>write-ahead logs</strong> or <strong>commit logs</strong> or <strong>transaction logs</strong>, logs have been around almost as long as computers and are at the heart of many distributed data systems and real-time application architectures."</p></blockquote><blockquote><p>&#8220;A log is perhaps the simplest possible storage abstraction. It is an append-only, totally-ordered sequence of records ordered by time."</p></blockquote><p>It shines as a tool to <strong>coordinate</strong> software components and systems. If all systems are deterministic, you can reduce the coordination and data replication problems to agreeing on a common log of records.</p><blockquote><p>"The purpose of the log here is to squeeze all the non-determinism out of the input stream to ensure that each replica processing this input stays in sync."</p></blockquote><p>In practice, we can use logs in multiple ways: log all requests (e.g., for a database, the SQL queries) or log the underlying data changes.</p><p>Most systems use a Log as an internal coordination component. However, the article shows it can also be used as a <strong>first-class citizen</strong> to solve data integration problems between systems. That's Kafka.</p><p>The problem <strong>Kafka</strong> solves is simple: the amount of data we process is growing exponentially, and specialized systems are outscaling the "one big generalist database" model. Think ElasticSearch for search, BigQuery and Snowflake for analytics. The more systems we operate, the more data needs to be moved from one to the other. Kafka makes that data movement simpler by separating concerns.</p><blockquote><p>"This experience led me to focus on building <a href="http://kafka.apache.org/">Kafka</a> to combine what we had seen in messaging systems with the log concept popular in databases and distributed system internals. We wanted something to act as a central pipeline first for all activity data, and eventually for many other uses, including data deployment out of Hadoop, monitoring data, etc."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!njtm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bf860ce-913d-44c4-88b1-1a43fbb33e6b_1302x550.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!njtm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bf860ce-913d-44c4-88b1-1a43fbb33e6b_1302x550.png 424w, https://substackcdn.com/image/fetch/$s_!njtm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bf860ce-913d-44c4-88b1-1a43fbb33e6b_1302x550.png 848w, https://substackcdn.com/image/fetch/$s_!njtm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bf860ce-913d-44c4-88b1-1a43fbb33e6b_1302x550.png 1272w, https://substackcdn.com/image/fetch/$s_!njtm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bf860ce-913d-44c4-88b1-1a43fbb33e6b_1302x550.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!njtm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bf860ce-913d-44c4-88b1-1a43fbb33e6b_1302x550.png" width="1302" height="550" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9bf860ce-913d-44c4-88b1-1a43fbb33e6b_1302x550.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:550,&quot;width&quot;:1302,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:130383,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!njtm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bf860ce-913d-44c4-88b1-1a43fbb33e6b_1302x550.png 424w, https://substackcdn.com/image/fetch/$s_!njtm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bf860ce-913d-44c4-88b1-1a43fbb33e6b_1302x550.png 848w, https://substackcdn.com/image/fetch/$s_!njtm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bf860ce-913d-44c4-88b1-1a43fbb33e6b_1302x550.png 1272w, https://substackcdn.com/image/fetch/$s_!njtm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bf860ce-913d-44c4-88b1-1a43fbb33e6b_1302x550.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The Unified Log architecture for data integration between services at LinkedIn. Source: LinkedIn eng.</figcaption></figure></div><p>&#128215; <strong>Jay Kreps</strong>' <em>The Log: What every software engineer should know about real-time data's unifying abstraction</em> is a foundational article describing the story that led him to build Kafka at LinkedIn in the 2010s. After the general introduction about the Log, Jay describes the challenges the team faced building and scaling the Kafka Unified Log.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://engineering.linkedin.com/distributed-systems/log-what-every-software-engineer-should-know-about-real-time-datas-unifying&quot;,&quot;text&quot;:&quot;Read the full article on LinkedIn's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://engineering.linkedin.com/distributed-systems/log-what-every-software-engineer-should-know-about-real-time-datas-unifying"><span>Read the full article on LinkedIn's blog</span></a></p><div><hr></div><h2>The Concept that explains everything about Marketplaces</h2><blockquote><p>"Marketplaces are simply businesses that don't sell goods or services, but instead sell the <strong>reduction of transaction costs</strong>."</p></blockquote><p>There are many theories about these transaction costs. With the help of decades of theory, the author defines four categories:</p><ol><li><p><strong>Search and information costs</strong>: discovering what is available to purchase and comparing alternatives.</p></li><li><p><strong>Bargaining and decision costs</strong>: coming to an agreement between buyer and seller, including establishing the final price and terms.</p></li><li><p><strong>Enforcement and policing costs</strong>: ensuring that both sides holds up their end of the deal.</p></li><li><p><strong>Distribution costs</strong>: actually getting the good or service to the end consumer</p></li></ol><p>All marketplaces help reduce one, many, or all of these costs. Consequently, studying a market's transaction costs is a great way to identify marketplace opportunities. The bigger the cost savings, the more the market will expand.</p><p>For example, Uber reduces the bargaining and decision costs:</p><blockquote><p>"Price transparency used to be a key problem when hiring a taxi. Your only option was to get in the car and watch the meter run up. Now Uber calculates the price ahead of time, making it easier to decide whether or not to take a ride."</p><p>"Kevin Kwok wrote a great <a href="https://kwokchain.com/2018/04/09/quantifying-tam-expansion-uber-and-lyft-in-nyc/">piece</a> about how Uber and Lyft grew the TAM for private cars. Not only that, but they grew TAM precisely in areas where transaction costs were highest."</p></blockquote><p>Looking further, a marketplace's <strong>take rate</strong> can increase as it reduces costs for buyers and sellers. So, the logical evolution for them is to take on more responsibilities and work on the heaviest costs, which are Enforcement costs and Distribution costs. That's also how competitors can disrupt them. For instance, Amazon disrupted eBay with its asset-heavy, fully-managed model, taking on a lot more costs that eBay did.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oVIF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa84e1bf6-d7c1-4a6f-b12b-db0a8ef679df_1464x828.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oVIF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa84e1bf6-d7c1-4a6f-b12b-db0a8ef679df_1464x828.png 424w, https://substackcdn.com/image/fetch/$s_!oVIF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa84e1bf6-d7c1-4a6f-b12b-db0a8ef679df_1464x828.png 848w, https://substackcdn.com/image/fetch/$s_!oVIF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa84e1bf6-d7c1-4a6f-b12b-db0a8ef679df_1464x828.png 1272w, https://substackcdn.com/image/fetch/$s_!oVIF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa84e1bf6-d7c1-4a6f-b12b-db0a8ef679df_1464x828.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oVIF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa84e1bf6-d7c1-4a6f-b12b-db0a8ef679df_1464x828.png" width="1456" height="823" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a84e1bf6-d7c1-4a6f-b12b-db0a8ef679df_1464x828.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:823,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:817898,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oVIF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa84e1bf6-d7c1-4a6f-b12b-db0a8ef679df_1464x828.png 424w, https://substackcdn.com/image/fetch/$s_!oVIF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa84e1bf6-d7c1-4a6f-b12b-db0a8ef679df_1464x828.png 848w, https://substackcdn.com/image/fetch/$s_!oVIF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa84e1bf6-d7c1-4a6f-b12b-db0a8ef679df_1464x828.png 1272w, https://substackcdn.com/image/fetch/$s_!oVIF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa84e1bf6-d7c1-4a6f-b12b-db0a8ef679df_1464x828.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The four stages of marketplaces, bucketed by the type of transaction costs they reduce. Source: Dan Hockenmaier.</figcaption></figure></div><p>&#128215; <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Dan Hockenmaier&quot;,&quot;id&quot;:2607892,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7e1bdeea-74f6-48f7-8d3f-d42dc03bbc08_1080x1080.png&quot;,&quot;uuid&quot;:&quot;7992fa66-8800-46a0-a355-82f2f929c3f5&quot;}" data-component-name="MentionToDOM"></span> 's <em>The Concept That Explains Everything About Marketplaces</em> is an excellent introduction to the transaction cost theory of marketplaces. It's an angle that seems obvious initially but has a lot of depth when analyzed further.</p><div class="embedded-post-wrap" data-attrs="{&quot;id&quot;:131193154,&quot;url&quot;:&quot;https://www.danhock.co/p/transaction-costs&quot;,&quot;publication_id&quot;:1618498,&quot;publication_name&quot;:&quot;Dan Hock's Essays&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11a1fb3e-3fdb-4c66-a47d-7161e068c59e_400x400.png&quot;,&quot;title&quot;:&quot;The Concept That Explains Everything About Marketplaces&quot;,&quot;truncated_body_text&quot;:&quot;While most undergrads were out drinking whatever they drank in the 30s, Ronald Coase was working on a theory that would help him win the Nobel Prize more than 50 years later. In &#8220;The Nature of the Firm&#8221;, Coase demonstrated why businesses must exist at all, instead of individuals just contracting directly with each other. At the core of his rationale was &#8230;&quot;,&quot;date&quot;:&quot;2023-06-27T12:03:18.071Z&quot;,&quot;like_count&quot;:94,&quot;comment_count&quot;:5,&quot;bylines&quot;:[{&quot;id&quot;:2607892,&quot;name&quot;:&quot;Dan Hockenmaier&quot;,&quot;handle&quot;:&quot;danhock&quot;,&quot;previous_name&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7e1bdeea-74f6-48f7-8d3f-d42dc03bbc08_1080x1080.png&quot;,&quot;bio&quot;:&quot;Growth, marketplaces, and trying to separate signal from noise. Strategy and analytics at Faire, partner at Reforge.&quot;,&quot;profile_set_up_at&quot;:&quot;2023-01-09T21:36:09.331Z&quot;,&quot;publicationUsers&quot;:[{&quot;id&quot;:1590795,&quot;user_id&quot;:2607892,&quot;publication_id&quot;:1618498,&quot;role&quot;:&quot;admin&quot;,&quot;public&quot;:true,&quot;is_primary&quot;:false,&quot;publication&quot;:{&quot;id&quot;:1618498,&quot;name&quot;:&quot;Dan Hock's Essays&quot;,&quot;subdomain&quot;:&quot;danhock&quot;,&quot;custom_domain&quot;:&quot;www.danhock.co&quot;,&quot;custom_domain_optional&quot;:false,&quot;hero_text&quot;:&quot;The strategy and tactics of scaling consumer technology businesses. Less frequent, more rigorous essays.&quot;,&quot;logo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/11a1fb3e-3fdb-4c66-a47d-7161e068c59e_400x400.png&quot;,&quot;author_id&quot;:2607892,&quot;theme_var_background_pop&quot;:&quot;#6C0095&quot;,&quot;created_at&quot;:&quot;2023-04-26T18:46:05.929Z&quot;,&quot;rss_website_url&quot;:null,&quot;email_from_name&quot;:&quot;Dan Hockenmaier&quot;,&quot;copyright&quot;:&quot;Dan Hockenmaier&quot;,&quot;founding_plan_name&quot;:null,&quot;community_enabled&quot;:true,&quot;invite_only&quot;:false,&quot;payments_state&quot;:&quot;disabled&quot;,&quot;language&quot;:null,&quot;explicit&quot;:false}}],&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;utm_campaign&quot;:null,&quot;belowTheFold&quot;:true,&quot;type&quot;:&quot;newsletter&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="EmbeddedPostToDOM"><a class="embedded-post" native="true" href="https://www.danhock.co/p/transaction-costs?utm_source=substack&amp;utm_campaign=post_embed&amp;utm_medium=web"><div class="embedded-post-header"><img class="embedded-post-publication-logo" src="https://substackcdn.com/image/fetch/$s_!ieNp!,w_56,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11a1fb3e-3fdb-4c66-a47d-7161e068c59e_400x400.png" loading="lazy"><span class="embedded-post-publication-name">Dan Hock's Essays</span></div><div class="embedded-post-title-wrapper"><div class="embedded-post-title">The Concept That Explains Everything About Marketplaces</div></div><div class="embedded-post-body">While most undergrads were out drinking whatever they drank in the 30s, Ronald Coase was working on a theory that would help him win the Nobel Prize more than 50 years later. In &#8220;The Nature of the Firm&#8221;, Coase demonstrated why businesses must exist at all, instead of individuals just contracting directly with each other. At the core of his rationale was &#8230;</div><div class="embedded-post-cta-wrapper"><span class="embedded-post-cta">Read more</span></div><div class="embedded-post-meta">3 years ago &#183; 94 likes &#183; 5 comments &#183; Dan Hockenmaier</div></a></div><div><hr></div><h2>How to become insanely Well-Connected</h2><p>Networking and relationships are games you can't cheat at. It's also a lifelong one that, when done correctly, has a compounding impact. Your end score is the sum of your life's work to create meaningful connections.</p><blockquote><p>&#8220;The best way to be highly influential is <strong>to be human</strong> to everyone you meet."</p></blockquote><p>Beyond that mantra, here are Chris' <em>Seven Rules for Making Memorable Connections</em>.</p><blockquote><ol><li><p><strong>Convey genuine appreciation</strong>. Actively project warmth and high energy. It's been observed people like you when they feel liked by you."</p></li><li><p><strong>Listen with intent</strong>. Being a great listener is an art. You must strive to actively listen, react, and follow up on every sentence to show you're there, not already thinking about your next meeting.</p></li><li><p><strong>Use humility markers</strong>. Acknowledging your own fallibility and human imperfection can go a long way toward making yourself relatable."</p></li><li><p><strong>Offer unvarnished honesty</strong>. Honesty creates trust, and trust is core to all relationships. It's also probably the easiest on the list to stand out.</p></li><li><p><strong>Blue-sky brainstorm.</strong> [...] Give before thinking about what you get. Always offer something of value before expecting or asking for something in return." Brainstorming with your interlocutor is the simplest form of giving.</p></li><li><p><strong>End every meeting</strong> or conversation with the <strong>feeling and optimism</strong> you'd like to have at the start of your next conversation with the person." Creating a lasting relationship will require many interactions. Whatever you say last will stay, and make the next one easy or hard.</p></li><li><p><strong>Don't fake it till you make it</strong>. And beyond not lying, always come extra prepared to meetings with a specific goal in mind and knowledge about how they can help you reach it. That's particularly true when reaching out to higher-profile people.</p></li></ol></blockquote><p>&#128215; <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Chris Fralic&quot;,&quot;id&quot;:4268996,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/967eee0f-3efb-410a-bcf2-ca44f04e0fa2_48x48.jpeg&quot;,&quot;uuid&quot;:&quot;392ae7ad-cc63-472c-9c8f-aadf2e08dcbb&quot;}" data-component-name="MentionToDOM"></span> 's <em>How to Become Insanely Well-Connected</em> is a great article to prepare for 2024. Networking and relationships should be at the top of your list of things to improve professionally, and Chris' advice on the matter is both actionable and obviously powerful.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://review.firstround.com/how-to-become-insanely-well-connected&quot;,&quot;text&quot;:&quot;Read the full article on First Round&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://review.firstround.com/how-to-become-insanely-well-connected"><span>Read the full article on First Round</span></a></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #62]]></title><description><![CDATA[The how and why of Engineering Strategies, Scaling distributed data problems at Mux, and a primer on Naming things in software.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-62</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-62</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 02 Dec 2023 10:23:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc96f257-b965-45f6-a94e-dbd5f9a2be0c_1453x2037.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#128075; Hi, this is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also: <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>Solving the Engineering Strategy Crisis</h2><p><em>Your Engineering team deserves a Strategy, too.</em></p><p>While absent from most roadmaps, <strong>engineering</strong> work is core to a tech company's team and product health. And if it's not explicit, your company probably has an unspoken engineering strategy.</p><p>What's Engineering Strategy? Taking inspiration from Richard Rumelt's Good Strategy, Bad Strategy, Will Larson says this:</p><blockquote><p>"I believe that <strong>Engineering strategy</strong> comes down to two core components:</p><ol><li><p><strong>Honest diagnosis</strong> that engages with the reality your organization's current needs and challenges"</p></li><li><p><strong>Practical approach</strong> to move forward while addressing the circumstances raised in the diagnosis".</p></li></ol></blockquote><p>Far from the fancy missions and visions, strategy must be rooted in the current situation and truth. The more honest it is about the present, the more it can be used to guide the future.</p><p>Why is it important?</p><p>Explicit strategy aligns people around a common approach, creates consistency within the company, focuses resources on improvements to that common approach that benefit everyone, and facilitates hard decisions.</p><p>I know what you're thinking: these aren't specific to engineering. Think about scaling your org, onboarding new people, and decentralizing decision-making. Having a written strategy will make these processes smoother. So write that strategy down!</p><blockquote><p>"You can solve half the engineering strategy crisis by just <strong>writing stuff down.</strong>"</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Vo92!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39b26d68-64d3-4915-8f5c-e29ce8ef6cf0_1289x1332.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Vo92!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39b26d68-64d3-4915-8f5c-e29ce8ef6cf0_1289x1332.png 424w, https://substackcdn.com/image/fetch/$s_!Vo92!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39b26d68-64d3-4915-8f5c-e29ce8ef6cf0_1289x1332.png 848w, https://substackcdn.com/image/fetch/$s_!Vo92!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39b26d68-64d3-4915-8f5c-e29ce8ef6cf0_1289x1332.png 1272w, https://substackcdn.com/image/fetch/$s_!Vo92!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39b26d68-64d3-4915-8f5c-e29ce8ef6cf0_1289x1332.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Vo92!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39b26d68-64d3-4915-8f5c-e29ce8ef6cf0_1289x1332.png" width="1289" height="1332" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/39b26d68-64d3-4915-8f5c-e29ce8ef6cf0_1289x1332.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1332,&quot;width&quot;:1289,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:298724,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Vo92!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39b26d68-64d3-4915-8f5c-e29ce8ef6cf0_1289x1332.png 424w, https://substackcdn.com/image/fetch/$s_!Vo92!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39b26d68-64d3-4915-8f5c-e29ce8ef6cf0_1289x1332.png 848w, https://substackcdn.com/image/fetch/$s_!Vo92!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39b26d68-64d3-4915-8f5c-e29ce8ef6cf0_1289x1332.png 1272w, https://substackcdn.com/image/fetch/$s_!Vo92!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39b26d68-64d3-4915-8f5c-e29ce8ef6cf0_1289x1332.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Stripe&#8217;s engineering strategy, according to Will Larson.</figcaption></figure></div><p>&#128215; <strong>Will Larson</strong>'s <em>Solving the Engineering strategy crisis</em> then explains how to define (or find) your strategy. It's often already there, but you need to put the right words and align people with it. If you don't know where to start, Will gives examples of engineering strategies of his previous companies: Stripe, Uber, Calm. You'll see how radically different they can be!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://lethain.com/solving-the-engineering-strategy-crisis/&quot;,&quot;text&quot;:&quot;Read the full article on Will's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://lethain.com/solving-the-engineering-strategy-crisis/"><span>Read the full article on Will's blog</span></a></p><div><hr></div><h2>Scaling data processing at Mux with an embedded key-value store</h2><p><em>How Mux, a video infrastructure company, moved their view management system to a "Shared Nothing" architecture.</em></p><p>The <a href="https://www.mux.com/">Mux</a> Data team owns a system that does viewer analytics and stores finished views to allow resuming views. Because the requirements of analytics (large-scale aggregations) and view resumption (row-level queries) are opposite, they split it into two sub-systems:</p><ol><li><p><strong>Analytics</strong> are powered by an OLAP system, ClickHouse, ingests all view events from Kafka.</p></li><li><p><strong>Row-level access</strong> was powered by Riak, a distributed key-value store used as a 6-hour cache, also ingesting events from Kafka.</p></li></ol><blockquote><p>"Riak became increasingly difficult to operate as Mux Data usage grew, compounded by a growing number of live video events. Unlike on-demand video consumption, live events have fundamentally different viewership patterns."</p></blockquote><p>Traffic became much spikier, with requests in the hundred thousand per second. Because Riak is a distributed database, its capacity isn't elastic. Scaling it up and down requires human intervention. So, the team had to provision it for peak usage, which is very inefficient overall.</p><p>Even then, Riak would stall when provisioned to its maximum capacity, and data ingestion would fall behind.</p><blockquote><p>"Riak often became a <strong>write-throughput bottleneck</strong> when viewers left a stream en masse. Degraded Riak write performance could cause stream-processing lag, possibly leading to delayed data in our Mux Data Monitoring dashboard."</p></blockquote><p>At this point, the team knew they couldn't continue scaling Riak. They went back to the drawing board. And they realized something. <strong>They didn't need a unified store</strong> because Kafka already partitioned their events into independent streams.</p><blockquote><p>"Rather than running a networked, distributed KV store (Riak, Redis, etc.), we could instead have the event processors manage many independent partition-scoped embedded KV stores on local disk."</p></blockquote><blockquote><p>"We leveraged the keyed, partitioned nature of the data in Kafka to scope each cache to a single Kafka topic partition, leading to a cache architecture following the <strong>Shared Nothing pattern</strong> <em>[from Martin Kleppmann's Designing Data-Intensive Applications book]</em>."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!affL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc96f257-b965-45f6-a94e-dbd5f9a2be0c_1453x2037.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!affL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc96f257-b965-45f6-a94e-dbd5f9a2be0c_1453x2037.png 424w, https://substackcdn.com/image/fetch/$s_!affL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc96f257-b965-45f6-a94e-dbd5f9a2be0c_1453x2037.png 848w, https://substackcdn.com/image/fetch/$s_!affL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc96f257-b965-45f6-a94e-dbd5f9a2be0c_1453x2037.png 1272w, https://substackcdn.com/image/fetch/$s_!affL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc96f257-b965-45f6-a94e-dbd5f9a2be0c_1453x2037.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!affL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc96f257-b965-45f6-a94e-dbd5f9a2be0c_1453x2037.png" width="562" height="787.8830006882313" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc96f257-b965-45f6-a94e-dbd5f9a2be0c_1453x2037.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2037,&quot;width&quot;:1453,&quot;resizeWidth&quot;:562,&quot;bytes&quot;:421212,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!affL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc96f257-b965-45f6-a94e-dbd5f9a2be0c_1453x2037.png 424w, https://substackcdn.com/image/fetch/$s_!affL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc96f257-b965-45f6-a94e-dbd5f9a2be0c_1453x2037.png 848w, https://substackcdn.com/image/fetch/$s_!affL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc96f257-b965-45f6-a94e-dbd5f9a2be0c_1453x2037.png 1272w, https://substackcdn.com/image/fetch/$s_!affL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc96f257-b965-45f6-a94e-dbd5f9a2be0c_1453x2037.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Mux&#8217;s move to a &#8220;shared nothing&#8221; distributed processing architecture. Source: Mux.</figcaption></figure></div><p>The team removed Riak's network requests and coordination bottlenecks by writing directly into an embedded (understand local) key-value store inside the processing Pod. The trade-off is having to manually manage the persistence of that data during rebalancing and upgrades.</p><p>&#128215; <strong>Scott Kidder</strong>'s <em>Scaling data processing with an embedded key-value store</em>," tells the story of a team that started with a pragmatic choice and successfully re-evaluated their options once it began to show scale issues. Scott also clearly explains that there is no silver bullet; this complex solution works for Mux because of its architecture and spiky, write-heavy workload. And last, it's not simple to set up! Even the world-class Mux team struggled to make the persistence work at all times, so think twice before building your own distributed system!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.mux.com/blog/migrating-to-badgerdb&quot;,&quot;text&quot;:&quot;Read the full article on Mux's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.mux.com/blog/migrating-to-badgerdb"><span>Read the full article on Mux's blog</span></a></p><div><hr></div><h2>Your Codebase deserves Better Names</h2><p>Poor naming is probably the fastest and dumbest way to accumulate tech debt. But it also is the most common. In particular when English isn't your team's primary language. Luckily, it's 1) easy to improve at, 2) trivial to refactor, and 3) can even improve the code itself!</p><p>Beyond these apparent reasons, putting effort into naming has a valuable side-effect: it helps detect spaghetti code:</p><blockquote><p>"When it feels impossible to name something, step back and figure out what you really want your code to do before you write any more of it."</p></blockquote><p>So, <strong>what's a great name?</strong> It should be:</p><blockquote><ol><li><p><strong>Descriptive</strong>. [...] Names should describe what the code does, in detail."</p></li><li><p><strong>Specific</strong>. [...] making sure your words are as precise and specific as possible is essential for a great name."</p></li></ol></blockquote><p>Get rid of the <em>doXYZ</em> and <em>getXYZ</em> methods and the foo and bar variables. Using specific and consistent nouns and verbs to describe concepts makes a massive difference to the readability of your code.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!92gA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc04aba4-983c-40df-9266-8104e022af91_1412x488.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!92gA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc04aba4-983c-40df-9266-8104e022af91_1412x488.png 424w, https://substackcdn.com/image/fetch/$s_!92gA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc04aba4-983c-40df-9266-8104e022af91_1412x488.png 848w, https://substackcdn.com/image/fetch/$s_!92gA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc04aba4-983c-40df-9266-8104e022af91_1412x488.png 1272w, https://substackcdn.com/image/fetch/$s_!92gA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc04aba4-983c-40df-9266-8104e022af91_1412x488.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!92gA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc04aba4-983c-40df-9266-8104e022af91_1412x488.png" width="1412" height="488" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fc04aba4-983c-40df-9266-8104e022af91_1412x488.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:488,&quot;width&quot;:1412,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:99191,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!92gA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc04aba4-983c-40df-9266-8104e022af91_1412x488.png 424w, https://substackcdn.com/image/fetch/$s_!92gA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc04aba4-983c-40df-9266-8104e022af91_1412x488.png 848w, https://substackcdn.com/image/fetch/$s_!92gA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc04aba4-983c-40df-9266-8104e022af91_1412x488.png 1272w, https://substackcdn.com/image/fetch/$s_!92gA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc04aba4-983c-40df-9266-8104e022af91_1412x488.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Good and bad examples. Source: Emma Ferguson, Samsara.</figcaption></figure></div><p>To find these specific words, first scan the codebase for similar occurrences, and if you can't find any, <strong>use a thesaurus</strong> (I use <a href="https://www.powerthesaurus.org/">Power Thesaurus</a>) to generate ideas. Start with a concept and explore synonyms until you discover the perfect one.</p><blockquote><ol start="3"><li><p>In line with codebase <strong>conventions</strong>". Consistency is underrated.</p></li><li><p><strong>Grammatical</strong>."</p></li></ol></blockquote><p>For non-English speaking teams, grammar is usually the biggest hurdle. That's OK. Accept it and use Grammarly or translation tools to ensure your names are correct; it's the only way to learn.</p><p>Grammar-wise, there are a few general rules that you can always apply:</p><ol><li><p>The most important noun should be last, and adjectives before it: <em>ConnectedOrderBuilder</em>, <em>NetworkConnectivityInspector</em>.</p></li><li><p>Use verbs for actions and place them first: <em>renderBlueLogo</em>, <em>openDatabaseConnection</em>.</p></li></ol><p>&#128215; <strong>Emma Ferguson</strong>'s <em>Your Codebase Deserves Better Names</em> is a rare actionable article on naming. While the famous saying is that "cache invalidation and naming things" are the most complex problems in computer science, there are many more articles on the former. So, thank you, Emma, for clarifying this simple but impactful topic!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://medium.com/samsara-engineering/your-codebase-deserves-better-names-d53fa2283c26&quot;,&quot;text&quot;:&quot;Read the full article on Samsara's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://medium.com/samsara-engineering/your-codebase-deserves-better-names-d53fa2283c26"><span>Read the full article on Samsara's blog</span></a></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #61]]></title><description><![CDATA[The key method for outcome-driven product teams, a foundational paper of relational database query engines from the 70s, and building a CSS-only design editor at Canva.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-61</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-61</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 18 Nov 2023 10:11:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceab191f-ccdf-453c-ba41-bd302004f407_1793x976.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#128075; Hi, this is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also: <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>The Value Engineering method</h2><p><em>Product people, this is for you! </em>Switching from an output to an <strong>outcome-driven</strong> product culture isn't enough. You must fundamentally change the way you work as a company to make a difference. Otherwise, your shiny new outcomes just map to your old outputs.</p><blockquote><p>"In an outcome-driven environment, organizations have shifted focus to funding teams and outcomes over work. [...] The reality is that many initiatives continue to run through 'completion' and are judged on their results."</p></blockquote><p>To be effective, one must match an outcome-driven culture with an <strong>incremental approach</strong> to value creation&#8211;with checkpoints and milestones. That's called Value Engineering.</p><blockquote><p>"The <strong>Value Engineering</strong> approach recognizes these initiatives as a portfolio of <strong>bets</strong> and uses an evidence-based approach to make decisions as new information is revealed. [...] It is an evidence-based decision making model for identifying when to pivot, persevere, or stop investments."</p></blockquote><p>That decision-making model is based on incremental bets to create learnings and near-instant usage of these learnings. Here's a template for each initiative:</p><blockquote><ol><li><p><strong>Hypothesis</strong>: We believe [this capability] will result in [this outcome]. We will have confidence to proceed when we see a [measurable signal].</p></li><li><p><strong>Desired outcome</strong>: Explanation of a future state, ideally measurable. This might be an OKR, a target for a KPI, or just an articulation of the future."</p></li><li><p><strong>Max bet</strong>: If you could buy the outcome off the shelf, how much would you pay? This can be in terms of dollars, but it's often easier to define this as people over time (e.g. 2 teams over 16 weeks)"</p></li></ol></blockquote><p>After each incremental bet, we ask the same question:</p><blockquote><p>"Do we <strong>pivot</strong>, <strong>persevere</strong>, or <strong>quit</strong>?"</p><p>"That decision may be <strong>relative</strong> to other investments. Because we can plot other initiatives across these axes, we can visualize whether or not we have longer-running initiatives worth doubling down on or earlier initiatives showing more promise."</p></blockquote><p>That last point is what makes the Value Engineering method so strong. It gives you a framework to visualize initiatives relative to each other and compare them to make the necessary trade-offs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Eznn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceab191f-ccdf-453c-ba41-bd302004f407_1793x976.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Eznn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceab191f-ccdf-453c-ba41-bd302004f407_1793x976.png 424w, https://substackcdn.com/image/fetch/$s_!Eznn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceab191f-ccdf-453c-ba41-bd302004f407_1793x976.png 848w, https://substackcdn.com/image/fetch/$s_!Eznn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceab191f-ccdf-453c-ba41-bd302004f407_1793x976.png 1272w, https://substackcdn.com/image/fetch/$s_!Eznn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceab191f-ccdf-453c-ba41-bd302004f407_1793x976.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Eznn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceab191f-ccdf-453c-ba41-bd302004f407_1793x976.png" width="1456" height="793" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ceab191f-ccdf-453c-ba41-bd302004f407_1793x976.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:793,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Eznn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceab191f-ccdf-453c-ba41-bd302004f407_1793x976.png 424w, https://substackcdn.com/image/fetch/$s_!Eznn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceab191f-ccdf-453c-ba41-bd302004f407_1793x976.png 848w, https://substackcdn.com/image/fetch/$s_!Eznn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceab191f-ccdf-453c-ba41-bd302004f407_1793x976.png 1272w, https://substackcdn.com/image/fetch/$s_!Eznn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceab191f-ccdf-453c-ba41-bd302004f407_1793x976.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The outcome progress visualization.</figcaption></figure></div><p>&#128215; <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Barry O'Reilly&quot;,&quot;id&quot;:1235418,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/dc629bcd-5054-42f6-8906-ca9efc987e55_1024x683.jpeg&quot;,&quot;uuid&quot;:&quot;97bbc64a-bf00-437e-8ece-ea59e25c85db&quot;}" data-component-name="MentionToDOM"></span> 's <em>Value Engineering</em> article is a must-read for product people in outcome-driven cultures. As Barry puts it, "With one checkpoint (at the end), the only potential scenarios are luck or overcommitment.". Building that test, learn, and iterate culture is a necessary first step, but it's the plotting and visualization that will make your decisions more intentional and strategic.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.theuncertaintyproject.org/tools/value-engineering&quot;,&quot;text&quot;:&quot;Read the full article&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.theuncertaintyproject.org/tools/value-engineering"><span>Read the full article</span></a></p><div><hr></div><h2>Access Path Selection in a Relational Database Management System</h2><p><em>SQL and relational databases are 50 years old!</em></p><p>Most modern systems still use the language and query optimization concepts from the 70s. The papers of that era from the <strong>IBM Research Division</strong> are a treasure trove of canonical papers. In particular, one <strong>paper</strong> is the father of many systems.</p><blockquote><p>"<em>Access Path Selection in a Relational Database Management System</em>" from Patricia Griffiths Selinger.</p></blockquote><p>The IBM team built <strong>System R</strong>, one of the first-ever <strong>relational</strong> databases.</p><blockquote><p>"System R is an experimental database management system developed to carry out research on the relational model of data."</p></blockquote><p>The paper describes how System R does <strong>Access Path Selection</strong>, meaning turning a SQL query into a plan to retrieve the data from disk, filter, and join it to satisfy the query.</p><blockquote><p>"The <strong>four phases</strong> of [SQL] statement processing are:</p><ol><li><p>Parsing,</p></li><li><p>Optimization,</p></li><li><p>Code generation,</p></li><li><p>Execution."</p></li></ol></blockquote><p>Parsing is quite simple to understand. Code generation and execution are intelligent ways to execute the defined plan. The focus of the article is on the second step: the OPTIMIZER.</p><p>&#9654;&#65038; "The <strong>OPTIMIZER</strong> accumulates the names of tables and columns referenced in the query and looks them up in the System R catalogs to verify their existence and to retrieve information about them. [...] Finally the OPTIMIZER performs access path selection. It first determines the <strong>evaluation order</strong> among the query blocks in the statement. Then for each query block, the relations in the FROM list are processed. If there is more than one relation in a block, permutations of the join order and of the method of joining are evaluated. The access paths that <strong>minimize total cost</strong> for the block are chosen from a tree of alternate path choices."</p><p>That's the high-level approach System R and many following databases took for the next 50 years. Compute the cost of possible access paths, compare them, and take the smallest. But how does the costing work?</p><p>&#9654;&#65038; "During catalog lookup, the OPTIMIZER retrieves statistics on the relations in the query and on the access paths available on each relation. [...] Using these statistics, the OPTIMIZER assigns a <strong>selectivity factor</strong> 'F' for each boolean factor in the predicate list. This selectivity factor very roughly corresponds to the expected fraction of tuples which will satisfy the predicate."</p><p>For example, the selectivity factor of a single field = &#8216;value&#8217; clause is computed as <code>1 / field cardinality</code>.</p><p>By merging that selectivity factor with the costs of accessing each path, the optimizer can make trade-offs between sequential and index reads and, more generally, choose the lowest cost path.</p><p>&#128215; <strong>Patricia Griffiths Selinger</strong>'s <em>Access Path Selection in a Relational Database Management System</em> paper from 1979 then covers the cost formula for single path access and joins, as well as the selection algorithms involved&#8212;a nice read into the world of databases.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://courses.cs.duke.edu/compsci516/cps216/spring03/papers/selinger-etal-1979.pdf&quot;,&quot;text&quot;:&quot;Read the full paper&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://courses.cs.duke.edu/compsci516/cps216/spring03/papers/selinger-etal-1979.pdf"><span>Read the full paper</span></a></p><div><hr></div><h2>Absolutely positioning things relatively at Canva</h2><p><em>How Canva automatically turns designs into responsive websites.</em></p><p>For their new <strong>Websites</strong> product, a Canva team needed to go beyond the limits of the Canva editor.</p><blockquote><p>"Canva is a design platform where users can create designs by freely dragging and dropping elements using our fixed dimensions editor."</p></blockquote><blockquote><p>"Our challenge is whether we can do this automatically at scale. Can we take any design and render it <strong>responsively</strong>? And just for a challenge, can we do all this without JavaScript?"</p></blockquote><p></p><p>Their initial thought was to stick with absolute positioning and <strong>scale everything</strong> according to the device's dimensions. Users place elements inside the drag-and-drop editor, giving fixed coordinates for each.</p><blockquote><p>"There are a few optimizations we can make, but there's one big problem: the text becomes impossible to read [on smaller devices]."</p></blockquote><p>And because absolute is, well, absolute, text will overflow the elements if you don't scale it down with the rest of the design. So, absolute positioning was out of the picture.</p><p></p><blockquote><p>"We need a simple absolute positioning system, but the reflowing text should influence the position of other elements. That is, the <strong>best of both</strong> absolute positioning and the normal relative flow."</p></blockquote><p>The team achieved this using <strong>CSS Grids</strong>. In the world of CSS Grids, you define as many rows and columns as needed and give each element a start, end row, and column on the grid.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lem1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42b2ee47-f7d0-4635-b696-841ad545558f_800x445.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lem1!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42b2ee47-f7d0-4635-b696-841ad545558f_800x445.gif 424w, https://substackcdn.com/image/fetch/$s_!lem1!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42b2ee47-f7d0-4635-b696-841ad545558f_800x445.gif 848w, https://substackcdn.com/image/fetch/$s_!lem1!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42b2ee47-f7d0-4635-b696-841ad545558f_800x445.gif 1272w, https://substackcdn.com/image/fetch/$s_!lem1!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42b2ee47-f7d0-4635-b696-841ad545558f_800x445.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lem1!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42b2ee47-f7d0-4635-b696-841ad545558f_800x445.gif" width="800" height="445" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/42b2ee47-f7d0-4635-b696-841ad545558f_800x445.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:445,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Aper&#231;u de l&#8217;image&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Aper&#231;u de l&#8217;image" title="Aper&#231;u de l&#8217;image" srcset="https://substackcdn.com/image/fetch/$s_!lem1!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42b2ee47-f7d0-4635-b696-841ad545558f_800x445.gif 424w, https://substackcdn.com/image/fetch/$s_!lem1!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42b2ee47-f7d0-4635-b696-841ad545558f_800x445.gif 848w, https://substackcdn.com/image/fetch/$s_!lem1!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42b2ee47-f7d0-4635-b696-841ad545558f_800x445.gif 1272w, https://substackcdn.com/image/fetch/$s_!lem1!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42b2ee47-f7d0-4635-b696-841ad545558f_800x445.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The CSS-Grid-based editor in action. Text overflows nicely during the resize without the need to scale it.</figcaption></figure></div><p>Because rows and columns can't overlap, they can stretch to accommodate content and thus avoid the pitfalls of absolute positioning.</p><blockquote><p>"To calculate the grid-template-columns, we calculate the offset as a percentage of the design/screen width from the previous column."</p></blockquote><p>The trick is not to use percentages only but to combine them with <strong>max-content</strong>: </p><p><code>min-max (12vw, max-content)</code></p><p>Max-content will ensure the columns and rows can grow beyond the fixed percentage to always fit their content.</p><p>&#128215; <strong>Benjamin Morris</strong>'s <em>CSS: Absolutely positioning things relatively</em> describes the team's journey to figure out the right software solution to the complex problem that is solving responsiveness auto-magically. Beyond performance, the team put much effort into creating the best user experience, making it a super interesting read.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.canva.dev/blog/engineering/css-absolutely-positioning-things-relatively/&quot;,&quot;text&quot;:&quot;Read the full article on Canva's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.canva.dev/blog/engineering/css-absolutely-positioning-things-relatively/"><span>Read the full article on Canva's blog</span></a></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #60]]></title><description><![CDATA[A visual reference of CSS selectors, B-tree B+-tree and binary tree real-world usage in ScyllaDB, an an essay on why writing can be your superpower.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-60</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-60</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 04 Nov 2023 10:11:35 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feeeb9ae3-bcf0-4be0-bbae-c7c15066ebd7_1100x475.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#128075; Hi, this is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also: <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>CSS Selectors: a visual guide and reference</h2><p>Every style you apply with Javascript has a more elegant <strong>CSS-only</strong> alternative. And that's a great way to tell apart senior frontend engineers from React-only tinkerers. They have a deep knowledge of <strong>CSS selectors</strong>.</p><blockquote><p>&#8220;CSS selectors are patterns used in CSS to select and style HTML elements on a page."</p></blockquote><p>And with every new browser version comes a new set of CSS language extensions, including many new selectors. So they're something you must learn and re-learn.</p><p>Along with traditional CSS selectors, CSS has <strong>pseudo-classes</strong> and <strong>pseudo-elements</strong>. They're called <em>pseudo</em> because they're not user-applied classes nor actual HTML elements but can be selected precisely like classes and elements.</p><blockquote><p>&#8220;<strong>Pseudo-classes</strong> allow us to define styles based on an element's state or its relation to other elements. [...] Pseudo-classes start with a colon character (:)."</p></blockquote><blockquote><p>&#8220;<strong>Pseudo-elements</strong> give you the power to target and style specific parts of an element, such as its first line or before and after its content. Pseudo-elements start with two colons (::)."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!r2cI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46493d9d-1c7b-4e13-b173-5bd7b8862a43_1768x1178.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r2cI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46493d9d-1c7b-4e13-b173-5bd7b8862a43_1768x1178.png 424w, https://substackcdn.com/image/fetch/$s_!r2cI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46493d9d-1c7b-4e13-b173-5bd7b8862a43_1768x1178.png 848w, https://substackcdn.com/image/fetch/$s_!r2cI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46493d9d-1c7b-4e13-b173-5bd7b8862a43_1768x1178.png 1272w, https://substackcdn.com/image/fetch/$s_!r2cI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46493d9d-1c7b-4e13-b173-5bd7b8862a43_1768x1178.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!r2cI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46493d9d-1c7b-4e13-b173-5bd7b8862a43_1768x1178.png" width="618" height="411.717032967033" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/46493d9d-1c7b-4e13-b173-5bd7b8862a43_1768x1178.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:970,&quot;width&quot;:1456,&quot;resizeWidth&quot;:618,&quot;bytes&quot;:211355,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!r2cI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46493d9d-1c7b-4e13-b173-5bd7b8862a43_1768x1178.png 424w, https://substackcdn.com/image/fetch/$s_!r2cI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46493d9d-1c7b-4e13-b173-5bd7b8862a43_1768x1178.png 848w, https://substackcdn.com/image/fetch/$s_!r2cI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46493d9d-1c7b-4e13-b173-5bd7b8862a43_1768x1178.png 1272w, https://substackcdn.com/image/fetch/$s_!r2cI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46493d9d-1c7b-4e13-b173-5bd7b8862a43_1768x1178.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The &#8216;lobotomized owl&#8217; CSS selector. Source: fffuel.co</figcaption></figure></div><p>&#128215; <strong>S&#233;bastien No&#235;l</strong>'s <em>CSS Selectors: A Visual Guide &amp; Reference</em> describes the most popular and useful CSS selectors. It's an effective way to grow your frontend engineering skills and replace your 100-line Javascript style functions with an elegant CSS solution.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://fffuel.co/css-selectors/&quot;,&quot;text&quot;:&quot;Read the full article&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://fffuel.co/css-selectors/"><span>Read the full article</span></a></p><div><hr></div><h2>The taming of the B-trees</h2><p><em>B-trees, binary trees, what&#8217;s the difference? Let's learn from engineers who have had to make this critical decision to build a database: Scylla DB.</em></p><blockquote><p>"One of the core components that greatly affects ScyllaDB's performance is the in-memory cache of the user data (we call it the <a href="https://github.com/scylladb/scylladb/blob/master/docs/dev/row_cache.md">row cache</a>). And one of the key factors to achieving the performance goal is a good selection of collections".</p></blockquote><p>Let's start with definitions.</p><ol><li><p>A <strong>binary tree</strong> is a tree data structure in which each node has at most two children.</p></li><li><p>The tree is called a <strong>B-tree</strong> when the number of children per node is <strong>higher than two</strong>. Fun fact: the "B" doesn't stand for anything officially; it's just "B".</p></li></ol><blockquote><p>"The common belief about binary vs B- trees is that the former ones should be used when the data is stored in the RAM, whilst the latter trees should live in the disk. [...] However, there are many reasons why B-trees are often a good choice for in-memory collections."</p></blockquote><p>With newer hardware and all datasets getting larger, B-trees and their variants can significantly improve performance over binary trees.</p><blockquote><p>"On a B-tree, this <strong>search will consist of two phases</strong> &#8212; intra-node search and descending the tree &#8212; executed one after another."</p></blockquote><blockquote><p>&#8220;The two-phased B-tree search can be made better with respect to branch predictions. The trick is in making the intra-node search linear, i.e. walking the array of keys forward key-by-key. In this case, there will be only a "should we move forward" condition that's much more predictable."</p></blockquote><p>And with SIMD instructions doing linear search on up to 64 values simultaneously, that intra-node search can be further optimized to give B-trees a big edge.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7laY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feeeb9ae3-bcf0-4be0-bbae-c7c15066ebd7_1100x475.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7laY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feeeb9ae3-bcf0-4be0-bbae-c7c15066ebd7_1100x475.png 424w, https://substackcdn.com/image/fetch/$s_!7laY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feeeb9ae3-bcf0-4be0-bbae-c7c15066ebd7_1100x475.png 848w, https://substackcdn.com/image/fetch/$s_!7laY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feeeb9ae3-bcf0-4be0-bbae-c7c15066ebd7_1100x475.png 1272w, https://substackcdn.com/image/fetch/$s_!7laY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feeeb9ae3-bcf0-4be0-bbae-c7c15066ebd7_1100x475.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7laY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feeeb9ae3-bcf0-4be0-bbae-c7c15066ebd7_1100x475.png" width="560" height="241.8181818181818" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eeeb9ae3-bcf0-4be0-bbae-c7c15066ebd7_1100x475.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:475,&quot;width&quot;:1100,&quot;resizeWidth&quot;:560,&quot;bytes&quot;:48969,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7laY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feeeb9ae3-bcf0-4be0-bbae-c7c15066ebd7_1100x475.png 424w, https://substackcdn.com/image/fetch/$s_!7laY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feeeb9ae3-bcf0-4be0-bbae-c7c15066ebd7_1100x475.png 848w, https://substackcdn.com/image/fetch/$s_!7laY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feeeb9ae3-bcf0-4be0-bbae-c7c15066ebd7_1100x475.png 1272w, https://substackcdn.com/image/fetch/$s_!7laY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feeeb9ae3-bcf0-4be0-bbae-c7c15066ebd7_1100x475.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The B+-tree is a B-Tree variant that has all values on leaves. Source: ScyllaDB.</figcaption></figure></div><p>&#128215; <strong>Pavel Emelyanov</strong>'s <em>The Taming of the B-Trees</em> goes further than describing how great B-trees can be. The rest of the article describes B+-trees, a variant of the B-trees that only have values on leaf nodes and the solutions the Scylla engineers had to develop to use B+-trees in production. Academic theory often needs real-world adaptation that companies rarely share, making the post even more valuable.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.scylladb.com/2021/11/23/the-taming-of-the-b-trees/&quot;,&quot;text&quot;:&quot;Read the full article on ScyllaDB's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.scylladb.com/2021/11/23/the-taming-of-the-b-trees/"><span>Read the full article on ScyllaDB's blog</span></a></p><div><hr></div><h2>Why write?</h2><blockquote><p>"Why write an essay when you can type a few words and have AI generate one for you?"</p></blockquote><p>Writing is a lot more than coming up with words and sentences. The process can create a higher value than output. Let's explore why:</p><blockquote><ol><li><p>&#8220;Writing is not just a vehicle to share ideas with others but also a way to <strong>understand</strong> them better yourself."</p></li><li><p>Writing requires the <strong>compression of an idea</strong>." <em>That compression requires deep understanding of the essence of the topic.</em></p></li></ol></blockquote><p>Why write in the ocean of mediocre AI-generated content? Why now?</p><p>Think about it: if no one understands anything to the level of being able to write about it anymore, this can be your superpower.</p><p>&#128215; Farnam Street's <em>Why Write</em> is a quick reminder that the value of writing goes beyond sharing content with the world. The profound personal impact is almost more valuable; it's like journaling. Write about what you did and what you'll do. Write about your strategy.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://fs.blog/why-write/&quot;,&quot;text&quot;:&quot;Read the full essay on FS&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://fs.blog/why-write/"><span>Read the full essay on FS</span></a></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #59]]></title><description><![CDATA[How computers run programs, Slack's globally distributed networking setup, and four foundational principles of Design communication.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-59</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-59</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 21 Oct 2023 09:12:01 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9e944a1-7c26-433f-94c1-60cbfcf8ef22_763x362.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#128075; Hi, this is Mathias, back from holidays &#128526; with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also: <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>Putting the "You" in CPU: a rabbit hole into how your computer runs programs</h2><p>As modern software engineers, our day job happens a thousand abstraction layers above the CPU. Unless you're from a pure CS background, you've never bothered to learn how it works. Why should you?</p><p>Because it's cool, and it's beautifully simple!</p><blockquote><p>"The one thing that surprised me over and over again while writing this article was how simple computers are."</p></blockquote><p>That simple? Let's dive into it:</p><blockquote><p>"The <strong>central processing unit</strong> (CPU) of a computer is in charge of computation. [...] The "instructions" that CPUs execute are just binary data: a byte or two to represent what instruction is being run (the opcode), followed by whatever data is needed to run the instruction."</p></blockquote><blockquote><p>"What we call <strong>machine code</strong> is nothing but a series of these binary instructions in a row. Assembly is a helpful syntax for reading and writing machine code that's easier for humans to read and write than raw bits; it is always compiled to the binary that your CPU knows how to read."</p></blockquote><blockquote><p>"The CPU always reads machine code directly from RAM, and code can't be run if it isn't loaded into RAM."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9Kag!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa261e387-6f16-4acc-b9b8-f1b39f56432c_935x505.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9Kag!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa261e387-6f16-4acc-b9b8-f1b39f56432c_935x505.png 424w, https://substackcdn.com/image/fetch/$s_!9Kag!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa261e387-6f16-4acc-b9b8-f1b39f56432c_935x505.png 848w, https://substackcdn.com/image/fetch/$s_!9Kag!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa261e387-6f16-4acc-b9b8-f1b39f56432c_935x505.png 1272w, https://substackcdn.com/image/fetch/$s_!9Kag!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa261e387-6f16-4acc-b9b8-f1b39f56432c_935x505.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9Kag!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa261e387-6f16-4acc-b9b8-f1b39f56432c_935x505.png" width="602" height="325.14438502673795" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a261e387-6f16-4acc-b9b8-f1b39f56432c_935x505.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:505,&quot;width&quot;:935,&quot;resizeWidth&quot;:602,&quot;bytes&quot;:55768,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9Kag!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa261e387-6f16-4acc-b9b8-f1b39f56432c_935x505.png 424w, https://substackcdn.com/image/fetch/$s_!9Kag!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa261e387-6f16-4acc-b9b8-f1b39f56432c_935x505.png 848w, https://substackcdn.com/image/fetch/$s_!9Kag!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa261e387-6f16-4acc-b9b8-f1b39f56432c_935x505.png 1272w, https://substackcdn.com/image/fetch/$s_!9Kag!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa261e387-6f16-4acc-b9b8-f1b39f56432c_935x505.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Machine code. Source: cpu.land.</figcaption></figure></div><p>The CPU fetches instructions from RAM, executes them, and then moves on to fetch and execute more instructions. While it does that, it is in one of two modes: User or Kernel.</p><blockquote><p>"In <strong>kernel mode</strong>, anything goes: the CPU is allowed to execute any supported instruction and access any memory. In <strong>user mode</strong>, only a subset of instructions is allowed, I/O and memory access is limited, and many CPU settings are locked."</p></blockquote><p>Processors start in kernel mode and switch to user mode when executing non-OS code. User code can only access memory and secure instructions by securely switching back to kernel mode for a defined set of instructions: system calls.</p><blockquote><p>"Programs typically use these syscalls by calling shared library functions. These wrap machine code [...] that transfers control to the OS kernel and switches rings. The kernel does its business and switches back to user mode and returns to the program code."</p></blockquote><p>&#128215; <strong>Lexi Mattick</strong>'s <em>Putting the You in CPU</em> is a long-form read on how computers run code, starting from the lowest system abstraction. What's unique about it is how clearly the author describes the different layers, and how, step-by-step, they build your understanding of computers' internals.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://cpu.land/&quot;,&quot;text&quot;:&quot;Read the full series&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://cpu.land/"><span>Read the full series</span></a></p><div><hr></div><h2>Slack&#8217;s resilient networking infrastructure</h2><p>Maintaining high-availability SLAs for a real-time product with millions of customers globally is a complex networking challenge. <strong>Slack</strong> is an excellent example with relatively low latency requirements. The team has designed a redundant networking architecture that can sustain quite a lot of failure. And lucky us, they have written about it!</p><p>Slack hosts their central application services and databases in the us-east-1 AWS region. They're resilient to failure thanks to a multi-availability zone setup.</p><p>That means all requests, like new messages, flow through the US, wherever you're in the world. Not only does this create latency problems, but it can also harm availability if your network can't route requests to the US. So Slack has <strong>edge points-of-presence (PoPs)</strong> close to the users to ensure the requests enter Slack's network as soon as possible and cross the world in that faster, more resilient network.</p><blockquote><p>"These edge PoPs sit closer to our users to reduce latency, improve performance, and connect them back to Slack's main region in the AWS us-east-1."</p></blockquote><p>Even though they don't host the primary Slack services, edge PoPs each have a collection of caches, image proxies, and services to ensure all requests are handled as close to the user as possible.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!O_Hc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9e944a1-7c26-433f-94c1-60cbfcf8ef22_763x362.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!O_Hc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9e944a1-7c26-433f-94c1-60cbfcf8ef22_763x362.png 424w, https://substackcdn.com/image/fetch/$s_!O_Hc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9e944a1-7c26-433f-94c1-60cbfcf8ef22_763x362.png 848w, https://substackcdn.com/image/fetch/$s_!O_Hc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9e944a1-7c26-433f-94c1-60cbfcf8ef22_763x362.png 1272w, https://substackcdn.com/image/fetch/$s_!O_Hc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9e944a1-7c26-433f-94c1-60cbfcf8ef22_763x362.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!O_Hc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9e944a1-7c26-433f-94c1-60cbfcf8ef22_763x362.png" width="763" height="362" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b9e944a1-7c26-433f-94c1-60cbfcf8ef22_763x362.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:362,&quot;width&quot;:763,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:169093,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!O_Hc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9e944a1-7c26-433f-94c1-60cbfcf8ef22_763x362.png 424w, https://substackcdn.com/image/fetch/$s_!O_Hc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9e944a1-7c26-433f-94c1-60cbfcf8ef22_763x362.png 848w, https://substackcdn.com/image/fetch/$s_!O_Hc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9e944a1-7c26-433f-94c1-60cbfcf8ef22_763x362.png 1272w, https://substackcdn.com/image/fetch/$s_!O_Hc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9e944a1-7c26-433f-94c1-60cbfcf8ef22_763x362.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Slack&#8217;s API traffic flow. Source: Slack engineering.</figcaption></figure></div><p><em>How is traffic routed to and through these edge PoPs?</em></p><p>Everything happens at the <strong>DNS</strong> level through a collection of primary and backup domains with different rules to select the IP (so the data center) the DNS records point to.</p><p>Primary domains route to the geographically closest edge PoP that is up. Backup domains distribute the load between the three nearest PoPs to ensure clients can skip an unhealthy PoP after a few retries.</p><p>&#128215; <strong>Rafael Elvira</strong>'s <em>Traffic 101: Packets Mostly Flow</em> describes Slack's distributed networking architecture that enables it to handle traffic gracefully during partial outage events. It's an interesting insight into how such a large company plans for the unexpected!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://slack.engineering/traffic-101-packets-mostly-flow/&quot;,&quot;text&quot;:&quot;Read the full article on Slack's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://slack.engineering/traffic-101-packets-mostly-flow/"><span>Read the full article on Slack's blog</span></a></p><div><hr></div><h2>Design communication is a critical skill</h2><p>The best designers excel at <strong>communication</strong>. And not being able to communicate "<strong>why</strong>" clearly is probably designers' most common issue.</p><p>It makes sense in your head; your solution is the best. How can you communicate that effectively to stakeholders?</p><blockquote><p>"One of the most important skills for designers is the ability<strong> </strong>to<strong> communicate design intent</strong>. We need to help stakeholders understand why a design decision provides the best possible solution to a problem."</p></blockquote><p>So, as with all crucial skills, it's good to go back to basics periodically. Here are the <strong>four communication foundations</strong>:</p><ol><li><p><strong>Product over process.</strong> Focus your communication on the product; show how you're changing it.</p></li><li><p><strong>Explain the problems</strong>.</p></li></ol><blockquote><p>"Set the stage for what you're sharing by starting with the problems. Never assume that stakeholders have as much context as you do."</p></blockquote><ol start="3"><li><p><strong>Link solutions to problems.</strong></p></li><li><p><strong>Explain why solutions matter.</strong></p></li></ol><blockquote><p>"Stakeholders often need to understand the why so that they understand the value of what you're proposing. [...] With every decision you make, ask yourself &#8212; "how will this affect the user?""</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AV0_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39da24d5-3a58-4772-a174-d6f27ccc0bb2_2000x685.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AV0_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39da24d5-3a58-4772-a174-d6f27ccc0bb2_2000x685.png 424w, https://substackcdn.com/image/fetch/$s_!AV0_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39da24d5-3a58-4772-a174-d6f27ccc0bb2_2000x685.png 848w, https://substackcdn.com/image/fetch/$s_!AV0_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39da24d5-3a58-4772-a174-d6f27ccc0bb2_2000x685.png 1272w, https://substackcdn.com/image/fetch/$s_!AV0_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39da24d5-3a58-4772-a174-d6f27ccc0bb2_2000x685.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AV0_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39da24d5-3a58-4772-a174-d6f27ccc0bb2_2000x685.png" width="1456" height="499" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/39da24d5-3a58-4772-a174-d6f27ccc0bb2_2000x685.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:499,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:400864,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AV0_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39da24d5-3a58-4772-a174-d6f27ccc0bb2_2000x685.png 424w, https://substackcdn.com/image/fetch/$s_!AV0_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39da24d5-3a58-4772-a174-d6f27ccc0bb2_2000x685.png 848w, https://substackcdn.com/image/fetch/$s_!AV0_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39da24d5-3a58-4772-a174-d6f27ccc0bb2_2000x685.png 1272w, https://substackcdn.com/image/fetch/$s_!AV0_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39da24d5-3a58-4772-a174-d6f27ccc0bb2_2000x685.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Applying the principles to an example. Source: Shopify UX.</figcaption></figure></div><p>Beyond these general principles, the golden rule is to <strong>tailor your communication to your stakeholders.</strong> People have very different interests and value different angles based on their roles and positions in the company.</p><p>&#128215; <strong>Kazdem Cattapan</strong>'s <em>Design communication is a critical skill</em> is a very actionable read around communicating design decisions. Communication is essential to build trust with all stakeholders, and understanding how to do it effectively can 10x your impact.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://ux.shopify.com/describing-your-work-is-a-critical-design-skill-934923147f83&quot;,&quot;text&quot;:&quot;Read the full article on Shopify's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://ux.shopify.com/describing-your-work-is-a-critical-design-skill-934923147f83"><span>Read the full article on Shopify's blog</span></a></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #58]]></title><description><![CDATA[Cloudflare Waiting Rooms' massively distributed architecture, Kent Beck's 80/15/5 Rule for doing work, and EXIT traps as a little know Bash scripting trick.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-58</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-58</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 14 Oct 2023 09:11:11 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!86hO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3b424d-3f75-4611-8a2e-6d78aac4aa7c_1600x1013.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#128075; Hi, this is Mathias, back from holidays &#128526; with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also: <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>The Architecture challenges behind Cloudflare Waiting rooms</h2><p><strong>Waiting Rooms protects web applications against traffic spikes</strong> by serving excess users a temporary branded waiting room, dynamically admitting users as spots become available on their sites.</p><p>The hard part about building Waiting Rooms is that to ensure good protection, the decision to queue a user or let them through has to be evaluated synchronously on every request. And worse, because it's spike protection, the decision is to let the user through most of the time, so the added <strong>latency must be minimal</strong>.</p><blockquote><p>"Waiting Room is built on Workers that runs across a global network of Cloudflare data centers. To optimize for minimal latency and enhanced performance, these requests are routed to the data center with the most geographical proximity."</p></blockquote><p>So here's the problem: make a millisecond-latency decision about every user while keeping the queue in sync for all users worldwide.</p><p>Considering a cross-continent request can take tens of milliseconds, all solutions based on a central state machine are off the table. The team had to build an eventually consistent solution, which brought a new set of problems:</p><ul><li><p>Protect too aggressively, and you'll end up queuing users for no reason.</p></li><li><p>Protect reactively, and you'll miss the first spike of users.</p></li></ul><p>The Waiting Room engineers designed a solution: distribute the remaining utilization slots between data centers based on the active users of the last minute. The centralized process only distributes tickets to the workers, which they can then freely allocate to incoming users.</p><p>After a few iterations, engineers employed datacenter-local counters to ensure an even distribution between Workers of the same DC.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!86hO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3b424d-3f75-4611-8a2e-6d78aac4aa7c_1600x1013.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!86hO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3b424d-3f75-4611-8a2e-6d78aac4aa7c_1600x1013.png 424w, https://substackcdn.com/image/fetch/$s_!86hO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3b424d-3f75-4611-8a2e-6d78aac4aa7c_1600x1013.png 848w, https://substackcdn.com/image/fetch/$s_!86hO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3b424d-3f75-4611-8a2e-6d78aac4aa7c_1600x1013.png 1272w, https://substackcdn.com/image/fetch/$s_!86hO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3b424d-3f75-4611-8a2e-6d78aac4aa7c_1600x1013.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!86hO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3b424d-3f75-4611-8a2e-6d78aac4aa7c_1600x1013.png" width="1456" height="922" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7d3b424d-3f75-4611-8a2e-6d78aac4aa7c_1600x1013.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:922,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:126403,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!86hO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3b424d-3f75-4611-8a2e-6d78aac4aa7c_1600x1013.png 424w, https://substackcdn.com/image/fetch/$s_!86hO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3b424d-3f75-4611-8a2e-6d78aac4aa7c_1600x1013.png 848w, https://substackcdn.com/image/fetch/$s_!86hO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3b424d-3f75-4611-8a2e-6d78aac4aa7c_1600x1013.png 1272w, https://substackcdn.com/image/fetch/$s_!86hO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3b424d-3f75-4611-8a2e-6d78aac4aa7c_1600x1013.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Waiting Rooms&#8217; distributed architecture. Source: Cloudflare.</figcaption></figure></div><p>&#128215; <strong>George Thomas</strong>'s <em>How Waiting Room makes queueing decisions on Cloudflare's highly distributed network</em> is an in-depth walkthrough of the thought process and iterations the Waiting Room engineers went through to solve that complex distributed systems problem.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.cloudflare.com/how-waiting-room-queues/&quot;,&quot;text&quot;:&quot;Read the full article from Cloudflare&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.cloudflare.com/how-waiting-room-queues/"><span>Read the full article from Cloudflare</span></a></p><div><hr></div><h2>Fresh Work and the 80/15/5 Rule</h2><p><em>Are you feeling bored at your day job? Or that you need to be challenged or learn more?</em></p><p>You can do something about it! It doesn't have to come from your manager. Start by <strong>freeing up time</strong> to explore new things. They can be closely related to your current task or have a distant link. It's all about the balance.</p><blockquote><p>"Doing things that are new keeps you energized and interested. [...] But doing things you're already good at ensures you accomplish goals other people care about."</p></blockquote><p><span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Kent Beck&quot;,&quot;id&quot;:24333739,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F000da410-0ed6-4a25-80b1-6a46e964ae0b_242x242.jpeg&quot;,&quot;uuid&quot;:&quot;951186da-e73d-4f92-bcdd-e6a60666a562&quot;}" data-component-name="MentionToDOM"></span> designed a simple rule: 80/15/5:</p><blockquote><ul><li><p>80% of your time goes to low-risk/reasonable-reward work</p></li><li><p>15% of your time goes to related high-risk/high-reward work</p></li><li><p>5% of your time goes to satisfying your own curiosity with no thought of reward"</p></li></ul></blockquote><p>The <strong>80/15/5</strong> <strong>rule</strong> is not just about carving out time for novelty. It's about continuous movement towards what energizes you, slowing moving out of the current 80% and using the 15 and 5 to create your next new 80%.</p><blockquote><p>"While you're doing your 80% task you're gradually teaching the next generation of your team to take that task over. [...] About the time you've found a 15% task to become your new 80%, your successor is ready to take over your previous 80% task."</p></blockquote><p>&#128215; <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Kent Beck&quot;,&quot;id&quot;:24333739,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F000da410-0ed6-4a25-80b1-6a46e964ae0b_242x242.jpeg&quot;,&quot;uuid&quot;:&quot;bf0748d2-a41e-4a21-820a-17d53e71a062&quot;}" data-component-name="MentionToDOM"></span> 's <em>Fresh Work 80/15/5</em> rule is simple but powerful. Use it to take control of your work and career or as a manager to help unblock people and enable them to create their path.</p><div class="embedded-post-wrap" data-attrs="{&quot;id&quot;:134574799,&quot;url&quot;:&quot;https://tidyfirst.substack.com/p/fresh-work-80155&quot;,&quot;publication_id&quot;:256838,&quot;publication_name&quot;:&quot;Software Design: Tidy First?&quot;,&quot;publication_logo_url&quot;:null,&quot;title&quot;:&quot;Fresh Work 80/15/5&quot;,&quot;truncated_body_text&quot;:&quot;If you&#8217;re doing what you&#8217;re told to do, they are paying you too much. New thing you&#8217;re excited about or familiar thing you&#8217;re good at? Doing things that are new keeps you energized and interested. Doing things that are new ensures that you&#8217;ll still have a job after your current activities become routine or pass&#233;. Doing things that are new gives you the ch&#8230;&quot;,&quot;date&quot;:&quot;2023-07-13T14:47:02.188Z&quot;,&quot;like_count&quot;:163,&quot;comment_count&quot;:8,&quot;bylines&quot;:[{&quot;id&quot;:24333739,&quot;name&quot;:&quot;Kent Beck&quot;,&quot;handle&quot;:&quot;kentbeck&quot;,&quot;previous_name&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F000da410-0ed6-4a25-80b1-6a46e964ae0b_242x242.jpeg&quot;,&quot;bio&quot;:&quot;Programmer, artist, coach coach, singer/guitarist, peripatetic. Learning to be me. Chief Scientist at Mechanical Orchard. I'd be glad to teach you poker. Mailto:kentlbeck@gmail.com&quot;,&quot;profile_set_up_at&quot;:&quot;2021-04-20T15:03:12.374Z&quot;,&quot;publicationUsers&quot;:[{&quot;id&quot;:226404,&quot;user_id&quot;:24333739,&quot;publication_id&quot;:256838,&quot;role&quot;:&quot;admin&quot;,&quot;public&quot;:true,&quot;is_primary&quot;:true,&quot;publication&quot;:{&quot;id&quot;:256838,&quot;name&quot;:&quot;Software Design: Tidy First?&quot;,&quot;subdomain&quot;:&quot;tidyfirst&quot;,&quot;custom_domain&quot;:null,&quot;custom_domain_optional&quot;:false,&quot;hero_text&quot;:&quot;Software design is an exercise in human relationships. We start with our relationship with ourselves. We have to change some janky code. Do we tidy first? If so, how? Why?&quot;,&quot;logo_url&quot;:null,&quot;author_id&quot;:24333739,&quot;theme_var_background_pop&quot;:&quot;#FD5353&quot;,&quot;created_at&quot;:&quot;2021-01-07T21:22:19.269Z&quot;,&quot;rss_website_url&quot;:null,&quot;email_from_name&quot;:null,&quot;copyright&quot;:&quot;Kent Beck&quot;,&quot;founding_plan_name&quot;:&quot;Founding Member&quot;,&quot;community_enabled&quot;:true,&quot;invite_only&quot;:false,&quot;payments_state&quot;:&quot;enabled&quot;,&quot;language&quot;:null}},{&quot;id&quot;:199084,&quot;user_id&quot;:24333739,&quot;publication_id&quot;:285700,&quot;role&quot;:&quot;admin&quot;,&quot;public&quot;:true,&quot;is_primary&quot;:false,&quot;publication&quot;:{&quot;id&quot;:285700,&quot;name&quot;:&quot;Geek Incentives&quot;,&quot;subdomain&quot;:&quot;geekincentives&quot;,&quot;custom_domain&quot;:null,&quot;custom_domain_optional&quot;:false,&quot;hero_text&quot;:&quot;Creating and maintaining incentives that help geeks do their best work&quot;,&quot;logo_url&quot;:null,&quot;author_id&quot;:24333739,&quot;theme_var_background_pop&quot;:&quot;#2EE240&quot;,&quot;created_at&quot;:&quot;2021-02-13T15:28:41.577Z&quot;,&quot;rss_website_url&quot;:null,&quot;email_from_name&quot;:null,&quot;copyright&quot;:&quot;Kent Beck&quot;,&quot;founding_plan_name&quot;:null,&quot;community_enabled&quot;:true,&quot;invite_only&quot;:false,&quot;payments_state&quot;:&quot;disabled&quot;,&quot;language&quot;:null}},{&quot;id&quot;:718034,&quot;user_id&quot;:24333739,&quot;publication_id&quot;:780969,&quot;role&quot;:&quot;admin&quot;,&quot;public&quot;:true,&quot;is_primary&quot;:false,&quot;publication&quot;:{&quot;id&quot;:780969,&quot;name&quot;:&quot;Kent Beck Poker&quot;,&quot;subdomain&quot;:&quot;kentbeckpoker&quot;,&quot;custom_domain&quot;:null,&quot;custom_domain_optional&quot;:false,&quot;hero_text&quot;:&quot;Watch as I learn to play poker, warts and all&quot;,&quot;logo_url&quot;:null,&quot;author_id&quot;:24333739,&quot;theme_var_background_pop&quot;:&quot;#6C0095&quot;,&quot;created_at&quot;:&quot;2022-03-02T01:27:36.844Z&quot;,&quot;rss_website_url&quot;:null,&quot;email_from_name&quot;:null,&quot;copyright&quot;:&quot;Kent Beck&quot;,&quot;founding_plan_name&quot;:null,&quot;community_enabled&quot;:true,&quot;invite_only&quot;:false,&quot;payments_state&quot;:&quot;disabled&quot;,&quot;language&quot;:null}}],&quot;twitter_screen_name&quot;:&quot;KentBeck&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;utm_campaign&quot;:null,&quot;belowTheFold&quot;:true,&quot;type&quot;:&quot;newsletter&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="EmbeddedPostToDOM"><a class="embedded-post" native="true" href="https://tidyfirst.substack.com/p/fresh-work-80155?utm_source=substack&amp;utm_campaign=post_embed&amp;utm_medium=web"><div class="embedded-post-header"><span></span><span class="embedded-post-publication-name">Software Design: Tidy First?</span></div><div class="embedded-post-title-wrapper"><div class="embedded-post-title">Fresh Work 80/15/5</div></div><div class="embedded-post-body">If you&#8217;re doing what you&#8217;re told to do, they are paying you too much. New thing you&#8217;re excited about or familiar thing you&#8217;re good at? Doing things that are new keeps you energized and interested. Doing things that are new ensures that you&#8217;ll still have a job after your current activities become routine or pass&#233;. Doing things that are new gives you the ch&#8230;</div><div class="embedded-post-cta-wrapper"><span class="embedded-post-cta">Read more</span></div><div class="embedded-post-meta">3 years ago &#183; 163 likes &#183; 8 comments &#183; Kent Beck</div></a></div><div><hr></div><h2>How Exit Traps can make your Bash scripts more robust and reliable</h2><blockquote><p>"A simple, useful idiom to make your bash scripts more robust."</p></blockquote><p><strong>Bash scripts</strong> are often cobbled together, bypassing the high standards we uphold ourselves to when writing code. Yet their <strong>impact is enormous</strong> compared to their relatively few lines of code, as is their ability to blow up in your face.</p><p>Not writing unit tests is one thing. But the most dangerous part is the undefined behavior of the script failing halfway.</p><p>This can lead to funny situations:</p><ul><li><p>A database maintenance bash script failed and didn't reach the "restart database" line.</p></li><li><p>A large data file operation crashed and didn't reach the "cleanup" line.</p></li></ul><p><em>See where I'm going?</em></p><blockquote><p>"The secret sauce is a pseudo-signal provided by bash, called EXIT, that you can <a href="http://www.gnu.org/software/bash/manual/bashref.html#index-trap">trap</a>; commands or functions trapped on it will execute when the script exits for any reason."</p></blockquote><p>That simple! Now you know what to do with your teardown and restart methods!</p><blockquote><p>"You place any code that you want to be certain to run in this "finish" function."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wXGL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c91408f-01f4-475c-8912-9eea49e4af09_1222x283.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wXGL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c91408f-01f4-475c-8912-9eea49e4af09_1222x283.png 424w, https://substackcdn.com/image/fetch/$s_!wXGL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c91408f-01f4-475c-8912-9eea49e4af09_1222x283.png 848w, https://substackcdn.com/image/fetch/$s_!wXGL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c91408f-01f4-475c-8912-9eea49e4af09_1222x283.png 1272w, https://substackcdn.com/image/fetch/$s_!wXGL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c91408f-01f4-475c-8912-9eea49e4af09_1222x283.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wXGL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c91408f-01f4-475c-8912-9eea49e4af09_1222x283.png" width="1222" height="283" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4c91408f-01f4-475c-8912-9eea49e4af09_1222x283.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:283,&quot;width&quot;:1222,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:43453,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wXGL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c91408f-01f4-475c-8912-9eea49e4af09_1222x283.png 424w, https://substackcdn.com/image/fetch/$s_!wXGL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c91408f-01f4-475c-8912-9eea49e4af09_1222x283.png 848w, https://substackcdn.com/image/fetch/$s_!wXGL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c91408f-01f4-475c-8912-9eea49e4af09_1222x283.png 1272w, https://substackcdn.com/image/fetch/$s_!wXGL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c91408f-01f4-475c-8912-9eea49e4af09_1222x283.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Trap-ing the EXIT signal to run termination functions. Source: Aaron Maxwell.</figcaption></figure></div><p>&#128215; <strong>Aaron Maxwell</strong>'s <em>How Exit Traps</em> <em>can make your bash scripts way more robust and reliable</em>" is a short read introducing that trap method. I'm often reluctant to share code articles to ensure they're actionable by all readers, but bash is not just code!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;http://redsymbol.net/articles/bash-exit-traps/&quot;,&quot;text&quot;:&quot;Read the full article on Aaron's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="http://redsymbol.net/articles/bash-exit-traps/"><span>Read the full article on Aaron's blog</span></a></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #57]]></title><description><![CDATA[An introduction to Vector Databases, Defending and defining Good Strategy, and How to get useful answers to your questions.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-57</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-57</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 07 Oct 2023 09:11:04 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c1e422c-37bc-4250-b944-dcbf6566006a_1399x537.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#128075; Hi, this is Mathias, back from holidays &#128526; with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also: <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>What is a Vector Database</h2><p><em>The infrastructure behind the LLM revolution.</em></p><blockquote><p>"All of these new applications rely on vector embeddings, a type of data representation that carries within it semantic information that's critical for the AI to gain understanding and maintain a long-term memory they can draw upon when executing complex tasks."</p></blockquote><p>What are <strong>embeddings</strong> exactly? They're large vectors representing a model's understanding of a data point.</p><blockquote><p>"Embeddings are generated by AI models (such as Large Language Models) and have a large number of attributes or features."</p></blockquote><p>LLMs associate a vector representation: embeddings for every piece of data of our world. Adding long-term memory to a model is just that: storing a database of past conversations and allowing the model to query that database freely. But traditional relational databases don't shine at managing and indexing embeddings. That's because the default operation is not an exact query; it's a similarity search.</p><blockquote><p>"In vector databases, we apply a <strong>similarity metric</strong> to find a vector that is the most similar to our query. A vector database uses a combination of different algorithms that all participate in Approximate Nearest Neighbor (ANN) search."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FMkj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c1e422c-37bc-4250-b944-dcbf6566006a_1399x537.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FMkj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c1e422c-37bc-4250-b944-dcbf6566006a_1399x537.png 424w, https://substackcdn.com/image/fetch/$s_!FMkj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c1e422c-37bc-4250-b944-dcbf6566006a_1399x537.png 848w, https://substackcdn.com/image/fetch/$s_!FMkj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c1e422c-37bc-4250-b944-dcbf6566006a_1399x537.png 1272w, https://substackcdn.com/image/fetch/$s_!FMkj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c1e422c-37bc-4250-b944-dcbf6566006a_1399x537.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FMkj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c1e422c-37bc-4250-b944-dcbf6566006a_1399x537.png" width="1399" height="537" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6c1e422c-37bc-4250-b944-dcbf6566006a_1399x537.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:537,&quot;width&quot;:1399,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:194527,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FMkj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c1e422c-37bc-4250-b944-dcbf6566006a_1399x537.png 424w, https://substackcdn.com/image/fetch/$s_!FMkj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c1e422c-37bc-4250-b944-dcbf6566006a_1399x537.png 848w, https://substackcdn.com/image/fetch/$s_!FMkj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c1e422c-37bc-4250-b944-dcbf6566006a_1399x537.png 1272w, https://substackcdn.com/image/fetch/$s_!FMkj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c1e422c-37bc-4250-b944-dcbf6566006a_1399x537.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Architecture of LLM applications. Source: Pinecone.</figcaption></figure></div><p>So vector databases are just this: databases specialized in doing that similarity search query on a lot of data very efficiently. They can also query both the embeddings and the actual data in case filtering should happen on both. <strong>Approximate Nearest Neighbour </strong>search on large datasets is not simple and usually combines many techniques and tricks. Here are some examples:</p><ul><li><p>Random Projection</p></li></ul><blockquote><p>"The basic idea behind random projection is to project the high-dimensional vectors to a lower-dimensional space using a random projection matrix."</p></blockquote><ul><li><p>Locality-sensitive hashing</p></li></ul><blockquote><p>"LSH maps similar vectors into "buckets" using a set of hashing functions. The query vector is hashed to a particular table and then compared with the other vectors in that same table to find the closest matches."</p></blockquote><p>&#128215; <strong>Roie Schwaber-Cohen</strong>'s <em>What is a Vector Database</em> introduces this new breed of databases, why they're needed, and how they work. Considering they're everywhere and used in most LLM applications, it's an excellent time to jump on the train. Beyond marketing and shiny new databases, I also hear Postgres has a pgvector extension that gives everyone's favorite database vector search superpowers! Once dropped, operators will stow the pallet to a fixed pallet location.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.pinecone.io/learn/vector-database/&quot;,&quot;text&quot;:&quot;Read the full article on Pinecone's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.pinecone.io/learn/vector-database/"><span>Read the full article on Pinecone's blog</span></a></p><div><hr></div><h2>In Defense of Strategy</h2><blockquote><p>"There's a belief in tech that execution is all that matters, that strategy is for wimpy MBAs."</p></blockquote><p>And it's easy to pride ourselves on having the best execution! Everything feels so fast!</p><blockquote><p>"The better you are at execution, the faster you can run in any direction. A good strategy helps you run fast in the right direction."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!P7lP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a095cae-f25e-4ecc-a55a-a30a241a9117_908x513.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!P7lP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a095cae-f25e-4ecc-a55a-a30a241a9117_908x513.png 424w, https://substackcdn.com/image/fetch/$s_!P7lP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a095cae-f25e-4ecc-a55a-a30a241a9117_908x513.png 848w, https://substackcdn.com/image/fetch/$s_!P7lP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a095cae-f25e-4ecc-a55a-a30a241a9117_908x513.png 1272w, https://substackcdn.com/image/fetch/$s_!P7lP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a095cae-f25e-4ecc-a55a-a30a241a9117_908x513.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!P7lP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a095cae-f25e-4ecc-a55a-a30a241a9117_908x513.png" width="908" height="513" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9a095cae-f25e-4ecc-a55a-a30a241a9117_908x513.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:513,&quot;width&quot;:908,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:247013,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!P7lP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a095cae-f25e-4ecc-a55a-a30a241a9117_908x513.png 424w, https://substackcdn.com/image/fetch/$s_!P7lP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a095cae-f25e-4ecc-a55a-a30a241a9117_908x513.png 848w, https://substackcdn.com/image/fetch/$s_!P7lP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a095cae-f25e-4ecc-a55a-a30a241a9117_908x513.png 1272w, https://substackcdn.com/image/fetch/$s_!P7lP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a095cae-f25e-4ecc-a55a-a30a241a9117_908x513.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Strategy and execution. Source: Not Boring.</figcaption></figure></div><p>Early-stage startups are often protected in the first months because they're so small and unsuccessful that no one will attempt to compete with them. That time is precious, and founders must focus on <strong>digging their moat</strong>.</p><blockquote><p>"If startups need to dig moats before their uncertainty runs out, strategy is how they do it. <strong>If moats are the what, strategy is the how.</strong>"</p></blockquote><p>If the above is so obvious, why are startups struggling with strategy? I would say that most fall into two buckets:</p><ol><li><p>Startups that get too busy with execution and think it'll be enough.</p></li><li><p>Startups that have <em>Bad Strategy</em>.</p></li></ol><p>Packy's first advice is to read <em>Good Strategy, Bad Strategy</em> by Richard Rumelt.</p><blockquote><p>"It's my favorite strategy book because it was so easy to put into practice, and because I recognized so many of the characteristics of bad strategy."</p></blockquote><p>Then, the author explains what "Good Strategy" is.</p><blockquote><p>"A <strong>strategy</strong> is a high-level plan to achieve one or more goals under conditions of uncertainty, designed through recognizing the challenge (diagnosis), setting a direction to overcome it (guiding policy), and detailing steps to implement the policy (coherent actions)."</p></blockquote><blockquote><p>"The best time to craft a strategy is before you start the company; the second best time is now."</p></blockquote><p>&#128215; <strong>Packy McCormick</strong>'s <em>In Defense of Strategy</em> then goes deeper into the three core elements of a strategy: diagnosis, guiding policy, and coherent actions, and ends with the practical example of a past startup. Beyond being a reminder that strategy is not just a big empty word, the article is also a guide to thinking about your strategy and a call to action to keep refining it.</p><div class="embedded-post-wrap" data-attrs="{&quot;id&quot;:135421727,&quot;url&quot;:&quot;https://www.notboring.co/p/in-defense-of-strategy&quot;,&quot;publication_id&quot;:10025,&quot;publication_name&quot;:&quot;Not Boring by Packy McCormick&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F62784289-29bb-4fdf-9ada-642905c5a28b_400x400.png&quot;,&quot;title&quot;:&quot;In Defense of Strategy&quot;,&quot;truncated_body_text&quot;:&quot;Welcome to the 579 newly Not Boring people who have joined us since last Tuesday! If you haven&#8217;t subscribed, join 208,497 smart, curious folks by subscribing here:&quot;,&quot;date&quot;:&quot;2023-07-25T12:58:08.751Z&quot;,&quot;like_count&quot;:191,&quot;comment_count&quot;:23,&quot;bylines&quot;:[{&quot;id&quot;:2417812,&quot;name&quot;:&quot;Packy McCormick&quot;,&quot;handle&quot;:&quot;notboring&quot;,&quot;previous_name&quot;:null,&quot;photo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/40bee61d-67eb-4492-9ee1-ebbbf2b03141_1280x855.jpeg&quot;,&quot;bio&quot;:&quot;Author of Not Boring&quot;,&quot;profile_set_up_at&quot;:&quot;2021-05-12T16:33:32.883Z&quot;,&quot;publicationUsers&quot;:[{&quot;id&quot;:229417,&quot;user_id&quot;:2417812,&quot;publication_id&quot;:10025,&quot;role&quot;:&quot;admin&quot;,&quot;public&quot;:true,&quot;is_primary&quot;:false,&quot;publication&quot;:{&quot;id&quot;:10025,&quot;name&quot;:&quot;Not Boring by Packy McCormick&quot;,&quot;subdomain&quot;:&quot;notboring&quot;,&quot;custom_domain&quot;:&quot;www.notboring.co&quot;,&quot;custom_domain_optional&quot;:false,&quot;hero_text&quot;:&quot;Tech, web3, optimism, and strategy... but Not Boring&quot;,&quot;logo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/62784289-29bb-4fdf-9ada-642905c5a28b_400x400.png&quot;,&quot;author_id&quot;:2417812,&quot;theme_var_background_pop&quot;:&quot;#67bdfc&quot;,&quot;created_at&quot;:&quot;2019-05-16T12:55:11.421Z&quot;,&quot;rss_website_url&quot;:null,&quot;email_from_name&quot;:&quot;Not Boring&quot;,&quot;copyright&quot;:&quot;Packy McCormick&quot;,&quot;founding_plan_name&quot;:null,&quot;community_enabled&quot;:true,&quot;invite_only&quot;:false,&quot;payments_state&quot;:&quot;disabled&quot;,&quot;language&quot;:null}}],&quot;twitter_screen_name&quot;:&quot;packyM&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;utm_campaign&quot;:null,&quot;belowTheFold&quot;:true,&quot;type&quot;:&quot;newsletter&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="EmbeddedPostToDOM"><a class="embedded-post" native="true" href="https://www.notboring.co/p/in-defense-of-strategy?utm_source=substack&amp;utm_campaign=post_embed&amp;utm_medium=web"><div class="embedded-post-header"><img class="embedded-post-publication-logo" src="https://substackcdn.com/image/fetch/$s_!5wlY!,w_56,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F62784289-29bb-4fdf-9ada-642905c5a28b_400x400.png" loading="lazy"><span class="embedded-post-publication-name">Not Boring by Packy McCormick</span></div><div class="embedded-post-title-wrapper"><div class="embedded-post-title">In Defense of Strategy</div></div><div class="embedded-post-body">Welcome to the 579 newly Not Boring people who have joined us since last Tuesday! If you haven&#8217;t subscribed, join 208,497 smart, curious folks by subscribing here&#8230;</div><div class="embedded-post-cta-wrapper"><span class="embedded-post-cta">Read more</span></div><div class="embedded-post-meta">3 years ago &#183; 191 likes &#183; 23 comments &#183; Packy McCormick</div></a></div><div><hr></div><h2>How to get useful answers to your questions</h2><blockquote><p>"Often when I ask a vague or underspecified question, what happens is one of:</p><ol><li><p>the person starts by explaining a bunch of stuff I already know</p></li><li><p>the person explains some things which I don't know, but which I don't think are relevant to my problem</p></li><li><p>the person starts giving a relevant explanation, but using terminology that I don't understand, so I still end up being confused"</p></li></ol></blockquote><p>And it takes a lot of confidence to stand up to the person, interrupt them, and ask a clarifying question, especially in a junior-to-senior conversation.</p><p>So here's a <strong>framework</strong> to solve that:</p><ol><li><p>You can get more useful answers if you <strong>optimize your first question</strong>.</p></li></ol><blockquote><p>"My favourite tactic is to ask a yes/no question. What I love about this is that there's a much lower chance that the person answering will go off on an irrelevant tangent."</p></blockquote><blockquote><p>"My second favourite tactic is to state my understanding of how the system works." This way, your coworker will be able to identify where your gaps are and specify their answer.</p></blockquote><ol start="2"><li><p>Do not be afraid of <strong>following-up</strong>.</p></li></ol><p>While it takes some confidence, never accept responses that don't answer your question or that you don't understand. Interrupt, clarify your initial question, and reflect on whether you understand the answers before closing the conversation.</p><p>&#128215; <strong>Julia Evans</strong>' <em>How to get useful answers to your questions</em> is an impacting read to recommend to anyone, especially in their early or late careers. I found that junior people tend not to be confident enough to ask questions, and very senior ones do not because they don't want to show gaps and weaknesses.</p><p>While some articles will teach you something new, others' power is to put concepts and ideas you already know in a novel way. The latter is sometimes even more powerful because human brains love patterns and structure. This article is an excellent example.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jvns.ca/blog/2021/10/21/how-to-get-useful-answers-to-your-questions/&quot;,&quot;text&quot;:&quot;Read the full article on Julia's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jvns.ca/blog/2021/10/21/how-to-get-useful-answers-to-your-questions/"><span>Read the full article on Julia's blog</span></a></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #56]]></title><description><![CDATA[Platform Design isn't just design, Shopify's LLM chatbot architecture optimized for UX, and Everything you need to know about Message Queues.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-56</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-56</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 23 Sep 2023 09:11:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!wwlg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3572022b-c333-417a-a234-6c5615ee81e3_1200x854.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#128075; Hi, this is Mathias, back from holidays &#128526; with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also: <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>What it means to design a platform</h2><blockquote><p>"<strong>Platform design</strong> isn&#8217;t just another flavor of UX or product design. There are challenges, mental models, and requisite skills that set platform design apart."</p></blockquote><p>As a product leader, designer, or engineer, understanding the differences between platform and application design can help create better strategies and powerful self-reinforcing loops.</p><p><strong>What exactly sets platform design apart?</strong></p><p>1. <strong>Interfaces</strong>. APIs, components, services. How they're available to the platform user can guide them into building amazing, or terrible experiences. Think both simple and flexible. Because of the nature of platforms, interfaces are often one-way door decisions that are costly to reverse and thus require extra care.</p><p>2. "<strong>Incentives</strong> drive the motivation of both platform- and end- users."</p><p>3. "<strong>Emergence</strong> is the open-ended feedback loop that platforms can create and maintain. By designing for Emergence, not against it, we enable users to discover applications we never imagined."</p><p>The most obvious dimension of platform design, <strong>Emergence</strong>, must be enabled, managed, and monitored purposefully.</p><p>4. <strong>Second-order thinking</strong> requires thinking two steps ahead and anticipating how the platform can drive positive loops and mitigate bad ones. The first step is for user usage, and the second is for users' use of platform-born tools.</p><p>&#128215; <strong>Matthew Strom</strong> is a platform design lead at one of the most impressive platform companies, Stripe. If you're building a platform, thinking about it from these angles may help you find the flywheel we're all after.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://matthewstrom.com/writing/platform-design/&quot;,&quot;text&quot;:&quot;Read the full article on Matthew's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://matthewstrom.com/writing/platform-design/"><span>Read the full article on Matthew's blog</span></a></p><div><hr></div><h2>The architecture of the perfect UX for LLM chatbots</h2><p><em>Shopify's Sidekick.</em></p><p>We've all experienced it: <strong>LLM chatbots are slow</strong>. It's an excellent challenge for product engineers aiming for a great experience because the classic request/response scheme doesn't work.</p><p>LLM chatbot answers are streams of tokens, that are turned into streams of characters. So, by leveraging streaming, we can cut that response time. Streaming will render responses token by token, turning it into the ChatGPT experience we know.</p><p>But LLM chatbots aren't helpful as is; they become useful when they can search for additional content and, more generally, use <em>tools</em>.</p><blockquote><p>"The typical tool integration goes:</p><ol><li><p>Receive user input.</p></li><li><p>Ask the LLM to consult one or more tools that perform operations.</p></li><li><p>Receive tool responses.</p></li><li><p>Ask the LLM to assemble the tool responses into a final answer."</p></li></ol></blockquote><p>This worsens our slowness problem because data can only be rendered after step 4. That can mean dozens of seconds of wait time. The Sidekick team's solution is interesting: <strong>de-couple to parallelize invocations</strong>.</p><blockquote><p>"We've made a tweak to break the tool invocation and output generation out of the main LLM response, to let the initial LLM roundtrip directly respond to the user, with placeholders that get asynchronously populated."</p></blockquote><p>That's a game changer because this architecture allows streaming the response without waiting for intermediate invocations. The UI <strong>orchestrates multiple multiplexed LLM streams</strong> to build the final response while rendering instantly to show the user maximum progress.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wwlg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3572022b-c333-417a-a234-6c5615ee81e3_1200x854.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wwlg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3572022b-c333-417a-a234-6c5615ee81e3_1200x854.png 424w, https://substackcdn.com/image/fetch/$s_!wwlg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3572022b-c333-417a-a234-6c5615ee81e3_1200x854.png 848w, https://substackcdn.com/image/fetch/$s_!wwlg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3572022b-c333-417a-a234-6c5615ee81e3_1200x854.png 1272w, https://substackcdn.com/image/fetch/$s_!wwlg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3572022b-c333-417a-a234-6c5615ee81e3_1200x854.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wwlg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3572022b-c333-417a-a234-6c5615ee81e3_1200x854.png" width="1200" height="854" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3572022b-c333-417a-a234-6c5615ee81e3_1200x854.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:854,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:392761,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wwlg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3572022b-c333-417a-a234-6c5615ee81e3_1200x854.png 424w, https://substackcdn.com/image/fetch/$s_!wwlg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3572022b-c333-417a-a234-6c5615ee81e3_1200x854.png 848w, https://substackcdn.com/image/fetch/$s_!wwlg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3572022b-c333-417a-a234-6c5615ee81e3_1200x854.png 1272w, https://substackcdn.com/image/fetch/$s_!wwlg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3572022b-c333-417a-a234-6c5615ee81e3_1200x854.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Shopify Sidekick multiplexed streaming architecture.</figcaption></figure></div><p>&#128215; <strong>Ates Goral</strong>'s <em>Sidekick's Improved Streaming Experience</em> shows how much the unstructured aspect of LLMs allows engineers to be creative with architecture. Asynchronous tool resolution and the UI-driven process make a lot of sense in that context.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://shopify.engineering/sidekicks-improved-streaming&quot;,&quot;text&quot;:&quot;Read the full article on Shopify's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://shopify.engineering/sidekicks-improved-streaming"><span>Read the full article on Shopify's blog</span></a></p><div><hr></div><h2>Everything you need to know about Message Queues</h2><blockquote><p>"<strong>Message Queues</strong> are a way to transfer information between two systems. This information&#8212;a <strong>message</strong>&#8212;can be data, metadata, signals, or a combination of all three."</p></blockquote><p>While there are many different ways to transfer information, <strong>most lead to high coupling</strong>, 1-to-1 transfers only, and failure correlation.</p><blockquote><p>"[With a message queue], one system is decoupled from the other in terms of responsibility, time, bandwidth, internal workings, load and geography."</p></blockquote><p>Queues' killer feature is this decoupling. But as with everything software, there is no silver bullet, and decoupling comes with its trade-offs. Even though it's often system-specific, these usually are latency, consistency, and complexity.</p><p>When evaluating queues, you must look at a few dimensions:</p><ol><li><p><strong>Delivery guarantees</strong> can be <em>At-Least Once, At-Most Once, </em>or<em> Exactly Once</em>.</p></li></ol><p>While <em>Exactly Once</em> is the best-sounding one, it's also the trickiest and, in most cases, a big smoke screen for complexity. If you don't know what to pick, go for <em>At-Least Once</em>.</p><blockquote><p>"[At-Least Once] is the most common delivery mechanism, and it's the simplest to reason about and implement. If I have a message for you, I will read it to you, and keep doing so again and again until you acknowledge it."</p></blockquote><p>By architecting your code for failure and retries, you'll build a significantly more resilient system than praying for at least once delivery guarantees to do the job for you.</p><ol start="2"><li><p><em>Strict ordering</em> vs. <em>parallelism</em>.</p></li></ol><p>Again, the best-looking guarantees are also the most limiting. Opting for messages to be strictly processed in the order they were published makes parallelized processing forbidden and puts a speed limit on the overall process.</p><p>&#128215; <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Sudhir Jonathan&quot;,&quot;id&quot;:6556445,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/db54d8da-68c6-4818-b258-dd715778d853_48x48.png&quot;,&quot;uuid&quot;:&quot;12dc5876-3863-4b56-8aad-04c0207cfd6d&quot;}" data-component-name="MentionToDOM"></span> 's <em>The Big Little Guide to Message Queues</em> is an excellent introduction to queues and their main attributes. If you're reading this article and still think that you need Exactly Once and Strict Ordering, here's a last piece of wisdom from Sudhir:</p><blockquote><p>Most problems that seem like they have a hard FIFO requirement can often lend themselves to parallelism and out-of-order delivery with a little bit of creativity."</p></blockquote><blockquote><p>"Designing our messages to allow for out-of-order delivery and idempotency makes the system more resilient in general, while also letting use more parallel messaging systems&#8212;often saving time, money and a lot of operational work."</p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://sudhir.io/the-big-little-guide-to-message-queues&quot;,&quot;text&quot;:&quot;Read the full article on Sudhir's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://sudhir.io/the-big-little-guide-to-message-queues"><span>Read the full article on Sudhir's blog</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #55]]></title><description><![CDATA[Paul Graham's essay on Doing Great Work, Merkle Trees' definition and real-world examples, and the difference between Root CAs, Intermediates and Resellers.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-55</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-55</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 09 Sep 2023 09:11:14 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!rRyH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2762b099-8eab-4a0e-9526-813b95c055cd_1186x788.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#128075; Hi, this is Mathias, back from holidays &#128526; with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also: <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>How to do Great Work by Paul Graham</h2><p><em>A life-changing and driving read for ambitious people.</em></p><p>&#128215; <em>How to do Great Work</em> by <strong>Paul Graham</strong> (Viaweb, Y Combinator, and many more) is an essay and a recipe for ambitious people on how to get the most out of work. Great work is impactful towards your ambitions and ideally also impactful to the entire world or a subset of it.</p><blockquote><p>"If you collected lists of techniques for doing great work in a lot of different fields, what would the intersection look like? I decided to find out by making it."</p></blockquote><p>It's a fascinating piece filled with deep thoughts and insight from someone who has given much thought to the topic and advised many people.</p><p>I usually try to summarize the articles I share, but this one cannot be summarized. Reading it is a journey towards your ambitions and personal fulfillment. Getting to the end already means something about you. I assume few people do.</p><p>Still, here are a few thought-provoking quotes:</p><blockquote><p>"What should your projects be? Whatever seems to you excitingly ambitious. [...] What are you excessively curious about &#8212; curious to a degree that would bore most other people? That's what you're looking for."</p></blockquote><blockquote><p>"The three most powerful motives are curiosity, delight, and the desire to do something impressive. Sometimes they converge, and that combination is the most powerful of all."</p></blockquote><blockquote><p>"Writing a page a day doesn't sound like much, but if you do it every day you'll write a book a year. That's the key: consistency. [...] If you do work that compounds, you'll get exponential growth. [...] Learning, for example, is an instance of this phenomenon: the more you learn about something, the easier it is to learn more."</p></blockquote><blockquote><p>"Consciously cultivate your taste in the work done in your field. Until you know which is the best and what makes it so, you don't know what you're aiming for. And that is what you're aiming for, because if you don't try to be the best, you won't even be good."</p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;http://paulgraham.com/greatwork.html&quot;,&quot;text&quot;:&quot;Read the full essay on PG's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="http://paulgraham.com/greatwork.html"><span>Read the full essay on PG's blog</span></a></p><div><hr></div><h2>What is a Merkle Tree?</h2><blockquote><p>"It is useful to think of computing the Merkle tree as computing a collision-resistant hash function, which takes n inputs (e.g., files) and outputs the Merkle root hash."</p></blockquote><p>A <strong>Merkle tree is a recursive tree of hashes</strong> from a set of leaf elements we want to guarantee integrity of. Each element's content is hashed and used to build that tree from the leaves to the root hash. That root hash is effectively a collision-resistant representation of the entire collection of elements.</p><blockquote><p>"The beauty of Merkle trees is that a prover, who has a large set of data can convince a verifier, who has access to the set's Merkle root hash, that a piece of data is in this large set by giving the verifier a Merkle proof."</p></blockquote><p>What's the Merkle proof? Simply put, it's the set of complementary node hashes needed to rebuild the root hash, starting for the element being verified. In the example below, given h1,8 (the Merkle root hash), verifying h4 would only require three hashes: h3, h1,2, and h5,8. It seems trivial on eight elements but scales very well to millions.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rRyH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2762b099-8eab-4a0e-9526-813b95c055cd_1186x788.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rRyH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2762b099-8eab-4a0e-9526-813b95c055cd_1186x788.png 424w, https://substackcdn.com/image/fetch/$s_!rRyH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2762b099-8eab-4a0e-9526-813b95c055cd_1186x788.png 848w, https://substackcdn.com/image/fetch/$s_!rRyH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2762b099-8eab-4a0e-9526-813b95c055cd_1186x788.png 1272w, https://substackcdn.com/image/fetch/$s_!rRyH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2762b099-8eab-4a0e-9526-813b95c055cd_1186x788.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rRyH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2762b099-8eab-4a0e-9526-813b95c055cd_1186x788.png" width="1186" height="788" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2762b099-8eab-4a0e-9526-813b95c055cd_1186x788.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:788,&quot;width&quot;:1186,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:158987,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rRyH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2762b099-8eab-4a0e-9526-813b95c055cd_1186x788.png 424w, https://substackcdn.com/image/fetch/$s_!rRyH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2762b099-8eab-4a0e-9526-813b95c055cd_1186x788.png 848w, https://substackcdn.com/image/fetch/$s_!rRyH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2762b099-8eab-4a0e-9526-813b95c055cd_1186x788.png 1272w, https://substackcdn.com/image/fetch/$s_!rRyH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2762b099-8eab-4a0e-9526-813b95c055cd_1186x788.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">An example, small scale Merkle Tree. Source: decentralized thoughts.</figcaption></figure></div><p>&#128215; <strong>Alin Tomescu</strong>'s <em>What is a Merkle Tree</em> defines that data structure that is foundational to many distributed systems by giving three examples: integrity of a set of files, Bitcoin transaction verification, and corruption detection when transmitting data. The perfect combination of applied theory!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://decentralizedthoughts.github.io/2020-12-22-what-is-a-merkle-tree/&quot;,&quot;text&quot;:&quot;Read the full article&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://decentralizedthoughts.github.io/2020-12-22-what-is-a-merkle-tree/"><span>Read the full article</span></a></p><div><hr></div><h2>The difference between root certificate authorities, intermediates, and resellers</h2><p>As we live in a post-Lets Encrypt world, SSL certificates aren't the currency they once were. Yet they still are invaluable to secure the Internet.</p><p>That security revolves around the essential concept of <strong>trust</strong> with some cryptography on top. Browsers only accept certificates for HTTPS webpages if they were issued by a <strong>publicly-trusted SSL certificate authority</strong>. But how does it work? Who are these Certificate Authorities, and why are so many?</p><blockquote><p>"There are two types of CA certificates: root and intermediate."</p><p>"<strong>Root CA certificates</strong>, also known as "trust anchors" or just "roots", are shipped with your browser."</p><p>"<strong>Intermediate</strong> <strong>CA certificates</strong> [...] are certificates with the "CA" boolean set to true in the Basic Constraints extension, and which were issued by a root or another intermediate."</p></blockquote><p>Intermediate CA certificates recursively point to other certificates. If the recursion ends with a trusted root CA certificate, browsers know they're trusted. Simple. So why are there so many different issuers but so few trusted root CAs (Firefox trusts around 50 organizations)?</p><p>Because SSL certificates have long been a lucrative business, with many different models that are complex to tell apart:</p><ol><li><p>Root CAs often have their own business selling certificates.</p></li><li><p>But they can also issue "external" intermediate certificates to other organizations that can issue certificates, too.</p></li><li><p>Or open a reseller API for anyone to sell certificates issued by the CA.</p></li></ol><p>And the entire thing is recursive!</p><p>&#128215; <strong>Andrew Ayer</strong>'s <em>The Difference Between Root Certificate Authorities, Intermediates, and Resellers</em> describes the ecosystem around certificate issuance. Even in a world where Lets Encrypt enables any organization to generate trusted certificates for free, these intermediates and resellers still have immense businesses.=</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.agwa.name/blog/post/roots_intermediates_and_resellers&quot;,&quot;text&quot;:&quot;Read the full article on Andrew's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.agwa.name/blog/post/roots_intermediates_and_resellers"><span>Read the full article on Andrew's blog</span></a></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #54]]></title><description><![CDATA[Do GTM first to build better products, Overcoming mid-career stuckness, and a mental model to visualize SQL queries: don't start with SELECT.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-54</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-54</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 02 Sep 2023 09:11:06 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!tcij!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d15e106-13ed-4386-9805-992e7a550e40_576x876.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#128075; Hi, this is Mathias, back from holidays &#128526; with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also: <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>Shift left on go-to-market to build better products</h2><div class="pullquote"><p>"Go-to-market considerations are not extra. How your product is discovered and adopted is part of the product."</p></div><p>GTM is part of the product and part of the PM's job. And like other considerations, it shouldn't happen in a vacuum. Go-to-market must influence and be influenced by users, problems, opportunities, solutions, and execution.</p><p>But what's GTM, exactly? Many things.</p><blockquote><p><strong>Go to Market</strong> is a catch all term for the process of bringing a product to market and making it available to customers."</p></blockquote><p><strong>Distribution.</strong> How will I get the customer to benefit from the value? How will I communicate that value? How do I want customers to think about the product?</p><blockquote><p>"Great PMs <em>shift left</em> on go to market, considering and developing their distribution strategy while they're still prioritizing problems to solve, long before a PRD is written, let alone a line of code. And they build better products because of it."</p></blockquote><p>How do they build better products? By closing the feedback loop and using early learnings and GTM reflections to inform their product strategy.</p><p>You can do it too! Try the famous <em>Working backwards</em> Amazon method of writing your product's press release first. Write a FAQ. Or even simpler, the author suggests writing the website copy for that new product. These will force you to step into your customer's shoes and think about GTM.</p><blockquote><p>"Once you begin acting as though <strong>GTM is your job</strong> (it is), you'll find that you have better ideas not only about how, where, and when to distribute your product, but actually about what to build."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!73vW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1575a75b-7bc6-4c67-aaec-7a14bbe38dcb_788x264.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!73vW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1575a75b-7bc6-4c67-aaec-7a14bbe38dcb_788x264.png 424w, https://substackcdn.com/image/fetch/$s_!73vW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1575a75b-7bc6-4c67-aaec-7a14bbe38dcb_788x264.png 848w, https://substackcdn.com/image/fetch/$s_!73vW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1575a75b-7bc6-4c67-aaec-7a14bbe38dcb_788x264.png 1272w, https://substackcdn.com/image/fetch/$s_!73vW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1575a75b-7bc6-4c67-aaec-7a14bbe38dcb_788x264.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!73vW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1575a75b-7bc6-4c67-aaec-7a14bbe38dcb_788x264.png" width="575" height="192.63959390862945" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1575a75b-7bc6-4c67-aaec-7a14bbe38dcb_788x264.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:264,&quot;width&quot;:788,&quot;resizeWidth&quot;:575,&quot;bytes&quot;:38619,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!73vW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1575a75b-7bc6-4c67-aaec-7a14bbe38dcb_788x264.png 424w, https://substackcdn.com/image/fetch/$s_!73vW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1575a75b-7bc6-4c67-aaec-7a14bbe38dcb_788x264.png 848w, https://substackcdn.com/image/fetch/$s_!73vW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1575a75b-7bc6-4c67-aaec-7a14bbe38dcb_788x264.png 1272w, https://substackcdn.com/image/fetch/$s_!73vW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1575a75b-7bc6-4c67-aaec-7a14bbe38dcb_788x264.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Source: ft.io</figcaption></figure></div><p>&#128215; <strong>Frank Tisellano</strong>'s <em>Shift left on go-to-market to build better products</em> goes deeper into why GTM is essential to the Product job. The author also gives the brilliant example of Airbnb to illustrate how embedding a distribution strategy into your product can make a huge difference.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.ft.io/blog/shift-left/&quot;,&quot;text&quot;:&quot;Read the full article on Frank's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.ft.io/blog/shift-left/"><span>Read the full article on Frank's blog</span></a></p><div><hr></div><h2>Mid-career stuckness</h2><p><em>Read about it before (or while) it strikes!</em></p><p>After a few years of career, it's easy to be caught in an existential crisis. Whatever you were hired to do as an individual, you now do ten times faster, and better. You feel as good technically, if not better than some Senior colleagues, yet they get paid twice as much as you and have a more prestigious title.</p><p>Relax&#8211;you're experiencing your first career stuckness, a first wall to hit and crawl over.</p><blockquote><p>"The most common cause [...] is the lack of an understanding of their power, the power of others, and then not developing their sources of power and using those to influence others to get things done."</p></blockquote><p>Still unclear? Let me develop the idea:</p><ol><li><p>Your manager evaluates your impact. <strong>The</strong> <strong>impact is all that matters</strong>.</p></li><li><p>There is a smaller chance than when you started that you can do your job ten times faster now to have more impact.</p></li><li><p>The answer is <strong>others</strong>. One of the main traits of a Senior person, beyond autonomy, is their ability to have impact through and with others. <strong>Influence</strong>. <strong>Leadership</strong>.</p></li></ol><blockquote><p>&#8220;Leadership is a process of influencing a group of people to produce some common goals."</p></blockquote><p>How do you build that influence? By exercising some power. While it can have a negative connotation when used against someone's will, power is broader and kinder than this! Learn to recognize your strengths and how to use them effectively.</p><p>Your powers can be:</p><ol><li><p>Technical expertise. Not just ability but something greater that can benefit your organization and peers.</p></li><li><p>How you feel about others and others feel about you.</p></li></ol><blockquote><p>"When people see you as a role model, like working with you, want to be associated with you, or are drawn towards you for your charisma, you can influence them without formal authority."</p></blockquote><ol start="3"><li><p>Your role, title, and relationships in the company.</p></li><li><p>And, of course, your ability to give, reward, and punish.</p></li></ol><p>But they can be many other things relative to your peers' needs.</p><p>&#128215; <strong>Subbu Allamaraju</strong>'s <em>Mid Career Stuckness</em> is a must-read for all professionals. Beyond the "leadership is power" dogma, the author gives pragmatic advice on how to grow your understanding of leadership, influence, and power.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.subbu.org/articles/2023/mid-career-stuckness/&quot;,&quot;text&quot;:&quot;Read the full article on Subbu's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.subbu.org/articles/2023/mid-career-stuckness/"><span>Read the full article on Subbu's blog</span></a></p><div><hr></div><h2>SQL queries don&#8217;t start with SELECT</h2><p>When building queries involving multiple operators, we often ask the same questions. One is "<em>Can you filter the result of a window function in a WHERE or HAVING or something?</em>"</p><blockquote><p>"This led me to a bigger question &#8211; what order do SQL queries actually run in?"</p></blockquote><p>Julia Evans means in what order is the SQL expression evaluated, which will drive what you can and cannot do with SQL. The order is as follows:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tcij!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d15e106-13ed-4386-9805-992e7a550e40_576x876.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tcij!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d15e106-13ed-4386-9805-992e7a550e40_576x876.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tcij!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d15e106-13ed-4386-9805-992e7a550e40_576x876.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tcij!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d15e106-13ed-4386-9805-992e7a550e40_576x876.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tcij!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d15e106-13ed-4386-9805-992e7a550e40_576x876.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tcij!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d15e106-13ed-4386-9805-992e7a550e40_576x876.jpeg" width="446" height="678.2916666666666" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7d15e106-13ed-4386-9805-992e7a550e40_576x876.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:876,&quot;width&quot;:576,&quot;resizeWidth&quot;:446,&quot;bytes&quot;:33158,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tcij!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d15e106-13ed-4386-9805-992e7a550e40_576x876.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tcij!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d15e106-13ed-4386-9805-992e7a550e40_576x876.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tcij!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d15e106-13ed-4386-9805-992e7a550e40_576x876.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tcij!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d15e106-13ed-4386-9805-992e7a550e40_576x876.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: Julia Evans.</figcaption></figure></div><p>That mental model can help you evaluate faster whether you can apply WHERE to data transformed by window functions.</p><p>&#128680; Beware! This is just the SQL evaluation, not data processing.</p><blockquote><p>"Database engines in practice don't actually run queries by joining, and then filtering, and then grouping, because they implement a bunch of optimizations reorder things to make the query run faster as long as reordering things won't change the results of the query."</p></blockquote><p>&#128215; <strong>Julia Evans</strong>'s <em>SQL queries don't start with SELECT</em> is an excellent diagram to keep in mind when writing SQL queries.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jvns.ca/blog/2019/10/03/sql-queries-don-t-start-with-select/&quot;,&quot;text&quot;:&quot;Read the full article on Julia's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jvns.ca/blog/2019/10/03/sql-queries-don-t-start-with-select/"><span>Read the full article on Julia's blog</span></a></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #53]]></title><description><![CDATA[Hashicorp's founder's approach to building Large Technical Projects, Emojis under the hood are complex but fun unicodes combos, and the timeless discussion of how to Scale Stateful Objects.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-53</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-53</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 05 Aug 2023 09:11:55 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a2011d-60b0-491c-b8de-ab7661755233_640x427.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#128075; Hi, this is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also: <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>M. Hashimoto&#8217;s approach to building Large Technical Projects</h2><p><em>How Mitchell Hashimoto (Terraform, Vagrant, and many more) builds and completes large projects.</em></p><blockquote><p>"Whether it's building a new project from scratch, implementing a big feature, or beginning a large refactor, it can be difficult to stay motivated and complete large technical projects."</p></blockquote><p>Who best than Mitchell, founder of Hashicorp and founding engineer of many of Hashicorp's impressive suite of tools, to take advice from on that topic?</p><p>He advises to <strong>cadence</strong> the visible results to <strong>keep your excitement high</strong> and use continuous <strong>demo</strong>-ability and that excitement factor to order your work. How does he stay excited about the project?</p><blockquote><p>"The goal is to always give yourself a good demo. [...] Initially, I try to think what a realistic project is where I can see results as soon as possible."</p></blockquote><p>Break down the large projects into small sub-projects with visible results, and start building to assemble them into a first demo.</p><p>Once you reach a runnable demo, you can return to small sub-problems and fix the most critical issues. A usable demo helps prioritize these problems: you can now feel firsthand what needs improvement.</p><p>&#128215; <strong>Mitchell Hashimoto</strong>'s <em>My Approach to Building Large Technical Project</em> explains the method through the example of a terminal emulator personal project Mitchell has been building. While the advice may seem generic, it's essential to remember that motivation is deeply personal.</p><blockquote><p>"Everyone I think needs to find some process to reinforce their motivation in a healthy way. I realized seeing results motivates me really strongly, I've built my work style around that, and it has worked well for me thus far."</p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://mitchellh.com/writing/building-large-technical-projects&quot;,&quot;text&quot;:&quot;Read the full article on Mitchell's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://mitchellh.com/writing/building-large-technical-projects"><span>Read the full article on Mitchell's blog</span></a></p><div><hr></div><h2>Emoji under the hood</h2><p>Did you know that complex emojis are just combinations of existing ones?</p><p>&#128104; + &#128187; &#8594; &#128104;&#8205;&#128187;</p><p>&#128059; + &#10052;&#65039; &#8594; &#128059;&#8205;&#10052;&#65039;</p><p>The Unicode implementation of emojis is quite fascinating.</p><blockquote><p>"At their simplest, they are just that: another symbol in a Unicode table. That's why emoji behave like any other letter: they can be typed in a text field, copied, pasted, rendered in a plain text document,..."</p></blockquote><p>The simple ones have a code of their own.</p><p>&#128025; is just U+1F419.</p><p>The rest are the source of many engineer nightmares because one character maps not to one but to a sequence of codepoints.</p><blockquote><p>"Meet <strong>Grapheme Clusters.</strong> Grapheme cluster is a sequence of codepoints that is considered a single human-perceived glyph."</p><p>"Grapheme clusters create many complications for programmers. You can't just do substring(0, 10) to take the first 10 characters&#8212;you might split an emoji in half (or an acute, so don't do it anyway)!"</p></blockquote><p><strong>&#9888;&#65039;</strong> You can't cut strings, can't measure an accurate length, or reverse them without a grapheme-cluster-aware library. So complex emojis are combinations of multiple codes, some of which are valid standalone emojis (but not all).</p><blockquote><p>"Instead of adding a new codepoint for each emoji and skin tone combination, only five new codepoints were added. [...] Together they form a ligature: &#128075; (U+1F44B WAVING HAND SIGN) directly followed by &#127997; (U+1F3FD MEDIUM SKIN TONE MODIFIER) becomes &#128075;&#127997;."</p></blockquote><blockquote><p>"U+200D is called ZERO-WIDTH JOINER, or ZWJ for short. It works similarly to what we saw with skin tone, but this time you can join two self-sufficient emoji into one. Not all combinations work, but many do, sometimes in surprising ways!"</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!m_B4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c07591-95d0-4c12-b00a-f5b088d9963f_1310x454.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!m_B4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c07591-95d0-4c12-b00a-f5b088d9963f_1310x454.png 424w, https://substackcdn.com/image/fetch/$s_!m_B4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c07591-95d0-4c12-b00a-f5b088d9963f_1310x454.png 848w, https://substackcdn.com/image/fetch/$s_!m_B4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c07591-95d0-4c12-b00a-f5b088d9963f_1310x454.png 1272w, https://substackcdn.com/image/fetch/$s_!m_B4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c07591-95d0-4c12-b00a-f5b088d9963f_1310x454.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!m_B4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c07591-95d0-4c12-b00a-f5b088d9963f_1310x454.png" width="1310" height="454" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/80c07591-95d0-4c12-b00a-f5b088d9963f_1310x454.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:454,&quot;width&quot;:1310,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:75119,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!m_B4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c07591-95d0-4c12-b00a-f5b088d9963f_1310x454.png 424w, https://substackcdn.com/image/fetch/$s_!m_B4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c07591-95d0-4c12-b00a-f5b088d9963f_1310x454.png 848w, https://substackcdn.com/image/fetch/$s_!m_B4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c07591-95d0-4c12-b00a-f5b088d9963f_1310x454.png 1272w, https://substackcdn.com/image/fetch/$s_!m_B4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c07591-95d0-4c12-b00a-f5b088d9963f_1310x454.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A lengthy combination of unicode codepoints can lead to a single emoji. Source: tonsky.me.</figcaption></figure></div><p>&#128215; <strong>Nikita Prokopov</strong>'s <em>Emojis under the hood</em> details all the hidden secrets of emojis' unicode representation. It's a lot of fun but also quite actionable knowledge. For instance, you do not need a large mapping table to turn an ISO country code into its flag, but a little emoji magic!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://tonsky.me/blog/emoji/&quot;,&quot;text&quot;:&quot;Read the full article on Nikita's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://tonsky.me/blog/emoji/"><span>Read the full article on Nikita's blog</span></a></p><div><hr></div><h2>Scaling Stateful Objects</h2><blockquote><p>"It is widely (MIS)believed that stateless Server-Side Apps are The Only Way&#8482; to scale Server-Side."</p></blockquote><p>Every serious project starts with a stateless handler and a database. And for most, the best practice is to persist every action to the database. At scale, there are many solutions to scaling reads, from caches to replicas.</p><p>But <strong>writes are a lot more complex to scale</strong> without losing ACID guarantees.</p><p>For your application, the more you write, the more this becomes a problem. Reads will almost scale infinitely but writes undoubtedly won't.</p><blockquote><p>&#8220;keeping our request handlers stateless, does NOT really solve the scalability problem; instead &#8211; it merely pushes it to the database."</p><p>"In a pretty much any serious real-world interactive system, it is <strong>database which is The Bottleneck</strong>&#8482;."</p></blockquote><p>But write-heavy applications exist, the most famous being online games and all other interactive, real-time applications like Figma. These applications cannot guarantee scalability and low latency if they push every action to durable storage.</p><blockquote><p>"Server-Side Apps with an In-Memory State can easily save us 10x-1000x of database load."</p></blockquote><blockquote><p>"Of course, these performance benefits of Stateful Server-Side Apps don't come for free (nothing does). The currency we'll be paying with for this drastically improved performance, is Lack of Durability. In other words &#8211; if our Stateful Server-Side App crashes, we'll lose all the state which haven't been saved yet to the DB."</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ga2Q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a2011d-60b0-491c-b8de-ab7661755233_640x427.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ga2Q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a2011d-60b0-491c-b8de-ab7661755233_640x427.png 424w, https://substackcdn.com/image/fetch/$s_!ga2Q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a2011d-60b0-491c-b8de-ab7661755233_640x427.png 848w, https://substackcdn.com/image/fetch/$s_!ga2Q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a2011d-60b0-491c-b8de-ab7661755233_640x427.png 1272w, https://substackcdn.com/image/fetch/$s_!ga2Q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a2011d-60b0-491c-b8de-ab7661755233_640x427.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ga2Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a2011d-60b0-491c-b8de-ab7661755233_640x427.png" width="640" height="427" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e0a2011d-60b0-491c-b8de-ab7661755233_640x427.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:427,&quot;width&quot;:640,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:61831,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ga2Q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a2011d-60b0-491c-b8de-ab7661755233_640x427.png 424w, https://substackcdn.com/image/fetch/$s_!ga2Q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a2011d-60b0-491c-b8de-ab7661755233_640x427.png 848w, https://substackcdn.com/image/fetch/$s_!ga2Q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a2011d-60b0-491c-b8de-ab7661755233_640x427.png 1272w, https://substackcdn.com/image/fetch/$s_!ga2Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a2011d-60b0-491c-b8de-ab7661755233_640x427.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Stateless vs stateful systems. Source: IT Hare.</figcaption></figure></div><p>&#128215; <strong>IT Hare</strong>'s <em>Scaling Stateful Objects</em> is a timeless read (except for a few numbers) about the complexity of scaling write-heavy applications. It raises a valid point of durability vs. performance and offers many patterns to solve this. We engineers have a love-hate relationship with stateful systems, but there is still innovation in the space, like Cloudflare's Durable Objects.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;http://ithare.com/scaling-stateful-objects/&quot;,&quot;text&quot;:&quot;Read the full article on IT Hare&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="http://ithare.com/scaling-stateful-objects/"><span>Read the full article on IT Hare</span></a></p>]]></content:encoded></item><item><title><![CDATA[Learning from Giants #52]]></title><description><![CDATA[The most opinionated database design doc in the world, Reddit's image serving and optimization stack, and defining Design system components collaboratively.]]></description><link>https://newsletter.ongiants.com/p/learning-from-giants-52</link><guid isPermaLink="false">https://newsletter.ongiants.com/p/learning-from-giants-52</guid><dc:creator><![CDATA[Mathias Griffe]]></dc:creator><pubDate>Sat, 29 Jul 2023 09:11:06 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dIBj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f42856c-7447-4d8b-8596-0e295b754143_1999x1046.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#128075; Hi, this is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.</p><p><em>Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. <a href="https://newsletter.ongiants.com/archive">Read the archive</a> for even more great content. Also: <a href="https://www.linkedin.com/in/mgriffe/recent-activity/shares/">I share these articles daily on LinkedIn</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.ongiants.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.ongiants.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>TigerBeetle&#8217;s database design document</h2><p><em>TigerBeetle shows how specialization can enable building a database an order of magnitude more performant and resilient.</em></p><p><strong>TigerBeetle</strong> is a distributed financial accounting database and possibly the most <strong>opinionated</strong> database in the world.</p><blockquote><p>"TigerBeetle implements the latest research and technology to deliver unprecedented safety, durability and performance while reducing operational costs by orders of magnitude and providing a fantastic developer experience."</p></blockquote><p>The team goes to extreme lengths to reach their expected <strong>performance</strong> and <strong>resilience</strong>. And one important axis is <strong>simplifying</strong> the business domain as much as possible.</p><blockquote><p>"In theory, TigerBeetle is a replicated state machine that takes an initial starting state (account opening balances), and applies a set of input events (transfers) in deterministic order, after first replicating these input events safely, to arrive at a final state (account closing balances)."</p></blockquote><p>That's it. Everything else stems or is made possible by these simple foundations.</p><p>&#128215; <strong>Joran Greef</strong>'s <em>Design Document of TigerBeetle</em> is a fascinating read because it describes the lengths he goes to build the fastest and safest accounting database. Every detail is rigorously thought-through, from every fixed-size data structure to the replication protocol and timestamp management. And as a bonus, TigerBeetle is open source so you can see the resulting codebase.</p><p>These principles can apply to all software: simplifying the business domain and closing (or opening) future space for evolution is an important decision that can dramatically impact whatever you're looking to optimize. In Tigerbeetle's case, it's all for performance and resilience, but in most other cases, <strong>it's OK to trade some performance for optionality.</strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://github.com/tigerbeetle/tigerbeetle/blob/main/docs/DESIGN.md&quot;,&quot;text&quot;:&quot;Read the full doc on Github&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://github.com/tigerbeetle/tigerbeetle/blob/main/docs/DESIGN.md"><span>Read the full doc on Github</span></a></p><div><hr></div><h2>Just-in-time image optimization at Reddit&#8217;s scale</h2><p>Reddit serves <strong>billions</strong> of images per day.</p><p>Building a great browsing experience in a media-heavy platform requires lightning-fast image loading. Reddit does that through <strong>image optimization</strong> (reducing the size, picking the correct format) and <strong>caching</strong> the transformed images.</p><blockquote><p>"Reddit has been using a just-in-time image optimizer relying on third-party vendors since 2015. [...] it made sense to move this functionality in-house due to cost and control over the end-to-end user experience"</p></blockquote><p>The cost aspect led to the decision to focus on images. So the team set out to <strong>replace</strong> this central piece of the Reddit platform.</p><blockquote><p>"Our task was to change almost everything about how billions of images are served daily without the user ever noticing and without breaking any of the upstream company functions."</p></blockquote><p>The solution chains the following components:</p><ol><li><p>A <strong>Content Delivery Network</strong> (CDN). Answers all image-related requests and is in charge of caching responses. Image optimization is costly and lengthy, so the <em>Cache hit ratio</em> is the important CDN metric.</p></li><li><p>An <strong>image optimization service</strong> based on the C library libvips. Only called when the transformed image is not in the cache.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dIBj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f42856c-7447-4d8b-8596-0e295b754143_1999x1046.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dIBj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f42856c-7447-4d8b-8596-0e295b754143_1999x1046.png 424w, https://substackcdn.com/image/fetch/$s_!dIBj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f42856c-7447-4d8b-8596-0e295b754143_1999x1046.png 848w, https://substackcdn.com/image/fetch/$s_!dIBj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f42856c-7447-4d8b-8596-0e295b754143_1999x1046.png 1272w, https://substackcdn.com/image/fetch/$s_!dIBj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f42856c-7447-4d8b-8596-0e295b754143_1999x1046.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dIBj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f42856c-7447-4d8b-8596-0e295b754143_1999x1046.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5f42856c-7447-4d8b-8596-0e295b754143_1999x1046.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:340020,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dIBj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f42856c-7447-4d8b-8596-0e295b754143_1999x1046.png 424w, https://substackcdn.com/image/fetch/$s_!dIBj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f42856c-7447-4d8b-8596-0e295b754143_1999x1046.png 848w, https://substackcdn.com/image/fetch/$s_!dIBj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f42856c-7447-4d8b-8596-0e295b754143_1999x1046.png 1272w, https://substackcdn.com/image/fetch/$s_!dIBj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f42856c-7447-4d8b-8596-0e295b754143_1999x1046.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Reddit&#8217;s image optimization migration. Source: Reddit engineering.</figcaption></figure></div><blockquote><p>"As a result of moving image optimization in-house, we were able to:</p><ul><li><p>Reduce our costs for animated GIFs to a mere <strong>0.9%</strong> of the original cost</p></li><li><p>Reduce p99 cache-miss latency for encoding animated GIFs <strong>from 20s to 4s</strong></p></li><li><p>Reduce bytes served for static images by <strong>~20%</strong>"</p></li></ul></blockquote><p>&#128215; <strong>Walter Michelin</strong>'s <em>Just In Time Image Optimization at Reddit scale</em> describes the mission-critical project the Reddit team undertook to move image processing and caching in-house. A good example of pragmatic engineering: start from the problem, identify the metrics, and build from there.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.reddit.com/r/RedditEng/comments/14lwlut/just_in_time_image_optimization_at_reddit_scale/&quot;,&quot;text&quot;:&quot;Read the full article on Reddit's blog&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.reddit.com/r/RedditEng/comments/14lwlut/just_in_time_image_optimization_at_reddit_scale/"><span>Read the full article on Reddit's blog</span></a></p><div><hr></div><h2>A collaborative approach to defining design systems components</h2><p><strong>Design systems</strong> have very different users with different agendas. Engineers optimize for clean code, and designers for a clean look &amp; feel. This misalignment leads to components being misused into stretched use cases, making the overall system more brittle and costly to evolve.</p><p>For example:</p><blockquote><p>"Modal, prompt, and popover are components that may look alike, but are intended to solve very <strong>different problems</strong>."</p></blockquote><blockquote><p>"So, how can we come up with component definitions that everyone agrees on, and that can scale with the system as it continues to evolve?"</p></blockquote><ol><li><p>Start with a clear, specific <strong>purpose</strong>.</p></li></ol><blockquote><p>"When everyone agreed on the component&#8217;s purpose, naming and behaviors suddenly became clear."</p></blockquote><ol start="2"><li><p>Write the component's <strong>design rationale</strong>.</p></li></ol><blockquote><p>"We start with just the concept (modal), followed by a short, detailed description (e.g. a modal displays content in a layer above the page, requiring the user&#8217;s interaction to proceed), and then usage documentation, along with &#8220;do&#8221; and &#8220;don&#8217;t&#8221; examples."</p></blockquote><p>That design rationale will pave the way for consistency across your design system.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9P3C!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87d13867-dabc-4981-9024-4fd239d406ee_3200x1830.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9P3C!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87d13867-dabc-4981-9024-4fd239d406ee_3200x1830.png 424w, https://substackcdn.com/image/fetch/$s_!9P3C!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87d13867-dabc-4981-9024-4fd239d406ee_3200x1830.png 848w, https://substackcdn.com/image/fetch/$s_!9P3C!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87d13867-dabc-4981-9024-4fd239d406ee_3200x1830.png 1272w, https://substackcdn.com/image/fetch/$s_!9P3C!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87d13867-dabc-4981-9024-4fd239d406ee_3200x1830.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9P3C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87d13867-dabc-4981-9024-4fd239d406ee_3200x1830.png" width="616" height="352.4230769230769" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/87d13867-dabc-4981-9024-4fd239d406ee_3200x1830.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:833,&quot;width&quot;:1456,&quot;resizeWidth&quot;:616,&quot;bytes&quot;:133710,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9P3C!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87d13867-dabc-4981-9024-4fd239d406ee_3200x1830.png 424w, https://substackcdn.com/image/fetch/$s_!9P3C!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87d13867-dabc-4981-9024-4fd239d406ee_3200x1830.png 848w, https://substackcdn.com/image/fetch/$s_!9P3C!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87d13867-dabc-4981-9024-4fd239d406ee_3200x1830.png 1272w, https://substackcdn.com/image/fetch/$s_!9P3C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87d13867-dabc-4981-9024-4fd239d406ee_3200x1830.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A modal&#8217;s design rationale with specific purpose. Source: designsystems.com.</figcaption></figure></div><p>&#128215; <strong>Wart Burggraaf</strong>'s <em>A collaborative approach to defining components</em> describes how thinking about purpose can ease collaboration on design systems. If we take a step back, a design system is a product, and like all products, the first step to clarity and alignment is a clear vision. The purpose is that vision.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.designsystems.com/a-collaborative-approach-to-defining-components-and-their-features/&quot;,&quot;text&quot;:&quot;Read it on designsystems.com&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.designsystems.com/a-collaborative-approach-to-defining-components-and-their-features/"><span>Read it on designsystems.com</span></a></p>]]></content:encoded></item></channel></rss>