<?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[Software Visualized]]></title><description><![CDATA[This blog is all about simplifying foundational software engineering concepts and how things work under the hood with animations and visuals.]]></description><link>https://solutionsarchitect.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!l1tq!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477630a8-41b2-49be-adc5-ddc266f1c040_1080x1080.png</url><title>Software Visualized</title><link>https://solutionsarchitect.substack.com</link></image><generator>Substack</generator><lastBuildDate>Tue, 07 Jul 2026 01:24:59 GMT</lastBuildDate><atom:link href="https://solutionsarchitect.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Ali Raza]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[solutionsarchitect@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[solutionsarchitect@substack.com]]></itunes:email><itunes:name><![CDATA[Ali Raza]]></itunes:name></itunes:owner><itunes:author><![CDATA[Ali Raza]]></itunes:author><googleplay:owner><![CDATA[solutionsarchitect@substack.com]]></googleplay:owner><googleplay:email><![CDATA[solutionsarchitect@substack.com]]></googleplay:email><googleplay:author><![CDATA[Ali Raza]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Advanced React by Nadia Makarevich: An In-Depth Review]]></title><description><![CDATA[The Advanced React by Nadia Makarevich is one of the best resources to uplevel your understanding of React and how it works internally.]]></description><link>https://solutionsarchitect.substack.com/p/advanced-react-by-nadia-makarevich</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/advanced-react-by-nadia-makarevich</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Wed, 07 Jan 2026 08:35:10 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!EkuC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9def5111-d389-4940-b14e-61cab2bd9229_667x1000.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_!EkuC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9def5111-d389-4940-b14e-61cab2bd9229_667x1000.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EkuC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9def5111-d389-4940-b14e-61cab2bd9229_667x1000.jpeg 424w, https://substackcdn.com/image/fetch/$s_!EkuC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9def5111-d389-4940-b14e-61cab2bd9229_667x1000.jpeg 848w, https://substackcdn.com/image/fetch/$s_!EkuC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9def5111-d389-4940-b14e-61cab2bd9229_667x1000.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!EkuC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9def5111-d389-4940-b14e-61cab2bd9229_667x1000.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EkuC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9def5111-d389-4940-b14e-61cab2bd9229_667x1000.jpeg" width="667" height="1000" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9def5111-d389-4940-b14e-61cab2bd9229_667x1000.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1000,&quot;width&quot;:667,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Advanced React: Deep dives, investigations, performance patterns and  techniques: Makarevich, Nadia: 9798851457845: Amazon.com: Books&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Advanced React: Deep dives, investigations, performance patterns and  techniques: Makarevich, Nadia: 9798851457845: Amazon.com: Books" title="Advanced React: Deep dives, investigations, performance patterns and  techniques: Makarevich, Nadia: 9798851457845: Amazon.com: Books" srcset="https://substackcdn.com/image/fetch/$s_!EkuC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9def5111-d389-4940-b14e-61cab2bd9229_667x1000.jpeg 424w, https://substackcdn.com/image/fetch/$s_!EkuC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9def5111-d389-4940-b14e-61cab2bd9229_667x1000.jpeg 848w, https://substackcdn.com/image/fetch/$s_!EkuC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9def5111-d389-4940-b14e-61cab2bd9229_667x1000.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!EkuC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9def5111-d389-4940-b14e-61cab2bd9229_667x1000.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Sometime ago, I finished reading the Advanced React book by Nadia Makarevich. The book is quite popular as an advanced React resource and might be on your wishlist as well.</p><p>The book is packed with advanced knowledge and practical tips, so if you haven&#8217;t heard about it yet, I suggest adding it to your readlist.</p><h3>Who is this book for?</h3><p>The book is for anyone seeking to elevate their knowledge and skills in React beyond introductory concepts. </p><p>However, before picking it up, you need a working understanding of most React concepts, such as reconciliation, React Hooks, component lifecycle methods, and Rendering, among others.</p><p>As the book aims to convey advanced knowledge, having the basics covered is essential.</p><blockquote><p>Having working understanding a pre-requisite to read this book.</p></blockquote><h3>What makes this book stand out?</h3><p>I have read other books on React as well. But most of those for beginners are too niche, with less focus on advanced concepts.</p><p>Here, Nadia justifies the book&#8217;s title by revealing knowledge one might not have known.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://solutionsarchitect.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2>The topics this book covers.</h2><p>The book covers most essential React concepts that developers use regularly. Some of the topics are:</p><ol><li><p>Re-renders</p></li><li><p>Diffing and Reconciliation</p></li><li><p>Memoization</p></li><li><p>Refs</p></li><li><p>React Context</p></li><li><p>HOCs</p></li><li><p>Closures</p></li><li><p>uselayoutEffect</p></li><li><p>Some tips on data fetching WRT race conditions</p></li></ol><p>and some more.</p><h2>Let&#8217;s review the book.</h2><h3>1. Going in-depth after sharing common myths and concepts</h3><p>This is the best thing about this book. Nadia first shares common myths and incorrect mental models related to the topic. Then the idea is contradicted and shown not to be always true. </p><p>I found this approach better than simply explaining the concepts as they are. This way, one can first go through some misconceptions, then see why those are wrong mental models and what the correct approach is. </p><p>Some of the myths explained in the books concern memoisation, state management, and rendering, among others.</p><h3>2. Practical tips with code snippet</h3><p>For each topic and solution, the author shares relevant code snippets of components which might help improve your understanding.</p><p>So it&#8217;s not just theory but also code snippets to get your hands dirty.</p><h3>3. The book packs knowledge in one place</h3><p>The knowledge this book provides requires a alot of research and experience. </p><p>Personally, I had explored tens of articles and blogs to understand different topics, but the book consolidates all of that in one place.</p><p>So, it&#8217;s a good way to save time and learn what is essential.</p><h3>4. Language is easier to understand</h3><blockquote><p><em>If you can't explain it simply, you don't understand it well enough.</em> Albert Einstein</p></blockquote><p>Although the book communicates the advanced concepts, the language is quite simple. </p><p>It doesn&#8217;t use any jargon or hard terms to make an impression. </p><p>Instead, all the ideas are discussed in basic English.</p><h3>5. Some concepts might seem dated</h3><p>Although the book conveys foundational concepts and aims to reestablish mental models, some ideas, such as render props, are no longer used commonly.</p><p>But you can read the chapters of what you are working with.</p><h3>6. The code snippets are slightly opinionated</h3><p>As mentioned earlier, the book provides the code snippets for each tip, trick and concept. However, sometimes the author provides their own code snippet and explains how to handle the solution.</p><p>But it&#8217;s my personal opinion: once you understand the problem &amp; solution, you can try creating your own.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Software Visualized! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h1>Conclusion</h1><p>Overall, the book is one of the best reads if you want to upgrade your understanding of React.</p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Are You a Backend Engineer Who Wants to Learn Frontend Development? Here Is a Complete Guide.]]></title><description><![CDATA[This is no-fluff guide for backend engineers to learn frontend development with projects.]]></description><link>https://solutionsarchitect.substack.com/p/how-to-learn-frontend-engineering</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/how-to-learn-frontend-engineering</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Sun, 02 Nov 2025 09:10:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ufF4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd310758d-7b10-4c4d-8e1d-8baf145d597b_600x600.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_!ufF4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd310758d-7b10-4c4d-8e1d-8baf145d597b_600x600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ufF4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd310758d-7b10-4c4d-8e1d-8baf145d597b_600x600.png 424w, https://substackcdn.com/image/fetch/$s_!ufF4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd310758d-7b10-4c4d-8e1d-8baf145d597b_600x600.png 848w, https://substackcdn.com/image/fetch/$s_!ufF4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd310758d-7b10-4c4d-8e1d-8baf145d597b_600x600.png 1272w, https://substackcdn.com/image/fetch/$s_!ufF4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd310758d-7b10-4c4d-8e1d-8baf145d597b_600x600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ufF4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd310758d-7b10-4c4d-8e1d-8baf145d597b_600x600.png" width="600" height="600" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d310758d-7b10-4c4d-8e1d-8baf145d597b_600x600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:600,&quot;width&quot;:600,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:79516,&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://solutionsarchitect.substack.com/i/159582146?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd310758d-7b10-4c4d-8e1d-8baf145d597b_600x600.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_!ufF4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd310758d-7b10-4c4d-8e1d-8baf145d597b_600x600.png 424w, https://substackcdn.com/image/fetch/$s_!ufF4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd310758d-7b10-4c4d-8e1d-8baf145d597b_600x600.png 848w, https://substackcdn.com/image/fetch/$s_!ufF4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd310758d-7b10-4c4d-8e1d-8baf145d597b_600x600.png 1272w, https://substackcdn.com/image/fetch/$s_!ufF4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd310758d-7b10-4c4d-8e1d-8baf145d597b_600x600.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>So, you are a backend engineer who wants to get into frontend but can&#8217;t figure out how? </p><p>Continue reading, as this post is for you.</p><p>The frontend is not just about creating buttons or layouts using React or another framework; it also involves understanding user experience, building UI, optimising performance, and more.</p><p>To simplify, the frontend development is broadly divided into</p><ol><li><p>UI/UX developers (building complex UI/UX layouts with animations, etc.)</p></li><li><p>Frontend Developer (mostly around building logic handling)</p></li></ol><p>Based on my experience, backend developers who transition to the frontend tend to be more inclined towards the logical aspects than UI/UX development.</p><p><em>Most of the companies building complex frontends have dedicated UI/UX developers who focus on building complex layouts.</em></p><p>Irrespective of which path you follow, you will have to grasp the same basics.</p><div class="pullquote"><div class="embedded-post-wrap" data-attrs="{&quot;id&quot;:159147678,&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/p/how-to-transition-from-frontend-to&quot;,&quot;publication_id&quot;:1918622,&quot;publication_name&quot;:&quot;Software Visualized&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!l1tq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477630a8-41b2-49be-adc5-ddc266f1c040_1080x1080.png&quot;,&quot;title&quot;:&quot;How to transition from frontend to backend development: A complete roadmap.&quot;,&quot;truncated_body_text&quot;:&quot;You are a front-end developer who wants to learn and build backend systems and become a full-stack developer.&quot;,&quot;date&quot;:&quot;2025-03-17T11:03:30.934Z&quot;,&quot;like_count&quot;:12,&quot;comment_count&quot;:0,&quot;bylines&quot;:[{&quot;id&quot;:42928596,&quot;name&quot;:&quot;Ali Raza&quot;,&quot;handle&quot;:&quot;solutionsarchitect&quot;,&quot;previous_name&quot;:&quot;Become an incredible engineer&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/83501d75-84e7-4279-b2fd-7019f1e9eb1c_1080x1350.png&quot;,&quot;bio&quot;:&quot;An engineer who is pushing his limit, loves to learn and is excited to share.&quot;,&quot;profile_set_up_at&quot;:&quot;2023-05-06T13:45:32.052Z&quot;,&quot;reader_installed_at&quot;:&quot;2023-09-02T15:18:34.445Z&quot;,&quot;publicationUsers&quot;:[{&quot;id&quot;:1908340,&quot;user_id&quot;:42928596,&quot;publication_id&quot;:1918622,&quot;role&quot;:&quot;admin&quot;,&quot;public&quot;:true,&quot;is_primary&quot;:true,&quot;publication&quot;:{&quot;id&quot;:1918622,&quot;name&quot;:&quot;Software Visualized&quot;,&quot;subdomain&quot;:&quot;solutionsarchitect&quot;,&quot;custom_domain&quot;:null,&quot;custom_domain_optional&quot;:false,&quot;hero_text&quot;:&quot;This blog is all about simplifying foundational software engineering concepts and how things work under the hood with animations and visuals.&quot;,&quot;logo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/477630a8-41b2-49be-adc5-ddc266f1c040_1080x1080.png&quot;,&quot;author_id&quot;:42928596,&quot;primary_user_id&quot;:42928596,&quot;theme_var_background_pop&quot;:&quot;#FF0000&quot;,&quot;created_at&quot;:&quot;2023-09-01T15:11:16.030Z&quot;,&quot;email_from_name&quot;:null,&quot;copyright&quot;:&quot;Ali Raza&quot;,&quot;founding_plan_name&quot;:null,&quot;community_enabled&quot;:true,&quot;invite_only&quot;:false,&quot;payments_state&quot;:&quot;disabled&quot;,&quot;language&quot;:null,&quot;explicit&quot;:false,&quot;homepage_type&quot;:&quot;newspaper&quot;,&quot;is_personal_mode&quot;:false}}],&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null,&quot;status&quot;:{&quot;bestsellerTier&quot;:null,&quot;subscriberTier&quot;:null,&quot;leaderboard&quot;:null,&quot;vip&quot;:false,&quot;badge&quot;:null,&quot;paidPublicationIds&quot;:[],&quot;subscriber&quot;:null}}],&quot;utm_campaign&quot;:null,&quot;belowTheFold&quot;:true,&quot;type&quot;:&quot;newsletter&quot;,&quot;language&quot;:&quot;en&quot;,&quot;source&quot;:null}" data-component-name="EmbeddedPostToDOM"><a class="embedded-post" native="true" href="https://solutionsarchitect.substack.com/p/how-to-transition-from-frontend-to?utm_source=substack&amp;utm_campaign=post_embed&amp;utm_medium=web"><div class="embedded-post-header"><img class="embedded-post-publication-logo" src="https://substackcdn.com/image/fetch/$s_!l1tq!,w_56,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477630a8-41b2-49be-adc5-ddc266f1c040_1080x1080.png" loading="lazy"><span class="embedded-post-publication-name">Software Visualized</span></div><div class="embedded-post-title-wrapper"><div class="embedded-post-title">How to transition from frontend to backend development: A complete roadmap.</div></div><div class="embedded-post-body">You are a front-end developer who wants to learn and build backend systems and become a full-stack developer&#8230;</div><div class="embedded-post-cta-wrapper"><span class="embedded-post-cta">Read more</span></div><div class="embedded-post-meta">a year ago &#183; 12 likes &#183; Ali Raza</div></a></div></div><h1>Basics of Frontend Development</h1><h3>HTML, CSS, and JavaScript</h3><p>You can&#8217;t escape these three regardless of what you are working on. </p><ol><li><p>HTML &amp; CSS</p></li></ol><p>You can take a crash course on these topics and try to understand the basic tags, elements, HTML syntax, meta tags, and other key concepts.</p><p>In CSS, it is essential to learn about the Box Model, positioning, layout styling (such as flex and grid), transitions, media queries, and pseudo-elements.</p><blockquote><p>Don&#8217;t start with Tailwind CSS directly, but first learn Vanilla CSS.</p></blockquote><ol start="2"><li><p>JavaScript</p></li></ol><p>JS is the language of the frontend, and browsers only understand this. Unlike Backend, you can&#8217;t skip it.</p><p>Although JavaScript is vast and encompasses many concepts, we will limit our discussion to the concepts necessary for frontend development.</p><ol><li><p>Data Structure</p></li><li><p>Hoisting</p></li><li><p>Closures</p></li><li><p>DOM Manipulation</p></li><li><p>Arrow &amp; normal functions</p></li><li><p>Event Loop</p></li><li><p>Scope and <code>this</code> keyword.</p></li><li><p>Web APIs</p></li><li><p>Promises, async, and await</p></li><li><p>Prototype Inheritance</p></li><li><p>Debugger</p></li><li><p>Console</p></li><li><p>Security: XSS, inline scripts, CSRF, input validation and sanitisation, <strong>Content Security Policy, authentication and access controls</strong></p></li></ol><p>Once you understand the theory and syntax, it&#8217;s time to build some projects.</p><ol><li><p>Chat Bot App</p></li><li><p>Quiz App</p></li></ol><p>What to learn more?</p><ol><li><p>Optimization</p></li><li><p>Browsers </p></li><li><p>Accessibility</p></li></ol><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://solutionsarchitect.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2>Frameworks &amp; Libraries</h2><p>React and Next.js are widely used frontend homework&#8217;s and I will recommend start by learning these important concepts.  </p><h3>React</h3><ul><li><p>Philosophy of React and reusable components</p><ul><li><p>Imperative vs Declarative approach</p></li><li><p>Reusable components</p></li><li><p>Representational components</p></li></ul></li><li><p>Client-side vs server-side rendering</p></li><li><p>Component lifecycle methods</p></li><li><p>Hydration</p></li><li><p>Hooks and custom hooks (useState, useEffect</p></li><li><p>State Management (useState, Zustand)</p></li><li><p>React Query, React Router and other libraries.</p></li><li><p>Devtools such as Vite, Webpack, React DevTools, etc.</p></li></ul><h3>Next.js</h3><ul><li><p>Server-side rendering</p></li><li><p>Static-site generation</p></li><li><p>Incremental Static Regeneration</p></li><li><p>App &amp; folder structure, especially if building full-stack apps</p></li><li><p>Next.js routing</p></li><li><p>Data fetching methods</p></li><li><p>Optimisation, such as images.</p></li><li><p>server and client components and server actions</p></li><li><p>Authentication with NextAuth</p></li></ul><h3>Building Projects</h3><p>It&#8217;s recommended that you build both full-stack and client-side apps on Next.js and React, respectively. It will help you master concepts in a better way.</p><ul><li><p>Your favourite SAAS application with CRUDs</p></li><li><p>Jira clone</p></li><li><p>Facebook app components</p></li><li><p>Substack webapp clone with CRUDs</p></li></ul><p>Practice &amp; practice. Once you understand these concepts, you can build different projects to practice and learn more.</p><blockquote><p>As you are mainly a Backend developer but want to learn frontend development, these topics are enough for you to learn building decent frontend apps. </p></blockquote><h3>Mobile and Desktop Apps</h3><p>If you master this path, it will help you learn to build hybrid mobile and desktop apps as well.</p><ol><li><p>React Native - mobile apps (not my recommended framework)</p></li><li><p>Electron - Desktop apps</p></li></ol><p>So, you will be able to utilise your learnings in a different domain and stack and build more solutions.</p><h1>Focusing on UI/UX</h1><p>If you are fascinated by beautiful websites with cool animations and eye-catching designs, you will focus more on a different set of technologies.</p><p>UI/UX development is front of frontend development.</p><p>Even for UI/UX, the HTML, CSS and JS requirements are the same, but they focus more on implementing UI/UX instead of handling logic, API calls, etc. </p><p>So, they specialised in a different skillset.</p><h2>Skills</h2><ol><li><p>Building pixel-perfect designs</p></li><li><p>Responsive layouts</p></li><li><p>Accessibility</p></li><li><p>Design tools such as Figma, Adobe XD.</p></li><li><p>Animation libraries such as GSAP, three.js, anime.js, etc.</p></li><li><p>Mastering HTML/CSS</p></li></ol><p>Now, these are additional skills one needs to learn. Even if you are not so well-off in JavaScript and logic building, the above-mentioned skills are more important to build amazing UI/UX.</p><h2>Projects</h2><p>There is a good portfolio published on GSAP and other animation libraries to take inspiration from and build. You can go through that to build a project or learn some new styles and designs.</p><p>You can go through these links.</p><ol><li><p><a href="https://gsap.com/showcase/">GSAP Showcase</a></p></li><li><p><a href="https://threejs.org/examples/">Threejs Examples</a></p></li></ol><h1>Summary</h1><p>I really appreciate your willingness to get into customer experience and understand how decisions on the backend actually show to the end-users.</p><p>I recommend that you follow the frontend development path instead of UI/UX to learn more and scale your skillset.</p><p>Good luck!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Software Visualized! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[I used Netflix subscription to understand their frontend system & API design]]></title><description><![CDATA[In this blog we will discuss the best practices Netflix has implemented from Frontend strategies to API design.]]></description><link>https://solutionsarchitect.substack.com/p/i-used-netflix-subscription-to-understand</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/i-used-netflix-subscription-to-understand</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Wed, 04 Jun 2025 13:30:27 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!XWB3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ad17940-52a6-4186-8b64-a8d408fdcff8_600x600.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_!XWB3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ad17940-52a6-4186-8b64-a8d408fdcff8_600x600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XWB3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ad17940-52a6-4186-8b64-a8d408fdcff8_600x600.png 424w, https://substackcdn.com/image/fetch/$s_!XWB3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ad17940-52a6-4186-8b64-a8d408fdcff8_600x600.png 848w, https://substackcdn.com/image/fetch/$s_!XWB3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ad17940-52a6-4186-8b64-a8d408fdcff8_600x600.png 1272w, https://substackcdn.com/image/fetch/$s_!XWB3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ad17940-52a6-4186-8b64-a8d408fdcff8_600x600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XWB3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ad17940-52a6-4186-8b64-a8d408fdcff8_600x600.png" width="600" height="600" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0ad17940-52a6-4186-8b64-a8d408fdcff8_600x600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:600,&quot;width&quot;:600,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:305300,&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://solutionsarchitect.substack.com/i/164677008?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ad17940-52a6-4186-8b64-a8d408fdcff8_600x600.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_!XWB3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ad17940-52a6-4186-8b64-a8d408fdcff8_600x600.png 424w, https://substackcdn.com/image/fetch/$s_!XWB3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ad17940-52a6-4186-8b64-a8d408fdcff8_600x600.png 848w, https://substackcdn.com/image/fetch/$s_!XWB3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ad17940-52a6-4186-8b64-a8d408fdcff8_600x600.png 1272w, https://substackcdn.com/image/fetch/$s_!XWB3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ad17940-52a6-4186-8b64-a8d408fdcff8_600x600.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://solutionsarchitect.substack.com/subscribe?"><span>Subscribe now</span></a></p><p>If you browse Netflix, you will notice that it provides a seamless and faster experience. </p><p>The homepage loads swiftly; movie suggestions appear almost instantly. Clicking on a title brings up the details without delay, and playback begins in a second.</p><p>All these things work because the Netflix team carefully planned the frontend system, API schema, image compression and formats, and structure.</p><p>We will discuss these practices and system design, taking notes on how to implement them in other applications. </p><h1>API</h1><h4>GraphQL</h4><p>Netflix uses GraphQL APIs to fetch data from servers. The structure for each API is well defined.</p><p>There are APIs such as</p><ul><li><p>Movie listing API</p></li><li><p>Movie details API</p></li><li><p>Token APIs</p></li></ul><p>The APIs&#8217; latency is within the milliseconds range and likely loads from the cache.</p><p>It demonstrates the scale of system design, the load those servers have, and how they deliver quickly.</p><div class="pullquote"><p>First, the Netflix system will be examined, followed by a learning section on implementations in other apps and how they can help improve customer experience.</p></div><h1>Netflix Frontend System Design: Strategies and learnings</h1><p>This section will examine how Netflix built its frontend system to provide an excellent experience.</p><h4>Pre-fetching</h4><blockquote><p>In pre-fetching data is downloaded/fetched before the user performs an action or reaches that portion.</p></blockquote><p><strong>The Netflix frontend mostly prefetches data.</strong> It doesn't always wait for user actions to fetch the required data. Instead, it anticipates and performs in the background.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://solutionsarchitect.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2>Initial Page Load</h2><p>When the user reaches the profiles section, the website fetches data for the initial section of the homepage. The data usually includes </p><ol><li><p>Thumbnail URLs</p></li><li><p>Title and relevant info</p></li><li><p>categories, etc.</p></li></ol><p>So, when you visit your profile section, the Netflix website has required data available to show to the user when they visit the next homepage of their profile.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jOkj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee96608-1ec9-46af-b94e-976c358dc5a4_1911x1001.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jOkj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee96608-1ec9-46af-b94e-976c358dc5a4_1911x1001.png 424w, https://substackcdn.com/image/fetch/$s_!jOkj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee96608-1ec9-46af-b94e-976c358dc5a4_1911x1001.png 848w, https://substackcdn.com/image/fetch/$s_!jOkj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee96608-1ec9-46af-b94e-976c358dc5a4_1911x1001.png 1272w, https://substackcdn.com/image/fetch/$s_!jOkj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee96608-1ec9-46af-b94e-976c358dc5a4_1911x1001.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jOkj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee96608-1ec9-46af-b94e-976c358dc5a4_1911x1001.png" width="1456" height="763" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3ee96608-1ec9-46af-b94e-976c358dc5a4_1911x1001.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:763,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:310703,&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://solutionsarchitect.substack.com/i/164677008?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee96608-1ec9-46af-b94e-976c358dc5a4_1911x1001.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_!jOkj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee96608-1ec9-46af-b94e-976c358dc5a4_1911x1001.png 424w, https://substackcdn.com/image/fetch/$s_!jOkj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee96608-1ec9-46af-b94e-976c358dc5a4_1911x1001.png 848w, https://substackcdn.com/image/fetch/$s_!jOkj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee96608-1ec9-46af-b94e-976c358dc5a4_1911x1001.png 1272w, https://substackcdn.com/image/fetch/$s_!jOkj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee96608-1ec9-46af-b94e-976c358dc5a4_1911x1001.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Hovering over a title</h2><p>As mentioned earlier, Netflix prefetches some data required for the initial view but loads additional data per the user's action.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tppc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbdf6c86-2cce-4ffb-a345-0813437dceef_1911x1001.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tppc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbdf6c86-2cce-4ffb-a345-0813437dceef_1911x1001.png 424w, https://substackcdn.com/image/fetch/$s_!tppc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbdf6c86-2cce-4ffb-a345-0813437dceef_1911x1001.png 848w, https://substackcdn.com/image/fetch/$s_!tppc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbdf6c86-2cce-4ffb-a345-0813437dceef_1911x1001.png 1272w, https://substackcdn.com/image/fetch/$s_!tppc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbdf6c86-2cce-4ffb-a345-0813437dceef_1911x1001.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tppc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbdf6c86-2cce-4ffb-a345-0813437dceef_1911x1001.png" width="1456" height="763" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bbdf6c86-2cce-4ffb-a345-0813437dceef_1911x1001.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:763,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1472327,&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://solutionsarchitect.substack.com/i/164677008?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbdf6c86-2cce-4ffb-a345-0813437dceef_1911x1001.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_!tppc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbdf6c86-2cce-4ffb-a345-0813437dceef_1911x1001.png 424w, https://substackcdn.com/image/fetch/$s_!tppc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbdf6c86-2cce-4ffb-a345-0813437dceef_1911x1001.png 848w, https://substackcdn.com/image/fetch/$s_!tppc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbdf6c86-2cce-4ffb-a345-0813437dceef_1911x1001.png 1272w, https://substackcdn.com/image/fetch/$s_!tppc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbdf6c86-2cce-4ffb-a345-0813437dceef_1911x1001.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now, when you hover over an image, it will</p><ol><li><p>Download a quick view video of the title</p></li><li><p>Download extra information for the hover box and details modal</p></li><li><p>Fetch the suggested movies&#8217; IDs</p></li></ol><p>The first two actions provide data for the hovered view, and if the user clicks on the modal, it will show the details for that movie/series.</p><p>However, it only fetched the movie IDs of the suggested one, and fetched relevant info only when the user opened the details of the movie.</p><p><em>This is a better choice because the user opening the details modal is optional, and the movie detail API's bandwidth and latency are reduced.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jGHr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffadc2f95-0c29-46e9-88ab-578d289a1aed_1911x1001.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jGHr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffadc2f95-0c29-46e9-88ab-578d289a1aed_1911x1001.png 424w, https://substackcdn.com/image/fetch/$s_!jGHr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffadc2f95-0c29-46e9-88ab-578d289a1aed_1911x1001.png 848w, https://substackcdn.com/image/fetch/$s_!jGHr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffadc2f95-0c29-46e9-88ab-578d289a1aed_1911x1001.png 1272w, https://substackcdn.com/image/fetch/$s_!jGHr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffadc2f95-0c29-46e9-88ab-578d289a1aed_1911x1001.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jGHr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffadc2f95-0c29-46e9-88ab-578d289a1aed_1911x1001.png" width="728" height="381.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fadc2f95-0c29-46e9-88ab-578d289a1aed_1911x1001.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:763,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:1297270,&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://solutionsarchitect.substack.com/i/164677008?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffadc2f95-0c29-46e9-88ab-578d289a1aed_1911x1001.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_!jGHr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffadc2f95-0c29-46e9-88ab-578d289a1aed_1911x1001.png 424w, https://substackcdn.com/image/fetch/$s_!jGHr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffadc2f95-0c29-46e9-88ab-578d289a1aed_1911x1001.png 848w, https://substackcdn.com/image/fetch/$s_!jGHr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffadc2f95-0c29-46e9-88ab-578d289a1aed_1911x1001.png 1272w, https://substackcdn.com/image/fetch/$s_!jGHr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffadc2f95-0c29-46e9-88ab-578d289a1aed_1911x1001.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Suggested title details are being fetched if the model is opened</figcaption></figure></div><p>Once the details model is opened, as shown in the image above, it will load the movie trailer or image and related info, and download data for suggested titles as per the movie IDs fetched in the previous steps.</p><h3>Learning</h3><ol><li><p>Design UI/UX and APIs to show minimum details first if there are too many items on the listing </p></li><li><p>If the user hovers over or loads an item, load the additional data.</p></li><li><p>For further peripheral items, such as suggested listings, fetch data on demand only.</p></li><li><p>The API's latency should be double-digit milliseconds at max to load and show content quickly.</p><h1>Lazy loading</h1></li></ol><p>The Netflix app doesn't load all sections at once.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;1943f531-a2ff-4fd6-afbd-b69d00dd8a1f&quot;,&quot;duration&quot;:null}"></div><p>Instead, when a user scrolls down, different titles against each category are shown as per the categories set by the system based on the user's history or preference.</p><p>As expected, the data for the next categories is fetched as the user scrolls down, and roughly the next 5-6 category sections are already preloaded with that data.</p><p>Here, Netflix provides a seamless UX and demonstrates effective API and data management. </p><h3>Learning</h3><ol><li><p>Loading all data simultaneously might slow the rendering and impact the experience. </p></li><li><p>So, always fetch and show relevant data only on the frontend and load more as the user scrolls. </p></li><li><p>The APIs should be designed to return data in chunks faster.</p></li></ol><h1>Images</h1><p>The images are heavily compressed as per the place.</p><p>For thumbnails, the average size is 20-30 KB.</p><p>The images shown during the sneak peek are almost 0 bits due to the blob structure being used.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gzNe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11c2f859-e63b-4113-b910-7eff9a95ef34_1914x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gzNe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11c2f859-e63b-4113-b910-7eff9a95ef34_1914x941.png 424w, https://substackcdn.com/image/fetch/$s_!gzNe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11c2f859-e63b-4113-b910-7eff9a95ef34_1914x941.png 848w, https://substackcdn.com/image/fetch/$s_!gzNe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11c2f859-e63b-4113-b910-7eff9a95ef34_1914x941.png 1272w, https://substackcdn.com/image/fetch/$s_!gzNe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11c2f859-e63b-4113-b910-7eff9a95ef34_1914x941.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gzNe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11c2f859-e63b-4113-b910-7eff9a95ef34_1914x941.png" width="1456" height="716" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/11c2f859-e63b-4113-b910-7eff9a95ef34_1914x941.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:716,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1201962,&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://solutionsarchitect.substack.com/i/164677008?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11c2f859-e63b-4113-b910-7eff9a95ef34_1914x941.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_!gzNe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11c2f859-e63b-4113-b910-7eff9a95ef34_1914x941.png 424w, https://substackcdn.com/image/fetch/$s_!gzNe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11c2f859-e63b-4113-b910-7eff9a95ef34_1914x941.png 848w, https://substackcdn.com/image/fetch/$s_!gzNe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11c2f859-e63b-4113-b910-7eff9a95ef34_1914x941.png 1272w, https://substackcdn.com/image/fetch/$s_!gzNe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11c2f859-e63b-4113-b910-7eff9a95ef34_1914x941.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The reasons are quite logical.</p><p>The thumbnail size is small, around 300 by 160, and mostly the title and a picture of the user's preference are shown.</p><p>Here, showing high-quality images comprising hundreds of KBs doesn't make sense.</p><p>It will slow down the loading because hundreds of titles are shown simultaneously.</p><h3>Learning</h3><ol><li><p>If you have an e-commerce store or some app where images are shown, </p></li><li><p>Compress and create images as per different view sizes</p></li><li><p>Always load minimal-size photos for the first view, such as on product listing pages.</p></li><li><p>If the user hovers and the size of the viewport changes, only then will a higher quality image be loaded.</p></li><li><p>By doing this, you will be </p><ol><li><p>loading the website faster</p></li><li><p>offering a better experience </p></li><li><p>Saving the customer's internet data</p></li></ol></li></ol><h1>Conclusion</h1><p>I hope you have learnt how to build performant frontend systems at scale to serve millions of users and maintain consistency.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://solutionsarchitect.substack.com/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[How to transition from frontend to backend development: A complete roadmap.]]></title><description><![CDATA[A step-by-step plan to help you become a full-stack engineer by building and deploying projects along the way.]]></description><link>https://solutionsarchitect.substack.com/p/how-to-transition-from-frontend-to</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/how-to-transition-from-frontend-to</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Mon, 17 Mar 2025 11:03:30 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/5d3418ff-6e27-4809-a4d0-4cd62ab8a2c1_600x600.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You are a front-end developer who wants to learn and build backend systems and become a full-stack developer.</p><p>I am writing a step-by-step guide with topics at each level and projects you should build instead of bombarding you with backend terms and topics.</p><p>By following this guide, you will know the important topics at each stage, such as beginner and medium level, and what projects to build to implement theoretical concepts.</p><blockquote><p>At my job, I have trained tens of interns and transitioned front-end developers into back-end engineers.</p></blockquote><h2>So, how do we do it?</h2><ol><li><p>I will first enlist the topics you need to learn and the subtopics. You can use YT boot camps, courses, and books of your own choice, but I have shared my suggestions at the end.</p></li><li><p>A project with implementation will be mentioned at the beginner and intermediate levels so that you know what to build in the beginning.</p></li><li><p>New and slightly advanced concepts will be introduced gradually so that you can learn those and implement them in existing projects.</p></li></ol><div class="pullquote"><p>Before moving ahead, I assume you are already skilled in JavaScript as a front-end developer.</p></div><h2>Roadmap</h2><p>You first need to learn some basic concepts related to backend development. These concepts will remain the same irrespective of the programming language or framework.</p><h3>General Backend Concepts</h3><ol><li><p>HTTP/HTTPS</p></li><li><p>SSL/TLS Encryption</p></li><li><p>TCP vs UDP</p></li><li><p>How does the server work?</p></li></ol><h3>Overview of APIs</h3><ol><li><p>What are RESTful APIs?</p></li><li><p>CORS</p></li><li><p>HTTP methods.</p></li><li><p>Status codes</p></li><li><p>Idempotency</p></li><li><p>OpenAPI Specification</p></li><li><p>API payload validation</p></li><li><p>API Versioning</p></li></ol><h3>Security</h3><ol><li><p>Concept of Authentication and Authorization</p></li><li><p>OAuth 2.0: overview, what it is, and how it works?</p></li><li><p>JWT: What it is and how it works?</p></li><li><p>Understanding of Session Cookies</p></li><li><p>HTTP-only cookies</p></li><li><p>Encryption</p></li><li><p>Hashing</p></li></ol><p>By now, you have understood some concepts. Now, let&#8217;s move to <strong>Node.js</strong> to get the hands dirty.</p><h3>Why choose Node.js to write the first backend code?</h3><p>As you are already familiar with JavaScript, it will be much easier and convenient to implement the concepts you learn across.</p><p>If another programming language is chosen, it will take you some time to learn the syntax and concepts. So, we will skip all those steps here.</p><h3>Node.js essentials concept</h3><ol><li><p>Basics of Node.js</p></li><li><p>Spinning up a Node.js server</p></li><li><p>Create an API endpoint, send some dummy JSON responses, and call your first API from Postman.</p></li></ol><p>Congratulations. You have achieved something meaningful now. </p><p>Let&#8217;s now move to databases.</p><h3>Database</h3><ol><li><p>Basics of DB, what it is, etc.</p></li><li><p>Pick MongoDB or PostgreSQL and read a little bit about it.</p></li><li><p>Learn concepts of schemas, relationships, unique constraints, indexing, etc.</p></li><li><p>Overview of commands for operations such as insert, update, delete, and get and play with these in the database console.</p></li><li><p>Add the database to your project; add services for CRUD operations.</p></li></ol><h4>Create a basic user management service</h4><p>Now, we will build a minimal user service to implement the authentication and authorization, encryption, and hashing concepts we have learned.</p><ol><li><p>Install JWT in the project.</p></li><li><p>Add an API for creating users and hash passwords and save them in the database.</p></li><li><p>On login, return the JWT.</p></li></ol><p>For read, update, and delete endpoints, create a middleware and verify the JWT.</p><h4>Build a task to-do list project</h4><ol><li><p>Design a DB model/schema for your project without taking help from the internet for objects, at least.</p></li><li><p>Create CRUD endpoints for to-do list items and add them to the database.</p></li><li><p>Implement middleware for payload validation and authorization.</p></li><li><p>Implement sign-up and sign-in support.</p></li></ol><p><strong>Congratulations!</strong> You have built the basic backend of an app that can be integrated with the frontend.</p><p>Before moving ahead, build a lot of APIs using the stuff you have learned so far. Some of the projects are:</p><ol><li><p><strong>URL shortener</strong></p><ol><li><p>CRUD APIs.</p></li><li><p>Dashboard for analytics</p></li></ol></li><li><p><strong>Expense tracker</strong></p></li></ol><p>After building these projects, I hope that you have fully grasped the basic concepts. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://solutionsarchitect.substack.com/subscribe?"><span>Subscribe now</span></a></p><p>Now, we will move ahead and learn some new concepts on top of existing knowledge.</p><h3>APIs</h3><ol><li><p>GraphQL APIs and comparison with RESTful ones.</p></li><li><p>Rate-limiting and throatling-related concepts and implementations</p></li><li><p>Pagination &amp; filtering</p></li><li><p>RBACs: Role-Based Access Controls</p></li></ol><h3>Architectural Patterns</h3><ol><li><p>concurrency, parallelism and Multi-threading</p></li></ol><h3>Caching</h3><ol><li><p>Concepts of caching</p></li><li><p>Strategies such as Cache-Aside, Write-Through, Write-Behind, Read-Through</p></li><li><p>Redis: data structures and their usage</p></li><li><p>Cache eviction strategies</p></li></ol><h3>Database</h3><ol><li><p>ACID properties</p></li><li><p>Transactions</p></li><li><p>Query Optimizations</p></li><li><p>ORMs</p></li></ol><h3>Real-time data </h3><ol><li><p>Server-Sent Events</p></li><li><p>Websockets</p></li><li><p>Polling</p></li><li><p>Webhooks</p></li></ol><h3>Monitoring &amp; Logging</h3><ol><li><p>APM: Overview </p></li><li><p>Monitoring &amp; SLAs: What are 999999s, etc?</p></li><li><p>Explore Sentry and other open-source tools such as Grafana and Prometheus.</p></li></ol><h3>Cloud &amp; Networking</h3><ol><li><p>IP Addressing &amp; Subnetting (IPv4, IPv6) </p></li><li><p>DNS Basics (How domain names resolve) </p></li><li><p>Sockets &amp; Ports (How services communicate)</p></li><li><p>Firewalls &amp; NAT (Basic security and network translation)</p></li><li><p>Network Performance Optimization (Keep-Alive, Pipelining, QUIC)</p></li></ol><h3>Deploying the App</h3><ol><li><p>Overview of CI/CD process</p></li><li><p>Basics of docker</p><ol><li><p>Image creation</p></li><li><p>Running docker container</p></li></ol></li><li><p>Deploying on </p></li></ol><p>Hopefully, you have understood these concepts by now and have practiced a little bit. But now, you will build some projects to implement the concepts.</p><p>By this time, you can add Express/Nest to your project as the Node.js framework.</p><h3>e-commerce store</h3><ol><li><p><strong>Storefront</strong></p><ol><li><p>implement pagination and filtering.</p></li><li><p>introduce OAuth using Google or Facebook Sign-in</p></li><li><p>Add cart and checkout functionality with database transactions and ACID properties.</p></li><li><p>Optimize the listing and get single product API queries.</p></li><li><p>Write a rate-limiting middleware in your app to restrict API usage.</p></li></ol></li><li><p><strong>Store Management</strong></p><ol><li><p>CRUDs for store owners to add products</p></li><li><p>Implement RBAC for different roles, such as admin, read-only, etc.</p></li><li><p>Save randomly fetched data in Redis and with caching strategies as per the use case.</p></li><li><p>Provide support for a merchant to fetch or upload details in CSV files and implement a child thread in Node.js to perform some operations on the files.</p></li></ol></li><li><p>Any e-commerce application use case you can think of.</p></li><li><p>Containerize your app and deploy on Render/Heroku.</p></li></ol><h3>Realtime Chat Application</h3><ol><li><p>Implement websockets for messaging</p></li><li><p>Add JWT or OAuth 2.0 for AuthN/AuthZ.</p></li><li><p>Save messages in Redis.</p></li><li><p>Use Redis for leaderboard analytics for any use case, such as someone who gives instant replies.</p></li><li><p>Containerize your app and deploy on Render/Heroku.</p></li></ol><p>For monitoring and logging, I will suggest sticking with <strong>Sentry,</strong> as it&#8217;s a managed service with a free trial available.</p><p>Congratulations on reaching this point! You have learned and implemented essential concepts of backend development, from security to database to deployment.</p><p>Before moving ahead, I will suggest building the projects and APIs using the tech we have just discussed.</p><p><em>It&#8217;s time to introduce some advanced concepts and patterns.</em></p><h3>Event-driven Approach</h3><ol><li><p>Overview of event-driven approach</p></li><li><p>Understanding of producers and consumers </p></li><li><p>Event Brokers and Queues</p></li><li><p>Architectural approaches</p><ol><li><p>Pub/Sub Model</p></li><li><p>CQRS (Command Query Responsibility Segregation)</p></li></ol></li></ol><p>I suppose that you have been using a service-based approach while calling different sub-services. </p><p>Now, we will replace the synchronous approach with an event-based approach and make these modifications to your project.</p><h4>Replace synchronous flows with an event-based approach in the projects</h4><h4>1. e-commerce</h4><p>There are multiple services in your e-commerce project, such as:</p><ol><li><p>cart</p></li><li><p>products</p></li><li><p>checkout</p></li><li><p>customers</p></li></ol><p>to name a few.</p><p>Here, we will implement a basic consumer/producer pattern.</p><p>When a customer checks out, the events should be pushed to product and customer service to update the inventory and customer purchase history.</p><p>You can implement other use cases, such as payment notifications, abandoned carts, etc.</p><h4>2. URL Shortener</h4><p>You can implement analytics using the event-driven approach that whenever a URL is opened, the user performs some action or closes, you can trigger a notification and show it in analytics.</p><p>By this time, you have got your hands dirty on the surface of most of the things.</p><div class="pullquote"><p>Now, before moving any further, you need to build some more projects around it and implement all that you have learned so far.</p></div><p>Let&#8217;s move to some advanced concepts. I am pretty sure you will be getting these used in actual jobs and production environments with real users.</p><h3>Architectural Styles</h3><ol><li><p>Monolith</p></li><li><p>Modular Monolith</p></li><li><p>Microservices and its patterns</p></li><li><p>Serverless Architectures</p></li></ol><h3>Scalability</h3><ol><li><p>Horizontal vs vertical scaling</p></li><li><p>Loadbalancing: concept, algorithms and tools</p></li><li><p>Database </p><ol><li><p>Sharding</p></li><li><p>Partitioning</p></li><li><p>Replication and related use cases</p></li></ol></li><li><p>CAP Theorem</p></li></ol><h3>Fault Tolerance and High Availability</h3><ol><li><p>Circuit Breaker Patterns</p></li><li><p>Choas Engineering</p></li><li><p>Auto-scaling principles</p></li></ol><h3>Misc. </h3><ol><li><p>gRPC, protobuf</p></li><li><p>Intrusion Detection &amp; Prevention system with SEIM</p></li><li><p>Service Mesh</p></li><li><p>DDoS Mitigation Techniques</p></li></ol><h4>You can build the following projects to implement your learning.</h4><ol><li><p>Notification systems like Instagram and LinkedIn.</p></li><li><p>Real-time trading systems</p></li><li><p>Personalization/Recommendation Engines</p></li><li><p>AI-based chatbots with LLM</p></li></ol><p>Once you have built these projects, you have learned enough of the backend concepts to think and build something on your own.</p><p>Although these will be some basic projects, they will help you to transition to backend projects easily.</p><h2>When should I learn a new language?</h2><p>Once you have mastered these concepts using Node.js and built projects, then you can transition to Python or preferably Golang.</p><h3>Courses and tutorials I recommend:</h3><ol><li><p><a href="https://www.udemy.com/course/nodejs-the-complete-guide/?couponCode=ST11MT170325G1">NodeJS - The Complete Guide (MVC, REST APIs, GraphQL, Deno)</a></p></li><li><p><a href="https://www.udemy.com/course/understanding-nodejs-core-concepts/">Understanding Node.js: Core Concepts</a></p></li><li><p><a href="https://www.udemy.com/course/fundamentals-of-backend-communications-and-protocols/?couponCode=ST11MT170325G1">Fundamentals of Backend Engineering</a></p></li><li><p><a href="https://www.nodejsdesignpatterns.com/">Node.js Design Patterns</a></p></li></ol><p>Cheers!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Software Visualized! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Docker Internals Visualized I: Docker Build process]]></title><description><![CDATA[What happens when you enter the docker buld command. Let's learn visually.]]></description><link>https://solutionsarchitect.substack.com/p/docker-internals-visualized-i-docker</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/docker-internals-visualized-i-docker</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Mon, 13 May 2024 14:01:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!bGAF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8377265-ec78-42f1-8212-400f0be12880_1920x1080.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>Welcome to the 30 new followers who have subscribed since last week. </p></blockquote><p>We all know what Docker is and why it is used. As part of my Docker Internal Visualized series, we will learn how Docker works internally.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bGAF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8377265-ec78-42f1-8212-400f0be12880_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bGAF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8377265-ec78-42f1-8212-400f0be12880_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!bGAF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8377265-ec78-42f1-8212-400f0be12880_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!bGAF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8377265-ec78-42f1-8212-400f0be12880_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!bGAF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8377265-ec78-42f1-8212-400f0be12880_1920x1080.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bGAF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8377265-ec78-42f1-8212-400f0be12880_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e8377265-ec78-42f1-8212-400f0be12880_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:680107,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bGAF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8377265-ec78-42f1-8212-400f0be12880_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!bGAF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8377265-ec78-42f1-8212-400f0be12880_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!bGAF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8377265-ec78-42f1-8212-400f0be12880_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!bGAF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8377265-ec78-42f1-8212-400f0be12880_1920x1080.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In the first part, we will explore how the Docker build process works internally, from image creation to layer creation.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Software Visualized! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2>1. Docker Build Command</h2><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;36cd7a4f-f374-425c-8d09-a9e452129f1d&quot;,&quot;duration&quot;:null}"></div><pre><code>docker build -t node-express .</code></pre><p>This command creates a Docker image for a project using a Docker file.</p><p>Let&#8217;s break down this command.</p><h4>1. docker build </h4><p>Here, docker build informs the Docker client that you want to build an image.</p><h4>2. -t &#127991;&#65039;</h4><p><strong>-t </strong>refers to adding a tag to the image after it is created in the <strong>name:tag </strong>format. If no tag is specified, it will add the <strong>latest </strong>tag. </p><h4>3. node-express</h4><p>This refers to the name to be assigned to the image being built. It helps out later in identifying images by readable names.</p><h4><strong>4. &#8220;.&#8221;</strong></h4><p>The dot added at the end specifies the build context. When &#8220;<strong>.</strong>&#8221; is added, it refers to the current directory used as the build context.</p><pre><code>.
&#9500;&#9472;&#9472; index.ts
&#9500;&#9472;&#9472; src/
&#9500;&#9472;&#9472; Dockerfile
&#9500;&#9472;&#9472; package.json
&#9492;&#9472;&#9472; package-lock.json</code></pre><h5>Build context </h5><p>The build context is just a set of files at a location that Docker will use to build. These files can be the project files against which the Docker daemon will create a build.</p><h2>2. Docker client creating TAR file</h2><p>After the docker build command gets entered, the Docker client comes into play.</p><p>It copies the build context files excluding those mentioned in <strong>.dockerignore</strong> and converts those into a TAR file.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;9cdf4f33-0b98-47a0-96bc-8af1241f9975&quot;,&quot;duration&quot;:null}"></div><p>The build time depends upon the size of the files inside the directory and it is essential to add unnecessary files in <strong>.dockerignore</strong>.</p><h2>3. Docker Daemon (Dockerd) process TAR file</h2><p>Docker client is a user-friendly interface to communicate with Docker Daemon via REST-API call. </p><p>When the docker build command is executed, under the hood, the Docker client sends the TAR file to Dockerd via an internal REST API call.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;5e913095-eb52-4194-bb1b-a28b4315626f&quot;,&quot;duration&quot;:null}"></div><p>The Dockerd then unpacks, parses and loads the TAR file for executing each instruction one-by-one as per the <strong>Dockerfile </strong>and building the required Docker image.</p><h2>4. Docker Filesystem and hash</h2><p>Before moving further, it is important to understand how a docker image is internally built up.</p><p>Docker images are layers of files. Each layer represents a set of file changes. Each instruction in the Dockerfile such as <strong>FROM</strong>, <strong>WORKDIR</strong>, etc creates a layer after modifying the filesystem.</p><p>Each layer is created once and can be shared across multiple images.</p><p>Docker creates these layers because they are:</p><ol><li><p>Immutable once created.</p></li><li><p>Reusable across different builds and efficient storage management. </p></li></ol><h4>Layers Stacking</h4><ol><li><p><strong>FROM</strong> instruction creates a base layer and all other layers are built on top of it.</p></li><li><p>The subsequent instructions create and stack layers in the same order as defined in the Dockerfile.</p></li></ol><h4><strong>Docker File Layer Hashing</strong></h4><p>When a new layer is created, Docker attaches a checksum <strong>SHA-256 hash</strong>. The hash is generated using metadata and file content internally by Docker itself.</p><p>It helps </p><ol><li><p>uniquely identify layers, </p></li><li><p>securing from tempering because if some file changes the Docker will create a new hash and that image will not exploited.</p></li><li><p>verification</p></li><li><p>caching and improving latency and efficiency</p></li></ol><p>We will discuss these concepts with examples ahead.</p><p><strong>Note:</strong> In the animations, the base layer is on top and the following layers are below it, which is a visual representation mistake and the correct one will be updated in the next part of the series.</p><h2>5. Dockerfile execution in Dockerd</h2><ol><li><p><strong>FROM node:18-alpine</strong></p></li></ol><p>As discussed above, Docker Engine will first check the layered file on the local machine and if it doesn&#8217;t match any layer, it will </p><ul><li><p>pull an image from DockerHub </p></li><li><p>create a new layer</p></li><li><p>attach a SHA-256 hash to it.</p></li></ul><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;373ec0eb-8846-4d0f-bdd0-73c2f5f29792&quot;,&quot;duration&quot;:null}"></div><ol start="2"><li><p><strong>Loading Build Context</strong></p></li></ol><p>The Docker will load the Build Context inside the execution context because the image will be created against these files.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;c7d1cef6-86cd-4be1-84a0-6d6ed8bc4f76&quot;,&quot;duration&quot;:null}"></div><ol start="3"><li><p><strong>WORKDIR /app</strong></p></li></ol><p>The <strong>WORKDIR </strong>command specifies the working directory to execute its subsequent instructions such as <strong>COPY</strong>, <strong>RUN</strong>, <strong>CMD</strong>, <strong>ADD</strong>, <strong>ENTRYPOINT</strong>, etc.</p><p>If the directory doesn&#8217;t exist, Docker will create this directory and all subsequent relative paths will be on top of this directory.</p><p>If this path is not specified, the Docker sets it at &#8220;<strong>/</strong>&#8221; by default.</p><p>The layer created at this step is very minimal and is <strong>empty</strong> and mainly modifies the metadata of the image. However, it is important to understand that the layer while not adding up to the storage, is effective for leveraging cached layers</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;518c6e23-724b-4d71-8817-89c7d5384cc3&quot;,&quot;duration&quot;:null}"></div><ol start="4"><li><p><strong>COPY . .</strong></p></li></ol><p>This command will copy files from the current directory which are usually in the current directory to the previously defined WORKDIR, /app in this case.</p><p>With this command, all files in the build context are copied to the <strong>/app </strong>or whatever directory specified.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;567c021d-4740-4e14-ab9a-a296f9b2644c&quot;,&quot;duration&quot;:null}"></div><ol start="5"><li><p><strong>yarn install</strong></p></li></ol><p>It will simply run the command &#8220;<strong>yarn install</strong>&#8221; inside the <strong>/app </strong>directory where the project files are copied. It will also create a succeeding layer when the yarn install is successful.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;037a7671-5daa-4729-9967-fb25043ca75a&quot;,&quot;duration&quot;:null}"></div><ol start="6"><li><p><strong>CMD &amp; EXPOSE</strong></p></li></ol><p><strong>CMD</strong> instruction will set the command, you want to run when the container of this image will run. Similarly, <strong>EXPOSE</strong> exposes the port to connect with the container.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;3223e454-33d5-40bc-902d-a6e0e00b6a91&quot;,&quot;duration&quot;:null}"></div><p>Here, the CMD and EXPOSE are empty layers similar to WORKDIR.</p><p>At this step our Docker image is ready.</p><h2>6. Docker Image Layers</h2><p>Let&#8217;s discuss Docker image layers.</p><p>To analyze Docker layers, you can run this command:</p><pre><code>$ sudo docker history image-id</code></pre><p>It will enlist all filesystem layers of the image.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;fda2d331-f60f-4dce-97b9-0cd4edd345bd&quot;,&quot;duration&quot;:null}"></div><p>As evident each layer represents a corresponding command in Dockerfile. Some add up to storage and others modify metadata.</p><p>Docker instructions such as <strong>WORKDIR</strong>, <strong>EXPOSE</strong>, and <strong>CMD</strong>, don&#8217;t add up to storage and modify the underlying image metadata.</p><p>All of the layers are stacked according to the instructions.</p><p>If a Dockerfile with the same instructions is used, the image will be created from cached layers including the base image pulled from Dockerhub.</p><p>In the next part of the series, we will explore Docker Caching and Invalidation in-depth with multiple use cases such as copy-on-write.</p><p>If you liked this post, please like, subscribe and restack.</p><p>Cheers.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Software Visualized! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Node.js Visualized: Exploring Blocking, Non-blocking and Async]]></title><description><![CDATA[Let's learn the difference between blocking, non-blocking, and async in Node.]]></description><link>https://solutionsarchitect.substack.com/p/nodejs-visualized-exploring-blocking</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/nodejs-visualized-exploring-blocking</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Mon, 06 May 2024 14:52:42 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KI2H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfebb6c4-5dc9-488d-b1ed-a04960f589b4_1920x1080.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_!KI2H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfebb6c4-5dc9-488d-b1ed-a04960f589b4_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KI2H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfebb6c4-5dc9-488d-b1ed-a04960f589b4_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!KI2H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfebb6c4-5dc9-488d-b1ed-a04960f589b4_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!KI2H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfebb6c4-5dc9-488d-b1ed-a04960f589b4_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!KI2H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfebb6c4-5dc9-488d-b1ed-a04960f589b4_1920x1080.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KI2H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfebb6c4-5dc9-488d-b1ed-a04960f589b4_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bfebb6c4-5dc9-488d-b1ed-a04960f589b4_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:767979,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KI2H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfebb6c4-5dc9-488d-b1ed-a04960f589b4_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!KI2H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfebb6c4-5dc9-488d-b1ed-a04960f589b4_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!KI2H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfebb6c4-5dc9-488d-b1ed-a04960f589b4_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!KI2H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfebb6c4-5dc9-488d-b1ed-a04960f589b4_1920x1080.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Blocking vs Non-blocking vs Async in Node.js</figcaption></figure></div><p>While working with Node.js, you might have read about the terms blocking, non-blocking, and async.</p><p>These are part of the core foundational concepts of Node.js and refer to how Node.js, in practice, performs actions without blocking the main thread at scale.</p><p>In this article, we will start by exploring the terms blocking, non-blocking, and async, and later how they differentiate in Node.js.</p><p>As Node.js main process is single-threaded, these concepts are very important to understand I/O and concurrent operations.</p><h1>Blocking I/O</h1><p>In traditional I/O blocking programming, the I/O request will block the main thread execution until that request is completed.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;04d871e3-9d78-4d98-8974-9e243270b0e9&quot;,&quot;duration&quot;:null}"></div><blockquote><p>In Node.js,<strong> Blocking</strong> refers to when JavaScript code can't be executed by the main process until a non-JS operation is completed.</p></blockquote><p>It is important to understand here that the term <strong>blocking</strong> in Node refers to the <strong>execution of non-JS operations</strong> that will <strong>prevent JS code execution</strong></p><p>Some blocking methods in Node.js are </p><ol><li><p>Synchronous Libuv methods</p></li><li><p>Library&#8217;s methods, starting with sync</p></li><li><p>syncReadFile()</p></li></ol><pre><code>const fs = require('node:fs');
const data = fs.readFileSync('/file.md');</code></pre><p>readFileSync() is a blocking method.</p><p><em>A CPU-intensive task can block the main thread too, but in Node.js terms, that is not referred to as "blocking." But that does indeed "block" the main thread</em></p><h4>What happens when the main thread is blocked?</h4><ol><li><p>The JavaScript code inside the app can&#8217;t be executed.  The JS code can be anything from async operations to timeouts, loops, etc.</p></li><li><p>As a result, the execution will come to a halt unless the sync operation is completed and unblocks the main process.</p></li></ol><h4>What operations can be done with the blocked main process?</h4><p>Although the main thread is blocked, the OS will continue to perform its actions, such as queuing incoming calls, until the main thread is blocked, as visualized below.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;a375e1b4-0bd0-422c-9253-6ce9594f0f2f&quot;,&quot;duration&quot;:null}"></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://solutionsarchitect.substack.com/subscribe?"><span>Subscribe now</span></a></p><h1>Non-Blocking I/O</h1><p>The concept of non-blocking I/O is independent of Node.js, and we will discuss it generally and from a Node.js perspective.</p><h4>Concept</h4><ol><li><p>Non-blocking I/O is simply an I/O operation that <strong>doesn&#8217;t block the main thread</strong> and waits for the I/O operation to complete.</p></li><li><p>Non-blocking refers to the behaviour of system calls that <strong>return immediately</strong> without waiting for the operation to complete. If the requested action cannot be completed immediately, the call will return an error or another indicator, rather than blocking the execution. The next operation in the call stack will execute.</p></li><li><p>It doesn&#8217;t block the main thread while waiting for I/O calls.</p></li><li><p>In traditional non-blocking systems, the caller usually <strong>polls</strong> to check the status of the non-blocking operation.</p></li></ol><p>This concept is the inception of the event loop and event-driven architecture and supports concurrency, callbacks, and promises in a single thread.</p><p>Modern operating systems provide the underlying support required to build non-blocking operations. To make a system, implement the non-blocking approach; usually, system- and OS-level methods and APIs, such as file descriptors, epoll, etc., are used. Its implementation will be discussed in another post.</p><h4>Approaches toward building non-blocking I/O</h4><p>In traditional systems, a new thread is spawned when one is blocked and performs actions for other users. However, this approach is not an optimized solution.</p><ol><li><p><strong>Creating new threads</strong> each time is expensive as it consumes memory and is difficult to manage due to race conditions, sharing memory, etc.</p><ol><li><p>It&#8217;s not scalable, and as the number of concurrent users increases, the server can&#8217;t handle enough requests at a time.</p></li><li><p>So creating multiple threads for multiple users is not scalable. </p></li></ol></li><li><p>The solution here is to allow <strong>concurrency on a single thread</strong>.</p><ol><li><p>The OS provides an underlying architecture that implements an event loop to allow thousands of concurrent connections on a single thread. I will discuss this in-depth in another post in the upcoming weeks.</p></li></ol></li></ol><p>But now here arise two questions:</p><h5>1. Aren&#8217;t child threads created in Node.js using child processes?</h5><p>Node.js supports creating child threads, which are usually created when CPU-intensive tasks can&#8217;t be performed without blocking the main thread. To overcome this, child threads are initiated.</p><h5>2. Node.js itself has a worker pool with four threads </h5><p>It&#8217;s true. But those are entirely managed by the Libuv Library, which manages some blocking I/O operations away from the main thread and ensures the main process is always available to execute the app&#8217;s code.</p><h3>Non-blocking in Node.js</h3><p>"Non-blocking" refers to the behaviour of certain operations (typically I/O) that do not stop the execution of JavaScript code while waiting for something to complete.</p><p>Node.js follows a <strong>non-blocking I/O model powered by Libuv and Event Loop</strong> to enable this behaviour in Node.js</p><blockquote><p>As opposed to blocking, non-blocking refers to the behaviour of such an operation which doesn&#8217;t block the main thread or execution of JavaScript. </p></blockquote><p>Non-blocking usually refers specifically to I/O operations that do not block execution.</p><p>Although non-blocking is a language-agnostic phenomenon, a few built-in APIs, such as <code>fs.readFile(), http.get()</code> are called non-blocking APIs.</p><h5>How does Node.js handle non-blocking I/O?</h5><ol><li><p>The Node.js Libuv engine manages non-blocking I/O operations by offloading them to workerpool threads. </p></li><li><p>When the worker pool thread is done, it will notify the main event loop and register its callback function.</p><div class="pullquote"><p><em>It is important to understand that the worker pool thread, unblocking the main thread, will be blocked until it finishes the I/O.</em></p></div></li></ol><pre><code>const fs = require('fs');

fs.readFile('/path/to/file', (err, data) =&gt; {
    if (err) throw err;
    console.log(data);
});

console.log('File read operation started');</code></pre><p>This example above is one of the most quoted non-blocking APIs in Node.js. The flow of how it gets executed is visualized below.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;3baaa74f-6104-4c87-ad76-5e8d621dd671&quot;,&quot;duration&quot;:null}"></div><h1>Async</h1><ol><li><p>Async operations enable a program to initiate a task and then move on to other tasks before the first one is completed. </p></li><li><p>Async tasks are performed in a non-linear and non-sequential manner.</p></li><li><p>When the async task completes, it notifies the main program using mechanisms like <strong>promises</strong> or <strong>callbacks, </strong>but the under-the-hood task queue and event loop do the work.</p></li></ol><p>The non-blocking paradigm enables support for async by building up an event loop that follows an event-driven approach, and the callbacks and promises perform the intended actions.</p><p>In Node.js, it&#8217;s managed through an event loop, which manages and controls the execution of all asynchronous callbacks and events.</p><h3>Using both Async and Non-blocking I/O in one operation</h3><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;a869635b-cbf7-4b1b-b9c0-dd23433f4d4c&quot;,&quot;duration&quot;:null}"></div><p>In this visual of combining async and non-blocking operations, we visulized the flow. and their relationship.</p><ol><li><p>As soon as readFile is executed, it&#8217;s offloaded to the Libuv workerpool thread. So, this is an example of a non-blocking I/O.</p><ol><li><p>In the Node.js world, this is now non-blocking.</p></li><li><p>The Libuv thread executing readFile() is now blocked for other non-blocking I/O.</p></li></ol></li><li><p>The console.log() on the very next line gets executed.</p></li><li><p>Similarly, both setTimeout() gets executed and are added to the Libuv timer.</p></li><li><p>While the non-blocking fs.readFile() is in progress, the first timer is reached, and its callback gets executed.</p></li><li><p>Meanwhile, the fs.readFile() operation is completed, and it notifies the main thread, and it&#8217;s callback gets registered to the task queue and later executed in the call stack.</p></li><li><p>And in the end, the last timer gets executed.</p></li></ol><p>Here, it is evident that Node.js complements both async and non-blocking seamlessly.</p><h2>How do you differentiate between non-blocking and async?</h2><p>Both terms are used in Node.js, and they both contribute to making Node.js do I/Os and operations without making threads irresponsive.</p><ol><li><p>Non-blocking specifically describes I/O operations that don&#8217;t block the main thread, while asynchronous is a general programming paradigm.</p></li><li><p>Non-blocking is typically implemented by Node.js runtime to perform I/O but async can be done via callback, promises, etc.</p></li><li><p>Non-blocking I/O can be implemented without async, like fs.readFile(), but without underlying support for non-blocking, async won&#8217;t work.</p></li><li><p>Non-blocking I/O responds immediately if data is available and status or error if it is not available. In async, it is not expected to respond immediately but performs actions as per callbacks and promises.</p></li><li><p>Continuous polling checks the status of non-blocking I/O, but that&#8217;s not the case when using async. However, Node.js doesn&#8217;t follow this approach of polling.</p><p> </p></li></ol><h4>Benefits of using non-blocking &amp; Async</h4><ol><li><p>It improves responsiveness as multiple tasks can be handled now.</p></li><li><p>Improved scalability.</p></li><li><p>Optimized resource usage and less CPU cycles wasted.</p></li></ol><h2>Conclusion</h2><p>So, we learned the concepts of blocking, non-blocking, and async, with a special preference for non-blocking and async.</p><p>Thanks for reading.</p><p>Let&#8217;s connect on <a href="https://www.linkedin.com/in/thealiraza/">LinkedIn</a></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Software Visualized! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Secure your JWTs on client-side]]></title><description><![CDATA[JWTs are often used for authentication, stored on the client side, and sent with server-side calls. In this post, we will discuss how to secure those as a pro.]]></description><link>https://solutionsarchitect.substack.com/p/secure-your-jwts-on-client-side</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/secure-your-jwts-on-client-side</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Sun, 28 Jan 2024 11:24:08 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!nHbo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4c3b535-d984-4a82-9ba6-55ccb1ed7b72_1200x1200.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_!nHbo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4c3b535-d984-4a82-9ba6-55ccb1ed7b72_1200x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nHbo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4c3b535-d984-4a82-9ba6-55ccb1ed7b72_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!nHbo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4c3b535-d984-4a82-9ba6-55ccb1ed7b72_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!nHbo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4c3b535-d984-4a82-9ba6-55ccb1ed7b72_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!nHbo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4c3b535-d984-4a82-9ba6-55ccb1ed7b72_1200x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nHbo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4c3b535-d984-4a82-9ba6-55ccb1ed7b72_1200x1200.png" width="1200" height="1200" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c4c3b535-d984-4a82-9ba6-55ccb1ed7b72_1200x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1200,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:744460,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nHbo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4c3b535-d984-4a82-9ba6-55ccb1ed7b72_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!nHbo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4c3b535-d984-4a82-9ba6-55ccb1ed7b72_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!nHbo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4c3b535-d984-4a82-9ba6-55ccb1ed7b72_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!nHbo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4c3b535-d984-4a82-9ba6-55ccb1ed7b72_1200x1200.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Hello,</p><blockquote><p><em>I couldn&#8217;t publish because I have been building Stripe&#8217;s Link-like service for my payment gateway, XPay, single-handedly. It was a great learning experience, from frontend to backend to security. I will be sharing a ton of content in the coming weeks.</em></p></blockquote><p>In this blog, we will discuss why you should never save JWTs via client-side code.<br><br>If you have implemented JWT on your app, then you need to protect and store it safely on the client side.<br><br>If JWTs are not saved securely, they might be exposed to malicious actors.<br><br>Let's secure the JWTs and other sensitive data.<br><br>You need to send a cookie from the server-side header response instead of saving it on the client side with the following attributes:<br><br><code>Set-Cookie: accessToken=; Domain=abc.xyz.com; Path=/api/gateway; Secure; HttpOnly; Expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict</code><br><br><br><strong>1. HTTP-only cookie:</strong> Always send JWTs via response cookies with an HTTP-only property. It prevents JS scripts from accessing the token, hence XSS attacks.<br><br><strong>2. secure:</strong> It will ensure that cookies are sent over HTTPS only.<br><br><strong>3. domain:</strong> by specifying the domain, you can ensure that the cookie can only be sent to that server.<br><br><strong>4. SameSite: strict:</strong> A cookie that has this property set will prevent browsers from sending it in cross-site requests. Put simply, this implies that the request will not contain the cookie if the target site does not match the one that is now displayed in the browser's address bar.<br><br><strong>5. path:</strong> To further restrict access to the JWT cookie within a server, the path can be specified.<br><br><strong>6. expires:</strong> You can explicitly provide an expiration time, and the cookie will expire by then.<br><br>By implementing these measures, most of the client-side attacks will be mitigated, and your JWTs and other protected data to be stored on the client side will be protected.<br><br>Having said that, if there are other vulnerabilities on sibling servers or domains, handle cookies in an unsecured way.</p><p>In the next newsletter, we will discuss when JWTs are useful and when sessions are superior.</p><p>Stay tuned!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Zero To Architect! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[How does NPM ensure the security of installed packages?]]></title><description><![CDATA[Let's learn how npm packages are secured during and after installation.]]></description><link>https://solutionsarchitect.substack.com/p/how-does-npm-ensure-the-security</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/how-does-npm-ensure-the-security</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Sun, 12 Nov 2023 10:38:05 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!zMlD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e635c1f-3b54-4acf-9062-0a1490ae6e70_800x800.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_!zMlD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e635c1f-3b54-4acf-9062-0a1490ae6e70_800x800.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zMlD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e635c1f-3b54-4acf-9062-0a1490ae6e70_800x800.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zMlD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e635c1f-3b54-4acf-9062-0a1490ae6e70_800x800.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zMlD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e635c1f-3b54-4acf-9062-0a1490ae6e70_800x800.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zMlD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e635c1f-3b54-4acf-9062-0a1490ae6e70_800x800.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zMlD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e635c1f-3b54-4acf-9062-0a1490ae6e70_800x800.jpeg" width="800" height="800" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7e635c1f-3b54-4acf-9062-0a1490ae6e70_800x800.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:800,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:46021,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zMlD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e635c1f-3b54-4acf-9062-0a1490ae6e70_800x800.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zMlD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e635c1f-3b54-4acf-9062-0a1490ae6e70_800x800.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zMlD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e635c1f-3b54-4acf-9062-0a1490ae6e70_800x800.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zMlD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e635c1f-3b54-4acf-9062-0a1490ae6e70_800x800.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>We are all used to installing NPM packages for React, Express, and other Node.js-based projects.<br><br>However, it is important to know how NPM secures the packages installed so that no tempered package can be installed in the codebase. I learned about these concepts when publishing internal npm packages for my company.<br><br>NPM uses these approaches:<br><br><strong>1. Signing the package:</strong><br>A package's validity is verified cryptographically when it is published to the NPM registry and signed with the author's private key. <br><br>To confirm that the package has not been tampered with during installation, npm checks the signature against the author's public key.<br><br><strong>2. Integrity hash in package-lock.json file:</strong><br><br>Each package has its own "integrity" field in the "package-lock.json" file. The package's contents, including any required dependencies, their respective versions, and the SHA-512 hash, are hashed and stored in this field.<br><br>Each time you use the "npm install" command to update your project, npm will check the integrity hash of each package and its dependencies against the one saved in the "package-lock.json" file.<br><br>If the hashes are the same, the package has not been tampered with, and the installation can continue. If the hashes don't match, npm won't install the package since it thinks it's fake.<br><br><strong>3. Scanning for vulnerabilities:</strong><br><br>NPM's "npm audit" tool examines the currently installed packages for known security flaws and suggests solutions. This aids in making sure the packages being used have no known security flaws.<br><br>There are other recommended approaches, but these three are widely used.<br><br>Thanks for reading.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://solutionsarchitect.substack.com/subscribe?"><span>Subscribe now</span></a></p><p><br></p>]]></content:encoded></item><item><title><![CDATA[How to thrive as a software engineer?]]></title><description><![CDATA[Learn how to not be a miserable engineer but thrive at your work and craft.]]></description><link>https://solutionsarchitect.substack.com/p/how-to-thrive-as-a-software-engineer</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/how-to-thrive-as-a-software-engineer</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Sun, 15 Oct 2023 14:48:05 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!l1tq!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477630a8-41b2-49be-adc5-ddc266f1c040_1080x1080.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You obviously want to thrive as a software engineer.</p><h3><strong>1. Don&#8217;t write only code</strong></h3><p>If you are just focused on writing endless lines of code without giving a thought to a few things, you are setting yourself on a path of coding monkey and won&#8217;t reach higher positions such as lead, architect, staff engineer, etc.</p><ol><li><p>Software engineering is more than just writing code.</p></li><li><p>When you get good experience in a specific domain, you need to start mentoring the juniors.</p></li><li><p>You need to start leading the projects or features related to that domain.</p></li></ol><p>It will elevate your worth in the company and help you reach higher positions.</p><h3>2. Clean Code Practices</h3><p>This is often overlooked by software engineers, especially at junior levels, who are more eager to ship code, usually at early-stage startups.</p><p>Velocity is indeed required, but if done at the cost of coding practices and scalability, it will impede progress in the long term.</p><p>As a software engineer, you need to explain to your manager the impact of not hurrying and instead taking time to write the best code to make sure nothing crashes in production.</p><h3>3. Following Test-Driven-Development</h3><p>Often, TDD is missed at the cost of ensuring the stability of the codebase for faster shipping of the features.</p><p>Though it may look like you are delivering faster, in fact, you're just one step away from a surprise production crash.</p><p>If the code follows proper unit and integration testing and is written following TDD principles, it will stabilize the app; no surprise changes will break your app.</p><p>It&#8217;s better to test yourself than customers doing it.</p><h3>4. Understand Performance Optimization</h3><p>Irrespective of your tech stack, you need to master the principles of optimizing application performance.</p><p>To start with coding, there are generally established, optimized, and faster practices and methods in all programming languages. So, you need to follow that path. Most of the time, the fancy solution you use is not required.</p><p>Let&#8217;s say you are a front-end developer. You need to learn about </p><ol><li><p>Web Vitals, </p></li><li><p>how the browser works and renders pages, </p></li><li><p>What are the best practices to secure things at the front end?</p></li><li><p>How to serve static assets via CDN?</p></li><li><p>What is the best way to deploy the app?</p></li><li><p>How JavaScript thread execution takes place</p></li></ol><p>Similarly, as a backend developer, you need to learn</p><ol><li><p>Correct status codes and messages</p></li><li><p>Understanding the databses.</p></li><li><p>Caching and reducing latency of APIs</p></li><li><p>Decreasing the number of round APIs</p></li><li><p>Understanding the networking side of APIs</p></li><li><p>Load balancing, etc</p></li></ol><p>Learning and implementing these concepts will upgrade your game as a software engineer.</p><h3>5. Don&#8217;t follow the approach of one programming language to another</h3><p>I have often seen Python developers just using let everywhere without giving a thought to whether that is actually required or "const" can be used as well. To me, it indicates a junior-level developer. As a pragmatic developer, you should learn syntax, why it should be used, and do accordingly to write better code.</p><h3>6. Learn about the architecture and system designs of the established products</h3><p>Software engineering is always changing, and big companies are always putting in and experimenting with new tech. You need to follow and learn from them. It will upgrade your level as a solution-oriented engineer who can help solve problems.</p><p></p><p>These are some of the pieces of advice that I can give to someone willing to thrive at the job.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Zero To Architect! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Source Map 101: Your app's source code can be revealed]]></title><description><![CDATA[Browser's source contains the source code of your application. Though the source code will be always downloaded, but with a few steps you can avoid exposing the source code.]]></description><link>https://solutionsarchitect.substack.com/p/source-map-101-your-apps-source-code</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/source-map-101-your-apps-source-code</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Sun, 08 Oct 2023 15:56:13 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!l1tq!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477630a8-41b2-49be-adc5-ddc266f1c040_1080x1080.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>What could be a developer's worst nightmare than having their app's source code exposed? If you are a front-end developer, you should be more concerned, as there are various ways your app&#8217;s source code will be exposed and one of the most overlooked ways is &#8220;source mapping."</p><h1><strong>What is a source map?</strong></h1><p>A source map is a file that maps a file&#8217;s original source code (such as a JavaScript file) to its generated version (such as code that has been compiled and minified).</p><p>The source map file has the names of the files, the line numbers, and a map of the code that has been compiled from the original source code. By displaying the original source code, the source map assists developers in troubleshooting built programs.</p><p>Web developers use source mapping to translate, shrink, and bundle JavaScript code to make websites run faster, but this makes it harder to find bugs. Source mapping can help debug and create CSS, graphics, and other programs.</p><h1><strong>Is a source map necessary?</strong></h1><p>Source maps are important because they let developers troubleshoot their original source code while working with the generated version. This makes the code easier to read and understand.</p><p>Source maps let you connect the original source code to the code that was made, which solves the problem. When a developer is debugging compiled code, they can use the source map to view the original source code, which makes it easier to identify and resolve errors.</p><p>Source maps also let developers debug code on a live website or app. They can use the browser's developer tools to look at the original source code and set breakpoints, just like they would when developing locally.</p><h1><strong>Source map and security implications</strong></h1><p>A source map is obviously helpful for debugging, but it also raises security concerns. It can expose a program&#8217;s or website&#8217;s original source code, which may reveal things like passwords or private data.</p><ol><li><p>The information included in a file&#8217;s source code, such as passwords or other secrets, could be exposed if a source map were to be used to read the file.</p></li><li><p>An attacker who is hunting for vulnerabilities may find source maps helpful because they show the structure and organization of the software.</p></li><li><p>A misconfigured source map could expose the original source code to attackers or harmful third parties.</p></li><li><p>When an attacker obtains a source map, they can use it to reconstruct the original programs, which could lead to the discovery of security flaws or other private details.</p></li><li><p>With the help of source maps, attackers can insert malicious code into legitimate files, potentially granting them execution privileges on the victim&#8217;s computer.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Zero To Architect! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div></li></ol><h4><strong>How to not generate a source map in production?</strong></h4><p>The process for avoiding the creation of a source map during the building and compiling of your code will vary depending on the tool or framework you employ. Some instances are as follows:</p><pre><code>// Webpack
module.exports = {
  devtool: 'none',
  // ...
};</code></pre><pre><code>// Babel
babel --sourceMaps false script.js</code></pre><pre><code>//typescript
{
    "compilerOptions": {
        "sourceMap": false,
        //...
    },
    //...
}</code></pre><pre><code>//Rollup
export default {
  input: 'src/index.js',
  output: {
    file: 'dist/bundle.js',
    format: 'cjs',
    sourcemap: false
  }
};</code></pre><h4><strong>How to generate a source map for a React application?</strong></h4><ol><li><p>Set &#8220;GENERATE SOURCEMAP=false&#8221; in your .env<strong> file</strong> in the root of your project directory.</p></li></ol><p>2. Change the React scripts command</p><pre><code>// package.json
"build": "GENERATE_SOURCEMAP=false react-scripts build"</code></pre><p>3. You can use the webpack configuration as discussed above.</p><h1><strong>Is there a way to save source maps securely and access them?</strong></h1><p>Source maps can be protected against unauthorized access and disclosure of important data by being stored in external, password-protected files.</p><p>Following these instructions will allow you to securely store your source maps in external files:</p><ol><li><p>Take advantage of a build tool that gives you control over where the source map file is written. The dev tool option in Webpack, for instance, lets you set where the source map file is written.</p></li><li><p>Protect the original map file by uploading it to a file hosting service that offers encryption. The source map file, for instance, can have its rights restricted using AWS S3 so that only certain people can access it.</p></li><li><p>Use an authorization tool to limit who can access the source map file, such as JSON Web Tokens (JWT).</p></li><li><p>Utilize Content Security Policy (CSP): CSP is a security feature that aids in detecting and mitigating specific attacks, such as Cross-Site Scripting (XSS) and data injection attacks. It can be used to restrict who can access the source map file by specifying which sources are authorized to load content in the browser.</p></li></ol><p>It&#8217;s worth noting that these measures can aid in securing the source map file, but cannot ensure the entire security of the source code. Reviewing the codebase and expunging private details is a recommended best practice.</p><h1><strong>How to debug your code without a source map?</strong></h1><ol><li><p><strong>Pretty-print the code:</strong> Some minifiers and transpilers include white spaces and comments to make the code more legible. This simplifies code comprehension and debugging.</p></li><li><p><strong>Set breakpoints and step through code with a debugger:</strong> Many recent browsers feature built-in developer tools. The debugger can help you comprehend the code flow and find bugs even if it&#8217;s not as readable as the original source code.</p></li><li><p><strong>Use a decompiler: </strong>A decompiler can turn compiled code into readable code. The resulting code may be simpler to comprehend and troubleshoot.</p></li><li><p>Knowing the code structure may help you understand it without a source map. Even if the code is minified, you may be able to discover and debug a method that handles a feature.</p></li><li><p><strong>Logging:</strong> Use console.log commands to output variable values to understand the code flow and discover faults.</p></li></ol><p>Thanks for reading. </p>]]></content:encoded></item><item><title><![CDATA[Improve code quality and security with static Code Analysis]]></title><description><![CDATA[Using Static Code Analysis tools can help improve code quality and security drastically. Let's learn how as a developer or engineering lead you can ensure clean and secure code during development.]]></description><link>https://solutionsarchitect.substack.com/p/improve-code-quality-and-security</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/improve-code-quality-and-security</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Sun, 01 Oct 2023 13:11:51 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!0-SP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00252a5a-858e-4377-b26e-c7c18ebd4480_1456x1048.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_!0-SP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00252a5a-858e-4377-b26e-c7c18ebd4480_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0-SP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00252a5a-858e-4377-b26e-c7c18ebd4480_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!0-SP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00252a5a-858e-4377-b26e-c7c18ebd4480_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!0-SP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00252a5a-858e-4377-b26e-c7c18ebd4480_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!0-SP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00252a5a-858e-4377-b26e-c7c18ebd4480_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0-SP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00252a5a-858e-4377-b26e-c7c18ebd4480_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/00252a5a-858e-4377-b26e-c7c18ebd4480_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:435776,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0-SP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00252a5a-858e-4377-b26e-c7c18ebd4480_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!0-SP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00252a5a-858e-4377-b26e-c7c18ebd4480_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!0-SP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00252a5a-858e-4377-b26e-c7c18ebd4480_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!0-SP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00252a5a-858e-4377-b26e-c7c18ebd4480_1456x1048.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Every developer strives to write the best code possible. It ensures that code is readable, maintainable, scalable, and consistent. Usually, developers follow best practices, industry standards, unit testing, manual PR reviews, etc.</p><p>However, code quality and security can drastically improve by incorporating static code analysis into your projects and a code base that performs code quality checks automatically.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5b_x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef0bcf56-8e82-41f0-a93a-723e32c47ab3_500x453.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5b_x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef0bcf56-8e82-41f0-a93a-723e32c47ab3_500x453.png 424w, https://substackcdn.com/image/fetch/$s_!5b_x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef0bcf56-8e82-41f0-a93a-723e32c47ab3_500x453.png 848w, https://substackcdn.com/image/fetch/$s_!5b_x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef0bcf56-8e82-41f0-a93a-723e32c47ab3_500x453.png 1272w, https://substackcdn.com/image/fetch/$s_!5b_x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef0bcf56-8e82-41f0-a93a-723e32c47ab3_500x453.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5b_x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef0bcf56-8e82-41f0-a93a-723e32c47ab3_500x453.png" width="500" height="453" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ef0bcf56-8e82-41f0-a93a-723e32c47ab3_500x453.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:453,&quot;width&quot;:500,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:18853,&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;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5b_x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef0bcf56-8e82-41f0-a93a-723e32c47ab3_500x453.png 424w, https://substackcdn.com/image/fetch/$s_!5b_x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef0bcf56-8e82-41f0-a93a-723e32c47ab3_500x453.png 848w, https://substackcdn.com/image/fetch/$s_!5b_x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef0bcf56-8e82-41f0-a93a-723e32c47ab3_500x453.png 1272w, https://substackcdn.com/image/fetch/$s_!5b_x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef0bcf56-8e82-41f0-a93a-723e32c47ab3_500x453.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>What is static code analysis?</h2><p>In plain English, static code analysis refers to analyzing the code before it&#8217;s running to see if it meets certain standards and rules defined.</p><h2>How does static code analysis help improve code quality?</h2><ol><li><p><strong>Making code less complex: A case of cognitive complexity</strong></p><p>Who likes code that takes hours to understand because it comprises hundreds of lines and all business logic is put inside a single function? More complex code might make it more prone to bugs and less scalable</p><p>.</p><p></p><p>The complexity of software is measured by the most popular method, cyclomatic complexity. It counts the number of distinct routes that can be taken through a piece of code, assisting programmers in determining how intricate and potentially error-prone their software might be. A more complex and difficult-to-maintain codebase is often indicated by a higher cyclomatic complexity.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SPbq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8e28049-a0de-4616-af48-0db6229c3445_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SPbq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8e28049-a0de-4616-af48-0db6229c3445_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!SPbq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8e28049-a0de-4616-af48-0db6229c3445_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!SPbq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8e28049-a0de-4616-af48-0db6229c3445_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!SPbq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8e28049-a0de-4616-af48-0db6229c3445_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SPbq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8e28049-a0de-4616-af48-0db6229c3445_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d8e28049-a0de-4616-af48-0db6229c3445_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:98633,&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;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SPbq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8e28049-a0de-4616-af48-0db6229c3445_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!SPbq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8e28049-a0de-4616-af48-0db6229c3445_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!SPbq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8e28049-a0de-4616-af48-0db6229c3445_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!SPbq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8e28049-a0de-4616-af48-0db6229c3445_1456x1048.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p></p><p>A static analysis tool such as SonarLint or ESLint will provide cognitive complexity to code to ensure it is readable and divided into smaller chunks.</p><p></p></li><li><p><strong>Formatting and Styling Code</strong></p><p>Every software developer has a personal preference for formatting and styling conventions. Some like single quotes, others double, etc. Apply this to a project with tens of developers, and this will create a complete mess.</p><p></p><p>Even if developers are asked to apply the conventions, they can&#8217;t be expected to remember all the rules. All programming languages provide linting tools to adhere to conventions.</p><p></p></li><li><p><strong>Type Checking</strong></p><p>Let&#8217;s assume a use case where a function expected a boolean, but that boolean was passed wrapped in a string. We know the app will break for sure.</p><p></p><p>The type checking rescues here. In the case of JavaScript, Flow, and TypeScript can ensure that the written code is actually predictable.</p><p></p><p>It ensures that all the parameters passed and their children, if any, are all defined at the level of the actual values as well.</p><p></p></li><li><p><strong>Detecting Bugs and Errors</strong></p><p>Let&#8217;s say you add a duplicate variable to the code, and the code is shipped to production. Though the issue can be found in the unit tests, it can be caught earlier by using static analysis tools. Similarly, redundant and unused code can be timely identified by analyzing the code.</p><p></p></li><li><p><strong>Security issues</strong></p><p>Often, bad coding practices introduce vulnerabilities into the codebase and the application, which can be exploited later via XSS, privilege escalation, etc.</p></li></ol><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Zero To Architect! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2><strong>How do you implement static code analysis in your project?</strong></h2><ol><li><p><strong>IDE: First line of defense</strong></p><p>Almost all linting tools can be installed in the IDE, ensuring that all standards are followed while you code.</p><p></p></li><li><p><strong>Git Pre-hooks</strong></p><p>Run all lint tools before pushing the code to the remote repo by integrating with pre-hooks tools such as Husky to ensure that all standards are being followed.</p><p></p><p>Tools such as ESLint also provide methods such as &#8212;fix to fix most of the issues found by ESLint.</p><p></p></li><li><p><strong>CI Pipelines</strong></p><p>The static analysis tools can be run just after a PR is raised or before pushing the code to production. It should fail the pipeline, PR, and push to the production environment if it fails.</p></li></ol><h2>Tools for static code analysis</h2><ol><li><p><strong>ESLint</strong></p><p>The most widely used lint tool for JavaScript maintains conventions across the codebase and captures inconsistent formatting and styling. It comes with predefined rules, which can be modified.</p><p></p><p>Pylint</p><p></p></li><li><p><strong>Prettier</strong></p><p>Prettier is the most popular formatting and styling tool to ensure consistency and uniformity across the codebase.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FWu4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f5416aa-607f-4bd1-9345-44706a18fdff_3424x968.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FWu4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f5416aa-607f-4bd1-9345-44706a18fdff_3424x968.png 424w, https://substackcdn.com/image/fetch/$s_!FWu4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f5416aa-607f-4bd1-9345-44706a18fdff_3424x968.png 848w, https://substackcdn.com/image/fetch/$s_!FWu4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f5416aa-607f-4bd1-9345-44706a18fdff_3424x968.png 1272w, https://substackcdn.com/image/fetch/$s_!FWu4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f5416aa-607f-4bd1-9345-44706a18fdff_3424x968.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FWu4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f5416aa-607f-4bd1-9345-44706a18fdff_3424x968.png" width="1456" height="412" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6f5416aa-607f-4bd1-9345-44706a18fdff_3424x968.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:412,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:191413,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FWu4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f5416aa-607f-4bd1-9345-44706a18fdff_3424x968.png 424w, https://substackcdn.com/image/fetch/$s_!FWu4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f5416aa-607f-4bd1-9345-44706a18fdff_3424x968.png 848w, https://substackcdn.com/image/fetch/$s_!FWu4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f5416aa-607f-4bd1-9345-44706a18fdff_3424x968.png 1272w, https://substackcdn.com/image/fetch/$s_!FWu4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f5416aa-607f-4bd1-9345-44706a18fdff_3424x968.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p></li><li><p><strong>SonarLint, SonarCloud and SonarQube</strong></p><p>SonarCloud is a popular cloud-based code analysis tool that can be integrated with the GitHub repo. SonarQube, a self-hosted tool, can be added to your pipelines.</p><p></p><p>Similarly, SonarLint can be added to the IDE and provide the same configuration and enforce rules directly in your IDE.</p><p></p></li><li><p>LGTM</p><p>GitHub provides a tool called LGTM to directly inspect the codebase via GitHub Actions. Further details can be found on the <a href="https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/">Github LGTM</a></p><p></p><p>Some other best and most popular tools are:</p></li><li><p>DeepSource</p></li><li><p>DeepScan</p></li><li><p>Codacy</p></li><li><p>JSHint</p></li><li><p>JSLint</p></li><li><p>Dependabot</p></li><li><p>npm-audit</p></li><li><p>pytype</p></li><li><p>pylint</p></li></ol><p>Thanks for reading.</p><p></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Zero To Architect! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[You should learn DevOps in 2023]]></title><description><![CDATA[DevOps is an integral part of modern tech stack and irrespective of your tech stack, you must learn this skillset to work independently and efficiently.]]></description><link>https://solutionsarchitect.substack.com/p/you-should-learn-devops-in-2023</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/you-should-learn-devops-in-2023</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Sun, 24 Sep 2023 13:33:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4461148-5ac6-43df-96f8-644cb3ae5fb8_1400x875.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_!flpz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec46fb4-ddd4-48f3-b3f4-a20b29bef656_1200x600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!flpz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec46fb4-ddd4-48f3-b3f4-a20b29bef656_1200x600.png 424w, https://substackcdn.com/image/fetch/$s_!flpz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec46fb4-ddd4-48f3-b3f4-a20b29bef656_1200x600.png 848w, https://substackcdn.com/image/fetch/$s_!flpz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec46fb4-ddd4-48f3-b3f4-a20b29bef656_1200x600.png 1272w, https://substackcdn.com/image/fetch/$s_!flpz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec46fb4-ddd4-48f3-b3f4-a20b29bef656_1200x600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!flpz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec46fb4-ddd4-48f3-b3f4-a20b29bef656_1200x600.png" width="1200" height="600" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2ec46fb4-ddd4-48f3-b3f4-a20b29bef656_1200x600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:600,&quot;width&quot;:1200,&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;:false,&quot;topImage&quot;:true,&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_!flpz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec46fb4-ddd4-48f3-b3f4-a20b29bef656_1200x600.png 424w, https://substackcdn.com/image/fetch/$s_!flpz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec46fb4-ddd4-48f3-b3f4-a20b29bef656_1200x600.png 848w, https://substackcdn.com/image/fetch/$s_!flpz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec46fb4-ddd4-48f3-b3f4-a20b29bef656_1200x600.png 1272w, https://substackcdn.com/image/fetch/$s_!flpz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec46fb4-ddd4-48f3-b3f4-a20b29bef656_1200x600.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Over the last one and a half years, I have been working as an architect, and most of my time is spent on making decisions and building scalable solutions. Besides domain-related hard skills, the working knowledge of DevOps and AWS helps me out while creating the best solutions.</p><p>I am convinced that every developer should know about DevOps and at least manage the Ops related to his domain.</p><p>In this article, we will learn about what DevOps is, what the different parts of it are, what you should learn, and how it will help you further in your career. Even the basics of DevOps are also required in the job description nowadays.</p><h1><strong>What is DevOps?</strong></h1><p>DevOps is a set of practices and cultural beliefs that emphasize collaboration and communication between software developers and IT operations professionals. Its goal is to automate the software delivery process and increase the speed, quality, and dependability of software releases.</p><p>DevOps integrates software development, testing, deployment, and operations into a single continuous process, allowing for faster and more efficient software development and deployment. It also includes the use of tools and technologies that automate the various stages of the software delivery process, such as version control, continuous integration and deployment, monitoring, and infrastructure as code.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Zero To Architect! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h1><strong>DevOps technologies and concepts you must know</strong></h1><h2><strong>1. Docker</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qFLM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4461148-5ac6-43df-96f8-644cb3ae5fb8_1400x875.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qFLM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4461148-5ac6-43df-96f8-644cb3ae5fb8_1400x875.jpeg 424w, https://substackcdn.com/image/fetch/$s_!qFLM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4461148-5ac6-43df-96f8-644cb3ae5fb8_1400x875.jpeg 848w, https://substackcdn.com/image/fetch/$s_!qFLM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4461148-5ac6-43df-96f8-644cb3ae5fb8_1400x875.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!qFLM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4461148-5ac6-43df-96f8-644cb3ae5fb8_1400x875.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qFLM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4461148-5ac6-43df-96f8-644cb3ae5fb8_1400x875.jpeg" width="1400" height="875" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d4461148-5ac6-43df-96f8-644cb3ae5fb8_1400x875.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:875,&quot;width&quot;:1400,&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_!qFLM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4461148-5ac6-43df-96f8-644cb3ae5fb8_1400x875.jpeg 424w, https://substackcdn.com/image/fetch/$s_!qFLM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4461148-5ac6-43df-96f8-644cb3ae5fb8_1400x875.jpeg 848w, https://substackcdn.com/image/fetch/$s_!qFLM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4461148-5ac6-43df-96f8-644cb3ae5fb8_1400x875.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!qFLM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4461148-5ac6-43df-96f8-644cb3ae5fb8_1400x875.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@rubaitulazad?utm_source=medium&amp;utm_medium=referral">Rubaitul Azad</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>Docker is a containerization platform that lets developers deploy their apps consistently and portablely.</p><p>Docker lets developers create container images with all the software dependencies, libraries, and configuration files needed for their applications. Users can share these images. To ensure software consistency across development, testing, and production environments, these images can be shared and used.</p><p>A Docker client tool interacts with the Docker daemon, which manages images and containers. Docker&#8217;s command-line and graphical interfaces can manage and deploy containers.</p><h2><strong>2. Kubernetes</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IvRF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30bd921d-0646-4469-a62e-ac13e3e20d72_1400x788.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IvRF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30bd921d-0646-4469-a62e-ac13e3e20d72_1400x788.jpeg 424w, https://substackcdn.com/image/fetch/$s_!IvRF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30bd921d-0646-4469-a62e-ac13e3e20d72_1400x788.jpeg 848w, https://substackcdn.com/image/fetch/$s_!IvRF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30bd921d-0646-4469-a62e-ac13e3e20d72_1400x788.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!IvRF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30bd921d-0646-4469-a62e-ac13e3e20d72_1400x788.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IvRF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30bd921d-0646-4469-a62e-ac13e3e20d72_1400x788.jpeg" width="1400" height="788" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/30bd921d-0646-4469-a62e-ac13e3e20d72_1400x788.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:788,&quot;width&quot;:1400,&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_!IvRF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30bd921d-0646-4469-a62e-ac13e3e20d72_1400x788.jpeg 424w, https://substackcdn.com/image/fetch/$s_!IvRF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30bd921d-0646-4469-a62e-ac13e3e20d72_1400x788.jpeg 848w, https://substackcdn.com/image/fetch/$s_!IvRF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30bd921d-0646-4469-a62e-ac13e3e20d72_1400x788.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!IvRF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30bd921d-0646-4469-a62e-ac13e3e20d72_1400x788.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@growtika?utm_source=medium&amp;utm_medium=referral">Growtika</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>Kubernetes (K8s), an open-source container orchestration platform, automates containerized application deployment, scaling, and management.</p><p>Developers can deploy their apps in lightweight, portable containers with Kubernetes. Kubernetes manages and scales these containers efficiently across a cluster of nodes.</p><p>Kubernetes uses a master and multiple worker nodes. The cluster&#8217;s master node schedules worker node containers. Workers run containers and receive updates and instructions from the master node.</p><p>Kubernetes provides:</p><ol><li><p><strong>Automatic scaling:</strong> Kubernetes scales containers based on demand to ensure applications have enough resources.</p></li><li><p><strong>Self-healing:</strong> Kubernetes can detect and replace unhealthy or unresponsive containers, ensuring application availability.</p></li><li><p><strong>Load balancing:</strong> Kubernetes distributes traffic across containers for responsive applications.</p></li><li><p>Controlled application update rollouts and rollbacks reduce downtime and error risk with Kubernetes.</p></li><li><p><strong>Storage orchestration:</strong> Kubernetes manages container storage to give applications access to data.</p></li></ol><h2><strong>3. Infrastructure as code (IaC)</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Olat!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7efb73b5-a44a-4cd4-a6e9-aaf9d704c7cf_1400x933.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Olat!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7efb73b5-a44a-4cd4-a6e9-aaf9d704c7cf_1400x933.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Olat!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7efb73b5-a44a-4cd4-a6e9-aaf9d704c7cf_1400x933.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Olat!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7efb73b5-a44a-4cd4-a6e9-aaf9d704c7cf_1400x933.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Olat!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7efb73b5-a44a-4cd4-a6e9-aaf9d704c7cf_1400x933.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Olat!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7efb73b5-a44a-4cd4-a6e9-aaf9d704c7cf_1400x933.jpeg" width="1400" height="933" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7efb73b5-a44a-4cd4-a6e9-aaf9d704c7cf_1400x933.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:933,&quot;width&quot;:1400,&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_!Olat!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7efb73b5-a44a-4cd4-a6e9-aaf9d704c7cf_1400x933.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Olat!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7efb73b5-a44a-4cd4-a6e9-aaf9d704c7cf_1400x933.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Olat!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7efb73b5-a44a-4cd4-a6e9-aaf9d704c7cf_1400x933.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Olat!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7efb73b5-a44a-4cd4-a6e9-aaf9d704c7cf_1400x933.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>Infrastructure as code (IaC) uses code to automate and manage infrastructure. Instead of manually configuring servers, networks, and databases using a GUI or CLI, it defines them in declarative code.</p><p>IaC benefits include:</p><ol><li><p><strong>Consistency:</strong> IaC consistently provisioned and configured infrastructure, reducing human errors and misconfigurations.</p></li><li><p><strong>Reusability:</strong> IaC code can be shared across teams and environments, making infrastructure provisioning faster and easier.</p></li><li><p><strong>Scalability:</strong> IaC quickly and easily scales infrastructure to meet application and user needs.</p></li><li><p><strong>Version control:</strong> Developers and infrastructure teams can collaborate on IaC code using version control systems.</p></li><li><p><strong>Auditability:</strong> IaC tracks infrastructure changes, making troubleshooting and debugging easier.</p></li></ol><p>Terraform and CloudFormation allow declarative code descriptions of infrastructure components that can be versioned, tested, and deployed automatically. Dependency management, variable support, and modularity simplify infrastructure management.</p><h2><strong>4. Continuous Integration/Continuous Delivery (CI/CD) Pipelines</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lA2t!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14f39a0c-8ca3-4cf9-9958-931b52c04499_1400x937.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lA2t!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14f39a0c-8ca3-4cf9-9958-931b52c04499_1400x937.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lA2t!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14f39a0c-8ca3-4cf9-9958-931b52c04499_1400x937.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lA2t!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14f39a0c-8ca3-4cf9-9958-931b52c04499_1400x937.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lA2t!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14f39a0c-8ca3-4cf9-9958-931b52c04499_1400x937.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lA2t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14f39a0c-8ca3-4cf9-9958-931b52c04499_1400x937.jpeg" width="1400" height="937" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/14f39a0c-8ca3-4cf9-9958-931b52c04499_1400x937.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:937,&quot;width&quot;:1400,&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_!lA2t!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14f39a0c-8ca3-4cf9-9958-931b52c04499_1400x937.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lA2t!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14f39a0c-8ca3-4cf9-9958-931b52c04499_1400x937.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lA2t!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14f39a0c-8ca3-4cf9-9958-931b52c04499_1400x937.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lA2t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14f39a0c-8ca3-4cf9-9958-931b52c04499_1400x937.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@jjying?utm_source=medium&amp;utm_medium=referral">JJ Ying</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>Continuous Integration/Continuous Delivery (CI/CD) allows developers to automate software building, testing, and deployment to production.</p><p>CI/CD pipelines automate code building, testing, and deployment. Developers start the pipeline by committing changes to version control.</p><p>The pipeline then executes:</p><ol><li><p>Code creation: The pipeline compiles code from the version control system.</p></li><li><p>Testing the code: The pipeline runs a suite of tests to check for bugs and regressions after code changes, such as unit, integration, and functional tests.</p></li><li><p>The pipeline packages the code and dependencies into a deployable artifact like a container image or ZIP file.</p></li><li><p>The pipeline deploys code changes to a staging environment for testing before deploying to production.</p></li><li><p>Monitoring code: The pipeline checks the staging application for errors.</p></li><li><p>The pipeline promotes code changes to production if the staging environment is stable and error-free.</p></li><li><p>CI/CD pipelines speed up and improve software delivery to production.</p></li></ol><p>Automating the building, testing, and deployment processes reduces manual errors and downtime and improves visibility and control over the software delivery process.</p><h2><strong>5. Deployment Strategies</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1lBI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70072d9c-4af6-4aab-9d1e-42eb185205c5_1400x717.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1lBI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70072d9c-4af6-4aab-9d1e-42eb185205c5_1400x717.png 424w, https://substackcdn.com/image/fetch/$s_!1lBI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70072d9c-4af6-4aab-9d1e-42eb185205c5_1400x717.png 848w, https://substackcdn.com/image/fetch/$s_!1lBI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70072d9c-4af6-4aab-9d1e-42eb185205c5_1400x717.png 1272w, https://substackcdn.com/image/fetch/$s_!1lBI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70072d9c-4af6-4aab-9d1e-42eb185205c5_1400x717.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1lBI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70072d9c-4af6-4aab-9d1e-42eb185205c5_1400x717.png" width="1400" height="717" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/70072d9c-4af6-4aab-9d1e-42eb185205c5_1400x717.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:717,&quot;width&quot;:1400,&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_!1lBI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70072d9c-4af6-4aab-9d1e-42eb185205c5_1400x717.png 424w, https://substackcdn.com/image/fetch/$s_!1lBI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70072d9c-4af6-4aab-9d1e-42eb185205c5_1400x717.png 848w, https://substackcdn.com/image/fetch/$s_!1lBI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70072d9c-4af6-4aab-9d1e-42eb185205c5_1400x717.png 1272w, https://substackcdn.com/image/fetch/$s_!1lBI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70072d9c-4af6-4aab-9d1e-42eb185205c5_1400x717.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">source: <a href="https://spinnaker.io/concepts/">https://spinnaker.io/concepts/</a>)</figcaption></figure></div><p>Software modifications are released and deployed to production environments using deployment strategies. Speed, risk, and complexity vary with deployment strategy. Deployment methods include:</p><ol><li><p><strong>Blue-Green Deployment: </strong>This technique maintains two identical environments for production and staging. The staging environment hosts the new application, which is tested and certified before traffic is moved to it.</p></li><li><p><strong>Rolling Deployment:</strong> This technique involves releasing changes to a small group of production servers, checking that they function, and then gradually rolling out the changes to the other servers.</p></li><li><p><strong>Canary Deployment:</strong> This method deploys changes to a limited group of users or servers in the production environment while keeping the rest of the traffic on the old version. After validation, traffic is gradually switched to the updated version.</p></li><li><p><strong>A/B Testing:</strong> This method involves deploying two versions of the application, A and B, and routing a percentage of traffic to each version. Both versions are compared, and the superior one is maintained.</p></li><li><p><strong>Immutable Deployment:</strong> Instead of upgrading the environment, each deployment creates a new one. This makes the environment consistent and trustworthy and decreases the possibility of errors caused by changes between environment versions.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TZt4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8779f2d-b939-433f-a260-0d1ee29d2d80_1400x294.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TZt4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8779f2d-b939-433f-a260-0d1ee29d2d80_1400x294.png 424w, https://substackcdn.com/image/fetch/$s_!TZt4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8779f2d-b939-433f-a260-0d1ee29d2d80_1400x294.png 848w, https://substackcdn.com/image/fetch/$s_!TZt4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8779f2d-b939-433f-a260-0d1ee29d2d80_1400x294.png 1272w, https://substackcdn.com/image/fetch/$s_!TZt4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8779f2d-b939-433f-a260-0d1ee29d2d80_1400x294.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TZt4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8779f2d-b939-433f-a260-0d1ee29d2d80_1400x294.png" width="1400" height="294" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b8779f2d-b939-433f-a260-0d1ee29d2d80_1400x294.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:294,&quot;width&quot;:1400,&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_!TZt4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8779f2d-b939-433f-a260-0d1ee29d2d80_1400x294.png 424w, https://substackcdn.com/image/fetch/$s_!TZt4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8779f2d-b939-433f-a260-0d1ee29d2d80_1400x294.png 848w, https://substackcdn.com/image/fetch/$s_!TZt4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8779f2d-b939-433f-a260-0d1ee29d2d80_1400x294.png 1272w, https://substackcdn.com/image/fetch/$s_!TZt4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8779f2d-b939-433f-a260-0d1ee29d2d80_1400x294.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">source: <a href="https://spinnaker.io/concepts/">https://spinnaker.io/concepts/</a>)</figcaption></figure></div><p>Each deployment approach has pros and cons, and the ideal one depends on the organization&#8217;s needs. The application&#8217;s size and complexity, risk tolerance, resources, and deployment speed should be considered while choosing a deployment method.</p><h2><strong>6. Site Reliability Engineering</strong></h2><p>Site Reliability Engineering (SRE) integrates software development and operations to construct and run reliable, scalable, and efficient software systems. SRE teams monitor system uptime, latency, and error rates.</p><p>SRE relies on numerous fundamentals:</p><ol><li><p>SRE teams monitor system performance, including uptime, latency, and error rates. This data helps uncover issues and inform system improvements.</p></li><li><p>Automate everything: SRE teams automate to eliminate human error and boost efficiency and consistency. Automated testing, deployment, and issue response.</p></li><li><p>SLOs and SLAs: SRE teams set SLOs and SLAs to guarantee system performance meets user needs.</p></li><li><p>Perform blameless post-mortems: SRE teams investigate incidents to determine what happened, why, and how to prevent them from happening again. Instead of blaming, learn from mistakes and improve the system.</p></li><li><p>SRE teams experiment to test new ideas and improve the system. A/B testing, canary deployments, and other methods are used to test changes before implementing them.</p></li><li><p>SRE teams collaborate with development, testing, and operations to ensure system reliability and efficiency. Sharing information, resources, and best practices.</p></li><li><p>SRE is a mentality and practices for designing and running reliable, scalable, and efficient software systems. SRE teams can increase system reliability, performance, and user experience by following these guidelines.</p></li></ol><h2><strong>7. Cloud Services</strong></h2><p>Cloud services are internet-delivered services from cloud computing providers. These services offer computation, software, and storage. Cloud services are usually subscription-based and accessed via a browser or client application.</p><p>The most popular cloud service is AWS. Its most useful services are EC2, S3, Lambda, RDS, Secret Manager, and more.</p><h1><strong>How will learning these DevOps concepts and tools help you as a developer?</strong></h1><h2><strong>1. A better technical solution</strong></h2><p>A developer can create more resilient, scalable, and solid technical solutions. Knowing how different parts of technology work can help in making better decisions. For example, the decision to use Lambda vs. deploy a service on EC2 with respect to speed and cold starts can only be made when you have gotten to know in and out of these technologies. And this can only be possible if you have some background in DevOps and AWS.</p><h2><strong>2. Production Debugging</strong></h2><p>DevOps can help developers debug production difficulties. Debug production issues using DevOps principles with these steps:</p><ol><li><p>Monitor production difficulties with monitoring tools. Monitoring can help you catch problems early. DevOps monitoring is automated and combines with other technologies to give real-time application visibility.</p></li><li><p>Reproduce: Use your DevOps process to replicate an issue in a development or testing environment. Reproducing the problem helps diagnose and solve it.</p></li><li><p>Collaborate with operations teams to understand the production environment and identify configuration or infrastructure issues that may be causing the problem. Use DevOps concepts to collaborate and communicate with operational teams to fix the issue.</p></li><li><p>Fix: Use your DevOps process to push the fix to production after finding the issue. Continuous delivery and automated testing can assist in deploying the patch quickly and safely.</p></li><li><p>Monitor again: After delivering the fix, monitor the production environment again to confirm the issue is repaired and no new issues arise. This verifies your repair and production stability.</p></li></ol><p>Developers can reduce downtime and improve the user experience by debugging production issues using DevOps techniques.</p><h2><strong>3. A better approach toward development</strong></h2><p>Developers can improve their development methods with DevOps.</p><ol><li><p><strong>Agile Development:</strong> DevOps encourages rapid iteration, collaboration, and continuous improvement. Developers can respond to changing needs, provide features faster, and get stakeholder input by working in Agile.</p></li><li><p><strong>Collaboration:</strong> DevOps encourages collaboration between developers, operations, and other software development stakeholders. Developers can better understand the production environment and design deployable, operable software by engaging with operations teams.</p></li><li><p>DevOps emphasizes monitoring and feedback throughout development. Developers can enhance their code by analyzing production application performance and availability.</p></li></ol><h1><strong>Conclusion</strong></h1><p>To summarize, it can be said that DevOps is a necessary tool for developers to learn, as it will help them in debugging, developing better solutions, and developing an improved skill set to match market demand.</p>]]></content:encoded></item><item><title><![CDATA[Building predictable, reliable, resilient and retriable APIs with Idempotency]]></title><description><![CDATA[Developers can build predictable, reliable and retriable APIs by implementing idempotency.]]></description><link>https://solutionsarchitect.substack.com/p/building-predictable-reliable-resilient</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/building-predictable-reliable-resilient</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Sun, 17 Sep 2023 18:44:30 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!vyMZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaef488e-3536-4287-92a4-68834253b788_1200x1200.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_!vyMZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaef488e-3536-4287-92a4-68834253b788_1200x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vyMZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaef488e-3536-4287-92a4-68834253b788_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!vyMZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaef488e-3536-4287-92a4-68834253b788_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!vyMZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaef488e-3536-4287-92a4-68834253b788_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!vyMZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaef488e-3536-4287-92a4-68834253b788_1200x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vyMZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaef488e-3536-4287-92a4-68834253b788_1200x1200.png" width="1200" height="1200" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/daef488e-3536-4287-92a4-68834253b788_1200x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1200,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:765654,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vyMZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaef488e-3536-4287-92a4-68834253b788_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!vyMZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaef488e-3536-4287-92a4-68834253b788_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!vyMZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaef488e-3536-4287-92a4-68834253b788_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!vyMZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaef488e-3536-4287-92a4-68834253b788_1200x1200.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Developers want their APIs to be reliable and resilient.</p><p>But there is an area that is often overlooked: are your APIs predictable and retriable?</p><p>Let&#8217;s explore some examples.</p><h3><strong>Customers getting double charged: A classic example</strong></h3><p>A customer is using your payment APIs, and as soon as the process is initiated, there is a network issue on the customer&#8217;s end, and he is unable to receive a response. As soon as the network is back, they click on the pay button again. What should happen now?</p><p>If the payment process is restarted, the customer will be double-charged. Which will dent the credibility of the payment processor.</p><h3>Order and Inventory Management Systems</h3><p>Similarly, let&#8217;s say you have an e-commerce OMS app. The store owners process some orders but, for some reason, again perform the same actions. The system should not reprocess but instead, return the original response.</p><p>These problems can be resolved by introducing idempotency in the APIs.</p><h1>What is idempotency?</h1><p>Idempotency is a mathematical and computer science concept that refers to the quality of some operations or functions in which performing them several times has the same effect as performing them once.</p><blockquote><p>An idempotent operation can be repeated an infinite number of times and still provide the same outcome.</p></blockquote><p>Idempotent APIs enable API users to retry calls in the event of a network outage or other problems without having to worry about producing duplicate rows in a database or charging the client several times.</p><h2>HTTP Methods ensuring idempotency</h2><p>HTTP methods such as PUT, DELETE, and GET are idempotent in nature.</p><ol><li><p><strong>GET:</strong> Repeating a GET request will return the same resource representation without changing the resource on the server.</p></li><li><p><strong>HEAD:</strong> The HEAD method, like GET, obtains metadata about a resource but not the resource itself. It can be used to check for the existence of a resource, get headers, or find the last change date without modifying the resource itself. </p></li><li><p><strong>PUT:</strong> If the resource at the specified URL already exists, a PUT request will replace it with the new representation sent in the request body. PUT will build the resource if it does not already exist. <em>PUT is idempotent in the sense that repeating the same PUT request with the same data does not affect the resource in any way other than the initial request.</em></p></li><li><p><strong>DELETE:</strong> When you issue a DELETE request, the server deletes the resource if it exists, and it simply provides a successful answer if it does not. Multiple DELETE operations on the same resource will not have different outcomes beyond the first deletion, making it an idempotent operation.</p></li></ol><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Loving reading Zero To Architect? Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h1>How can a developer build idempotent APIs?</h1><p>A developer can add idempotency in various ways.</p><h3>1. Idempotency Keys</h3><p>Idempotency keys are the building blocks of idempotent keys. A key, preferably a UUID, is used to identify a request. Whenever the API is called again with the same key, it will return the original response.</p><p>The keys are either external or internal.</p><ul><li><p><strong>External Idempotency Keys: </strong>If the API is integrated into 3rd-party apps, then that system can pass the key to be identified as the idempotency key.</p></li><li><p><strong>Internal Idempotency Keys: </strong>If the system generates a key against each request and attaches that on the basis of an ID, then that key will be called an idempotent key.</p></li></ul><h4>Saving Idempotency Keys</h4><p>The idempotency keys are usually short-lived and can be reused with new requests after a specified time.</p><ol><li><p><strong>Redis:</strong> Redis or other caching solutions can be used to save short-lived idempotency keys.</p></li><li><p><strong>TTL indexing: </strong>Time-to-live indexes are often used to save a value in a database to be deleted later after a given time interval.</p></li></ol><h3>2. Using HTTP Methods</h3><p>Using HTTP methods such as GET, PUT, and DELETE will ensure that the API resources are by default idempotent.</p><h1>Let&#8217;s write some code</h1><p>Here's an example of how to utilize the Express.js framework to create an idempotent API endpoint in Node.js, including the use of an idempotency key to ensure that repeated requests do not have unintended consequences.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kdG6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2203b281-4a0a-4fea-9b81-0bb492406534_2648x2008.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kdG6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2203b281-4a0a-4fea-9b81-0bb492406534_2648x2008.png 424w, https://substackcdn.com/image/fetch/$s_!kdG6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2203b281-4a0a-4fea-9b81-0bb492406534_2648x2008.png 848w, https://substackcdn.com/image/fetch/$s_!kdG6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2203b281-4a0a-4fea-9b81-0bb492406534_2648x2008.png 1272w, https://substackcdn.com/image/fetch/$s_!kdG6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2203b281-4a0a-4fea-9b81-0bb492406534_2648x2008.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kdG6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2203b281-4a0a-4fea-9b81-0bb492406534_2648x2008.png" width="1456" height="1104" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2203b281-4a0a-4fea-9b81-0bb492406534_2648x2008.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1104,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:455108,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kdG6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2203b281-4a0a-4fea-9b81-0bb492406534_2648x2008.png 424w, https://substackcdn.com/image/fetch/$s_!kdG6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2203b281-4a0a-4fea-9b81-0bb492406534_2648x2008.png 848w, https://substackcdn.com/image/fetch/$s_!kdG6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2203b281-4a0a-4fea-9b81-0bb492406534_2648x2008.png 1272w, https://substackcdn.com/image/fetch/$s_!kdG6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2203b281-4a0a-4fea-9b81-0bb492406534_2648x2008.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p>For upgrading a user's email address, we establish an Express.js application and configure a POST request endpoint (/users/:userId/email).</p></li><li><p>To uniquely identify each request, we develop and employ an Idempotency-Key header. If you use the same idempotency key in many requests, the server will recognize it as a duplicate and reply accordingly.</p></li><li><p>The server determines whether the idempotency key has previously been processed. If it has, the server responds with a response indicating that it has already handled the request.</p></li><li><p>To prevent duplicate processing of the same key, processed idempotency keys are placed in a Set.</p></li></ul><h1>Final Thoughts</h1><p>It is critical to consider the probability of failure in a distributed system and how to address it while developing APIs that are both resilient and predictable. Retry logic on clients and server idempotency are two strategies that can help achieve this goal and are reasonably easy to implement in any technological stack.</p><p>Here are a few fundamental principles to remember while building clients and APIs:</p><ol><li><p>Ensure that failures are dealt with consistently. Request that clients retry activities on remote services. Failure to do so may result in inconsistent data, which may cause problems in the future.</p></li><li><p>Make certain that failures are handled in a safe manner. Allow clients to pass a unique value and retry requests as needed by using idempotency and idempotency keys.</p></li></ol><p></p>]]></content:encoded></item><item><title><![CDATA[How to measure your and your team's productivity as a developer, manager and engineering lead.]]></title><description><![CDATA[In this article, we will discuss different scenarios and strategies to evaluate the performance and productivity of software engineers contextually.]]></description><link>https://solutionsarchitect.substack.com/p/how-to-measure-your-and-your-teams</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/how-to-measure-your-and-your-teams</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Sun, 10 Sep 2023 16:18:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!lCDs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff2acaeb-f63d-43b5-a399-0fe14f507a2f_640x427.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_!lCDs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff2acaeb-f63d-43b5-a399-0fe14f507a2f_640x427.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lCDs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff2acaeb-f63d-43b5-a399-0fe14f507a2f_640x427.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lCDs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff2acaeb-f63d-43b5-a399-0fe14f507a2f_640x427.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lCDs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff2acaeb-f63d-43b5-a399-0fe14f507a2f_640x427.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lCDs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff2acaeb-f63d-43b5-a399-0fe14f507a2f_640x427.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lCDs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff2acaeb-f63d-43b5-a399-0fe14f507a2f_640x427.jpeg" width="640" height="427" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ff2acaeb-f63d-43b5-a399-0fe14f507a2f_640x427.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:427,&quot;width&quot;:640,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:56330,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lCDs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff2acaeb-f63d-43b5-a399-0fe14f507a2f_640x427.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lCDs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff2acaeb-f63d-43b5-a399-0fe14f507a2f_640x427.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lCDs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff2acaeb-f63d-43b5-a399-0fe14f507a2f_640x427.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lCDs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff2acaeb-f63d-43b5-a399-0fe14f507a2f_640x427.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Productivity is contextual and subjective. It can&#8217;t be generalized.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Zero To Architect! Subscribe to read content to elevate yourself to an architect&#8217;s level.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>I manage and lead 8 to 10 engineers on average across different teams and use different measures to determine their performance and productivity instead of one rule that fits all.</p><p>Let&#8217;s start.</p><ol><li><p>Year of experience in a specific tech stack</p></li><li><p>Difficulty level of new tech stack for a new task</p></li><li><p>Relevance of tasks with the tech stack</p></li><li><p>Ability to learn any new skill to fulfill the job</p></li><li><p>Knowledge of relevant tech ecosystems</p></li></ol><h1><strong>Example 1: Experience and task in the same tech stack</strong></h1><p>Let&#8217;s say there is a developer with three years of experience in JavaScript and React. Xe is assigned a task of five-story points, which is relatively fair and expected to be completed if no blockers occur.</p><p>If the task is completed within the timeframe, then the developer is performing well.</p><p>But if the random tasks are taking more time, then there needs to be a discussion.</p><h3>What is to be discussed here?</h3><p>As a lead or manager, I will first sit down and evaluate what went wrong here. There are chances that</p><ol><li><p>There was tech debt that needed to be cleared first. </p><ol><li><p>But who created that in the first place? Was it some other developer?</p></li></ol></li><li><p>The feature affected other parts of the code and needed to be handled, and it took more time than anticipated earlier.</p><ol><li><p>Was the codebase not scalable?</p></li><li><p>How can we ensure that it doesn&#8217;t happen in the next feature implementation?</p></li></ol></li><li><p>The person took more time.</p></li></ol><p>The first two options clearly illustrate that the developer might not be wrong and could be given leverage. But in the last one, the performance is quite low.</p><h1>Example 2: A developer is assigned a task of an overlapping tech stack</h1><p>A backend developer with an Express.js and Node.js tech stack can be expected to take over Nest.js with ease, and his task estimates can be extended from 10% to 25%. However, if the same engineer takes double the time, then it means either he lacks basic JS OOP skills or is a slow learner.</p><p>The latter is acceptable, but the former is not and will directly fall under poor performance, and the developer should be considered less productive.</p><h1>Example 3: You are given a task above your skill level</h1><p>Assume you have average database skills and know the syntax and APIs to work with. Your next task is implementing sharding and partitioning with eventual consistency and maintaining connection pooling.</p><p>It&#8217;s a difficult task that requires thorough knowledge of the internals of the database.</p><h4>What to do as an engineer</h4><ol><li><p>First, discuss with your manager that you don&#8217;t have the current skillset for this task, but you will learn it and finish it.</p></li><li><p>Discuss the timeline. If a person with the required skillset needs two weeks, then it should be four for you.</p></li><li><p>Clear expectations earlier to avoid any confusion and delivery delays later.</p></li><li><p>This will ensure that, as a developer, your performance level is as per your skillset, with room to improve.</p></li></ol><h4>What to do as an engineering lead and manager</h4><ol><li><p>Understand the situation and skill level of your resources.</p></li><li><p>Set expectations for the deliverable accordingly.</p></li><li><p>Even if the candidate is able to deliver 50&#8211;70%, it means xe performed well and couldn&#8217;t be deemed a non-productive engineer.</p></li></ol><h1>Tangible criteria to judge an engineer</h1><p>Irrespective of any task, the developers must be following these practices:</p><ol><li><p>Clean code practices being followed</p></li><li><p>Unit and integration testing</p></li><li><p>Scalable code</p></li><li><p>Number of bugs and issues reported</p></li><li><p>Git standards being followed</p></li></ol><p>With different use cases, I have tried to establish that it is not that easy to evaluate even one developer under different scenarios.</p><p>So, interact more with your team and ensure that you understand their side of the story before evaluating performance and productivity.</p><p>Thanks for reading.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Zero To Architect! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The developer’s productivity can’t be measured in McKinsey’s way. An Analysis. ]]></title><description><![CDATA[Let's discuss the shortcommings in McKinsey's report and why is it too generalized to be implemented from a developer and engineering lead's perspective.]]></description><link>https://solutionsarchitect.substack.com/p/the-developers-productivity-cant</link><guid isPermaLink="false">https://solutionsarchitect.substack.com/p/the-developers-productivity-cant</guid><dc:creator><![CDATA[Ali Raza]]></dc:creator><pubDate>Sun, 03 Sep 2023 14:19:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d0e8de8-9506-47af-9a1b-8bfbb33786d6_1400x935.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I have been managing and leading different teams for the last two and a half years and analyzing the productivity and performance of teammates with different backgrounds.</p><p>McKinsey published a <a href="https://www.mckinsey.com/industries/technology-media-and-telecommunications/our-insights/yes-you-can-measure-software-developer-productivity">report</a> and laid down some productivity indicators to build a framework for tech companies.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Zero To Architect! Subscribe to read content to elevate yourself to an architect&#8217;s level.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>As soon as I read this report, the first question I asked myself was, Do I measure the productivity of my team members? If so, do I use one generalized approach for all? The answer is no.</p><h1><strong>Is it important to measure the productivity of software developers?</strong></h1><p>Yes, every company needs the best talent and wants to replace the least productive engineers with the most productive ones. However, the productivity parameters of one developer completely differ from those of the other.</p><p>It is impossible to apply one formula that fits all and expect accurate results. It will be disruptive.</p><p>Let&#8217;s say there are three developers, A, B, C, and D, working in a team and putting in 100% effort.</p><p>Developer A is working on new features and delivering them regularly.</p><p>Developer B is reducing tech debt by optimizing code for scalability and paving the way for new feature development at a rapid pace.</p><p>Developer C is blocked most of the time due to third-party dependencies and couldn&#8217;t get it delivered.</p><p>Developer D is building with a completely new stack, and the development pace is slow, but things are getting done as per contractual expectations.</p><p>Who will get more recognition and be considered more productive in typical C-level meetings? Does it mean, by any standard, that one is less productive than the others? A person solving bugs or reducing tech debt might seem less productive than one delivering features in a typical tech company.</p><h1><strong>A summary of the McKinsey report</strong></h1><p>McKinsey thinks they have a solution to measure the developer&#8217;s productivity.</p><p>This article explores the significance of measuring software developer productivity and proposes a novel method for doing so. It emphasizes that, in contrast to other corporate operations, software development has generally been undermeasured. However, because most businesses now rely substantially on software, it is critical to analyze and optimize developer performance.</p><p>Given the complexity and collaboration required in software development, the essay acknowledges the difficulties in assessing developer productivity.</p><p>The article&#8217;s innovative technique involves assessing production at three levels: system, team, and person, using DORA and SPACE metrics and Opportunity-focused metrics.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uSA-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d8bc619-9fb9-446f-966e-227e2541ef42_804x679.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uSA-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d8bc619-9fb9-446f-966e-227e2541ef42_804x679.png 424w, https://substackcdn.com/image/fetch/$s_!uSA-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d8bc619-9fb9-446f-966e-227e2541ef42_804x679.png 848w, https://substackcdn.com/image/fetch/$s_!uSA-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d8bc619-9fb9-446f-966e-227e2541ef42_804x679.png 1272w, https://substackcdn.com/image/fetch/$s_!uSA-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d8bc619-9fb9-446f-966e-227e2541ef42_804x679.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uSA-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d8bc619-9fb9-446f-966e-227e2541ef42_804x679.png" width="804" height="679" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2d8bc619-9fb9-446f-966e-227e2541ef42_804x679.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:679,&quot;width&quot;:804,&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_!uSA-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d8bc619-9fb9-446f-966e-227e2541ef42_804x679.png 424w, https://substackcdn.com/image/fetch/$s_!uSA-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d8bc619-9fb9-446f-966e-227e2541ef42_804x679.png 848w, https://substackcdn.com/image/fetch/$s_!uSA-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d8bc619-9fb9-446f-966e-227e2541ef42_804x679.png 1272w, https://substackcdn.com/image/fetch/$s_!uSA-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d8bc619-9fb9-446f-966e-227e2541ef42_804x679.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6KA8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8954f-7fca-42fa-ab14-1b8afa4b8d63_804x392.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6KA8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8954f-7fca-42fa-ab14-1b8afa4b8d63_804x392.png 424w, https://substackcdn.com/image/fetch/$s_!6KA8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8954f-7fca-42fa-ab14-1b8afa4b8d63_804x392.png 848w, https://substackcdn.com/image/fetch/$s_!6KA8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8954f-7fca-42fa-ab14-1b8afa4b8d63_804x392.png 1272w, https://substackcdn.com/image/fetch/$s_!6KA8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8954f-7fca-42fa-ab14-1b8afa4b8d63_804x392.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6KA8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8954f-7fca-42fa-ab14-1b8afa4b8d63_804x392.png" width="804" height="392" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3ad8954f-7fca-42fa-ab14-1b8afa4b8d63_804x392.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:392,&quot;width&quot;:804,&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_!6KA8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8954f-7fca-42fa-ab14-1b8afa4b8d63_804x392.png 424w, https://substackcdn.com/image/fetch/$s_!6KA8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8954f-7fca-42fa-ab14-1b8afa4b8d63_804x392.png 848w, https://substackcdn.com/image/fetch/$s_!6KA8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8954f-7fca-42fa-ab14-1b8afa4b8d63_804x392.png 1272w, https://substackcdn.com/image/fetch/$s_!6KA8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8954f-7fca-42fa-ab14-1b8afa4b8d63_804x392.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It introduces new measures, including deployment frequency, change lead time, and contribution analysis, to evaluate performance and find areas for improvement.</p><p>The essay emphasizes the need to avoid measurements that are unnecessarily simplistic, such as lines of code, and encourages organizations to move beyond antiquated mindsets that imply software engineering cannot be measured.</p><p>The article concludes with suggestions for getting started with measuring developer productivity, such as learning about software development, assessing existing systems, developing a plan, and understanding that measuring productivity is contextual and aimed at improving the entire development environment. The goal is to boost developer productivity and overall corporate performance by increasing openness and insight.</p><h1><strong>An analysis from a developer&#8217;s and engineering lead&#8217;s perspective</strong></h1><p>The report is more focused on building a framework for C-level managers than considering the software development lifecycle and the developer&#8217;s journey from building to delivery.</p><h2><strong>1. A non-engineering person gauging developers' productivity and influencing decisions</strong></h2><p>This is where the problem starts.</p><p>It&#8217;s just a button or an API connected to the database.</p><p>To a non-techie, it might look like just a feature, but the concepts of tech debt, architectural decisions, and feature implementation are naive.</p><p>The question is, when the CTO is spearheading the technical side, shouldn&#8217;t he be calling the shots and firing and hiring developers based on their performance?</p><p>Not to mention non-engineering people, I have witnessed leads and managers struggling with developers working on the other tech stack. I have witnessed backend leads who don&#8217;t understand how a page loads on browsers and, out of ignorance, rank frontend developers low.</p><blockquote><p><em><strong>Learn the basics.</strong> All C-suite leaders who are not engineers or who have been in management for a long time will need a primer on the software development process and how it is evolving.</em></p></blockquote><p>It&#8217;s a welcoming statement, but not all tech companies are building the same product. R&amp;D, architectural decisions, and overhead vary. The developer and software lifecycles in a fintech startup are different from those in a typical SAAS. So the question is: are C-level managers willing to learn from the context of their product?</p><h2><strong>2. Entire focus on coding</strong></h2><blockquote><p><em>From both a productivity and personal-experience standpoint, maximizing the amount of time developers spend in the inner loop is desirable: building products directly generates value and is what most developers are excited to do.</em></p></blockquote><p>The document thinks that the more code a developer writes, the more productive he or she is. The irony is that it indirectly insists on building a coder mindset in organizations.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!g0VD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d0e8de8-9506-47af-9a1b-8bfbb33786d6_1400x935.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!g0VD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d0e8de8-9506-47af-9a1b-8bfbb33786d6_1400x935.jpeg 424w, https://substackcdn.com/image/fetch/$s_!g0VD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d0e8de8-9506-47af-9a1b-8bfbb33786d6_1400x935.jpeg 848w, https://substackcdn.com/image/fetch/$s_!g0VD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d0e8de8-9506-47af-9a1b-8bfbb33786d6_1400x935.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!g0VD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d0e8de8-9506-47af-9a1b-8bfbb33786d6_1400x935.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!g0VD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d0e8de8-9506-47af-9a1b-8bfbb33786d6_1400x935.jpeg" width="1400" height="935" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9d0e8de8-9506-47af-9a1b-8bfbb33786d6_1400x935.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:935,&quot;width&quot;:1400,&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_!g0VD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d0e8de8-9506-47af-9a1b-8bfbb33786d6_1400x935.jpeg 424w, https://substackcdn.com/image/fetch/$s_!g0VD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d0e8de8-9506-47af-9a1b-8bfbb33786d6_1400x935.jpeg 848w, https://substackcdn.com/image/fetch/$s_!g0VD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d0e8de8-9506-47af-9a1b-8bfbb33786d6_1400x935.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!g0VD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d0e8de8-9506-47af-9a1b-8bfbb33786d6_1400x935.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@cbpsc1?utm_source=medium&amp;utm_medium=referral">Clint Patterson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>There is no mention of how much different aspects of software engineering, such as building a system design, taking architectural decisions, and discussing scalability, influence the course of the product.</p><h2><strong>3. The outer loop is completely generalized for all developers</strong></h2><p>The absence of platform engineering and DevOps standardization will impede development progress and make developers focus less on their jobs.</p><p>It makes sense that the developers should be unblocked for CI/CD pipelines and deployments, but excluding meetings, security, and compliance from a developer&#8217;s activity is rather a generalization.</p><p>It&#8217;s true for most tech companies, where unnecessary prolonged meetings and standups happen and should be reduced to a point where developers just attend meetings where they are actually required.</p><p>A developer working in Fintech and Banking is considerate of security and compliance. If development evolves the product, then obviously these factors come into play. Who will then implement those features?</p><h2><strong>4. No mention of automated and manual QAs or DevOps engineers</strong></h2><p>Productivity can vary from developer to developer, depending on the job description.</p><p>Developers are not the only ones building the product and need to be productive. The QA team and DevOps play equal roles. Here, no indicator is defined to measure their productivity.</p><p>The manual QAs and the ones doing automation need different criteria, as do the DevOpsers.</p><h2><strong>5. Developer Velocity Index</strong></h2><p>DV, in fact, adds to the efficiency of a developer&#8217;s and the overall software development cycle. The developer&#8217;s productivity will fall to zero if they get stuck in CI/CD pipelines, manual unit testing, tedious code promotion strategies, etc.</p><h2><strong>6. Overlooking non-coding contributions of developers</strong></h2><blockquote><p><em>For example, one company found that its most talented developers were spending excessive time on noncoding activities such as design sessions or managing interdependencies across teams. In response, the company changed its operating model and clarified roles and responsibilities to enable those highest-value developers to do what they do best: code.</em></p></blockquote><p>The company went wrong here, and this model is not a viable one.</p><p>It can be assumed that the most talented developers should know the ins and outs of the product and the internal dependencies overlapping across the teams. Who is supposed to take the lead, create, or assess designs and system designs? Are those talented developers or others hired for these specific roles? Were those developers completely turned into coding bots?</p><p>Let&#8217;s say there is a major feature implementation that requires ongoing communication between the teams. It&#8217;s a common practice that managers, with the help of developers, handle this and point out the shortcomings and successes of the integrations and implementations.</p><p>Creating a separate role for this creates only friction rather than good code and products.</p><h2><strong>7. The framework doesn&#8217;t address contextuality</strong></h2><blockquote><p><em><strong>Remember that measuring productivity is contextual. </strong>The point is to look at an entire system and understand how it can work better by improving the development environment at the system, team, or individual level.</em></p></blockquote><p>It&#8217;s a welcome point in the report, and it&#8217;s true.</p><p>At my job, my manager gauges my productivity and performance in a different context than I do for my team members on a different tech stack.</p><p>At the team level, my developers get blocked for a couple of days due to an external issue, although a feature has been completed. When they get unblocked, they might have to change a feature implementation due to a third-party requirement, and the delivery gets delayed. In this context, the team is not a non-productive one. But if it is clearly monitored, the team is indeed productive, as they have delivered the feature in the time required to do all the work.</p><p>To some C-level managers, the developer might look non-productive as the feature is getting delayed, but the reason is not the productivity issue.</p><p>Similarly, if the team or developer underestimates the ETA and there are no blockers, they fail to defend against delays, and productivity and performance issues will come into the spotlight.</p><p>It&#8217;s easier to gauge performance with a given set of points, such as clean code, unit testing, number of bugs, tech debt accrued, etc.</p><h2><strong>8. The impact of the developer on the team is greater than the coding</strong></h2><p>This is one of the most important aspects of an outstanding developer, but there seems to be no mention of it. If you are a senior developer on the team, you will be expected to help out the juniors, review code, and suggest solutions. The amount of time spent coding will not be a big factor in your assessment.</p><p>The greater your impact, the more productive and exceptional you will be considered.</p><p><strong>Next Sunday, I will share how, as a developer or engineering lead, you can assess your and your team&#8217;s productivity contextually, unlike the generalized one. You can subscribe to get that blog directly in your inbox.</strong></p><h1><strong>Summary</strong></h1><p>It&#8217;s a very welcoming report, but it comes with some basic flaws. Every manager wants to know the productivity level of his or her team and how to improve it. But it can&#8217;t be generalized and applied across organizations. Every developer or team has different tasks and circumstances. Similarly, each developer comes with different strengths and weaknesses, which have an impact on the product being built. Some are good at unblocking teammates and building solutions, while others write exceptional and optimized code. Those who implement this framework will produce more coders than software engineers who build solutions.</p><p>Thanks for reading.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://solutionsarchitect.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Zero To Architect! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item></channel></rss>