<?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[The Engineer's Notebook]]></title><description><![CDATA[Hey there! I'm Shloka, navigating the ever-evolving world of code. Welcome to "The Engineer's Notebook," where I share my journey. From debugging nightmares to eureka moments, join me as I unpack the real, raw, and exciting experiences of engineering.]]></description><link>https://www.theengineersnotebook.com</link><image><url>https://substackcdn.com/image/fetch/$s_!1n6v!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99a2e695-b502-4f9d-b1ee-a1cab08b7e92_1024x1024.png</url><title>The Engineer&apos;s Notebook</title><link>https://www.theengineersnotebook.com</link></image><generator>Substack</generator><lastBuildDate>Fri, 17 Apr 2026 01:16:47 GMT</lastBuildDate><atom:link href="https://www.theengineersnotebook.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Shloka Shah]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[shlokashah@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[shlokashah@substack.com]]></itunes:email><itunes:name><![CDATA[Shloka Shah]]></itunes:name></itunes:owner><itunes:author><![CDATA[Shloka Shah]]></itunes:author><googleplay:owner><![CDATA[shlokashah@substack.com]]></googleplay:owner><googleplay:email><![CDATA[shlokashah@substack.com]]></googleplay:email><googleplay:author><![CDATA[Shloka Shah]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Don't Take Context for Granted]]></title><description><![CDATA[Do not take context for granted. Engineer it intentionally, measure it constantly, and optimize it relentlessly.]]></description><link>https://www.theengineersnotebook.com/p/dont-take-context-for-granted</link><guid isPermaLink="false">https://www.theengineersnotebook.com/p/dont-take-context-for-granted</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Mon, 26 Jan 2026 14:42:57 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!1n6v!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99a2e695-b502-4f9d-b1ee-a1cab08b7e92_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Two years ago, when we shipped the first version of HackerRank&#8217;s AI-powered Mock Interviewer, everyone was talking about prompt engineering. Just write better prompts, they said. &#8220;Give the model clear instructions.&#8221;</p><p>But it felt like solving a different problem, one that did not have a name yet.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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>The largest available context window at that time was 32K tokens. We started with an 8K model and, within weeks, hit our first context length errors. The obvious fix was to switch to a bigger model when conversations exceeded 7K tokens. But as I debugged why we were even hitting those limits, I realized something important: the problem wasn&#8217;t the size of the context window. It was what we were putting in it.</p><p>We did not have to just engineer prompts, but also the context itself. Which information to include, when to include it, how to structure it, what to summarize, and what to discard. This was a different discipline entirely, one that would become the foundation of every scalable AI application I have built since.</p><p>Back then, nobody called it &#8220;context engineering.&#8221; Now, it is the difference between a demo and a production system.</p><h2>Context Window Illusion</h2><p>Context feels infinite when you are processing single documents or short conversations. Production changes that illusion very quickly.</p><p>Here is what large context windows do not protect us from.</p><p><strong>Cost explosion</strong></p><p>Every token sent to the model has a cost, both on input and output. A 100K-token context on every request is not using the available capacity. It is spending the budget on information that often does not contribute to better outcomes.</p><p><strong>Latency degradation</strong></p><p>Models do not scale linearly with context length. A tenfold increase in context does not result in a tenfold increase in latency; it is often worse. In production systems, users are unlikely to tolerate long response times simply because context was not curated deliberately.</p><p><strong>Quality deterioration</strong> </p><p>This is the most subtle failure mode. Models perform worse when buried in an irrelevant or weakly related context. As the number of tokens in the context window increases, the model&#8217;s ability to accurately recall and reason over specific information decreases.</p><p>This matches how LLMs work. Transformer-based architectures allow every token to attend to every other token in the context, resulting in <em>n&#178;</em> pairwise relationships for <em>n</em> tokens. As context grows, attention is spread thinner. You can think of this as a fixed attention budget that gets depleted with each additional token.</p><p><strong>State management chaos</strong></p><p>When context grows without bounds, it becomes difficult to reason about application state. What information does the model currently have access to? What shaped its previous response? Without clear boundaries, these questions become hard to answer.</p><h2>Why Context Engineering Isn&#8217;t Prompt Engineering</h2><p>In the early days, much of the industry&#8217;s attention was on prompts. There were countless blog posts on few-shot examples, chain-of-thought reasoning, and role-based prompting. These techniques are useful, but they address only part of the problem.</p><p>Prompt engineering asks: <em>How do I instruct the model?</em><br>Context engineering asks: <em>What information does the model need, and when?</em></p><p>Consider a code review assistant.</p><p>A prompt might say:<br>&#8221;You are an expert code reviewer. Identify security vulnerabilities, performance issues, and maintainability concerns.&#8221;</p><p>Context engineering determines everything around that prompt:</p><ul><li><p>Do we send the entire pull request or only the changed files?</p></li><li><p>Do we include full files or only the modified sections with surrounding context?</p></li><li><p>When do we inject relevant documentation or coding practices?</p></li><li><p>How do we maintain state across multiple files?</p></li><li><p>What information from earlier reviews should influence later ones?</p></li></ul><p>The prompt remains relatively stable. The context is dynamic, stateful, and intentionally scoped.</p><p>As AI applications evolve from single-turn interactions to long-running, multi-turn systems, context engineering becomes increasingly central.</p><h2>Context Engineering</h2><p>After spending a few years building production AI systems, I have found that reliable applications tend to rest on three context-engineering pillars.</p><h3>Summarization: Compressing History Without Losing Meaning</h3><p>A common approach to conversation history is simple accumulation: append every message to the context. This works initially, and then fails abruptly.</p><p>Effective summarization is not truncation. It is signal preservation.</p><p>For a code review assistant handling a pull request with dozens of files, the LLM does not need verbatim memory of every earlier file. What matters is:</p><ul><li><p>Architectural patterns in use</p></li><li><p>Security issues identified across files</p></li><li><p>Repeated coding-standard violations</p></li><li><p>Shared dependencies that were modified</p></li><li><p>Bugs that may cause cross-file breakage</p></li></ul><p>Maintaining a running summary that is updated as the review progresses keeps the active context focused while preserving coherence.</p><p>History describes what happened.<br>Context captures what matters now.</p><p>For long-running tasks that approach context limits, summarizing and restarting with a distilled representation is often more reliable than continuing to append raw history. Many modern tools already apply this pattern implicitly.</p><h3>Chunking</h3><p>A code review assistant does not need the entire codebase in context for every decision.</p><p>Instead:</p><ul><li><p>Parse the pull request into changed files and diff hunks</p></li><li><p>Index chunks with metadata such as file paths and change types</p></li><li><p>Retrieve only the chunks relevant to the current review focus</p></li></ul><p>If the model is reviewing a Rails route that imports a utility function, pulling in that utility&#8217;s definition and usage examples is usually sufficient. Test suites, build scripts, and unrelated APIs add noise without improving the review.</p><p>This approach improves both token efficiency and output quality by narrowing the model&#8217;s focus to what is relevant for the current step.</p><p>The same principle applies beyond code: documentation, prior review comments, and best-practice references should be retrieved selectively rather than batch-loaded.</p><p>Increasingly, systems are shifting toward just-in-time context retrieval. Instead of preloading all information, agents maintain lightweight references and fetch details dynamically as needed. This mirrors how humans work: we rely on indexes and retrieval, not full memorization.</p><h3>Stateful Context: Right Information, Right Time</h3><p>One recurring failure pattern in production systems is treating context as a dumping ground: collect everything and hope the model infers structure.</p><p>Reliable systems make state explicit.</p><p>For a code review assistant, this might include:</p><ul><li><p>Current review phase (initial scan, deep analysis, final summary)</p></li><li><p>Files already examined and their complexity</p></li><li><p>Issues identified by category</p></li><li><p>Patterns detected to avoid repetition</p></li><li><p>Cross-file dependencies that require coordination</p></li></ul><p>Each state determines what enters context. Early phases load metadata and structure. Deep analysis loads specific diffs and related files. Final recommendations load summaries grouped by severity.</p><p>This approach designs context through awareness rather than accumulation.</p><p>A useful technique here is structured note-taking. The agent writes notes to external memory and selectively reintroduces them into context later. This enables persistence without continuous context growth. </p><h2>Patterns That Scale</h2><p>Several patterns consistently improve context quality in production systems:</p><ol><li><p><strong>Semantic compression:</strong> Do not just truncate directly; understand what information is semantically important and preserve that. </p></li><li><p><strong>Hierarchical context:</strong> Maintain context at different levels of granularity. High-level summary always present, detailed information retrieved on-demand.</p></li><li><p><strong>Temporal awareness:</strong> Weigh recent context more heavily than distant context.</p></li><li><p><strong>Scope-based retrieval:</strong> Match context type to task phase. Different review phases need different contexts. Security analysis needs authentication flows and data validation code; performance review needs database queries and API calls; style review needs coding standards and formatting rules. </p></li><li><p><strong>Explicit state tracking:</strong> Track progress outside the model instead of relying on inference. </p></li><li><p><strong>Progressive disclosure:</strong> Let the LLM incrementally discover relevant context through exploration. When it identifies an imported function, it can fetch that function&#8217;s definition. When it finds a database query, it can retrieve the schema. Each interaction yields context that informs the next decision.</p></li><li><p><strong>Multi-agent architectures: </strong>Delegate focused tasks to specialized agents with clean context windows and merge distilled results<strong>. </strong>Rather than one agent reviewing the entire PR, specialized agents handle focused tasks with clean context windows. The main agent coordinates with a high-level plan while subagents perform deep technical work or use tools to find relevant information. Each subagent might explore extensively, using tens of thousands of tokens or more, but returns only a condensed, distilled summary of its work.</p></li><li><p><strong>Context-efficient tools:</strong> Design tools that are token-efficient and unambiguous. Make sure there is no bloating of tools, leading to confusion for the LLM on which tool to use.</p></li></ol><h2>Building With Context in Mind</h2><p><strong>Start with context budgets.</strong> Decide upfront: this feature gets at most X tokens of context. Then engineer to that constraint.</p><p><strong>Instrument everything.</strong> Track what context is getting sent, what the model uses, and what it ignores.</p><p><strong>Test context degradation.</strong> What happens when conversations get long? When users upload large documents? When does your knowledge base grow? </p><p><strong>Design for stateful context.</strong> Your application has a state, conversation phase, user intent, and task progress. Use it to determine the context to be sent to the LLM.</p><p><strong>Treat context as a first-class concern.</strong> Treat context as part of core architecture, not a post-hoc optimization.</p><p><strong>Think in attention budget.</strong> Every token you add depletes the model&#8217;s ability to focus on what matters. Be ruthless about what earns its place in context.</p><h1>Conclusion</h1><p>We now have models with massive context windows, yet production experience repeatedly shows that smaller, better-curated contexts lead to more reliable systems.</p><p>Context engineering is not about working around limitations. It is about building systems that remain predictable, efficient, and understandable as they scale. It reflects a shift from asking <em>&#8220;How do I prompt this?&#8221;</em> to <em>&#8220;What information does this system need at this moment?&#8221;</em></p><p>Context will not manage itself.</p><p>Do not take context for granted. Engineer it intentionally, measure it constantly, and optimize it relentlessly.</p><p>Your production systems and your users will thank you.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[I tried defining Quality]]></title><description><![CDATA[I am still learning and redefining quality. Maybe that is the real lesson: quality is not defined once. It is something you define, defend, and refine again and again.]]></description><link>https://www.theengineersnotebook.com/p/i-tried-defining-quality</link><guid isPermaLink="false">https://www.theengineersnotebook.com/p/i-tried-defining-quality</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sat, 01 Nov 2025 09:46:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!1n6v!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99a2e695-b502-4f9d-b1ee-a1cab08b7e92_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As engineers, we often talk about quality in code, features, systems, and the products we build. But the more I tried to define it, the more slippery it became. Everyone claims to want it, yet its meaning shifts depending on who you ask, what stage of the product you are in, and what constraints you are working with.</p><p>Press a little deeper, and quality stops being a universal truth. It becomes a moving target, a mirror reflecting priorities. For one, it has zero bugs and predictable behavior. For another, it is speed. For someone else, it is user experience.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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>I have cycled through all of these at different points. First, I thought quality was about clean code. Then, it meant the absence of bugs. Then, performance. Then, seamless user flows. At one point, it was developer experience; how easy it was to build and maintain. Eventually, it became about solving the actual user&#8217;s problem. Over time, I have realized quality is not one thing. It is a composite of many properties, and which ones matter most depends on the trade-offs you are willing to make.</p><div><hr></div><p>The easiest way to talk about quality is through numbers: uptime, error rates, and latency.</p><p>Metrics are useful because they are tangible. You can track them, chart them, and set thresholds. But they can also be deceptive. A system can &#8220;pass&#8221; all the numbers and still feel low quality due to clunky flows or answers that are technically correct but miss the human tone.</p><p>But numbers alone cannot capture the messy, human side of quality; the trade-offs every team eventually faces.</p><div><hr></div><p>One of the lessons I have learned: quality almost always competes with something else.</p><p>Ship fast or refine further. Add more features or keep fewer, more meaningful ones.<br>Innovate quickly or maintain stability.</p><p>When deadlines loom, quality quietly shifts from the ideal we would aim for in a perfect world to the minimum level that feels acceptable under the circumstances.</p><div><hr></div><p>My real <em>aha</em> moment has come from reading user feedback and watching people use the product.</p><p>It was then that it hit me: quality is not just about correctness or speed. It is about whether the user walks away feeling their problem was solved.</p><p>No metric captured that. It is subjective and human, and yet it makes the difference between a feature that worked and one that failed.</p><div><hr></div><p>I no longer see quality as a checklist. My working definition is</p><p>Quality is the degree to which a product consistently meets the right needs, for the right users, in the right context while balancing the trade-offs that actually make sense.</p><p>It is not static. It needs to evolve with the product and user expectations. The balance between speed, cost, and excellence shifts depending on where you are in the product lifecycle.</p><div><hr></div><p>The danger is not having different definitions of quality; it is assuming everyone is aligned on the same one.</p><p>Engineering might push for reliability and scalability, design for usability, and product for market fit. None of them is wrong. But if you do not make those differences explicit, you end up with decisions that satisfy no one.</p><p>In practice, defining quality together forces the hard conversations. It makes trade-offs deliberate instead of accidental. It helps avoid the trap of saying we need to improve quality without agreeing on what that actually means. It might mean sitting down before a release and agreeing on the absolute necessary items for that particular release.</p><p>Every team&#8217;s definition of quality is really what it is willing to trade and what it refuses to compromise on.</p><p>I still do not have a universal definition that works everywhere. But I have learned that when a team aligns on quality for <em>this</em> release, <em>this</em> user group, <em>this</em> moment, the work sharpens, decisions get clearer, and outcomes feel intentional.</p><p>I am still learning and redefining quality. Maybe that is the real lesson: quality is not defined once. It is something you define, defend, and refine again and again as you and the product grow.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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[A not-so-quiet reflection]]></title><description><![CDATA[Lessons learned from a year of building products, facing failures, and finding traction.]]></description><link>https://www.theengineersnotebook.com/p/a-not-so-quiet-reflection</link><guid isPermaLink="false">https://www.theengineersnotebook.com/p/a-not-so-quiet-reflection</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sat, 20 Sep 2025 13:32:46 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!1n6v!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99a2e695-b502-4f9d-b1ee-a1cab08b7e92_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A voice in my head has been shouting for weeks. So here I am, trying to calm it the only way I know; by writing. If anything, this year has been a roller coaster ride. A ride I was not ready for, but one I secretly wished for all along.</p><p>When I started my career, I initially worked on various products, none of which were successful. It was probably never the effort we put in that became the bottleneck, but a mix of market conditions, timing, and the hard truth of no product&#8211;market fit. Those years taught me the craft of building and the satisfaction of elegant solutions, but they also left me wondering what product market fit might actually feel like.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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>That is why this year stood out. We had two big releases, and on the surface they might just feel like product milestones. But for me, they became mirrors. In each, I met a different version of myself;  versions I maybe did not even know existed.</p><p>In the first, my world shrunk to code, features, and problem-solving. I was heads down, deep in the craft, living in the details. I chased down bugs late into the night, obsessed over edge cases, and felt the quiet satisfaction when things finally clicked. Exhausting, yes, but clear. Seeing the product work, with users engaging with it, made up for everything. That version of me felt familiar.</p><p>The second launch refused to let me stay in that comfort zone. I was still building, still obsessing over details, but I could not stay heads down. Dependencies had to be untangled, conversations held, threads pulled together. My calendar filled with check-ins, my days with code reviews, and my evenings with last-minute fixes and coordination. It was no longer just about solving my own problems; it was about making sure everyone around me moved forward together.</p><p>It was noisier, more chaotic, and often draining. But it stretched me. In that version, I saw someone who had to zoom out, connect dots, and hold the bigger picture without losing the details; someone bridging deep technical work and the messy reality of building a product outside the code. Still, there is much to learn.</p><p>Looking back, both launches mattered for reasons beyond the products themselves. The first reminded me of the joy of building, the flow that comes from losing yourself in your work. The second showed me the weight and reward of orchestrating more than just my own contributions when something is at stake.</p><p>Together, they revealed two sides of me I had not fully recognized. One that finds deep satisfaction in craft and precision. The other that can hold complexity and help others move forward together.</p><p>The contrast with my early years is sharp. Back then, I was building in isolation, both technically and organizationally. This year, I learned what it means to build with purpose, with others, and for something that has real traction. Those failed products were not wasted time; they were the training ground that prepared me for when it finally mattered.</p><p>If so far this year has been about discovering these two sides of myself, then the next is about learning to bring them together; moving fluidly between deep building and thoughtful orchestration, knowing when each is needed.</p><p>At the end of the day, it is never about perfection. It is about patience, about learning as you go, staying curious, and enjoying the work along the way.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[You Never Stop Debugging]]></title><description><![CDATA[I don&#8217;t think debugging will ever stop because things never stop changing.]]></description><link>https://www.theengineersnotebook.com/p/you-never-stop-debugging</link><guid isPermaLink="false">https://www.theengineersnotebook.com/p/you-never-stop-debugging</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 20 Jul 2025 11:46:16 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!1n6v!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99a2e695-b502-4f9d-b1ee-a1cab08b7e92_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We often think of debugging as something reactive, a step we take after something breaks. It's treated like a chore. A necessary evil to "get back on track." But the longer I have spent building products, especially in AI and fast-moving environments, the more I have realized something different: I have been looking at debugging only from one angle. What I thought was just fixing things that broke has turned into something I find myself doing constantly: a way of thinking that shows up everywhere in my work.</p><div><hr></div><h3>It Starts With Code, But It Doesn&#8217;t Stay There</h3><p>Most of us learn debugging in code. You hit a 500, a failing test, and log everything, throw in some print statements, and stare at a stack trace until something clicks. Over time, you get better. You learn to isolate, to reproduce, and to reduce. </p><p>But then, as you work on more complex systems, debugging shifts. It shows up not just when you hit a bug in your codebase, but when a user drops off unexpectedly, when a system slows down without explanation, when a product decision doesn't work out the way you had hoped, and sometimes even when our assumptions are wrong. The skill evolves from just fixing bugs to a way of thinking, one that stays relevant no matter how much the tech changes.</p><p>What I have found is that I am not always trying to fix bugs anymore. I am trying to become someone who can debug anything that comes up.</p><h3>Dealing with Gray Areas</h3><p>Most real-world systems don't break with clear error messages. They degrade subtly. A feature feels sluggish. A model's responses seem "off." An integration half-fails without throwing.</p><p>In AI applications especially, you won't always get deterministic failures; you get symptoms: unexpected behavior, weird edge cases, and users reporting "it feels broken" without being able to say how. </p><p>When you are building AI systems, debugging takes on a whole new dimension. There is no single root cause, just a tangled mix of model behavior, data assumptions, retrieval failures, evaluation noise, and blurry feedback loops. The bugs aren't always obvious, and sometimes, they don't even look like bugs.</p><p>I have spent hours staring at outputs, asking myself: Is this bad behavior, or just expected ambiguity? Did the model hallucinate, or did we prompt it wrong? Debugging AI isn't about fixing lines of code. It's about tracing the problem across layers: product, infra, model, expectations, and even user perception. It's one of the clearest reminders I have gotten that debugging is not just technical; it's about the entire system.</p><p>I have found that it is not always about having the answers but being relentless about finding the questions. It has given me a way to chip away at ambiguity, one hypothesis at a time.</p><h3>Navigating the Unknown</h3><p>Systems are always going to break, and when something breaks, it's not about panicking but staying curious. We can't predict everything. But we can get better at navigating the unknown. That's what's made debugging feel like such an enduring skill.</p><p>Every system failure becomes an opportunity to understand something better. That broken feature reveals an edge case that was not considered. That misbehaving model shows where the data assumptions were wrong. That confusing UX flow highlights a gap between what users want and what we built.</p><p>You can read best practices all day. But real insight often comes from debugging the mess. That's where systems reveal their true shape.</p><h3>The Muscle That Never Stops Growing</h3><p>I have come to see that I never stop debugging, not because systems are bad, but because systems are alive. As engineers, we are constantly navigating change: shifting requirements, new constraints, evolving tools, and unexpected outcomes.</p><p>It's taught me to zoom in and zoom out, to trace problems across logs, layers, teams, and sometimes across months of decisions. It is how I have developed some sense: not just in code, but in architecture, product, and trade-offs.</p><p>The deeper I go, the more I realize: I never stop debugging because building is just debugging in motion. Building and debugging aren't separate phases. They blur. Every feature is full of tiny, invisible bugs in understanding and in decisions, and we only find them by being willing to look closely.</p><p>Some days, debugging is about fixing a crash. Other days, it's sitting with a vague discomfort that something's off and trying to trace where it began. Either way, it's the same muscle.</p><div><hr></div><p>New frameworks will come. Languages will change. But I have found the ability to debug, to calmly untangle the mess, and to move toward clarity never stops being useful. It's the most transferable skill I have encountered. It works whether you are knee-deep in logs or navigating an issue faced by the user. It has become how one can make sense of chaos and still ship things that work.</p><p>I don&#8217;t think debugging will ever stop because things never stop changing. And the more you practice, the better you get at spotting what's going on underneath the surface.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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[What AI Engineering Actually Looks Like in Production]]></title><description><![CDATA[Building LLM systems that go beyond prototypes requires the same engineering discipline as any production system, just adapted for probabilistic outputs.]]></description><link>https://www.theengineersnotebook.com/p/what-ai-engineering-actually-looks</link><guid isPermaLink="false">https://www.theengineersnotebook.com/p/what-ai-engineering-actually-looks</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 15 Jun 2025 07:23:51 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%2F99a2e695-b502-4f9d-b1ee-a1cab08b7e92_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Over the past year, we have seen the term AI Engineer used frequently. It's tempting to think it's just a fancier title for someone writing prompts. But if you have built a real LLM-powered system that ships to users, you know how quickly things go from clever to chaotic.</p><p>This post is a reflection on what I have learned about the AI Engineer role, not from hype cycles, but from building and shipping LLM-powered systems. It&#8217;s about the day-to-day engineering muscle it takes to turn an idea into something resilient, useful, and observable. Along the way, I have come to see this as a new kind of engineering discipline; one that blends software fundamentals with a feel for probabilistic interfaces, product intuition, backend systems, and user trust.</p><div><hr></div><h2>How AI Engineering Differs from ML Engineering</h2><p>Traditional ML follows a Data &#8594; Model &#8594; Product pipeline. AI engineering reverses this: Product &#8594; Data &#8594; Model<strong>.</strong> You start with the product experience and work backwards.</p><p>The focus shifts from model training to system composition. There are parts of assembling, prompting, evaluating, and routing models, not fine-tuning them. This is similar to how backend engineers compose microservices rather than building monoliths, but with the added complexity of probabilistic outputs.</p><p>It also involves tighter feedback loops<strong>.</strong> There are rapid iterations based on user interactions, not just batch metrics. This is more like web development's A/B testing culture than traditional ML's training cycles.</p><p>Unlike traditional software engineering, where a function either works or doesn't, AI engineering operates in a permanent gray area. Your system might work perfectly for 95% of cases, degrade gracefully for 4%, and catastrophically fail for 1%, and that 1% might be the cases your users care about most.</p><p>This creates three core challenges that define AI Engineering:</p><ol><li><p><strong>Reliability</strong>: Users expect deterministic experiences from probabilistic systems.</p></li><li><p><strong>Economics</strong>: Every interaction costs real money, and costs scale unpredictably.</p></li><li><p><strong>Observability</strong>: Traditional monitoring tells you almost nothing about why an LLM failed.</p></li></ol><div><hr></div><h2>Prompt Engineering</h2><p>At the start, a good prompt feels like a clever trick. You tweak a few words, get better output, and move on. But once your system hits production, with real users, edge cases, and expectations, prompts stop being experiments. They become product-critical interfaces and need to be treated the same way as code.</p><p>And like any code, prompts need to be versioned, tested, observed, and maintained.</p><p><em>Here is what that looks like in practice:</em></p><ul><li><p><strong>Templating and Reusability: </strong>Writing prompts by hand doesn&#8217;t scale. Templating systems like Jinja2 can be used to compose reusable blocks of personality and rules into modular prompt templates. This allows for the separation of concerns, avoids duplication, and supports scalable experimentation. A small change in tone or context structure shouldn&#8217;t require rewriting 20 different variants. This keeps your prompts DRY and modular.</p></li><li><p><strong>Version Control and Change Tracking: </strong>Prompt templates can live in source control, often alongside application code. Every change is tracked with diffs, and changes undergo review like any other pull request. This helps in maintaining changelogs so we know when a prompt changed, why, and what its impact was. This makes it easier to trace regressions from user-reported bugs.</p></li><li><p><strong>Few-shot and Zero-shot Examples: </strong>Few-shot prompting often improves instruction following, but the examples need to be diverse and updated consistently. These examples also require maintenance, as they might go stale as product requirements change or as new failure modes emerge. </p></li><li><p><strong>Snapshot Testing:</strong> Every prompt version is snapshot-tested against a fixed set of inputs to ensure behavioral stability. This means generating outputs using the new prompt, comparing them against expected outputs (or embeddings of them), and flagging deviations beyond a defined threshold. This catches subtle drifts early.</p></li><li><p><strong>Prompt Versioning:</strong> Multiple versions of a prompt can be managed via feature flags or routing rules. This allows A/B testing, gradual rollout, or fast rollback if a new version causes regressions.</p></li></ul><p>When I started building applications with LLMs, the prompts were duplicated in multiple places, and as the system scaled, maintenance became an overhead; that&#8217;s where the above practices helped.</p><div><hr></div><h2>Context Length</h2><p>LLMs have a strict context window of 8k, 32k, 128k tokens, depending on the model. Theoretically, that sounds like a lot, but in practice, it runs out fast. Once we start adding system prompts, user history, retrieved documents, task-specific inputs, and metadata, we might be racing the token limit.</p><p>With limited tokens, what you include and exclude matters. Similar to how overfitting and underfitting work in machine learning (ML), understanding the right context for a given task is important, as more isn't always better.</p><p><em>Here is what that looks like in practice:</em></p><ul><li><p><strong>Identifying what Context Matters: </strong>Not all tokens will be equally important. Understanding which parts of the prompt directly influence the model&#8217;s output and which parts are noise is important. This comes down to experimenting: removing one instruction might degrade the answer, while trimming three paragraphs of user history does nothing.</p></li><li><p><strong>Retrieval Scoring and Ranking: </strong>If we are using systems like RAG, we might end up retrieving more than the context can fit. To avoid this, retrieving information based on semantic relevance measured by cosine similarity can help in avoiding the token stuffing problem.</p></li><li><p><strong>Context Truncation Strategies: </strong>If the limit is hit, there are two approaches; either do a hard truncation or truncate based on the semantic structure to avoid cutting a paragraph in between.</p></li></ul><div><hr></div><h2>RAG Systems</h2><p>The core idea is to take a user query, retrieve relevant information from a custom knowledge base, and include that context in the prompt.</p><p><em>Here&#8217;s what typically goes into building a RAG setup:</em></p><ul><li><p><strong>Choosing the Right Embedding Model: </strong>Embedding quality has a big impact on what documents get retrieved, which in turn affects the AI system&#8217;s performance; hence, choosing the right model is crucial to boost performance. One of the crucial steps is also to ensure the model used for generating embeddings is the same for the user query input and for the underlying information.</p></li><li><p><strong>Index Management: </strong>As the data changes, embeddings and indexes need periodic updates to give the right context to the LLM.</p></li><li><p><strong>Retrieval &amp; Chunking: </strong>A simple vector search based on cosine similarity is a strong baseline, but results can be refined with re-ranking models or keyword scoring to boost precision. To select the right context, we can chunk the information based on the token or semantic chunking. </p></li></ul><div><hr></div><h2>Evaluation</h2><p>Evaluating LLM systems is less about asserting the right answers since the outputs are usually open-ended, but they are more about understanding behavior. Unlike traditional software, where a test case either passes or fails, LLMs operate in a wide spectrum where responses can be technically correct but unhelpful, or partially wrong yet directionally useful.</p><p>Because of this, evaluating an LLM usually is a combination of automated metrics, LLM as judges, and human feedback to get a clearer picture of quality and drift over time. Evals for an LLM are still an evolving space.</p><p><em>Here is what that looks like in practice:</em></p><ul><li><p><strong>Golden Datasets: </strong>These are curated sets of inputs with high-quality expected outputs, often reviewed or written by humans or gathered from users using the product. They act as ground truth baselines for evaluating new models, prompt versions, or any config updates. Updating this set periodically ensures it stays representative of real-world usage.</p></li><li><p><strong>LLMs as Judges: </strong>In many cases, a secondary model can be used to evaluate primary model outputs by asking questions like: &#8220;Does this follow the instruction?&#8221;, &#8220;Is it factually accurate?&#8221;, or &#8220;How helpful is this response?&#8221; While not perfect, LLMs-as-judges offer fast and scalable assessments when paired with clear criteria and examples. While it sounds efficient, using one LLM to evaluate another can have systematic biases that can invalidate your entire evaluation pipeline. This includes bias in terms of length, style of responses, and confidence.</p></li><li><p><strong>Semantic Similarity: </strong>Metrics like cosine similarity can be used to compare outputs against the high-quality outputs from the golden dataset. These are useful in regression tests, where we want to confirm that behavior hasn&#8217;t unintentionally drifted, even if wording has changed.</p></li></ul><p>While the above three sound efficient, they are still evolving, and automating LLM evaluation is still a challenging technical problem.</p><p>Below are the two approaches that can be practiced from the start:</p><ul><li><p><strong>Human-in-the-loop: </strong>You will want humans reviewing model outputs regularly, especially on critical user flows or ambiguous completions. This helps catch nuanced issues like tone, missed edge cases, or unexpected model shifts. This also involves sometimes executing the prompt 10-20 times with the same inputs to make sure that we get good results each time.</p></li><li><p><strong>User-Tagged Feedback Loops: </strong>Collecting feedback directly from users, whether through thumbs up/down or feedback comments, is one of the best ways to understand real-world quality. This feedback can be used to enrich eval datasets and train internal judge models to align closer with user expectations.</p></li></ul><div><hr></div><h2>Qualitative and Quantitative Metrics</h2><p>Once LLM is deployed, measuring quality isn&#8217;t as simple as tracking accuracy or latency. Two answers might look very different, but both might be correct. Or a response could be factually accurate but completely miss the user&#8217;s intent.</p><p>This is why both quantitative and qualitative metrics matter.</p><p><em>Here&#8217;s how this typically looks in practice:</em></p><ul><li><p><strong>Quantitative Metrics: </strong>These are the numbers you can graph and track over time. Common examples include:</p><ul><li><p><strong>Overall Latency:</strong> time per inference, useful for tracking user experience.</p></li><li><p><strong>Time to first token (TTFT):</strong> the time a user has to wait before they see the first word/character/token.</p></li><li><p><strong>Token usage:</strong> input/output tokens per call, helpful for understanding cost implications.</p></li><li><p><strong>Instruction adherence:</strong> measured via LLM judge scores or simple heuristics.</p></li><li><p><strong>User Feedback:</strong> a metric to track the sentiment of users</p></li></ul></li><li><p><strong>Qualitative Metrics: </strong>This is where human insight comes in. These include understanding whether the model made something up, were the responses were helpful, and whether it matches users expectations.</p></li><li><p><strong>Feedback Integration: </strong>One of the ways I think that helps is to merge the above two loops, like tracking a drop in instruction adherence/user feedback (quant), might trigger a human review (qual), or even upvoted completions from users can be added to golden datasets or used to fine-tune LLM-as-judge prompts or repeated tags of too verbose can inform prompt compression or instruction tweaking.</p></li></ul><div><hr></div><h2>Model Selection</h2><p>Choosing the right model is like choosing the right tech stack. There is no one-size-fits-all.</p><p><em>Here&#8217;s how this looks in practice:</em></p><ul><li><p><strong>Matching model to task: </strong>Different models have different strengths. Some are better at structured tasks like classification or code generation, others handle open-ended reasoning more effectively, and some are optimized for multimodal inputs like images. For one of the features I was building, GPT-4 was hallucinating with JSON responses, and moving to GPT-4o with structured outputs improved the accuracy. Understanding these strengths and doing small-scale evaluations can help you match the model to the specific job at hand.</p></li><li><p><strong>Token limits and cost trade-offs: </strong>Each model comes with constraints on input/output tokens, rate limits, and cost per token. These impact both latency and scalability. For example, a model with high accuracy but a 10x cost may not make sense for a high-throughput endpoint. Production choices often come down to balancing capability with cost per call, rate limits, and total monthly budget.</p></li><li><p><strong>Fallback and multi-provider strategies: </strong>Relying on a single model or provider can be risky. Network issues, API outages, or pricing changes can all affect uptime. Many robust systems are built with feature flags and routing layers that allow calls to be dynamically shifted between providers depending on availability.</p></li></ul><div><hr></div><h2>Debugging Hallucinations</h2><p>Traditional debugging assumes you can trace through your code to understand what went wrong. LLM debugging often feels like detective work.</p><p>Even when everything looks fine but LLMs sometimes say things that are just wrong. Debugging these cases is about understanding where the pipeline broke down.</p><p><em>Here are some of the things I tried:</em></p><ul><li><p><strong>Tracing the full input stack: </strong>The first step is always to capture the full input context prompt, system input, and user input. Without this, debugging is just guesswork. Going through the invocation history in sequence has helped me a lot in debugging the issue.</p></li><li><p><strong>Investigating retrieval mismatches: </strong>Sometimes the model hallucinates simply because it wasn&#8217;t shown the right context. This can happen due to wrong queries, wrong retrieval of information. Debugging retrieval involves logging and validating whether the correct document was even eligible to be retrieved.</p></li><li><p><strong>Session Replay tooling: </strong>Unlike traditional bugs, LLM failures are often non-deterministic. The same input can produce different outputs, making reproduction and fixing extremely difficult. Having tooling that can replay a request with different prompt versions or see the user&#8217;s exact request, the model choices of the system, or context configurations is invaluable.</p></li></ul><div><hr></div><h2>Bringing It All Together</h2><p>Building AI systems that go beyond prototypes means thinking holistically from how prompts are designed to how systems are deployed, evaluated, and maintained in production. Working with LLMs is non-deterministic, and one of the biggest wins is getting comfortable with it.</p><ul><li><p><strong>System Design Considerations</strong>: Just like with microservices, designing LLM systems involves making trade-offs between latency, context size, caching, and API dependencies. For example, whether to precompute embeddings or compute on the fly affects the response time.</p></li><li><p><strong>Being cost-aware</strong>: Cost is part of system design. Token-heavy prompts, unnecessarily large context windows, or routing all requests to the most expensive model can tank efficiency and need to be thought of before making the system live.</p></li><li><p><strong>Observability and Debuggability</strong>: Every user interaction with an LLM should be traceable to a specific prompt version, context snapshot, model, and input. Replay tooling, logs, debug hallucinations, or sudden behavior changes. While this sounds efficient, the observability stack for AI systems is still evolving.</p></li><li><p><strong>Feedback Loops</strong>: Qualitative user feedback, whether explicit thumbs down or implicit drop-offs, should inform prompt tweaks, retrieval tuning, and even product decisions.</p></li><li><p><strong>Canary Deployments</strong>: New prompts or model configurations are first rolled out to a small percentage of users. This helps detect regressions or unintended behaviors before full release.</p></li></ul><div><hr></div><p>Building LLM systems that go beyond prototypes requires the same engineering discipline as any production system, just adapted for probabilistic outputs. The difference between a clever demo and a reliable product isn't the underlying model; it's the engineering practices around it. Your 1% failure rate might be your users most important use cases. AI engineering is still a young discipline, but the principles are becoming clear: building AI systems that users trust and depend on, not just impressive demos that break in production. The tools will keep evolving, but the engineering mindset remains constant: build systems that work reliably, cost-effectively, and transparently, even when the underlying technology is inherently uncertain.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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[Reflections: Things I Learned]]></title><description><![CDATA[There&#8217;s a lot about being an engineer that you only learn by doing. This blog is a list of few things that have stayed with me.]]></description><link>https://www.theengineersnotebook.com/p/reflections-things-i-learned</link><guid isPermaLink="false">https://www.theengineersnotebook.com/p/reflections-things-i-learned</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 25 May 2025 12:09:48 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%2F99a2e695-b502-4f9d-b1ee-a1cab08b7e92_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>There is a lot about being an engineer that you only learn by doing. This blog is a list of few things that have stayed with me, surprised me, and changed the way I think.</p><div><hr></div><h3>Picking the right trade-off is everything</h3><p>Most decisions will not have a right answer; rather, they will consist of a set of good tradeoffs.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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>Some days you will be juggling between increasing a metric vs keeping the website up. Some days debating about tech debt vs moving fast. And some days on increasing reliability or building a new feature. In conversations like this is where you grow.</p><p>As engineers, we often find ourselves craving technical correctness. But in reality, it's all about judgement, knowing which corners you can and cannot cut.</p><p>Trade-offs are not a sign of failure. They are a core part of the work. The earlier you get comfortable making them, and owning them, the more effective you become.</p><h3>Code is the easy part</h3><p>When you are first starting out, coding can feel like the entire job. Commits and pull requests are the most visible features.</p><p>But, over time, I realised that the real challenges were elsewhere: talking to a frustrated user, owning a broken system during an outage, and unblocking a teammate who is waiting for you.</p><p>Writing code is simple (not always); the logic either works or doesn't. But engineering is far more than that. It's about how you deal with pressure, responsibility, and communication.</p><h3>You don&#8217;t need to have an answer always</h3><p>There is sometimes a hidden pressure we put on ourselves to always know what to do. To have a clean solution, a clear plan, and a quick fix.</p><p>However, sometimes the best solution is to say, "I'm not sure yet, but I will figure it out."</p><p>It's easy to think that expertise means having all the answers. However, in practice, it often involves asking better questions, remaining calm in a moment of uncertainty, asking help when needed, and trusting that you will learn your way through it.</p><p>Consistency is all that matters. Showing up daily, even when things are unclear or fuzzy is sometimes all that is needed.</p><h3>The emotional side is real</h3><p>No one tells you how emotional this journey can be. The uncertainty after a failed project. The happiness in a clean release. The joy of seeing someone use what you built. The challenge when things break. The gratitude when a teammate steps in to help. The little wins that mean everything to you. </p><p>What surprised me the most was how deeply personal this work is. Sure, it is code. It&#8217;s systems. But it&#8217;s also people. It&#8217;s identity. It&#8217;s the constant, quiet process of figuring out what kind of engineer and person you want to be. </p><p>It&#8217;s easy to think engineering is purely rational. But the truth is, most of us care a lot and that&#8217;s what makes the work meaningful.</p><h3>Growth isn&#8217;t always obvious</h3><p>As engineers, we are obsessed with numbers. Doing X increases it by Y. However, growth will not always feel like this. <br><br>Growth isn't always obvious. It occurs when no one is watching. It appears later, when you realise you handled a situation better than you would have a year ago. When you believe you handled a difficult situation better, approached a problem differently, or collaborated more effectively. <br><br>Not every day will be a drum roll, but if you show up and strive to be 1% better, that is progress.</p><h3>Writing is a superpower</h3><p>For years, I have made it a habit to write down my thoughts whenever I am faced with a difficult decision or problem. Not for anyone else, only for me.</p><p>At first, it was just a way to clear my head. But over time, I realized it was more than that. Writing helped me notice patterns. It helped me go back to the old decisions with a fresh perspective. Sometimes it even helped me avoid making the same mistake twice.</p><p>We often think clarity comes from more data. But clarity also comes from thinking slowly.</p><h3><strong>Product building is hard (And that&#8217;s the fun part)</strong></h3><p>No matter how good the architecture is or how clean the codebase looks, if you are building a product, you are stepping into a world of ambiguity. Requirements will change as the product matures. Priorities will shift as demand changes. Users will not always use it the way you expect.</p><p>Product building is an iterative process. You try something, ship it, observe, learn, collect feedback and iterate. Sometimes you're figuring out the right problem rather than the right solution.</p><p>What&#8217;s hard and also incredibly rewarding is becoming comfortable with the chaos. Learning to ask why before jumping to how. Developing the instinct to question: Is this the right thing to build? before thinking How fast can I ship this?</p><p>Over time, I have realized that engineering is not just a function for product, it is product. Every abstraction, every error message, every retry mechanism is part of the user experience.</p><div><hr></div><p>At the end of the day, it&#8217;s not about being perfect. It&#8217;s about being patient, constantly learning, staying curious, and enjoying the work along the way.</p><p>What are something&#8217;s you have learned in your own journey?</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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[Why Reliability Will Make or Break Your AI Product]]></title><description><![CDATA[Reliability is ultimately about Respect. Respect for the user&#8217;s time. Respect for their mental model. And respect for the trust they place in what we build. And in the world of AI, it just might be the thing that makes or breaks everything else.]]></description><link>https://www.theengineersnotebook.com/p/why-reliability-will-make-or-break</link><guid isPermaLink="false">https://www.theengineersnotebook.com/p/why-reliability-will-make-or-break</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sat, 05 Apr 2025 18:12:07 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%2F99a2e695-b502-4f9d-b1ee-a1cab08b7e92_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I've been thinking about Reliability and AI for a while. After over a year of developing and iterating on AI applications, I am convinced that reliability can make or break your applications.</p><p>AI applications have gone from prototypes to core elements of software engineering in the past few years, such as recommendations, identifying fraud, help with writing, and a lot more. However, with great power comes great unpredictability. Reliability is no longer just a feature; it is the foundation. Users may be impressed by intelligence, but they return for consistency. If your AI system fails unexpectedly, even once, users' trust in it will erode faster than it was built. And once that trust is lost, it's nearly impossible to regain.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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>What makes issues even harder is that AI does not always fail in obvious ways. There may be no error message or crash, just an off-putting response, a recommendation that falls short, or a moment when a user feels unseen. These are the times when reliability becomes obvious. They determine whether your product succeeds or fails.</p><p>So, reliability is no longer just a backend concern; it now extends to the way we build products. It doesn't always appear on launch day. However, it is what encourages a user to return tomorrow. And for the AI systems we're developing, I can't think of a more important metric.</p><h2>What Makes Reliability in AI Different</h2><p>Traditional software is largely deterministic: the same input produces the same result every time. AI is probabilistic. Even with identical inputs, we may receive different results depending on model randomness, inference parameters, hyperparameters, or changes in the upstream data. This makes bugs harder to reproduce and problems more difficult to detect.</p><p>Furthermore, AI systems degrade over time due to data changes rather than code changes. Models trained on yesterday's data may not be accurate tomorrow. This is known as data drift or model decay, and it is one of the most significant reliability risks in production machine learning.</p><p>LLM reliability extends beyond uptime and performance. It is about the predictability of behavior. It's about how the system handles uncertainty.</p><h2><strong>Common Ways LLM Fails</strong></h2><ol><li><p><strong>Hallucinated responses</strong>: The AI makes things up but expresses them with such confidence that users don&#8217;t realize anything went wrong.</p></li><li><p><strong>Inconsistent behavior: </strong>Asking the same question twice or multiple users going through the same flow generates different results, creating confusion.</p></li><li><p><strong>Lack of graceful handling for edge cases</strong>: The system doesn&#8217;t know how to say &#8220;I don&#8217;t know&#8221; and instead offers low-quality or misleading responses.</p></li><li><p><strong>Data Drift</strong>: As the training data becomes outdated, models begin to fail in new, unanticipated ways.</p></li></ol><h2>Ways that have helped me improve Reliability</h2><ul><li><p><strong>Don&#8217;t just test functionality but also behavior</strong>: Traditional test cases validate &#8220;Does this work?&#8221; But with LLMs, I&#8217;ve learned to ask, &#8220;How will this feel?&#8221; &#8220;What if this output is wrong but sounds right?&#8221; </p></li><li><p><strong>Observe real users and not just metrics</strong>: Quantitative metrics are helpful, but they often miss the story, and hence qualitative metrics play an equally important role. Watching and reading the chat histories of users&#8217; interactions with our LLM features has been far more enlightening. You start to notice patterns, confusion points, or expectations that weren&#8217;t met.</p></li><li><p><strong>Build with confidence in mind</strong>: For every LLM response, we ask, &#8220;How confident are we in this output?&#8221; If the answer is &#8220;not very,&#8221; then the UI should reflect that, and we iterate further on how to increase the confidence in the LLM response. </p></li><li><p><strong>Avoid frustrating loops</strong>: Users should never feel trapped inside an LLM-generated flow. There should always be a way to correct, back out, or ask for help. Even if there is a failure in response, there should be an action item/next step for the user to break the loop.</p></li><li><p><strong>Remember the worst cases</strong>: One thing that&#8217;s helped me is mentally walking through the &#8220;worst case&#8221; for any new AI feature. What happens if the model returns garbage? What does the user see if our inference endpoint is down? </p></li><li><p><strong>Make reliability part of the definition of done</strong>: We often think a feature is complete when it works &#8212; but it&#8217;s only truly done when it works <em>reliably</em>. That includes graceful failure, observability, and user clarity. I now treat those as first-class aspects of every AI feature, not just add-ons.</p></li></ul><p>Reliability is ultimately about <strong>Respect</strong>. Respect for the user&#8217;s time. Respect for their mental model. And respect for the trust they place in what we build.</p><h2>The Role of Humans in the Loop</h2><p>No matter how advanced the model, it needs human context or a human in the loop to stay grounded. That&#8217;s why <strong>human-in-the-loop (HITL)</strong> systems aren&#8217;t just a safety net; they&#8217;re a reliability engine.</p><p>Human-in-the-loop ensures:</p><ul><li><p>Critical errors are detected before they reach the user.</p></li><li><p>Ambiguities are resolved through human judgment.</p></li><li><p>User feedback is fed back into the system to help it improve over time.</p></li></ul><p>Even lightweight HITL systems, such as feedback buttons, add a layer of adaptability that code cannot provide.</p><div><hr></div><p>We often talk about AI&#8217;s capabilities: its speed, scale, or intelligence. But what truly matters in the long run is its <strong>Reliability</strong>. That&#8217;s what users come back to. And that&#8217;s what determines whether an AI system quietly fades away or becomes a trusted part of a user&#8217;s journey.</p><p>Reliability doesn&#8217;t announce itself. It shows up in the quiet moments; when things just work, even when the stakes are high or the path is unclear. Reliability isn&#8217;t just a technical challenge. It&#8217;s a design principle. A product value. A reflection of how much we care.</p><p>And in the world of AI, it just might be the thing that makes or breaks everything else.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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[Engineering with Empathy]]></title><description><![CDATA[Engineering with empathy, as I define it, means understanding that there is a human on the other end of every line of code we write.]]></description><link>https://www.theengineersnotebook.com/p/engineering-with-empathy</link><guid isPermaLink="false">https://www.theengineersnotebook.com/p/engineering-with-empathy</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Mon, 03 Mar 2025 09:07:13 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/c6b97e4b-92ab-4370-ba3c-ab9eb8e2b92f_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Engineering with empathy, as I define it, means understanding that there is a human on the other end of every line of code we write. It is about acknowledging that every technical decision we make has human consequences and that the ultimate measure of the code we write is not only its technical elegance but also how well it serves the actual users. </p><h2>Empathy in Engineering begins with two simple things</h2><ol><li><p>The first and most important step is to understand who your users are, rather than just what features they require or how we will build them. When you can connect with the end user or put yourself in their shoes, everything becomes easier and decisions are made objectively.</p></li><li><p>The next step is to understand the entire context in which any feature, no matter how small, exists. Once you understand the why, it becomes easier to figure out how.</p></li></ol><h2>Why does empathy matter in engineering? </h2><p>Empathy is often thought of as a soft skill, secondary to the hard logic of engineering. But, in reality, empathy combined with an engineer's technical depth and expertise can perform magic! It improves our problem-solving skills, reduces unnecessary complexity, fosters collaboration, and makes our work more fulfilling. </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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><h4>Problem Solving</h4><p>When we truly understand our users' frustrations, workflows, and mental models, we can stop solving theoretical problems and start tackling real ones. Without empathy, it is simple to design for an abstract "user" who only exists in the theory. It enables us to create solutions that are practical in nature. This shift not only improves the impact of our work, but it also saves time and effort on features that no one needs.</p><h4>Reducing Technical Debt</h4><p>Engineering with empathy often results in cleaner, more maintainable systems&#8212;even though it might seem counterintuitive at first. When we truly understand how users interact with our software over time, we design for adaptability. We resist the temptation to over-engineer speculative features or prematurely optimise for scale that may never come. At the same time, we ensure that critical user flows are built with care, avoiding under-engineering that could lead to friction. The result? A system that evolves gracefully instead of accumulating unnecessary technical debt.</p><p>My most recent example was when I was integrating a payment gateway. We started with Razorpay, but we knew we wanted to support global payments in the near future. Instead of hardcoding logic specific to a single provider, we designed the entire payment system around state machines and reusable methods. This approach was not only intended to make future integrations easier for the business; it also ensured that any developer working on the system (including my future self) would not be burdened with unnecessary complexity. That's when I realized that empathy-driven engineering is about making life easier for everyone who interacts with the system, not just the users.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SzeV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa725bae4-7e99-4a7b-8727-6e50458a750b_900x692.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SzeV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa725bae4-7e99-4a7b-8727-6e50458a750b_900x692.png 424w, https://substackcdn.com/image/fetch/$s_!SzeV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa725bae4-7e99-4a7b-8727-6e50458a750b_900x692.png 848w, https://substackcdn.com/image/fetch/$s_!SzeV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa725bae4-7e99-4a7b-8727-6e50458a750b_900x692.png 1272w, https://substackcdn.com/image/fetch/$s_!SzeV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa725bae4-7e99-4a7b-8727-6e50458a750b_900x692.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SzeV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa725bae4-7e99-4a7b-8727-6e50458a750b_900x692.png" width="568" height="436.7288888888889" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a725bae4-7e99-4a7b-8727-6e50458a750b_900x692.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:692,&quot;width&quot;:900,&quot;resizeWidth&quot;:568,&quot;bytes&quot;:101163,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://shlokashah.substack.com/i/149755554?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa725bae4-7e99-4a7b-8727-6e50458a750b_900x692.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SzeV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa725bae4-7e99-4a7b-8727-6e50458a750b_900x692.png 424w, https://substackcdn.com/image/fetch/$s_!SzeV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa725bae4-7e99-4a7b-8727-6e50458a750b_900x692.png 848w, https://substackcdn.com/image/fetch/$s_!SzeV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa725bae4-7e99-4a7b-8727-6e50458a750b_900x692.png 1272w, https://substackcdn.com/image/fetch/$s_!SzeV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa725bae4-7e99-4a7b-8727-6e50458a750b_900x692.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" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1jp1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0394696e-fc02-4faf-9d61-5978a561a8db_1402x320.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1jp1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0394696e-fc02-4faf-9d61-5978a561a8db_1402x320.png 424w, https://substackcdn.com/image/fetch/$s_!1jp1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0394696e-fc02-4faf-9d61-5978a561a8db_1402x320.png 848w, https://substackcdn.com/image/fetch/$s_!1jp1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0394696e-fc02-4faf-9d61-5978a561a8db_1402x320.png 1272w, https://substackcdn.com/image/fetch/$s_!1jp1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0394696e-fc02-4faf-9d61-5978a561a8db_1402x320.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1jp1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0394696e-fc02-4faf-9d61-5978a561a8db_1402x320.png" width="584" height="133.29529243937233" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0394696e-fc02-4faf-9d61-5978a561a8db_1402x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:1402,&quot;resizeWidth&quot;:584,&quot;bytes&quot;:51326,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://shlokashah.substack.com/i/149755554?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0394696e-fc02-4faf-9d61-5978a561a8db_1402x320.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1jp1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0394696e-fc02-4faf-9d61-5978a561a8db_1402x320.png 424w, https://substackcdn.com/image/fetch/$s_!1jp1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0394696e-fc02-4faf-9d61-5978a561a8db_1402x320.png 848w, https://substackcdn.com/image/fetch/$s_!1jp1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0394696e-fc02-4faf-9d61-5978a561a8db_1402x320.png 1272w, https://substackcdn.com/image/fetch/$s_!1jp1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0394696e-fc02-4faf-9d61-5978a561a8db_1402x320.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h4>Finding Meaning</h4><p>I believe that knowing who we are developing for and why we are doing what we are doing is key to finding fulfillment in our work. It is one thing to say "I write code," but completely different to say "I solve this problem for people by writing code." It's really exciting to know that what I create is actually helping people solve an important problem for them. It reminds us that behind every API call, performance optimization, and bug fix, there is a user trying to accomplish something important to them. That perspective provides more satisfaction than simply shipping features; it transforms our work into something meaningful.</p><h2>How to Engineer with Empathy </h2><p>After a few years of learning, here are practices that have helped me engineer with empathy: </p><h4>Diving into User Feedback</h4><p>This is something I strongly believe in: digging deep into user feedback. Don't delegate understanding of your users to the product team. Make it your business to understand who uses your software, including the smallest feature you've created, and how they feel about it. This includes actively engaging with feedback channels, reading support tickets personally, and looking beyond feature requests to detect emotional cues in user feedback.</p><p>One of my daily practices is to review user feedback to better understand how people use the product. It has become a consistent source of motivation. We track the Developer Love Index (DLI) for one of the products we're developing in HackerRank's Developer Community team on a regular basis&#8212;a measure of how much users value the product and whether they'd pay for it. It provides an instant energy boost. When the DLI rises, it indicates that we are on the right track. When it drops, it's a clear signal to investigate further and figure out what's wrong.</p><p>This viewpoint is powerful: even if only one user benefits from what we're creating, the right speed and direction can spread the impact to countless others facing similar challenges.</p><h4>Get rid of preconceived notions </h4><p>When you've spent weeks developing and testing a feature, it's natural to believe you know exactly how users will interact with it. After all, you've become the most experienced user. However, real users frequently navigate software in unexpected ways; what appears intuitive to you may be confusing or frustrating to someone else.</p><p>One of the most effective ways to combat this bias is to observe how actual users interact with the system. Sessions replays have changed the game for me. Actual user interactions can reveal pain points that specs, test cases, and even direct feedback cannot. It highlights the various applications of a feature and bases each decision on data rather than assumptions. </p><p>While the first version of any feature is always built with assumptions and hypotheses, this is where iterations come in handy.</p><h3><strong>Embrace "What If" Thinking</strong></h3><p>This involves identifying potential frustrations before they become major problems. A good habit is to pause and ask the right questions, for example:</p><ul><li><p>What if the bot gets stuck while generating a response?</p></li><li><p>What happens if a payment fails? Will they understand what to do next?</p></li></ul><p>Thinking about failure cases and edge scenarios helps to create a more seamless user experience. Proactively handling errors with clear, human-friendly messages can mean the difference between a frustrated and a delighted user.</p><p>One of the things I recently did for one of the AI features we are developing was to make the error message more human-friendly so that, in the worst-case scenario, the user sees the message; this may reduce the frustration of an already disappointed user.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QVdl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2425a78-ef45-44fd-bad2-9a4d085e1a04_1694x242.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QVdl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2425a78-ef45-44fd-bad2-9a4d085e1a04_1694x242.png 424w, https://substackcdn.com/image/fetch/$s_!QVdl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2425a78-ef45-44fd-bad2-9a4d085e1a04_1694x242.png 848w, https://substackcdn.com/image/fetch/$s_!QVdl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2425a78-ef45-44fd-bad2-9a4d085e1a04_1694x242.png 1272w, https://substackcdn.com/image/fetch/$s_!QVdl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2425a78-ef45-44fd-bad2-9a4d085e1a04_1694x242.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QVdl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2425a78-ef45-44fd-bad2-9a4d085e1a04_1694x242.png" width="1456" height="208" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b2425a78-ef45-44fd-bad2-9a4d085e1a04_1694x242.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:208,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:60599,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://shlokashah.substack.com/i/149755554?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2425a78-ef45-44fd-bad2-9a4d085e1a04_1694x242.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QVdl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2425a78-ef45-44fd-bad2-9a4d085e1a04_1694x242.png 424w, https://substackcdn.com/image/fetch/$s_!QVdl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2425a78-ef45-44fd-bad2-9a4d085e1a04_1694x242.png 848w, https://substackcdn.com/image/fetch/$s_!QVdl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2425a78-ef45-44fd-bad2-9a4d085e1a04_1694x242.png 1272w, https://substackcdn.com/image/fetch/$s_!QVdl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2425a78-ef45-44fd-bad2-9a4d085e1a04_1694x242.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h3>Remember the problem you are trying to solve</h3><p>One of the most important guiding principles in any discussion&#8212;whether it's naming a variable, structuring code, or deciding on the next feature&#8212;is to keep the core problem in mind. It's easy to get lost in discussions about implementation details, abstract optimizations, or even personal preferences. </p><p>However, at the end of the day, every decision should relate back to the fundamental question.</p><p>"What is the actual problem we are solving?"</p><p>Always begin with the "why" before diving into the "how" of implementing something.</p><p>Once we start understanding these fundamentals, the fuzziness starts becoming clear. For example, we need to worry about the variable name because it will become easy for you and other developers to come back to it in the future. We are building a feature X because it solves the problem Y.</p><div><hr></div><p>I've gradually come to believe that empathy is more than just a nice-to-have soft skill for engineers; it's an essential value added along with&nbsp;technical depth and competency. It's what separates code that functions from code that serves, systems that run from systems that enable humans. So the next time you sit down to write code, remember: there's a human on the other side, and your empathy might be as important as your algorithms. </p><div><hr></div><p><em>What practices have helped you engineer with empathy? I'd love to hear your experiences.</em></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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[Must have documents that everyone should try keeping]]></title><description><![CDATA[In this blog, I share some of the things that I have been trying to keep things organized. They are simple, flexible methods that have helped me stay on top of things and feel a little more in control.]]></description><link>https://www.theengineersnotebook.com/p/must-have-documents-that-everyone</link><guid isPermaLink="false">https://www.theengineersnotebook.com/p/must-have-documents-that-everyone</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 05 Jan 2025 14:55:10 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/abff37bc-b71b-4496-8a4c-c4a478369785_3540x2360.avif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We&#8217;ve all been there&#8212;juggling deadlines, meetings, and last-minute tasks. In the middle of all the chaos, it&#8217;s easy to lose track of your progress and forget your wins.</p><p>That&#8217;s where tools like brag documents, priority lists, and got-done lists come in. They&#8217;re not just about staying organized&#8212;they&#8217;re about giving yourself credit where it&#8217;s due, tracking your growth, and building a system that works with your busy life, not against it.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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 this blog, I share some of the things that I have been trying to keep things organized. They are simple, flexible methods that have helped me stay on top of things and feel a little more in control.</p><h1>Brag Document</h1><h4>What is a brag document?</h4><p>It&#8217;s a simple list where you record your achievements, the impact you&#8217;ve made, and what you&#8217;re working toward. Think of it as your archive of wins, big and small, and the things that you need to improve at.</p><h4>Why do we need a brag document?</h4><ol><li><p><strong>Avoiding Recency Bias</strong></p><p>It is a fact that we tend to remember recent events better than events that occurred in the past, giving the recent event more significance. If someone asks, <em>&#8220;What did you do six months ago?&#8221;</em> we&#8217;d probably need a moment to recall. Without a brag document, we often have to dig through pull requests, tickets, slack conversations, launch emails, and design documents. I&#8217;ve been there&#8212;rediscovering small and sometimes major wins that I&#8217;d completely forgotten about. </p></li><li><p><strong>Identifying patterns and preferences</strong></p><p>A brag document is a great tool not only for performance reviews but also for self-reflection. By reviewing it, you can spot patterns in the work you enjoy, the skills you&#8217;ve developed, areas where you&#8217;ve had the most impact, and areas where there is a scope for improvement. It&#8217;s an opportunity to understand your preferences and chart a more intentional career path.</p></li></ol><p>On days when imposter syndrome hits hard, going back to the brag document can be like having a good cup of ice cream on a bad day!</p><p>When I first wrote a brag document I was kind of nervous about sharing it with anyone. It felt weird to be like I wrote a long document listing everything I did this year so I kept the name of the document as &#8220;Review Document&#8221;. </p><h4><strong>How do we start writing a brag document?</strong></h4><ul><li><p><strong>Start by listing down everything</strong><br>Include everything&#8212;big wins, small contributions, and fuzzy work that&#8217;s hard to quantify like refactoring code, reducing tech debt, fixing critical bugs, and improving the on-call process.</p></li><li><p><strong>Explaining the big picture</strong><br>Organize your work by projects or themes. For example, if you have been working on multiple projects in parallel, you can add headings like &#8220;Project 1&#8221;, and  &#8220;Project 2&#8221; and then list everything done under each project. This not only showcases the breadth of work but also highlights how your efforts align with broader team or organizational goals.</p></li></ul><p><a href="https://docs.google.com/document/d/1IoCbTqNF8RIH5WEo6iZxCI6WauXn8dMAUqxcbsYFaTE/edit?usp=sharing">This is a simple template</a> that I have been using and can help anyone get started.</p><h4>How often to update the brag document?</h4><p>Updating the document on a daily/weekly or sometimes even every month might feel like a lot. A trick that I have been following is to take notes that don't have to be flawlessly formatted; a few bullet points can do the trick and serve as a recall of the entire scenario when you go back to it. I record everything that comes to me and once every Quarter I update the document.</p><p>You might have to experiment with a few cadences to see which one suits you the best. Usually having one document for the year helps. </p><p>One important thing to keep in mind is to not pressure yourself with writing the perfect document in the first go. Keep it simple. It doesn&#8217;t need to be perfect or fancy&#8212;just real. You just have to explain your work the way it was done.</p><p>You can also check out <a href="https://jvns.ca/blog/brag-documents/">https://jvns.ca/blog/brag-documents/</a> </p><h1>Kudoboard</h1><p>There are going to be days when we tend to doubt ourselves. We overthink a message we sent or a conversation that happened, or we just need that quick pep talk before a big day or consolation after a not-so-good one.</p><p>That&#8217;s where our personal Kudoboard comes in&#8212;a treasure of positivity and encouragement.</p><p>It could be a screenshot of a Slack message from a teammate who appreciated your help, an email from your manager praising your work, or even a quick note from a friend saying, &#8220;I couldn&#8217;t have done this without you.&#8221; These small yet meaningful moments often fade into the background amidst the daily hustle, but collecting them in one place creates a powerful reservoir of confidence and motivation.</p><p>Your kudoboard becomes your personal cheerleader, whispering, &#8220;You&#8217;ve got this!&#8221; It&#8217;s a reminder that while setbacks happen, they don&#8217;t define you. </p><p>To start with, create a folder in your inbox, a private document, or use tools like Kudoboard or Google Docs or as simple as a Whatsapp group with just you in it.</p><h1>To-Do, Priority &amp; Got-Done List</h1><p>A priority list outlines the key things you aim to achieve over the month/week, keeping you aligned with the bigger picture. Alongside this, a daily to-do list helps in breaking those objectives into manageable tasks for the day, ensuring steady progress. I usually use a notebook to maintain these lists but you can also experiment with Notion or tools like Trello. When you have a clear list of what needs to be done, your brain automatically follows and gets into a problem-solving state.</p><p>Some days, despite careful planning, unexpected tasks crop up, leaving you feeling like you&#8217;re constantly firefighting without making real progress. That&#8217;s when the got-done list becomes valuable. </p><div><hr></div><p>To conclude, these documents aren&#8217;t about rigid systems&#8212;they&#8217;re about finding what works for you and following the rhythm to stay organized. What are some of the things that you have tried?</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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[My experience starting a reading club]]></title><description><![CDATA[I have realized that reading isn&#8217;t just something you do alone&#8212;it can also bring people together.]]></description><link>https://www.theengineersnotebook.com/p/my-experience-starting-a-reading</link><guid isPermaLink="false">https://www.theengineersnotebook.com/p/my-experience-starting-a-reading</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 08 Dec 2024 17:39:56 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/febca32e-2a2e-4a1d-9402-22ce6ba58875_1800x1220.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Growing up, I was always excited by the Scholastic Book Fair. Those temporary libraries felt magical, creating a space where readers could explore new worlds together. Years later, I felt the same joy walking through the aisles of Crossword or sitting in a quiet corner of <a href="https://www.instagram.com/kitabkhanabooks">Kitaab Khana</a>. It was there that I realized reading isn&#8217;t just something you do alone&#8212;it can also bring people together. Inspired by them, I always wanted to create a similar space of my own.</p><p>This love for shared reading experiences introduced me to two wonderful communities: <a href="https://www.instagram.com/cubbonreads">CubbonReads</a> and <a href="https://www.instagram.com/mumbaibookies/">BombayBookies</a>.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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><div><hr></div><h3>The Beginning of LabsReads</h3><p>The idea for LabsReads emerged from a simple tradition between <a href="https://sp2hari.com/">Hari</a> and me. We often exchanged articles or blogs and discussed them informally. Over time, this casual practice sparked a thought: what if we turned this into a regular, organized activity with the team?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_UAc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9821615a-1b8e-4bd8-92e6-f7115776e390_2312x1154.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_UAc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9821615a-1b8e-4bd8-92e6-f7115776e390_2312x1154.png 424w, https://substackcdn.com/image/fetch/$s_!_UAc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9821615a-1b8e-4bd8-92e6-f7115776e390_2312x1154.png 848w, https://substackcdn.com/image/fetch/$s_!_UAc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9821615a-1b8e-4bd8-92e6-f7115776e390_2312x1154.png 1272w, https://substackcdn.com/image/fetch/$s_!_UAc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9821615a-1b8e-4bd8-92e6-f7115776e390_2312x1154.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_UAc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9821615a-1b8e-4bd8-92e6-f7115776e390_2312x1154.png" width="688" height="343.5274725274725" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9821615a-1b8e-4bd8-92e6-f7115776e390_2312x1154.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:727,&quot;width&quot;:1456,&quot;resizeWidth&quot;:688,&quot;bytes&quot;:327523,&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_!_UAc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9821615a-1b8e-4bd8-92e6-f7115776e390_2312x1154.png 424w, https://substackcdn.com/image/fetch/$s_!_UAc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9821615a-1b8e-4bd8-92e6-f7115776e390_2312x1154.png 848w, https://substackcdn.com/image/fetch/$s_!_UAc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9821615a-1b8e-4bd8-92e6-f7115776e390_2312x1154.png 1272w, https://substackcdn.com/image/fetch/$s_!_UAc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9821615a-1b8e-4bd8-92e6-f7115776e390_2312x1154.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 timing couldn&#8217;t have been better. Around the same week, I attended a session of CubbonReads for the first time, and I loved how the community gathered and read together. Inspired, I decided to bring a similar concept, naming it <strong>LabsReads </strong>since the name of our team was Labs.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!u5WL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5940922-ebec-4fd3-871c-5a00de9b71c7_1418x296.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!u5WL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5940922-ebec-4fd3-871c-5a00de9b71c7_1418x296.png 424w, https://substackcdn.com/image/fetch/$s_!u5WL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5940922-ebec-4fd3-871c-5a00de9b71c7_1418x296.png 848w, https://substackcdn.com/image/fetch/$s_!u5WL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5940922-ebec-4fd3-871c-5a00de9b71c7_1418x296.png 1272w, https://substackcdn.com/image/fetch/$s_!u5WL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5940922-ebec-4fd3-871c-5a00de9b71c7_1418x296.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!u5WL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5940922-ebec-4fd3-871c-5a00de9b71c7_1418x296.png" width="1418" height="296" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f5940922-ebec-4fd3-871c-5a00de9b71c7_1418x296.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:296,&quot;width&quot;:1418,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:91388,&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_!u5WL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5940922-ebec-4fd3-871c-5a00de9b71c7_1418x296.png 424w, https://substackcdn.com/image/fetch/$s_!u5WL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5940922-ebec-4fd3-871c-5a00de9b71c7_1418x296.png 848w, https://substackcdn.com/image/fetch/$s_!u5WL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5940922-ebec-4fd3-871c-5a00de9b71c7_1418x296.png 1272w, https://substackcdn.com/image/fetch/$s_!u5WL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5940922-ebec-4fd3-871c-5a00de9b71c7_1418x296.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>I was both nervous and excited. Starting something new always comes with a mix of excitement and uncertainty&#8212;like opening the first page of a new book. Would people join? Would they enjoy it? What if the article I chose is a stupid one? These questions ran through my mind, but the thought of creating a space where people could come together to read and share ideas kept me motivated. It was a big step into the unknown, but one that felt interesting.</p><div><hr></div><h3>What is LabsReads?</h3><p>LabsReads is more than just a reading session; it&#8217;s a space for learning and collaboration. The format is simple:</p><ul><li><p><strong>15 minutes of reading</strong>: We read an article on any topic related to software engineering.</p></li><li><p><strong>15-30 minutes of discussion</strong>: We share perspectives, insights, and questions about the article we read.</p></li></ul><p>Our sessions happen every other Wednesday. Sometimes, we gather amidst artificial trees in the HackerRank Bangalore office; other times, we meet outdoors, surrounded by lakes or rivers. The goal remains constant: to create an environment where reading ignites conversations.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LIUP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd3e41f-fdf7-4b0e-9dc0-52481c9c5c90_1820x1814.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LIUP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd3e41f-fdf7-4b0e-9dc0-52481c9c5c90_1820x1814.png 424w, https://substackcdn.com/image/fetch/$s_!LIUP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd3e41f-fdf7-4b0e-9dc0-52481c9c5c90_1820x1814.png 848w, https://substackcdn.com/image/fetch/$s_!LIUP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd3e41f-fdf7-4b0e-9dc0-52481c9c5c90_1820x1814.png 1272w, https://substackcdn.com/image/fetch/$s_!LIUP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd3e41f-fdf7-4b0e-9dc0-52481c9c5c90_1820x1814.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LIUP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd3e41f-fdf7-4b0e-9dc0-52481c9c5c90_1820x1814.png" width="376" height="374.7087912087912" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9cd3e41f-fdf7-4b0e-9dc0-52481c9c5c90_1820x1814.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1451,&quot;width&quot;:1456,&quot;resizeWidth&quot;:376,&quot;bytes&quot;:5959952,&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_!LIUP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd3e41f-fdf7-4b0e-9dc0-52481c9c5c90_1820x1814.png 424w, https://substackcdn.com/image/fetch/$s_!LIUP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd3e41f-fdf7-4b0e-9dc0-52481c9c5c90_1820x1814.png 848w, https://substackcdn.com/image/fetch/$s_!LIUP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd3e41f-fdf7-4b0e-9dc0-52481c9c5c90_1820x1814.png 1272w, https://substackcdn.com/image/fetch/$s_!LIUP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd3e41f-fdf7-4b0e-9dc0-52481c9c5c90_1820x1814.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><hr></div><h3>Lessons Learned</h3><p>Over the past year of running LabsReads, here are some of the things that I have learned and tried</p><h4><strong>Deciding what we read</strong></h4><p>Choosing the right article is key to keeping the discussion engaging. I maintain a Google Doc of links that I come across, categorizing them by themes like code quality, testing, tech debt, or product building. I have realized that rotating themes keep discussions fresh, and relevant to engineers, product managers, and designers alike.</p><p>One of the important factors that decide the article we will be reading is also something that will directly help us in our day-to-day work while building our product. For example, when the team had to plan on what Technical Debt we would be picking up for the year, <a href="https://blog.pragmaticengineer.com/tech-debt/">we read</a> about the different ways in which technical debt could be solved and how we needed to attach a business value to it. When we were deciding on what Testing strategy that we would follow, <a href="https://www.florianbellmann.com/blog/never-taught-qa">we read</a> about how QA was something everyone had to do.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AOmN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc340a1d-3b92-4de1-ace3-35adfc8b398f_1454x1388.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AOmN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc340a1d-3b92-4de1-ace3-35adfc8b398f_1454x1388.png 424w, https://substackcdn.com/image/fetch/$s_!AOmN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc340a1d-3b92-4de1-ace3-35adfc8b398f_1454x1388.png 848w, https://substackcdn.com/image/fetch/$s_!AOmN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc340a1d-3b92-4de1-ace3-35adfc8b398f_1454x1388.png 1272w, https://substackcdn.com/image/fetch/$s_!AOmN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc340a1d-3b92-4de1-ace3-35adfc8b398f_1454x1388.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AOmN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc340a1d-3b92-4de1-ace3-35adfc8b398f_1454x1388.png" width="459" height="438.16506189821183" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc340a1d-3b92-4de1-ace3-35adfc8b398f_1454x1388.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1388,&quot;width&quot;:1454,&quot;resizeWidth&quot;:459,&quot;bytes&quot;:298221,&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_!AOmN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc340a1d-3b92-4de1-ace3-35adfc8b398f_1454x1388.png 424w, https://substackcdn.com/image/fetch/$s_!AOmN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc340a1d-3b92-4de1-ace3-35adfc8b398f_1454x1388.png 848w, https://substackcdn.com/image/fetch/$s_!AOmN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc340a1d-3b92-4de1-ace3-35adfc8b398f_1454x1388.png 1272w, https://substackcdn.com/image/fetch/$s_!AOmN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc340a1d-3b92-4de1-ace3-35adfc8b398f_1454x1388.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><h4><strong>Facilitating the Flow</strong></h4><p>Before the first session, I was worried about how the discussion would follow. Preparing a list of questions or discussion prompts helped structure the conversation and ensured active participation. This practice continues to be a cornerstone of how the sessions are conducted. Before every session now, I write a maximum of 5 questions around which we could have a discussion and then the room is open for any free discussion.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wNk9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1649e2a-04a4-4596-9c63-4f8ede588eac_1468x1174.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wNk9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1649e2a-04a4-4596-9c63-4f8ede588eac_1468x1174.png 424w, https://substackcdn.com/image/fetch/$s_!wNk9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1649e2a-04a4-4596-9c63-4f8ede588eac_1468x1174.png 848w, https://substackcdn.com/image/fetch/$s_!wNk9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1649e2a-04a4-4596-9c63-4f8ede588eac_1468x1174.png 1272w, https://substackcdn.com/image/fetch/$s_!wNk9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1649e2a-04a4-4596-9c63-4f8ede588eac_1468x1174.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wNk9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1649e2a-04a4-4596-9c63-4f8ede588eac_1468x1174.png" width="482" height="385.33516483516485" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c1649e2a-04a4-4596-9c63-4f8ede588eac_1468x1174.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1164,&quot;width&quot;:1456,&quot;resizeWidth&quot;:482,&quot;bytes&quot;:247361,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&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_!wNk9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1649e2a-04a4-4596-9c63-4f8ede588eac_1468x1174.png 424w, https://substackcdn.com/image/fetch/$s_!wNk9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1649e2a-04a4-4596-9c63-4f8ede588eac_1468x1174.png 848w, https://substackcdn.com/image/fetch/$s_!wNk9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1649e2a-04a4-4596-9c63-4f8ede588eac_1468x1174.png 1272w, https://substackcdn.com/image/fetch/$s_!wNk9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1649e2a-04a4-4596-9c63-4f8ede588eac_1468x1174.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><h4><strong>Keeping it exciting</strong></h4><p>To add a touch of fun, we introduced LabsReads bookmarks. Whoever attends the session gets a bookmark&#8212;a small touch to keep everyone attending it engaged.</p><h4><strong>Finding the Right Cadence</strong></h4><p>When LabsReads began, we held sessions weekly, eager to maintain momentum. However, we quickly learned that weekly sessions were a sprint we couldn&#8217;t sustain while balancing other work priorities&#8212;so we paced ourselves to biweekly to ensure we were not risking the freshness of each session.</p><p>A biweekly schedule has proven to be a better fit. Our goal now is simple: to host a minimum of 12 sessions each year (approx 1/month).</p><div><hr></div><p>What makes LabsReads isn&#8217;t just the articles we read but the conversations that follow. Whether it&#8217;s someone sharing a story from their projects or a lively debate about an unexpected perspective.</p><p>Here&#8217;s to many more sessions of reading and sharing 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_!bpZF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc59e1a5-b056-4f7c-98d0-3dc267b26eb9_5712x3213.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bpZF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc59e1a5-b056-4f7c-98d0-3dc267b26eb9_5712x3213.jpeg 424w, https://substackcdn.com/image/fetch/$s_!bpZF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc59e1a5-b056-4f7c-98d0-3dc267b26eb9_5712x3213.jpeg 848w, https://substackcdn.com/image/fetch/$s_!bpZF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc59e1a5-b056-4f7c-98d0-3dc267b26eb9_5712x3213.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!bpZF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc59e1a5-b056-4f7c-98d0-3dc267b26eb9_5712x3213.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bpZF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc59e1a5-b056-4f7c-98d0-3dc267b26eb9_5712x3213.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fc59e1a5-b056-4f7c-98d0-3dc267b26eb9_5712x3213.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;:2086041,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bpZF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc59e1a5-b056-4f7c-98d0-3dc267b26eb9_5712x3213.jpeg 424w, https://substackcdn.com/image/fetch/$s_!bpZF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc59e1a5-b056-4f7c-98d0-3dc267b26eb9_5712x3213.jpeg 848w, https://substackcdn.com/image/fetch/$s_!bpZF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc59e1a5-b056-4f7c-98d0-3dc267b26eb9_5712x3213.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!bpZF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc59e1a5-b056-4f7c-98d0-3dc267b26eb9_5712x3213.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">picture from the last LabsReads</figcaption></figure></div><div><hr></div><p><em>Links we read so far</em></p><ul><li><p><a href="https://www.mensurdurakovic.com/hard-to-swallow-truths-they-wont-tell-you-about-software-engineer-job">10 hard-to-swallow truths they won't tell you about software engineer job</a></p></li><li><p><a href="https://blog.pragmaticengineer.com/tech-debt/">Tech Debt and the Pragmatic Middle Ground</a></p></li><li><p><a href="https://stackoverflow.blog/2019/09/30/how-to-make-good-code-reviews-better/">How to Make Good Code Reviews Better</a></p></li><li><p><a href="https://basmataha199.substack.com/p/writing-code-stop-think-firs">Writing Code? STOP! Think First...</a></p></li><li><p><a href="https://read.engineerscodex.com/p/clever-code-is-probably-the-worst">Clever code is probably the worst code you could write</a></p></li><li><p><a href="https://www.florianbellmann.com/blog/never-taught-qa">You are never taught how to build quality software</a></p></li><li><p><a href="https://increment.com/on-call/when-the-pager-goes-off/">What happens when the pager goes off?</a></p></li><li><p><a href="https://principlesofchaos.org/">Principle of Chaos Engineering</a></p></li><li><p><a href="https://roughlywritten.substack.com/p/random-thoughts-15-years-into-software">Random Thoughts 15 years into Software Engineering</a></p></li><li><p><a href="https://newsletter.posthog.com/p/using-your-own-product-is-a-superpower">Using your own product is a superpower</a></p></li><li><p><a href="https://substack.com/@pragmaticengineer/p-148421505">Paying down tech debt</a></p></li><li><p><a href="https://linear.app/blog/rethinking-the-startup-mvp-building-a-competitive-product">Rethinking the startup MVP: Building a competitive product</a></p><p></p></li></ul><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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[Behind the Scenes at HackerRank's upgrade to MySQL 8.0]]></title><description><![CDATA[Behind the scenes of HackerRank's MySQL upgrade, where we navigated challenges like replica lag, table optimization, and unique index issues.]]></description><link>https://www.theengineersnotebook.com/p/behind-the-scenes-at-hackerranks</link><guid isPermaLink="false">https://www.theengineersnotebook.com/p/behind-the-scenes-at-hackerranks</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 06 Oct 2024 09:29:58 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/6c414abd-1f6a-4c57-9487-f505eb1642e9_800x539.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1><strong>The Beginning</strong></h1><p>It was business as usual at the HackerRank office. As the HackerRank Community team gathered to plan the next quarter, one of the topics that came up was the Tech debt we will address this quarter.</p><p>To give some context, every quarter in our team we pick two Tech debt items &#8211; one on each Backend &amp; Frontend alongside all the product items we have to build.</p><p>After some discussion, we finally decided to pick MySQL Upgrade to 8 as one of the items. It was a long due.</p><h1><strong>Motivation for Upgrade</strong></h1><p>Why did we need to upgrade to MySQL 8.0? We had been running AWS Relational Database Service (RDS) with extended support for MySQL 5.7, as it had reached its end of life. However, this extended support came at a steep cost&#8212;an additional $3,000 per month. It was time to upgrade to a version of MySQL that would provide the latest security updates, bug fixes, and performance enhancements but more importantly, time to save that money.</p><p>And so, the roller coaster began: upgrading the HackerRank Community Database from MySQL 5.7 to 8.</p><p>Honestly, I was the most excited about this upgrade. Reading the <em>High-Performance MySQL</em> book, I was eager to dive into the core infrastructure changes. It was finally time for some database fun!</p><h1><strong>A sneak peek into the HackerRank&#8217;s Infrastructure</strong></h1><p>Now, our AWS RDS setup looks like this:</p><ul><li><p>Master, where all the reads and writes are directed to</p></li><li><p>Read Replica, where all the long-running reads are directed to</p></li><li><p>Analytics Replica, which is used for our internal analytics</p></li></ul><p>Now, as a next step, I had to devise a plan for the upgrade and what all prerequisites would be needed to be performed to get the upgrade done.</p><h1><strong>Approach to the Upgrade</strong></h1><p>As we delved deeper into upgrading our RDS instance, we explored using <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html?source=post_page-----444a5a7c67ea--------------------------------">AWS's Blue/Green deployment</a>.&nbsp;</p><p>Amazon RDS Blue/Green deployment solution is simple, and most of the replication/sync effort between existing MySQL 5.7 (blue deployment) and MySQL 8 (green deployment) is managed by AWS using logical replication. You can make changes to the RDS DB instances in the green environment without affecting production workloads like upgrading the DB engine version or changing database parameters in the staging environment.&nbsp;</p><p>When ready, you can <em>switch over</em> the environments to promote the green environment as the new production environment. The switchover typically takes under a minute with no data loss and no need for application changes.</p><p>One key prerequisite for this approach was ensuring that both the master and replicas had identical indexes, with no separate read indexes on the replicas. To verify this, we took an SQL dump of all three databases and compared the indexes. Thankfully, all three had matching indexes, so we decided to proceed with the Blue/Green deployment. One problem solved!</p><h1><strong>Preparing for the Upgrade</strong></h1><p>With the upgrade method confirmed to be Blue/Green (rather than the traditional method of creating a duplicate RDS and switching traffic), we outlined the necessary steps:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ryx6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77e9faa0-0fc4-451a-a6d9-d60db100bd3c_1656x718.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ryx6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77e9faa0-0fc4-451a-a6d9-d60db100bd3c_1656x718.png 424w, https://substackcdn.com/image/fetch/$s_!Ryx6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77e9faa0-0fc4-451a-a6d9-d60db100bd3c_1656x718.png 848w, https://substackcdn.com/image/fetch/$s_!Ryx6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77e9faa0-0fc4-451a-a6d9-d60db100bd3c_1656x718.png 1272w, https://substackcdn.com/image/fetch/$s_!Ryx6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77e9faa0-0fc4-451a-a6d9-d60db100bd3c_1656x718.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ryx6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77e9faa0-0fc4-451a-a6d9-d60db100bd3c_1656x718.png" width="1456" height="631" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/77e9faa0-0fc4-451a-a6d9-d60db100bd3c_1656x718.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:631,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:150756,&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_!Ryx6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77e9faa0-0fc4-451a-a6d9-d60db100bd3c_1656x718.png 424w, https://substackcdn.com/image/fetch/$s_!Ryx6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77e9faa0-0fc4-451a-a6d9-d60db100bd3c_1656x718.png 848w, https://substackcdn.com/image/fetch/$s_!Ryx6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77e9faa0-0fc4-451a-a6d9-d60db100bd3c_1656x718.png 1272w, https://substackcdn.com/image/fetch/$s_!Ryx6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77e9faa0-0fc4-451a-a6d9-d60db100bd3c_1656x718.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>After running the upgrade-checker tool, we encountered one error due to an intermediate temporary table. This was resolved by dropping the table. The error message was:</p><pre><code>[ERROR] Schema inconsistencies resulting from file removal or corruption.This issue likely stemmed from an ALTER command being interrupted prematurely.</code></pre><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kN0R!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F532f4cf4-428a-404a-b200-13fd54db034c_1600x353.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kN0R!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F532f4cf4-428a-404a-b200-13fd54db034c_1600x353.png 424w, https://substackcdn.com/image/fetch/$s_!kN0R!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F532f4cf4-428a-404a-b200-13fd54db034c_1600x353.png 848w, https://substackcdn.com/image/fetch/$s_!kN0R!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F532f4cf4-428a-404a-b200-13fd54db034c_1600x353.png 1272w, https://substackcdn.com/image/fetch/$s_!kN0R!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F532f4cf4-428a-404a-b200-13fd54db034c_1600x353.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kN0R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F532f4cf4-428a-404a-b200-13fd54db034c_1600x353.png" width="1456" height="321" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/532f4cf4-428a-404a-b200-13fd54db034c_1600x353.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:321,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kN0R!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F532f4cf4-428a-404a-b200-13fd54db034c_1600x353.png 424w, https://substackcdn.com/image/fetch/$s_!kN0R!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F532f4cf4-428a-404a-b200-13fd54db034c_1600x353.png 848w, https://substackcdn.com/image/fetch/$s_!kN0R!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F532f4cf4-428a-404a-b200-13fd54db034c_1600x353.png 1272w, https://substackcdn.com/image/fetch/$s_!kN0R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F532f4cf4-428a-404a-b200-13fd54db034c_1600x353.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p><em><strong>Reference:</strong></em> <a href="https://serverfault.com/questions/1002704/cant-upgrade-rds-instance-from-mysql-5-7-x-to-8-0-x">https://serverfault.com/questions/1002704/cant-upgrade-rds-instance-from-mysql-5-7-x-to-8-0-x</a></p><p>Once this error was fixed, we successfully set up the Blue/Green environment in non-production. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Yebk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a122ca-6803-4a49-98c9-beb966a64511_1654x712.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Yebk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a122ca-6803-4a49-98c9-beb966a64511_1654x712.png 424w, https://substackcdn.com/image/fetch/$s_!Yebk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a122ca-6803-4a49-98c9-beb966a64511_1654x712.png 848w, https://substackcdn.com/image/fetch/$s_!Yebk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a122ca-6803-4a49-98c9-beb966a64511_1654x712.png 1272w, https://substackcdn.com/image/fetch/$s_!Yebk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a122ca-6803-4a49-98c9-beb966a64511_1654x712.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Yebk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a122ca-6803-4a49-98c9-beb966a64511_1654x712.png" width="1456" height="627" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/66a122ca-6803-4a49-98c9-beb966a64511_1654x712.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:627,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:151592,&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_!Yebk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a122ca-6803-4a49-98c9-beb966a64511_1654x712.png 424w, https://substackcdn.com/image/fetch/$s_!Yebk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a122ca-6803-4a49-98c9-beb966a64511_1654x712.png 848w, https://substackcdn.com/image/fetch/$s_!Yebk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a122ca-6803-4a49-98c9-beb966a64511_1654x712.png 1272w, https://substackcdn.com/image/fetch/$s_!Yebk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a122ca-6803-4a49-98c9-beb966a64511_1654x712.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>We conducted thorough regression testing, which showed that our application was compatible with MySQL 8 and that no major code changes were necessary.</p><p>After completing the tests, we upgraded all non-production environments to MySQL 8. The next step was to implement Blue/Green deployment in production.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3Wxr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36931421-ec59-476b-b37c-2a42bd246692_1652x712.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3Wxr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36931421-ec59-476b-b37c-2a42bd246692_1652x712.png 424w, https://substackcdn.com/image/fetch/$s_!3Wxr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36931421-ec59-476b-b37c-2a42bd246692_1652x712.png 848w, https://substackcdn.com/image/fetch/$s_!3Wxr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36931421-ec59-476b-b37c-2a42bd246692_1652x712.png 1272w, https://substackcdn.com/image/fetch/$s_!3Wxr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36931421-ec59-476b-b37c-2a42bd246692_1652x712.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3Wxr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36931421-ec59-476b-b37c-2a42bd246692_1652x712.png" width="1456" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/36931421-ec59-476b-b37c-2a42bd246692_1652x712.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:152332,&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_!3Wxr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36931421-ec59-476b-b37c-2a42bd246692_1652x712.png 424w, https://substackcdn.com/image/fetch/$s_!3Wxr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36931421-ec59-476b-b37c-2a42bd246692_1652x712.png 848w, https://substackcdn.com/image/fetch/$s_!3Wxr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36931421-ec59-476b-b37c-2a42bd246692_1652x712.png 1272w, https://substackcdn.com/image/fetch/$s_!3Wxr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36931421-ec59-476b-b37c-2a42bd246692_1652x712.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>In the production environment, we resolved the same error and got MySQL 8 running in the green environment.&nbsp;</p><p>However, since production had two replicas and also 4 TB worth of data, we experienced a significant replication lag for around 2 days. We tried multiple approaches like changing the parameter value like <em><strong>slave_parallel_workers</strong></em> to a higher value and recreating the Blue/Green setup but that did not seem to get the lag down. One of the other things we tried was, we initiated a <em><strong>mysqldump</strong></em> and increased the IOPS (Input/Output Operations Per Second). </p><p>Running a <em><strong>mysqldump</strong></em> operation on your read replica allows Amazon RDS to prioritize and download all of the backed-up table data from Amazon Simple Storage Service (Amazon S3) thus helping in getting the lag down.</p><p>This slowly brought the replication lag down to 0, just 15 hours before the scheduled time for the production maintenance window.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ec2b!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26136590-842c-4609-8d22-a9a7f701ac05_1654x712.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ec2b!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26136590-842c-4609-8d22-a9a7f701ac05_1654x712.png 424w, https://substackcdn.com/image/fetch/$s_!ec2b!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26136590-842c-4609-8d22-a9a7f701ac05_1654x712.png 848w, https://substackcdn.com/image/fetch/$s_!ec2b!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26136590-842c-4609-8d22-a9a7f701ac05_1654x712.png 1272w, https://substackcdn.com/image/fetch/$s_!ec2b!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26136590-842c-4609-8d22-a9a7f701ac05_1654x712.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ec2b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26136590-842c-4609-8d22-a9a7f701ac05_1654x712.png" width="1456" height="627" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/26136590-842c-4609-8d22-a9a7f701ac05_1654x712.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:627,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:152908,&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_!ec2b!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26136590-842c-4609-8d22-a9a7f701ac05_1654x712.png 424w, https://substackcdn.com/image/fetch/$s_!ec2b!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26136590-842c-4609-8d22-a9a7f701ac05_1654x712.png 848w, https://substackcdn.com/image/fetch/$s_!ec2b!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26136590-842c-4609-8d22-a9a7f701ac05_1654x712.png 1272w, https://substackcdn.com/image/fetch/$s_!ec2b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26136590-842c-4609-8d22-a9a7f701ac05_1654x712.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>&nbsp;Once the lag was back to 0, we started to change the parameter group from default MySQL 8 to the desired ones for our database and upgraded the instance to the graviton. As soon as we did this, we encountered an error </p><pre><code>REPLICATION_ERROR/Replica failed to initialize applier metadata structure from the repository.</code></pre><p>This was caused due to an unexpected server halt that was triggered by Multi-AZ failover on the green instance and failover was expected. While we were trying to resolve the above issue, there came another twist&#8230;</p><h1><strong>The Twist</strong></h1><p>As Murphy&#8217;s law states, anything that can go wrong will go wrong. Here's the twist: we encountered a warning in the logs that seemed innocuous at first, but in reality, it was a fatal error.&nbsp;</p><pre><code>2024-07-20T04:24:44.767492Z 13 [Warning] [MY-011825] [InnoDB]&nbsp;

Cannot add field `codechecker_time` in table `hackerrank`.`h_submission_shards_co_1_ch_520` because after adding it, the row size is 8827, greater than the maximum allowed size (8126) for a record on the index leaf page.</code></pre><p>This issue arose because the <em>row_format</em> for some tables was set to <em><strong>Compact</strong></em>, while MySQL 8 uses <em><strong>Dynamic</strong></em> as the default format.</p><p>Upon deeper investigation, revealed a serious issue that could lead to potential data corruption. This would render all tables with the earlier error inaccessible. Surprisingly, none of this was flagged in the PrePatchCompatibility logs during the upgrade process.</p><h3><strong>What was the Issue?</strong></h3><p>Before MySQL 5.7, the default <em><strong>row_format</strong></em> was <code>Compact.</code> Many of our tables had been created when we were using MySQL 5.6. When we upgraded from 5.6 to 5.7 back in 2018, all newly created tables adopted the <code>Dynamic</code> row format, which is also the default in MySQL 8 &amp; 5.7. However, we never updated  <code>row_format</code> of the older tables during the 5.6 to 5.7 upgrade. Now, during the upgrade to MySQL 8, these old tables triggered errors due to the large amount of data they contained.</p><p>This issue only surfaced in production because the database there holds significantly more data than in non-production environments. The larger data volume caused the database to start throwing errors.</p><p><em><strong>References:</strong></em></p><ul><li><p><a href="https://bugs.mysql.com/bug.php?id=99791">MySQL Bug #99791</a></p></li><li><p><a href="https://www.linkedin.com/pulse/understanding-fixing-index-column-size-too-large-maximum-pandey-wajyc">Understanding &amp; Fixing &#8220;Index Column Size Too Large&#8221;</a></p></li><li><p><a href="https://mariadb.com/kb/en/troubleshooting-row-size-too-large-errors-with-innodb/">The row size is too large</a></p></li></ul><p>The only way to resolve this issue was to update the row_format to <code>Dynamic</code> MySQL 5.7 before performing the upgrade. And so, like every great movie, for our database upgrade one rollout plan wasn&#8217;t enough&#8212; here comes Rollout 2.0, bigger and full of twists!</p><h1><strong>Rollout 2.0</strong></h1><p>The next step was to verify whether changing the <code>row_format</code> would be a blocking call. These are the set of tasks that we started with,</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bbeY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b35882-daba-4d0e-9d80-4297e0b16b48_1654x538.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bbeY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b35882-daba-4d0e-9d80-4297e0b16b48_1654x538.png 424w, https://substackcdn.com/image/fetch/$s_!bbeY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b35882-daba-4d0e-9d80-4297e0b16b48_1654x538.png 848w, https://substackcdn.com/image/fetch/$s_!bbeY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b35882-daba-4d0e-9d80-4297e0b16b48_1654x538.png 1272w, https://substackcdn.com/image/fetch/$s_!bbeY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b35882-daba-4d0e-9d80-4297e0b16b48_1654x538.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bbeY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b35882-daba-4d0e-9d80-4297e0b16b48_1654x538.png" width="1456" height="474" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/85b35882-daba-4d0e-9d80-4297e0b16b48_1654x538.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:474,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:98806,&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_!bbeY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b35882-daba-4d0e-9d80-4297e0b16b48_1654x538.png 424w, https://substackcdn.com/image/fetch/$s_!bbeY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b35882-daba-4d0e-9d80-4297e0b16b48_1654x538.png 848w, https://substackcdn.com/image/fetch/$s_!bbeY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b35882-daba-4d0e-9d80-4297e0b16b48_1654x538.png 1272w, https://substackcdn.com/image/fetch/$s_!bbeY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b35882-daba-4d0e-9d80-4297e0b16b48_1654x538.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>We tested the <code>row_format</code> changes in the lower environment, and it was confirmed that it was a non-blocking change. This means it allows DML/DDL operations on the table while it's being modified. MySQL documentation also confirmed that this change is non-blocking, which was a relief.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Vhs3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e68bb62-318f-4bc8-bad3-c4497138e3df_1600x266.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Vhs3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e68bb62-318f-4bc8-bad3-c4497138e3df_1600x266.png 424w, https://substackcdn.com/image/fetch/$s_!Vhs3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e68bb62-318f-4bc8-bad3-c4497138e3df_1600x266.png 848w, https://substackcdn.com/image/fetch/$s_!Vhs3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e68bb62-318f-4bc8-bad3-c4497138e3df_1600x266.png 1272w, https://substackcdn.com/image/fetch/$s_!Vhs3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e68bb62-318f-4bc8-bad3-c4497138e3df_1600x266.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Vhs3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e68bb62-318f-4bc8-bad3-c4497138e3df_1600x266.png" width="1456" height="242" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1e68bb62-318f-4bc8-bad3-c4497138e3df_1600x266.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:242,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Vhs3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e68bb62-318f-4bc8-bad3-c4497138e3df_1600x266.png 424w, https://substackcdn.com/image/fetch/$s_!Vhs3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e68bb62-318f-4bc8-bad3-c4497138e3df_1600x266.png 848w, https://substackcdn.com/image/fetch/$s_!Vhs3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e68bb62-318f-4bc8-bad3-c4497138e3df_1600x266.png 1272w, https://substackcdn.com/image/fetch/$s_!Vhs3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e68bb62-318f-4bc8-bad3-c4497138e3df_1600x266.png 1456w" sizes="100vw" loading="lazy"></picture><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_!yYdF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c230a9-4c75-4185-86b0-e35153e999a5_1656x538.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yYdF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c230a9-4c75-4185-86b0-e35153e999a5_1656x538.png 424w, https://substackcdn.com/image/fetch/$s_!yYdF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c230a9-4c75-4185-86b0-e35153e999a5_1656x538.png 848w, https://substackcdn.com/image/fetch/$s_!yYdF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c230a9-4c75-4185-86b0-e35153e999a5_1656x538.png 1272w, https://substackcdn.com/image/fetch/$s_!yYdF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c230a9-4c75-4185-86b0-e35153e999a5_1656x538.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yYdF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c230a9-4c75-4185-86b0-e35153e999a5_1656x538.png" width="1456" height="473" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/08c230a9-4c75-4185-86b0-e35153e999a5_1656x538.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:473,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:98518,&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_!yYdF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c230a9-4c75-4185-86b0-e35153e999a5_1656x538.png 424w, https://substackcdn.com/image/fetch/$s_!yYdF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c230a9-4c75-4185-86b0-e35153e999a5_1656x538.png 848w, https://substackcdn.com/image/fetch/$s_!yYdF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c230a9-4c75-4185-86b0-e35153e999a5_1656x538.png 1272w, https://substackcdn.com/image/fetch/$s_!yYdF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c230a9-4c75-4185-86b0-e35153e999a5_1656x538.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The next concern was whether this change on the master would be replicated in the read replicas.</p><p>To verify this, we created a temporary database from the existing master snapshot with one replica. There were 2 ways to modify the <code>row_format</code></p><ol><li><p><code>OPTIMIZE TABLE &lt;table_name&gt;</code></p></li><li><p><code>ALTER TABLE &lt;table_name&gt; ROW_FORMAT = DYNAMIC;</code></p></li></ol><p>This is what the <code>OPTIMIZE TABLE</code> does; it essentially rebuilds the table for InnoDB. It performs a process that involves creating a temporary table with the optimized structure and data which means it will also set the row_format to default value, copying the data into it, and then replacing the original table with the optimized one. This process results in defragmentation and compaction, which can reclaim disk space and improve performance.&nbsp;</p><p>We decided to go ahead with the <code>OPTIMIZE TABLE</code> command and not do <code>ALTER</code> because of the following reasons:</p><ol><li><p>Performing the <code>ALTER</code> statement explicitly sets a value of <code>row_format=DYNAMIC</code> under <code>create_options</code> for the table, even though it matches the current default. Setting an explicit row format on the table is something we may need to be aware of if we ever choose to change row formats in the future.</p></li><li><p><code>OPTIMIZE TABLE</code> command also changes the row format of the table to the current default, but does so without setting create_options;</p></li></ol><p>We modified the row_format to <code>Dynamic</code> using the <code>OPTIMIZE TABLE</code> command and confirmed that the changes were successfully replicated to the read replica. This verification was crucial because we couldn't run any ALTER commands directly on the replica, as it has <code>read_only=1.</code></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tunS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e01113-278d-4da1-b4ed-933520a0fc81_1662x536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tunS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e01113-278d-4da1-b4ed-933520a0fc81_1662x536.png 424w, https://substackcdn.com/image/fetch/$s_!tunS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e01113-278d-4da1-b4ed-933520a0fc81_1662x536.png 848w, https://substackcdn.com/image/fetch/$s_!tunS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e01113-278d-4da1-b4ed-933520a0fc81_1662x536.png 1272w, https://substackcdn.com/image/fetch/$s_!tunS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e01113-278d-4da1-b4ed-933520a0fc81_1662x536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tunS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e01113-278d-4da1-b4ed-933520a0fc81_1662x536.png" width="1456" height="470" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f2e01113-278d-4da1-b4ed-933520a0fc81_1662x536.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:470,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:99453,&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_!tunS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e01113-278d-4da1-b4ed-933520a0fc81_1662x536.png 424w, https://substackcdn.com/image/fetch/$s_!tunS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e01113-278d-4da1-b4ed-933520a0fc81_1662x536.png 848w, https://substackcdn.com/image/fetch/$s_!tunS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e01113-278d-4da1-b4ed-933520a0fc81_1662x536.png 1272w, https://substackcdn.com/image/fetch/$s_!tunS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e01113-278d-4da1-b4ed-933520a0fc81_1662x536.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>After these tests, we realized the only way to modify the row_format to <em>Dynamic</em> in production was by running the <code>OPTIMIZE TABLE</code> command directly on the production master.</p><p>Yet again, there was an unexpected turn. The <code>OPTIMIZE TABLE</code> command works by creating a duplicate table, reading the current table's online DML, and then switching to the new table. For this to succeed, the database needs enough free storage equal to the size of the table being optimized. Once the optimize is done, the storage is recovered. One of our tables was a massive 824 GB, but our AWS RDS had only limited free storage. To proceed with the <code>OPTIMIZE</code> command, we first had to clean up this table to free up the necessary storage. And this is how one more task got added to our checklist, </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!S7DQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca57948-65f9-4a82-8cae-27247032ab8d_1654x620.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!S7DQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca57948-65f9-4a82-8cae-27247032ab8d_1654x620.png 424w, https://substackcdn.com/image/fetch/$s_!S7DQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca57948-65f9-4a82-8cae-27247032ab8d_1654x620.png 848w, https://substackcdn.com/image/fetch/$s_!S7DQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca57948-65f9-4a82-8cae-27247032ab8d_1654x620.png 1272w, https://substackcdn.com/image/fetch/$s_!S7DQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca57948-65f9-4a82-8cae-27247032ab8d_1654x620.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!S7DQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca57948-65f9-4a82-8cae-27247032ab8d_1654x620.png" width="1456" height="546" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ca57948-65f9-4a82-8cae-27247032ab8d_1654x620.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:546,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:112913,&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_!S7DQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca57948-65f9-4a82-8cae-27247032ab8d_1654x620.png 424w, https://substackcdn.com/image/fetch/$s_!S7DQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca57948-65f9-4a82-8cae-27247032ab8d_1654x620.png 848w, https://substackcdn.com/image/fetch/$s_!S7DQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca57948-65f9-4a82-8cae-27247032ab8d_1654x620.png 1272w, https://substackcdn.com/image/fetch/$s_!S7DQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca57948-65f9-4a82-8cae-27247032ab8d_1654x620.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><h1><strong>Deleting &amp; Optimizing</strong></h1><p>To minimize the impact of running the <code>OPTIMIZE</code> command on our database, we first tested it on a small production table and noticed increased replica lag during execution. To mitigate this, we temporarily redirected all read traffic to the overprovisioned master server, efficiently handling both reads and writes.</p><p>Our largest table was the 824 GB sessions table managed by Devise in Ruby on Rails, containing data since 2018. Since we only needed data from the past year, we wrote a deletion script to remove old records in batches of 10,000 with 1-second pauses between batches. Over a week, this reduced the table size to 124 GB, allowing us to run <code>OPTIMIZE</code> smoothly.</p><p>We also cleaned up unused archival tables, freeing 1.5 TB of storage. We proceeded to run <code>OPTIMIZE</code> on all tables with a <code>row_format</code> of <code>Compact</code>, starting with the smaller ones and monitoring CPU usage to keep it below 80%.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dJGF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90edae1e-9e46-433d-854d-d89ab9d95834_1668x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dJGF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90edae1e-9e46-433d-854d-d89ab9d95834_1668x628.png 424w, https://substackcdn.com/image/fetch/$s_!dJGF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90edae1e-9e46-433d-854d-d89ab9d95834_1668x628.png 848w, https://substackcdn.com/image/fetch/$s_!dJGF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90edae1e-9e46-433d-854d-d89ab9d95834_1668x628.png 1272w, https://substackcdn.com/image/fetch/$s_!dJGF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90edae1e-9e46-433d-854d-d89ab9d95834_1668x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dJGF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90edae1e-9e46-433d-854d-d89ab9d95834_1668x628.png" width="1456" height="548" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/90edae1e-9e46-433d-854d-d89ab9d95834_1668x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:548,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:114487,&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_!dJGF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90edae1e-9e46-433d-854d-d89ab9d95834_1668x628.png 424w, https://substackcdn.com/image/fetch/$s_!dJGF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90edae1e-9e46-433d-854d-d89ab9d95834_1668x628.png 848w, https://substackcdn.com/image/fetch/$s_!dJGF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90edae1e-9e46-433d-854d-d89ab9d95834_1668x628.png 1272w, https://substackcdn.com/image/fetch/$s_!dJGF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90edae1e-9e46-433d-854d-d89ab9d95834_1668x628.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>However, we faced <em><strong>duplicate entry</strong></em> errors due to unique composite indexes on tables with high concurrent writes during the <code>OPTIMIZE</code> process. This occurred because <code>OPTIMIZE</code> rebuilds the table, and concurrent writes could cause duplicates in the new table. This is a bug in MySQL itself.</p><p>Reference: <a href="https://bugs.mysql.com/bug.php?id=98600">MySQL Bug #98600</a>.</p><pre><code><code>| Table                          | Op       | Msg_type | Msg_text                                                                                             |
+--------------------------------+----------+----------+------------------------------------------------------------------------------------------------------+
| hackerrank.h_hacker_broadcasts | optimize | note     | Table does not support optimize, doing recreate + analyze instead                                    |
| hackerrank.h_hacker_broadcasts | optimize | error    | Duplicate entry '26450629-2629173' for key 'index_h_hacker_broadcasts_on_hacker_id_and_broadcast_id' |
| hackerrank.h_hacker_broadcasts | optimize | status   | Operation failed</code></code></pre><p>To resolve this, we monitored traffic patterns to find low-traffic windows for running <code>OPTIMIZE</code>, which worked for some tables. For one problematic table, we temporarily dropped the unique composite index and implemented stricter code checks to prevent duplicates, allowing us to complete <code>OPTIMIZE</code> and re-add the index afterward.</p><p>For a particularly write-heavy table, we introduced a Redis flag with random sleep intervals between reads to prevent duplicate entries, enabling us to re-add the unique index successfully. In hindsight, implementing this Redis-based approach earlier could have avoided the need to drop indexes.</p><p>Ultimately, we updated all tables to have a <code>row_format</code> of <code>DYNAMIC</code>, solving a major issue. However, due to the extensive changes made to the master, the replicas were now experiencing significant lag.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fVZv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc22bfb1-2ca9-496c-9e7c-501793a09bf2_1652x626.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fVZv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc22bfb1-2ca9-496c-9e7c-501793a09bf2_1652x626.png 424w, https://substackcdn.com/image/fetch/$s_!fVZv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc22bfb1-2ca9-496c-9e7c-501793a09bf2_1652x626.png 848w, https://substackcdn.com/image/fetch/$s_!fVZv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc22bfb1-2ca9-496c-9e7c-501793a09bf2_1652x626.png 1272w, https://substackcdn.com/image/fetch/$s_!fVZv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc22bfb1-2ca9-496c-9e7c-501793a09bf2_1652x626.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fVZv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc22bfb1-2ca9-496c-9e7c-501793a09bf2_1652x626.png" width="1456" height="552" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc22bfb1-2ca9-496c-9e7c-501793a09bf2_1652x626.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:552,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:113621,&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_!fVZv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc22bfb1-2ca9-496c-9e7c-501793a09bf2_1652x626.png 424w, https://substackcdn.com/image/fetch/$s_!fVZv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc22bfb1-2ca9-496c-9e7c-501793a09bf2_1652x626.png 848w, https://substackcdn.com/image/fetch/$s_!fVZv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc22bfb1-2ca9-496c-9e7c-501793a09bf2_1652x626.png 1272w, https://substackcdn.com/image/fetch/$s_!fVZv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc22bfb1-2ca9-496c-9e7c-501793a09bf2_1652x626.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><h1><strong>Testing the Blue/Green Setup</strong></h1><p>The next step was setting up a Blue/Green deployment in production, updating the Green environment's parameter group, and upgrading to Graviton. We began this process but also wanted to ensure we had clear metrics on how long the switchover would take in production. While AWS suggests a switchover time of 30 seconds to 2 minutes, we decided to test it cautiously due to the size of our RDS.</p><p>We created a temporary database with production changes, added a replica, and set up Blue/Green to benchmark the switchover time. During testing, we simulated the production load on the database and performed the switchover.</p><p>The switchover took 1 minute, with 2-3 seconds of downtime, giving us confidence that the upgrade would have minimal user impact.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!geUl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F092bbb13-c838-4ceb-89c7-81a33a8eeaa5_1662x622.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!geUl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F092bbb13-c838-4ceb-89c7-81a33a8eeaa5_1662x622.png 424w, https://substackcdn.com/image/fetch/$s_!geUl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F092bbb13-c838-4ceb-89c7-81a33a8eeaa5_1662x622.png 848w, https://substackcdn.com/image/fetch/$s_!geUl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F092bbb13-c838-4ceb-89c7-81a33a8eeaa5_1662x622.png 1272w, https://substackcdn.com/image/fetch/$s_!geUl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F092bbb13-c838-4ceb-89c7-81a33a8eeaa5_1662x622.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!geUl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F092bbb13-c838-4ceb-89c7-81a33a8eeaa5_1662x622.png" width="1456" height="545" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/092bbb13-c838-4ceb-89c7-81a33a8eeaa5_1662x622.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:545,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:114168,&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_!geUl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F092bbb13-c838-4ceb-89c7-81a33a8eeaa5_1662x622.png 424w, https://substackcdn.com/image/fetch/$s_!geUl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F092bbb13-c838-4ceb-89c7-81a33a8eeaa5_1662x622.png 848w, https://substackcdn.com/image/fetch/$s_!geUl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F092bbb13-c838-4ceb-89c7-81a33a8eeaa5_1662x622.png 1272w, https://substackcdn.com/image/fetch/$s_!geUl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F092bbb13-c838-4ceb-89c7-81a33a8eeaa5_1662x622.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><h1><strong>Production Blue/Green Setup</strong></h1><p>Since we had been running the <code>OPTIMIZE</code> command in production, the read replica lag had become significantly high. To avoid any potential issues during the real switchover, we wanted to ensure that the lag was reduced to zero. To address this, we increased the IOPS on the active replica, which helped bring the lag down gradually.</p><p>Additionally, the Blue/Green setup on the production master was also experiencing lag. Based on our previous experience, we decided to disable Multi-AZ on the Green setup, start a mysqldump, and increase the IOPS. As a result, we observed the lag steadily decreasing.</p><p>One other warning we have been seeing in the logs was&nbsp;</p><p><em><strong>DB Instance has a large number of tables and has the parameter innodb_file_per_table set to 1, which can increase database recovery time significantly. Consider setting this parameter to 0 in the parameter group associated with this DB instance to minimize database downtime during reboots and failovers.</strong></em></p><p>We decided to keep it as 1 itself because It being turned on helped us reclaim storage space in AWS when we were running the <code>OPTIMIZE</code> command since each of the tables had its <em>idb</em> files. If it is off and we do the optimize, it cleans up the space but we can't see the storage increase on the AWS level it will be maintained in the shared tablespace within MySQL itself, and MySQL will utilize it as new records are added.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pwMM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc31837ee-1ff8-42d4-8d39-e417474df678_1652x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pwMM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc31837ee-1ff8-42d4-8d39-e417474df678_1652x628.png 424w, https://substackcdn.com/image/fetch/$s_!pwMM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc31837ee-1ff8-42d4-8d39-e417474df678_1652x628.png 848w, https://substackcdn.com/image/fetch/$s_!pwMM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc31837ee-1ff8-42d4-8d39-e417474df678_1652x628.png 1272w, https://substackcdn.com/image/fetch/$s_!pwMM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc31837ee-1ff8-42d4-8d39-e417474df678_1652x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pwMM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc31837ee-1ff8-42d4-8d39-e417474df678_1652x628.png" width="1456" height="553" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c31837ee-1ff8-42d4-8d39-e417474df678_1652x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:553,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:114314,&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_!pwMM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc31837ee-1ff8-42d4-8d39-e417474df678_1652x628.png 424w, https://substackcdn.com/image/fetch/$s_!pwMM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc31837ee-1ff8-42d4-8d39-e417474df678_1652x628.png 848w, https://substackcdn.com/image/fetch/$s_!pwMM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc31837ee-1ff8-42d4-8d39-e417474df678_1652x628.png 1272w, https://substackcdn.com/image/fetch/$s_!pwMM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc31837ee-1ff8-42d4-8d39-e417474df678_1652x628.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><h1><strong>The Endgame</strong></h1><p>Our upgrade was scheduled for August 31, 2024, at 10:30 AM IST. By this point, we were fully prepared, having thoroughly tested the application and the Blue/Green switchover.</p><p>The final switchover took less than a minute to complete with zero downtime. Even our monitoring tools, such as Uptime, didn&#8217;t detect any issues. Most importantly, no users or candidates were affected by the process.</p><p><strong>And this is how the MySQL Upgrade for HackerRank Community finally happened.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AVnc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F314164cb-3896-4221-a731-75b036d237da_1652x626.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AVnc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F314164cb-3896-4221-a731-75b036d237da_1652x626.png 424w, https://substackcdn.com/image/fetch/$s_!AVnc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F314164cb-3896-4221-a731-75b036d237da_1652x626.png 848w, https://substackcdn.com/image/fetch/$s_!AVnc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F314164cb-3896-4221-a731-75b036d237da_1652x626.png 1272w, https://substackcdn.com/image/fetch/$s_!AVnc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F314164cb-3896-4221-a731-75b036d237da_1652x626.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AVnc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F314164cb-3896-4221-a731-75b036d237da_1652x626.png" width="728" height="276" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/314164cb-3896-4221-a731-75b036d237da_1652x626.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:552,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:114596,&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_!AVnc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F314164cb-3896-4221-a731-75b036d237da_1652x626.png 424w, https://substackcdn.com/image/fetch/$s_!AVnc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F314164cb-3896-4221-a731-75b036d237da_1652x626.png 848w, https://substackcdn.com/image/fetch/$s_!AVnc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F314164cb-3896-4221-a731-75b036d237da_1652x626.png 1272w, https://substackcdn.com/image/fetch/$s_!AVnc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F314164cb-3896-4221-a731-75b036d237da_1652x626.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><hr></div><p><em>Repost from <a href="https://engineering.hackerrank.com/behind-the-scenes-at-hackerranks-upgrade-to-mysql-8-0/">https://engineering.hackerrank.com/behind-the-scenes-at-hackerranks-upgrade-to-mysql-8-0/</a></em></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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[Code Reviews are Underrated]]></title><description><![CDATA[Code Reviews are beyond just reviewing code they are also about sharing knowledge, reviewing architecture design, and maintaining clear testing and deployment plans, each step which is valuable to the development process.]]></description><link>https://www.theengineersnotebook.com/p/code-reviews-are-underrated</link><guid isPermaLink="false">https://www.theengineersnotebook.com/p/code-reviews-are-underrated</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 04 Aug 2024 15:31:10 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%2F70ad7768-3088-4941-af5c-db74d5a36fca_3416x3417.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>When I was an intern, I often wondered why code reviews took so long. As more of my pull requests (PRs) were reviewed and I started reviewing other people's code, I realized that code reviews are an important but underrated skill for any engineer.</em></p><h2>The Value of Code Reviews</h2><p>Engineers gain significant advantages from thorough code reviews:</p><ul><li><p>Learning best practices of a language</p></li><li><p>Catching bugs early</p></li><li><p>Understanding tradeoffs among different solutions to the same problem</p></li></ul><p>For example, I learned how to write effective RSpec tests and Ruby best practices after receiving suggestions on improving my code. I also started adding detailed descriptions to PRs when I saw how an old description in a PR helped me solve an issue.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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 today's fast-changing world, where Large Language Models (LLMs) are used to generate code and tools like Copilot help us write boilerplate code, code reviews are even more important. While AI can be a powerful tool, it is not flawless. AI can sometimes hallucinate, producing code that appears to be correct but contains subtle or significant errors that do not fully meet all of the criteria for our use case. In such cases, it is especially important to review one's code.</p><h2>Key Aspects of Effective Code Reviews</h2><ol><li><p><strong>Understanding the Big Picture</strong> When reviewing code, our first instinct should not be to immediately suggest removing changes, but rather to ensure that we understand the context and purpose of the existing code. This principle, inspired by Chesterton's Fence, emphasizes the importance of understanding why a piece of code exists before changing or removing it. For example, in some cases, removing a piece of code after receiving review comments breaks the functionality. To avoid situations like this, one solution is to include comments or details about the unusual changes in the PR description.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uDkq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c818d86-3a3f-4db2-aa86-9ac741603262_3416x3417.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uDkq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c818d86-3a3f-4db2-aa86-9ac741603262_3416x3417.jpeg 424w, https://substackcdn.com/image/fetch/$s_!uDkq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c818d86-3a3f-4db2-aa86-9ac741603262_3416x3417.jpeg 848w, https://substackcdn.com/image/fetch/$s_!uDkq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c818d86-3a3f-4db2-aa86-9ac741603262_3416x3417.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!uDkq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c818d86-3a3f-4db2-aa86-9ac741603262_3416x3417.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uDkq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c818d86-3a3f-4db2-aa86-9ac741603262_3416x3417.jpeg" width="368" height="368" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c818d86-3a3f-4db2-aa86-9ac741603262_3416x3417.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1456,&quot;width&quot;:1456,&quot;resizeWidth&quot;:368,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Chesterton's fence: two people contemplate a barbed wire fence stretching through rolling hills and wonder why on earth someone would put the fence there, unaware of the large animal down the slope&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="Chesterton's fence: two people contemplate a barbed wire fence stretching through rolling hills and wonder why on earth someone would put the fence there, unaware of the large animal down the slope" title="Chesterton's fence: two people contemplate a barbed wire fence stretching through rolling hills and wonder why on earth someone would put the fence there, unaware of the large animal down the slope" srcset="https://substackcdn.com/image/fetch/$s_!uDkq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c818d86-3a3f-4db2-aa86-9ac741603262_3416x3417.jpeg 424w, https://substackcdn.com/image/fetch/$s_!uDkq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c818d86-3a3f-4db2-aa86-9ac741603262_3416x3417.jpeg 848w, https://substackcdn.com/image/fetch/$s_!uDkq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c818d86-3a3f-4db2-aa86-9ac741603262_3416x3417.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!uDkq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c818d86-3a3f-4db2-aa86-9ac741603262_3416x3417.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></li><li><p><strong>Knowledge Sharing </strong>When we see multiple similar conversations/comments about coding style across different PRs, it indicates the need for proper linters and standardization. These linters and automated tools can handle a wide range of code quality issues, while human reviewers can provide insights into best practices, architectural decisions, and domain knowledge. This improves the learning experience and encourages a culture of continuous improvement.</p></li><li><p><strong>Having a Review Buddy</strong> It's a good idea to have a review buddy with whom you can discuss design and architecture from the beginning of a code-related feature. This helps to avoid significant rewrites during the review stage and ensures that design and architectural considerations are aligned from the start. A review buddy can provide early feedback and suggestions, making the development process smoother and more efficient, which in turn speeds up the code review process. </p></li><li><p><strong>Understand Testing &amp; Deployment Plans</strong> As important as code reviews are for reviewing a piece of code, I believe it is also valuable to understand and review the feature's testing and deployment plans. One of the practices we've implemented in our team is to write a <a href="https://www.florianbellmann.com/blog/never-taught-qa#minimal-effective-dose">Minimal Effective Dose (MED) Testing Plan</a> for each of our code changes, in which the code author mentions&nbsp;the critical pieces of the code that can be affected by the code change as well as test plans, which are then verified by the reviewer to make sure no edge cases were missed. </p></li><li><p><strong>Suggest, Don&#8217;t Instruct</strong> Use a constructive and supportive tone when adding&nbsp;review comments as suggestions rather than instructions. Instead of instructing with phrases like "You should stop doing," use more collaborative language such as "I think it would be better to." Avoid using blameful or aggravating language.</p></li><li><p><strong>Maintain a Priority List </strong>I usually keep a list of PRs and the expected date when the feature should go live. This allows me to organize the reviews by priority. Next, when reviewing the code, determine which parts are most critical and can cause production issues. Those hot paths should be reviewed first. This approach makes sure the most critical problems are addressed first.</p></li><li><p><strong>Avoid Context Switch:</strong> Try to review code in a single sitting without unnecessary interruptions. Context switching can lead to oversight and reduce the quality of your review. Dedicate specific time slots for code reviews to maintain focus and provide thorough feedback.</p></li></ol><p>Effective code reviews are a must for engineers. As technology advances with Copilot and LLMs, the engineer's role in ensuring the code is bug-free and meets standards through rigorous review practices becomes increasingly important. </p><p>Code reviews are more than just reviewing code; they also involve sharing knowledge, reviewing architecture design, and maintaining clear testing and deployment plans, all of which are beneficial to the development process.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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[Building a 0-1 Product ~ Engineer's POV]]></title><description><![CDATA[Starting from scratch to build a brand-new product is an exciting journey filled with learning and challenges.]]></description><link>https://www.theengineersnotebook.com/p/building-a-0-1-product-engineers-pov</link><guid isPermaLink="false">https://www.theengineersnotebook.com/p/building-a-0-1-product-engineers-pov</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sat, 20 Jul 2024 17:23:30 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/ce4b76a9-7a3a-4b5e-930b-7c779a1b36c4_1792x1024.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Starting from scratch to build a brand-new product is an exciting journey filled with learning and challenges. When you&#8217;re part of a team that&#8217;s creating something entirely new, your role can morph daily. </p><p>Since the time I started working as an Engineer at HackerRank, I have had the chance to work on multiple 0-1 products, some of which we stopped due to lack of Product Market Fit (PMF) and some we continue iterating on.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.com/?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share The Engineer's Notebook&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.theengineersnotebook.com/?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share The Engineer's Notebook</span></a></p><p>Here&#8217;s a glimpse into the life of a developer in a 0-1 product environment.</p><h3>1. Understanding user feedback and iterating</h3><p>The heart of any successful product is its users. When building from scratch, understanding the user feedback directly can help in interpreting what the users truly need. One of the habits that I have developed is to regularly go through the support tickets and the user feedback via in-product channels to get a better sense of how the product needs to be tweaked. </p><p>As engineers, this loop of user feedback and iteration often helps in refining vague ideas into features that can help solve problems with clarity and purpose.</p><h3>2. Balancing Quality with Velocity</h3><p>There&#8217;s always a tug-of-war between perfecting a feature and moving fast to release new ones. Finding that balance&#8212;knowing when to prioritize what&#8212;is crucial for momentum.</p><h3>3. High Learning Curve</h3><p>In the world of building new products from scratch, you learn a lot, and fast. One big plus is that you get to take care of whole features by yourself. For example, if you learn about a new way to organize your code or a new technology or design pattern, you can try it out in one of your features. </p><p>As this feature grows&#8212;by getting updates, connecting with other parts of the product, or being used by other developers&#8212;you get feedback that's more useful than reading lots of blogs about it. This real-world experience helps you learn better and keeps things interesting.</p><h3>4. Becoming a Product Engineer</h3><p>As you develop in this role, you begin to see beyond the code. You start to understand how each line of code you write impacts user experience and business goals. There needs to be a shift in perception&#8212;from a pure coder to a product thinker. Keeping the users in mind during development can get us very far.</p><h3>5. Scalable Tech Design</h3><p>In the early stages of product development, it&#8217;s important to design architectures that can scale. As a developer, you can closely with the product manager and designer to discuss the long-term vision for each feature. This collaboration helps in grasping not just what the feature needs to do now, but how it might need to evolve in the future. One of the things to keep in mind is to aim to understand the right user experience and iterate backward from there for technical feasibility. </p><p>Start with a simple technological framework&#8212;it keeps the initial development swift and manageable. However, this simplicity must be balanced with scalability. By designing systems that are easy to modify and expand, you ensure that the product can quickly adapt to new requirements or user feedback without extensive rework. </p><p>This foresight in tech design not only speeds up iteration cycles but also supports robust growth as the product scales.</p><h3>6. Wearing Multiple Hats</h3><p>In a small team, you&#8217;re not just coding. You might also be handling customer support, and doing data analysis for product metrics. You get to be a part of the product discussions to first hand understand the idea and fundamentals behind the feature you will be building. </p><p>Each hat you wear provides a unique perspective on what the product needs and how it&#8217;s being received, making you a more versatile and empathetic engineer.</p><h3>7. Embracing the chaos and ambiguity</h3><p>Not everything will be structured, and that&#8217;s okay. Embracing the chaos, finding joy in unpredictability, and adapting quickly are part of the excitement. In the world of 0-1 products, the "end state" is a moving target. This can be disorienting but also liberating, as it fosters continuous innovation and improvement. </p><p>Finally, comfort with ambiguity is perhaps your greatest ally. Not knowing the exact path or the outcome encourages creativity and resilience. </p><h3>8. Dealing with Tech Debt</h3><p>As Engineers, Tech Debt is usually where all of us are excited to go deep into the problem and convert the debt to wealth. One of the things that I have learned is when building a product that is still in the early stages of finding a Product Market Fit (PMF), tech debt only becomes a real problem when it starts affecting our users or slows down our velocity to iterate fast and achieve PMF.</p><h3>9. High Feature Churn</h3><p>In the early stages, what you build today might be scrapped tomorrow. High feature churn is common as the team pivots and adapts to the market. It&#8217;s all about staying flexible and not getting too attached to any single element of the product.</p><p>The code that you write today might become a tech debt tomorrow.</p><div><hr></div><p>To conclude, the journey of building something new is as rewarding as the destination itself, filled with continuous learning and adaptation.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.theengineersnotebook.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 The Engineer's Notebook! 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[Hello World!]]></title><description><![CDATA[Hello, World! I'm Shloka, an Engineer navigating the ever-evolving world of code and innovation. Welcome to "The Engineer's Notebook," where I share my journey. From debugging nightmares to eureka moments, join me as I delve into exciting, real engineering experiences. This space is for candid reflections, practical tips, and a bit of introspection.]]></description><link>https://www.theengineersnotebook.com/p/hello-world</link><guid isPermaLink="false">https://www.theengineersnotebook.com/p/hello-world</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sat, 15 Jun 2024 15:27: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%2F99a2e695-b502-4f9d-b1ee-a1cab08b7e92_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hello, World! I'm Shloka, an Engineer navigating the ever-evolving world of code and innovation.</p><p>Welcome to "The Engineer's Notebook," where I share my journey. From debugging nightmares to eureka moments, join me as I delve into exciting, real engineering experiences. This space is for candid reflections, practical tips, and a bit of introspection.</p><p>Like many of you, I've endured those late nights trying to fix a stubborn bug and have felt the rush of solving a problem that seemed impossible. The satisfaction and joy of overcoming these challenges is what drives us forward. With "The Engineer's Notebook," I aim to peel back the curtain on these universal experiences.</p><p>I look forward to having you join me on this journey from inception to execution.</p>]]></content:encoded></item></channel></rss>