<?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[Awesome Software Engineer]]></title><description><![CDATA[Share practical software engineering skills including backend, architecture, and engineering mindset]]></description><link>https://blog.awesomesoftwareengineer.com</link><image><url>https://substackcdn.com/image/fetch/$s_!LjdX!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F418d7272-62dd-40cd-bcf2-5fcbad3189eb_500x500.png</url><title>Awesome Software Engineer</title><link>https://blog.awesomesoftwareengineer.com</link></image><generator>Substack</generator><lastBuildDate>Thu, 16 Apr 2026 05:43:08 GMT</lastBuildDate><atom:link href="https://blog.awesomesoftwareengineer.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Ray Chong]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[awesomeengineer@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[awesomeengineer@substack.com]]></itunes:email><itunes:name><![CDATA[Ray Chong]]></itunes:name></itunes:owner><itunes:author><![CDATA[Ray Chong]]></itunes:author><googleplay:owner><![CDATA[awesomeengineer@substack.com]]></googleplay:owner><googleplay:email><![CDATA[awesomeengineer@substack.com]]></googleplay:email><googleplay:author><![CDATA[Ray Chong]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Software Design Principle: Iteration over Perfection]]></title><description><![CDATA[Iterative Mindset Helps You Go Further]]></description><link>https://blog.awesomesoftwareengineer.com/p/iteration-over-perfection</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/iteration-over-perfection</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Tue, 16 Jan 2024 11:59:24 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!-b_9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e919b5e-76e8-4ea1-8442-cc6df4fcb03d_5341x1911.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In my software engineering approach, I prioritize iterative development over striving for perfection from the start. While some engineers aim for a flawless solution encompassing all possible scenarios, I don't see that as inherently negative. However, I do think circumstances may not always unfold as expected, potentially leading to misguided resource investments, especially in a dynamic environment.</p><p>My preference for an iterative approach is rooted in its ability to design solutions that meet current business needs while emphasizing simplicity. This simplicity allows for quick adaptations during subsequent iterations, taking advantage of the expansive design space. The iterative process also enables me to gather real feedback from production usage, facilitating meaningful optimizations based on actual needs. Upon receiving feedback, I can enhance the solution, aligning it more closely with real-world requirements.</p><p>Additionally, the iterative design minimizes risks in software engineering management through its ability to promptly identify and address potential issues early in the process. As a result, the overall risk associated with the project is diminished. Collecting feedback from actual production usage enables swift adjustments with minimal effort, given the straightforward and easily modifiable nature of the solution.</p><p>On the flip side, a perfective design hinges on anticipating the majority of needs, which may not materialize as expected. This can result in added complexities and resource investments prior to the system going live. Such additional efforts can adversely affect the time-to-market, as more time is devoted to the solution. Moreover, if design modifications are required after going live, it could prove challenging since the unknown factors might not have been thoroughly considered in the initial design.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-b_9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e919b5e-76e8-4ea1-8442-cc6df4fcb03d_5341x1911.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-b_9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e919b5e-76e8-4ea1-8442-cc6df4fcb03d_5341x1911.png 424w, https://substackcdn.com/image/fetch/$s_!-b_9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e919b5e-76e8-4ea1-8442-cc6df4fcb03d_5341x1911.png 848w, https://substackcdn.com/image/fetch/$s_!-b_9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e919b5e-76e8-4ea1-8442-cc6df4fcb03d_5341x1911.png 1272w, https://substackcdn.com/image/fetch/$s_!-b_9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e919b5e-76e8-4ea1-8442-cc6df4fcb03d_5341x1911.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-b_9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e919b5e-76e8-4ea1-8442-cc6df4fcb03d_5341x1911.png" width="1456" height="521" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3e919b5e-76e8-4ea1-8442-cc6df4fcb03d_5341x1911.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:521,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:673334,&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_!-b_9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e919b5e-76e8-4ea1-8442-cc6df4fcb03d_5341x1911.png 424w, https://substackcdn.com/image/fetch/$s_!-b_9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e919b5e-76e8-4ea1-8442-cc6df4fcb03d_5341x1911.png 848w, https://substackcdn.com/image/fetch/$s_!-b_9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e919b5e-76e8-4ea1-8442-cc6df4fcb03d_5341x1911.png 1272w, https://substackcdn.com/image/fetch/$s_!-b_9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e919b5e-76e8-4ea1-8442-cc6df4fcb03d_5341x1911.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>Embracing a perfect design mindset may result in inaccurate predictions of future requirements, potentially leading to the misallocation of resources. Subsequent corrections and adjustments may be necessary as the initially anticipated business needs might differ from the actual ones. There is a risk of expending resources on refining solutions based on inaccurate predictions instead of addressing genuine business requirements.</p><p>What you envision as the end might not be the final outcome; there are numerous possibilities within your business.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3QdO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc076047-dc62-4470-b095-a6ba95f80f30_7385x3591.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3QdO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc076047-dc62-4470-b095-a6ba95f80f30_7385x3591.png 424w, https://substackcdn.com/image/fetch/$s_!3QdO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc076047-dc62-4470-b095-a6ba95f80f30_7385x3591.png 848w, https://substackcdn.com/image/fetch/$s_!3QdO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc076047-dc62-4470-b095-a6ba95f80f30_7385x3591.png 1272w, https://substackcdn.com/image/fetch/$s_!3QdO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc076047-dc62-4470-b095-a6ba95f80f30_7385x3591.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3QdO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc076047-dc62-4470-b095-a6ba95f80f30_7385x3591.png" width="1456" height="708" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc076047-dc62-4470-b095-a6ba95f80f30_7385x3591.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:708,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:820857,&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_!3QdO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc076047-dc62-4470-b095-a6ba95f80f30_7385x3591.png 424w, https://substackcdn.com/image/fetch/$s_!3QdO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc076047-dc62-4470-b095-a6ba95f80f30_7385x3591.png 848w, https://substackcdn.com/image/fetch/$s_!3QdO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc076047-dc62-4470-b095-a6ba95f80f30_7385x3591.png 1272w, https://substackcdn.com/image/fetch/$s_!3QdO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc076047-dc62-4470-b095-a6ba95f80f30_7385x3591.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>Your design should not impose constraints on the business; instead, it should reserve flexibility to foster the expansion of business possibilities. Adopting a perfective design mindset may involve defining the business's end goal, but in reality, business requirements evolve over time. Therefore, the design should be adaptable to the evolving needs of the business, as facilitated by the iterative mindset.</p><p>To address this issue, my approach involves establishing a precise priority for the current business need and concentrating solely on the present without attempting to predict future needs. By adopting this strategy, I aim to reserve more design space for future iterations while optimizing the utilization of team resources. This ensures a more flexible and adaptive development process, allowing for effective adjustments based on real and evolving business needs.</p><p>In conclusion, my software engineering philosophy centers on finding a balance between adaptability and precision, ensuring efficient resource utilization and effective adjustments based on real-world business needs.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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[Software Design Principle: Encapsulation]]></title><description><![CDATA[Distribute Complexity and Reduce Coupling]]></description><link>https://blog.awesomesoftwareengineer.com/p/software-design-principle-encapsulation</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/software-design-principle-encapsulation</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Tue, 09 Jan 2024 14:05:58 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%2F53ce0e72-0df3-43ea-9be1-9983f325b4ac_5607x4697.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Encapsulation in software design is indeed a powerful approach that consolidates data and methods within a class or module, creating a clear boundary controlling object access. This consolidation keeps related functionalities together, easing developers' navigation and collaboration without scattering across different sections. By concealing implementation details, encapsulation enhances code readability, allowing a focus on the logic flow rather than intricate inner workings. Ultimately, it improves code organization, reduces complexity, and promotes a clearer separation of concerns within a software system.</p><p>From my experience, dealing with a method that lacks clear boundaries and encapsulation can indeed create a steep learning curve. When all the logic is intertwined without a clear separation, it becomes challenging to comprehend the method. This coupling of diverse logic forces the reader to shift focus continually, making it harder to understand the method's flow and functionalities.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CWrv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ea1a35-9913-4401-b5a5-9aadfc139c93_1504x2644.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CWrv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ea1a35-9913-4401-b5a5-9aadfc139c93_1504x2644.png 424w, https://substackcdn.com/image/fetch/$s_!CWrv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ea1a35-9913-4401-b5a5-9aadfc139c93_1504x2644.png 848w, https://substackcdn.com/image/fetch/$s_!CWrv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ea1a35-9913-4401-b5a5-9aadfc139c93_1504x2644.png 1272w, https://substackcdn.com/image/fetch/$s_!CWrv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ea1a35-9913-4401-b5a5-9aadfc139c93_1504x2644.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CWrv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ea1a35-9913-4401-b5a5-9aadfc139c93_1504x2644.png" width="1456" height="2560" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/51ea1a35-9913-4401-b5a5-9aadfc139c93_1504x2644.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2560,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:628015,&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_!CWrv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ea1a35-9913-4401-b5a5-9aadfc139c93_1504x2644.png 424w, https://substackcdn.com/image/fetch/$s_!CWrv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ea1a35-9913-4401-b5a5-9aadfc139c93_1504x2644.png 848w, https://substackcdn.com/image/fetch/$s_!CWrv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ea1a35-9913-4401-b5a5-9aadfc139c93_1504x2644.png 1272w, https://substackcdn.com/image/fetch/$s_!CWrv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ea1a35-9913-4401-b5a5-9aadfc139c93_1504x2644.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><blockquote><p>The method ignores a lot of implementation details but imagine you need to deal with different validation, business logic, error handling, etc.</p></blockquote><p>In the above example, the <code>placeOrder</code> method, in its current state, encompasses a multitude of responsibilities, from inventory management to payment processing and order creation, resulting in a convoluted method. This intertwining of diverse functionalities heightens complexity, making comprehension and maintenance challenging.</p><p>Improving readability and maintainability in code hinge on two main strategies: extraction and encapsulation.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!e1-Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bab132e-678a-4329-86fa-151c965ed560_8288x1470.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!e1-Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bab132e-678a-4329-86fa-151c965ed560_8288x1470.png 424w, https://substackcdn.com/image/fetch/$s_!e1-Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bab132e-678a-4329-86fa-151c965ed560_8288x1470.png 848w, https://substackcdn.com/image/fetch/$s_!e1-Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bab132e-678a-4329-86fa-151c965ed560_8288x1470.png 1272w, https://substackcdn.com/image/fetch/$s_!e1-Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bab132e-678a-4329-86fa-151c965ed560_8288x1470.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!e1-Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bab132e-678a-4329-86fa-151c965ed560_8288x1470.png" width="1456" height="258" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9bab132e-678a-4329-86fa-151c965ed560_8288x1470.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:258,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:609040,&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_!e1-Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bab132e-678a-4329-86fa-151c965ed560_8288x1470.png 424w, https://substackcdn.com/image/fetch/$s_!e1-Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bab132e-678a-4329-86fa-151c965ed560_8288x1470.png 848w, https://substackcdn.com/image/fetch/$s_!e1-Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bab132e-678a-4329-86fa-151c965ed560_8288x1470.png 1272w, https://substackcdn.com/image/fetch/$s_!e1-Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bab132e-678a-4329-86fa-151c965ed560_8288x1470.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>Extraction involves breaking complex code into smaller, more manageable pieces, making it easier to understand. Each extracted part handles a specific task, simplifying the overall structure and allowing readers to focus on the main logic.</p><p>Encapsulation groups related data and functions within classes or modules, creating boundaries that control access. This helps abstract away complexities, making it easier to interact with these components without understanding their intricate details.</p><p>Together, extraction and encapsulation create a more organized and understandable codebase, enhancing readability, maintainability, and the overall quality of software systems.</p><p>Take the above example again, to organize the logic and data flow, one effective approach is method extraction. By understanding the method's responsibilities, we can extract distinct actions into smaller methods:</p><ul><li><p>Validate Stock</p></li><li><p>Process Payment</p></li><li><p>Create and Validate Order</p></li><li><p>Send Notification</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!O3G1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b65a57-be3d-4b9d-9200-1afa7c675490_2324x1911.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!O3G1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b65a57-be3d-4b9d-9200-1afa7c675490_2324x1911.png 424w, https://substackcdn.com/image/fetch/$s_!O3G1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b65a57-be3d-4b9d-9200-1afa7c675490_2324x1911.png 848w, https://substackcdn.com/image/fetch/$s_!O3G1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b65a57-be3d-4b9d-9200-1afa7c675490_2324x1911.png 1272w, https://substackcdn.com/image/fetch/$s_!O3G1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b65a57-be3d-4b9d-9200-1afa7c675490_2324x1911.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!O3G1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b65a57-be3d-4b9d-9200-1afa7c675490_2324x1911.png" width="1456" height="1197" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/75b65a57-be3d-4b9d-9200-1afa7c675490_2324x1911.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1197,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:207719,&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_!O3G1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b65a57-be3d-4b9d-9200-1afa7c675490_2324x1911.png 424w, https://substackcdn.com/image/fetch/$s_!O3G1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b65a57-be3d-4b9d-9200-1afa7c675490_2324x1911.png 848w, https://substackcdn.com/image/fetch/$s_!O3G1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b65a57-be3d-4b9d-9200-1afa7c675490_2324x1911.png 1272w, https://substackcdn.com/image/fetch/$s_!O3G1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b65a57-be3d-4b9d-9200-1afa7c675490_2324x1911.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_!aUSM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b97d25-14a0-4ee1-b217-775de6c9bb0a_1504x1160.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aUSM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b97d25-14a0-4ee1-b217-775de6c9bb0a_1504x1160.png 424w, https://substackcdn.com/image/fetch/$s_!aUSM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b97d25-14a0-4ee1-b217-775de6c9bb0a_1504x1160.png 848w, https://substackcdn.com/image/fetch/$s_!aUSM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b97d25-14a0-4ee1-b217-775de6c9bb0a_1504x1160.png 1272w, https://substackcdn.com/image/fetch/$s_!aUSM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b97d25-14a0-4ee1-b217-775de6c9bb0a_1504x1160.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aUSM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b97d25-14a0-4ee1-b217-775de6c9bb0a_1504x1160.png" width="1456" height="1123" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/62b97d25-14a0-4ee1-b217-775de6c9bb0a_1504x1160.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1123,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:153832,&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_!aUSM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b97d25-14a0-4ee1-b217-775de6c9bb0a_1504x1160.png 424w, https://substackcdn.com/image/fetch/$s_!aUSM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b97d25-14a0-4ee1-b217-775de6c9bb0a_1504x1160.png 848w, https://substackcdn.com/image/fetch/$s_!aUSM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b97d25-14a0-4ee1-b217-775de6c9bb0a_1504x1160.png 1272w, https://substackcdn.com/image/fetch/$s_!aUSM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b97d25-14a0-4ee1-b217-775de6c9bb0a_1504x1160.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>Breaking down the <code>placeOrder</code> method in this manner creates a cleaner structure, highlighting the four primary steps. This modular approach allows readers to grasp the method's flow at a glance and delve into specific methods for deeper insights.</p><p>Furthermore, if the class seems burdened with excessive responsibilities, another step is to organize these extracted functionalities into distinct domains&#8212;such as Stock, Payment, Order, and Notification&#8212;and encapsulate each within a dedicated class. Following this, an orchestrator class can coordinate these domains within the <code>placeOrder</code> method.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QHTG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934977e4-e1d9-4060-a828-b9aaa6e5f507_3367x2877.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QHTG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934977e4-e1d9-4060-a828-b9aaa6e5f507_3367x2877.png 424w, https://substackcdn.com/image/fetch/$s_!QHTG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934977e4-e1d9-4060-a828-b9aaa6e5f507_3367x2877.png 848w, https://substackcdn.com/image/fetch/$s_!QHTG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934977e4-e1d9-4060-a828-b9aaa6e5f507_3367x2877.png 1272w, https://substackcdn.com/image/fetch/$s_!QHTG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934977e4-e1d9-4060-a828-b9aaa6e5f507_3367x2877.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QHTG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934977e4-e1d9-4060-a828-b9aaa6e5f507_3367x2877.png" width="1456" height="1244" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/934977e4-e1d9-4060-a828-b9aaa6e5f507_3367x2877.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1244,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:667068,&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_!QHTG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934977e4-e1d9-4060-a828-b9aaa6e5f507_3367x2877.png 424w, https://substackcdn.com/image/fetch/$s_!QHTG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934977e4-e1d9-4060-a828-b9aaa6e5f507_3367x2877.png 848w, https://substackcdn.com/image/fetch/$s_!QHTG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934977e4-e1d9-4060-a828-b9aaa6e5f507_3367x2877.png 1272w, https://substackcdn.com/image/fetch/$s_!QHTG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934977e4-e1d9-4060-a828-b9aaa6e5f507_3367x2877.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>By employing this approach, the codebase becomes more cohesive, less coupled, and easier to understand, fostering a more organized and maintainable architecture.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-5a7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53ce0e72-0df3-43ea-9be1-9983f325b4ac_5607x4697.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-5a7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53ce0e72-0df3-43ea-9be1-9983f325b4ac_5607x4697.png 424w, https://substackcdn.com/image/fetch/$s_!-5a7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53ce0e72-0df3-43ea-9be1-9983f325b4ac_5607x4697.png 848w, https://substackcdn.com/image/fetch/$s_!-5a7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53ce0e72-0df3-43ea-9be1-9983f325b4ac_5607x4697.png 1272w, https://substackcdn.com/image/fetch/$s_!-5a7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53ce0e72-0df3-43ea-9be1-9983f325b4ac_5607x4697.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-5a7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53ce0e72-0df3-43ea-9be1-9983f325b4ac_5607x4697.png" width="1456" height="1220" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/53ce0e72-0df3-43ea-9be1-9983f325b4ac_5607x4697.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1220,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1234441,&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_!-5a7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53ce0e72-0df3-43ea-9be1-9983f325b4ac_5607x4697.png 424w, https://substackcdn.com/image/fetch/$s_!-5a7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53ce0e72-0df3-43ea-9be1-9983f325b4ac_5607x4697.png 848w, https://substackcdn.com/image/fetch/$s_!-5a7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53ce0e72-0df3-43ea-9be1-9983f325b4ac_5607x4697.png 1272w, https://substackcdn.com/image/fetch/$s_!-5a7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53ce0e72-0df3-43ea-9be1-9983f325b4ac_5607x4697.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>Extraction and encapsulation work hand in hand to distribute complexity effectively among the appropriate domains. By breaking down complex functionalities into smaller, cohesive units through extraction, and then encapsulating related data and operations within specific domains, we can effectively manage and organize the complexity within a software system. This approach ensures that each domain is responsible for handling its own complexities, resulting in a more organized and maintainable codebase.</p><p>To sum up, improving code readability and maintainability relies on two main principles: extraction and encapsulation. Extraction involves breaking down complex code into smaller, manageable parts, while encapsulation groups related functions and data within classes or modules. Together, these techniques create a more organized and understandable codebase, enhancing the overall quality of software systems.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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[2023 Wrap-Up for Awesome Software Engineer]]></title><description><![CDATA[Next year is going to be Awesome]]></description><link>https://blog.awesomesoftwareengineer.com/p/2023-wrap-up</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/2023-wrap-up</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Sat, 23 Dec 2023 11:17:31 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F418d7272-62dd-40cd-bcf2-5fcbad3189eb_500x500.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Let&#8217;s have a wrap-up for Awesome Software Engineer. It&#8217;s been one and a half years since I created Awesome Software Engineer. I started this blog in June 2022. Before that, I was working for a startup company called Serai which was a subordinate of HSBC. They suddenly informed HSBC wanted to terminate the company due to a business decision and all the staff got laid off at that time. I wasn&#8217;t surprised because it was my second time getting laid off. Well, I was well-prepared for that since my first layoff in another startup company. I know many engineers got laid off in 2023 but don't feel depressed. The best is yet to come. Take a break, adjust your mindset, and be positive. I also got a third layoff after Serai when I joined Crypto.com. It was a tough time for the crypto industry and every company was laying off their engineers.</p><p>After multiple layoffs, I was thinking about what I should do and what I could do other than my full-time job.  I found writing quite interesting and I like sharing my thoughts. Therefore, I am trying to start this blog to share my thoughts about software engineering and help people learn practical software engineering knowledge which is useful in a software engineering career.</p><p>Back to the topic, In 2023, I wrote 41 articles in Awesome Software Engineer across different topics including API, architecture, software design, and soft skills.</p><p>For the subscription numbers, the following are the statistics:</p><ul><li><p>2022: 199 subscribers</p></li><li><p>2023: 591 subscribers</p></li></ul><p>Total traffic in 2023:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!x3Nj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49cce8f6-3a61-420c-a821-70d9c4f1c0d9_2316x972.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!x3Nj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49cce8f6-3a61-420c-a821-70d9c4f1c0d9_2316x972.png 424w, https://substackcdn.com/image/fetch/$s_!x3Nj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49cce8f6-3a61-420c-a821-70d9c4f1c0d9_2316x972.png 848w, https://substackcdn.com/image/fetch/$s_!x3Nj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49cce8f6-3a61-420c-a821-70d9c4f1c0d9_2316x972.png 1272w, https://substackcdn.com/image/fetch/$s_!x3Nj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49cce8f6-3a61-420c-a821-70d9c4f1c0d9_2316x972.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!x3Nj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49cce8f6-3a61-420c-a821-70d9c4f1c0d9_2316x972.png" width="1456" height="611" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/49cce8f6-3a61-420c-a821-70d9c4f1c0d9_2316x972.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:611,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:161392,&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_!x3Nj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49cce8f6-3a61-420c-a821-70d9c4f1c0d9_2316x972.png 424w, https://substackcdn.com/image/fetch/$s_!x3Nj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49cce8f6-3a61-420c-a821-70d9c4f1c0d9_2316x972.png 848w, https://substackcdn.com/image/fetch/$s_!x3Nj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49cce8f6-3a61-420c-a821-70d9c4f1c0d9_2316x972.png 1272w, https://substackcdn.com/image/fetch/$s_!x3Nj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49cce8f6-3a61-420c-a821-70d9c4f1c0d9_2316x972.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>The following are some featured articles in 2023:</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;3600ec5e-c6eb-4b5e-bf46-40e4ee5832bd&quot;,&quot;caption&quot;:&quot;Architecture Architecture is the foundation of a system and provides rules for consistency, maintainability, and scalability. Features are built on top of the architecture and a flexible architecture allows for easier evolution and extension over time as new features are added.&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Architecting for Simplicity&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:25173525,&quot;name&quot;:&quot;Ray Chong&quot;,&quot;bio&quot;:&quot;a software engineer specializing in building backend and microservices&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b86a1706-9593-446c-9db3-126ccf18bfe1_1177x1179.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2023-05-31T12:29:27.666Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a882ae5b-975a-4cf2-ba8c-909a433d7ce3_420x300.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.awesomesoftwareengineer.com/p/architecting-for-simplicity&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:112374210,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:4,&quot;comment_count&quot;:2,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Awesome Software Engineer&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F418d7272-62dd-40cd-bcf2-5fcbad3189eb_500x500.png&quot;,&quot;belowTheFold&quot;:false,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;47964ed5-f839-499b-9d50-a76acfc29fe9&quot;,&quot;caption&quot;:&quot;In the realm of software engineering, two contrasting development approaches emerge: abstraction-driven design and simplicity-focused design. Abstraction-driven Design People who champion the abstraction-first method are all about thinking ahead. They're like the fortune-tellers of software - they try to predict future needs and design solutions that can &#8230;&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Design Space Optimization&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:25173525,&quot;name&quot;:&quot;Ray Chong&quot;,&quot;bio&quot;:&quot;a software engineer specializing in building backend and microservices&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b86a1706-9593-446c-9db3-126ccf18bfe1_1177x1179.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2023-08-31T12:51:05.022Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55bcbd-4c18-47e3-95a2-d59e5fe72cd9_6027x3178.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.awesomesoftwareengineer.com/p/design-space-optimization&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:135762544,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:3,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Awesome Software Engineer&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F418d7272-62dd-40cd-bcf2-5fcbad3189eb_500x500.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;5e2512e8-4db2-4888-a387-b1a07a7b7184&quot;,&quot;caption&quot;:&quot;Refactoring is a crucial practice in software engineering, akin to an art form. It involves reorganizing existing code and its structures to enhance code quality, readability, and maintainability. During refactoring, superfluous code is typically eliminated to keep the codebase concise and comprehensible. This process aims to simplify and organize compl&#8230;&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Why is Refactoring Important?&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:25173525,&quot;name&quot;:&quot;Ray Chong&quot;,&quot;bio&quot;:&quot;a software engineer specializing in building backend and microservices&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b86a1706-9593-446c-9db3-126ccf18bfe1_1177x1179.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2023-10-24T13:13:13.920Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fa3823ee-6b36-4b64-9d07-1fe15528c1dc_420x300.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.awesomesoftwareengineer.com/p/why-is-refactoring-important&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:137295139,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:3,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Awesome Software Engineer&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F418d7272-62dd-40cd-bcf2-5fcbad3189eb_500x500.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;a8f1711e-9698-4a77-aeab-dc9aa8930592&quot;,&quot;caption&quot;:&quot;Delegation stands as a critical skill that every software engineer should cultivate. I've observed numerous instances where engineers delegate tasks but fail to maintain active involvement thereafter. This is not an effective way to delegate tasks and is not fair to others. In my opinion, delegating tasks is an opportunity to free one engineer and grow &#8230;&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;How do you delegate your tasks to others?&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:25173525,&quot;name&quot;:&quot;Ray Chong&quot;,&quot;bio&quot;:&quot;a software engineer specializing in building backend and microservices&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b86a1706-9593-446c-9db3-126ccf18bfe1_1177x1179.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2023-09-20T12:56:04.591Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c8f90210-7b7c-40ac-91d4-ad14dd28ef74_420x300.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.awesomesoftwareengineer.com/p/how-do-you-delegate-your-tasks-to&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:135739458,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:5,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Awesome Software Engineer&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F418d7272-62dd-40cd-bcf2-5fcbad3189eb_500x500.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;35092aca-5398-4f2a-9e72-cdb1e3490ee7&quot;,&quot;caption&quot;:&quot;I didn&#8217;t like writing documentation when I was a Junior Engineer. I thought my job was just coding and creating more features. However, as I progressed to a more senior role in the team, I realized I didn't have as much time to code. There were numerous other responsibilities, including communication with other teams/stakeholders, reviewing code/design &#8230;&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Software Engineer or Writer?&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:25173525,&quot;name&quot;:&quot;Ray Chong&quot;,&quot;bio&quot;:&quot;a software engineer specializing in building backend and microservices&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b86a1706-9593-446c-9db3-126ccf18bfe1_1177x1179.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2023-11-14T12:40:04.182Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bd4af69b-94f1-4915-8e25-a1315f8ebb71_420x300.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.awesomesoftwareengineer.com/p/software-engineer-or-writer&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:138552719,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:2,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Awesome Software Engineer&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F418d7272-62dd-40cd-bcf2-5fcbad3189eb_500x500.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;65bc642b-f3d9-4f49-95ac-8d732ca849b4&quot;,&quot;caption&quot;:&quot;Thanks for reading Awesome Software Engineer! Subscribe for free to receive new posts and support my work. This post is originally published on Lalamove&#8217;s Medium. https://medium.com/lalamove-tech/lalamoves-next-generation-communication-platform-7b51f7bc3ff&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;How does Lalamove scale its Communication Platform?&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:25173525,&quot;name&quot;:&quot;Ray Chong&quot;,&quot;bio&quot;:&quot;a software engineer specializing in building backend and microservices&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b86a1706-9593-446c-9db3-126ccf18bfe1_1177x1179.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2023-05-11T13:14:22.120Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F717816b9-9b8d-408a-b2aa-002b803057e5_1600x900.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.awesomesoftwareengineer.com/p/how-does-lalamove-scale-its-communication&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:119702818,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:2,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Awesome Software Engineer&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F418d7272-62dd-40cd-bcf2-5fcbad3189eb_500x500.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;47456b15-d975-44f6-8165-09317a57aee3&quot;,&quot;caption&quot;:&quot;Event Driven Design is a popular architectural style and has many benefits if you are building a complex system, especially building a state transitions workflow. Let&#8217;s take the payment order workflow as an example. An order has many states like Pending, Assigned, Processing, Failed, Paid, and Completed. When the order is placed in the system, it will be&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Event-Driven Payment Architecture&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:25173525,&quot;name&quot;:&quot;Ray Chong&quot;,&quot;bio&quot;:&quot;a software engineer specializing in building backend and microservices&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b86a1706-9593-446c-9db3-126ccf18bfe1_1177x1179.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2023-04-12T13:46:18.040Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74f528bb-0920-4cf1-acfb-a78fc367bf45_16044x5054.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.awesomesoftwareengineer.com/p/event-driven-payment-architecture&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:98087280,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:4,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Awesome Software Engineer&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F418d7272-62dd-40cd-bcf2-5fcbad3189eb_500x500.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;95f71807-c11a-415c-af1d-d494165b9cfa&quot;,&quot;caption&quot;:&quot;API development is a day-to-day routine for every backend developer. When developing API for frontend developers, what approach will you use? This is really important when backend developers collaborate with frontend developers. If the API contract is convenient, then it will facilitate frontend developers&#8217; work and provide a better developer experience.&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Let UI drive API design&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:25173525,&quot;name&quot;:&quot;Ray Chong&quot;,&quot;bio&quot;:&quot;a software engineer specializing in building backend and microservices&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b86a1706-9593-446c-9db3-126ccf18bfe1_1177x1179.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2023-02-08T11:39:43.330Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2af32cb2-0c1d-4bc8-aca9-c8543a137db2_5544x1694.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.awesomesoftwareengineer.com/p/let-ui-drives-api-deisgn&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:92647735,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:5,&quot;comment_count&quot;:2,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Awesome Software Engineer&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F418d7272-62dd-40cd-bcf2-5fcbad3189eb_500x500.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p>This year <strong>392 new readers</strong> subscribed to Awesome Software Engineer which is already an impressive result for me. Other than posting the content on LinkedIn, I haven&#8217;t promoted my blog that much. So, I am happy with this result and hope Awesome Software Engineer gets more subscribers in the next year. This might need the whole community&#8217;s help and I am willing to get any feedback from all of you. Continuous improvement is important for software engineers and feedback helps people to improve themselves.</p><p>In 2023, I also moved some of my content to Medium</p><ul><li><p><a href="https://medium.com/@raychongtk">https://medium.com/@raychongtk</a> - Follow my account to support my work</p></li></ul><p>Apart from that, I organized my content into categories.</p><ul><li><p><a href="https://www.awesomesoftwareengineer.com/">https://www.awesomesoftwareengineer.com/</a></p></li><li><p><a href="https://github.com/raychongtk/awesome-software-engineer">https://github.com/raychongtk/awesome-software-engineer</a> - Give a star to my GitHub repo to support my work</p></li></ul><p>In the coming 2024, I hope my content can inspire more software engineers to help you speed up your learning track in the software engineering area. Wish all of you a Merry Christmas. Don&#8217;t forget to like, share, and subscribe to Awesome Software Engineer. Thanks!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.com/?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share Awesome Software Engineer&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.awesomesoftwareengineer.com/?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share Awesome Software Engineer</span></a></p>]]></content:encoded></item><item><title><![CDATA[Consistency in Chaos]]></title><description><![CDATA[Why creating a project coding standard is important?]]></description><link>https://blog.awesomesoftwareengineer.com/p/consistency-in-chaos</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/consistency-in-chaos</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Thu, 23 Nov 2023 12:19:05 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/83332471-ffa7-468d-8381-4317fd733d7b_420x300.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Software engineering, I believe, is the craft of orchestrating complexity, seamlessly transforming the initial chaos of ideas and code into a harmonious symphony of consistency and simplicity.</p><p>In our industry, chaos often reigns supreme, with intricacies and disorder prevailing. As software engineers, our role is akin to being architects of order amid this chaos. We leverage our software engineering skills not merely to navigate the complexity but to actively organize the chaos, molding it into a coherent and simplified structure. It's a profession where the artistry lies in transforming disorder into consistency and simplicity, crafting solutions that stand resilient in the face of the intricate and messy landscape of our industry.</p><p>In my software engineering journey across various companies and diverse codebases, I've encountered projects with well-defined coding standards as well as those lacking any standardized approach. The impact of having a coding standard versus the absence of one is substantial and significantly influences the development experience.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JHDY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedb54d59-7611-4d0b-bd02-260f35466fda_622x597.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JHDY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedb54d59-7611-4d0b-bd02-260f35466fda_622x597.jpeg 424w, https://substackcdn.com/image/fetch/$s_!JHDY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedb54d59-7611-4d0b-bd02-260f35466fda_622x597.jpeg 848w, https://substackcdn.com/image/fetch/$s_!JHDY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedb54d59-7611-4d0b-bd02-260f35466fda_622x597.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!JHDY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedb54d59-7611-4d0b-bd02-260f35466fda_622x597.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JHDY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedb54d59-7611-4d0b-bd02-260f35466fda_622x597.jpeg" width="622" height="597" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/edb54d59-7611-4d0b-bd02-260f35466fda_622x597.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:597,&quot;width&quot;:622,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;: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_!JHDY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedb54d59-7611-4d0b-bd02-260f35466fda_622x597.jpeg 424w, https://substackcdn.com/image/fetch/$s_!JHDY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedb54d59-7611-4d0b-bd02-260f35466fda_622x597.jpeg 848w, https://substackcdn.com/image/fetch/$s_!JHDY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedb54d59-7611-4d0b-bd02-260f35466fda_622x597.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!JHDY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedb54d59-7611-4d0b-bd02-260f35466fda_622x597.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>When working on a project that adheres to coding standards, I experience a sense of consistency and ease of understanding. I don't have to grapple with diverse coding styles, terminologies, or structures. Everything is well-coordinated and aligned, providing a seamless experience. The project offers a smooth journey, sparing me the need to invest significant time in studying the intricacies of the code because it is clear and straightforward. I can effortlessly locate what I need in the codebase and navigate through the project with ease.</p><p>Picture a project with coding standards as a harmonious symphony. Everything aligns seamlessly&#8212;coding styles, terminologies, and structures dance to the same rhythm. This uniformity transforms the codebase into a clear and comprehensible masterpiece, allowing developers to focus on the logic.</p><p>On the flip side, when I engage with a project lacking coding standards, it feels like navigating through a chaotic landscape. Everything is in disarray, making it challenging to acquire a solid understanding. Numerous coding styles coexist within a single project, and the structure and logic flow vary widely. Even the terminology, such as domain, entity, and DO (data object), often points to the same concept&#8212; the database object. This lack of uniformity in the codebase poses hurdles for learning and complicates the process of introducing new features or modifying existing behavior. The resultant confusion extends to understanding the current logic and structure. Moreover, it triggers numerous discussions on coding styles during code reviews, adding another layer of complexity to the development process.</p><p>A project without coding standards resembles a chaotic carnival. Divergent styles and terminologies introduce confusion, slowing down development and increasing the likelihood of errors. It's a battlefield where understanding the code becomes a challenge, leading to suboptimal results.</p><p>In short, projects with clear standards offer a symphony of consistency, providing an effortless and efficient experience. Conversely, projects without standards resemble chaotic carnivals, introducing confusion and impeding progress. Embracing coding standards becomes not just a choice but a compass guiding developers toward clarity and success in the coding wilderness.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share Awesome Software Engineer&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share Awesome Software Engineer</span></a></p>]]></content:encoded></item><item><title><![CDATA[Software Engineer or Writer?]]></title><description><![CDATA[I didn&#8217;t like writing documentation when I was a Junior Engineer. I thought my job was just coding and creating more features. However, as I progressed to a more senior role in the team, I realized I didn't have as much time to code. There were numerous other responsibilities, including communication with other teams/stakeholders, reviewing code/design documents, addressing questions, attending meetings, and planning.]]></description><link>https://blog.awesomesoftwareengineer.com/p/software-engineer-or-writer</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/software-engineer-or-writer</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Tue, 14 Nov 2023 12:40:04 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/bd4af69b-94f1-4915-8e25-a1315f8ebb71_420x300.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I didn&#8217;t like writing documentation when I was a Junior Engineer. I thought my job was just coding and creating more features. However, as I progressed to a more senior role in the team, I realized I didn't have as much time to code. There were numerous other responsibilities, including communication with other teams/stakeholders, reviewing code/design documents, addressing questions, attending meetings, and planning.</p><p>I started contemplating how to better utilize my time on the team. I recognized that software engineering involves not just coding but also other skills like communication, documentation, innovation, etc. From that, I discovered that writing is a powerful skill to facilitate communication and optimize time.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2iUq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe78b2e78-3372-4ded-a5a1-09a0d28105e8_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2iUq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe78b2e78-3372-4ded-a5a1-09a0d28105e8_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!2iUq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe78b2e78-3372-4ded-a5a1-09a0d28105e8_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!2iUq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe78b2e78-3372-4ded-a5a1-09a0d28105e8_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!2iUq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe78b2e78-3372-4ded-a5a1-09a0d28105e8_1920x1080.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2iUq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe78b2e78-3372-4ded-a5a1-09a0d28105e8_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e78b2e78-3372-4ded-a5a1-09a0d28105e8_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;:null,&quot;alt&quot;:&quot;3 Reasons Writing Is Great for Your Mental Health | Inc.com&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="3 Reasons Writing Is Great for Your Mental Health | Inc.com" title="3 Reasons Writing Is Great for Your Mental Health | Inc.com" srcset="https://substackcdn.com/image/fetch/$s_!2iUq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe78b2e78-3372-4ded-a5a1-09a0d28105e8_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!2iUq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe78b2e78-3372-4ded-a5a1-09a0d28105e8_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!2iUq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe78b2e78-3372-4ded-a5a1-09a0d28105e8_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!2iUq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe78b2e78-3372-4ded-a5a1-09a0d28105e8_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>The importance of writing can be summarized in the following points:</p><ul><li><p><strong>Scaling Yourself:</strong> Creating effective documentation not only helps in avoiding repeated questions but also saves valuable time. It captures thought processes, architecture, decisions, and ideas, acting as a reference for both yourself and others. Even when you are on vacation, colleagues do not need to disturb you; they can find answers in the documentation. This, in turn, enables you to better allocate your time and contribute more to other important tasks. Writing is the most scalable way to influence others, as people will read your content and might be inspired by it.</p></li><li><p><strong>Saving People&#8217;s Time:</strong> Comprehensive documentation reduces back-and-forth communication and enhances information retrieval efficiency. Serving as a knowledge base, it allows people to efficiently search for keywords and locate content. This documentation proves invaluable for onboarding new team members, troubleshooting issues, and understanding the project's evolution over time. Additionally, good writing skills contribute to summarizing rich content in a concise manner, saving people's time and keeping everyone aligned, especially in a chat context.</p></li><li><p><strong>Conveying Ideas and Creating Consensus:</strong> Effective communication is crucial in any collaborative environment. For abstract and complicated ideas, writing provides a structured way to convey the idea to other stakeholders, whether in a design document, proposal, or project progress report. Clear documentation makes it easier for everyone to understand intentions and create consensus, especially in decision-making processes, as it explains the rationale behind a choice or direction.</p></li></ul><p>This makes me feel writing is actually a part of software engineering. Software Engineer or Writer? Writing is a subset of Software Engineering, so software engineers should acquire better writing skills. The way you summarize or structure the content helps facilitate communication between different stakeholders and makes people work more efficiently.</p><blockquote><p>What else do you think writing can help in your software engineer career?</p></blockquote><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share Awesome Software Engineer&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share Awesome Software Engineer</span></a></p>]]></content:encoded></item><item><title><![CDATA[Why is Refactoring Important?]]></title><description><![CDATA[Continuous Refactoring]]></description><link>https://blog.awesomesoftwareengineer.com/p/why-is-refactoring-important</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/why-is-refactoring-important</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Tue, 24 Oct 2023 13:13:13 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/fa3823ee-6b36-4b64-9d07-1fe15528c1dc_420x300.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Refactoring is a crucial practice in software engineering, akin to an art form. It involves reorganizing existing code and its structures to enhance code quality, readability, and maintainability. During refactoring, superfluous code is typically eliminated to keep the codebase concise and comprehensible. This process aims to simplify and organize complexities within the code.</p><p>In the realm of software development, projects often begin with a straightforward approach, but as new features are introduced, code complexity tends to grow. The original design may become inadequate to accommodate these new requirements. When engineers encounter this situation, they face two options:</p><ol><li><p><strong>Refactoring:</strong> This involves revisiting the existing codebase and improving its design to align with the new requirements. It's about proactively managing and reducing complexity as it arises.</p></li><li><p><strong>Extending the Existing Design:</strong> Alternatively, engineers can choose to patch the existing design to accommodate new features, even if it doesn't fit seamlessly with the original structure. This approach can lead to growing chaos and complexity over time.</p></li></ol><p>Consider the diagram below: In the case of active refactoring, engineers address complexity as it emerges, ensuring that it remains under control. However, without regular refactoring, complexity accumulates until it becomes unmanageable, resulting in a bloated codebase that no one can decipher or extend. At this stage, overhauling the entire project becomes necessary, as opposed to the more incremental and sustainable practice of refactoring.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JTq_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61939a3c-8559-4b31-8684-5368f4b98c98_4119x1628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JTq_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61939a3c-8559-4b31-8684-5368f4b98c98_4119x1628.png 424w, https://substackcdn.com/image/fetch/$s_!JTq_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61939a3c-8559-4b31-8684-5368f4b98c98_4119x1628.png 848w, https://substackcdn.com/image/fetch/$s_!JTq_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61939a3c-8559-4b31-8684-5368f4b98c98_4119x1628.png 1272w, https://substackcdn.com/image/fetch/$s_!JTq_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61939a3c-8559-4b31-8684-5368f4b98c98_4119x1628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JTq_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61939a3c-8559-4b31-8684-5368f4b98c98_4119x1628.png" width="1456" height="575" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/61939a3c-8559-4b31-8684-5368f4b98c98_4119x1628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:575,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:521285,&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_!JTq_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61939a3c-8559-4b31-8684-5368f4b98c98_4119x1628.png 424w, https://substackcdn.com/image/fetch/$s_!JTq_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61939a3c-8559-4b31-8684-5368f4b98c98_4119x1628.png 848w, https://substackcdn.com/image/fetch/$s_!JTq_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61939a3c-8559-4b31-8684-5368f4b98c98_4119x1628.png 1272w, https://substackcdn.com/image/fetch/$s_!JTq_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61939a3c-8559-4b31-8684-5368f4b98c98_4119x1628.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>Refactoring should be a continuous practice and not something left until the code has become excessively bloated. It's essential to identify refactoring points throughout the development process. While pinpointing these points often relies on experience and judgment, some common indicators can help guide your decisions:</p><ol><li><p><strong>Difficulty Adding New Features:</strong> If you encounter challenges when trying to integrate new features into the codebase because the existing structure doesn't easily accommodate them, it's a clear sign that refactoring may be necessary. Refactoring can make the code more flexible and adaptable.</p></li><li><p><strong>Code Maintenance Challenges:</strong> When it becomes challenging to read and understand the code or fix issues that arise during live operations, it's a strong indicator that the code may need refactoring. Complex, convoluted code is prone to errors and difficult to maintain.</p></li><li><p><strong>Lack of Clarity:</strong> If team members frequently seek clarification on the logic and struggle to extend the codebase, it suggests that the code's design and organization may be unclear or inadequate. Refactoring can improve code clarity, making it easier for others to work with.</p></li></ol><p>In essence, a refactoring point is a juncture where the code's current state impedes its maintainability, readability, or adaptability. Addressing these issues as they arise, rather than waiting for code bloat, helps maintain a healthy and manageable codebase throughout the software development lifecycle. Regularly identifying and addressing refactoring points is a proactive approach that contributes to code quality and project sustainability.</p><p>Refactoring serves as an ongoing improvement process that ensures the code remains current, comprehensible, and maintainable. Continuous refactoring brings about several benefits:</p><ol><li><p><strong>Enhanced Developer Experience:</strong> Continuous refactoring improves the overall developer experience. New team members can easily onboard and start working with the codebase. This streamlines the process of understanding the code's structure and logic, leading to a happier and more productive developer team.</p></li><li><p><strong>Improved Maintainability and Readability:</strong> Continuous refactoring ensures that the code consistently mirrors the actual behavior required by the business. It achieves this by presenting the code in an organized and straightforward manner. This level of clarity makes it effortless for developers to read and understand the code, reducing the likelihood of errors and simplifying maintenance tasks.</p></li><li><p><strong>Enhanced Engineering Efficiency:</strong> When code is regularly refactored, developers don't need to invest excessive time and effort deciphering its behavior when working on new features or addressing issues. This heightened efficiency allows for faster development cycles and quicker responses to business needs.</p></li></ol><p>In summary, continuous refactoring is a pivotal practice in software development that fosters a positive developer environment, bolsters code maintainability and readability, and ultimately leads to increased engineering efficiency. It ensures that the codebase remains a valuable and adaptable asset for the organization as it evolves to meet changing business requirements.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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[Optimize API Performance Through Parallelization]]></title><description><![CDATA[Parallelization is useful in such a scenario where a single request from the frontend needs N requests in the backend to compose the data that the frontend needs. Imagine when internal users trigger a &#8220;create order&#8221; request in an internal portal, and the &#8220;create order&#8221; request involves 10 requests from different microservices to complete the action. If one request takes 1 second to complete, it takes 10 seconds in this case.]]></description><link>https://blog.awesomesoftwareengineer.com/p/optimize-api-performance-via-parallelization</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/optimize-api-performance-via-parallelization</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Tue, 17 Oct 2023 12:23:19 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%2F4fd19f83-cd4e-46a6-b31a-f8c7f01b527d_5677x2877.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Parallelization is useful in such a scenario where a single request from the frontend needs N requests in the backend to compose the data that the frontend needs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fg6G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ee07-c70e-4d53-bb00-373b58f38e14_5327x1757.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fg6G!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ee07-c70e-4d53-bb00-373b58f38e14_5327x1757.png 424w, https://substackcdn.com/image/fetch/$s_!fg6G!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ee07-c70e-4d53-bb00-373b58f38e14_5327x1757.png 848w, https://substackcdn.com/image/fetch/$s_!fg6G!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ee07-c70e-4d53-bb00-373b58f38e14_5327x1757.png 1272w, https://substackcdn.com/image/fetch/$s_!fg6G!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ee07-c70e-4d53-bb00-373b58f38e14_5327x1757.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fg6G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ee07-c70e-4d53-bb00-373b58f38e14_5327x1757.png" width="1456" height="480" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f73ee07-c70e-4d53-bb00-373b58f38e14_5327x1757.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:480,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:318391,&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_!fg6G!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ee07-c70e-4d53-bb00-373b58f38e14_5327x1757.png 424w, https://substackcdn.com/image/fetch/$s_!fg6G!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ee07-c70e-4d53-bb00-373b58f38e14_5327x1757.png 848w, https://substackcdn.com/image/fetch/$s_!fg6G!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ee07-c70e-4d53-bb00-373b58f38e14_5327x1757.png 1272w, https://substackcdn.com/image/fetch/$s_!fg6G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f73ee07-c70e-4d53-bb00-373b58f38e14_5327x1757.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>Imagine when internal users trigger a &#8220;create order&#8221; request in an internal portal, and the &#8220;create order&#8221; request involves 10 requests from different microservices to complete the action. If one request takes 1 second to complete, it takes 10 seconds in this case.</p><p>Triggering a request in the frontend and taking 10 seconds to respond back to the frontend is really hurting UX a lot.<br></p><p>Let&#8217;s take a step back. Do we really need to execute the requests sequentially? The requests do not have a dependency, they can all be executed in parallel. In this case, if we change the design to parallel requests, the performance will be improved significantly.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LoAK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e765af-3606-4ed1-a17d-28200a8a31bc_5677x2877.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LoAK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e765af-3606-4ed1-a17d-28200a8a31bc_5677x2877.png 424w, https://substackcdn.com/image/fetch/$s_!LoAK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e765af-3606-4ed1-a17d-28200a8a31bc_5677x2877.png 848w, https://substackcdn.com/image/fetch/$s_!LoAK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e765af-3606-4ed1-a17d-28200a8a31bc_5677x2877.png 1272w, https://substackcdn.com/image/fetch/$s_!LoAK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e765af-3606-4ed1-a17d-28200a8a31bc_5677x2877.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LoAK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e765af-3606-4ed1-a17d-28200a8a31bc_5677x2877.png" width="1456" height="738" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/49e765af-3606-4ed1-a17d-28200a8a31bc_5677x2877.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:738,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:571069,&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_!LoAK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e765af-3606-4ed1-a17d-28200a8a31bc_5677x2877.png 424w, https://substackcdn.com/image/fetch/$s_!LoAK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e765af-3606-4ed1-a17d-28200a8a31bc_5677x2877.png 848w, https://substackcdn.com/image/fetch/$s_!LoAK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e765af-3606-4ed1-a17d-28200a8a31bc_5677x2877.png 1272w, https://substackcdn.com/image/fetch/$s_!LoAK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e765af-3606-4ed1-a17d-28200a8a31bc_5677x2877.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>With parallel requests design, every request is assigned to a dedicated thread and executed concurrently. After submitting to a thread pool, the program waits for all the results to come back. When all the requests are completed, the program aggregates the response and returns it back to the frontend. In this case, 10 seconds waiting time can be reduced to 1 second in the best case as we don&#8217;t need to execute the request one by one. Instead, we execute the 10 requests to 10 different services simultaneously.</p><p>What if we have a dependency between some requests? In this case, we can mix serialization and parallelization together.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!djBK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fd19f83-cd4e-46a6-b31a-f8c7f01b527d_5677x2877.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!djBK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fd19f83-cd4e-46a6-b31a-f8c7f01b527d_5677x2877.png 424w, https://substackcdn.com/image/fetch/$s_!djBK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fd19f83-cd4e-46a6-b31a-f8c7f01b527d_5677x2877.png 848w, https://substackcdn.com/image/fetch/$s_!djBK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fd19f83-cd4e-46a6-b31a-f8c7f01b527d_5677x2877.png 1272w, https://substackcdn.com/image/fetch/$s_!djBK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fd19f83-cd4e-46a6-b31a-f8c7f01b527d_5677x2877.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!djBK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fd19f83-cd4e-46a6-b31a-f8c7f01b527d_5677x2877.png" width="1456" height="738" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4fd19f83-cd4e-46a6-b31a-f8c7f01b527d_5677x2877.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:738,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:579872,&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_!djBK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fd19f83-cd4e-46a6-b31a-f8c7f01b527d_5677x2877.png 424w, https://substackcdn.com/image/fetch/$s_!djBK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fd19f83-cd4e-46a6-b31a-f8c7f01b527d_5677x2877.png 848w, https://substackcdn.com/image/fetch/$s_!djBK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fd19f83-cd4e-46a6-b31a-f8c7f01b527d_5677x2877.png 1272w, https://substackcdn.com/image/fetch/$s_!djBK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fd19f83-cd4e-46a6-b31a-f8c7f01b527d_5677x2877.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>When mixing serialization and parallelization together, we can still optimize the processing time a lot. But this is not going to work when the requests are tightly coupled with each other. Because you always need to wait for a response in order to proceed with the logic flow. In this case, you may consider other optimization strategies.</p><p>In summary, if you have an API that needs to integrate with many services and they don&#8217;t have a dependency on each other. You can consider this optimization approach in order to reduce the waiting time.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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[Serialization vs Parallelization]]></title><description><![CDATA[Serialization Serialization means executing a series of tasks one after the other within a single thread. In other words, these tasks are executed sequentially, with one task starting only after the previous one has completed. Pros Simple: Serailization is simple and straightforward to implement.]]></description><link>https://blog.awesomesoftwareengineer.com/p/serialization-vs-parallelization</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/serialization-vs-parallelization</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Tue, 10 Oct 2023 12:47:27 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%2Fbc68fb17-f5f3-4270-88e1-fd961c1decde_4970x2877.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1>Serialization</h1><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QGoR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa59a08ee-bf0e-4f44-ab14-1aacbdac862f_4970x2457.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QGoR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa59a08ee-bf0e-4f44-ab14-1aacbdac862f_4970x2457.png 424w, https://substackcdn.com/image/fetch/$s_!QGoR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa59a08ee-bf0e-4f44-ab14-1aacbdac862f_4970x2457.png 848w, https://substackcdn.com/image/fetch/$s_!QGoR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa59a08ee-bf0e-4f44-ab14-1aacbdac862f_4970x2457.png 1272w, https://substackcdn.com/image/fetch/$s_!QGoR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa59a08ee-bf0e-4f44-ab14-1aacbdac862f_4970x2457.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QGoR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa59a08ee-bf0e-4f44-ab14-1aacbdac862f_4970x2457.png" width="1456" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a59a08ee-bf0e-4f44-ab14-1aacbdac862f_4970x2457.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:292219,&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_!QGoR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa59a08ee-bf0e-4f44-ab14-1aacbdac862f_4970x2457.png 424w, https://substackcdn.com/image/fetch/$s_!QGoR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa59a08ee-bf0e-4f44-ab14-1aacbdac862f_4970x2457.png 848w, https://substackcdn.com/image/fetch/$s_!QGoR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa59a08ee-bf0e-4f44-ab14-1aacbdac862f_4970x2457.png 1272w, https://substackcdn.com/image/fetch/$s_!QGoR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa59a08ee-bf0e-4f44-ab14-1aacbdac862f_4970x2457.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>Serialization means executing a series of tasks one after the other within a single thread. In other words, these tasks are executed sequentially, with one task starting only after the previous one has completed.</p><h4>Pros</h4><ul><li><p><strong>Simple:</strong> Serailization is simple and straightforward to implement.</p></li><li><p><strong>Resource Efficiency:</strong> Unlike a multithreaded program, serialization uses a single thread to handle a series of tasks, so it requires fewer system resources.</p></li></ul><h4>Cons</h4><ul><li><p><strong>Slower Execution:</strong> It executes the tasks one by one. So, it only starts a new task when the previous task has been completed.</p></li><li><p><strong>Inefficient Resource Utilization:</strong> Serialization may not efficiently utilize system resources in a system with a multicore CPU.</p></li></ul><h1>Parallelization</h1><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bNDY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc68fb17-f5f3-4270-88e1-fd961c1decde_4970x2877.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bNDY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc68fb17-f5f3-4270-88e1-fd961c1decde_4970x2877.png 424w, https://substackcdn.com/image/fetch/$s_!bNDY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc68fb17-f5f3-4270-88e1-fd961c1decde_4970x2877.png 848w, https://substackcdn.com/image/fetch/$s_!bNDY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc68fb17-f5f3-4270-88e1-fd961c1decde_4970x2877.png 1272w, https://substackcdn.com/image/fetch/$s_!bNDY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc68fb17-f5f3-4270-88e1-fd961c1decde_4970x2877.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bNDY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc68fb17-f5f3-4270-88e1-fd961c1decde_4970x2877.png" width="1456" height="843" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc68fb17-f5f3-4270-88e1-fd961c1decde_4970x2877.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:843,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:372871,&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_!bNDY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc68fb17-f5f3-4270-88e1-fd961c1decde_4970x2877.png 424w, https://substackcdn.com/image/fetch/$s_!bNDY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc68fb17-f5f3-4270-88e1-fd961c1decde_4970x2877.png 848w, https://substackcdn.com/image/fetch/$s_!bNDY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc68fb17-f5f3-4270-88e1-fd961c1decde_4970x2877.png 1272w, https://substackcdn.com/image/fetch/$s_!bNDY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc68fb17-f5f3-4270-88e1-fd961c1decde_4970x2877.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>Parallelization means executing a series of tasks in multiple threads, one task is assigned to a dedicated thread. In other words, these tasks are executed in parallel. This approach allows for better utilization of multiple CPU cores and can lead to improved performance and responsiveness in applications.</p><h4>Pros</h4><ul><li><p><strong>Improved Performance:</strong> One of the primary benefits of parallelization is improved performance. By executing tasks concurrently on multiple CPU cores, you can significantly reduce the overall execution time of a program.</p></li><li><p><strong>Resource Utilization:</strong> Parallelization efficiently utilizes available hardware resources. It enables better use of multi-core processors and can lead to more efficient resource utilization in distributed computing environments.</p></li></ul><p></p><h4>Cons</h4><ul><li><p><strong>Overhead:</strong> Managing threads comes with overhead, including context switching and memory usage. This overhead can offset performance gains for small tasks.</p></li><li><p><strong>Complexity:</strong> Parallelization introduces complexity into software design. Managing multiple threads, coordinating their activities, and handling synchronization can be challenging.</p></li><li><p><strong>Debugging:</strong> Debugging parallel code can be more challenging and time-consuming. Issues may be difficult to reproduce and diagnose.</p></li></ul><p></p><p>In summary, they both have their pros and cons. Choose the approach wisely depending on different use cases. The key is to understand the nature of your tasks and the trade-offs involved. In many cases, a combination of both techniques may be appropriate. Ultimately, the choice should align with your application's specific needs and goals.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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[Enhancing API Performance Through Batch Requests]]></title><description><![CDATA[Single Requests and Batch Requests]]></description><link>https://blog.awesomesoftwareengineer.com/p/enhancing-api-performance-through</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/enhancing-api-performance-through</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Mon, 02 Oct 2023 04:02: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%2F02299a4f-3f1e-4fba-a0ea-26fab7beba8c_3080x2268.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When designing an API, tailoring it to the specific use case is of utmost importance. This involves considering two primary design approaches: <strong>Single Requests and Batch Requests</strong>. Each approach has its own set of advantages and disadvantages, and making the right choice depends on the scenarios you encounter.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!w32t!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca9bf1c3-8996-4ff2-8983-d5133a40755b_4025x1988.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!w32t!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca9bf1c3-8996-4ff2-8983-d5133a40755b_4025x1988.png 424w, https://substackcdn.com/image/fetch/$s_!w32t!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca9bf1c3-8996-4ff2-8983-d5133a40755b_4025x1988.png 848w, https://substackcdn.com/image/fetch/$s_!w32t!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca9bf1c3-8996-4ff2-8983-d5133a40755b_4025x1988.png 1272w, https://substackcdn.com/image/fetch/$s_!w32t!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca9bf1c3-8996-4ff2-8983-d5133a40755b_4025x1988.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!w32t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca9bf1c3-8996-4ff2-8983-d5133a40755b_4025x1988.png" width="1456" height="719" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ca9bf1c3-8996-4ff2-8983-d5133a40755b_4025x1988.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:719,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1863007,&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_!w32t!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca9bf1c3-8996-4ff2-8983-d5133a40755b_4025x1988.png 424w, https://substackcdn.com/image/fetch/$s_!w32t!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca9bf1c3-8996-4ff2-8983-d5133a40755b_4025x1988.png 848w, https://substackcdn.com/image/fetch/$s_!w32t!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca9bf1c3-8996-4ff2-8983-d5133a40755b_4025x1988.png 1272w, https://substackcdn.com/image/fetch/$s_!w32t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca9bf1c3-8996-4ff2-8983-d5133a40755b_4025x1988.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><h2><strong>Single Requests</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_!zuEd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde495f44-7491-4307-aabe-ddf53fc7c24a_1500x1187.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zuEd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde495f44-7491-4307-aabe-ddf53fc7c24a_1500x1187.png 424w, https://substackcdn.com/image/fetch/$s_!zuEd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde495f44-7491-4307-aabe-ddf53fc7c24a_1500x1187.png 848w, https://substackcdn.com/image/fetch/$s_!zuEd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde495f44-7491-4307-aabe-ddf53fc7c24a_1500x1187.png 1272w, https://substackcdn.com/image/fetch/$s_!zuEd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde495f44-7491-4307-aabe-ddf53fc7c24a_1500x1187.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zuEd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde495f44-7491-4307-aabe-ddf53fc7c24a_1500x1187.png" width="1456" height="1152" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de495f44-7491-4307-aabe-ddf53fc7c24a_1500x1187.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1152,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:121178,&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_!zuEd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde495f44-7491-4307-aabe-ddf53fc7c24a_1500x1187.png 424w, https://substackcdn.com/image/fetch/$s_!zuEd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde495f44-7491-4307-aabe-ddf53fc7c24a_1500x1187.png 848w, https://substackcdn.com/image/fetch/$s_!zuEd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde495f44-7491-4307-aabe-ddf53fc7c24a_1500x1187.png 1272w, https://substackcdn.com/image/fetch/$s_!zuEd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde495f44-7491-4307-aabe-ddf53fc7c24a_1500x1187.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>In the Single Requests approach, API consumers initiate multiple requests independently. For instance, if you need to send inbox notifications to various users, under this design, each request must be sent one after the other. However, this method may not be the most efficient. Each request incurs network overhead and necessitates waiting for individual responses. Particularly in scenarios where the same request needs to be repeatedly sent to the API provider, this approach becomes inefficient and resource-intensive.</p><p></p><h2><strong>Batch Requests</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_!w7bI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6f5b6d-242c-4c4d-9e3e-907d555baab1_1500x1187.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!w7bI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6f5b6d-242c-4c4d-9e3e-907d555baab1_1500x1187.png 424w, https://substackcdn.com/image/fetch/$s_!w7bI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6f5b6d-242c-4c4d-9e3e-907d555baab1_1500x1187.png 848w, https://substackcdn.com/image/fetch/$s_!w7bI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6f5b6d-242c-4c4d-9e3e-907d555baab1_1500x1187.png 1272w, https://substackcdn.com/image/fetch/$s_!w7bI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6f5b6d-242c-4c4d-9e3e-907d555baab1_1500x1187.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!w7bI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6f5b6d-242c-4c4d-9e3e-907d555baab1_1500x1187.png" width="1456" height="1152" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8a6f5b6d-242c-4c4d-9e3e-907d555baab1_1500x1187.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1152,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:97908,&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_!w7bI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6f5b6d-242c-4c4d-9e3e-907d555baab1_1500x1187.png 424w, https://substackcdn.com/image/fetch/$s_!w7bI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6f5b6d-242c-4c4d-9e3e-907d555baab1_1500x1187.png 848w, https://substackcdn.com/image/fetch/$s_!w7bI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6f5b6d-242c-4c4d-9e3e-907d555baab1_1500x1187.png 1272w, https://substackcdn.com/image/fetch/$s_!w7bI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6f5b6d-242c-4c4d-9e3e-907d555baab1_1500x1187.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>On the other hand, the Batch Requests design streamlines the process. When, for instance, inbox notifications need to be sent to a hundred users, this approach requires only a single invocation of the notification API. This optimizes network overhead significantly. Yet, it introduces complexities, such as managing invalid requests within the batch and the intricacies of the overall design. Error handling and determining the source of failures become more intricate when compared to the Single Requests design.</p><p></p><h2><strong>The Right Choice</strong></h2><p>Choosing between these two approaches isn't straightforward and depends on the specific context. Neither approach is universally superior; rather, each has its strengths for particular use cases. The decision hinges on factors such as the nature of the operations, the frequency of requests, and the balance between network efficiency and design 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_!K-WI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02299a4f-3f1e-4fba-a0ea-26fab7beba8c_3080x2268.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!K-WI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02299a4f-3f1e-4fba-a0ea-26fab7beba8c_3080x2268.png 424w, https://substackcdn.com/image/fetch/$s_!K-WI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02299a4f-3f1e-4fba-a0ea-26fab7beba8c_3080x2268.png 848w, https://substackcdn.com/image/fetch/$s_!K-WI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02299a4f-3f1e-4fba-a0ea-26fab7beba8c_3080x2268.png 1272w, https://substackcdn.com/image/fetch/$s_!K-WI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02299a4f-3f1e-4fba-a0ea-26fab7beba8c_3080x2268.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!K-WI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02299a4f-3f1e-4fba-a0ea-26fab7beba8c_3080x2268.png" width="1456" height="1072" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/02299a4f-3f1e-4fba-a0ea-26fab7beba8c_3080x2268.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1072,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:377763,&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_!K-WI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02299a4f-3f1e-4fba-a0ea-26fab7beba8c_3080x2268.png 424w, https://substackcdn.com/image/fetch/$s_!K-WI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02299a4f-3f1e-4fba-a0ea-26fab7beba8c_3080x2268.png 848w, https://substackcdn.com/image/fetch/$s_!K-WI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02299a4f-3f1e-4fba-a0ea-26fab7beba8c_3080x2268.png 1272w, https://substackcdn.com/image/fetch/$s_!K-WI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02299a4f-3f1e-4fba-a0ea-26fab7beba8c_3080x2268.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>This is a simplified mental model that could help you choose the right API design. To find the optimal solution, consider a hybrid approach. Employ Single Requests for simple, critical operations, and leverage Batch Requests for tasks involving a large volume of requests that can benefit from reduced network overhead. Ultimately, the best approach aligns with your application's unique requirements and goals.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share Awesome Software Engineer&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share Awesome Software Engineer</span></a></p>]]></content:encoded></item><item><title><![CDATA[How do you delegate your tasks to others?]]></title><description><![CDATA[Delegation stands as a critical skill that every software engineer should cultivate. I've observed numerous instances where engineers delegate tasks but fail to maintain active involvement thereafter. This is not an effective way to delegate tasks and is not fair to others. In my opinion, delegating tasks is an opportunity to free one engineer and grow another engineer. Delegating tasks is not just about passing off work, but rather a strategic and collaborative approach to getting things done efficiently while fostering growth and learning.]]></description><link>https://blog.awesomesoftwareengineer.com/p/how-do-you-delegate-your-tasks-to</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/how-do-you-delegate-your-tasks-to</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Wed, 20 Sep 2023 12:56:04 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/c8f90210-7b7c-40ac-91d4-ad14dd28ef74_420x300.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Delegation stands as a critical skill that every software engineer should cultivate. I've observed numerous instances where engineers delegate tasks but fail to maintain active involvement thereafter. This is not an effective way to delegate tasks and is not fair to others. In my opinion, delegating tasks is an opportunity to free one engineer and grow another engineer. Delegating tasks is not just about passing off work, but rather a strategic and collaborative approach to getting things done efficiently while fostering growth and learning.</p><p>My approach to delegating tasks involves several key steps:</p><ol><li><p><strong>Gather information and set a clear expectation</strong></p></li></ol><p>When delegating a task to another engineer, there might be a lack of clarity on how to proceed. To address this, my usual approach involves gathering all necessary task-related information prior to delegation. This ensures that when the new engineer assumes the task, they have a comprehensive understanding of the required steps for its completion. Alternatively, It is better to outline specific instructions to guide them toward the relevant information sources. Subsequently, it becomes imperative to establish distinct expectations, encompassing the task's scope and anticipated outcomes. This approach fosters a mutual understanding of the intended results and minimizes any potential uncertainties. By adhering to this method, effective task delegation is achieved, circumventing the need for prolonged back-and-forth communication. Furthermore, this proactive clarity assures that the task progresses correctly and aligns precisely with the desired outcome.</p><ol start="2"><li><p><strong>Step in when challenges arise</strong></p></li></ol><p>Step in when a task encounters obstacles or unforeseen incidents. Despite delegating the tasks, you retain ownership and bear the responsibility of assisting others in resolving blockers or unexpected situations. Your role involves ensuring a seamless engineering process during development and aiding your team's focus on their essential tasks.</p><ol start="3"><li><p><strong>Actively progress monitoring</strong></p></li></ol><p>Delegation is not a complete transfer of ownership; instead, it expands the support network. Therefore, maintaining an active role in monitoring progress is crucial. Regular progress checks allow me to gauge the trajectory of tasks, verify alignment with objectives, and offer timely assistance as required.</p><ol start="4"><li><p><strong>Provide constructive feedback during code/design review</strong></p></li></ol><p>Delegation benefits both the person assigning tasks and the one receiving them. As a delegator, I gain the freedom to focus on important matters, while the delegatee gains valuable experience and added responsibilities. Giving positive feedback is crucial for their growth, and constructive feedback helps them improve further. Feedback also helps align expectations for outcomes. While it might require initial effort, the rewards increase over time. As the delegatee improves, the delegation process becomes smoother in the future.</p><div><hr></div><p>In summary, delegation is more than just giving tasks&#8212;it's a collaborative strategy that promotes growth. By gathering information, staying engaged, tracking progress, and giving feedback, delegation becomes a rewarding experience for everyone. It helps with growth, efficient tasks, and teamwork in the ever-changing world of software engineering.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share Awesome Software Engineer&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share Awesome Software Engineer</span></a></p>]]></content:encoded></item><item><title><![CDATA[Exploring Architecture: What Does It Really Mean?]]></title><description><![CDATA[Architecture is not just to solve engineering challenges]]></description><link>https://blog.awesomesoftwareengineer.com/p/exploring-architecture-what-does</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/exploring-architecture-what-does</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Tue, 05 Sep 2023 12:44:41 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%2F8f741647-9144-4d33-b126-72544b0a079a_7210x3759.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I have been delving into architecture across many discussions. But what exactly does architecture mean? While many might perceive architecture as the utilization of technologies to address engineering challenges &#8211; which is indeed one of its core objectives &#8211; it includes more than just that. It serves as a guiding framework at various project stages, beyond engineering hurdles.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pY55!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f741647-9144-4d33-b126-72544b0a079a_7210x3759.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pY55!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f741647-9144-4d33-b126-72544b0a079a_7210x3759.png 424w, https://substackcdn.com/image/fetch/$s_!pY55!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f741647-9144-4d33-b126-72544b0a079a_7210x3759.png 848w, https://substackcdn.com/image/fetch/$s_!pY55!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f741647-9144-4d33-b126-72544b0a079a_7210x3759.png 1272w, https://substackcdn.com/image/fetch/$s_!pY55!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f741647-9144-4d33-b126-72544b0a079a_7210x3759.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pY55!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f741647-9144-4d33-b126-72544b0a079a_7210x3759.png" width="1456" height="759" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8f741647-9144-4d33-b126-72544b0a079a_7210x3759.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:759,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:783874,&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_!pY55!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f741647-9144-4d33-b126-72544b0a079a_7210x3759.png 424w, https://substackcdn.com/image/fetch/$s_!pY55!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f741647-9144-4d33-b126-72544b0a079a_7210x3759.png 848w, https://substackcdn.com/image/fetch/$s_!pY55!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f741647-9144-4d33-b126-72544b0a079a_7210x3759.png 1272w, https://substackcdn.com/image/fetch/$s_!pY55!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f741647-9144-4d33-b126-72544b0a079a_7210x3759.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>The underlying purpose of architecture extends to the identification of intricacies, risk assessment, communication, and the strategic allocation and integration of resources.</p><p><strong>Integration and Allocation of Resources</strong></p><p>A pivotal consideration in architectural decisions is an awareness of existing engineering resources. Resource availability determines whether the team possesses sufficient engineering capacities to facilitate a timely feature rollout, thereby impacting time-to-market. During the architectural phase, it becomes imperative to measure the necessary engineering resources required and assess their value proposition. Given the precious nature of engineering resources, strategic investment in the right areas is crucial to enhance product value. If a feature holds substantial significance, a proportional augmentation of resources can be allocated. This necessitates the seamless integration and judicious allocation of all available resources.</p><p><strong>Management of Risk</strong></p><p>Once the resource allocation is outlined, risk evaluation becomes paramount. The architecture design phase mandates a comprehensive assessment of potential risks, necessitating trade-offs and decisions to be made. The acceptability of these risks upon deployment becomes a vital consideration. By effectively mitigating explicit and critical risks, it becomes feasible to control the impact of challenges that may exceed the architecture's capabilities.</p><p><strong>Control of Complexity</strong></p><p>A fundamental facet of architecture pertains to complexity management. Each design inherently carries a level of complexity, but not all levels are tenable for a given team. During the architectural blueprinting, it becomes imperative to account for the team's proficiency and resource availability. This strategic consideration aids in maintaining a complexity threshold that aligns with the team's capabilities, fostering a sustainable architecture. Architecture is not a universal solution but varies depending on the situation. To create an effective solution, we should eliminate unnecessary complexity and create a design to address the specific problem we intend to solve.</p><p><strong>Communication and Collaboration</strong></p><p>Architecture acts as a communication tool connecting team members, stakeholders, and various technical and non-technical groups engaged in the project. A clearly outlined design document plays a crucial role in ensuring that everyone comprehends the project's framework and objectives.</p><div><hr></div><p>In a nutshell, architecture's purpose extends beyond engineering challenges. It aids in resource optimization, risk mitigation, complexity control, and effective communication, making it a pivotal factor in successful project development.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share Awesome Software Engineer&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share Awesome Software Engineer</span></a></p>]]></content:encoded></item><item><title><![CDATA[Design Space Optimization]]></title><description><![CDATA[Abstraction-driven Design and Simplicity-focused Design]]></description><link>https://blog.awesomesoftwareengineer.com/p/design-space-optimization</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/design-space-optimization</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Thu, 31 Aug 2023 12:51:05 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%2Fff55bcbd-4c18-47e3-95a2-d59e5fe72cd9_6027x3178.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the realm of software engineering, two contrasting development approaches emerge: abstraction-driven design and simplicity-focused design.</p><ul><li><p>Abstraction-driven Design</p></li></ul><p>People who champion the abstraction-first method are all about thinking ahead. They're like the fortune-tellers of software - they try to predict future needs and design solutions that can be reused down the line. It's like building a universal toolkit for future problems. But here's the kicker: these predictions are made in a complex, ever-changing business world. Sometimes, reality takes a different route, and suddenly that fancy design doesn't fit the puzzle anymore and leads to a rigid design that is hard to adapt.</p><ul><li><p>Simplicity-focused Design</p></li></ul><p>On the flip side, we've got the keep-it-simple believers. They're the pragmatists of the software engineering world. They say, "Hey, let's not complicate things until we have to." They build straightforward, no-nonsense solutions that are easy to wrap your head around. These guys are all about preserving design space for future extension. It's like having a roomy backpack that you can stuff with new tools whenever you need them. Of course, this approach comes with a catch &#8211; you need to roll up your sleeves and refactor stuff every now and then to stay up to date with the ever-changing business scene.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VGAU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07c8fd5a-980c-4a52-a4f1-94e9bfb80d4b_4914x4501.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VGAU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07c8fd5a-980c-4a52-a4f1-94e9bfb80d4b_4914x4501.png 424w, https://substackcdn.com/image/fetch/$s_!VGAU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07c8fd5a-980c-4a52-a4f1-94e9bfb80d4b_4914x4501.png 848w, https://substackcdn.com/image/fetch/$s_!VGAU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07c8fd5a-980c-4a52-a4f1-94e9bfb80d4b_4914x4501.png 1272w, https://substackcdn.com/image/fetch/$s_!VGAU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07c8fd5a-980c-4a52-a4f1-94e9bfb80d4b_4914x4501.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VGAU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07c8fd5a-980c-4a52-a4f1-94e9bfb80d4b_4914x4501.png" width="1456" height="1334" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/07c8fd5a-980c-4a52-a4f1-94e9bfb80d4b_4914x4501.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1334,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5971350,&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_!VGAU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07c8fd5a-980c-4a52-a4f1-94e9bfb80d4b_4914x4501.png 424w, https://substackcdn.com/image/fetch/$s_!VGAU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07c8fd5a-980c-4a52-a4f1-94e9bfb80d4b_4914x4501.png 848w, https://substackcdn.com/image/fetch/$s_!VGAU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07c8fd5a-980c-4a52-a4f1-94e9bfb80d4b_4914x4501.png 1272w, https://substackcdn.com/image/fetch/$s_!VGAU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07c8fd5a-980c-4a52-a4f1-94e9bfb80d4b_4914x4501.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>The diagram depicts the trajectory of the simplicity-focused approach. Beginning with a specific and tangible design, this methodology iteratively hones the solution over time. This approach resonates with scenarios where simplicity offers greater appeal than elaborate abstraction, except when abstraction genuinely simplifies matters.</p><p>In a rapidly expanding product company, simplicity in design is key to allowing ample space for future iterations. Given the swift evolution of product requirements, a simple design approach is preferred. Delving too deeply into future possibilities from the outset can inadvertently constrain the design space, complicating understanding for others. This occurs when code becomes overly abstract and generalized.</p><p>To elaborate, <strong>"abstract and generic" signifies an intention to address multiple potential problems, whereas "concrete and specific" pertains to addressing a singular issue</strong>. Applying a versatile solution to a single problem elevates cognitive load &#8211; the mental effort required to comprehend the intricacies. Striking a balance between abstraction and specificity thus emerges as a crucial consideration in managing the design space effectively.</p><p>The trade-off is evident: increasing abstraction might obscure comprehension due to numerous assumptions embedded in the design. Consequently, it reduces future expansion possibilities and amplifies the ripple effect of logic changes. In contrast, starting with a concrete solution promotes clarity, facilitating accessibility even for individuals lacking specialized backgrounds. This approach also fosters a more expansive design space, conducive to accommodating future extensions. Adaptation to evolving business needs can be achieved through strategic refactoring.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T80H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55bcbd-4c18-47e3-95a2-d59e5fe72cd9_6027x3178.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T80H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55bcbd-4c18-47e3-95a2-d59e5fe72cd9_6027x3178.png 424w, https://substackcdn.com/image/fetch/$s_!T80H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55bcbd-4c18-47e3-95a2-d59e5fe72cd9_6027x3178.png 848w, https://substackcdn.com/image/fetch/$s_!T80H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55bcbd-4c18-47e3-95a2-d59e5fe72cd9_6027x3178.png 1272w, https://substackcdn.com/image/fetch/$s_!T80H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55bcbd-4c18-47e3-95a2-d59e5fe72cd9_6027x3178.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T80H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55bcbd-4c18-47e3-95a2-d59e5fe72cd9_6027x3178.png" width="1456" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ff55bcbd-4c18-47e3-95a2-d59e5fe72cd9_6027x3178.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2340451,&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_!T80H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55bcbd-4c18-47e3-95a2-d59e5fe72cd9_6027x3178.png 424w, https://substackcdn.com/image/fetch/$s_!T80H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55bcbd-4c18-47e3-95a2-d59e5fe72cd9_6027x3178.png 848w, https://substackcdn.com/image/fetch/$s_!T80H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55bcbd-4c18-47e3-95a2-d59e5fe72cd9_6027x3178.png 1272w, https://substackcdn.com/image/fetch/$s_!T80H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55bcbd-4c18-47e3-95a2-d59e5fe72cd9_6027x3178.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's crucial to recognize that design space contracts over iterations as complexity accumulates. Establishing a refactoring culture becomes paramount to maintaining a reasonable design space and ensuring future extensions remain feasible. Typically, a concrete solution offers a broader design space, whereas abstraction's inherent assumptions restrict it.</p><p>If you're finding it challenging to make changes when new requirements pop up, that could be a sign that your code needs some refactoring. It suggests that your design space might be too limited, making it tough to make necessary iterations smoothly.</p><div><hr></div><p>In conclusion, software engineering offers two distinct approaches: abstraction-driven design and simplicity-focused design. Striking a balance between predicting future needs and maintaining adaptability is key. The challenge lies in managing design space as complexity grows, necessitating occasional refactoring. Agility, openness to change, and a pragmatic mindset are essential for optimizing design and creating resilient software solutions that can evolve alongside evolving business requirements.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share Awesome Software Engineer&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share Awesome Software Engineer</span></a></p>]]></content:encoded></item><item><title><![CDATA[Navigating Complex Problem Spaces: Breakdown and Direction]]></title><description><![CDATA[How to manage a problem?]]></description><link>https://blog.awesomesoftwareengineer.com/p/navigating-complex-problem-spaces</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/navigating-complex-problem-spaces</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Tue, 22 Aug 2023 12:17:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd794ec1b-46b8-4568-8ea0-021591c9b325_5096x4333.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_!JXWi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb34c29-8bdb-49ae-a037-1718a6aca601_5306x2758.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JXWi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb34c29-8bdb-49ae-a037-1718a6aca601_5306x2758.png 424w, https://substackcdn.com/image/fetch/$s_!JXWi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb34c29-8bdb-49ae-a037-1718a6aca601_5306x2758.png 848w, https://substackcdn.com/image/fetch/$s_!JXWi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb34c29-8bdb-49ae-a037-1718a6aca601_5306x2758.png 1272w, https://substackcdn.com/image/fetch/$s_!JXWi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb34c29-8bdb-49ae-a037-1718a6aca601_5306x2758.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JXWi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb34c29-8bdb-49ae-a037-1718a6aca601_5306x2758.png" width="1456" height="757" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0bb34c29-8bdb-49ae-a037-1718a6aca601_5306x2758.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:757,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5882768,&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_!JXWi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb34c29-8bdb-49ae-a037-1718a6aca601_5306x2758.png 424w, https://substackcdn.com/image/fetch/$s_!JXWi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb34c29-8bdb-49ae-a037-1718a6aca601_5306x2758.png 848w, https://substackcdn.com/image/fetch/$s_!JXWi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb34c29-8bdb-49ae-a037-1718a6aca601_5306x2758.png 1272w, https://substackcdn.com/image/fetch/$s_!JXWi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb34c29-8bdb-49ae-a037-1718a6aca601_5306x2758.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>In the realm of software engineering, a problem can often be immense. When embarking on problem-solving, comprehending the scope of the issue becomes paramount. This encompasses the problem space, a comprehensive domain encompassing all aspects of the problem. Imagine it as a landscape with various contours. As software engineers, it's crucial to skillfully deconstruct a problem into manageable fragments. This practice not only simplifies complexity but also allows teams to concentrate on specific and controllable components.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!clHk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd794ec1b-46b8-4568-8ea0-021591c9b325_5096x4333.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!clHk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd794ec1b-46b8-4568-8ea0-021591c9b325_5096x4333.png 424w, https://substackcdn.com/image/fetch/$s_!clHk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd794ec1b-46b8-4568-8ea0-021591c9b325_5096x4333.png 848w, https://substackcdn.com/image/fetch/$s_!clHk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd794ec1b-46b8-4568-8ea0-021591c9b325_5096x4333.png 1272w, https://substackcdn.com/image/fetch/$s_!clHk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd794ec1b-46b8-4568-8ea0-021591c9b325_5096x4333.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!clHk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd794ec1b-46b8-4568-8ea0-021591c9b325_5096x4333.png" width="1456" height="1238" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d794ec1b-46b8-4568-8ea0-021591c9b325_5096x4333.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1238,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:6198701,&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_!clHk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd794ec1b-46b8-4568-8ea0-021591c9b325_5096x4333.png 424w, https://substackcdn.com/image/fetch/$s_!clHk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd794ec1b-46b8-4568-8ea0-021591c9b325_5096x4333.png 848w, https://substackcdn.com/image/fetch/$s_!clHk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd794ec1b-46b8-4568-8ea0-021591c9b325_5096x4333.png 1272w, https://substackcdn.com/image/fetch/$s_!clHk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd794ec1b-46b8-4568-8ea0-021591c9b325_5096x4333.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>An immense problem space is a signal of potential intricacies and implies multiple avenues for resolution and various directions to explore. However, an abundance of choices without clear direction can confound the team. Visualize a map with numerous paths &#8211; without guidance, the team can lose their way, and decision-making becomes a daunting task. The result? A team adrift, grappling with an assortment of details and losing sight of the core issue at hand. So, what is the core problem that the team aims to solve? This is an important question that determines how far a team can go.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!m91l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54cc4da-ecad-443e-83b9-81ae0365468e_2751x3227.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!m91l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54cc4da-ecad-443e-83b9-81ae0365468e_2751x3227.png 424w, https://substackcdn.com/image/fetch/$s_!m91l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54cc4da-ecad-443e-83b9-81ae0365468e_2751x3227.png 848w, https://substackcdn.com/image/fetch/$s_!m91l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54cc4da-ecad-443e-83b9-81ae0365468e_2751x3227.png 1272w, https://substackcdn.com/image/fetch/$s_!m91l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54cc4da-ecad-443e-83b9-81ae0365468e_2751x3227.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!m91l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54cc4da-ecad-443e-83b9-81ae0365468e_2751x3227.png" width="1456" height="1708" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f54cc4da-ecad-443e-83b9-81ae0365468e_2751x3227.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1708,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5083465,&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_!m91l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54cc4da-ecad-443e-83b9-81ae0365468e_2751x3227.png 424w, https://substackcdn.com/image/fetch/$s_!m91l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54cc4da-ecad-443e-83b9-81ae0365468e_2751x3227.png 848w, https://substackcdn.com/image/fetch/$s_!m91l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54cc4da-ecad-443e-83b9-81ae0365468e_2751x3227.png 1272w, https://substackcdn.com/image/fetch/$s_!m91l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54cc4da-ecad-443e-83b9-81ae0365468e_2751x3227.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>Contending with an extensive problem space necessitates a dual approach: breaking down and establishing direction. First, the task involves fragmenting the immense problem into smaller, more approachable sub-problems. Next comes the crucial step of defining a precise direction to guide the team's efforts. Ultimately, all the components are harmonized into a cohesive whole. This strategic methodology aligns with the age-old "divide and conquer" philosophy.</p><p>To make it short, the significance of these steps becomes apparent for problem-solving:</p><ul><li><p><strong>Problem Decomposition</strong>: Divide and Conquer emerge as a powerful technique for unraveling complex issues, transforming them into manageable parts.</p></li><li><p><strong>Prioritization</strong>: By prioritizing tasks, teams identify key objectives and allocate attention where it matters most.</p></li><li><p><strong>Decisive Action and Focus</strong>: A well-defined direction sharpens focus, streamlines tasks, and eliminates superfluous steps, guiding both team and product towards desired outcomes.</p></li><li><p><strong>Iterative Approach</strong>: Problem-solving rarely follows a straight line; iterative cycles enable adjustment and growth. Flexibility remains essential as teams refine strategies based on insights gained.</p></li></ul><p>In summary, grappling with intricate problem spaces in software engineering necessitates a strategic approach. Understanding the scope of the issue, fragmenting it into manageable components, defining a clear direction, and embracing the "divide and conquer" concept is integral to effective and efficient problem resolution.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share Awesome Software Engineer&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share Awesome Software Engineer</span></a></p>]]></content:encoded></item><item><title><![CDATA[Do you use pagination right?]]></title><description><![CDATA[Offset-based Pagination vs Cursor-based Pagination]]></description><link>https://blog.awesomesoftwareengineer.com/p/do-you-use-pagination-right</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/do-you-use-pagination-right</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Tue, 15 Aug 2023 11:08:40 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%2Fd8ccd831-7a8a-4605-baf7-771aeb14fe5f_3752x2667.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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>Pagination is a valuable approach for enhancing data retrieval performance. In a previous post, I discussed the implementation of Pagination in API design. However, it's important to be aware of a potential pitfall associated with this pagination technique. In software engineering, there are two primary types of Pagination: Offset-based Pagination and Cursor-based Pagination.</p><h1>Offset-based Pagination</h1><p>Offset-based pagination, the technique I previously introduced, offers simplicity in design and flexibility for navigating to any desired page.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Wu7D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb85de8-f560-46c4-a9fc-8c90e759584a_2807x217.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Wu7D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb85de8-f560-46c4-a9fc-8c90e759584a_2807x217.png 424w, https://substackcdn.com/image/fetch/$s_!Wu7D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb85de8-f560-46c4-a9fc-8c90e759584a_2807x217.png 848w, https://substackcdn.com/image/fetch/$s_!Wu7D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb85de8-f560-46c4-a9fc-8c90e759584a_2807x217.png 1272w, https://substackcdn.com/image/fetch/$s_!Wu7D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb85de8-f560-46c4-a9fc-8c90e759584a_2807x217.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Wu7D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb85de8-f560-46c4-a9fc-8c90e759584a_2807x217.png" width="1456" height="113" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/afb85de8-f560-46c4-a9fc-8c90e759584a_2807x217.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:113,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:49449,&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_!Wu7D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb85de8-f560-46c4-a9fc-8c90e759584a_2807x217.png 424w, https://substackcdn.com/image/fetch/$s_!Wu7D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb85de8-f560-46c4-a9fc-8c90e759584a_2807x217.png 848w, https://substackcdn.com/image/fetch/$s_!Wu7D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb85de8-f560-46c4-a9fc-8c90e759584a_2807x217.png 1272w, https://substackcdn.com/image/fetch/$s_!Wu7D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb85de8-f560-46c4-a9fc-8c90e759584a_2807x217.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>This visualizes how offset-based pagination navigates pages. With this design, users can simply jump to any page that they want.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!X0EH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213f995c-9470-4882-b36d-09cc1b93a0dc_3752x2667.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!X0EH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213f995c-9470-4882-b36d-09cc1b93a0dc_3752x2667.png 424w, https://substackcdn.com/image/fetch/$s_!X0EH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213f995c-9470-4882-b36d-09cc1b93a0dc_3752x2667.png 848w, https://substackcdn.com/image/fetch/$s_!X0EH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213f995c-9470-4882-b36d-09cc1b93a0dc_3752x2667.png 1272w, https://substackcdn.com/image/fetch/$s_!X0EH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213f995c-9470-4882-b36d-09cc1b93a0dc_3752x2667.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!X0EH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213f995c-9470-4882-b36d-09cc1b93a0dc_3752x2667.png" width="1456" height="1035" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/213f995c-9470-4882-b36d-09cc1b93a0dc_3752x2667.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1035,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:436365,&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_!X0EH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213f995c-9470-4882-b36d-09cc1b93a0dc_3752x2667.png 424w, https://substackcdn.com/image/fetch/$s_!X0EH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213f995c-9470-4882-b36d-09cc1b93a0dc_3752x2667.png 848w, https://substackcdn.com/image/fetch/$s_!X0EH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213f995c-9470-4882-b36d-09cc1b93a0dc_3752x2667.png 1272w, https://substackcdn.com/image/fetch/$s_!X0EH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213f995c-9470-4882-b36d-09cc1b93a0dc_3752x2667.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><code>select * from target_table where x &gt; y order by id skip 0 limit 8;</code></p><p><code>select * from target_table where x &gt; y order by id skip 8 limit 8;</code></p><p><code>select * from target_table where x &gt; y order by id skip 16 limit 8;</code></p><p><code>select * from target_table where x &gt; y order by id skip 24 limit 8;</code></p><p><code>select * from target_table where x &gt; y order by id skip 32 limit 8;</code></p><p></p><p>However, as the offset value increases, retrieving subsequent pages becomes slower. This is because each retrieval requires skipping a certain number of records, resulting in performance degradation. This impact can be especially obvious when working with large datasets or when the offset values are high. It's crucial to consider these limitations and explore alternative pagination techniques to mitigate the performance issues associated with offset-based pagination.</p><blockquote><p>If your system uses offset-based pagination and suffer performance issues, you should talk to your product manager to set a limitation on how deep a user can navigate between pages. The more pages that a user skips, the slower the response is.</p><p>Or, consider using the below alternative to design pagination.</p></blockquote><p></p><h1>Cursor-based Pagination</h1><p>To address these challenges, an alternative pagination approach called cursor-based pagination emerges as a viable solution. Unlike offset-based pagination, cursor-based pagination offers improved performance and stability by leveraging unique cursor values associated with each record. It enables more efficient and consistent queries, especially when dealing with large datasets.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YQcL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3283349-79e1-448f-8fc4-dee98b7ce08b_707x217.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YQcL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3283349-79e1-448f-8fc4-dee98b7ce08b_707x217.png 424w, https://substackcdn.com/image/fetch/$s_!YQcL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3283349-79e1-448f-8fc4-dee98b7ce08b_707x217.png 848w, https://substackcdn.com/image/fetch/$s_!YQcL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3283349-79e1-448f-8fc4-dee98b7ce08b_707x217.png 1272w, https://substackcdn.com/image/fetch/$s_!YQcL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3283349-79e1-448f-8fc4-dee98b7ce08b_707x217.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YQcL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3283349-79e1-448f-8fc4-dee98b7ce08b_707x217.png" width="707" height="217" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c3283349-79e1-448f-8fc4-dee98b7ce08b_707x217.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:217,&quot;width&quot;:707,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:14081,&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_!YQcL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3283349-79e1-448f-8fc4-dee98b7ce08b_707x217.png 424w, https://substackcdn.com/image/fetch/$s_!YQcL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3283349-79e1-448f-8fc4-dee98b7ce08b_707x217.png 848w, https://substackcdn.com/image/fetch/$s_!YQcL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3283349-79e1-448f-8fc4-dee98b7ce08b_707x217.png 1272w, https://substackcdn.com/image/fetch/$s_!YQcL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3283349-79e1-448f-8fc4-dee98b7ce08b_707x217.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>In cursor-based pagination, random page navigation is not allowed. Instead, only linear access is allowed in this design which users can only navigate to the previous page or the next page. It can provide better performance compared to offset-based pagination, especially when dealing with large datasets.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!13yM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8ccd831-7a8a-4605-baf7-771aeb14fe5f_3752x2667.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!13yM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8ccd831-7a8a-4605-baf7-771aeb14fe5f_3752x2667.png 424w, https://substackcdn.com/image/fetch/$s_!13yM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8ccd831-7a8a-4605-baf7-771aeb14fe5f_3752x2667.png 848w, https://substackcdn.com/image/fetch/$s_!13yM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8ccd831-7a8a-4605-baf7-771aeb14fe5f_3752x2667.png 1272w, https://substackcdn.com/image/fetch/$s_!13yM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8ccd831-7a8a-4605-baf7-771aeb14fe5f_3752x2667.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!13yM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8ccd831-7a8a-4605-baf7-771aeb14fe5f_3752x2667.png" width="1456" height="1035" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d8ccd831-7a8a-4605-baf7-771aeb14fe5f_3752x2667.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1035,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:549379,&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_!13yM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8ccd831-7a8a-4605-baf7-771aeb14fe5f_3752x2667.png 424w, https://substackcdn.com/image/fetch/$s_!13yM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8ccd831-7a8a-4605-baf7-771aeb14fe5f_3752x2667.png 848w, https://substackcdn.com/image/fetch/$s_!13yM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8ccd831-7a8a-4605-baf7-771aeb14fe5f_3752x2667.png 1272w, https://substackcdn.com/image/fetch/$s_!13yM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8ccd831-7a8a-4605-baf7-771aeb14fe5f_3752x2667.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><code>select * from target_table where x &gt; y order by id limit 8;</code></p><p><code>select * from target_table where x &gt; y and id &gt; 8 order by id limit 8;</code></p><p><code>select * from target_table where x &gt; y and id &gt; 16 order by id limit 8;</code></p><p><code>select * from target_table where x &gt; y and id &gt; 24 order by id limit 8;</code></p><p><code>select * from target_table where x &gt; y and id &gt; 32 order by id limit 8;</code></p><p></p><p>However, it's important to note that implementing cursor-based pagination can introduce additional complexity compared to offset-based pagination. Maintaining and managing unique cursor values for each record requires careful consideration to ensure their integrity and uniqueness throughout the pagination process.</p><p></p><blockquote><p>jOOQ did a comparison for the performance. If you are interested in the detailed comparison, go check out this blog.<br>Ref: <a href="https://blog.jooq.org/faster-sql-paging-with-jooq-using-the-seek-method/">https://blog.jooq.org/faster-sql-paging-with-jooq-using-the-seek-method/</a></p></blockquote><p></p><p>When deciding which pagination technique to employ, it's crucial to evaluate the specific requirements and characteristics of your application. Consider factors such as dataset size, user navigation patterns, and the trade-offs between performance and implementation complexity. By carefully analyzing these factors, you can determine the most suitable pagination approach for optimizing data retrieval performance in your software system.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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[Improve performance when retrieving large dataset]]></title><description><![CDATA[Optimizing Data Retrieval with Pagination]]></description><link>https://blog.awesomesoftwareengineer.com/p/improve-performance-when-retrieving</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/improve-performance-when-retrieving</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Tue, 08 Aug 2023 11:40:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!24u2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6b693a5-4bea-46af-9e25-31188bddaf32_4067x2527.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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>In the realm of software development, backend systems store vast amounts of data, and it is the responsibility of software engineers to design APIs that retrieve this data from databases.</p><p>When dealing with small datasets, some novice engineers may design APIs that fetch all the data from the database in a single operation. This approach works fine with small data sizes since it doesn't lead to performance issues.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!24u2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6b693a5-4bea-46af-9e25-31188bddaf32_4067x2527.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!24u2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6b693a5-4bea-46af-9e25-31188bddaf32_4067x2527.png 424w, https://substackcdn.com/image/fetch/$s_!24u2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6b693a5-4bea-46af-9e25-31188bddaf32_4067x2527.png 848w, https://substackcdn.com/image/fetch/$s_!24u2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6b693a5-4bea-46af-9e25-31188bddaf32_4067x2527.png 1272w, https://substackcdn.com/image/fetch/$s_!24u2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6b693a5-4bea-46af-9e25-31188bddaf32_4067x2527.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!24u2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6b693a5-4bea-46af-9e25-31188bddaf32_4067x2527.png" width="1456" height="905" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b6b693a5-4bea-46af-9e25-31188bddaf32_4067x2527.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:905,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:357208,&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_!24u2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6b693a5-4bea-46af-9e25-31188bddaf32_4067x2527.png 424w, https://substackcdn.com/image/fetch/$s_!24u2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6b693a5-4bea-46af-9e25-31188bddaf32_4067x2527.png 848w, https://substackcdn.com/image/fetch/$s_!24u2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6b693a5-4bea-46af-9e25-31188bddaf32_4067x2527.png 1272w, https://substackcdn.com/image/fetch/$s_!24u2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6b693a5-4bea-46af-9e25-31188bddaf32_4067x2527.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>However, when the database contains millions of records, retrieving all the data in one go can result in slow query performance or even OOM. Slow API responses not only hinder user experience but also undermine the reliability of the API, potentially eroding customer trust.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ko6L!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e3fdc0-b284-420e-bb24-563acb950f86_4067x3297.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ko6L!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e3fdc0-b284-420e-bb24-563acb950f86_4067x3297.png 424w, https://substackcdn.com/image/fetch/$s_!Ko6L!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e3fdc0-b284-420e-bb24-563acb950f86_4067x3297.png 848w, https://substackcdn.com/image/fetch/$s_!Ko6L!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e3fdc0-b284-420e-bb24-563acb950f86_4067x3297.png 1272w, https://substackcdn.com/image/fetch/$s_!Ko6L!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e3fdc0-b284-420e-bb24-563acb950f86_4067x3297.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ko6L!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e3fdc0-b284-420e-bb24-563acb950f86_4067x3297.png" width="1456" height="1180" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/47e3fdc0-b284-420e-bb24-563acb950f86_4067x3297.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1180,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:523358,&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_!Ko6L!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e3fdc0-b284-420e-bb24-563acb950f86_4067x3297.png 424w, https://substackcdn.com/image/fetch/$s_!Ko6L!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e3fdc0-b284-420e-bb24-563acb950f86_4067x3297.png 848w, https://substackcdn.com/image/fetch/$s_!Ko6L!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e3fdc0-b284-420e-bb24-563acb950f86_4067x3297.png 1272w, https://substackcdn.com/image/fetch/$s_!Ko6L!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e3fdc0-b284-420e-bb24-563acb950f86_4067x3297.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>To address this issue and improve performance, a recommended solution is to redesign the API using pagination.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WKRj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2cdb0-ae6a-4f66-9f72-8e746882a482_4942x2527.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WKRj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2cdb0-ae6a-4f66-9f72-8e746882a482_4942x2527.png 424w, https://substackcdn.com/image/fetch/$s_!WKRj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2cdb0-ae6a-4f66-9f72-8e746882a482_4942x2527.png 848w, https://substackcdn.com/image/fetch/$s_!WKRj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2cdb0-ae6a-4f66-9f72-8e746882a482_4942x2527.png 1272w, https://substackcdn.com/image/fetch/$s_!WKRj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2cdb0-ae6a-4f66-9f72-8e746882a482_4942x2527.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WKRj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2cdb0-ae6a-4f66-9f72-8e746882a482_4942x2527.png" width="1456" height="744" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/93e2cdb0-ae6a-4f66-9f72-8e746882a482_4942x2527.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:744,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:441924,&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_!WKRj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2cdb0-ae6a-4f66-9f72-8e746882a482_4942x2527.png 424w, https://substackcdn.com/image/fetch/$s_!WKRj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2cdb0-ae6a-4f66-9f72-8e746882a482_4942x2527.png 848w, https://substackcdn.com/image/fetch/$s_!WKRj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2cdb0-ae6a-4f66-9f72-8e746882a482_4942x2527.png 1272w, https://substackcdn.com/image/fetch/$s_!WKRj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2cdb0-ae6a-4f66-9f72-8e746882a482_4942x2527.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>In this enhanced design, a large dataset is divided into smaller chunks, and the data is retrieved incrementally using pagination. For instance, the first API call fetches the first 8 records from the initial page. If users need to access the second page, another API call is made to retrieve that specific page.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rDLU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07da1825-978c-4a5d-aef8-265567f18bac_3752x2667.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rDLU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07da1825-978c-4a5d-aef8-265567f18bac_3752x2667.png 424w, https://substackcdn.com/image/fetch/$s_!rDLU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07da1825-978c-4a5d-aef8-265567f18bac_3752x2667.png 848w, https://substackcdn.com/image/fetch/$s_!rDLU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07da1825-978c-4a5d-aef8-265567f18bac_3752x2667.png 1272w, https://substackcdn.com/image/fetch/$s_!rDLU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07da1825-978c-4a5d-aef8-265567f18bac_3752x2667.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rDLU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07da1825-978c-4a5d-aef8-265567f18bac_3752x2667.png" width="1456" height="1035" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/07da1825-978c-4a5d-aef8-265567f18bac_3752x2667.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1035,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:436365,&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_!rDLU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07da1825-978c-4a5d-aef8-265567f18bac_3752x2667.png 424w, https://substackcdn.com/image/fetch/$s_!rDLU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07da1825-978c-4a5d-aef8-265567f18bac_3752x2667.png 848w, https://substackcdn.com/image/fetch/$s_!rDLU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07da1825-978c-4a5d-aef8-265567f18bac_3752x2667.png 1272w, https://substackcdn.com/image/fetch/$s_!rDLU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07da1825-978c-4a5d-aef8-265567f18bac_3752x2667.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>By adopting this approach, the API retrieval performance can be optimized. In contrast to the previous method, which retrieved the entire dataset at once, the improved design fetches only 8 records per API call, effectively controlling the data size and enhancing performance.</p><blockquote><p>&#128161; Do you know what&#8217;s the hidden performance issue with using this type of pagination? Share your thoughts in the comment section!</p></blockquote><p>In summary, pagination is a technique that divides large datasets into manageable pages, improving retrieval performance, controlling data size, and enhancing the user experience when dealing with substantial amounts of data.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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[Design for Adaptability]]></title><description><![CDATA[The importance of Architecture Adaptability]]></description><link>https://blog.awesomesoftwareengineer.com/p/design-for-adaptability</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/design-for-adaptability</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Wed, 02 Aug 2023 12:46:15 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/8cd9986c-fb0c-473d-9e0d-d14238037e5b_420x300.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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>Designing software architecture requires careful consideration of various factors to ensure its effectiveness. In this post, I will share some ideas for creating a software architecture that can adapt to different conditions and resources.</p><p>When designing architecture, there are several important aspects to consider:</p><p><strong>Team Resources</strong></p><p>It is crucial to take into account the resources available within the team. Even with great architectural ideas, lack of resources can prevent successful execution. For example, a small team cannot build something as complex as Google. Therefore, the architecture design should align with the current team resources and the knowledge level of the engineers involved.</p><p><strong>Time-to-Market (TTM)</strong></p><p>The architecture design should be mindful of the overall development time required to bring the product to market. If there are strict time constraints, it would not make sense to implement an architecture that requires significantly more time than available. TTM is a critical factor as it directly impacts revenue generation. If an architecture cannot adapt to this constraint, it should not be considered.</p><p><strong>Business Adaptation</strong></p><p>The architecture design should be aligned with the current state of the business. For instance, companies like Airbnb started with a monolithic application and later evolved into microservices and a combination of micro and macroservices. By considering the business scope, the architecture can be tailored to meet the specific needs of the company. Designing an architecture for a significantly higher workload than the current demand would result in unnecessary investment and inefficiencies.</p><p></p><p>Airbnb Architecture Evolution:</p><ul><li><p>Monolith (2008 - 2017)</p></li><li><p>Microservices (2017 - 2020)</p></li><li><p>Micro + Macroservices (2020 - Present)</p></li></ul><p>Ref: <a href="https://www.infoq.com/presentations/airbnb-culture-soa/">https://www.infoq.com/presentations/airbnb-culture-soa/</a></p><p></p><p>The evolution of Airbnb's architecture exemplifies how a large tech company adapts its architecture to align with its evolving business needs. As the business grows, the architecture evolves accordingly. This demonstrates the importance of periodically reassessing the existing architecture, removing outdated elements, and adapting it to meet new requirements.</p><div><hr></div><p>Creating an excellent architecture begins with establishing a solid foundation. While it's important to plan for future needs, it's equally essential to invest time wisely and prioritize current business demands. Predicting the future is challenging, and dedicating significant resources to shaping the architecture for hypothetical scenarios may not be efficient.</p><p>One might argue that designing for future scalability is necessary in order to become a successful company. While this is true, it's important to balance long-term goals with current priorities. The architecture can be designed with future scalability in mind, but implementing it immediately without actual business needs may not be the best approach. In a fast-growing company, it's crucial to allocate resources effectively and adapt the architecture when the business demands it.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share Awesome Software Engineer&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.awesomesoftwareengineer.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share Awesome Software Engineer</span></a></p>]]></content:encoded></item><item><title><![CDATA[Why do we need architecture?]]></title><description><![CDATA[Making good architectural decision by asking yourself Why]]></description><link>https://blog.awesomesoftwareengineer.com/p/why-do-we-need-architecture</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/why-do-we-need-architecture</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Wed, 26 Jul 2023 11:59:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!AWU7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae40b96-e4e3-46b5-8597-9897d61292ba_5887x3101.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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>As software engineers, dealing with software architecture is crucial in our day-to-day work. It involves making decisions about components like caches, message queues, search engines, or even transitioning from a monolithic to a microservices architecture. While we may know how to implement these components, it's important to understand why we need them.</p><p>Let's consider the example of a cache. Some people believe that adding a cache can enhance read query performance, and since many popular companies utilize caches, it must be beneficial. While this may be true, it's essential to question whether your system truly needs a cache. Every architectural decision should be based on a specific reason. Well-known companies add caches to their systems because they have genuine needs, such as handling extremely high traffic where scaling traditional databases becomes challenging.</p><p>In my opinion, architecture revolves around managing complexity. The core aspect of architecture is solving problems with minimal resources and complexity. Adding a cache undoubtedly introduces complexity to a system. If your system doesn't require a cache, there's no need to blindly follow others. However, understanding why others implement caches and the problems they solve can provide valuable insights into designing your system.</p><p>Considering the cache example, the main reason for adding a cache is the improved read performance compared to traditional disk storage. However, the key message conveyed by caches is that scaling the cache component is easier than scaling traditional database storage. Additionally, caches can support higher concurrent traffic in high-traffic systems, thereby facilitating read performance.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AWU7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae40b96-e4e3-46b5-8597-9897d61292ba_5887x3101.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AWU7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae40b96-e4e3-46b5-8597-9897d61292ba_5887x3101.png 424w, https://substackcdn.com/image/fetch/$s_!AWU7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae40b96-e4e3-46b5-8597-9897d61292ba_5887x3101.png 848w, https://substackcdn.com/image/fetch/$s_!AWU7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae40b96-e4e3-46b5-8597-9897d61292ba_5887x3101.png 1272w, https://substackcdn.com/image/fetch/$s_!AWU7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae40b96-e4e3-46b5-8597-9897d61292ba_5887x3101.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AWU7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae40b96-e4e3-46b5-8597-9897d61292ba_5887x3101.png" width="1456" height="767" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ae40b96-e4e3-46b5-8597-9897d61292ba_5887x3101.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:767,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:637875,&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_!AWU7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae40b96-e4e3-46b5-8597-9897d61292ba_5887x3101.png 424w, https://substackcdn.com/image/fetch/$s_!AWU7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae40b96-e4e3-46b5-8597-9897d61292ba_5887x3101.png 848w, https://substackcdn.com/image/fetch/$s_!AWU7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae40b96-e4e3-46b5-8597-9897d61292ba_5887x3101.png 1272w, https://substackcdn.com/image/fetch/$s_!AWU7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae40b96-e4e3-46b5-8597-9897d61292ba_5887x3101.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>In the context of a large traffic system, scaling a traditional database without using cache architecture can be extremely challenging in today's internet environment. Therefore, choosing a cache on top of a traditional database is beneficial because modern cache components support horizontal scaling, making it easier to scale compared to traditional databases like MySQL. While adding a cache introduces complexity, it is considerably less complex than scaling a traditional database.</p><p>In summary, software architecture is vital for managing complexity and solving problems efficiently. Understanding the reasons behind architectural decisions, such as adding a cache, helps us make informed choices based on the specific needs and challenges of our system. By evaluating the benefits and trade-offs, we can design systems that perform optimally in high-traffic environments while effectively managing complexity.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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[Distributed tracing and distributed logging]]></title><description><![CDATA[How to debug in a distributed system?]]></description><link>https://blog.awesomesoftwareengineer.com/p/distributed-tracing-and-distributed</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/distributed-tracing-and-distributed</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Sat, 22 Jul 2023 01:06:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!8oXx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F622853a7-b7ce-41d7-8c77-8aa3ab9b98e4_5397x3661.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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>Before talking about distributed tracing, we need to understand distributed logging and microservices architecture.</p><p>In a monolith application, logs are already centralized somewhere. We can search the logs easily without needing a complex log architecture to process application logs.</p><p>When comes to a microservices architecture, logs become more complicated. Imagine we have 100+ microservices and each service has its own logs. How can we search logs from distributed loggings? To solve this, we need a log aggregation layer to aggregate logs from different sources and centralize them.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8oXx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F622853a7-b7ce-41d7-8c77-8aa3ab9b98e4_5397x3661.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8oXx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F622853a7-b7ce-41d7-8c77-8aa3ab9b98e4_5397x3661.png 424w, https://substackcdn.com/image/fetch/$s_!8oXx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F622853a7-b7ce-41d7-8c77-8aa3ab9b98e4_5397x3661.png 848w, https://substackcdn.com/image/fetch/$s_!8oXx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F622853a7-b7ce-41d7-8c77-8aa3ab9b98e4_5397x3661.png 1272w, https://substackcdn.com/image/fetch/$s_!8oXx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F622853a7-b7ce-41d7-8c77-8aa3ab9b98e4_5397x3661.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8oXx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F622853a7-b7ce-41d7-8c77-8aa3ab9b98e4_5397x3661.png" width="1456" height="988" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/622853a7-b7ce-41d7-8c77-8aa3ab9b98e4_5397x3661.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:988,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:563109,&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_!8oXx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F622853a7-b7ce-41d7-8c77-8aa3ab9b98e4_5397x3661.png 424w, https://substackcdn.com/image/fetch/$s_!8oXx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F622853a7-b7ce-41d7-8c77-8aa3ab9b98e4_5397x3661.png 848w, https://substackcdn.com/image/fetch/$s_!8oXx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F622853a7-b7ce-41d7-8c77-8aa3ab9b98e4_5397x3661.png 1272w, https://substackcdn.com/image/fetch/$s_!8oXx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F622853a7-b7ce-41d7-8c77-8aa3ab9b98e4_5397x3661.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><div><hr></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;4ce20990-5eca-414b-a1c2-217043a97ffe&quot;,&quot;caption&quot;:&quot;Last time, we talked about Observability. In this post, we are going to talk about log monitoring and alerting. It is also an important component of a system. Without this, your software engineers do not know what is happening in the whole system. That said, when an error occurs, no one knows and the engineering team does not know whether the system per&#8230;&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;lg&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Log Monitoring and Alerting&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:25173525,&quot;name&quot;:&quot;Ray Chong&quot;,&quot;bio&quot;:&quot;a software engineer specializing in building backend and microservices&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c2736295-05f7-470f-a642-c34507bed5f1_826x827.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2022-07-07T11:01:00.687Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/h_600,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F68cbaa7e-7879-4d09-839b-0f6fe7b8e67c_832x872.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.awesomesoftwareengineer.com/p/log-monitoring-and-alerting&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:62321197,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:3,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Awesome Software Engineer&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F418d7272-62dd-40cd-bcf2-5fcbad3189eb_500x500.png&quot;,&quot;belowTheFold&quot;:false,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><p>Now, we centralized the logs but how can we know the sequence of logs and where the logs are from? For example:</p><ul><li><p>Which service is my caller service?</p></li><li><p>Which service is my dependency service?</p></li><li><p>Which service is the first service that initiates the request?</p></li><li><p>Which service return errors?</p></li><li><p>How many services are involved in the call chain?</p></li><li><p>&#8230;</p></li></ul><p>To solve these issues, we need Distributed Tracing to complement Distributed Logging.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!19H2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3978704f-62da-48c9-aede-a8ed3374b2bd_2807x3437.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!19H2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3978704f-62da-48c9-aede-a8ed3374b2bd_2807x3437.png 424w, https://substackcdn.com/image/fetch/$s_!19H2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3978704f-62da-48c9-aede-a8ed3374b2bd_2807x3437.png 848w, https://substackcdn.com/image/fetch/$s_!19H2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3978704f-62da-48c9-aede-a8ed3374b2bd_2807x3437.png 1272w, https://substackcdn.com/image/fetch/$s_!19H2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3978704f-62da-48c9-aede-a8ed3374b2bd_2807x3437.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!19H2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3978704f-62da-48c9-aede-a8ed3374b2bd_2807x3437.png" width="1456" height="1783" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3978704f-62da-48c9-aede-a8ed3374b2bd_2807x3437.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1783,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:426191,&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_!19H2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3978704f-62da-48c9-aede-a8ed3374b2bd_2807x3437.png 424w, https://substackcdn.com/image/fetch/$s_!19H2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3978704f-62da-48c9-aede-a8ed3374b2bd_2807x3437.png 848w, https://substackcdn.com/image/fetch/$s_!19H2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3978704f-62da-48c9-aede-a8ed3374b2bd_2807x3437.png 1272w, https://substackcdn.com/image/fetch/$s_!19H2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3978704f-62da-48c9-aede-a8ed3374b2bd_2807x3437.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>From the diagram, each request contains traceId, parentSpanId, and spanId. The service relationships are connected by using these IDs. For example, we can search traceId=123 to get all the logs and relationships for the request. We can also use other ids to narrow down the debugging scope.</p><div><hr></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;45001798-d619-4b76-8c30-4721f092bba5&quot;,&quot;caption&quot;:&quot;What is Observability? Observability is used to describe your system state so the software engineers can use that information to understand the system and identify issues. In a microservices architecture, log and trace are the important components. It helps software engineers to understand the current system behaviors and debugging. It can also be used to&#8230;&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;lg&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Understand Observability&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:25173525,&quot;name&quot;:&quot;Ray Chong&quot;,&quot;bio&quot;:&quot;a software engineer specializing in building backend and microservices&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c2736295-05f7-470f-a642-c34507bed5f1_826x827.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2022-07-03T12:00:19.703Z&quot;,&quot;cover_image&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/54d6bc71-1304-4ec1-ad2b-de07fcfdb138_637x590.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.awesomesoftwareengineer.com/p/understand-observability&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:62215573,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:3,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Awesome Software Engineer&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F418d7272-62dd-40cd-bcf2-5fcbad3189eb_500x500.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><p>Overall, distributed tracing complements distributed logging by providing additional insights into the interactions and dependencies among microservices. It allows you to trace the flow of a request across different services, understand the sequence of events, and gain visibility into the performance and behavior of each service involved in the request.</p><p>How does it facilitate developers&#8217; work?</p><ul><li><p><strong>Performance analysis</strong>: Developers can measure the time spent on each request and identify potential performance bottlenecks or areas for optimization within their microservices architecture.</p></li><li><p><strong>Troubleshooting</strong>: When an error occurs, distributed tracing helps narrow down the scope of investigation by identifying the exact service responsible for the error. This allows developers to reach out to the respective service owner to address the issue efficiently.</p></li><li><p><strong>Service dependencies</strong>: Visualizing the service dependencies through distributed tracing enables developers to understand how different microservices interact with each other, facilitating debugging and overall system comprehension.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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[Tips for writing good documentation]]></title><description><![CDATA[How to write good documentation?]]></description><link>https://blog.awesomesoftwareengineer.com/p/tips-for-writing-good-documentation</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/tips-for-writing-good-documentation</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Thu, 13 Jul 2023 13:16:27 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/340460e3-288f-4319-825a-62ab54e81aa1_420x300.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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>Writing documentation is almost my day-to-day work as a software engineer. The reason why I write documentation is that good documentation can help my team understand the system better and it is like a knowledge-sharing process. One day if I am on vacation, my teammates can still gain the knowledge that they need from the documentation without asking me.</p><p>I know not every engineer likes to create documentation. Some engineers might feel that creating documentation is just wasting time because the system is changing fast. That said, the documentation will be outdated fast. Yes, maintaining documentation is hard, and need to spend resources on that. But, when you work on a large system, good documentation can definitely facilitate team knowledge sharing and avoid some repetitive questions from others. It can help to free yourself from the loop of answering questions. </p><p>The more you share, the more extra things you can create. That means when you share your knowledge with others to make them grow, you will save a lot of time. So, if you are working in a large complex system and the team is large, I do think investing in documentation is a good choice for your engineering team.</p><p>From my experience in writing documentation, I summarized the following key points for writing good documentation:</p><ol><li><p><strong>Know your audience</strong>: Understand your audience's knowledge level and the specific needs of your audience. This will help you tailor your documentation to their expectation.</p></li><li><p><strong>Define your message</strong>: Clearly determine the core message or purpose of your documentation. What information do you want to deliver? Understanding your message will guide your writing and help you stay focused. If you don&#8217;t define your message, sometimes, the content might be too rich and lose focus. With this writing style, your audience might not know what you want to deliver in the documentation. Ask yourself, what message you are trying to deliver when writing documentation.</p></li><li><p><strong>Tell a story</strong>: Frame your documentation in a narrative structure that engages readers. Start by presenting a problem and then providing the solution in a logical sequence For example, When documenting a system, introduce the problem, present the high-level architecture, explain critical scenario workflows, and delve into API and database designs. This approach guides readers to understand the system from a big picture to detailed aspects.</p></li><li><p><strong>Provide concise summaries</strong>: Instead of providing a lot of raw content to readers, help them summarize the content to give readers a quick overview and provide a link to the detailed content at the end, enabling them to find relevant information efficiently. This approach allows readers to grasp the main points quickly and explore further if desired.</p></li><li><p><strong>Visualize with diagrams</strong>: Instead of presenting a large block of content, leverage diagrams, flowcharts, or other visual representations to convey complex information. Visuals make it easier for readers to grasp concepts and understand relationships between different elements.</p></li><li><p><strong>Break down large documentation and create links</strong>: If you have extensive documentation, break it down into smaller, more manageable sections. Create separate documents for different topics and establish clear links or cross-references between them. This allows readers to access specific information quickly and navigate between related topics effortlessly.</p></li></ol><p></p><blockquote><p>What else do you think are important elements for good documentation? </p><p>Share your thoughts below.</p></blockquote><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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[Pub/Sub Practical Guide: Trade-off]]></title><description><![CDATA[Trade-off for applying Message Queue and Event Streaming]]></description><link>https://blog.awesomesoftwareengineer.com/p/pubsub-practical-guide-trade-off</link><guid isPermaLink="false">https://blog.awesomesoftwareengineer.com/p/pubsub-practical-guide-trade-off</guid><dc:creator><![CDATA[Ray Chong]]></dc:creator><pubDate>Wed, 05 Jul 2023 11:16:52 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/38f451fe-25e4-486d-8f0c-e3b835d32f9a_420x300.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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>Pub/Sub makes an architecture to be resilient to failures and increases system availability in a high-traffic situation. But, it also brings us several drawbacks. In this article, I will walk you through the potential drawbacks of Pub/Sub architecture.</p><p>Applying Pub/Sub architecture to a system might have the following trade-offs:</p><ul><li><p>Latency</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!erUx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d581fb7-4a11-445e-9463-1ba8ea42dc96_3514x2387.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!erUx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d581fb7-4a11-445e-9463-1ba8ea42dc96_3514x2387.png 424w, https://substackcdn.com/image/fetch/$s_!erUx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d581fb7-4a11-445e-9463-1ba8ea42dc96_3514x2387.png 848w, https://substackcdn.com/image/fetch/$s_!erUx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d581fb7-4a11-445e-9463-1ba8ea42dc96_3514x2387.png 1272w, https://substackcdn.com/image/fetch/$s_!erUx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d581fb7-4a11-445e-9463-1ba8ea42dc96_3514x2387.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!erUx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d581fb7-4a11-445e-9463-1ba8ea42dc96_3514x2387.png" width="1456" height="989" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7d581fb7-4a11-445e-9463-1ba8ea42dc96_3514x2387.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:989,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:293853,&quot;alt&quot;:&quot;&quot;,&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!erUx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d581fb7-4a11-445e-9463-1ba8ea42dc96_3514x2387.png 424w, https://substackcdn.com/image/fetch/$s_!erUx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d581fb7-4a11-445e-9463-1ba8ea42dc96_3514x2387.png 848w, https://substackcdn.com/image/fetch/$s_!erUx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d581fb7-4a11-445e-9463-1ba8ea42dc96_3514x2387.png 1272w, https://substackcdn.com/image/fetch/$s_!erUx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d581fb7-4a11-445e-9463-1ba8ea42dc96_3514x2387.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>Introducing a Pub/Sub to a system will increase latency. The diagram shows the difference between direct connection and indirect connection. Originally, Service 1 only communicate with Service 2 directly through REST or RPC. After applying Pub/Sub, the request is submitted to Message Broker first, and then wait for Service 2 to consume the messages. This introduces latency to the system and it will be obvious when traffic is high.</p><ul><li><p>Development Complexity</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!X7uL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45431cf9-b74b-450c-b08b-a1cf1586426f_3514x2387.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!X7uL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45431cf9-b74b-450c-b08b-a1cf1586426f_3514x2387.png 424w, https://substackcdn.com/image/fetch/$s_!X7uL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45431cf9-b74b-450c-b08b-a1cf1586426f_3514x2387.png 848w, https://substackcdn.com/image/fetch/$s_!X7uL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45431cf9-b74b-450c-b08b-a1cf1586426f_3514x2387.png 1272w, https://substackcdn.com/image/fetch/$s_!X7uL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45431cf9-b74b-450c-b08b-a1cf1586426f_3514x2387.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!X7uL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45431cf9-b74b-450c-b08b-a1cf1586426f_3514x2387.png" width="1456" height="989" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/45431cf9-b74b-450c-b08b-a1cf1586426f_3514x2387.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:989,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:301847,&quot;alt&quot;:&quot;&quot;,&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!X7uL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45431cf9-b74b-450c-b08b-a1cf1586426f_3514x2387.png 424w, https://substackcdn.com/image/fetch/$s_!X7uL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45431cf9-b74b-450c-b08b-a1cf1586426f_3514x2387.png 848w, https://substackcdn.com/image/fetch/$s_!X7uL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45431cf9-b74b-450c-b08b-a1cf1586426f_3514x2387.png 1272w, https://substackcdn.com/image/fetch/$s_!X7uL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45431cf9-b74b-450c-b08b-a1cf1586426f_3514x2387.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>Before applying Pub/Sub architecture, the development complexity between 2 services is HTTP request where HTTP client is common in any architecture, so we can ignore the complexity. Now, after introducing Pub/Sub to the system, we bring extra complexity to the architecture. Not every developer is familiar with Pub/Sub architecture in-depth. If there are any issues related to the Pub/Sub architecture, does anyone in the team know how to solve them? If not, it will bring unknowns to the architecture.</p><ul><li><p>DevOps Complexity</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VGlb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e929d2-edf4-4076-9c65-82bb18f8f81a_6524x3857.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VGlb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e929d2-edf4-4076-9c65-82bb18f8f81a_6524x3857.png 424w, https://substackcdn.com/image/fetch/$s_!VGlb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e929d2-edf4-4076-9c65-82bb18f8f81a_6524x3857.png 848w, https://substackcdn.com/image/fetch/$s_!VGlb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e929d2-edf4-4076-9c65-82bb18f8f81a_6524x3857.png 1272w, https://substackcdn.com/image/fetch/$s_!VGlb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e929d2-edf4-4076-9c65-82bb18f8f81a_6524x3857.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VGlb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e929d2-edf4-4076-9c65-82bb18f8f81a_6524x3857.png" width="1456" height="861" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/58e929d2-edf4-4076-9c65-82bb18f8f81a_6524x3857.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:861,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:773644,&quot;alt&quot;:&quot;&quot;,&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!VGlb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e929d2-edf4-4076-9c65-82bb18f8f81a_6524x3857.png 424w, https://substackcdn.com/image/fetch/$s_!VGlb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e929d2-edf4-4076-9c65-82bb18f8f81a_6524x3857.png 848w, https://substackcdn.com/image/fetch/$s_!VGlb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e929d2-edf4-4076-9c65-82bb18f8f81a_6524x3857.png 1272w, https://substackcdn.com/image/fetch/$s_!VGlb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e929d2-edf4-4076-9c65-82bb18f8f81a_6524x3857.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>Bringing Pub/Sub to the system architecture also increase DevOps complexity. DevOps engineers need to manage the complexity that the Pub/Sub brings to the architecture including creating a cluster and managing topics and partitions. Without knowing the technology in-depth, it is hard to manage the complexity reasonably.</p><p>To sum up, Pub/Sub is good but we still need to manage the complexity. By knowing the trade-off, we can make better decisions when creating an architecture. In general, applying Pub/Sub to architecture will bring latency, development complexity, and DevOps complexity to us, apply it wisely and consider the trade-offs to see if the team can pay for it.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.awesomesoftwareengineer.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 Awesome Software Engineer! 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>