<?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[David’s Substack]]></title><description><![CDATA[My personal Substack]]></description><link>https://www.davidxiang.com</link><image><url>https://substackcdn.com/image/fetch/$s_!CJKD!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89cac8a7-ee22-4a53-a229-b983e9172667_1869x1641.jpeg</url><title>David’s Substack</title><link>https://www.davidxiang.com</link></image><generator>Substack</generator><lastBuildDate>Mon, 31 Aug 2026 05:11:43 GMT</lastBuildDate><atom:link href="https://www.davidxiang.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[David Xiang]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[davidxiang@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[davidxiang@substack.com]]></itunes:email><itunes:name><![CDATA[David Xiang]]></itunes:name></itunes:owner><itunes:author><![CDATA[David Xiang]]></itunes:author><googleplay:owner><![CDATA[davidxiang@substack.com]]></googleplay:owner><googleplay:email><![CDATA[davidxiang@substack.com]]></googleplay:email><googleplay:author><![CDATA[David Xiang]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[S3 Express One, Value-Less LSM Trees, ShardStore]]></title><description><![CDATA[It&#8217;s early 2024 and S3 continues its ubiquity in computing.]]></description><link>https://www.davidxiang.com/p/s3-express-one</link><guid isPermaLink="false">https://www.davidxiang.com/p/s3-express-one</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Mon, 05 Feb 2024 02:07:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!mZN5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21d05cef-37d5-4dcb-88b0-2c0a6224f4d2_800x421.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mZN5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21d05cef-37d5-4dcb-88b0-2c0a6224f4d2_800x421.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mZN5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21d05cef-37d5-4dcb-88b0-2c0a6224f4d2_800x421.png 424w, https://substackcdn.com/image/fetch/$s_!mZN5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21d05cef-37d5-4dcb-88b0-2c0a6224f4d2_800x421.png 848w, https://substackcdn.com/image/fetch/$s_!mZN5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21d05cef-37d5-4dcb-88b0-2c0a6224f4d2_800x421.png 1272w, https://substackcdn.com/image/fetch/$s_!mZN5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21d05cef-37d5-4dcb-88b0-2c0a6224f4d2_800x421.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mZN5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21d05cef-37d5-4dcb-88b0-2c0a6224f4d2_800x421.png" width="800" height="421" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/21d05cef-37d5-4dcb-88b0-2c0a6224f4d2_800x421.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:421,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:463453,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780206?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21d05cef-37d5-4dcb-88b0-2c0a6224f4d2_800x421.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mZN5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21d05cef-37d5-4dcb-88b0-2c0a6224f4d2_800x421.png 424w, https://substackcdn.com/image/fetch/$s_!mZN5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21d05cef-37d5-4dcb-88b0-2c0a6224f4d2_800x421.png 848w, https://substackcdn.com/image/fetch/$s_!mZN5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21d05cef-37d5-4dcb-88b0-2c0a6224f4d2_800x421.png 1272w, https://substackcdn.com/image/fetch/$s_!mZN5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21d05cef-37d5-4dcb-88b0-2c0a6224f4d2_800x421.png 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p></p><p>It&#8217;s early 2024 and S3 continues its ubiquity in computing. The often touted adjectives &#8220;serverless&#8221; or &#8220;cloud-native&#8221; usually mean&#8212;&#8221;we&#8217;re using S3 for something.&#8221; Amazon continues to push the boundaries of scale and further solidifies itself as the foundation for countless applications, platforms, and companies.</p><p>Recently, Amazon released their <a href="https://aws.amazon.com/s3/storage-classes/express-one-zone/">S3 Express One Zone Storage Class</a>, advertised as the &#8220;fastest cloud object storage for performance-critical application.&#8221; In this post, I&#8217;ll highlight three key features of Express One and share some guesses regarding their implications on S3&#8217;s internal architecture.</p><h2>S3 Express One Zone Highlights</h2><h3>Single Availability Zone</h3><p>Up until now, S3 has always been scoped to an AWS region. With S3 Express One, your data is now scoped to an Availability Zone (AZ). By enabling this, you sacrifice a bit of durability (no longer tolerant to AZ failures), but gain the performance benefits of co-located storage and compute.</p><h3>Crazy Default Throughput</h3><p>Classically, S3 enables up to 5.5K Requests-Per-Second (RPS) GETs (3.5K RPS for updates) for a given prefix (path leading up to an object&#8217;s key). Customers can easily bump up their throughput by manually adjusting their prefixes. However, if you&#8217;re on S3 Express One, you&#8217;ll get <strong>hundreds of thousands </strong>of RPS out of the box.</p><h3>Support For New Medias (SSDs?)</h3><p>Single-digit millisecond access times for persistent storage sounds excellent. The S3 team has never explicitly mentioned SSDs, but I believe it&#8217;s highly likely that this kind of performance is backed by new storage medias. Behind Amazon&#8217;s &#8220;Storage Classes&#8221;, there are strong signs that they are investing in new hardware types alongside new and novel software techniques.</p><h3>The Vision</h3><p>S3 is becoming the infinitely durable, infinitely scalable hard drive for the Internet. Let&#8217;s dive into each of these areas in a little more detail.</p><h2>Regional Scope to AZ Scope</h2><p>S3 is a regional service where the availability of one region (us-east-1) can never affect the availability of another region (eu-west-2).</p><div class="callout-block" data-callout="true"><p>When S3 first launched, the AWS team intended for it to be a global service where objects could be uploaded to a specific region and be eventually available from <em>any</em> region. The object&#8217;s <strong>data bits</strong> were PUT in one region and its <strong>indexing data</strong> would be replicated everywhere. <br><br>This proved challenging for a few reasons:</p><ol><li><p>Best effort replication of indexing data created unpredictable amounts of eventual consistency, <em>e.g. upload an object in us-east-1, but wait hours/days before it&#8217;s visible in us-west-1</em></p></li><li><p>Availability of all regions were coupled together in the general availability of S3</p></li><li><p>Unpredictable latency moving data bits along a big network</p></li></ol><p> Since ~2010, S3 ceased their intentions of being a global service and has been regional since. <br><br><a href="https://www.youtube.com/watch?v=sYDJYqvNeXU">AWS re:Invent 2023 &#8211; Deep dive on Amazon S3 (STG314)</a></p></div><p>The first implication of AZ-scope is that latency improves for both writing and reading.</p><p>Whenever you upload an object, S3 will break it into many pieces, or shards. The important part of this procedure is not the sharding itself, but <em>how</em> the shards are distributed. The distribution of the shards&#8212;and the healthy upkeep of this distribution&#8212;is what gives S3 its 11 9s of durability.</p><p>Even though the algorithm for the shard distribution is proprietary, we can guess at what properties must be maintained at all times:</p><ol><li><p>Given some amount of faulty hardware in an AZ (disks, rack, etc.), your data must still be available.</p></li><li><p>Given the loss or partial loss of an AZ, your data must still be available.</p></li></ol><p>Before your PUT request returns a 200, your object has been already been broken up and distributed in a way that meets these requirements. S3 would also employ heavy amounts of background workers to ensure these properties stay true at all times.</p><p>With S3 Express One, one improvement with write latency is that your object will only need to be sharded and distributed to a single AZ instead of a full region. This is important for latency-sensitive applications because even <a href="https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/availability-zones.html">~60 miles between AZs</a> makes a difference.</p><p>For read latency, access time for data are improved if you&#8217;re able to co-locate compute with storage in the same AZ. Latency is further improved by new media types which we will discuss soon.</p><p>An interesting side-effect of Express One&#8217;s AZ-scope is that it may influence how companies choose to deploy compute. In order to be available in the face of AZ failure, you may have set up K8S clusters to deploy regionally (across many AZs) by default. However, if you want to get the performance benefits of S3 Express One, you will have to start being explicit with where your compute is deployed to and subsequently more careful with handling AZ failures.</p><h2>100s of 1000s of Requests Per Second!</h2><p>With classic storage classes, S3 gradually scales with you as your application accesses your objects more frequently. For a given prefix (<em>/my-bucket/<strong>analytics/2023/</strong>jan_1.dump</em>) the limit is 5.5K RPS on GETs and a similar order of magnitude for updates. Customers are empowered to scale by adjusting prefixes (<em>/my-bucket/<strong>{some-distribution-of-values}/analytics/2023/</strong>jan_1.dump</em>) in order to gain more throughput, e.g allocate 10 prefixes and get an aggregated 55K RPS.</p><p>The one drawback of this is that it does not support bursts of new traffic well. S3 doesn&#8217;t start by giving you 5.5K RPS; it needs time and an smooth upward slope of traffic to scale your prefix up. Given that S3 is marketing itself as the premiere storage for latency-sensitive and AI/ML applications, can&#8217;t they just give us more throughput from the get-go?</p><p>It turns out that Amazon S3 can easily give you this throughput without breaking a sweat. For many multi-tenant software services, there is a common partitioning scheme that software engineers follow:</p><ol><li><p>Your application is getting off the ground. You make the reasonable choice to partition by some <em>tenant_id </em>or <em>customer_id.</em></p></li><li><p>Your application is successful and now some tenants are orders of magnitude larger than others. Hot spots start popping up. Instead of re-architecting everything, you opt for some kind of selective partitioning, e.g. Kim Kardashian&#8217;s X account gets special treatment in the backend.</p></li></ol><p>S3 has actually reached a third level of scale where #2 is no longer an issue for them. With Amazon&#8217;s ultra-scale, the aggregate of all of their workloads (no matter how sporadic and bursty they may be) will be smooth&#8212;and subsequently the partitioning scheme may be very simplistic.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lAU-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6b1243-08b3-4859-ad24-918945ce4b6e_1920x964.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lAU-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6b1243-08b3-4859-ad24-918945ce4b6e_1920x964.png 424w, https://substackcdn.com/image/fetch/$s_!lAU-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6b1243-08b3-4859-ad24-918945ce4b6e_1920x964.png 848w, https://substackcdn.com/image/fetch/$s_!lAU-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6b1243-08b3-4859-ad24-918945ce4b6e_1920x964.png 1272w, https://substackcdn.com/image/fetch/$s_!lAU-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6b1243-08b3-4859-ad24-918945ce4b6e_1920x964.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lAU-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6b1243-08b3-4859-ad24-918945ce4b6e_1920x964.png" width="1456" height="731" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5b6b1243-08b3-4859-ad24-918945ce4b6e_1920x964.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:731,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:463433,&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;:&quot;https://davidxiang.substack.com/i/212780206?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6b1243-08b3-4859-ad24-918945ce4b6e_1920x964.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lAU-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6b1243-08b3-4859-ad24-918945ce4b6e_1920x964.png 424w, https://substackcdn.com/image/fetch/$s_!lAU-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6b1243-08b3-4859-ad24-918945ce4b6e_1920x964.png 848w, https://substackcdn.com/image/fetch/$s_!lAU-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6b1243-08b3-4859-ad24-918945ce4b6e_1920x964.png 1272w, https://substackcdn.com/image/fetch/$s_!lAU-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6b1243-08b3-4859-ad24-918945ce4b6e_1920x964.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 aria-hidden="true" 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><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 href="https://www.youtube.com/watch?v=v3HfUNQ0JOE">AWS re:Invent 2022 &#8211; Deep dive on Amazon S3 (STG203)</a></figcaption></figure></div><p>S3 may be one of the few software services in this world that can do this.</p><p>My guess is that for classic buckets, S3&#8217;s partitioning schema might have looked something like <em>{customer_id}_{bucket}_{object_prefix}_{hash_object_key_and_other_metadata}</em>. If you imagine this being the partitioning scheme for a consistent hash ring, then it would be convenient for the architecture to slowly scale up for a given customer, bucket, or object prefix.</p><p>With S3 Express One, you are forced to use the new &#8220;Directory Bucket.&#8221; Under the hood, I believe this is actually just a way for the S3 architecture to utilize a different, probably more uniform, partitioning scheme, e.g <em>{one_hash_of_many_fields}</em> specifically for Express One objects.</p><p>Given Amazon&#8217;s trillion-object scale, they&#8217;ve grown beyond hotspots and have no problem distributing heavy amounts of your application&#8217;s load to their fleets. This is a scenario where insane scale actually makes things easier.</p><p>And if that wasn&#8217;t enough throughput for you, S3 has even more ways to increase parallelism such as multi-value DNS entries and multi-part upload requests.</p><h2>Single-digit Millisecond Access with ShardStore</h2><p>The release of S3 Express One represents Amazon&#8217;s commitment to support high-performance, latency-sensitive applications. Up until now, S3 has scaled to amazing levels with commodity HDDs. They have focused on durability and availability, but raw performance has never quite made it to the top of their requirements list&#8212;until now.</p><p>Assuming that the mechanics of HDDs are not sufficient for high-performance applications, S3 has shown signs of evolving to support new hardware, or in marketing terms &#8220;Storage Classes.&#8221; Managing persistence of brand new media types would necesitate significant changes in the software and data structures used. Said another way, it would not be realistic for S3 to keep their existing software and simply swap out the hardware.</p><p>For the last few years, Amazon S3 has been developing and gradually deploying &#8220;<a href="https://www.cs.utexas.edu/~bornholt/papers/shardstore-sosp21.pdf">ShardStore</a>&#8220;, a new Rust-based service dedicated to managing the storage of shards (pieces of your S3 objects) which I believe may be purposefully designed for SSDs. The linked paper focuses on verification techniques of ShardStore, but they include a short section on its design which we&#8217;ll review.</p><h3>Introducing a <strong>New Style of LSM Trees</strong></h3><div class="callout-block" data-callout="true"><p>The following section assumes a basic understanding of LSM Trees and how they are used in databases. There are tons of great resources to learn more about this. If any term or concept is unfamiliar, please pause the blog and do a quick dive on the topic.</p></div><p>If S3 wants to consistently deliver the first bytes of data to you within single-digit milliseconds, they will need hardware that is exceptional at random access. SSDs have their own trade-offs (e.g. expensive), but the one area where they shine is with random access.</p><p>One challenge of LSM Tree databases is that there can be a high amount of write and read amplification. For a given write, layers of SSTables may be triggered for compaction. Similarly for a given read, layers of segments may need to be seeked to and scanned.</p><p>The paper &#8220;<a href="https://www.csc.lsu.edu/~fchen/publications/papers/TOS16.pdf">Internal Parallelism of Flash Memory-Based Solid-State Drives</a>&#8221; produces some important test results regarding SSDs:</p><ol><li><p>Concurrent read and write operations can cause &#8220;interference&#8221; that can negatively impact performance.</p></li><li><p>In good conditions, when random reads are issued concurrently, the aggregate throughput can match sequential throughput for some workloads.</p></li></ol><p>Another other important property of SSDs worth mentioning is that their health and longevity is correlated with how often you write data due to the physics of the &#8220;<a href="https://en.wikipedia.org/wiki/Flash_memory#Memory_wear">Program/Erase</a>&#8221; cycle.</p><p>Bringing all these points together, we come to the conclusion that classic LSM Tree data structures, with their heavy amounts of I/O amplification, may work effectively for HDDs, but would not be able to bring out the full potential of SSDs.</p><h3>Value-Less LSM Trees</h3><p>The only official publication I could find about ShardStore was in the paper &#8220;<a href="https://assets.amazon.science/07/6c/81bfc2c243249a8b8b65cc2135e4/using-lightweight-formal-methods-to-validate-a-key-value-storage-node-in-amazon-s3.pdf">Using Lightweight Formal Methods to Validate a Key-Value Storage Node in Amazon S3</a>.&#8221; An important note is that the design of ShardStore is heavily influenced by <a href="https://www.usenix.org/system/files/conference/fast16/fast16-papers-lu.pdf">WiscKey</a> (2016).</p><div class="callout-block" data-callout="true"><p>The main novelty here is that ShardStore uses an LSM Tree where the keys and values are <strong>separated</strong>, as opposed to conventional LSM Trees where both keys and values co-exist in one big logical tree.</p></div><p>In a sense, these new LSM Trees are &#8220;value-less&#8221;&#8212;instead of holding the KV value pairs, the tree maintains <strong>pointers to disk offsets</strong> where the actual values (data bits of your S3 object) reside. The primary advantage here is that the size of the tree is significantly reduced and subsequently write amplification may be significantly lower. Of course this new setup introduces its own challenges and complexities, but there must be a compelling reason why the S3 team has chosen this architecture!</p><h3>Complexities and Their Potential Solutions</h3><div class="callout-block" data-callout="true"><p><strong>The TL;DR is that this technique is designed and optimized specifically for SSDs, and is (probably) the new core entity managing storage in S3 Express One.</strong> <br><br>For the remainder of this article, I&#8217;ll go into more detail regarding this technique&#8217;s complexities and potential solutions. I&#8217;ve summarized these to help my own understanding, but interested readers may benefit more from going directly to the papers.</p></div><h4>Conceptualizing the Complexity&#8212;Managing Two Things Instead of One</h4><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WJiq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe91ffaa5-c7c5-43ef-bd55-280ca6b3af35_880x557.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WJiq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe91ffaa5-c7c5-43ef-bd55-280ca6b3af35_880x557.jpeg 424w, https://substackcdn.com/image/fetch/$s_!WJiq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe91ffaa5-c7c5-43ef-bd55-280ca6b3af35_880x557.jpeg 848w, https://substackcdn.com/image/fetch/$s_!WJiq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe91ffaa5-c7c5-43ef-bd55-280ca6b3af35_880x557.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!WJiq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe91ffaa5-c7c5-43ef-bd55-280ca6b3af35_880x557.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WJiq!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe91ffaa5-c7c5-43ef-bd55-280ca6b3af35_880x557.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e91ffaa5-c7c5-43ef-bd55-280ca6b3af35_880x557.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!WJiq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe91ffaa5-c7c5-43ef-bd55-280ca6b3af35_880x557.jpeg 424w, https://substackcdn.com/image/fetch/$s_!WJiq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe91ffaa5-c7c5-43ef-bd55-280ca6b3af35_880x557.jpeg 848w, https://substackcdn.com/image/fetch/$s_!WJiq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe91ffaa5-c7c5-43ef-bd55-280ca6b3af35_880x557.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!WJiq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe91ffaa5-c7c5-43ef-bd55-280ca6b3af35_880x557.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><a href="https://dev.to/creativcoder/what-is-a-lsm-tree-3d75">What is a LSM Tree?</a></figcaption></figure></div><p>In a classic LSM Tree, we conceptually think of one very large tree. The tree contains all KV pairs and <strong>is</strong><em> </em>the data. This data might exist in a memtable or in various layers of SSTable segments.</p><p>Now take each KV pair in the tree, move the values into special regions on persistent storage, and replace those values with pointers to those regions. Conceptually, the database is no longer a tree, but the <strong>combination</strong> of a special LSM Tree and various regions of storage.</p><p>The following diagram (taken from Amazon&#8217;s <a href="https://www.cs.utexas.edu/~bornholt/papers/shardstore-sosp21.pdf">paper</a>) is a high-level overview of ShardStore&#8217;s architecture. An LSM tree still exists, but is now significantly smaller because it only containers pointers. This technique also enables a lot of flexibility with where the actual data can be placed, e.g. ShardStore might manage multiple physical SSDs drives and selectively &#8220;spread out&#8221; the writes on the SSD to promote hardware longevity.</p><p>To repeat the previous key point again&#8212;our conceptual &#8220;database&#8221; now consists of <strong>two</strong> essential components: the value-less LSM Tree and all the persistent storage it references.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Moum!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81e46841-37a2-44d6-bb3d-05126b6f32db_1834x684.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Moum!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81e46841-37a2-44d6-bb3d-05126b6f32db_1834x684.png 424w, https://substackcdn.com/image/fetch/$s_!Moum!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81e46841-37a2-44d6-bb3d-05126b6f32db_1834x684.png 848w, https://substackcdn.com/image/fetch/$s_!Moum!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81e46841-37a2-44d6-bb3d-05126b6f32db_1834x684.png 1272w, https://substackcdn.com/image/fetch/$s_!Moum!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81e46841-37a2-44d6-bb3d-05126b6f32db_1834x684.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Moum!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81e46841-37a2-44d6-bb3d-05126b6f32db_1834x684.png" width="1456" height="543" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/81e46841-37a2-44d6-bb3d-05126b6f32db_1834x684.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:543,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:113895,&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;:&quot;https://davidxiang.substack.com/i/212780206?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81e46841-37a2-44d6-bb3d-05126b6f32db_1834x684.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Moum!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81e46841-37a2-44d6-bb3d-05126b6f32db_1834x684.png 424w, https://substackcdn.com/image/fetch/$s_!Moum!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81e46841-37a2-44d6-bb3d-05126b6f32db_1834x684.png 848w, https://substackcdn.com/image/fetch/$s_!Moum!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81e46841-37a2-44d6-bb3d-05126b6f32db_1834x684.png 1272w, https://substackcdn.com/image/fetch/$s_!Moum!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81e46841-37a2-44d6-bb3d-05126b6f32db_1834x684.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 aria-hidden="true" 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><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 &#8220;extent&#8221; is a contiguous region of physical storage, where a standard disk may have tens of thousands of extents. It is also possible (but not verified) that a single instance of ShardStore may manage an array of physical media. Conceptually, this makes extents a logical layer of many &#8220;mini&#8221; or &#8220;virtual&#8221; drives backed by some number of physical drives.</figcaption></figure></div><p>When considering this approach, the software has to keep both the tree and the extents synchronized at all times. The tree, alongside all its pointers, is <strong>consistent</strong> with the chunks of data being persisted in extents.</p><div class="callout-block" data-callout="true"><p><strong>What are Chunks?</strong> <br><br>In the diagram above, you&#8217;ll see that each shard is associated with N pointers. This is because ShardStore will actually break up your shards (which are already broken up pieces of your object) further into &#8220;chunks.&#8221; The chunks are what gets written into extents (the gray and blue squares). <br><br>This shows just how much S3 breaks down and distributes your data, i.e. you PUT an object, that object turns into shards spread across an AZ/Region, and those shards turn into chunks spread across extents.</p></div><p>If anything in the tree changes, a corresponding extent would need to be updated. Similarly, if a background process were to clean up an extent, then something in the original LSM Tree would need to be updated.</p><p>If you compare this to the classic LSM Tree, you may notice the delta in complexity. When a classic LSM Tree goes through background compaction, it&#8217;s just the merging of SSTables segments; no memory or special pointers need to be touched. When you write data, you edit the tree in the memtable and that is the <strong>only</strong> way an SSTable can be updated.</p><p>Now think about how merging and compaction might work with a ShardStore LSM Tree&#8212;it&#8217;s not as simple as just combining a few immutable files on disk.</p><h4>Range Queries Still Work</h4><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!l4IV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16cf19b2-7159-49be-9bff-343eded641ef_1024x336.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!l4IV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16cf19b2-7159-49be-9bff-343eded641ef_1024x336.png 424w, https://substackcdn.com/image/fetch/$s_!l4IV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16cf19b2-7159-49be-9bff-343eded641ef_1024x336.png 848w, https://substackcdn.com/image/fetch/$s_!l4IV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16cf19b2-7159-49be-9bff-343eded641ef_1024x336.png 1272w, https://substackcdn.com/image/fetch/$s_!l4IV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16cf19b2-7159-49be-9bff-343eded641ef_1024x336.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!l4IV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16cf19b2-7159-49be-9bff-343eded641ef_1024x336.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/16cf19b2-7159-49be-9bff-343eded641ef_1024x336.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!l4IV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16cf19b2-7159-49be-9bff-343eded641ef_1024x336.png 424w, https://substackcdn.com/image/fetch/$s_!l4IV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16cf19b2-7159-49be-9bff-343eded641ef_1024x336.png 848w, https://substackcdn.com/image/fetch/$s_!l4IV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16cf19b2-7159-49be-9bff-343eded641ef_1024x336.png 1272w, https://substackcdn.com/image/fetch/$s_!l4IV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16cf19b2-7159-49be-9bff-343eded641ef_1024x336.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>One of the defining characteristics of classic LSM Trees is that all keys and values are in sorted order. To read a value, or range of values, we locate a particular SSTable (usually with some sparse index) and can perform a sequential scan (potentially across many layers of files) to get our content. This is not extremely fast, but it&#8217;s also not extremely slow as HDDs are quite good at sequential scans; most of the time spent on reads is for the seek.</p><p>As we mentioned earlier, ShardStore&#8217;s LSM tree contains just pointers; the actual data isn&#8217;t there anymore. Getting a range of key/values is no longer a simple sequential scan of one file; it now becomes potentially a bunch of random access queries into persistent storage. This would perform extremely poorly on HDDs.</p><p>The <a href="https://www.usenix.org/system/files/conference/fast16/fast16-papers-lu.pdf">WiscKey paper</a> mentions that when random access reads are issued concurrently on an SSD, the aggregate throughput can actually match sequential throughput. Said another way&#8212;SSDs are really good at random access reads.</p><p>This is one of the main reasons why it&#8217;s likely ShardStore&#8217;s value-less LSM Trees are purpose-built for SSDs. The internal parallelism built into SSD hardware can support this data structure&#8217;s access patterns whereas this setup would be completely untenable on spinning disks.</p><h4>Reclaiming Space</h4><p>In classic LSM Trees, the process of reclaiming space is achieved via background tasks which merge and compact SSTables. This process is functionally simple&#8212;it&#8217;s a pseudo merge-sort between files. The challenge with these tasks is that they may cause heavy amounts of write amplification and even get in the way of the database serving requests.</p><p>With ShardStore LSM Trees, we have one small LSM Tree that still goes through normal compaction and merge procedures. However, the actual bulk of space to be reclaimed will be in extents. ShardStore introduces a lightweight background &#8220;garbage collection&#8221; task that handles this.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qdFz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe395406d-9b7d-4aa8-bbb0-509434e20682_1834x684.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qdFz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe395406d-9b7d-4aa8-bbb0-509434e20682_1834x684.png 424w, https://substackcdn.com/image/fetch/$s_!qdFz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe395406d-9b7d-4aa8-bbb0-509434e20682_1834x684.png 848w, https://substackcdn.com/image/fetch/$s_!qdFz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe395406d-9b7d-4aa8-bbb0-509434e20682_1834x684.png 1272w, https://substackcdn.com/image/fetch/$s_!qdFz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe395406d-9b7d-4aa8-bbb0-509434e20682_1834x684.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qdFz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe395406d-9b7d-4aa8-bbb0-509434e20682_1834x684.png" width="1456" height="543" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e395406d-9b7d-4aa8-bbb0-509434e20682_1834x684.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:543,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:113895,&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;:&quot;https://davidxiang.substack.com/i/212780206?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe395406d-9b7d-4aa8-bbb0-509434e20682_1834x684.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qdFz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe395406d-9b7d-4aa8-bbb0-509434e20682_1834x684.png 424w, https://substackcdn.com/image/fetch/$s_!qdFz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe395406d-9b7d-4aa8-bbb0-509434e20682_1834x684.png 848w, https://substackcdn.com/image/fetch/$s_!qdFz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe395406d-9b7d-4aa8-bbb0-509434e20682_1834x684.png 1272w, https://substackcdn.com/image/fetch/$s_!qdFz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe395406d-9b7d-4aa8-bbb0-509434e20682_1834x684.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 aria-hidden="true" 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><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></figure></div><p>In ShardStore, the extents are append-only. There is no way to immediately &#8220;delete&#8221; or &#8220;free-up&#8221; a chunk in an extent after a shard is deleted. However, we do have a way to mark a chunk as invalid. Consider a DELETE request for a given shardID, the only thing that has to happen is that the shardID&#8217;s entry in the LSM Tree is removed.</p><p>In the diagram above, the gray box in extent 18 is invalid, i.e. the shard that was referencing this chunk was deleted.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qzPl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0691b6b7-3ad5-4c3b-8bb1-82e94c7304c7_1676x604.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qzPl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0691b6b7-3ad5-4c3b-8bb1-82e94c7304c7_1676x604.png 424w, https://substackcdn.com/image/fetch/$s_!qzPl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0691b6b7-3ad5-4c3b-8bb1-82e94c7304c7_1676x604.png 848w, https://substackcdn.com/image/fetch/$s_!qzPl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0691b6b7-3ad5-4c3b-8bb1-82e94c7304c7_1676x604.png 1272w, https://substackcdn.com/image/fetch/$s_!qzPl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0691b6b7-3ad5-4c3b-8bb1-82e94c7304c7_1676x604.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qzPl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0691b6b7-3ad5-4c3b-8bb1-82e94c7304c7_1676x604.png" width="1456" height="525" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0691b6b7-3ad5-4c3b-8bb1-82e94c7304c7_1676x604.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:525,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:103687,&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;:&quot;https://davidxiang.substack.com/i/212780206?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0691b6b7-3ad5-4c3b-8bb1-82e94c7304c7_1676x604.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qzPl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0691b6b7-3ad5-4c3b-8bb1-82e94c7304c7_1676x604.png 424w, https://substackcdn.com/image/fetch/$s_!qzPl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0691b6b7-3ad5-4c3b-8bb1-82e94c7304c7_1676x604.png 848w, https://substackcdn.com/image/fetch/$s_!qzPl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0691b6b7-3ad5-4c3b-8bb1-82e94c7304c7_1676x604.png 1272w, https://substackcdn.com/image/fetch/$s_!qzPl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0691b6b7-3ad5-4c3b-8bb1-82e94c7304c7_1676x604.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 aria-hidden="true" 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><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></figure></div><p>A reclamation task running on extent 18 will:</p><ol><li><p>Iterate through every single chunk from the beginning of the extent</p></li><li><p>If the chunk is still referenced by the LSM Tree, it is still VALID and we append it to another extent</p></li><li><p>If the chunk is not referenced by the LSM Tree, it is INVALID and we continue on to the next chunk</p></li><li><p>Once all chunks are evaluated, the write pointer for that extent is reset and the space in extent 18 is reclaimed.</p></li></ol><div class="callout-block" data-callout="true"><p>Not shown in the diagram is all the metadata that would also need to be tracked for this data structure to work. For example: </p><ol><li><p>There must be a way to track all active &#8220;write pointers&#8221; for each extent.</p></li><li><p>There must be a way to do reverse look-ups on the LSM Tree.</p></li><li><p>There may be a way to track which extents are &#8220;active&#8221; or given priority over others for new shards.</p></li></ol></div><p>As you can see, this process is quite different than a classic compaction/merging process for an LSM Tree!</p><h4>Crash Consistency</h4><p>Finally, another major difference between these two designs is crash consistency. How is everything left in a consistent state after unexpected failures?</p><p>In classic LSM Trees, this responsibility was reserved for the Write Ahead Log (WAL) that would be initially updated at the start of every single operation. ShardStore and WiscKey state that they do not bother with a WAL and still manage to ensure crash consistency. I won&#8217;t review the strategies here, but please check out the papers if you&#8217;re curious.</p><h2>Conclusion</h2><p>S3 Express One Zone is a huge step forward for Amazon. S3 is no longer a big bucket full of image and video files, but is becoming <em>the</em> insanely reliable, durable, and <strong>performant</strong> hard drive for the Internet. Every day a new company pops up with a &#8220;serverless&#8221; platform that leverages S3 under the hood. Amazon S3&#8212;alongside YouTube, Netflix, WhatsApp, etc.&#8212;continues to strengthen its presence as one of the modern wonders of the computing world.</p>]]></content:encoded></item><item><title><![CDATA[Raising The Alarm]]></title><description><![CDATA[When was the the last time you realized a project was doomed?]]></description><link>https://www.davidxiang.com/p/raising-the-alarm</link><guid isPermaLink="false">https://www.davidxiang.com/p/raising-the-alarm</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Fri, 23 Dec 2022 01:03:42 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!CJKD!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89cac8a7-ee22-4a53-a229-b983e9172667_1869x1641.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When was the the last time you realized a project was doomed? That time you knew the plug should have been pulled, but you kept things quiet and watched the work painfully fizzle out.</p><p>If you care enough about the work, you probably have these feelings often.</p><p>Maybe there&#8217;s context you&#8217;re missing and you&#8217;re being too sensitive. Maybe the implementation is fine and you&#8217;re being too pessimistic. But&#8212;maybe you&#8217;re right and you have the opportunity to save the company years of toil and unmeasurable amounts of opportunity loss.</p><p>Realistically, you probably can&#8217;t affect the situation. Who are you to call off an important project? Who is another person to question your work? Everyone, from managers to executives, has a hard time with this. Nevertheless, your opinion matters; you might be able to nudge the ship and prevent a terrible outcome. At the very least you can try.</p><p>Why bother? When is this appropriate? How do you even communicate this?</p><h2><strong>Why</strong></h2><p>As a professional, you have the responsibility to voice concerns affecting the success of organization. Stopping what isn&#8217;t working is equally important as investing in what&#8217;s working.</p><p>If not for the sake of the organization, raise the alarm for the sake of yourself. Practice your seniority. Give a proper escalation with measurable impact, all while communicating effectively and respectfully to the right people. Few can do this.</p><p>Honestly, it doesn&#8217;t matter if you don&#8217;t get your preferred outcome; just knowing that you spoke up counts for something.</p><h2><strong>When</strong></h2><p>Consider voicing your opinion when stakes are high:</p><ul><li><p>Large change in architecture</p><ul><li><p>e.g. Initial steps towards a monolith to microservice migration, first attempt at event sourcing.</p></li></ul></li><li><p>Large change in deployment</p><ul><li><p>e.g. On-premise to &#8220;hybrid&#8221; to cloud, back to on-premise, and everything in-between.</p></li></ul></li><li><p>Large change in development</p><ul><li><p>e.g. Splitting all the repos, merging them all back, adopting a tool, deprecating it later.</p></li></ul></li></ul><p>If your development environment is distributed and isolated between teams, changes are less likely to have broad impact. However, watch out for situations where you&#8217;re working in a highly-shared system. This is when <em>any</em> change easily becomes high-stakes. As with anything, the more people it affects, the more significant it becomes. Here are some other questions to ask:</p><ul><li><p>Is the project overly ambitious?</p></li><li><p>Is the project taking forever?</p></li><li><p>Is the lead engineer on the project too defensive?</p></li><li><p>Are the goals of the project now irrelevant with respect to the company&#8217;s strategy?</p></li></ul><p>If you&#8217;re having uneasy feelings, I guarantee that there are other engineers feeling similarly. It&#8217;s common for a group of people to question something but to collectively do nothing about it.</p><p>If you care enough and the stakes seem high enough, this might be the time to do something.</p><h2><strong>How</strong></h2><p>How is the trickiest.</p><p>If you&#8217;re a senior engineer, who are you to raise the alarm on projects that support the Principal Engineer&#8217;s 5-year strategy? High-stakes changes are accompanied by strongly-held opinions. Someone has spent a lot of time thinking about this. If you believe there is a fundamental flaw in this work, things will inevitably get personal. As much as we&#8217;d like to believe we are detached from our work, we are not.</p><p>99% of the time, you should not attempt a direct approach. It&#8217;s unlikely that expressing your concerns in a 30-minute call with that Principal Engineer leads to the company killing a project.</p><p>Throughout the process, keep an open mind. You don&#8217;t have all the information. You will learn more about the issue as you engage with it. If at any point in the process your worries are assuaged, feel free to stand down. If at any point in the process you feel like your concerns aren&#8217;t being properly comprehended, feel free to push on.</p><h2>Find a Supporter</h2><p>I recommend the &#8220;How&#8221; to be indirect<strong>. </strong>Raise your concerns with someone who is not involved with the project.</p><p>The default person is your manager. You need to communicate your concerns clearly and share the reasons why you believe this project will not succeed. It&#8217;s important to include an appropriate <strong>severity</strong> level&#8212;what is the actual impact? Too often engineers raise critical issues only to have a follow-up be placed at bottom of their manager&#8217;s TODO list.</p><blockquote><p>I believe this {architecture change, adoption of new tool, migration, <em>insert project here</em>} is unlikely to succeed because we {don&#8217;t have the right expertise in place, don&#8217;t have the right staffing in place, have overlooked a fundamental design issue, <em>insert concern here</em>}. If we continue to pursue this, we may be at risk of {accumulating a significant amount of tech debt, risking a heavy blow to morale, severely destroying our velocity, <em>insert other trigger phrase</em> <em>here</em>}.</p><p>You</p></blockquote><p>Communication goes both ways. You need to simultaneously be a good communicator <strong>and</strong> a good listener. For the managers, pay attention to subdued escalations&#8212;do you think the engineer is downplaying the situation to not upset someone? For the engineers, be clear about impact and get your point across&#8212;is your manager actually connecting with you on the severity level?</p><p>Hopefully, you deliver your concerns effectively and your manager decides to take action. Consider this effort a close collaboration; this is not a baton pass from you to the manager. Use the manager to assist with back-channel alignment at higher levels. Write a concise summary of your concerns (an &#8220;asset&#8221; if you will) that your manager can reference and disseminate. Work together on how to propose additional accountability for the project at different levels. Figure out a way to get the right people in a room with the right set of expectations.</p><p>In the situation where your manager does not perceive your warning to be particularly significant, you may want to take things into your own hands. This will be de-motivating, but if you still care enough to do something&#8212;good for you.</p><p>Your feelings of unease are shared. Locate others that have similar concerns and consolidate multiple voices into one. This will give your collective opinion more weight. You are now the voice for the group. The nice part about this is that you&#8217;ll be more motivated to keep pushing forward knowing others are with you.</p><p>With a stronger signal in hand, find an objective third party, as senior as possible, and have the same conversation as you tried to have with your manager. For example, approach a Principal Engineer who has nothing to do with the project and get their thoughts. The goal here is to connect with as much seniority as possible, convincing them that they need to care about this.</p><p>If the third party engages with you, use your discretion to get a feel for how they&#8217;d like to follow up. Are they taking things seriously and willing to follow up without you? Are they mildly interested and want to get more data points? Are they not interested whatsoever? You may need to approach multiple people. Most of the time, an objective third party doesn&#8217;t have a stake with your personal concerns because it&#8217;s not their job to worry about your concerns (like your manager&#8217;s is).</p><p>Whether or not it&#8217;s your manager or a random Principal Engineer, your goal here is to have multiple people <strong>care</strong> about this as you do. If you&#8217;re actually able to do this (the hard part), subsequent pieces will flow naturally.</p><h2><strong>The Outcomes</strong></h2><p>The <em>good</em><strong> </strong>outcome is impossible to measure. If you escalated an issue and stopped a doomed project, you will never know how much potential time and money you saved.</p><p>The <em>bad </em>outcome is when you do nothing and the project continues. The work causes years of pain until finally an executive pulls the plug and you were proven right. In these situations, do not give a &#8220;I Told You So&#8221; speech.</p><p>The <em>probable</em> outcome is that you raise your concerns, but the project continues and eventually fails. Upon failure, your contribution may or may not be retroactively recognized. The unfortunate (but still positive) outcome is that you and the organization learn from the experience.</p><h2><strong>What is actually important?</strong></h2><p>The actual organizational outcome is not that important. You will rarely succeed at &#8220;raising the alarm&#8221; and stopping a project. Companies learn the hard way through wasted time and excessive tech debt.</p><p>What is actually important is the <strong>action</strong> you took.</p><p>The act of maturely and professionally raising a concern is what&#8217;s important. You practice your seniority by aligning the right people, communicating impact, and getting your opinions out there.</p><p>If you are able to do this&#8212;or even just make an attempt at it&#8212;then consider this whole effort a win.</p><h2><strong>What is actually hard</strong>?</h2><p>The hard part in this whole process will be that you&#8217;re going up against another person. It will take courage to raise your concerns and in doing so you will inevitably upset people. Very few can truly detach from their work. This includes you as well; you will need maturity to concede when things don&#8217;t work out your way.</p><p>If you care, you can at least try.</p><p>Either way, you should not be attached to the outcome.</p>]]></content:encoded></item><item><title><![CDATA[Software Project Planning]]></title><description><![CDATA[Software project planning is extremely difficult.]]></description><link>https://www.davidxiang.com/p/software-project-planning</link><guid isPermaLink="false">https://www.davidxiang.com/p/software-project-planning</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Sat, 30 Jul 2022 17:25:46 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/084efd9c-c2c8-42da-8311-66e8aafaba14_1024x847.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-M1k!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40af79dc-36fa-4f60-850a-5d437e24d506_2250x1862.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-M1k!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40af79dc-36fa-4f60-850a-5d437e24d506_2250x1862.jpeg 424w, https://substackcdn.com/image/fetch/$s_!-M1k!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40af79dc-36fa-4f60-850a-5d437e24d506_2250x1862.jpeg 848w, https://substackcdn.com/image/fetch/$s_!-M1k!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40af79dc-36fa-4f60-850a-5d437e24d506_2250x1862.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!-M1k!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40af79dc-36fa-4f60-850a-5d437e24d506_2250x1862.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-M1k!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40af79dc-36fa-4f60-850a-5d437e24d506_2250x1862.jpeg" width="1200" height="993.1318681318681" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/40af79dc-36fa-4f60-850a-5d437e24d506_2250x1862.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1205,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:280749,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780209?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40af79dc-36fa-4f60-850a-5d437e24d506_2250x1862.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-M1k!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40af79dc-36fa-4f60-850a-5d437e24d506_2250x1862.jpeg 424w, https://substackcdn.com/image/fetch/$s_!-M1k!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40af79dc-36fa-4f60-850a-5d437e24d506_2250x1862.jpeg 848w, https://substackcdn.com/image/fetch/$s_!-M1k!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40af79dc-36fa-4f60-850a-5d437e24d506_2250x1862.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!-M1k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40af79dc-36fa-4f60-850a-5d437e24d506_2250x1862.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p>Software project planning is extremely difficult. In <strong>every</strong> step of the process&#8212;design, build, test, release&#8212;a multitude of things will go wrong.</p><p>For all the senior engineers, team leads, and engineering managers embarking on a challenging software project, here is a cheat sheet of activities to ensure your work runs as smoothly as possible. Every situation will be different, but common challenges frequently re-occur.</p><p>If you are leading such a project, keep these 3 themes in mind as they may easily run away from you:</p><ol><li><p>Expectations&#8212;are the timelines and goals still reasonable?</p></li><li><p>Alignment&#8212;is leadership properly aligned and sponsoring this work?</p></li><li><p>Feasibility&#8212;given the resources, can this thing be built properly?</p></li></ol><p>Best of luck.</p><p>The post <a href="https://davidxiang.com/2022/07/30/software-project-planning/">Software Project Planning</a> appeared first on <a href="https://davidxiang.com">David Xiang</a>.</p>]]></content:encoded></item><item><title><![CDATA[Art or Science?]]></title><description><![CDATA[Art is subjective, soft, human, unique.]]></description><link>https://www.davidxiang.com/p/art-or-science</link><guid isPermaLink="false">https://www.davidxiang.com/p/art-or-science</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Mon, 25 Apr 2022 21:54:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!V1ZT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F374423b1-ab56-47f4-9f58-be24d9386119_600x300.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!V1ZT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F374423b1-ab56-47f4-9f58-be24d9386119_600x300.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!V1ZT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F374423b1-ab56-47f4-9f58-be24d9386119_600x300.jpeg 424w, https://substackcdn.com/image/fetch/$s_!V1ZT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F374423b1-ab56-47f4-9f58-be24d9386119_600x300.jpeg 848w, https://substackcdn.com/image/fetch/$s_!V1ZT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F374423b1-ab56-47f4-9f58-be24d9386119_600x300.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!V1ZT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F374423b1-ab56-47f4-9f58-be24d9386119_600x300.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!V1ZT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F374423b1-ab56-47f4-9f58-be24d9386119_600x300.jpeg" width="600" height="300" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/374423b1-ab56-47f4-9f58-be24d9386119_600x300.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:300,&quot;width&quot;:600,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:27951,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780212?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F374423b1-ab56-47f4-9f58-be24d9386119_600x300.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!V1ZT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F374423b1-ab56-47f4-9f58-be24d9386119_600x300.jpeg 424w, https://substackcdn.com/image/fetch/$s_!V1ZT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F374423b1-ab56-47f4-9f58-be24d9386119_600x300.jpeg 848w, https://substackcdn.com/image/fetch/$s_!V1ZT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F374423b1-ab56-47f4-9f58-be24d9386119_600x300.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!V1ZT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F374423b1-ab56-47f4-9f58-be24d9386119_600x300.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p>Art is subjective, soft, human, unique.</p><p>Science is objective, formulaic, algorithmic, process-heavy.</p><p>Think about a recent problem you faced and its surrounding context. Was your approach more artistic or more scientific? Did your perception change as you solved the problem? How did it compare with your colleagues?</p><p>As with anything difficult to define, let&#8217;s begin with principles:</p><ol><li><p>Nothing is all art or all science; everything is on a spectrum.</p></li><li><p>Any positioning on this spectrum is subjective.</p></li><li><p>A common interpretation is that science leads to art. A scientist invents after decades of study. A dancer expresses after decades of practice. Said another way&#8212;science at a master level <strong>feels</strong> like art.</p></li></ol><p>With respect to software development, which day-to-day activities lean one way or the other? What is art and what is science?</p><h2>Art or Science?</h2><h2>Art</h2><h3>The Difficult Road To Consensus</h3><p>&#8220;Alignment&#8221; is one of this year&#8217;s nominees for the Most-Used Corporate Buzzwords Award. Jokes aside, alignment as an outcome is critical. We flounder without it. While rough science can be drawn from <a href="https://davidxiang.com/2021/06/16/6-step-guide-for-software-engineering-decision-making/">alignment-building frameworks</a>, it will always be more of an art. This is because it will always depend on people and how you influence them. This one dependency is why consensus can sometimes be so difficult to achieve.</p><h3>Partnerships Not Contracts</h3><p>Partnerships exist at every level of an organization. Individual contributors work across teams. A Team Lead collaborates with his or her Product and Design counterparts. A CTO matches with a CPO.</p><p>A common mistake (and subsequent growth opportunity) is when an analytical engineer approaches a partnership as a science. This is natural if you come from a world of APIs and interfaces. However, a contract of deliverables will never produce a healthy working relationship between you and a PM. There is a time and place for contracts, but a professional partnership is not one of those places.</p><h3><strong>Coaching</strong> Through Patterns</h3><p>Coaching represents a healthy mix of art and science. If I had to pick one, I believe that art edges out science&#8212;but barely.</p><p>With respect to science, many underestimate psychology. <a href="https://www.insights.com/media/2728/insights-discovery-validating-the-system-factsheet.pdf">Research and methodologies really do provide insights behind personalities</a> and there&#8217;s a reason why <a href="https://en.wikipedia.org/wiki/Myers%E2%80%93Briggs_Type_Indicator">Myers-Briggs</a> type indicators are so popular. Patterns can&#8212;and should&#8212;be generalized across people. Coaching effectively is just pattern-matching after years of coaching repetitively. Will Larson probably recognized<a href="https://lethain.com/staff-engineer-archetypes/"> Staff Engineer archetypes</a> after countless hours working alongside Staff Engineers. In theory, pattern-matching is how our brains work in general.</p><p>While pattern-matching sounds scientific, applying and extending it is an art. Effective pattern-matching depends on experience, personalities, constraints, and context. Patterns span across disparate domains; a lesson from your religion somehow makes its way into your software design philosophy. This kind of artistry is reserved for humans. This is also the scary stuff that we hope to not be seeing in robots any time soon.</p><h2>Science</h2><h3>Coding</h3><p>Coding, in the context of professional software development, is more science than art. There is a <a href="https://davidxiang.com/2020/12/31/software-engineer-vs-programmer/">difference between programming to poetically express yourself versus programming to build things for people to use</a>. Software must be extensible, maintainable, and readable. As a system scales, these attributes are only attainable if the science outweighs the art.</p><h3>Operations</h3><p>&#8220;Ops&#8221; is a broad term that encompasses all activities contributing to software delivery. This includes change management to project management and everything in-between.</p><p>Operations evolves from an art to a science as a group progresses through the classical stages of <a href="https://www.indeed.com/career-advice/career-development/forming-storming-norming">forming, storming, norming, and performing</a>. When a group forms, artistic liberties are taken to establish the process itself. The group&#8217;s end-game is to operate as a well-oiled and predictable software delivery machine.</p><h3>Feedback</h3><p>When it comes to people, do not assume that everything is an art.</p><p>Feedback and performance review are examples of activities where managers should rely on science. Management&#8217;s goal is to set clear objectives and key results for employees. If the results are hit, compensation and promotions should follow. If the results are not hit, constructive feedback and coaching should be provided.</p><p>If you&#8217;re a manager, lean scientific with your approach to performance and accountability. Career ladders should be detailed. Performance reviews should be predictable. This is contrasted with <strong>coaching</strong>&#8212;something that remains perpetually <strong>ON</strong> in various ad-hoc and artistic capacities.</p><h2><strong>Conclusion</strong></h2><p>The challenge with art versus science remains in its subjectivity. Art for you is science for someone else. As long as you remember this principle and keep your mind open to compromise, you will find elegant solutions to your problems whether they be technical or not.</p>]]></content:encoded></item><item><title><![CDATA[Guidelines For Criticism]]></title><description><![CDATA[#1 &#8212; Do not criticize others while being blind to your own faults.]]></description><link>https://www.davidxiang.com/p/guidelines-for-criticism</link><guid isPermaLink="false">https://www.davidxiang.com/p/guidelines-for-criticism</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Wed, 09 Mar 2022 10:58:15 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!CJKD!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89cac8a7-ee22-4a53-a229-b983e9172667_1869x1641.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>#1 &#8212; Do not criticize others while being blind to your own faults.</h2><p>Do not seek fault in others while staying blissfully unaware of your own.</p><ul><li><p>When others code slowly, it&#8217;s because they&#8217;re inefficient and don&#8217;t manage their time well. When I code slowly, it&#8217;s because I&#8217;m being thorough and have to deal with a difficult system.</p></li><li><p>When others hold their technical opinions strongly, it&#8217;s because they&#8217;re stubborn. When I hold my technical opinions strongly, it&#8217;s because I&#8217;ve done my homework and need to be resolute.</p></li><li><p>When another engineer PRs into my codebase, they&#8217;re overstepping their bounds. When I PR into another codebase, I am exhibiting initiative.</p></li></ul><h2>#2 &#8212; Be flexible with others. Be strict with yourself.</h2><p>This is the explicit reversal of the previous point.</p><p>Be flexible with others and offer them grace. Be strict with yourself and stay thoughtful in areas of self-improvement.</p><p>By default, examine your own weaknesses <strong>before</strong> looking for fault in others.</p><h2>#3 &#8212; Do not presume you can teach others.</h2><p>Do not presume you have a superior understanding. You have <em>some</em><strong> </strong>amount of knowledge, wisdom, and experience. Be willing to share it.</p><p>This mindset helps avoid condescension and increases the overall effectiveness of criticism.</p><h2>#4 &#8211; Follow through with your commitments.</h2><p>Criticism and feedback is only heard when there is trust.</p><p>In any relationship, you contribute to trust by following through with your commitments.</p><p></p>]]></content:encoded></item><item><title><![CDATA[Monolith To Microservices Vs. Your Organization]]></title><description><![CDATA[Microservices are nothing new.]]></description><link>https://www.davidxiang.com/p/monolith-to-microservices</link><guid isPermaLink="false">https://www.davidxiang.com/p/monolith-to-microservices</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Mon, 24 Jan 2022 20:41:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!uW9F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68b4e1dd-1f04-4a9a-b524-f9b254e74c5f_800x533.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uW9F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68b4e1dd-1f04-4a9a-b524-f9b254e74c5f_800x533.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uW9F!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68b4e1dd-1f04-4a9a-b524-f9b254e74c5f_800x533.png 424w, https://substackcdn.com/image/fetch/$s_!uW9F!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68b4e1dd-1f04-4a9a-b524-f9b254e74c5f_800x533.png 848w, https://substackcdn.com/image/fetch/$s_!uW9F!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68b4e1dd-1f04-4a9a-b524-f9b254e74c5f_800x533.png 1272w, https://substackcdn.com/image/fetch/$s_!uW9F!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68b4e1dd-1f04-4a9a-b524-f9b254e74c5f_800x533.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uW9F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68b4e1dd-1f04-4a9a-b524-f9b254e74c5f_800x533.png" width="800" height="533" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/68b4e1dd-1f04-4a9a-b524-f9b254e74c5f_800x533.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:533,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:75025,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780214?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68b4e1dd-1f04-4a9a-b524-f9b254e74c5f_800x533.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uW9F!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68b4e1dd-1f04-4a9a-b524-f9b254e74c5f_800x533.png 424w, https://substackcdn.com/image/fetch/$s_!uW9F!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68b4e1dd-1f04-4a9a-b524-f9b254e74c5f_800x533.png 848w, https://substackcdn.com/image/fetch/$s_!uW9F!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68b4e1dd-1f04-4a9a-b524-f9b254e74c5f_800x533.png 1272w, https://substackcdn.com/image/fetch/$s_!uW9F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68b4e1dd-1f04-4a9a-b524-f9b254e74c5f_800x533.png 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p>Microservices are nothing new. After being deployed successfully by mega-companies like Netflix, many growing engineering organizations gravitate towards this architecture as an aspirational symbol of success. This journey is known to many as the &#8220;monolith to microservices&#8221; migration.</p><p>A few companies (Spotify) have the clairvoyance to adopt microservices from the get-go and may never have to endure such arduous re-architecting. Other companies (Etsy) double down with their monoliths (a.k.a founding architecture) and scale into multi-billion dollar organizations. Many others opt for the long journey from monolith to microservices with roughly the following scenario:</p><blockquote><p>We&#8217;ve seen immense success with our monolithic application and we are ready turn up the dial on growth. We need to explore new product lines, hire more developers, and increase velocity. To enable all of these wonderful things, we&#8217;ll start transitioning our monolith to microservices. This architecture will enable autonomous workstreams, failure isolation, flexible scaling, and {insert other microservices benefits}.&#8221;</p></blockquote><p>I am not a fan of the term &#8220;microservice architecture&#8221; because it has become increasingly difficult to define. In regards to software, your system is either distributed&#8212;or not distributed. With many of us working in the context of distributed computing, I would venture to guess that you&#8217;ll find it impossible to use a textbook definition (microservices vs. service-based vs. event-based) to describe your architecture. You may describe your system as a &#8220;hybrid&#8221; or &#8220;<a href="http://www.laputan.org/mud/mud.html#BigBallOfMud">ball of mud</a>.&#8221;</p><p>While microservices are wonderful in principle, many software engineers are intimately aware of their challenges in practice. Parodies like <a href="https://www.youtube.com/watch?v=y8OnoxKotPQ">this</a> are a little too close to reality.</p><p>When pursuing grand endeavors, engineering leaders often forget to explicitly address organizational concerns. These constraints have the potential to block progress more so than any other technical issue.</p><h2>Monolith To Microservices Vs. Your Organization</h2><h2>#1 &#8212; Executive (Budget) Alignment</h2><p>Supporting microservices is expensive.</p><p>This is expensive not only with respect to compute/storage/network costs, but also with respect to operations and head count. This is not as simple as instructing software engineers to pivot how they develop. For example, a dedicated team may need to be formed to support the microservice &#8220;framework&#8221; itself. What are common tools for deployment and monitoring? How will dependencies be consistently upgraded and patches be successfully installed if we plan to have 100s or 1000s of services?</p><p>This investment should be discussed early with leadership, specifically with the executives that control the budget. For budgets that are controlled by non-engineers, spend time developing the business case and getting firm commitments to support the effort. Leadership background matters. A worthwhile investment to engineers can easily be perceived as a poorly-defined cost to others.</p><h2>#2 &#8212; Experience</h2><p>Has anyone done something like this before?</p><p>Fundamental software architecture changes are not to be taken likely. During times of migration, seemingly trivial decisions influence the software for years and years into the future.</p><p>Before embarking on the journey, have you located an individual (or collective set of experiences) in your organization that has been through a monolith to microservices journey before? This means actually <strong>participating</strong> in similar migrations (even if it they were unsuccessful) and not just living pleasantly in a post-migrated world. These experiences are rare.</p><h2>#3 &#8212; Philosophical Alignment</h2><p>Software developers are opinionated. Experienced engineers hold philosophies molded over time by unique companies, projects, and teams.</p><p>Before embarking on this migration, key engineers need to be bought in and aligned with the vision. This alignment is deeper than sharing signatures on a document. It is a perpetual alignment and re-alignment of philosophies surrounding how to approach problems.</p><p>A common philosophical difference in software development is the spectrum between <strong>generalized</strong> and <strong>specific </strong>thought.</p><p><strong>Generalized</strong> developers love interfaces and can&#8217;t get enough of C++ templates. These engineers constantly try to integrate their solutions into &#8220;frameworks&#8221; and always seem to find common patterns across wildly different domain use-cases.</p><p><strong>Specific</strong> developers don&#8217;t care much for Java Generics and are annoyed with obfuscated code. Not all their classes need to be implementing an interface and duplicated code is not that big of a deal. Straight to the point is their motto.</p><p>Now imagine that two of your most-senior, most-experienced developers sit on opposite sides of this spectrum. Up until now, these engineers have balanced each other out and have designed the successful application you have today. However, each of these engineers would have a drastically different approach to problem solving as your software systems and headcount grow.</p><p>Organizationally, how will you resolve these philosophical differences? How can you be confident this migration will be executed in a consistent and enjoyable manner?</p><h2>#4 &#8212; Ownership</h2><p>Given your large and successful monolith, how would you rate it on clarity of ownership? Can the majority of modules be assigned to various teams or is there a kitchen sink of forgotten endpoints?</p><p>Ownership is not a technical issue. It&#8217;s an organizational issue and should be addressed before any attempt is made at a migration. If critical steps in the strategy depend on changes to an unowned part of the codebase, it will be a headache to get that work planned and executed.</p><p>Ownership is psychological. Teams and engineers go to great lengths to skirt around code that they do not own. &#8220;<em>This is everyone&#8217;s code</em>&#8221; only works at small levels of organizational scale. Lack of ownership especially hurts when you&#8217;re trying to make fundamental changes to your software.</p><h2>#5 &#8212; Decomposition Vs. Morale</h2><p>Many engineers would not describe migration work as glamorous. Usually, the first step in a monolith to microservices migration is decomposition. Before the system can feasibly be re-architectued, modules need to be split out and put behind interfaces so implementations can safely be manipulated. For developers, this may feel like they are picking up rocks just to put them down somewhere else&#8212;the rocks are still the same rocks!</p><p>How can this be broken down into manageable pieces? How will you set up your teams for success?</p><p>Poor strategies around decomposition work will rapidly demoralize teams. If you are not strategic with execution steps, this work will turn into a slog and you will burn through your engineers. How do you expect a team to carve out modules in the codebase when half of it is unowned?</p><p>Carefully plan and assign this work while paying attention to motivations and incentives.</p><h2>Conclusion</h2><p>The monolith to microservices migration is a long journey. You&#8217;ll experience gratifying wins along with unwelcome additions to your technical debt. These foundational changes are an organizational effort just as much as they are a technical lift. If the company does not fully support this work, no amount of software ingenuity or pool of 10x programmers will help.</p>]]></content:encoded></item><item><title><![CDATA[Use More 1-1-1s]]></title><description><![CDATA[1-1s are core to management.]]></description><link>https://www.davidxiang.com/p/use-more-1-1-1s</link><guid isPermaLink="false">https://www.davidxiang.com/p/use-more-1-1-1s</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Thu, 30 Dec 2021 16:42:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!TBEH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef54a353-de9d-4acb-80d8-df8eb42783e0_1170x780.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TBEH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef54a353-de9d-4acb-80d8-df8eb42783e0_1170x780.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TBEH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef54a353-de9d-4acb-80d8-df8eb42783e0_1170x780.jpeg 424w, https://substackcdn.com/image/fetch/$s_!TBEH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef54a353-de9d-4acb-80d8-df8eb42783e0_1170x780.jpeg 848w, https://substackcdn.com/image/fetch/$s_!TBEH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef54a353-de9d-4acb-80d8-df8eb42783e0_1170x780.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!TBEH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef54a353-de9d-4acb-80d8-df8eb42783e0_1170x780.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TBEH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef54a353-de9d-4acb-80d8-df8eb42783e0_1170x780.jpeg" width="1170" height="780" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ef54a353-de9d-4acb-80d8-df8eb42783e0_1170x780.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:780,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:131527,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780215?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef54a353-de9d-4acb-80d8-df8eb42783e0_1170x780.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TBEH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef54a353-de9d-4acb-80d8-df8eb42783e0_1170x780.jpeg 424w, https://substackcdn.com/image/fetch/$s_!TBEH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef54a353-de9d-4acb-80d8-df8eb42783e0_1170x780.jpeg 848w, https://substackcdn.com/image/fetch/$s_!TBEH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef54a353-de9d-4acb-80d8-df8eb42783e0_1170x780.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!TBEH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef54a353-de9d-4acb-80d8-df8eb42783e0_1170x780.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p>1-1s are core to management. Ad-hoc feedback delivery, bi-weekly check-ins with your directs, monthly meetings with your skip-levels, annual performance reviews. Their use cases are well-defined and well-understood.</p><p>1-1-1s, on the other hand, can be much more interesting. Significant progress can be made if you&#8217;re able to get the three <em>right</em> people in a room together. 1-1-1s are versatile and streamline communications for a variety of situations.</p><p>While managers are usually responsible for 1-1s, any <strong>leader</strong> can call for a 1-1-1.</p><p>So, when should you host one?</p><p>Your intuition will serve you best. Here are a few questions that will help you exercise these muscles:</p><ul><li><p>A new role is being integrated into team&#8212;how&#8217;s it going?</p></li><li><p>A new project has caused something to change&#8212;are expectations clear?</p></li><li><p>A team is visibly disengaged&#8212;is there conflict?</p></li></ul><p>In this post, we&#8217;ll review 5 effective 1-1-1 formats that deserve a spot in your leadership toolbox.</p><h1>Use More 1-1-1s</h1><h2>#1 &#8211; Finalize A Reporting Change</h2><p>A 1-1-1 can finalize a transition for an internal reporting change. This is held between you (the manager), your soon-to-be ex-direct, and their future manager. The goal of the meeting is to review past performance along with future expectations for the engineer. It&#8217;s imperative that this is done together with all three parties.</p><h2>#2 &#8211; Temporary Project Resource Reallocation</h2><p>An important project is gaining momentum and its proper staffing depends on temporary resource reallocations. Temporary only because no one enjoys a re-org for the sake of a project. Nevertheless, something has changed&#8212;are expectations clear?</p><p>Maybe not because we have new people in the mix. What is the time commitment for the new project members? Which milestones are expected to be finished before they can disengage? How is work going to be delegated?</p><p>If you&#8217;re leading such a endeavor, you&#8217;ll be grateful for the additional resources and stressed at the same time with additional project coordination. To increase the odds of success, an early 1-1-1 can firmly establish working expectations with new project members. This can be held between you (the project lead), the re-allocated engineer, and their manager.</p><p>How is this all going to go down? Work it out and get it in writing.</p><h2>#3 &#8211; Staff Engineer Expectation Setting</h2><p><a href="https://davidxiang.com/2021/01/19/staff-software-engineer-responsibilities/">Staff Engineers are held to a different set of expectations</a> than other engineers. Companies expect Staff Engineers to have a large, organization-influencing, scope of impact.</p><p>Ironically, company-impacting problems are found inside local teams. To avoid the trap of the &#8220;Floating Engineer&#8221;, some Staff Engineers (with the support of their managers) choose to embed inside a team.</p><p>If this happens, how do we manage expectations?</p><p>A common scenario is when an Engineering Manager utilizes a Staff Engineer with strong mentorship skills to level up a team. Their impact will be measured by how much each individual progresses as an engineer; their impact will not be measured by lines of code written or projects shipped.</p><p>These expectation must be established between you (the manager), the resident team leader, and the Staff Engineer. The team leader should not expect the Staff Engineer to perform the same duties as his or her other engineers. A Staff Engineer on the team doesn&#8217;t mean we get 20 extra points of sprint velocity. It means that each IC will receive thoughtful technical reviews for their work.</p><p>Use the 1-1-1 to make sure everyone is on the same page.</p><h2>#4 &#8211; General Role Expectation Setting</h2><p>The previous idea can be leveraged more generally. As your responsibilities and personnel grow, you will have special roles that periodically need to be integrated into your teams.</p><p>These situations often arise when an individual&#8212;who is scoped at a group level&#8212;gets assigned to work with a specific team. Common examples of this include scarce pools of Technical Writers, Product Designers, or Technical Program Managers.</p><p>If the group you manage has just been assigned its first TPM, what should you expect out of them? Is this person focused on goal-setting processes or project delivery? Or are you not even sure?</p><p>There are a couple 1-1-1 formats that can help set expectations.</p><p>As a manager, you have your own ideas about how your group can utilize the new TPM. Perhaps you want him or her to focus on goal-setting and to produce a colocated list of opportunities across all your teams. Before pushing further, is this what the TPM is actually expected to do? You can host a quick 1-1-1 between yourself (the manager), the TPM, and the TPM&#8217;s manager. Here you&#8217;ll be able to set short and long terms goals for the TPM and ensure he or she is being evaluated properly.</p><p>If you decide that a TPM is best situated helping out a specific team with project delivery, you may ask one of your team leaders to integrate the TPM into their team. If you&#8217;re the team leader in this situation, you can hold a tactical 1-1-1 between yourself (the team leader), the to-be-integrated TPM, and your partner Product Manager. Here you&#8217;ll be able to discuss new team dynamics and brainstorm ideas for how the TPM can add value.</p><h2>#5 &#8211; Pushing Decisions Forward</h2><p>At a large organization, one of the most important things you can do is to <a href="https://davidxiang.com/2021/06/16/6-step-guide-for-software-engineering-decision-making/">make decisions</a>.</p><p>One of the major obstacles standing in the way of decision making is two&#8212;exactly two&#8212;opposing opinions. Two high-ranking engineers have two competing views on how to design a system. Neither opinion is right or wrong; they are just different.</p><p>A 1-1-1 can be used in these situations to move a stalemate forward. Opposing opinions are usually held by peers. This is often the result of what <a href="https://www.amazon.com/dp/B015VACHOK/">Andy Grove has dubbed &#8220;peer-group syndrome&#8221;</a>, when a meeting amongst peers goes around in circles.</p><p>Andy&#8217;s fix for this is the &#8220;peer-plus-one&#8221; method, when a senior person is injected into the conversation. More concretely, this can take the shape of a well-moderated 1-1-1. Example formats could be between you (a principal engineer) alongside two Staff Engineers or perhaps you (an engineering manager) alongside two senior engineers.</p><h2>Conclusion</h2><p>The 1-1-1 meeting is a versatile tool for engineering leaders. If utilized properly, these meetings create clarity in expectations, push decisions forward, and diplomatically establish working agreements.</p><p>What kind of 1-1-1 formats do you enjoy using?</p>]]></content:encoded></item><item><title><![CDATA[4 Questions To Ask Yourself]]></title><description><![CDATA[As a Junior IC]]></description><link>https://www.davidxiang.com/p/4-questions-to-ask-yourself</link><guid isPermaLink="false">https://www.davidxiang.com/p/4-questions-to-ask-yourself</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Fri, 17 Dec 2021 12:20:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!CJKD!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89cac8a7-ee22-4a53-a229-b983e9172667_1869x1641.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>As a Junior IC</h2><ul><li><p>How comfortable am I developing code and debugging issues?</p></li><li><p>Could I give a presentation about my team?</p></li><li><p>Do I know who to contact if I&#8217;m not sure how to solve a problem (besides my mentor)?</p></li><li><p>Did I release a project end-to-end that required me to do more than coding?</p></li></ul><h2>As a Senior IC</h2><ul><li><p>Has another team around the company changed what they&#8217;re working on based on my actions?</p></li><li><p>How strong is my opinion regarding my team&#8217;s product goals and technical investments?</p></li><li><p>Do I have context around the challenges of my peers (even though it&#8217;s not my responsibility)?</p></li><li><p>Has another engineer on the team surprised me by taking care of a tricky incident without my involvement?</p></li></ul><h2>As a Manager</h2><ul><li><p>Did my reports demonstrate an expanded scope of impact? Is it easy to justify their promotions?</p></li><li><p>Did my level of ownership and responsibilities increase in the last year? If so, was it situational or did I seek out those opportunities?</p></li><li><p>Is there a clear choice for an individual who could take over my responsibilities?</p></li><li><p>My group drove a lot of impact these past two quarters&#8212;is it because my teams have grown or is it because I&#8217;ve driven innovations to make my teams more effective?</p></li></ul><p></p>]]></content:encoded></item><item><title><![CDATA[5 Mistakes That Damage Your Personal Brand As A Young Professional]]></title><description><![CDATA[As you progress in your career, your success largely depends on your personal brand as a professional.]]></description><link>https://www.davidxiang.com/p/5-mistakes-personal-brand-professional</link><guid isPermaLink="false">https://www.davidxiang.com/p/5-mistakes-personal-brand-professional</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Wed, 27 Oct 2021 13:08:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!WNhZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd6146e7-141b-410e-bae5-4695980b2eee_1170x672.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WNhZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd6146e7-141b-410e-bae5-4695980b2eee_1170x672.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WNhZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd6146e7-141b-410e-bae5-4695980b2eee_1170x672.jpeg 424w, https://substackcdn.com/image/fetch/$s_!WNhZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd6146e7-141b-410e-bae5-4695980b2eee_1170x672.jpeg 848w, https://substackcdn.com/image/fetch/$s_!WNhZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd6146e7-141b-410e-bae5-4695980b2eee_1170x672.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!WNhZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd6146e7-141b-410e-bae5-4695980b2eee_1170x672.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WNhZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd6146e7-141b-410e-bae5-4695980b2eee_1170x672.jpeg" width="1170" height="672" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dd6146e7-141b-410e-bae5-4695980b2eee_1170x672.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:672,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:66062,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780220?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd6146e7-141b-410e-bae5-4695980b2eee_1170x672.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WNhZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd6146e7-141b-410e-bae5-4695980b2eee_1170x672.jpeg 424w, https://substackcdn.com/image/fetch/$s_!WNhZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd6146e7-141b-410e-bae5-4695980b2eee_1170x672.jpeg 848w, https://substackcdn.com/image/fetch/$s_!WNhZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd6146e7-141b-410e-bae5-4695980b2eee_1170x672.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!WNhZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd6146e7-141b-410e-bae5-4695980b2eee_1170x672.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p>As you progress in your career, your success largely depends on your personal brand as a professional.</p><p><strong>Everything</strong> you do contributes to this brand.</p><p>Early on, you are focused on learning, adding value, and developing as a professional. During this time, it&#8217;s essential that you avoid behaviors that have the potential to become brand-damaging habits. Curating these behaviors is difficult for a few reasons:</p><ol><li><p>These behaviors are subtle and are easily overlooked. Nevertheless, it&#8217;s better you notice them before your manager does.</p></li><li><p>It&#8217;s impossible to fully control how you&#8217;re perceived. A well-intentioned gesture always has the chance to be taken the wrong way. In life, this is inevitable.</p></li><li><p>While your personal brand is mostly in your control, its effectiveness depends heavily on your environment. The same you may be a great fit at a large corporation, but may fall flat at a start-up.</p></li></ol><p>In this post, I share 5 mistakes that damage your personal brand as a young professional. Recognizing and avoiding these behaviors may save you a lot of time in your career.</p><h1>5 Mistakes That Damage Your Personal Brand As A Young Professional</h1><h2>#1 &#8212; Optimizing The Individual Instead Of The Team</h2><p>If you are working at a company, place the company <strong>first</strong>. This is a general attitude that lays the foundation for impactful behavior.</p><p>Do not repeatedly ask your boss for a checklist of activities to get you promoted; repeatedly ask your boss what&#8217;s the best thing you can do to ensure the team is successful. The latter strategy usually gets the promotion faster.</p><p>Place yourself in the shoes of a manager or CEO. What attitude would you prefer in an employee&#8212;individual-first or team-first?</p><p>You look out for yourself by looking out for the groups you&#8217;re apart of. If you&#8217;re able to internalize a team-player attitude and add value at the same time, it&#8217;s only natural for responsibility and compensation to follow.</p><h2>#2 &#8212; Pushing Too Hard For Compensation / Promotion</h2><p>Everyone must push for compensation. Money talks and people have responsibilities. Compensation will always be a critical factor with anything you pursue.</p><p>Raises and promotions are sensitive issues that must be dealt with tactfully. There is a time and place to discuss compensation&#8212;new job offers, performance review cycles, large changes in responsibility. Recognize these moments and take advantage of them.</p><p>When the time isn&#8217;t right, refrain from excessively pushing for compensation. If you&#8217;re unhappy with your performance scores and the subsequent raise you&#8217;ve received&#8212;how much time do you want to spend fighting for more money, or making a plan to increase your performance? Is your best move to switch employers? Perhaps&#8212;but what if this situation happens again?</p><p>Maintain goodwill and negotiate gracefully. Build a case and accumulate data to back yourself up. Do not resort to questionable tactics that modestly bump you in the short-term, but compromise you in the long-term.</p><h2>#3 &#8212; Speak Ill Of The Company</h2><p>Do not speak ill of the organization you work for.</p><p>Whether it&#8217;s over a casual lunch or a 1-1 with your team lead, bad-mouthing the company hurts your professional brand. You do not want to be known as the engineer who is constantly complaining. Having a discussion about the last all-hands meeting is one thing; labeling the company&#8217;s software as subpar compared to your previous employer is another thing.</p><p>Do not give off negative energy. People notice.</p><h2>#4 &#8212; Being Defensive</h2><p>Every day you will be tempted to be defensive. Your manager gives you feedback you don&#8217;t agree with, you receive a snide comment on a code review, a staff engineer makes a flippant remark about a technical design you&#8217;ve spent weeks thinking about. Whatever comes your way, humbly try to<strong> not be defensive</strong>.</p><p>Assume positive intent.</p><p>Even when someone else is rude, be courteous.</p><p>None of us have a perfect track record in this category; you just don&#8217;t want your default behavior to be defensiveness.</p><h2>#5 &#8212; Visibly Moody At Work</h2><p>Everyone has their lives to deal with.</p><p>Do not let your personal mood affect your professionalism. Being visibly grumpy and disengaged at work will be noticed&#8212;&#8221;<em>Hey, Jerry seems to be in a funk this week. That meeting was a little awkward. What&#8217;s going on?</em>&#8220;</p><p>Your energy should not affect others to the point it makes them uncomfortable. Work is work. As a professional, you are committed to being engaged and accountable. If something happens in your personal life that prevents this from happening (which is OK), acknowledge it quickly and take time off to rest and recover.</p><h2>Conclusion</h2><p>Mistakes are natural and unavoidable. Don&#8217;t be too hard on yourself if you make some, just be sure to learn something from them. Developing your personal brand is an <strong>active</strong> exercise. It includes both <a href="https://davidxiang.com/2021/07/18/20-micro-habits-of-high-impact-software-engineers/">leaning into brand-building behavior</a> and stepping away from brand-damaging behavior. You&#8217;ve worked for many years to develop this, don&#8217;t let a preventable mistake ruin it.</p>]]></content:encoded></item><item><title><![CDATA[Staff Software Engineer Responsibilities – Align With Authority]]></title><description><![CDATA[Check out my original post on Staff Software Engineer Responsibilities!]]></description><link>https://www.davidxiang.com/p/staff-software-engineer</link><guid isPermaLink="false">https://www.davidxiang.com/p/staff-software-engineer</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Sun, 10 Oct 2021 23:05:37 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KTCB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c88b2a-ba86-4e0f-a4bd-0d8f6acfc846_1170x935.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KTCB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c88b2a-ba86-4e0f-a4bd-0d8f6acfc846_1170x935.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KTCB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c88b2a-ba86-4e0f-a4bd-0d8f6acfc846_1170x935.jpeg 424w, https://substackcdn.com/image/fetch/$s_!KTCB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c88b2a-ba86-4e0f-a4bd-0d8f6acfc846_1170x935.jpeg 848w, https://substackcdn.com/image/fetch/$s_!KTCB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c88b2a-ba86-4e0f-a4bd-0d8f6acfc846_1170x935.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!KTCB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c88b2a-ba86-4e0f-a4bd-0d8f6acfc846_1170x935.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KTCB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c88b2a-ba86-4e0f-a4bd-0d8f6acfc846_1170x935.jpeg" width="1170" height="935" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b8c88b2a-ba86-4e0f-a4bd-0d8f6acfc846_1170x935.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:935,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:114718,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780222?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c88b2a-ba86-4e0f-a4bd-0d8f6acfc846_1170x935.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KTCB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c88b2a-ba86-4e0f-a4bd-0d8f6acfc846_1170x935.jpeg 424w, https://substackcdn.com/image/fetch/$s_!KTCB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c88b2a-ba86-4e0f-a4bd-0d8f6acfc846_1170x935.jpeg 848w, https://substackcdn.com/image/fetch/$s_!KTCB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c88b2a-ba86-4e0f-a4bd-0d8f6acfc846_1170x935.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!KTCB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8c88b2a-ba86-4e0f-a4bd-0d8f6acfc846_1170x935.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><div class="callout-block" data-callout="true"><p><em>Check out my original post on <a href="https://davidxiang.com/2021/01/19/staff-software-engineer-responsibilities/">Staff Software Engineer Responsibilities</a>!</em></p></div><p>As a Staff Software Engineer, one of your hardest challenges is to influence without authority. If your position doesn&#8217;t hold authority by default, then your best bet is to align with it.</p><p>This topic was inspired by an insightful quote from Will Larson&#8217;s <em><a href="https://www.amazon.com/Staff-Engineer-Leadership-beyond-management-ebook/dp/B08RMSHYGG/">Staff Engineer: Leadership beyond the management track</a></em>.</p><blockquote><p><strong>Stayed aligned with authority</strong> to remain an effective leader over time. Technical leadership roles rely on proxied authority from another (usually, managerial) leader, and continued access to that authority depends on staying aligned, trustworthy, and predictable.</p><p><a href="https://lethain.com/about/">Will Larson</a></p></blockquote><p>Alignment is essential. As a Staff Engineer, internalized alignment re-orients your approach when persuading people to follow your ideas. This will manifest in subtle&#8212;but significant&#8212;differences.</p><div class="callout-block" data-callout="true"><p>I&#8217;m proposing we do a large migration. I&#8217;ve seen this architecture play out before and it&#8217;s better we do this sooner rather than later.</p></div><div class="callout-block" data-callout="true"><p>I&#8217;m proposing we do a large migration. This will benefit the team by making their local development significantly easier and should increase our group&#8217;s velocity in the long-term.</p></div><p>In this post, I&#8217;ll share a few ideas on how to achieve the two core components behind Will&#8217;s idea: <strong>staying aligned</strong> and <strong>building trust</strong>.</p><h2>Staff Software Engineer Responsibilities &#8211; Align With Authority</h2><h2>#1 &#8212; Staying Aligned</h2><h3>Figure Out Who To Align With</h3><p>First, decide on who you&#8217;re going to align with. This is an individual, usually a manager or a director. Choose someone you respect and would enjoy working with. Factor in your interests, technical strengths, and where you believe you can make the most impact.</p><p>Aligning to a specific person means aligning to a specific scope.</p><ul><li><p>Align to an Engineering Manager</p><ul><li><p>A large team of Individual Contributors needs technical leadership.</p></li></ul></li><li><p>Align to multiple distinct Engineering Managers</p><ul><li><p>Same as above, but for two (maybe three) distinct teams.</p></li></ul></li><li><p>Align to an Engineering Director</p><ul><li><p>A group of teams belonging to a specific domain needs technical leadership.</p></li></ul></li></ul><p>These ideas break down at higher levels. If you&#8217;re aligning to a VP of Engineering, you&#8217;re most likely a Principal+/CTO and are overseeing an entire department. You&#8217;re probably focused on training other Staff Engineers to align with their respective managers and directors.</p><p>Who you align with determines your home base. Aiming for the largest scope isn&#8217;t necessary the right move.</p><h3>Avoid &#8220;Floating&#8221;</h3><p>Floating is when your job description sounds something like, &#8220;<em>Find the biggest technical risks at the company and mitigate them</em>.&#8221;</p><p>Floating is a risk because it does not foster alignment with anyone. You&#8217;ll have difficulty truly understanding the problems that affect teams. Staff Software Engineers in these situations struggle to obtain technical influence and usually do not have a say in what work actually gets done.</p><p>You will also be personally frustrated.</p><h3>The Manager&#8217;s Perspective</h3><p>After identifying a managerial partner, you&#8217;ll need to gain their perspective on how their team(s) are doing. Get a bird&#8217;s-eye view of the situation.</p><ul><li><p>Which teams are doing well? Which ones not so much?</p></li><li><p>What kind of engineering personalities are on the teams? Which senior engineers need to be pushed?</p></li><li><p>Can you point me in the direction of the biggest technical risks?</p></li></ul><p>Gaining this perspective is not just an onboarding task, but an ongoing activity that a Staff Software Engineer invests in.</p><h3>Get On the Ground</h3><p>You can&#8217;t stay high-level for too long. In addition to the understanding the manager&#8217;s perspective, you need to get on the ground to see how things are doing.</p><ul><li><p>What kind of goals and key results has the product manager set up?</p></li><li><p>What are the day-to-day pain points with this group&#8217;s software development?</p></li><li><p>What kind of engineering processes are unique to the team?</p></li></ul><p>An effective way to do this is to temporarily embed in a team. However, being on a team as a Staff Engineer is not the same as being on a team as an Individual Contributor. Set clear expectations with a working agreement.</p><h3>Write A Working Agreement</h3><p>Establish a working agreement with the manager you&#8217;ve partnered with.</p><ul><li><p>What are your responsibilities and how exactly will you work?</p></li><li><p>If you do &#8220;embed&#8221; on a specific engineering team, what does that dynamic look like?</p></li><li><p>How should engineers interact with you? What value are you expected to bring?</p></li></ul><p>This working agreement is the physical manifestation of your alignment.</p><h3>One Voice</h3><p>The end goal of alignment is for a Staff Engineer to be able to represent the group with one voice. You speak and make decisions with the group&#8217;s best interests in mind. When you attend the exclusive Staff-only architecture forum, you communicate as if your managerial counterpart and all their teams are there alongside you.</p><h2>#2 &#8212; Trust</h2><blockquote><p>&#8230; continued access to that authority depends on staying aligned, <strong>trustworthy</strong>, and predictable.</p></blockquote><p>Trust takes time to develop and continuous accountability to maintain. Trust can also be broken quickly and is sometimes impossible to repair if damaged. It is foundational to all relationships.</p><p>As a Staff Software Engineer, there must be trust between you and your managerial counterpart.</p><h3>Meet Consistently</h3><p>Even without an established reporting relationship, meet regularly 1-on-1.</p><h3>Regular Feedback to the Manager</h3><p>As you spend time on the ground, share relevant feedback with the manager. Are the team&#8217;s technical processes sustainable for future IC growth? How is the Tech Lead doing? What investments or debt repayments are most valuable?</p><p>Avoid feedback that is rooted in personal preferences. Build trust by sharing feedback that keeps the team&#8217;s best interest in mind.</p><h3>Develop Relationships Within Your Scope</h3><p>As a Staff Software Engineer, establish yourself as a team member. You are not a contract engineer for hire.</p><p>Develop relationships inside the team(s) within your scope. Help a Tech Lead organize their technical debt. Engage in code reviews to elevate ICs. Work closely with a senior engineer to help him or her move into a Staff role.</p><p>As a manager, observing that team members are leaning into their relationships with the resident Staff Engineer is a wonderful sight to see. Trust with the team creates trust with the manager.</p><h3>Be Accountable</h3><p>In many situations, you are not directly reporting into your authority counterpart. Perhaps you report to a VP of Engineering and you&#8217;ve decided to align with a specific Engineering Director. Regardless of the org chart, allow the Engineering Director to assign you work. Even if he or she is a peer on paper, operate as if you&#8217;re in service to them. Let them set deadlines for you. Meet them.</p><p>To reiterate, the purpose of this strategy is to build trust with an authority figure. This provides you with &#8220;proxied authority&#8221;, enabling you to have technical influence, which is the definition of your role.</p><h2>Example of Misalignment</h2><p>You are a tenured Staff Engineer. You have deep historical knowledge and are one of three people at the company who can articulate how the full tech stack works. You have strong opinions on the system and know in your heart which areas need the most attention.</p><p>As the team becomes successful, the company hires a new Engineering Manager to facilitate growth. The manager proposes investments that are at odds with what you think is best. The manager wants to prioritize local developer workflow improvements while you strongly believe the team needs to finish a data migration. You become defensive and do not put your full alignment or energy into the manager&#8217;s new initiatives.</p><p>This turns into a tricky situation for you two to reconcile.</p><h2>Conclusion</h2><p>Staff Software Engineer is a challenging position. Without aligning to an authority figure, many Staff Engineers find themselves frustrated with a pile of innovative ideas that sit in a Google document. If this sounds familiar, I encourage you to give this strategy a try.</p><p>Thank you again to Will Larson for his original idea. <a href="https://lethain.com/">Please check out his work!</a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Communication For Leaders — Be Generous]]></title><description><![CDATA[As a leader, you may have grown accustomed to a variety of conveniences when it comes to communication.]]></description><link>https://www.davidxiang.com/p/communication-for-leaders</link><guid isPermaLink="false">https://www.davidxiang.com/p/communication-for-leaders</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Mon, 20 Sep 2021 13:30:51 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!VsLl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48b70e07-d173-4dbb-94cf-f966b90125b9_1170x608.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VsLl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48b70e07-d173-4dbb-94cf-f966b90125b9_1170x608.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VsLl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48b70e07-d173-4dbb-94cf-f966b90125b9_1170x608.jpeg 424w, https://substackcdn.com/image/fetch/$s_!VsLl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48b70e07-d173-4dbb-94cf-f966b90125b9_1170x608.jpeg 848w, https://substackcdn.com/image/fetch/$s_!VsLl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48b70e07-d173-4dbb-94cf-f966b90125b9_1170x608.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!VsLl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48b70e07-d173-4dbb-94cf-f966b90125b9_1170x608.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VsLl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48b70e07-d173-4dbb-94cf-f966b90125b9_1170x608.jpeg" width="1170" height="608" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/48b70e07-d173-4dbb-94cf-f966b90125b9_1170x608.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:608,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:112482,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780224?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48b70e07-d173-4dbb-94cf-f966b90125b9_1170x608.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VsLl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48b70e07-d173-4dbb-94cf-f966b90125b9_1170x608.jpeg 424w, https://substackcdn.com/image/fetch/$s_!VsLl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48b70e07-d173-4dbb-94cf-f966b90125b9_1170x608.jpeg 848w, https://substackcdn.com/image/fetch/$s_!VsLl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48b70e07-d173-4dbb-94cf-f966b90125b9_1170x608.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!VsLl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48b70e07-d173-4dbb-94cf-f966b90125b9_1170x608.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p>As a leader, you may have grown accustomed to a variety of conveniences when it comes to communication. You rarely get interrupted during meetings, your ad hoc Slack messages receive prompt responses, and your under-researched opinions influence people more than they really should. Unsurprisingly, not everyone enjoys these conveniences.</p><p>As a leader, you must be <strong>generous</strong> with your communication. Here are some ideas.</p><h2>Don&#8217;t Push For A Decision Too Early</h2><p>During discussions, do not prematurely push for a decision. To achieve genuine consensus, all thoughts need to be openly and thoroughly laid out first. Ideally, this is done <strong>without</strong> your influence. As a leader, your opinions carry extra weight. If you rush, you will inadvertently stifle your colleagues&#8217; ability to fully share their thoughts.</p><h2>Talk Less</h2><p>Talk less. Actively listen.</p><h2>Allow For Correction</h2><p>Opinions are opinions. Create a culture that allows for correction.</p><ul><li><p>Preemptively give the OK for correction. Short phrases&#8212;&#8221;<em>Please correct me if I&#8217;m wrong&#8230;</em>&#8220;&#8212;make a difference.</p></li><li><p>Facilitate feedback amongst individuals. One of your senior engineers feels strongly about X; you know another junior engineer disagrees. Use your position to allow the junior engineer to provide their feedback.</p></li><li><p>Facilitate feedback for yourself. Directly engage individuals who have different views than you.</p></li><li><p>Periodically remind people that <strong>every decision </strong>is a trade-off. Acknowledge and discuss these trade-offs.</p></li></ul><h2>Fix Interruptions With Callbacks</h2><p>During a meeting, you notice that an engineer hasn&#8217;t been able to share their opinion as they are constantly being talked over by aggressive Staff engineers. Use your position and call back on them. Minimal effort for you creates a lot of space for them.</p><h2>Set An Expectation For Response Times</h2><p>For asynchronous communication, set an expectation for response time. Not all your messages need ASAP responses. A simple preface&#8212;&#8221;<em>[Not Urgent]</em>&#8221; or &#8220;<em>[Please let me know by end of day]</em>&#8220;&#8212;provides a much appreciated timing expectation for your requests.</p><h2>Be Decisive, Offer Discussion</h2><p>There will be times when a decision must be made before properly laying out everyone&#8217;s opinions. Your reports are going in circles trying to solidify a software design and you decide to step in to break a couple ties. When this happens, proactively engage in follow-up discussions&#8212;&#8221;<em>We&#8217;re moving forward with {controversial decision} because of {valid reason}. I will invite our stakeholders to an office hours session next week to discuss any additional concerns.&#8221;</em> Notice how this is different than, &#8220;<em>Please reach out to me if you have any concerns</em>.&#8221;</p><p>You can be decisive and thoughtful at the same time.</p><h2>Share Your Context</h2><p>As a leader, your job requires you to develop and maintain a vast amount of organizational context. You understand both political constraints and subtle technical challenges. This context has led you to your current role and it will remain an essential asset enabling you to function as a leader. Share this context (with discretion) with your colleagues.</p><h2>Conclusion</h2><p>As you grow in your career, be generous with your communication. A new hire experiences a meeting differently than how you experience a meeting. Use your position to build a culture where people have space to comfortably express their thoughts. Remind everyone that opinions are always opinions and that anyone can be corrected. Finally, when you have to be decisive, be thoughtful as well.</p><h2></h2>]]></content:encoded></item><item><title><![CDATA[Software Messaging Patterns — Queues vs. Publish/Subscribe (Pub/Sub)]]></title><description><![CDATA[This post&#8217;s goal is to provide you with a deeper intuition behind two of the most common software messaging patterns&#8212;queues vs.]]></description><link>https://www.davidxiang.com/p/software-messaging-queues-pub-sub</link><guid isPermaLink="false">https://www.davidxiang.com/p/software-messaging-queues-pub-sub</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Sun, 22 Aug 2021 20:51:18 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/edecce35-919b-4699-9283-d4e4e7c4777c_1024x368.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ctmh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae8ec21-d959-4639-9e1c-46fe03b859a9_1170x779.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ctmh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae8ec21-d959-4639-9e1c-46fe03b859a9_1170x779.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ctmh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae8ec21-d959-4639-9e1c-46fe03b859a9_1170x779.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ctmh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae8ec21-d959-4639-9e1c-46fe03b859a9_1170x779.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ctmh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae8ec21-d959-4639-9e1c-46fe03b859a9_1170x779.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ctmh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae8ec21-d959-4639-9e1c-46fe03b859a9_1170x779.jpeg" width="1170" height="779" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cae8ec21-d959-4639-9e1c-46fe03b859a9_1170x779.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:779,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:99707,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780226?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae8ec21-d959-4639-9e1c-46fe03b859a9_1170x779.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ctmh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae8ec21-d959-4639-9e1c-46fe03b859a9_1170x779.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ctmh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae8ec21-d959-4639-9e1c-46fe03b859a9_1170x779.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ctmh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae8ec21-d959-4639-9e1c-46fe03b859a9_1170x779.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ctmh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae8ec21-d959-4639-9e1c-46fe03b859a9_1170x779.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p>This post&#8217;s goal is to provide you with a deeper intuition behind two of the most common software messaging patterns&#8212;queues vs. pub/sub. This is a deep topic which deserves thoughtful attention when designing software. This article is structured in three parts:</p><ol><li><p>Develop an intuition for messaging, queues, and pub-sub through analogies.</p></li><li><p>Share a short heuristic to help choose between queues or pub-sub.</p></li><li><p>Discuss software implications for each paradigm.</p></li></ol><h2>Software Messaging &#8212; Thinking Abstractly Before Concretely</h2><p>Software messaging is a topic where discussions weave in and out of the abstract and the concrete. Logical paradigms like queues and pub/sub are discussed in the same breath as physical technologies like Kafka and RabbitMQ.</p><p>For technical topics, carefully delineating between the abstract and the concrete provides you with mental clarity. An interface is implemented with a class, a stack is implemented with a linked list, an instruction set architecture is implemented with a processor. Virtual, logical, abstract. Implementation, physical, concrete. There will be times when you need to draw boxes on a whiteboard; there will be times when you need to tune obscure Kafka consumer settings.</p><p>Let&#8217;s begin by thinking abstractly.</p><p>What is the essence of communication? Communication is the sharing of information between multiple entities for a shared purpose.</p><p>What is the essence of messaging? Messaging facilitates communication. A message is any information passed between multiple entities.</p><h2>Queues vs. Publish/Subscribe</h2><p>Two of the most common software messaging patterns are <strong>queues</strong> and <strong>pub/sub</strong>. In the context of software development, the word &#8220;pattern&#8221; can be substituted with &#8220;paradigm&#8221; or &#8220;architecture.&#8221;</p><p>Analogies can be an effective way to build intuition.</p><h2>Queue &lt;&gt; Restaurant</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0wfx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21e89a83-e3b1-4f5a-a516-bf04d48b0df3_1024x368.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0wfx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21e89a83-e3b1-4f5a-a516-bf04d48b0df3_1024x368.png 424w, https://substackcdn.com/image/fetch/$s_!0wfx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21e89a83-e3b1-4f5a-a516-bf04d48b0df3_1024x368.png 848w, https://substackcdn.com/image/fetch/$s_!0wfx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21e89a83-e3b1-4f5a-a516-bf04d48b0df3_1024x368.png 1272w, https://substackcdn.com/image/fetch/$s_!0wfx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21e89a83-e3b1-4f5a-a516-bf04d48b0df3_1024x368.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0wfx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21e89a83-e3b1-4f5a-a516-bf04d48b0df3_1024x368.png" width="1024" height="368" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/21e89a83-e3b1-4f5a-a516-bf04d48b0df3_1024x368.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:368,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!0wfx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21e89a83-e3b1-4f5a-a516-bf04d48b0df3_1024x368.png 424w, https://substackcdn.com/image/fetch/$s_!0wfx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21e89a83-e3b1-4f5a-a516-bf04d48b0df3_1024x368.png 848w, https://substackcdn.com/image/fetch/$s_!0wfx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21e89a83-e3b1-4f5a-a516-bf04d48b0df3_1024x368.png 1272w, https://substackcdn.com/image/fetch/$s_!0wfx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21e89a83-e3b1-4f5a-a516-bf04d48b0df3_1024x368.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 aria-hidden="true" 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><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></figure></div><p>A restaurant is built around a <strong>queue</strong>. Waiters produce orders. The kitchen consumes orders and produces meals. The orders are kept in a queue of messy hand-written tickets. First order in is the first meal out. The restaurant queue is purposeful&#8212;we want orders to be processed by the kitchen and only the kitchen. There is no need to prepare an order twice. If orders get backed up, adding a few chefs may help. The restaurant (waiters, tickets, chefs) all work together as a unit.</p><div class="callout-block" data-callout="true"><p>In&nbsp;<a href="https://en.wikipedia.org/wiki/Computer_science">computer science</a>, a&nbsp;<strong>queue</strong>&nbsp;is a&nbsp;<a href="https://en.wikipedia.org/wiki/Collection_(abstract_data_type)">collection</a>&nbsp;of entities that are maintained in a sequence and can be modified by the addition of entities at one end of the sequence and the removal of entities from the other end of the sequence.&nbsp;</p><p><a href="https://en.wikipedia.org/wiki/Queue_(abstract_data_type)">Wikipedia</a></p></div><h2>Publish/Subscribe &lt;&gt; Bulletin Board</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tMVq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444e8c95-983a-48ce-ac9e-e3d6f57f1280_1024x492.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tMVq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444e8c95-983a-48ce-ac9e-e3d6f57f1280_1024x492.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tMVq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444e8c95-983a-48ce-ac9e-e3d6f57f1280_1024x492.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tMVq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444e8c95-983a-48ce-ac9e-e3d6f57f1280_1024x492.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tMVq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444e8c95-983a-48ce-ac9e-e3d6f57f1280_1024x492.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tMVq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444e8c95-983a-48ce-ac9e-e3d6f57f1280_1024x492.jpeg" width="1024" height="492" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/444e8c95-983a-48ce-ac9e-e3d6f57f1280_1024x492.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:492,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!tMVq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444e8c95-983a-48ce-ac9e-e3d6f57f1280_1024x492.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tMVq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444e8c95-983a-48ce-ac9e-e3d6f57f1280_1024x492.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tMVq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444e8c95-983a-48ce-ac9e-e3d6f57f1280_1024x492.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tMVq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444e8c95-983a-48ce-ac9e-e3d6f57f1280_1024x492.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 aria-hidden="true" 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><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></figure></div><p>A bulletin board is built around <strong>pub/sub</strong>. Looking to make some extra pocket money, you put up an ad for private programming lessons on the town bulletin board. You have no idea who will read it. You&#8217;re hoping a few students contact you, but you keep your expectations low&#8212;it&#8217;s OK even if no one reaches out. By default, the town takes down ads after 7 days. They tell you that if you pay more, they&#8217;ll build a bigger board to keep your ad up longer.</p><div class="callout-block" data-callout="true"><p>In&nbsp;<a href="https://en.wikipedia.org/wiki/Software_architecture">software architecture</a>,&nbsp;<strong>publish&#8211;subscribe</strong>&nbsp;is a&nbsp;<a href="https://en.wikipedia.org/wiki/Messaging_pattern">messaging pattern</a>&nbsp;where senders of&nbsp;<a href="https://en.wikipedia.org/wiki/Message_passing">messages</a>, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers, but instead categorize published messages into classes without knowledge of which subscribers, if any, there may be.</p><p><a href="https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern">Wikipedia</a></p></div><h2>Which One Do You Need?</h2><p>Based on your requirements, does your design need to be more like a restaurant or more like a bulletin board? Decide on the pattern (paradigm, architecture, etc.) before you decide on the implementing technology.</p><p>There is a shortcut to help you decide. <strong>What are you trying to communicate? </strong>There are two common message types&#8212;<strong>events</strong> vs. <strong>commands</strong>.</p><p>Events are <em>customerNameChanged</em>, <em>orderPlaced</em>, or <em>jobPosted</em>.</p><p>Commands are <em>sendEmail</em>, <em>processLogs</em> or <em>cookFood</em>.</p><p>Command-style messages lean towards towards queueing.</p><p>Event-style messages lean towards pub/sub.</p><p>This is only a heuristic.</p><div class="callout-block" data-callout="true"><p>Semantics <br><br>People often prefix &#8220;queueing&#8221; with &#8220;message.&#8221; You hear the phrase &#8220;<em>message queueing</em>&#8220;, but you rarely really hear the phrase &#8220;<em>message pub/sub</em>.&#8221; <br><br>Messaging applies to <strong>both</strong> of these software paradigms. There is nothing wrong with either &#8220;<em>message pub/sub</em>&#8221; or &#8220;<em>pub/sub messaging</em>&#8220;, other than the fact that it may sound a little awkward. <br><br>Messages and messaging are implicit when discussing queueing and pub/sub. Don&#8217;t let extra words confuse you.</p></div><h2>Concrete Implementations</h2><p>After arriving with your chosen messaging paradigm, it&#8217;s time to choose an implementing technology. Any single technology can achieve a variety of different messaging patterns. You can achieve queueing with either Rabbit or Kafka. You can achieve pub/sub with either Rabbit or Kafka. Give a programmer a database and a cache, and many, many software patterns can be achieved.</p><p>Despite the flexibility of various technologies, they are still built with specific use-cases in mind. Kafka is optimized for pub/sub while RabbitMQ is optimized for queueing. Both these technologies come with their own pros and cons. It&#8217;s impossible for any single messaging software to be optimized for every single messaging pattern.</p><p>Deeper discussions arise when evaluating a technology to be used for a paradigm that it is <strong>not optimized</strong> for. If your design calls for queueing, you may be debating whether or not Kafka is a sound solution&#8212;the answer may likely be <strong>yes</strong> and that is perfectly OK. Perhaps Kafka is a preferred technology based on your organization&#8217;s operational expertise. Perhaps the expected write throughput is so high that Kafka is the only feasible solution. Perhaps nothing off the shelf works and you&#8217;ll need to build it yourself! Implementation choice is always situational.</p><h2>Software Design Implications</h2><p>A choice in software paradigm will quickly be followed by a variety of software implications.</p><h3>Extensibility &amp; Decoupling</h3><p>With pub/sub, producers and consumers are naturally decoupled, making separation of concerns easier to achieve. Introducing a new consumer is an isolated activity which does not affect message production.</p><p>With queueing, a new consumer represents a change to the overall system, both on the producer side, the consumer side, and everything in-between. In order to &#8220;activate&#8221; new consumer functionality, a new queue must be established with connections to a corresponding producer and consumer. Since a variety of components must be updated, the queueing paradigm is considered less <a href="https://en.wikipedia.org/wiki/Extensibility">extensible</a> than the pub/sub pattern (in the context of new consumer behavior).</p><p>In the realm of queueing, technologies like AMQP can assist in making your life easier. When setting up a new consumer, a few changes to exchange and binding configurations may get most of the job done. However, regardless of AMQP or any home-grown queueing solution, adding a new consumer fundamentally requires a holistic change to the system.</p><h3>Message Contracts</h3><p>With pub/sub, the ease of adding new consumers comes with a potential cost&#8212;a tight contract for messages. The convenience of introducing consumers assumes messages are produced under the same contract (payload, format, etc.) However, what happens if a consumer wants to consume an existing message type, but needs a little bit of additional data? Is this new functionality worth it for us to change how we fundamentally publish messages? How would this affect other consumers of the topic? Perhaps pub/sub leads to more coupling than we initially expected.</p><p>For queueing, message contracts are flexible. Restaurants and queueing systems behave as a unit&#8212;we know exactly what we are producing and exactly how it&#8217;s going to be consumed. We can change how we write tickets at our pizza shop without affecting the shop across town. Message contract flexibility also helps optimize consumers; we provide them exactly what they need.</p><h3>Security</h3><p>Security must be top of mind when designing a pub/sub system. If a thief is snooping through the town bulletin board, you might think twice before putting your phone number on your ad. In a highly distributed setting, it may be difficult to keep track of all consumers for any given Kafka topic. Even when everything is internal, a consumer may be misbehaving somewhere.</p><h3>Observability &amp; Monitoring</h3><p>One of the benefits of queueing is that you know exactly how your messages will be consumed. There is clear, expected behavior for both production and consumption. These expectations yield strong observability and monitoring. Systems which lean into pub/sub patterns require additional effort to properly observe and monitor.</p><h3>Performance</h3><p>Popular pub/sub solutions like Kafka allow extremely high throughputs for message production. Though I have never seen it myself, Kafka advertises that you can write up to 1M messages/sec to a topic! RabbitMQ gets no where close to this. If your system requirements call for this level of scale, there are only a few technologies that are viable.</p><h3>More Responsibility For The Consumers</h3><p>The pub/sub pattern puts extra onus on the consumer. A producer&#8217;s job is easy, but that doesn&#8217;t mean the overall work is easy&#8212;it just gets transferred to a different location.</p><p>Imagine a software team that is responsible for emitting important event-style messages when customer data changes. If that team is optimizing for the least amount of work possible, they may propose a pub/sub strategy. Fire and forget to the &#8220;CustomerEvents&#8221; topic is low effort and appears extremely extensible.</p><p>However, the customer analytics team isn&#8217;t a big fan of this approach. They are left with the burden of consuming a firehose of customer events, many of which are meaningless for them. Furthermore, important data is missing in the message payloads, forcing the analytics team to jump through hoops to resolve additional data, putting burden on other systems.</p><p>The customer analytics team makes a case for an architecture which promotes a tighter collaboration utilizing queueing paradigms rather than pub/sub. For large distributed organizations, it can be a risk when so much responsibility falls upon one side of the equation. Consuming a Kafka topic is easier said than done.</p><h2>Conclusion</h2><p>Software messaging is a huge topic. We&#8217;ve only scratched the surface here, but I hope this post has left you with a deeper intuition between two of the most popular messaging patterns.</p><p><strong>Queuing</strong> is like a <strong>restaurant</strong>.</p><p><strong>Pub/sub</strong> is like a <strong>bulletin board</strong>.</p><p>When making technical decisions, merge your thinking between abstract paradigms and concrete technologies. It&#8217;s not helpful to memorize how AMQP/Kafka/etc. work if you&#8217;re not aware of the software patterns they are designed to solve.</p>]]></content:encoded></item><item><title><![CDATA[20 Micro-Habits Of High-Impact Software Engineers]]></title><description><![CDATA[&#8220;The 25 Micro-Habits of High-Impact Managers&#8221; is a wonderful article highlighting wisdom from various managers across various industries.]]></description><link>https://www.davidxiang.com/p/20-micro-habits-of-high-impact-software-engineers</link><guid isPermaLink="false">https://www.davidxiang.com/p/20-micro-habits-of-high-impact-software-engineers</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Sun, 18 Jul 2021 18:26:18 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ik0i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5181db76-de84-4da4-a7ae-755a8617ebdf_1170x780.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ik0i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5181db76-de84-4da4-a7ae-755a8617ebdf_1170x780.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ik0i!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5181db76-de84-4da4-a7ae-755a8617ebdf_1170x780.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ik0i!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5181db76-de84-4da4-a7ae-755a8617ebdf_1170x780.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ik0i!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5181db76-de84-4da4-a7ae-755a8617ebdf_1170x780.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ik0i!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5181db76-de84-4da4-a7ae-755a8617ebdf_1170x780.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ik0i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5181db76-de84-4da4-a7ae-755a8617ebdf_1170x780.jpeg" width="1170" height="780" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5181db76-de84-4da4-a7ae-755a8617ebdf_1170x780.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:780,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:48559,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780227?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5181db76-de84-4da4-a7ae-755a8617ebdf_1170x780.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ik0i!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5181db76-de84-4da4-a7ae-755a8617ebdf_1170x780.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ik0i!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5181db76-de84-4da4-a7ae-755a8617ebdf_1170x780.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ik0i!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5181db76-de84-4da4-a7ae-755a8617ebdf_1170x780.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ik0i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5181db76-de84-4da4-a7ae-755a8617ebdf_1170x780.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p>&#8220;<a href="https://review.firstround.com/the-25-micro-habits-of-high-impact-managers">The 25 Micro-Habits of High-Impact Managers</a>&#8221; is a wonderful article highlighting wisdom from various managers across various industries. The article also reinforces an important universal idea&#8212;<strong>the details always matter</strong>. I subscribe to this idea and believe it can be easily re-applied to individual contribution.</p><p>At any given company, the criteria for promotion can be bland and frustratingly opaque&#8212;<em>consistently deliver value</em> turns into <em>create impact for your team</em>, which quickly evolves into <em>create impact for multiple teams</em>, and somehow leads to <em>create impact for the entire company and drive its future</em>. These large expectations are difficult to break down. It&#8217;s easier to start with the details (&#8220;micro-habits&#8221; if you will) and see where that takes you.</p><p>Before continuing, I highly recommend reading, &#8220;<a href="https://www.kitchensoap.com/2012/10/25/on-being-a-senior-engineer/">On Being A Senior Engineer</a>&#8220;, which provides a holistic set of expectations on what it means to be &#8220;senior.&#8221; With these expectations in mind, the following is an opinionated list of micro-habits exhibited by high-impact software engineers. I&#8217;ve broken them down into 4 themes, each with 5 habits.</p><ol><li><p>Leadership &amp; Culture</p></li><li><p>Execution</p></li><li><p>Scope &amp; Complexity</p></li><li><p>Communication</p></li></ol><h2>20 Micro-Habits Of High-Impact Software Engineers</h2><h3>Leadership &amp; Culture</h3><h4>#1 &#8212; Incident Root Cause Analysis</h4><p>You proactively dive into incident root cause analysis. You value software quality, measure problems in terms of customer impact, and make long-term improvements to engineering operations. Incident root cause analysis is often valued above incident response itself. It is also a clear sign of technical leadership.</p><h4>#2 &#8212; Steps Up For Project Duty</h4><p>You proactively step up for project management duties. Not all companies have technical project managers to help coordinate success. These responsibilities fall upon gracious product managers, designers, and engineers willing to fill in the gaps. Organizing meetings and tracking action items sit alongside coding as essential work.</p><h4>#3 &#8212; Vocal About Tech Debt</h4><p>You are vocal about tech debt and are opinionated about its relative importance compared to day-to-day project work. Technical debt is pervasive. Product managers will inevitably push back and question its value; you must persist and pay it down. What&#8217;s important is not only the debt itself, but also how you showcase your values&#8212;quality, follow-through, engineering excellence.</p><h4>#4 &#8212; Elevate Teammates</h4><p>You make time for your colleagues and voluntarily lend your expertise. You give thoughtful code review comments, proactively ask for pair-programming sessions, and tactfully deliver feedback. You do not assume your colleagues will naturally come to you for help.</p><h4>#5 &#8212; Vision For The Future</h4><p>No matter the scope of work, you have a technical vision for the future. Things can always be better! This might be a long-term strategy for how the engineering department does hiring or it could be a set of best practices for how your team writes tests. Similar to technical debt, this is important not just as a vision, but as a symbol of how you value the evolution of your work.</p><h3>Execution</h3><h4>#6 &#8212; Clean Pull Requests</h4><p>You create clean pull requests that are focused and tell a story. You avoid large changes and provide as much context as possible in your descriptions. Simplicity takes effort.</p><h4>#7 &#8212; Release Plans</h4><p>You acknowledge how tricky releases can be and spend time with your product manager to create release plans. How will your team safely release this feature? How can you safely roll back if something goes wrong? Are all stakeholders informed? Creating a release plan signals that you value thoroughness, safety, and collaboration.</p><h4>#8 &#8212; Follows Through With TODOs</h4><p>You are a good citizen of the source code and follow through with your TODOs. Sift through any codebase and you will find thousands of &#8220;delete this section after migration&#8221; and &#8220;temporary fallback behavior&#8221; littered around the source. Lingering TODOs quickly cause cognitive overload for other developers.</p><h4>#9 &#8212; Observability</h4><p>You consider observability by default. How will you and your team know your code is actually working? You install a level of observability that matches the context of the work. If a feature is in alpha, there is no need to add 5 new alerts that might wake up your colleagues at 3am. When a feature moves into general availability, you ensure a well-thought-out set of on-call responsibilities is created.</p><h4>#10 &#8212; Work Auto-Scheduler</h4><p>Within your scope, you do your best to prioritize and schedule incoming work. When a customer support specialist brings up a fresh bug, you evaluate if the issue is critical and needs to be front-loaded. Prioritization is crucial at every level of the company and it starts with how you choose to spend your time. Any effort spent on prioritization will be greatly appreciated by your manager.</p><h3>Scope &amp; Complexity</h3><h4>#11 &#8212; Best-Effort Estimates</h4><p>Despite knowing that estimates are always wrong, you still put in the time to establish them. You break down tasks, create milestones, and enable your non-engineering counterparts to plan their timelines. As you build, you maintain a pulse on new requirements and ongoing progress, quickly updating your stakeholders if any timings significantly change.</p><h4>#12 &#8212; Constantly De-Risking, In And Out Of Software</h4><p>While working on a complex and long-running project, you ingest all input and constantly de-risk the project. You are keen to hear about new requirements&#8212;a design tweak, a new auditing standard, or a nuance in revenue recognition may all influence how the technology is built. Armed with as much context possible, you are able to evaluate <strong>any</strong> new information (not just software-related) for potential risks.</p><h4>#13 &#8212; Works Through Unknowns</h4><p>You&#8217;re able to make forward progress on a project despite have 20% of the information you need. As a beginner, you&#8217;re expected to handle a stream of well-scoped tasks with clear acceptance criteria. As you grow, you will be sent in a general direction where the unknown heavily outweighs the known. To work through these unknowns, you begin to build relationships, explore technologies outside your immediate domain, and continuously developer your <a href="https://davidxiang.com/2020/08/18/the-debuggers-mindset/">Debugger&#8217;s Mindset</a>.</p><h4>#14 &#8212; Leans Into Dependencies</h4><p>You lean into dependencies and constantly grow your understanding of the entire software ecosystem. High-impact engineers are sent in general directions to deal with complex problems. Complexity comes hand-in-hand with dependencies. When you&#8217;re handling integrations with multiple teams and vendors, you refrain from siloing your work and never <a href="https://www.netlingo.com/word/throw-it-over-the-wall.php#:~:text=Business%20slang%20for%20completing%20your,wall%20to%20the%20brand%20police.%22">throw things over walls</a>. It&#8217;s easy to say, &#8220;Hey, we&#8217;ll emit an event when this {important_operation} happens; the rest is on you.&#8221; It&#8217;s harder to lean into dependencies and fully grok the integration. This has the wonderful side-effect of strengthening your personal relationships with different teams.</p><h4>#15 &#8212; Writes Often</h4><p>You understand that writing is not just a medium for communication, but is also an opportunity to organize your thoughts. You look for opportunities to write beyond the <a href="https://davidxiang.com/2020/08/10/the-importance-of-technical-planning/">technical planning</a> during the onset of a project. Don&#8217;t understand how multiple software components fit alongside an abstract architecture diagram a Staff Engineer just shared with you? Try writing about it.</p><h3>Communication</h3><h4>#16 &#8212; Provides &#8220;The Why&#8221;</h4><p>When sharing, you remember to accompany your content with &#8220;The Why.&#8221; Why is this even important? You may know why something is important for a colleague before they even know why.</p><h4>#17 &#8212; Avoids Loose Language</h4><p>You avoid loose language. &#8220;I&#8217;m not sure why that&#8217;s happening; it might because of a recent commit&#8221; is completely unhelpful. If you&#8217;re unsure, communicate explicitly that you are unsure and that you will follow-up with an answer. Loose language is cumbersome to sift through, introduces <a href="https://whatis.techtarget.com/definition/red-herring#:~:text=A%20red%20herring%20is%20a,attention%20from%20that%20relevant%20information.">red herrings</a>, and is potentially disastrous during incident response. Ensure your communication is precise.</p><h4>#18 &#8212; Bookmarks Conversations</h4><p>You remember the context of conversation threads as you schedule between them. At any moment, you will be interacting with a variety of different people. You&#8217;ll catch up with a designer over a new prototype then immediately jump into a white-boarding session for a new software architecture. For each conversation thread, save the context and create a &#8220;bookmark&#8221; of where you left off. This streamlines communication and signals that you value 1-on-1 communication. Constantly starting conversations with &#8220;Could you please remind me again why&#8230;&#8221; is a waste of time.</p><h4>#19 &#8212; Correct Context, Correct Medium</h4><p>You thoughtfully choose the correct communication medium based on context. You&#8217;re aware of the pros and cons of Slacks, emails, and meetings and transition between them based on communication requirements. The level of information you share is fluid; creating a document for peer engineering review is different than creating a document for executive review.</p><h4>#20 &#8212; Shares When Appropriate</h4><p>You find opportunities to share your work despite your packed schedule. Sharing does not have to be delivering a full-blown presentation with slide animations. When a coworker is starting to integrate with a new cloud service, you proactively schedule 30 minutes with them because you went through the same integration last quarter. Effective sharing is the culmination of tiny sharing activities.</p><h2>Conclusion</h2><p>These &#8220;micro-habits&#8221; are more than habits. Habits affect your actions, actions affect how you operate, and how you operate culminates in how much value (not only lines of code) you add as an engineering professional.</p>]]></content:encoded></item><item><title><![CDATA[6-Step Guide For Software Engineering Decision-Making]]></title><description><![CDATA[Software engineering decision-making is a stressful and time-consuming process.]]></description><link>https://www.davidxiang.com/p/6-step-guide-for-software-engineering-decision-making</link><guid isPermaLink="false">https://www.davidxiang.com/p/6-step-guide-for-software-engineering-decision-making</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Wed, 16 Jun 2021 10:32:09 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!k8Fp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc518339d-8b29-475c-8634-e9c27c2b2091_1170x781.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!k8Fp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc518339d-8b29-475c-8634-e9c27c2b2091_1170x781.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k8Fp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc518339d-8b29-475c-8634-e9c27c2b2091_1170x781.jpeg 424w, https://substackcdn.com/image/fetch/$s_!k8Fp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc518339d-8b29-475c-8634-e9c27c2b2091_1170x781.jpeg 848w, https://substackcdn.com/image/fetch/$s_!k8Fp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc518339d-8b29-475c-8634-e9c27c2b2091_1170x781.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!k8Fp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc518339d-8b29-475c-8634-e9c27c2b2091_1170x781.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!k8Fp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc518339d-8b29-475c-8634-e9c27c2b2091_1170x781.jpeg" width="1170" height="781" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c518339d-8b29-475c-8634-e9c27c2b2091_1170x781.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:781,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:124612,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780229?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc518339d-8b29-475c-8634-e9c27c2b2091_1170x781.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!k8Fp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc518339d-8b29-475c-8634-e9c27c2b2091_1170x781.jpeg 424w, https://substackcdn.com/image/fetch/$s_!k8Fp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc518339d-8b29-475c-8634-e9c27c2b2091_1170x781.jpeg 848w, https://substackcdn.com/image/fetch/$s_!k8Fp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc518339d-8b29-475c-8634-e9c27c2b2091_1170x781.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!k8Fp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc518339d-8b29-475c-8634-e9c27c2b2091_1170x781.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p>Software engineering decision-making is a stressful and time-consuming process. When the stakes are high, you will be met with opinionated programmers, insurmountable organizational constraints, and unfortunate baggage from old projects. Consensus is difficult.</p><p>In a previous post, &#8220;<a href="https://davidxiang.com/2021/01/19/staff-software-engineer-responsibilities/">Staff Software Engineer Responsibilities</a>&#8220;, I mention that the act of &#8220;Transforming Competing Opinions Into Decisions&#8221; as one of a Staff Engineer&#8217;s primary responsibilities. I note that prolonged technical debates are a risk for organizations and that Staff Engineers must &#8220;<a href="https://blog.danielna.com/talks/pushing-through-friction/">push through friction</a>&#8221; in order to arrive at decisions. However, once you feel the friction, it&#8217;s never clear how you&#8217;re supposed to push through it.</p><p>This article presents a generalizable 6-step outline to help engineers drive consensus. This is a set of heuristics, not an algorithm.</p><h2>Software Engineering Decision-Making</h2><h2>Preliminaries</h2><ul><li><p>Decision-making is unique to every organization. It&#8217;s part of the culture.</p></li><li><p>Decision-making and consensus-gathering take significant time and energy. Reserve this process for business-impacting problems.</p></li><li><p>As long as the desired outcome is achieved, less is more. Ideally, you don&#8217;t need any of this.</p></li><li><p>Any decision-making process should optimize for good-will amongst your peers.</p></li><li><p>Decision-making relies on empathy and communication more so than technical skills and previous experiences.</p></li><li><p>These ideas may be relevant for other situations where you hear the words &#8220;vision&#8221;, &#8220;alignment&#8221;, or &#8220;strategy.&#8221;</p></li></ul><h2>Step 1 &#8212; Assign A Directly Responsible Individual</h2><p>Ensure a directly responsible individual is assigned to the decision outcome.</p><h2>Step 2 &#8212; Research And Form Your Opinion</h2><p>To successfully facilitate the journey towards consensus, you must achieve two prerequisites: understand the current state of affairs and form an opinion.</p><p>In certain cases, you&#8217;re an existing stakeholder and have already established your opinion. In other cases, you&#8217;re coordinating a decision outcome with minimal context. The latter often occurs when existing stakeholders are entrenched in their biases and objectivity is needed.</p><p>The outcome of this step is to have complete organizational and technical context. You must track stakeholders and listen to their perspectives. You must sift through prior art and read documentation related to the topic. This research will naturally lead you to an opinion. For the veterans, remember that your opinion should form from your newly gathered context more so than your past experiences.</p><p>Finally, be clear about who is a key stakeholder and who is an interested observer. If you were to survey the engineering organization, a hundred engineers may want to take part in the process. Unfortunately, it&#8217;s not feasible to gain consensus with one hundred people. Be intentional. Who is actually affected by the decision and who just wants some extra time on their soapbox?</p><h2>Step 3 &#8212; Key Stakeholder Empathy</h2><p>After the research legwork is done, you will have sufficient context to be able to engage with key stakeholders. You may have identified one or two acute areas of conflict. Software developers are opinionated; just one unresolved issue is enough to stall a company.</p><p>Meet with the individuals who hold the strongest opinions. Understand their philosophies&#8212;do they prefer generalized solutions or specific solutions? Talk to them about their previous experiences&#8212;are they avoiding the pitfalls of a failed project or a failed company?</p><p>Do not try to achieve consensus or reconcile conflict yet. During this step, your goal is to develop empathy; this is a prerequisite before you moderate broader meetings.</p><h2>Step 4 &#8212; Gather Stakeholders And Moderate</h2><p>With key stakeholders identified and empathy in hand, it is now time to gather everyone together.</p><p>The meetings should be <strong>casual</strong>. No productive conversations occur in formal councils.</p><p>The meeting should be <strong>documented</strong>. Throughout these meetings, you will arrive at mini-decisions and mini moments of consensus. Document these wins so the group does not repeat itself; talking in circles is tiring and wasteful.</p><p>Aggressively <strong>scope </strong>the meeting. Refrain from adding too many attendees or discussion topics. Answering one or two open questions per meeting is a great outcome.</p><p>Finally, the meetings should be <strong>moderated</strong>. Even casual meetings require structure. Ensure people are staying on topic, high-level goals are reiterated, and the majority of minutes are spent discussing. Constantly remind people about the outcome and its significance.</p><h2>Step 5 &#8212; Timeboxed Arrival At A Decision</h2><p>Due to the heavy amount of communication required, assume this process is at risk of taking too long. Once discussions begin, the arrival at a decision should be timeboxed. You do not want to spend months or even quarters discussing this topic.</p><p>Culture matters. Compromises must be made and stubbornness must be minimized. Explicitly tell everyone upfront that this decision-making process will be timeboxed. If consensus is not gathered in a reasonable timeframe, the team must agree to disagree and commit on moving forward. If a decision is still impossible, you may need to resort to heavier-handed alternatives (see later).</p><h2>Step 6 &#8212; Document, Ratify, and Communicate</h2><p>Congratulations! A decision has been made. There&#8217;s only a few logistical follow-ups left that will put a bow on the entire process.</p><p>The final decision must be documented. Other engineers will be interested to hear about the outcome and how the company chose to move forward. The problem must be clear, the solution must be laid out, and the trade-offs must be acknowledged.</p><p>Explicit stakeholder signatures go a long way. A ratified document gives the decision outcome weight and the authority to be referenced later.</p><p>Don&#8217;t be shy&#8212;broadcast the results to the company.</p><p>Finally, ensure that teams follow through. If an architecture decision was made, is the software actually being built to reflect the architecture? If an organizational process was changed, did it actually happen?</p><h2>3 Heavier-Handed Alternatives</h2><p>If consensus-gathering strategies are not effective, you may need to resort to heavier-handed alternatives. One method is to defer the decision to a higher authority. This may be the resident Staff Engineer, a select Principal Engineer, or perhaps even the CTO. This method is decisive, but it is not optimized for goodwill amongst your colleagues.</p><p>Another alternative is to align engineers by utilizing non-engineers. If engineers can&#8217;t align on a technical decision, it&#8217;s likely that they&#8217;re rooted in different product and business goals. In practice, I have seen that enlisting the help of a high-ranking product manager to reaffirm company goals may help with engineering alignment.</p><p>Another medium-handed approach is to utilize the wedding ceremony rule of, &#8220;Speak Now Or Forever Hold Your Peace.&#8221; This is a method to keep the process moving when people are lagging; this is not an excuse to skip communication. This is a risky strategy for significant decisions and is also not optimized for goodwill.</p><h2>Conclusion</h2><p>Software engineering decision-making can be exhausting and is never a simple sequence of steps. Consensus relies heavily on communication and empathy; it relies less on technical expertise and previous experiences.</p><p>Throughout the process, remain firm, but never offensive. Engage the right engineers and hold them accountable to their stake in the decision.</p><p>Finally, don&#8217;t stress too much. Significant decisions have significant expectations. If you need help, ask for help. If the process isn&#8217;t going anywhere and needs to be reframed, make the call and have a reset. The fact that you have taken on this massive responsibility deserves to be applauded!</p><p>Best of luck.</p>]]></content:encoded></item><item><title><![CDATA[What Is A Runtime Environment?]]></title><description><![CDATA[&#8220;Runtime&#8221; and &#8220;Runtime Environment&#8221; are some of the most overloaded terms in software development.]]></description><link>https://www.davidxiang.com/p/what-is-a-runtime-environment</link><guid isPermaLink="false">https://www.davidxiang.com/p/what-is-a-runtime-environment</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Fri, 26 Feb 2021 18:52:06 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Bj7p!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F827d0ae0-0c61-4dec-bdb2-cb72e1bddb11_1170x879.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Bj7p!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F827d0ae0-0c61-4dec-bdb2-cb72e1bddb11_1170x879.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Bj7p!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F827d0ae0-0c61-4dec-bdb2-cb72e1bddb11_1170x879.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Bj7p!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F827d0ae0-0c61-4dec-bdb2-cb72e1bddb11_1170x879.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Bj7p!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F827d0ae0-0c61-4dec-bdb2-cb72e1bddb11_1170x879.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Bj7p!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F827d0ae0-0c61-4dec-bdb2-cb72e1bddb11_1170x879.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Bj7p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F827d0ae0-0c61-4dec-bdb2-cb72e1bddb11_1170x879.jpeg" width="1170" height="879" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/827d0ae0-0c61-4dec-bdb2-cb72e1bddb11_1170x879.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:879,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:103889,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780231?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F827d0ae0-0c61-4dec-bdb2-cb72e1bddb11_1170x879.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Bj7p!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F827d0ae0-0c61-4dec-bdb2-cb72e1bddb11_1170x879.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Bj7p!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F827d0ae0-0c61-4dec-bdb2-cb72e1bddb11_1170x879.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Bj7p!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F827d0ae0-0c61-4dec-bdb2-cb72e1bddb11_1170x879.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Bj7p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F827d0ae0-0c61-4dec-bdb2-cb72e1bddb11_1170x879.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p>&#8220;Runtime&#8221; and &#8220;Runtime Environment&#8221; are some of the most overloaded terms in software development. It&#8217;s confusing for everyone; this word means many different things in many different contexts. This post&#8217;s goal is to provide you with an intuition behind the many use-cases of &#8220;runtime.&#8221;</p><h2>Word Overload</h2><p>Let&#8217;s enumerate the common use-cases of &#8220;runtime.&#8221;</p><h3>Runtime &#8212; The Lifecycle (Noun)</h3><p>The first meaning of runtime is with regards to program lifecycle. This refers to the period of time in which a program is executing. A intuitive comparison is often made between compile time and runtime.</p><blockquote><p>The IDE is spitting out a lot of new warnings during compile time.</p></blockquote><blockquote><p>This process is outputting a lot of logs during runtime.</p></blockquote><h3>Runtime &#8212; During The Lifecycle (Adjective)</h3><p>In the same context of program lifecycle, runtime is also commonly used as an adjective. This is sometimes hyphenated as &#8220;run-time.&#8221; The <a href="http://oreillymedia.github.io/production-resources/styleguide/#getting_started">O&#8217;Reilly Style Guide</a> recommends using &#8220;runtime&#8221; for both nouns and adjectives.</p><blockquote><p>This program seems to throw a lot of runtime errors.</p></blockquote><blockquote><p>What kind of runtime metrics do you want to capture for this application?</p></blockquote><p>One gotcha is that while O&#8217;Reilly recommends &#8220;runtime&#8221; for <strong>both</strong> adjectives and nouns, they recommend &#8220;compile-time&#8221; as an adjective and &#8220;compile time&#8221; as a noun.</p><blockquote><p>We should probably fix some of these compile-time warnings.</p></blockquote><blockquote><p>If you prefer to catch errors at compile time rather than at runtime, Typescript might be a good choice.</p></blockquote><h3>Run time &#8212; How Long Did It Take?</h3><p>&#8220;Run time&#8221; as two words refers to the raw execution time of a program. This usage doesn&#8217;t appear as often as the others.</p><blockquote><p>Q: Did you measure the run time of the data cleanup script last week?</p><p>A: Yea&#8212;it took about 3 hours.</p></blockquote><p>To avoid runtime overload confusion, simply asking &#8220;<em>How long did the script take to execute?</em>&#8221; is more clear.</p><h2>Runtime Environment</h2><p>Armed with an intuition of runtime as a lifecycle, let&#8217;s discuss runtime environments. These two concepts are related, but subtlety different. Confusion is created because people abridge &#8220;runtime environment&#8221; to just &#8220;runtime.&#8221;</p><blockquote><p>You have to be careful that your Javascript program doesn&#8217;t have any runtime errors when it&#8217;s running in the Node.js runtime [environment].</p></blockquote><blockquote><p>Q: Did you see the release notes for the new JRE?</p><p>A: Yea, there&#8217;s a lot of fancy stuff going on in the new Java Runtime [Environment].</p></blockquote><p>In these examples, the standalone &#8220;runtime&#8221; refers to a &#8220;runtime environment.&#8221; In these situations, it&#8217;s better to be precise with your language.</p><blockquote><p>The new Java Runtime Environment seems to be doing a better job with garbage collection.</p></blockquote><blockquote><p>Is there a way to control how many threads handle the I/O within the Node.js runtime environment?</p></blockquote><h3>Culinary Intuition</h3><p>After developing a craving for Chinese Yu Xiang Eggplant, you decide to hop on Google to look for a recipe. After sifting through a few search results and scrolling past a few walls of ads, you find a clean step-by-step recipe that seems like a winner.</p><p>Unfortunately, a recipe on its own is useless. The recipe you found on Google isn&#8217;t actually going to get you your eggplant&#8212;you need a kitchen! The eggplant recipe&#8217;s runtime environment is your kitchen.</p><p>Your code is just code. Whatever code you write, in whatever language you choose, needs to eventually execute on a computer. Runtime environments enable this execution.</p><h3>Everyone&#8217;s Runtime Environment &#8212; The Operating System</h3><p>The universal runtime environment for <strong>any </strong>kind of programmatic execution is the operating system. The operating system is the only way you can get the CPU to execute your code. The OS is the silent hero that ensures your program gets some memory, gets scheduled fairly, and doesn&#8217;t disturb its neighbors. It doesn&#8217;t matter if you&#8217;re using C, Python, or Node.js&#8212;at the end of the day, the operating system is everyone&#8217;s runtime environment.</p><h3>An Executable&#8217;s Runtime Environment</h3><p>An executable&#8217;s runtime environment is the operating system.</p><p>Every operating system defines a binary file format for executable code. In Unix-Like operating systems, this is the <a href="https://en.wikipedia.org/wiki/Executable_and_Linkable_Format">ELF file format</a>. In addition, operating systems ship with programs that are able to take these files and give them to the hardware to be executed. In Linux, one example is the <em><a href="https://man7.org/linux/man-pages/man2/execve.2.html">execve()</a></em> program. For all other operating systems, there will be a similar set of file formats and loader programs.</p><h3>A C Program&#8217;s Runtime Environment</h3><p>What does it take to execute a C program on your computer? This is very close to an executable&#8217;s runtime environment; all we need to do is to make sure our C source can turn into a proper executable.</p><p>This step is familiar to everyone. Compilers like GCC or LLVM take your C code and create a properly formatted ELF file, targeted for your processor&#8217;s architecture, waiting to be passed into <em>execve()</em>.</p><p>A subtler part of C compilers is that they also provide a C <a href="https://en.wikipedia.org/wiki/Runtime_library">runtime library</a> that is automatically compiled into your program. The purpose of these libraries is to provide you&#8212;the programmer&#8212;with basic facilities to interact with the runtime environment. For a compiled C program as an ELF executable, this environment is the operating system. For example, the C runtime library provides useful functions like <em>malloc()</em> and <em>free() </em>that allow you to manage memory, automatically injects <a href="https://en.wikipedia.org/wiki/Crt0">startup routines</a> into your program to help prepare it for execution, and many, many other things.</p><div class="callout-block" data-callout="true"><p>Any library that allows a program to interact with the operating system will be heavily tailored to that operating system. For C, the runtime libraries and functions we just discussed are part of a larger umbrella library referred to as either <a href="https://en.wikipedia.org/wiki/C_standard_library">libc or the C Standard Library</a>. This is an official standard. <br><br>In Linux, the most common implementation of the C Standard Library is <a href="https://www.gnu.org/software/libc/manual/html_node/index.html#toc-Arithmetic-Functions-1">glibc</a>. In Windows, the library is referred to as the <a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-160">C Run-Time Libraries or CRT</a>. These libraries will abide by the C Standard and will also provide additional specialized features for their respective operating systems. <br><br>For C developers, your program would be more portable if you decide to only use libraries and functions from libc. You can be more-or-less confident that OS vendors have implemented the C Standard Library well for their own OS. <br><br>If you&#8217;re writing a C program and you <strong>only</strong> ever want it to run on Linux, you may use Linux-specific libraries outside the standard that allow you to specifically leverage Linux. If you&#8217;re writing a C program and you rely on Microsoft-specifics inside the CRT, then you&#8217;ll need to update your code if you ever decide to compile your program with glibc.</p></div><p>The concept of the &#8220;C Runtime Environment&#8221; isn&#8217;t a real concept. A C program&#8217;s runtime environment is the universal runtime environment, the operating system. The important point to remember is that <strong>all</strong> code&#8212;from assembly to Javascript&#8212;needs some kind of environment in order execute, just like all recipes need some kind of kitchen to turn into food.</p><h3>Higher-Level Runtime Environments</h3><p>As programming languages evolved, people wanted an environment that could handle additional tasks that felt cumbersome for developers. Do you really enjoy using <em>malloc() </em>and <em>free()</em> to manage all your dynamic memory? Wouldn&#8217;t some kind of automatic reference counting and garbage collection be extremely convenient? Some people say <strong>yes</strong> and this is how fancier runtime environments like the JRE developed.</p><p>Another popular higher-level runtime environment is Node.js. Many developers refer to this as the &#8220;Node.js Runtime&#8221; or simply just &#8220;Node.&#8221; Node is a runtime environment for the Javascript language, similar to how the JRE is a runtime environment for the Java language. Node comes with fancy features like a callback queue, an event loop, and a thread pool. Just like the JRE, these bells and whistles exist to make our lives easier as developers.</p><p>With higher-level runtime environments, features can become blurred across the language and its environment. Within the Java ecosystem, the automatic garbage collection feature is not technically a feature of the Java language itself, but is actually a feature of the JRE. 95% of developers won&#8217;t bother making this distinction. The statement &#8220;<em>Java has automatic memory management</em>&#8221; can more precisely be stated as, &#8220;<em>The Java Runtime Environment has automatic memory management</em>.&#8221; As a warning, you&#8217;ll get some unpleasant glares if you ever decide to correct someone over these kind of semantics.</p><h3>Runtime Environment Layers</h3><p>Runtime environments have their own runtime environments. If you download the Node binary for Linux, you&#8217;ll find that it&#8217;s just another ELF executable waiting to be run by the OS. So we could say&#8212;Javascript&#8217;s runtime environment is Node, and Node&#8217;s runtime environment is the operating system. Or you could also say&#8212;Javascript&#8217;s runtime environment is a combination of Node and the operating system. Again, dive deep enough and everyone&#8217;s runtime environment ends up being the operating system.</p><h3>Interpreting Languages</h3><p>Code does not always have to be compiled to OS/architecture-specific binaries. A common pattern is to execute your programs via interpreters. For example, a Python interpreter can read your Python source and produce corresponding machine instructions for your computer to execute. This conveniently makes Python source very portable. However, the Python interpreter itself is a compiled executable, built for a specific OS/architecture, who&#8217;s runtime environment is the operating system.</p><div class="callout-block" data-callout="true"><p>There is no such thing as interpreted languages or non-interpreted languages. A programming language is just a syntax. Python interpreters are the most popular way to execute Python source, but it&#8217;s not the only way. Programmers are creative. I&#8217;m sure developers have found ways to compile Python/Javascript into executables or have even created ways to interpret C.</p></div><h2><strong>Conclusion</strong></h2><p>&#8220;Runtime&#8221; is one of the most overloaded terms in software development. The two most common contexts are either a program&#8217;s <strong>execution lifecycle </strong>or the <strong>environment</strong> in which a program executes.</p><p>A recipe is only a recipe; source code is only source code. A recipe turns into food via a kitchen; source code moves electricity through metal via a runtime environment.</p><p>Runtime environments have their own layers of abstraction. Your Java source gets turned into bytecode and gets interpreted and executed within the JRE. The JRE itself executes via the OS. Everyone&#8217;s runtime environment ends up being the operating system.</p><p>So the next time your colleague says, &#8220;<em>Hey, I was measuring the run time of our program and I noticed we&#8217;re getting a lot of runtime errors after we upgraded to the new Node.js runtime</em>&#8220;&#8212;you&#8217;ll know exactly what they mean.</p>]]></content:encoded></item><item><title><![CDATA[Software Engineering Culture Metrics]]></title><description><![CDATA[Company culture.]]></description><link>https://www.davidxiang.com/p/software-engineering-culture-metrics</link><guid isPermaLink="false">https://www.davidxiang.com/p/software-engineering-culture-metrics</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Thu, 11 Feb 2021 01:20:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Vifu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb58251d9-974d-4c56-b8bf-90424ecc7073_1170x878.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Vifu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb58251d9-974d-4c56-b8bf-90424ecc7073_1170x878.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Vifu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb58251d9-974d-4c56-b8bf-90424ecc7073_1170x878.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Vifu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb58251d9-974d-4c56-b8bf-90424ecc7073_1170x878.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Vifu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb58251d9-974d-4c56-b8bf-90424ecc7073_1170x878.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Vifu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb58251d9-974d-4c56-b8bf-90424ecc7073_1170x878.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Vifu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb58251d9-974d-4c56-b8bf-90424ecc7073_1170x878.jpeg" width="1170" height="878" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b58251d9-974d-4c56-b8bf-90424ecc7073_1170x878.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:878,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:105001,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780232?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb58251d9-974d-4c56-b8bf-90424ecc7073_1170x878.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Vifu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb58251d9-974d-4c56-b8bf-90424ecc7073_1170x878.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Vifu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb58251d9-974d-4c56-b8bf-90424ecc7073_1170x878.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Vifu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb58251d9-974d-4c56-b8bf-90424ecc7073_1170x878.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Vifu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb58251d9-974d-4c56-b8bf-90424ecc7073_1170x878.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p>Company culture. Extremely important, impossible to define.</p><p>Impossible to define doesn&#8217;t mean impossible to understand. A surface-level understanding of culture is available via Glassdoor and company onboarding documents. However, a deep understanding of culture is only available via experience.</p><p>This article focuses on a set of values often associated with software engineering culture. Instead of the discussing the values themselves, I discuss the activities which measure them.</p><h2>Software Engineering Culture &#8212; A Basic Understanding</h2><h3>Culture Via Definitions</h3><p>I will defer the definitions to the Internet:</p><div class="callout-block" data-callout="true"><p>Company culture can be defined as a set of shared values, goals, attitudes and practices that characterize an organization.</p><p><a href="http://www.builtin.com/company-culture">www.builtin.com</a></p></div><div class="callout-block" data-callout="true"><p>This culture consists of shared beliefs and values established by leaders and then communicated and reinforced through various methods, ultimately shaping employee perceptions, behaviors and understanding.</p><p><a href="https://www.shrm.org/resourcesandtools/tools-and-samples/toolkits/pages/understandinganddevelopingorganizationalculture.aspx">www.shrm.org</a></p></div><h3>Culture Via Questions</h3><ul><li><p>Do you enjoy your job?</p></li><li><p>Who do you look up to at work?</p></li><li><p>How do your colleagues respond to difficult situations?</p></li><li><p>What actions are rewarded? What actions are punished?</p></li></ul><h3>Culture Via Characteristics</h3><ul><li><p>Heavily dependent on people</p></li><li><p>Extremely difficult to change, yet constantly changing</p></li><li><p>Influenced by parent cultures, but locally unique</p></li><li><p>Experienced differently by different people</p></li></ul><h3>Culture Via Values (Software Engineering Specific-ish)</h3><ul><li><p>Freedom &#8212; How To Work</p></li><li><p>Freedom &#8212; Solution Choice</p></li><li><p>Collaboration</p></li><li><p>Personal Growth</p></li><li><p>Operational Excellence</p></li><li><p>Transparency</p></li><li><p>Feedback</p></li><li><p>Developer Happiness</p></li></ul><h2>How Is This Useful?</h2><p>A long list of clich&#233;&nbsp;bullet points is not useful; I&#8217;m sure &#8220;Operational Excellence&#8221; and &#8220;Personal Growth&#8221; are stamped inside every company&#8217;s culture handbook.</p><p>At any given software organization, infinite tasks are being concurrently executed by a perpetually understaffed employee thread pool. Code is being written, architecture is being reviewed, retrospectives are being run, interviews are being held, compensation is being planned. A unique culture is reflected and measured in each and every one of these processes.</p><p>In this article, I present three standard-issue software engineering activities that can be used as metrics for software engineering culture. Improving these activities is not for the sake of the activity, but for the sake of your company&#8217;s culture.</p><h2>3 Interesting Software Engineering Culture Metrics</h2><h3>#1 &#8212; Adoption Of Frameworks &amp; Tools</h3><p><strong>Values Measured: </strong>Feedback / Collaboration</p><p><strong>Measurement Example: </strong>What ratio of teams have adopted the shared {rate limiting, caching, background job, migration, etc.} framework versus rolling their own solution?</p><div><hr></div><p>Every software company has a set of teams that are designated as &#8220;Platform&#8221; teams. These teams are tasked with developing high-leverage software with the goal of accelerating experience-focused teams.</p><p>Despite their best intentions, platform developers still struggle to get other teams to adopt their technologies&#8212;even when that other team sits down the hallway. Why would they want to use your software over building their own solution or paying a little extra money on AWS features?</p><p>The level of adoption of internal platform features measures two (probably more) important cultural values.</p><p>The first value is <strong>feedback</strong>. In order to get a potential customer to adopt your software, you need to talk to the customer. In this case, the customer is your colleague. Do you understand their requirements? Is your software actually solving their problems? Have you met them yet?</p><p>A common risk is for platform teams to create a set of &#8220;standards&#8221; based on their personal perceptions of another team&#8217;s requirements. This happens more often than you might expect; it&#8217;s in a developer&#8217;s nature to build frameworks that bias towards their own problems. As a platform developer, never assume that you fully understand another developer&#8217;s problem without engaging him or her. Continuously gathering feedback is critical to develop this understanding and to build trust with your colleagues. This begets adoption.</p><p>The second value is <strong>collaboration</strong>. The adoption of a framework is driven by framework creators. There is a stark difference between these two strategies:</p><ol><li><p>Hey, our team just developed a new set of security penetration testing tools. Here&#8217;s the documentation, please try it out and let us know how it goes.</p></li><li><p>Hey, our team just developed a new set of security penetration testing tools. Does your team have some time to walk us through your product so we can figure out how these tools might help you?</p></li></ol><p>Both strategies have the same goal&#8212;adopt the penetration testing tools. Strategy #1 is more scalable, but it&#8217;s the wrong move for early adoption. I argue that Strategy #2 is the more effective route for platform developers to foster sustainable, long-term adoption of their software.</p><p>Strategy #2 reflects collaboration and empathy. Strategy #1 reflects <a href="https://www.netlingo.com/word/throw-it-over-the-wall.php#:~:text=Business%20slang%20for%20completing%20your,wall%20to%20the%20brand%20police.%22">throwing things over walls</a>. If you&#8217;re willing to sacrifice your time and work alongside your colleagues, it won&#8217;t be long before every developer at the company has a new feature request for you. Once Strategy #2 is repeated successfully enough times, auxiliary actions&#8212;word of mouth, self-service assets, bug support&#8212;will be icing on the cake.</p><p>If a software organizations notices that a platform team keeps producing software that no one opts to use, it may reflect a lack of value in feedback and collaboration.</p><h3>#2 &#8212; Effectiveness Of Retrospectives</h3><p><strong>Values Measured: </strong>Operational Excellence / Freedom &#8212; How To Work</p><p><strong>Measurement Example: </strong>In a company survey, ask developers to rate the effectiveness of last quarter&#8217;s retrospectives from 1-5.</p><div><hr></div><p>Look around any software organization and you will find<a href="https://searchsoftwarequality.techtarget.com/definition/Agile-retrospective"> retrospectives</a> surrounding sprints, incidents, and projects. No matter the context, all retrospectives share a similar purpose&#8212;deeply understand a situation, cordially discuss areas for improvement, and grow as an organization. Running effective retrospectives is a clear metric for <strong>operational excellence</strong>.</p><p>Retrospectives also measure a more nuanced software engineering cultural value&#8212;<strong>freedom</strong>. Specifically, the freedom to choose <em>how</em> to work.</p><p>Retrospectives, alongside other software ceremonies, represent process. Every organization wants their process to be as effective as possible.</p><p>Ironically, effective process comes out of no process. Effective process is not built out of process, but is built out of values, or culture. Let&#8217;s take incident retrospectives as an example&#8212;how would you introduce this process to your organization?</p><ol><li><p>We have decided to implement incident retrospectives because Amazon does incident retrospectives. From now on, every incident must be followed by a retrospective that follows this template.</p></li><li><p>We value operational excellence. We make mistakes and learn from them. After an incident is resolved, every team is responsible for implementing a retrospective process so we can collectively improve our operations.</p></li></ol><p>Again, both strategies have the same goal, but may produce drastically different results. Strategy #1 runs the risk of mandating process for the sake of process. This is useless if the culture is not ready for it; it&#8217;s impossible to copy Amazon&#8217;s ceremonies if your company inherently has different values than them.</p><p>Furthermore, process before culture inadvertently stifles the ability for developers to choose <em>how</em> they work. Not every team will be enthusiastic about copying Amazon&#8217;s incident response. This doesn&#8217;t mean that they are neglecting operational excellence; they might just want to create their own solution.</p><p>Strategy #2 reflects freedom. Freedom is the preferred operating mode for software developers. Our goal is operational excellence and we want to be empowered to create a unique solution to reach this goal. For incident retrospectives, perhaps teams want to use a custom template, introduce a &#8220;minimum viable retrospective&#8221;, or execute their follow-ups asynchronously. If Strategy #2 is repeated enough times, it inevitably turns into a natural process for the organization and the end goal is reached.</p><p>This idea is not unique to engineering. Consider how consulting firms engage with their enterprise clients. No one appreciates a consultant barging into an organization and changing up how everything works. Seasoned consultants know that sustainable change does not come from mandating change, but from changing the client&#8217;s culture. If a consultant can shift a company&#8217;s values, they will inevitably shift that company&#8217;s processes, and hopefully that company&#8217;s success.</p><p>As a developer, examine the various processes that you participate in. Which ones are not effective? Perhaps process has been introduced before the culture is ready for it. If you had the freedom to change the process, while achieving the same goal, what would you do?</p><h3>#3 &#8212; Effectiveness of RFCs (Or Any Other Approval Process)</h3><p><strong>Values Measured</strong>: Collaboration / Freedom &#8212; Solution Choice</p><p><strong>Measurement Example: </strong>RFC creation count. RFC average approval time. Frequency of negative sentiment towards software approval processes.</p><div><hr></div><p>Another pervasive process found in software organizations is the journey for consensus. Examples include gaining signatures on an <a href="https://flaviocopes.com/rfc/">RFC</a> document, winning a majority vote from a technical committee, or arriving at an important architecture decision.</p><p>Frustration surrounding approval processes may signal that engineers value technology preference over collaboration. These two attitudes are very different:</p><ol><li><p>No, that&#8217;s not going to work.</p></li><li><p>No, that&#8217;s not going to work, but let me help you solve your problem.</p></li></ol><p>To belabor one more time&#8212;different strategies, different results, different culture.</p><h2>Honorable Mentions</h2><p>Every single software engineering activity measures culture. I&#8217;ve only touched upon three, but there are many, many more.</p><h3>Engagement During All-Hands Meetings</h3><p><strong>Values Measured: </strong>Feedback / Transparency</p><p>If leadership is opaque and feedback falls on deaf ears, no developer will bother asking questions during meetings.</p><h3>Diversity Of Team Ceremonies</h3><p><strong>Values Measured: </strong>Freedom &#8212; How To Work</p><p>Not every team has to follow the two-week agile sprint cadence to a tee.</p><h3>Frequency of Performance Recalibrations</h3><p><strong>Values Measured</strong>: Transparency / Personal Growth</p><p>Recalibrating an engineer and delaying a promotion can be tough for both the developer and their manager. However, this is a healthy process that shows that management is transparent with each other and takes personal growth seriously.</p><h3>Average Time To Merge Code</h3><p><strong>Values Measured</strong>: Operation Excellence / Collaboration</p><p>Average time to merge is an important health metric that is difficult to trace back to a specific engineering value; a thousand factors contribute to slow code reviews.</p><p>Regarding <strong>operation excellence</strong>&#8212;developers should be trained to write well-tested code and be able to present it clearly to their colleagues.</p><p>Regarding <strong>collaboration</strong>&#8212;developers have the responsibility to inform their stakeholders of upcoming changes. If you open up a code review in another team&#8217;s repository and their reaction is, &#8220;Where is this requirement even coming from?&#8221;&#8212;don&#8217;t expect your code to be merged any time soon.</p><h3>Deployment Health</h3><p><strong>Values Measured</strong>: Developer Happiness</p><p>Developer happiness is directly correlated to healthy, predictable, and frequent deployments.</p><h3>How Often The Career Ladder Changes</h3><p><strong>Values Measured: </strong>Feedback / Personal Growth</p><p>Leaderships doesn&#8217;t change engineering level descriptions for the sake of changing copy. When leadership fine-tunes the career ladder, it signals that they are listening and putting in an effort to support the growth of the engineers.</p><h2>Conclusion</h2><p>As an organization, don&#8217;t spend too much time attempting to describe your culture. It is already understood and reflected through process. Spend that energy paying attention to the processes that break down and be wary of introducing process for the sake of process.</p><p>As an individual, pay attention to your personal strategy of work. There&#8217;s a difference between &#8220;No, that&#8217;s not going to work&#8221; and &#8220;No, that&#8217;s not going to work&#8212;let me help you.&#8221; Your strategy affects your actions, which affects the company&#8217;s processes, which changes culture.</p>]]></content:encoded></item><item><title><![CDATA[Staff Software Engineer Responsibilities]]></title><description><![CDATA[[October 10, 2021] If you enjoy this article, check out my new post on this topic: Staff Software Engineer Responsibilities &#8212; Align With Authority.]]></description><link>https://www.davidxiang.com/p/staff-software-engineer-responsibilities</link><guid isPermaLink="false">https://www.davidxiang.com/p/staff-software-engineer-responsibilities</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Wed, 20 Jan 2021 02:05:10 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!f9or!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c12ce-29f5-4ab7-827a-00ce05e352dc_1170x780.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!f9or!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c12ce-29f5-4ab7-827a-00ce05e352dc_1170x780.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!f9or!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c12ce-29f5-4ab7-827a-00ce05e352dc_1170x780.jpeg 424w, https://substackcdn.com/image/fetch/$s_!f9or!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c12ce-29f5-4ab7-827a-00ce05e352dc_1170x780.jpeg 848w, https://substackcdn.com/image/fetch/$s_!f9or!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c12ce-29f5-4ab7-827a-00ce05e352dc_1170x780.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!f9or!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c12ce-29f5-4ab7-827a-00ce05e352dc_1170x780.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!f9or!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c12ce-29f5-4ab7-827a-00ce05e352dc_1170x780.jpeg" width="1170" height="780" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dd8c12ce-29f5-4ab7-827a-00ce05e352dc_1170x780.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:780,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:116206,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780234?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c12ce-29f5-4ab7-827a-00ce05e352dc_1170x780.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!f9or!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c12ce-29f5-4ab7-827a-00ce05e352dc_1170x780.jpeg 424w, https://substackcdn.com/image/fetch/$s_!f9or!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c12ce-29f5-4ab7-827a-00ce05e352dc_1170x780.jpeg 848w, https://substackcdn.com/image/fetch/$s_!f9or!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c12ce-29f5-4ab7-827a-00ce05e352dc_1170x780.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!f9or!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c12ce-29f5-4ab7-827a-00ce05e352dc_1170x780.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><div class="callout-block" data-callout="true"><p><em>[October 10, 2021] If you enjoy this article, check out my new post on this topic: <a href="https://davidxiang.substack.com/p/staff-software-engineer">Staff Software Engineer Responsibilities&nbsp;&#8212;&nbsp;Align With Authority</a>.</em></p></div><p>The path of the <a href="https://lethain.com/what-do-staff-engineers-actually-do/">Staff Software Engineer</a> represents the career progression of a technologist. Senior Engineer leads to Staff Engineer which leads to Principal Engineer which hopefully leads to a comfortable retirement. Unfortunately, Staff Software Engineer responsibilities are often poorly defined by management. The goal of this article is to give clarity to these responsibilities so aspiring Staff Engineers&#8212;and their managers&#8212;can perform their jobs more effectively.</p><h3>Context</h3><p>These responsibilities make the most sense within a specific context:</p><ul><li><p>An organization that makes money by selling software</p><ul><li><p>This is important because it forces alignment between engineering and business goals.</p></li></ul></li><li><p>An organization that has separated the technical track (Staff/Principal) from the managerial track (Director/VP)</p><ul><li><p>This is important because it implies that the company has created a space for technologists to make an impact. The risk is that this space can be ambiguous.</p></li></ul></li><li><p>An organization with at least few hundred software developers</p><ul><li><p>This is important because a minimum people scale implies a basic organizational hierarchy and an ample need for collaboration.</p></li></ul></li></ul><p>These responsibilities will not make as much sense if you&#8217;re in a completely different context.</p><h3>Preface: Product &lt;&gt; Engineering</h3><p>Software companies strive to create inspirational <a href="https://svpg.com/product-vision-faq/">product visions</a> and effective <a href="https://svpg.com/product-strategy-overview/">product strategies</a>. The vision is the <em>what</em> and the strategy is the <em>how</em>. If done well, these two items are extremely powerful. The vision of &#8220;Become A Space-Bearing Civilization&#8221; is enough for SpaceX to recruit thousands of engineers to work on rockets.</p><p>The company&#8217;s vision is set by product management&#8212;not engineering. The engineering organization is in service to the product organization which is in service to the business. Software must be designed to support the product strategy and ultimately realize the product vision.</p><p>Product management respects engineering; they know that tech debt is no laughing matter and that nothing ships without sustainable software. Similarly, engineering respects product management; they are fully aware of the technical implications baked into product goals.</p><ul><li><p>Does the company want to expand internationally?</p></li><li><p>Does the company want to provide a Developer Platform?</p></li><li><p>Is the target customer an enterprise or a person? Both?</p></li><li><p>How quickly do we have to ship given the competition and market?</p></li></ul><p>In this context, product and engineering collaboration is paramount. Staff Software Engineers are responsible for understanding product goals and aligning their work with what&#8217;s best for the business.</p><h2>Staff Software Engineer Responsibilities</h2><h3>Problem-First Mindset</h3><p>Every engineering organization has an overwhelming amount of technical problems. A Staff Engineer is responsible for discovering the problems that pose a risk to the business.</p><ul><li><p>The developer experience in a particular domain is terrible, which kills developer velocity and hurts product development.</p></li><li><p>The responsibilities of a microservice are nebulous, which causes teams to stall and hurts product development.</p></li><li><p>A business-critical codepath can&#8217;t handle a 10X magnitude bump and needs a re-architecture.</p></li></ul><p>A large list of problems is not useful by itself. In additional to discovering problems, a Staff Engineer also has the responsibility to <strong>prioritize</strong> them.</p><p>A common risk is for Staff Engineers to hand off prioritization to managers. While an Engineering Manager can help with operational logistics, they may not be as informed on the technical implications of the problems at hand.</p><h3>Transform Competing Opinions Into Decisions</h3><p>Software developers inevitably grow attached to their work. Attachments often lead to conflicting technical opinions, and in the worst case scenario, block progress for the company.</p><p>Tensions are high surrounding the responsibilities of a particular microservice. There is no clarity for the service&#8217;s future. One team wants to expand its scope; another team wants to narrow it. Both groups have valid arguments and concerns, but development has stalled. Staff Engineers are responsible for breaking technical stalemates. They do this by talking to stakeholders, weighing trade-offs, and arriving at strong, opinionated recommendations.</p><p>Recommendations are only recommendations. Staff Engineers must <a href="https://blog.danielna.com/talks/pushing-through-friction/">push through friction</a> and create decisions. Decision-making is a difficult process and will leave certain engineers upset; this is something that can&#8217;t simply be delegated to management. As a Staff Engineer, turning a prolonged technical debate into a recorded decision is a huge win for the company.</p><h3>Concede With Humility</h3><p>As a Staff Engineer, you may find yourself holding on to an opinion. Discussions surrounding an important architecture decision are going nowhere and now a Principal Engineer needs to conduct a tiebreaker. Even though arguments can be healthy, these situations are costly and must be minimized. Staff Engineers should practice <a href="https://blog.codinghorror.com/the-ten-commandments-of-egoless-programming/">egoless programming</a> and know when to compromise; there is a difference between standing up for what you believe in and being stubborn.</p><h3>Create More Staff Software Engineers</h3><p>As with any other role, the end goal is to replicate yourself. For Staff Engineers, this means creating more Staff Engineers. A convenient byproduct of creating a prioritized list of technical problems is that you&#8217;ve automatically created a set of high-impact projects for growing senior engineers. This is a great way to elevate your colleagues while giving yourself extra bandwidth.</p><h3>Choose The Right Problem To Solve</h3><p>Staff Engineers must thoughtfully choose which problems they want to personally handle. A Staff Engineer can solve problems that most engineers cannot. By definition, there are fewer of these problems and they must be properly identified out of the sea of technical issues.</p><p>There are two common risks if business-impacting problems are not properly assigned. First, if a Staff Engineers chooses to work on a &#8220;comfortable&#8221; problem, then a senior engineer misses a growth opportunity and the Staff Engineer&#8217;s time is underutilized. This is counterproductive because the engineering organization doesn&#8217;t grow. Second, if a complex problem is delegated to an engineer who isn&#8217;t ready for it yet, an inadequate solution implemented for a critical business problem could put the company in worse shape than how it started.</p><h3>Broadcast</h3><p>A common sentiment heard around software organizations:</p><div class="callout-block" data-callout="true"><p>I&#8217;m not really sure what {staff_engineer} actually works on &#8230;</p><p>- Other Engineers</p></div><p>The communication required of Staff Engineers is very different than that of individual contributors, team leads, or engineering managers. Engineers mistakenly believe that the Staff Engineer role requires <strong>less</strong> communication&#8212;it&#8217;s not less, just different.</p><p>Staff Engineer projects are often isolated. This might be a deep untangling of debt or a broad, self-navigated exploration. It is impossible for the organization to benefit from this work if they&#8217;re unaware of it. Common mediums for this type of communication are sending newsletters, holding Q&amp;A Meetings, and providing progress updates at relevant All-Hands Meetings.</p><p>A focus on consistent broadcasting is a quality that sets a Staff Engineer apart from his or her peers. This benefits both the company and the individual. For the company, you never know when a developer might pivot strategies based on a Staff Engineer&#8217;s explorations and recommendations. For the individual, actively communicating your work gives you a voice in the organization. This is essential for Staff Engineers because they must be able to influence without authority.</p><h3>Observe</h3><p>As a Staff Engineer, you have deeper technical context and experience than other engineers. You will see nuances where other engineers do not. Since it&#8217;s impossible to be involved in every project, the next best thing to do is to observe how the software is being built.</p><ol><li><p>Actively participate in architecture review meetings</p></li><li><p>Read through architecture proposals and product briefs (new and old)</p></li><li><p>Sift through chatrooms, paying extra attention to cross-team inquiries</p></li></ol><p>You notice that an engineer pops into another team&#8217;s Slack channel and asks about a certain piece of critical code. While you can easily tell them how the code works, it&#8217;s more important to determine <strong>why</strong> they are asking about it in the first place.</p><p>The goal of active observation is to get ahead of technical problems. It&#8217;s not practical to expect every engineer to ask for guidance when necessary; they don&#8217;t know what they don&#8217;t know. Staff Engineers have the responsibility to keep a pulse on the software before a minor gotcha turns into a technical mess. There is never an expectation to catch everything, but there is an expectation to speak up when necessary.</p><h3>Expedite Instead Of Block</h3><p>As a Staff Engineer, one of your main responsibilities is to provide guidance. This includes approving architecture proposals, reading pull requests, and giving up your time for other engineers. This guidance is essential if it&#8217;s in the critical path of a project. If a developer needs your sign-off for the sake of moving product development forward, then that item should immediately be re-ordered to the top of your TODO list.</p><p>When too many projects depends on your guidance, there is a risk of creating an organizational <a href="https://en.wikipedia.org/wiki/Single_point_of_failure">single point of failure</a>. A common cause of this is when select engineers accumulate too much historical context and have neglected knowledge dissemination. This is irresponsible; SPOFs inevitably slow down projects and must be avoided at all costs. As a Staff Engineer, you are responsible for using your position to expedite work, not block it.</p><h3>Conclusion</h3><p>Many people mistake the path towards Staff Engineer as a way to stay out of the limelight, a way to avoid meetings and dealing with people. While these positions exist, their impact and growth are limited, especially in the context of a growing software company.</p><p>Successful Staff Engineers are much more than technical experts. They are role models that understand how their actions affect the engineering culture. They respect product management and optimize their efforts in service of the business. Finally, they don&#8217;t work in ivory towers, but are actively engaged with the organization.</p>]]></content:encoded></item><item><title><![CDATA[Kafka As A Database? Yes Or No]]></title><description><![CDATA[I recently read through a Hacker News thread discussing the article &#8220;Kafka Is Not A Database&#8221;, by Arjun Narayan and George Fraser. The opinions behind this topic are fascinating and I enjoyed sifting through comments from both sides of the table. For the purposes of this post, I&#8217;ve labeled these two broad groups of thoughts as Team Blue and Team Red.]]></description><link>https://www.davidxiang.com/p/kafka-as-a-database</link><guid isPermaLink="false">https://www.davidxiang.com/p/kafka-as-a-database</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Sun, 10 Jan 2021 12:32:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!_YS9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f96a5ba-7f5b-409a-8abf-7a2717007ea1_1170x709.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_YS9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f96a5ba-7f5b-409a-8abf-7a2717007ea1_1170x709.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_YS9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f96a5ba-7f5b-409a-8abf-7a2717007ea1_1170x709.jpeg 424w, https://substackcdn.com/image/fetch/$s_!_YS9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f96a5ba-7f5b-409a-8abf-7a2717007ea1_1170x709.jpeg 848w, https://substackcdn.com/image/fetch/$s_!_YS9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f96a5ba-7f5b-409a-8abf-7a2717007ea1_1170x709.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!_YS9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f96a5ba-7f5b-409a-8abf-7a2717007ea1_1170x709.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_YS9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f96a5ba-7f5b-409a-8abf-7a2717007ea1_1170x709.jpeg" width="1170" height="709" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5f96a5ba-7f5b-409a-8abf-7a2717007ea1_1170x709.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:709,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:46320,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780237?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f96a5ba-7f5b-409a-8abf-7a2717007ea1_1170x709.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_YS9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f96a5ba-7f5b-409a-8abf-7a2717007ea1_1170x709.jpeg 424w, https://substackcdn.com/image/fetch/$s_!_YS9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f96a5ba-7f5b-409a-8abf-7a2717007ea1_1170x709.jpeg 848w, https://substackcdn.com/image/fetch/$s_!_YS9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f96a5ba-7f5b-409a-8abf-7a2717007ea1_1170x709.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!_YS9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f96a5ba-7f5b-409a-8abf-7a2717007ea1_1170x709.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p>I recently read through a Hacker News <a href="https://news.ycombinator.com/item?id=25346851">thread</a> discussing the <a href="https://materialize.com/kafka-is-not-a-database/">article</a> &#8220;Kafka Is Not A Database&#8221;, by <a href="https://twitter.com/narayanarjun">Arjun Narayan</a>&nbsp;and&nbsp;<a href="https://twitter.com/frasergeorgew?lang=en">George Fraser</a>. The opinions behind this topic are fascinating and I enjoyed sifting through comments from both sides of the table. For the purposes of this post, I&#8217;ve labeled these two broad groups of thoughts as Team Blue and Team Red.</p><p>Team Blue believes that <a href="https://kafka.apache.org/">Kafka</a>, a popular streaming platform, has the potential to be the source-of-truth for your data&#8212;replacing one of the key responsibilities of conventional databases.</p><p>Team Red strongly disagrees.</p><p>The following is high-level summary of these opinions.</p><h2><strong>Kafka As A Database</strong></h2><h3>TL;DR Streams,Events,Kafka</h3><p>First, a conceptual model of streams:</p><div class="callout-block" data-callout="true"><p>In&nbsp;<a href="https://en.wikipedia.org/wiki/Computer_science">computer science</a>, a&nbsp;<strong>stream</strong>&nbsp;is a&nbsp;<a href="https://en.wikipedia.org/wiki/Sequence">sequence</a>&nbsp;of&nbsp;<a href="https://en.wikipedia.org/wiki/Data_element">data elements</a>&nbsp;made available over time.&nbsp;A stream can be thought of as items on a&nbsp;<a href="https://en.wikipedia.org/wiki/Conveyor_belt">conveyor belt</a>&nbsp;being processed one at a time rather than in large batches.</p><p>Wikipedia.org</p></div><p>Imagine that you&#8217;ve hired an invisible assistant. This assistant&#8217;s only responsibility is to record everything you do:</p><ol><li><p>Wakes up @ 8 am</p></li><li><p>Brushes teeth @ 8:35 am</p></li><li><p>Begins showering @ 8:40 am</p></li><li><p>&#8230;</p></li></ol><p>As you go about your day, your assistant meticulously captures your activity and adds new entries into your daily log. This growing log represents a <strong>stream </strong>of your day-to-day activity. The data elements that comprise the stream are known as <strong>events</strong>. Once an event is recorded, it is immutable; the fact that you brushed your teeth at 8:35 am yesterday will never change.</p><p>While your invisible assistant is following you around and <strong>producing</strong> new events to your stream, who is <strong>consuming</strong> them? Anyone who cares! I&#8217;m sure your mom would be thrilled to process through your activities and call you if there are any anomalies.</p><p>What about <strong>Kafka</strong>?</p><div class="callout-block" data-callout="true"><p><strong>Apache Kafka</strong>&nbsp;is an&nbsp;<a href="https://en.wikipedia.org/wiki/Open-source_software">open-source</a>&nbsp;<a href="https://en.wikipedia.org/wiki/Stream_processing">stream-processing</a>&nbsp;software platform developed by the&nbsp;<a href="https://en.wikipedia.org/wiki/Apache_Software_Foundation">Apache Software Foundation</a>, written in&nbsp;<a href="https://en.wikipedia.org/wiki/Scala_(programming_language)">Scala</a>&nbsp;and&nbsp;<a href="https://en.wikipedia.org/wiki/Java_(programming_language)">Java</a>.&nbsp;</p><p>Wikipedia.org</p></div><p>Kafka is a platform (large set of software tools) that helps programmers work with streams.</p><h2>Team Blue &#8211; Streams Everywhere</h2><p>Team Blue believes that streams are a natural model for both life and computing. Your users produce a stream of clicks, sign-ups, and orders. Your code produces a stream of logs, metrics, and programmatic events. Team Blue believes that the intuitive nature of streams can lead to intuitive software architectures.</p><p>An essential component of any system is the database&#8212;a convenient place to read and write whatever you want. How can a stream replace this concept that we are so used to? If streams are a never-ending series of immutable events, then the property of state is the culmination of events up to a certain point in time. For example, the latest state of a database is the culmination of all operations made to that database. In computing, this is referred to as <a href="https://docs.microsoft.com/en-us/azure/architecture/patterns/event-sourcing">Event Sourcing</a>. This paradigm is very different to how many developers are used to thinking about their data.</p><p>Beyond data storage, Team Blue is bullish on the idea of stream-focused architectures in general. Streams work well with microservices, promote loose coupling of systems, and have the potential to create leverage in your software. If you&#8217;re thinking about streams, you will inevitably think about Kafka&#8212;one of the industry&#8217;s leading streaming platforms.</p><p><strong>Can</strong> you use Kafka as a database? Team Blue says yes.</p><p><strong>Should</strong> you use Kafka as a database? That&#8217;s up to you.</p><h2>Team Red &#8211; You Need Databases</h2><p>On the other side of the table is Team Red who believes that programmers are making a mistake by replacing conventional databases with Kafka.</p><p>Team Red believes that 99% of applications need the features of a conventional database&#8212;especially the features handling complex concurrency issues. Many of us use these features and they are critical for the success of our applications. Modern databases are battle-tested and have been iterated on for decades. Team Red believes that the message of &#8220;Kafka As A Database&#8221; is a dangerous message that leads developers into architectures they&#8217;re not equipped to handle.</p><h2>The People On Each Team</h2><p>There is no shortage of influential people who align with Team Blue. One notable engineer is <a href="https://twitter.com/jaykreps">Jay Kreps</a>, CEO of <a href="https://www.confluent.io/blog/okay-store-data-apache-kafka/">Confluent</a>. Confluent is an organization that sells Kafka as a solution to enterprises. There is a direct correlation between using streams and using Kafka; I&#8217;m sure Jay has a few extra reasons to be bullish on streams beyond his personal software architecture preferences.</p><p>Another influencer aligned with Team Blue is <a href="https://twitter.com/martinkl">Martin Kleppmann</a>, author of the extremely popular book <a href="https://www.amazon.com/Designing-Data-Intensive-Applications-Reliable-Maintainable/dp/1449373321">Designing Data-Intensive Applications</a>. Martin Kleppmann is a researcher who loves the idea of streams. His goal is to educate as many programmers as possible. Martin&#8217;s only qualm with Team Red&#8217;s opinion is the tone of their blog post. In his <a href="https://twitter.com/martinkl/status/1336336852890963977">own words</a>:</p><blockquote><p>Nice blog post [Kafka Is Not A Database] explaining why the &#8220;database inside out&#8221; approach is not for everyone. <a href="https://twitter.com/narayanarjun">@narayanarjun</a> and <a href="https://twitter.com/frasergeorgew">@frasergeorgew</a> are right &#8212;&nbsp;if you need to maintain constraints before events are written (e.g. not selling more items than you have in stock), it&#8217;s easier to use a DB and CDC.</p><p>On the other hand, the message is also a bit patronising. It basically says &#8220;you&#8217;re not clever enough to use an event log correctly &#8212; leave database stuff to the experts&#8221;. I respectfully disagree: it is good to explore new approaches. Learn about the trade-offs, educate yourself.</p><p>Martin Kleppmann</p></blockquote><p>Engineers on Team Red&#8217;s side include <a href="https://materialize.com/author/arjun/">Arjun Narayan</a>&nbsp;and&nbsp;<a href="https://materialize.com/author/george-fraser/">George Fraser</a>, co-authors of the <a href="https://materialize.com/kafka-is-not-a-database/">article</a> which refutes the idea of &#8220;Kafka As A Database.&#8221; They have decided to put a large, yellow caution sign in front of Team Blue&#8217;s message. Team Red has no issue with Kafka or streams; they have an issue with eager developers throwing out their <a href="https://en.wikipedia.org/wiki/Relational_database#RDBMS">RDMSs</a> and jumping on the stream bandwagon. Their only extra agenda might be to get extra eyeballs on their engineering blogs.</p><h2>Arguments From Team Blue</h2><p>The following points are summaries of topics discussed in Martin Kleppmann&#8217;s <a href="https://www.youtube.com/watch?v=fU9hR3kiOK0&amp;t=2089s">video</a>.</p><h3>High Integrity Data &#8211; Never Deleted</h3><p>With a database, your information is easily susceptible to being lost. Once your Postgres row is updated, it&#8217;s difficult to recover the previous state of that row without introducing custom accountability software. Databases and the records inside them are designed to be mutable. It&#8217;s both a great convenience and a great risk. If a table accidentally gets deleted, you might find yourself scrambling to restore your database from a backup. This is particularly painful in production.</p><p>On the other hand, if your data exists as a log of immutable events&#8212;and that log happens to be retained forever&#8212;the history of your changes never runs the risk of being erased. Accounting is a great example of this&#8212;accountants balance their books by only appending new entries to their ledgers. An error in a financial transaction is always fixed by another transaction.</p><p>Team Blue believes that this characteristic can be an asset to software architectures. As a permanent log of events, data will always have its historical context and can easily be audited. Furthermore, the lack of an &#8220;eraser&#8221; forces programmers and processes to be held highly accountable for their actions.</p><div class="callout-block" data-callout="true"><p>Trade-Off: <br><br>One concern of storing all your data in a log is that the size of your logs may become unwieldy over time. Do we really care about how a customer changed their email 3 years ago or do we only care about what it is today? Large Kafka logs can also complicate consumers&#8212;catching up from offset 0 may not be so easy. Kafka has implemented features like <a href="https://kafka.apache.org/documentation.html#compaction">Log Compaction </a>to mitigate this. However, this is yet another complexity for programmers to manage and debug. <br><br>Another trade-off of this architecture is that it can become cumbersome for privacy concerns. There are administrative use-cases (GDPR) which may require you to completely <strong>hard delete</strong> all of your customer&#8217;s personal information from your system. This takes additional effort if the data to be deleted is scattered across logs and storage systems.</p></div><h3>Separation Of Concerns &#8211; Reading / Writing</h3><p>Team Blue points out that one of the great conveniences of databases is also one of its greatest challenges. The convenience of databases is undeniable&#8212;an easy one-stop shop to read and write anything. The drawback to being a one-stop shop is that you can&#8217;t be the best at any <strong>one</strong> thing, which becomes problematic as you scale.</p><p>Conventional databases easy conflate reads and writes, two very different styles of operations. As you scale, the access patterns in your software will inevitably force you to optimize for a certain set of operations. If an operation-specific optimization is done in a centralized location, it will likely degrade the performance of other operations in that location. If you optimize reads, you complicate writes&#8212;and vice versa.</p><p>One of the first steps in optimizing SQL reads is to begin denormalizing (duplicating) data across various tables. Once your data is duplicated, queries require less joins and respond faster. However, the drawback of denormalization is that it creates additional complications on the write pathway. Programmers need to remember to update and synchronize the duplicated data across multiple tables.</p><p>This pattern grows in complexity as you scale. If denormalization isn&#8217;t getting you the required read performance, the usual next step is to introduce a cache in front of your database. A cache is extremely convenient and can be designed to precisely answer the questions your clients are asking. However, as many programmers are intimately aware of, maintaining a cache is never easy. You now to need synchronize writes across network boundaries, worry about distributed transactions, and debug subtle invalidation issues.</p><p>Going back to our make-believe example, my assistant only has <strong>one</strong> responsibility&#8212;log my daily activity. One day, I decide that I want to look back in time to see how my activities are categorized. Unfortunately, I can&#8217;t ask my assistant this question because it&#8217;s too specific; all he knows how to do is produce events. To get insights on my activity, I need to hire a category manager to consume my activity stream and categorize everything. Assuming my manager is caught up, she&#8217;ll be able to immediately and accurately answer any question I have regarding my activity categorization.</p><p>With streams, there is a clear separation of concerns between readers and writers. Producers only worry about producing. Their access pattern is straightforward and lightning fast. Consumers only worry about consuming. They can be programmed to handle any use-case and never have to worry about affecting the performance of their producer counterparts. How fast you&#8217;re able to push updates to Elastic Search is completely independent from how quickly Kafka can write to a file.</p><p>For Team Blue, this separation of concerns is an advantage of streams. Databases are convenient, but they conflate concerns and quickly create performance trade-offs as you scale.</p><h3>Easier Caching</h3><p>One of Martin Kleppmann&#8217;s most interesting ideas is that you can get &#8220;Fully Precomputed Caches&#8221; with stream architectures. A common setup for Kafka consumers is to process logs in order to create various <a href="https://en.wikipedia.org/wiki/Materialized_view">materialized views</a>. A materialized view has a similar end goal as a cache&#8212;provide a precomputed view of the data that is useful for a client. However, the way in which they are maintained is drastically different.</p><p>With a materialized view, the write pattern is incredibly simple. The materialized view is created by simply processing through the log of events and updating the view accordingly. The process is straightforward, but potentially time-consuming. On the other hand, caches often have complex and error-prone write patterns. Logic to update and invalidate caches is often scattered around business logic, executed randomly depending on how customers use an application.</p><p>The concept of &#8220;<a href="https://stackoverflow.com/questions/22756092/what-does-it-mean-by-cold-cache-and-warm-cache-concept">warm vs. cold</a>&#8221; caching also goes away with materialized views. If a materialized view is fully created (completely &#8220;caught up&#8221;), then it represents the complete state of the data. There is never a cache miss because a complete materialized view is completely hot by definition. Instead of worrying about cold starts and how to properly warm up a cache, programmers can create materialized views offline and start using them whenever they&#8217;re ready.</p><div class="callout-block" data-callout="true"><p>Trade-Off: <br><br>Using materialized views for convenient caching comes with a cost. Materialized views are separate pieces of infrastructure that need to store their own data, scale, and be reliable. Loose coupling of systems sounds nice, but the added operational overhead is never trivial. For small applications, this may be overkill. Don&#8217;t forget the conveniences of a database&#8212;you can query it whenever you want. A Kafka log doesn&#8217;t doesn&#8217;t respond very well to SQL. Querying a database is much simpler than setting up new consumers and ensuring materialized views are synchronized.</p></div><h2>Arguments From Team Red</h2><h3>&#8220;Streams Everywhere&#8221; Is A Dangerous Message</h3><p>Team Red believes that the ideas behind &#8220;Streams Everywhere&#8221; are hurting the software industry by causing eager engineering organizations to adopt streams without understanding their consequences. George <a href="https://news.ycombinator.com/item?id=25346851">comments</a>:</p><blockquote><p>We&#8217;re trying to address a real problem that is happening in our industry: VPs of eng and principal engineers at startups are adopting the &#8220;Kappa Architecture&#8221; / &#8220;Turning the Database Inside Out&#8221;, without realizing how much functionality from traditional database systems they are leaving behind. This has led to a barrage of consistency bugs in everything from food-delivery apps to the &#8220;unread message count&#8221; in LinkedIn. We&#8217;re at the peak of the hype cycle for Kafka, and it&#8217;s being used in all kinds of places it doesn&#8217;t belong. For 99% of companies, a traditional DBMS is the right foundation.</p><p>George Fraser</p></blockquote><p>George&#8217;s points are valid. Software engineers have a tendency to adopt new and shiny objects without fully understanding them. Just because Kafka is trending, it doesn&#8217;t mean you need to solve every problem with it. Engineers need to be responsible, understand trade-offs, and choose technologies that fit their requirements.</p><div class="callout-block" data-callout="true"><p>Trade-Off: <br><br>Be careful of arguments that appeal to popularity. If databases are the correct solution for 99% of applications, what about the other 1%? Your application could be in that minority and may deserve a novel architecture. Team Blue argues that you should find out the answer for yourself. There&#8217;s a time to follow conventional wisdom and there may be a time to forge your own path.</p></div><h2>Losing Critical Database Features</h2><p>Team Red warns that many critical features will be lost if you forgo a database in favor of logs. In particular, features that help enforce data integrity are extremely useful and are extremely difficult to replicate. These features include foreign key constraints, the atomic (all-or-nothing) nature of transactions, and complicated isolation techniques that help mitigate concurrency issues. Arjun of Team Red writes:</p><blockquote><p>In principle, it is possible to implement this architecture in a way that supports both reads and writes. However, during that process you will eventually confront every hard problem that database management systems have faced for decades. You will more or less have to write a full-fledged DBMS in your application code. And you will probably not do a great job, because databases take years to get right. You will have to deal with dirty reads, phantom reads, write skew, and all the other symptoms of a hastily implemented database.</p><p><a href="https://materialize.com/author/arjun/">Arjun Narayan</a></p></blockquote><p>Arjun also has valid concerns. For a majority of applications&#8212;especially the smaller ones&#8212;these data integrity features are convenient and may be essential for your application&#8217;s success.</p><div class="callout-block" data-callout="true"><p>Trade-Off: <br><br>Even though databases are wonderful, they are not without their own bugs. <a href="https://jepsen.io/consistency">Kyle Kingsbury&#8217;s Jepson work </a>showcases discrepancies between how databases claim to behave versus how they actually behave under stressful conditions. In his book, Martin Kleppmann also mentions that programmers may place <strong>too much</strong> trust in databases. This has consequences with the verification and integrity of data. Like any other software, Postgres and MySQL aren&#8217;t perfect. <br><br>Arjun&#8217;s argument assumes that your application needs to maintain high-integrity data at all times. This is not always the case. Large amounts of data integrity checks imply expensive write operations. For large-scale systems, programmers may choose to purposefully loosen&#8212;or fully remove&#8212;these checks in favor of increased write throughput. These highly-available systems allow bad data, but are programmed to be eventually consistent so customers can still have good experiences. These trade-offs are explained further in the famous <a href="https://www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf target=">Amazon Dynamo Paper</a>.</p></div><h3>The Complexity Of Asynchronous Data Integrity</h3><p>In one of his <a href="https://www.youtube.com/watch?v=v2RJQELoM6Y">presentations</a>, Martin Kleppmann reviews the <a href="https://en.wikipedia.org/wiki/ACID">ACID properties of a database transaction</a> and how they can be implemented with a stream-based architecture:</p><div id="youtube2-v2RJQELoM6Y" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;v2RJQELoM6Y&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/v2RJQELoM6Y?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>If your system has strict requirements for validating data, you need to be very thoughtful when designing a stream-based architecture. As shown in the video, the complexity of ensuring all your customers have unique email addresses with streams is significantly more involved than adding a uniqueness constraint to a database column.</p><p>With streams, basic features that we take for granted become new responsibilities for your code and operations. You&#8217;ll need to separate the intent to write versus committing the write. You&#8217;ll need to serialize consumption of specific streams while parallelizing others. You&#8217;ll consume events only to immediately produce other events. All these complexities, combined with the fact that the software industry is extremely inexperienced with stream architectures, should give developers pause before choosing to adopt any of these new paradigms.</p><h3>Kafka Alongside A Database</h3><p>Team Red proposes that Kafka shines when used <strong>alongside</strong> a database.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JIYx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f4e4bd2-94c2-4fd6-a986-ef3bc0841b0d_960x658.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JIYx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f4e4bd2-94c2-4fd6-a986-ef3bc0841b0d_960x658.png 424w, https://substackcdn.com/image/fetch/$s_!JIYx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f4e4bd2-94c2-4fd6-a986-ef3bc0841b0d_960x658.png 848w, https://substackcdn.com/image/fetch/$s_!JIYx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f4e4bd2-94c2-4fd6-a986-ef3bc0841b0d_960x658.png 1272w, https://substackcdn.com/image/fetch/$s_!JIYx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f4e4bd2-94c2-4fd6-a986-ef3bc0841b0d_960x658.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JIYx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f4e4bd2-94c2-4fd6-a986-ef3bc0841b0d_960x658.png" width="960" height="658" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5f4e4bd2-94c2-4fd6-a986-ef3bc0841b0d_960x658.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:658,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!JIYx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f4e4bd2-94c2-4fd6-a986-ef3bc0841b0d_960x658.png 424w, https://substackcdn.com/image/fetch/$s_!JIYx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f4e4bd2-94c2-4fd6-a986-ef3bc0841b0d_960x658.png 848w, https://substackcdn.com/image/fetch/$s_!JIYx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f4e4bd2-94c2-4fd6-a986-ef3bc0841b0d_960x658.png 1272w, https://substackcdn.com/image/fetch/$s_!JIYx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f4e4bd2-94c2-4fd6-a986-ef3bc0841b0d_960x658.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 aria-hidden="true" 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><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></figure></div><p>In the article, Team Red argues that the data integrity features of databases perform the crucial functionality of &#8220;access control.&#8221; A common architecture setup is to use Kafka alongside a <a href="https://en.wikipedia.org/wiki/Change_data_capture">Change Data Capture (CDC)</a> system. In the diagram above, there are three basic steps:</p><ol><li><p>User requests hit the application and kick off transactional write operations to the database.</p></li><li><p>If all the checks look good, the writes land and update the database.</p></li><li><p>CDC reacts accordingly, translates the valid changes into valid events, and ships them off to Kafka to be consumed.</p></li></ol><div class="callout-block" data-callout="true"><p>Counter Argument: <br><br>One of Kafka&#8217;s main highlights is its ability to handle a large number of writes. The write pattern is very simple&#8212;everything goes to the end of the log. With conventional databases, transactions need to be isolated, indexes need to be updated, and constraints need to be checked. This means that writes can be very expensive. If your application is bottlenecking around expensive writes, the conventional database may hold you back. Team Red doesn&#8217;t mention that putting a database in front of Kafka would cause you to miss out on one of Kafka&#8217;s best qualities. <br><br>When hitting scaling issues with writes, it&#8217;s common for engineers to begin handling writes asynchronously. If you&#8217;re designing a system with known, large-scale write requirements, I&#8217;m sure Team Blue would recommend you go with streams.</p></div><h2>So, Kafka As A Database?</h2><p>There is never a one-size-fits-all solution in software development. The discussions surrounding &#8220;Kafka As A Database&#8221; are deep and I encourage everyone to dig further into the opinions of both Team Red and Team Blue.</p><p>I personally have never used a Kafka log as the source-of-truth for my data. Stream-focused paradigms are fascinating to read about and I conceptually understand their benefits, but I&#8217;m personally a little wary of their practicality in large software organizations&#8212;especially ones with a wide range of opinions. Software development is hard enough as it is, even when trying to go &#8220;by the book.&#8221;</p><h2></h2>]]></content:encoded></item><item><title><![CDATA[Software Engineer Vs Programmer]]></title><description><![CDATA[The difference between the titles Software Engineer vs Programmer vs Hacker vs {other_coding_title} is rooted in a person&#8217;s ideals.]]></description><link>https://www.davidxiang.com/p/software-engineer-vs-programmer</link><guid isPermaLink="false">https://www.davidxiang.com/p/software-engineer-vs-programmer</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Thu, 31 Dec 2020 17:25:15 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!x4Fm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6b0b890-b043-48df-9bfb-c56819f4283e_1170x780.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!x4Fm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6b0b890-b043-48df-9bfb-c56819f4283e_1170x780.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!x4Fm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6b0b890-b043-48df-9bfb-c56819f4283e_1170x780.jpeg 424w, https://substackcdn.com/image/fetch/$s_!x4Fm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6b0b890-b043-48df-9bfb-c56819f4283e_1170x780.jpeg 848w, https://substackcdn.com/image/fetch/$s_!x4Fm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6b0b890-b043-48df-9bfb-c56819f4283e_1170x780.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!x4Fm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6b0b890-b043-48df-9bfb-c56819f4283e_1170x780.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!x4Fm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6b0b890-b043-48df-9bfb-c56819f4283e_1170x780.jpeg" width="1170" height="780" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f6b0b890-b043-48df-9bfb-c56819f4283e_1170x780.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:780,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:108695,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780238?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6b0b890-b043-48df-9bfb-c56819f4283e_1170x780.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!x4Fm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6b0b890-b043-48df-9bfb-c56819f4283e_1170x780.jpeg 424w, https://substackcdn.com/image/fetch/$s_!x4Fm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6b0b890-b043-48df-9bfb-c56819f4283e_1170x780.jpeg 848w, https://substackcdn.com/image/fetch/$s_!x4Fm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6b0b890-b043-48df-9bfb-c56819f4283e_1170x780.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!x4Fm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6b0b890-b043-48df-9bfb-c56819f4283e_1170x780.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p>The difference between the titles <em>Software Engineer</em> vs <em>Programmer</em> vs <em>Hacker</em> vs {<em>other_coding_title</em>} is rooted in a person&#8217;s ideals. This difference is succinctly summarized in the wonderful article <a href="https://josephg.com/blog/3-tribes/">3 Tribes of Programming</a>, where the author buckets programmers into three distinct &#8220;tribes&#8221;:</p><blockquote><p>You are a poet and a mathematician. Programming is your poetry</p><p>You are a hacker. You make hardware dance to your tune</p><p>You are a maker. You build things for people to use</p><p>josephg.com</p></blockquote><p>The author asserts that all coders lean towards one of three tribes&#8212;The Poet, The Hacker, or The Maker. Even though a stark contrast is made to separate these groups, these tribes are not mutually exclusive&#8212;many programmers are Makers by day, Hackers by night, and aspiring Poets by weekend.</p><p><em>Software Engineer </em>vs <em>Programmer</em> is a <a href="https://effectiviology.com/false-dilemma/">false dichotomy</a> I&#8217;ve created to separate Makers from Non-Makers. I believe this separation to be relevant because the majority of us are Makers by profession&#8212;myself included. Without a doubt, the most accessible path to make a career out of code is the path of the Maker, or the <em>Software Engineer</em>.</p><p>If the Maker represents the <em>Software Engineer</em>, who is the <em>Programmer</em>? These are the Hackers and the Poets. These are the coders that code for the raw love of computing, the people who rightfully put the science in computer science. You&#8217;ll find these &#8220;purist&#8221; programmings developing new languages, tweaking assembly, and occasionally scoffing at the work of Makers. Pursuing a career as a <em>Programmer</em> will <strong>not</strong><em> </em>be as accessible as pursuing a career as a <em>Software Engineer</em>.</p><p>Practically speaking however, this kind of separation is not helpful; everyone writes code for their own reasons. Since the majority of us are Makers, let&#8217;s dive into what&#8217;s actually important for a Maker to focus on.</p><h3>Software Engineer Vs Programmer</h3><p>For the Poets and Hackers, the work of Makers (Software Engineers) may appear dull. This is true to a degree, the average work of a Maker will not push the envelope of computer science. As a Maker, your work is removed from theory and physics; your work revolves around value and impact. From a technical perspective, the work may seem mundane, but this does not mean the the job of a Maker is easy.</p><h3>You Need To Be A Hacker (A Little)</h3><p>As a Maker, your objective is to build scalable and reliable software that solves a problem. To have a chance of doing this successfully, you need the foundations of a Hacker. It&#8217;s difficult to build software when you don&#8217;t understand how a computer works.</p><h3>Choosing Technologies</h3><p>As a Maker, your success depends on your ability to leverage the endless shelf of available technologies. Makers optimize for quick iterations in the face of constant change. To do this well, we must avoid re-inventing the wheel and choose the opportune moments to take advantage of existing solutions.</p><h3>Integrating Technologies</h3><p>After the relevant technologies have been selected, they must be integrated. A large portion of your work will be gluing these modules together in a coherent way. Makers need to be comfortable using and adapting to other people&#8217;s software. Do not underestimate glue-work; it is not a trivial.</p><h3>Maintenance</h3><p>As you&#8217;re iterating and applying glue, you must also pay attention to maintainability. If your software succeeds and creates a valuable product, then that product&#8212;and the corresponding code&#8212;will live on for many years. The longer software exists, the more important maintainability becomes. This is a good problem to have! You and your colleagues need to be able to iterate on the code without losing all of your hair.</p><h3>Domain Modeling</h3><p>As a Maker, you are a problem-solver. Problems belonging to real-life domains don&#8217;t always map nicely to 1s and 0s. It&#8217;s critical to understand the domain you&#8217;re working in so you can map it onto software. This means talking to your business colleagues, interviewing customers, and constantly measuring your product&#8217;s usability. Hackers and Poets benefit from thinking like a computer; Makers benefit from thinking like a human.</p><h3>Creating Leverage</h3><p>In addition to using technology as leverage, software engineers must always be looking for ways to create leverage. In organizations, this is commonly referred to as &#8220;Platforms.&#8221; Many companies have created successful business models out of monetizing leverage. Examples include Amazon Web Services, Twilio, and <a href="https://stratechery.com/2020/stripe-platform-of-platforms/">Stripe&#8217;s Platform of Platforms.</a></p><p>As a Maker, keep an eye out for opportunities that create leverage. This could be a small Git script to normalize your team&#8217;s branching patterns. This could be a lightweight library to handle JSON marshaling for a common use-case. This could be a unified way of handling Authentication across all your organization&#8217;s services. Whatever it may be, leverage is wonderful&#8212;create as much of it as you can.</p><h3>Working With People</h3><p>Finally, the importance of collaboration can not be neglected. All problems are people problems. Examine any <a href="https://docs.google.com/spreadsheets/d/131XZCEb8LoXqy79WWrhCX4sBnGhCM1nAIz4feFZJsEo/edit?usp=drive_web&amp;ouid=102074010046731208988">public engineering career ladder</a>, and you will notice how small of a role coding plays as you reach higher levels.</p><p>For those of us pursuing careers as Makers, collaboration and teamwork are crucial. In additional to your technical chops, devote time to develop soft skills&#8212;read about the <a href="https://www.goodreads.com/book/show/1660754.The_Psychology_of_Computer_Programming">psychology of programming</a>, put yourself on projects with different personalities, and debug collaboration issues as you would a bug. The people aspect of software development will remain constant in perpetuity.</p><h3>Software Engineer Vs Programmer Summary</h3><ul><li><p>There are <a href="https://josephg.com/blog/3-tribes/">3 tribes of programmers</a>&#8212;The Poets, The Hackers, and the Makers.</p></li><li><p>These tribes are not mutually exclusive, but everyone leans towards one tribe based on their ideals and goals.</p></li><li><p>Most software engineers are Makers. This is where a majority of the jobs and money are at.</p></li><li><p>As a Maker, you must have some Hacker in you. To build a reliable and scalable product, you mustn&#8217;t neglect the basics of computer science.</p></li><li><p>As a Maker, you must familiarize yourself with existing technologies.</p></li><li><p>As a Maker, a significant amount of your work will be gluing technologies together. Don&#8217;t underestimate integration work.</p></li><li><p>As a Maker, make time for maintenance&#8212;at least 20% of your time. As software becomes more successful, maintenance becomes more important.</p></li><li><p>As a Maker, optimize for leverage. Use it. Create it.</p></li><li><p>As a Maker, collaboration and teamwork will get you farther than code.</p></li></ul>]]></content:encoded></item><item><title><![CDATA[The Debugger’s Mindset]]></title><description><![CDATA[Debugging is a critical skill.]]></description><link>https://www.davidxiang.com/p/the-debuggers-mindset</link><guid isPermaLink="false">https://www.davidxiang.com/p/the-debuggers-mindset</guid><dc:creator><![CDATA[David Xiang]]></dc:creator><pubDate>Tue, 18 Aug 2020 04:36:13 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!J_S2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa696067b-46dc-4a6e-a0b6-9c0df11393d6_1170x780.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!J_S2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa696067b-46dc-4a6e-a0b6-9c0df11393d6_1170x780.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!J_S2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa696067b-46dc-4a6e-a0b6-9c0df11393d6_1170x780.jpeg 424w, https://substackcdn.com/image/fetch/$s_!J_S2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa696067b-46dc-4a6e-a0b6-9c0df11393d6_1170x780.jpeg 848w, https://substackcdn.com/image/fetch/$s_!J_S2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa696067b-46dc-4a6e-a0b6-9c0df11393d6_1170x780.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!J_S2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa696067b-46dc-4a6e-a0b6-9c0df11393d6_1170x780.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!J_S2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa696067b-46dc-4a6e-a0b6-9c0df11393d6_1170x780.jpeg" width="1170" height="780" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a696067b-46dc-4a6e-a0b6-9c0df11393d6_1170x780.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:780,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:108695,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://davidxiang.substack.com/i/212780240?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa696067b-46dc-4a6e-a0b6-9c0df11393d6_1170x780.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!J_S2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa696067b-46dc-4a6e-a0b6-9c0df11393d6_1170x780.jpeg 424w, https://substackcdn.com/image/fetch/$s_!J_S2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa696067b-46dc-4a6e-a0b6-9c0df11393d6_1170x780.jpeg 848w, https://substackcdn.com/image/fetch/$s_!J_S2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa696067b-46dc-4a6e-a0b6-9c0df11393d6_1170x780.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!J_S2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa696067b-46dc-4a6e-a0b6-9c0df11393d6_1170x780.jpeg 1456w" sizes="100vw" fetchpriority="high"></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 aria-hidden="true" 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><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></figure></div><p>Debugging is a critical skill. More important than the skill is the mindset. The debugger&#8217;s mindset is the attitude that you must always understand the <strong>why</strong> behind a problem; any ambiguities or unknowns are unacceptable. This mindset has the potential to carry you from debugging small functions to solving difficult organizational issues.</p><h2>The Virtuous Cycle Of Debugging and Understanding</h2><p>There is a virtuous cycle between debugging a program and understanding a program. 95% of time, you&#8217;ll be contributing to a pre-existing codebase. In order to make coherent changes to a repository with a long history and numerous authors, you need put in work to understand the system.</p><p>A tried and true way of expanding your understanding is through debugging. Every time you squash a bug, you understand the system a little better. Once you understand the system a little better, you are empowered to debug larger issues. Once you solve larger issues, you begin to understand deeper nuances of the code. This creates a virtuous cycle where both your debugging skills and your comprehension build on each other.</p><p>This virtuous cycle is your only option. If you fail to debug a small issue, you have failed to understand a scoped area of the code. Without a basic understanding of the system, you&#8217;ll lack the support structures for any further understanding. As the system evolves, you will find it harder and harder to keep up.</p><h2>Be Scientific About It</h2><p>Debugging is a science. It&#8217;s not guessing. It&#8217;s not throwing log statements in random locations. To debug effectively, you need a method. Your actions must be deliberate, your hypotheses must be proven (or disproven), and you must conclusively arrive at solutions.</p><p>If you work alongside experienced developers, you may get the impression that they can naturally and effortlessly debug anything. You may feel that they work by intuition rather than science. It&#8217;s difficult to pinpoint why their methods are so effective. How can this be?</p><p>This &#8220;intuition&#8221; is just experience. After putting years of coding under your belt, you will begin to leverage past experiences to find heuristics in debugging. You&#8217;ll see the same problem manifest itself across many projects. This intuition is the culmination of years spent methodically squashing bugs.</p><h2>Debugging Has Its Own Scope</h2><p>Debugging a bug in application code is very different than debugging a complicated distributed system. Similar to your projects, debugging has varying degrees of scope.</p><p>When you first start debugging, you will begin by fixing issues in your local domain. This might be checking for an extra edge case or preventing a particular runtime exception. If you&#8217;re doing this on a regular basis, it won&#8217;t be long before you start debugging larger issues.</p><p>As you gain more experience, you will begin to compartmentalize information. You&#8217;ll move specific modules into black boxes, each with their specific inputs and outputs. You will begin to focus on interfaces and integrations. You will skim through implementations, only taking a deeper look out of curiosity.</p><p>With a growing level of mental organization, the scope of your debugging abilities will increase. You&#8217;ll be able to consistently perform process of elimination across a variety of possibilities. You&#8217;ll be able to quickly isolate issues to specific modules. Most importantly, you&#8217;ll be able to offer robust, practical solutions for the system.</p><div class="callout-block" data-callout="true"><p>Debugging across varying scopes does not mean you only get to debug large-scale issues as you become more experienced. You must be ready to debug <strong>any</strong> issue, whether that be an edge case in a complicated distributed protocol or a couple faulty lines of code.</p></div><h2>Debugging Skills Extend into Organization Problems</h2><p>Your debugging skills will extend to different domains. A debugger&#8217;s mindset can give you a more sophisticated product sense, assist you with managerial duties, and even enable you to improve business outcomes. No matter which direction you decide to steer your career, debugging is critical.</p><p>For example, if you go down the engineering manager&#8217;s path, there will be times where you need to debug a dysfunctional team. Similar to a software defect, you must be scientific and diagnose why the team isn&#8217;t operating well. The project might be lacking adequate product specification, or perhaps two team members are butting heads. As a manager, you will need to debug organizational issue with the same attitude that you handle software bugs. This means attend extra meetings, reading through contentious code reviews, or taking the extra time to speak with engineers. It&#8217;s a different kind of debugging, but it&#8217;s still debugging.</p><h2>Conclusion</h2><p>The debugger&#8217;s mindset is crucial. You must always understand the &#8220;why&#8221; behind any problem; anything less is unacceptable. This mindset will enable you to solve a variety of problems, constantly reinforce your understanding, and allow you to implement robust solutions. As for your career, these skills will assist you from handling edge cases in functions, to analyzing nuanced system failures, to fixing organizational inefficiencies.</p><p></p>]]></content:encoded></item></channel></rss>