<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dubeutkarsh on Medium]]></title>
        <description><![CDATA[Stories by Dubeutkarsh on Medium]]></description>
        <link>https://medium.com/@dubeutkarsh7?source=rss-b281194e108b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*k6gRIBYMnVXs_XOp</url>
            <title>Stories by Dubeutkarsh on Medium</title>
            <link>https://medium.com/@dubeutkarsh7?source=rss-b281194e108b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 19:44:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dubeutkarsh7/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How Project Scheduling Systems Use Graph Algorithms to Calculate the Critical Path]]></title>
            <link>https://medium.com/@dubeutkarsh7/how-project-scheduling-systems-use-graph-algorithms-to-calculate-the-critical-path-a0a1b3ccd93e?source=rss-b281194e108b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0a1b3ccd93e</guid>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[graph-algorithms]]></category>
            <dc:creator><![CDATA[Dubeutkarsh]]></dc:creator>
            <pubDate>Wed, 04 Nov 2026 18:53:52 GMT</pubDate>
            <atom:updated>2026-11-04T18:53:52.681Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0aOHydd0aJd7vp8LRsXTOg.png" /></figure><p>Understanding DAGs, Kahn’s Algorithm, Critical Path Method, and how the Project Discipline Engine translates graph theory into practical project scheduling.</p><h3>1. The Problem Being Solved</h3><p>You might have heard professionals say that managing a project is not simply about assigning tasks and deadlines.</p><p>But have you ever wondered why?</p><p>The reason is that assigning tasks and setting deadlines is only the beginning. In an actual project, tasks are interconnected. Some activities can be performed simultaneously, while others cannot begin until their prerequisites are completed.</p><p>A delay in one task may affect several other activities and eventually shift the entire project timeline.</p><p>Therefore, effective project scheduling is not just about deciding what needs to be done and when. It is also about understanding task dependencies, identifying activities that directly influence project completion, and determining how different tasks should be scheduled.</p><p>Let’s take you back to your college days, when almost everything you learned felt exciting.</p><p>A new concept from a classroom, an interesting discussion with friends, or even an Instagram reel could spark an idea for your next big project.</p><p>You would get that sudden burst of motivation, open your laptop, create a repository, and start building.</p><p>But here’s something many of us have experienced:</p><p><strong>Starting a project is exciting; finishing and shipping it is a completely different challenge.</strong></p><p>Interestingly, this problem hasn’t disappeared even in the era of AI agents and coding assistants.</p><p>These tools can generate code, suggest implementations, and accelerate development, but they cannot automatically eliminate every challenge involved in delivering a project.</p><p>Features still depend on one another, components still need integration, and certain activities cannot begin until their prerequisites are completed.</p><p>In other words, making individual tasks easier does not necessarily make the entire project easier to complete.</p><p>The challenge is not always how quickly we can write code, but how effectively we organize, execute, and coordinate the work required to deliver a functioning product.</p><h3>2. What Existed Before: Traditional Approaches to Project Scheduling</h3><p>Before exploring graph algorithms, it is important to understand how project activities have traditionally been organized and monitored.</p><h3>A. Task Lists</h3><p>One of the simplest approaches is maintaining a task list.</p><p>A project manager identifies the activities that need to be completed, assigns responsibilities, estimates their durations, and sets deadlines.</p><p>This approach works reasonably well for smaller projects where the number of activities and their relationships are relatively straightforward.</p><p>However, as projects become larger, a simple list starts revealing its limitations.</p><p>It may tell us what needs to be done, but it does not always communicate how different activities depend on one another or which delay could affect the overall completion date.</p><h3>B. Gantt Charts</h3><p>Another widely used approach is the Gantt chart.</p><p>It represents project activities on a timeline, usually through horizontal bars indicating their planned start dates, end dates, and durations.</p><p>It also helps project managers visualize overlapping activities and monitor progress.</p><p>Gantt charts make project schedules easier to understand, but maintaining a complex schedule can become challenging when several activities depend on one another.</p><p>A change in one activity may require adjustments to multiple dependent activities.</p><h3>C. Critical Path Method (CPM)</h3><p>This is where the Critical Path Method (CPM) becomes important.</p><p>Instead of looking only at activities and their positions on a timeline, CPM focuses on the relationships between activities and their durations.</p><p>It identifies the longest sequence of dependent activities that determines the minimum time required to complete the project.</p><p>It is worth noting that these approaches are not necessarily competitors.</p><p>Gantt charts are useful for visualizing schedules, while CPM provides a mathematical way to analyze task dependencies and project duration.</p><p><strong>They can complement each other in practical project management systems.</strong></p><h3>3. Why Graph-Based Scheduling?</h3><p>The central challenge in project scheduling is understanding the relationships between activities.</p><p>To solve this systematically, we can represent a project as a graph.</p><p>In this representation:</p><ul><li><strong>Vertices (Nodes):</strong> Every project activity becomes a vertex.</li><li><strong>Directed Edges:</strong> Every dependency between two activities becomes a directed edge.</li></ul><p>For example, consider two activities, A and B.</p><p>If B cannot begin until A has been completed, we represent their relationship as:</p><p><strong>A → B</strong></p><p>The direction of the arrow communicates that A is a prerequisite for B.</p><p>This is important because an ordinary connection between two activities would not communicate which one must be completed first.</p><p>A project dependency graph is generally represented as a <strong>Directed Acyclic Graph (DAG).</strong></p><p>Directed edges establish the order of dependencies, while the absence of cycles ensures that activities do not depend on themselves through a circular chain of prerequisites.</p><p>Once the graph is constructed, algorithms such as <strong>Kahn’s Algorithm</strong> can determine a valid topological ordering of its vertices.</p><p>This ordering ensures that prerequisite activities are processed before their dependent activities.</p><p>However, obtaining a valid processing order is only one part of the problem.</p><p>We also need to determine how long the project will take and which activities have the least scheduling flexibility.</p><p>This is where the Critical Path Method comes into the picture.</p><p>By performing forward and backward passes over the dependency graph, CPM calculates the earliest and latest permissible timings for activities.</p><p>These values help determine task slack and identify the critical activities that influence the project’s completion time.</p><p>Graph-based scheduling therefore provides a structured mathematical foundation for:</p><ul><li>Understanding dependencies.</li><li>Processing activities in a valid order.</li><li>Calculating the critical path.</li></ul><p>It does not eliminate every project management challenge, such as resource constraints or unexpected delays, but it gives scheduling systems a systematic way to analyze the structure of a project rather than relying only on manually maintained task lists.</p><h3>4. How It Works: From Task Dependencies to the Critical Path</h3><p>Now that we understand why task dependencies matter, let’s explore how a scheduling system can process them mathematically.</p><p>The process involves representing activities as a graph, establishing a valid processing order, and calculating the critical path using the Critical Path Method (CPM).</p><h3>4.1 Representing Project Activities as a Graph</h3><p>The first step is to represent every project activity as a vertex (node) and every dependency as a directed edge.</p><p>Consider a project containing six activities.</p><p>Here are their estimated durations and dependencies:</p><p><strong>Task A</strong></p><ul><li>Duration: 4 hours</li><li>Dependencies: None</li></ul><p><strong>Task B</strong></p><ul><li>Duration: 5 hours</li><li>Dependencies: A</li></ul><p><strong>Task C</strong></p><ul><li>Duration: 7 hours</li><li>Dependencies: A</li></ul><p><strong>Task D</strong></p><ul><li>Duration: 3 hours</li><li>Dependencies: B</li></ul><p><strong>Task E</strong></p><ul><li>Duration: 2 hours</li><li>Dependencies: B, C</li></ul><p><strong>Task F</strong></p><ul><li>Duration: 6 hours</li><li>Dependencies: D, E</li></ul><p>Here, A must finish before B and C can begin.</p><p>Similarly, E depends on both B and C, while F depends on both D and E.</p><p>The resulting graph contains the following directed edges:</p><p><strong>A → B, A → C, B → D, B → E, C → E, D → F, E → F</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TZt-GDANfQmc4hqAidjmfw.png" /></figure><p><em>Caption: A Directed Acyclic Graph representing six project activities, their estimated durations, and prerequisite relationships.</em></p><p>In PDE, these relationships are stored using a <strong>TaskDependency database model</strong>.</p><p>The graph itself is constructed when required by retrieving the dependency records.</p><p>The implementation uses:</p><ul><li><strong>Adjacency List:</strong> Stores outgoing connections.</li><li><strong>In-Degree Dictionary:</strong> Tracks the number of prerequisites for each task.</li></ul><p>An adjacency list is particularly useful because it stores the actual connections rather than reserving space for every possible pair of vertices.</p><p>Its construction takes <strong>O(V + E) time and space</strong>, where:</p><ul><li>V represents the number of tasks.</li><li>E represents the number of dependency relationships.</li></ul><h3>4.2 Establishing a Valid Execution Order Using Kahn’s Algorithm</h3><p>Once the graph has been constructed, the scheduling system needs to process its vertices in an order that respects their dependencies.</p><p>This is known as <strong>Topological Sorting</strong>.</p><p>Kahn’s Algorithm achieves this by maintaining a queue of vertices whose in-degree is zero.</p><p>A zero in-degree indicates that all prerequisites of that vertex have already been processed.</p><p>The algorithm follows these steps:</p><ol><li>Calculate the in-degree of every vertex.</li><li>Insert all vertices with zero in-degree into a queue.</li><li>Remove a vertex from the queue and process it.</li><li>Visit its neighbouring vertices and decrease their in-degree by one.</li><li>Whenever a neighbouring vertex reaches zero in-degree, insert it into the queue.</li><li>Continue until the queue becomes empty.</li></ol><p>Let’s apply this to our example.</p><p>Initially, task A has an in-degree of zero, so it enters the queue first.</p><p>After processing A, the in-degree of B and C becomes zero, making both eligible for processing.</p><p>The resulting order could be:</p><p><strong>A → B → C → D → E → F</strong></p><p>Other valid orders may also exist because independent tasks do not necessarily have a fixed relative order.</p><p>Kahn’s Algorithm also provides a way to detect cycles.</p><p>If the number of processed vertices is smaller than the total number of vertices, the graph contains a cycle.</p><p>This algorithm was formally presented by Arthur B. Kahn in his 1962 paper on topological sorting of large networks.</p><p>However, a valid processing order alone does not tell us which activities determine the project’s completion time.</p><p>For that, we need CPM.</p><h3>4.3 Calculating Earliest and Latest Timings Using CPM</h3><p>The Critical Path Method uses two passes over the dependency graph:</p><ol><li>Forward Pass.</li><li>Backward Pass.</li></ol><h4>A. The Forward Pass</h4><p>The forward pass calculates the earliest possible start and finish times of every activity.</p><p>Two terms are important:</p><ul><li><strong>Earliest Start (ES):</strong> The earliest time at which an activity can begin.</li><li><strong>Earliest Finish (EF):</strong> The earliest time at which an activity can finish.</li></ul><p>The formula is:</p><p><strong>EF = ES + Duration</strong></p><p>For an activity with multiple prerequisites, its earliest start is determined by the maximum earliest finish among those prerequisites.</p><p><strong>ES = Maximum(EF of all predecessors)</strong></p><p>Let’s apply these formulas to our example.</p><p><strong>Forward Pass Calculations</strong></p><p><strong>Task A</strong></p><ul><li>ES: 0</li><li>Duration: 4</li><li>EF: 4</li></ul><p><strong>Task B</strong></p><ul><li>ES: 4</li><li>Duration: 5</li><li>EF: 9</li></ul><p><strong>Task C</strong></p><ul><li>ES: 4</li><li>Duration: 7</li><li>EF: 11</li></ul><p><strong>Task D</strong></p><ul><li>ES: 9</li><li>Duration: 3</li><li>EF: 12</li></ul><p><strong>Task E</strong></p><ul><li>ES: 11</li><li>Duration: 2</li><li>EF: 13</li></ul><p><strong>Task F</strong></p><ul><li>ES: 13</li><li>Duration: 6</li><li>EF: 19</li></ul><p>Notice that E depends on both B and C.</p><p>Although B finishes at hour 9, E cannot start until C also finishes at hour 11.</p><p>The earliest completion time of the entire project is therefore:</p><p><strong>19 hours.</strong></p><h4>B. The Backward Pass</h4><p>The backward pass works in the opposite direction.</p><p>It calculates the latest permissible start and finish times without delaying the project’s overall completion.</p><p>Two additional terms are introduced:</p><ul><li><strong>Latest Finish (LF):</strong> The latest time an activity can finish without delaying the project.</li><li><strong>Latest Start (LS):</strong> The latest time an activity can start without delaying the project.</li></ul><p>The formula is:</p><p><strong>LS = LF — Duration</strong></p><p>For an activity with multiple successors, its latest finish is determined by the minimum latest start among those successors.</p><p><strong>LF = Minimum(LS of all successors)</strong></p><p>Starting from the final activity F, whose latest finish is 19 hours, we work backwards through the graph.</p><p><strong>Backward Pass Calculations</strong></p><p><strong>Task A</strong></p><ul><li>LS: 0</li><li>LF: 4</li></ul><p><strong>Task B</strong></p><ul><li>LS: 5</li><li>LF: 10</li></ul><p><strong>Task C</strong></p><ul><li>LS: 4</li><li>LF: 11</li></ul><p><strong>Task D</strong></p><ul><li>LS: 10</li><li>LF: 13</li></ul><p><strong>Task E</strong></p><ul><li>LS: 11</li><li>LF: 13</li></ul><p><strong>Task F</strong></p><ul><li>LS: 13</li><li>LF: 19</li></ul><h3>4.4 Identifying Critical Activities Using Slack</h3><p>After calculating earliest and latest timings, we can determine how much flexibility each activity has.</p><p>This flexibility is called <strong>Slack or Float</strong>.</p><p>The formula is:</p><p><strong>Slack = LS — ES</strong></p><p>A task with zero slack cannot be delayed without affecting the planned project completion time, assuming the other scheduling conditions remain unchanged.</p><p>Let’s calculate the slack for every activity.</p><p><strong>Task A</strong></p><ul><li>ES: 0</li><li>LS: 0</li><li>Slack: 0</li></ul><p><strong>Task B</strong></p><ul><li>ES: 4</li><li>LS: 5</li><li>Slack: 1</li></ul><p><strong>Task C</strong></p><ul><li>ES: 4</li><li>LS: 4</li><li>Slack: 0</li></ul><p><strong>Task D</strong></p><ul><li>ES: 9</li><li>LS: 10</li><li>Slack: 1</li></ul><p><strong>Task E</strong></p><ul><li>ES: 11</li><li>LS: 11</li><li>Slack: 0</li></ul><p><strong>Task F</strong></p><ul><li>ES: 13</li><li>LS: 13</li><li>Slack: 0</li></ul><p>The activities with zero slack are:</p><p><strong>A, C, E and F.</strong></p><p>Therefore, the critical sequence is:</p><p><strong>A → C → E → F</strong></p><p>Its total duration is:</p><p><strong>4 + 7 + 2 + 6 = 19 hours.</strong></p><p>This sequence determines the project’s minimum completion time under the assumed durations and dependencies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SUYbLzGqievPLRU6WMsoHg.png" /></figure><p><em>Caption: Critical Path Method calculations showing earliest and latest activity timings, task slack, and the resulting critical path.</em></p><h3>4.5 How PDE Connects These Operations</h3><p>The same concepts are implemented in the <strong>Project Discipline Engine (PDE).</strong></p><p>Its graph-related functionality is concentrated in:</p><p>backend/graph_engine.py</p><p>This file contains the GraphEngine class and three static methods.</p><p><strong>1. build_graph()</strong></p><p>Constructs the adjacency list and in-degree dictionary.</p><p><strong>2. detect_cycle()</strong></p><p>Checks whether the dependency graph contains a cycle.</p><p><strong>3. calculate_critical_path()</strong></p><p>Performs the forward and backward calculations, determines slack, and identifies critical activities.</p><p>At runtime, dependencies are retrieved from the database through the TaskDependency model.</p><p>The project statistics logic then converts these records into dependency relationships and passes the tasks and relationships to:</p><p>GraphEngine.calculate_critical_path()</p><p>The resulting scheduling information is combined with other project statistics, including forecasting and bottleneck analysis, before being returned through the project API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TZt-GDANfQmc4hqAidjmfw.png" /></figure><p><em>Caption: Internal scheduling workflow of the Project Discipline Engine, connecting database dependencies with graph construction, critical path calculations, and API output.</em></p><h4>Understanding the Implementation Limitations</h4><p>There is also an important implementation limitation worth mentioning.</p><p>Although PDE contains a cycle detection method and tests for it, the production scheduling flow does not invoke that method before calculating the critical path.</p><p>Testing also revealed that cyclic dependencies can produce incorrect scheduling results rather than a clear validation error.</p><p>Furthermore, the current implementation identifies and returns an ordered collection of critical task IDs.</p><p>It does not reconstruct separate path objects when multiple critical branches exist.</p><p>These observations demonstrate why understanding an algorithm’s implementation is just as important as understanding its theoretical working.</p><h3>5. Real-World Applications of Critical Path Analysis</h3><p>The concept of dependency-based scheduling is not limited to software development.</p><p>Almost every industry that involves multiple interconnected activities can benefit from understanding task dependencies and identifying activities that directly influence project completion.</p><h3>1. Software Development</h3><p>Software development involves several interconnected activities, including database design, backend development, frontend integration, testing, and deployment.</p><p>Some activities can proceed simultaneously, while others require earlier components to be completed.</p><p>Critical Path Analysis helps development teams identify which activities have the least scheduling flexibility and require closer attention to avoid delaying a release.</p><h3>2. Construction and Infrastructure</h3><p>Construction projects involve activities such as site preparation, foundation work, structural development, electrical installation, plumbing, and finishing.</p><p>Many of these activities have strict dependencies.</p><p>For example, electrical installation may require certain structural activities to be completed first.</p><p>A delay in a critical activity can affect several subsequent stages and potentially postpone the entire project.</p><h3>3. Manufacturing</h3><p>Manufacturing processes involve multiple production stages, from raw material preparation to assembly, quality inspection, and packaging.</p><p>Dependency-based scheduling helps identify the sequence of activities that determines when a finished product can be delivered.</p><p>It can also help managers understand which stages require closer scheduling attention.</p><h3>4. Event Planning</h3><p>Organizing a large event involves activities such as venue booking, permissions, equipment arrangements, marketing, logistics, and final preparations.</p><p>Some activities can happen simultaneously, while others depend on prior approvals or arrangements.</p><p>Critical Path Analysis helps organizers identify important deadlines and understand which delays could affect the event date.</p><h3>Limitations of Basic CPM</h3><p>However, basic CPM has limitations.</p><p>It generally assumes known task durations and does not automatically account for:</p><ul><li>Resource availability.</li><li>Weekends.</li><li>Holidays.</li><li>Uncertain activity durations.</li></ul><p>More advanced scheduling approaches, including <strong>Resource Levelling and PERT</strong>, may be required when these factors become important.</p><p>Ultimately, Critical Path Analysis provides a useful foundation for planning complex projects, regardless of the industry in which they are implemented.</p><h3>6. Conclusion</h3><p>Project scheduling becomes increasingly challenging as the number of activities and dependencies grows.</p><p>A simple task list may communicate what needs to be done, but it does not always reveal how activities influence one another or which delays could affect the overall project timeline.</p><p>Graph algorithms provide a structured way to represent these relationships.</p><p>By modelling activities as vertices and dependencies as directed edges, a scheduling system can process tasks in a valid order using topological sorting.</p><p>The Critical Path Method builds upon this representation to calculate earliest and latest activity timings, determine slack, and identify the critical sequence that controls the project’s minimum completion time.</p><p>The Project Discipline Engine demonstrates how these concepts can be translated into an actual software implementation.</p><p>Its graph engine constructs dependency relationships and performs critical path calculations, connecting graph theory with practical project scheduling.</p><p>However, implementing an algorithm is not the same as building a complete project management solution.</p><p>PDE still has limitations in areas such as cycle validation in the production scheduling flow, resource allocation, and working-calendar support.</p><p>Recognizing these limitations is an important part of evaluating any engineering system.</p><p>Ultimately, graph algorithms do not guarantee that every project will finish on time.</p><p>They provide something more fundamental: a systematic understanding of how project activities are connected, which tasks deserve scheduling attention, and how the overall completion timeline is determined.</p><h3>References</h3><ol><li>Project Discripline Engine <a href="https://github.com/iuttkarshh0409/discipline-engine">iuttkarshh0409/discipline-engine</a></li><li>Kelley, J. E., Jr., &amp; Walker, M. R. (1959). Critical-path planning and scheduling. <em>Proceedings of the Eastern Joint IRE-AIEE-ACM Computer Conference</em>, 160–173.</li><li>Kahn, A. B. (1962). Topological sorting of large networks. <em>Communications of the ACM, 5</em>(11), 558–562.</li><li>Kelley, J. E., Jr. (1961). Critical-path planning and scheduling: Mathematical basis. <em>Operations Research, 9</em>(3), 296–320.</li><li>Jenkins, J. L. (n.d.). <em>Critical path method calculations.</em> Project Management Institute.</li><li>NetworkX Developers. (n.d.). <em>Topological sorting.</em> NetworkX Documentation.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0a1b3ccd93e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Built a Failure-Aware System Because “Retry Until It Works” Is a Lie]]></title>
            <link>https://medium.com/@dubeutkarsh7/i-built-a-failure-aware-system-because-retry-until-it-works-is-a-lie-acb83ee3c663?source=rss-b281194e108b------2</link>
            <guid isPermaLink="false">https://medium.com/p/acb83ee3c663</guid>
            <category><![CDATA[system-architecture]]></category>
            <category><![CDATA[system-design-project]]></category>
            <category><![CDATA[systems-thinking]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Dubeutkarsh]]></dc:creator>
            <pubDate>Thu, 08 Jan 2026 04:28:06 GMT</pubDate>
            <atom:updated>2026-01-08T04:28:06.822Z</atom:updated>
            <content:encoded><![CDATA[<p>Most systems fail quietly.</p><p>Not in dramatic, everything-is-on-fire ways.<br> They fail politely. Repeatedly. With retries. With logs no one reads. With states no one models.</p><p>So, I built a <strong>Failure-Aware System</strong>.</p><p>Not a monitoring dashboard.<br> Not an alerting tool.<br> A system that <strong>treats failure as first-class data</strong>.</p><h3>The Problem I Actually Wanted to Solve</h3><p>In most applications:</p><ul><li>failures are transient</li><li>retries are automatic</li><li>logs are verbose</li><li>and responsibility is… vague</li></ul><p>A failed sync today looks identical to a failed sync yesterday.<br> The system doesn’t <em>remember</em> failure. It just keeps trying.</p><p>That’s not resilience. That’s amnesia.</p><p>I wanted a system that could answer questions like:</p><ul><li><em>How often are we retrying the same thing?</em></li><li><em>Which failures are recoverable vs terminal?</em></li><li><em>When should the system stop trying?</em></li><li><em>What does “healthy” even mean after 10 retries?</em></li></ul><h3>The Core Idea: Event-First Failure Modeling</h3><p>At the heart of this project is a simple rule:</p><blockquote><strong><em>Nothing retries unless it’s recorded as an event.</em></strong></blockquote><p>Every failure is:</p><ul><li>captured as an immutable event</li><li>stored with raw payload (JSON, untouched)</li><li>tracked with retry counts and state transitions</li></ul><p>No silent retries.<br> No magical recovery.</p><p>Just <strong>facts</strong>.</p><p>I separated the system into two concerns:</p><ol><li><strong>Event Log</strong> — what happened</li><li><strong>Domain State</strong> — what the system believes now</li></ol><p>That single separation eliminated a surprising amount of complexity.</p><h3>Why I Chose an Event Log (And Why It Hurt)</h3><p>I could’ve stored everything in a single table.<br> I didn’t.</p><p>Instead, I:</p><ul><li>logged raw events</li><li>projected domain state later</li><li>allowed retries to be driven <em>by history</em>, not hope</li></ul><p>This made the system harder to write…<br> and far easier to reason about.</p><p>Failures stopped being “errors” and became <strong>signals</strong>.</p><h3>Retry Logic Without Lying to Yourself</h3><p>Retries are dangerous.</p><p>Most systems retry blindly.<br> Mine retries <em>conditionally</em>.</p><p>Each event tracks:</p><ul><li>retry count</li><li>next retry time (with backoff)</li><li>final state: PENDING, FAILED, SYNCED, DEAD</li></ul><p>A DEAD event is not a bug.<br> It’s a <strong>decision</strong>.</p><p>That shift matters.</p><h3>The CLI: Read-Only, On Purpose</h3><p>I built a CLI to inspect the system:</p><ul><li>system health snapshot</li><li>oldest unresolved failures</li><li>most retried events</li><li>dead vs synced ratio</li></ul><p>And here’s the important part:</p><p><strong>The CLI cannot mutate state.</strong></p><p>If your observability tool can change behavior, you no longer trust your data.</p><h3>The Debugging That Actually Changed Me</h3><p>This project broke me in quieter ways.</p><p>I hit bugs where:</p><ul><li>the database schema and runtime schema disagreed</li><li>migrations silently didn’t run</li><li>a single missing column invalidated an entire feature</li><li>a closed DB connection looked “fine” until it wasn’t</li></ul><p>No stack trace screamed at me.<br> The system just… stopped making sense.</p><p>That’s when I realized:</p><blockquote><em>Backend bugs aren’t loud. They’re patient.</em></blockquote><h3>What This Project Taught Me</h3><p>This wasn’t about Python.<br> It wasn’t even about SQLite.</p><p>It taught me:</p><ul><li>to design systems that <strong>explain themselves</strong></li><li>to respect failure instead of hiding it</li><li>to stop optimizing for success paths only</li><li>to think in terms of <em>state over time</em>, not outcomes</li></ul><p>I stopped asking “Did it work?”<br> I started asking “What happened?”</p><h3>Why I’m Proud of This One</h3><p>This project won’t impress people who want flashy UIs.<br> It will resonate with people who’ve stared at production incidents at 3 a.m.</p><p>It’s not perfect.<br>But it’s honest.</p><p>And that’s the kind of system I want to build more of.</p><p>If you’ve ever dealt with retries, silent failures, or systems that “mostly work,”<br> you’ll probably recognize parts of yourself in this project.</p><p>I’m sharing it here, warts included.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=acb83ee3c663" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an Operational Drift Analyzer]]></title>
            <link>https://medium.com/@dubeutkarsh7/building-an-operational-drift-analyzer-2d256f78c549?source=rss-b281194e108b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d256f78c549</guid>
            <category><![CDATA[backend-engineering]]></category>
            <category><![CDATA[backend-architecture]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Dubeutkarsh]]></dc:creator>
            <pubDate>Wed, 07 Jan 2026 14:19:48 GMT</pubDate>
            <atom:updated>2026-01-07T14:19:48.877Z</atom:updated>
            <content:encoded><![CDATA[<h3>Or: How “Not Enough Data” Taught Me More Than Any Success Ever Did</h3><p>Most software failures don’t happen suddenly.</p><p>They creep in.</p><p>Retries start increasing.<br> Terminal failures appear more often.<br> Nothing is <em>broken</em>, but everything feels… off.</p><p>This project started with a simple question:</p><blockquote>How do you detect that a system’s behavior is drifting, without lying to yourself?</blockquote><p>What followed was weeks of designing, breaking, debugging, doubting, and finally understanding what <strong>operational analysis</strong> actually means.</p><h3>The Idea: Drift, Not Alerts</h3><p>Traditional monitoring systems love thresholds.</p><ul><li>Retry count &gt; X → alert</li><li>Failure rate &gt; Y → panic</li></ul><p>The problem is that thresholds ignore context:</p><ul><li>historical behavior</li><li>sample size</li><li>uncertainty</li><li>natural variance</li></ul><p>From a statistical perspective, that’s reckless.<br> From an engineering perspective, it’s noisy.<br> From a human perspective, it’s exhausting.</p><p>So, I decided to build something different:<br> an <strong>Operational Drift Analyzer</strong>.</p><p>Not a predictor.<br> Not an alerting engine.<br> A <em>reasoning system</em>.</p><h3>Core Signals</h3><p>I deliberately limited the system to <strong>two signals</strong>.</p><h3>1. Retry Pressure</h3><p>Retries are soft failures. One-retry is nothing. A sustained increase is a smell.</p><p>Instead of thresholds, I used <strong>rate comparison</strong>:</p><ul><li>baseline window (past)</li><li>recent window (now)</li></ul><p>If retry behavior shifts meaningfully, the system notices.</p><p>No ML. No magic.<br> Just means, deltas, and confidence.</p><h3>2. Dead Event Ratio</h3><p>Dead events are terminal failures. These are costly. These matter.</p><p>The ratio:</p><pre>dead events / total events</pre><p>Sounds trivial. It isn’t.</p><p>The hard part is <strong>knowing when not to compute it</strong>.</p><p>If the sample is too small:</p><ul><li>a ratio is meaningless</li><li>zero is misleading</li><li>silence is dishonest</li></ul><p>So, I enforced a rule:</p><blockquote><em>If there isn’t enough data, the answer is </em>None<em>, not 0.</em></blockquote><p>That single distinction ended up being one of the most important design decisions in the entire project.</p><h3>Confidence Is Not Optional</h3><p>One thing I learned quickly:<br> numbers without confidence are lies waiting to happen.</p><p>Every signal in the system carries a <strong>confidence score</strong> based on:</p><ul><li>sample size</li><li>window coverage</li><li>data sufficiency</li></ul><p>This meant accepting something uncomfortable:<br> sometimes the correct answer is <strong>“I don’t know yet.”</strong></p><p>That’s not weakness.<br> That’s statistical maturity.</p><h3>The Debugging Hell (Yes, This Matters)</h3><p>Here’s the part most project writeups skip.</p><h3>The Bug That Wouldn’t Die</h3><p>For days, my system kept saying:</p><blockquote><em>“Not enough data.”</em></blockquote><p>Even when I <em>knew</em> there was enough data.</p><p>I checked:</p><ul><li>SQL queries</li><li>timestamp formats</li><li>window boundaries</li><li>seed scripts</li><li>database contents</li></ul><p>Everything looked correct.</p><p>It wasn’t.</p><p>The real issue wasn’t the logic.</p><p>It was <strong>snapshot persistence</strong>.</p><p>I was:</p><ul><li>fixing the computation</li><li>but reading old snapshots from the database</li><li>and trusting the CLI output blindly</li></ul><p>That moment hurt.</p><p>Because it forced me to accept something fundamental:</p><blockquote>If you don’t understand your data lifecycle end-to-end, your code is lying to you.</blockquote><p>Once I reran the analysis and generated a <strong>new snapshot</strong>, everything clicked.</p><p>Dead event ratio appeared.<br> Confidence was correct.<br> The system was fine.</p><p>I wasn’t.</p><h3>What This Project Taught Me</h3><p>This project taught me things tutorials never did:</p><ul><li>“0” and “None” are not the same</li><li>Data sufficiency is more important than clever logic</li><li>Debugging is often about <em>state</em>, not code</li><li>Confidence must be explicit</li><li>Old data will happily gaslight you</li></ul><p>Most importantly:</p><blockquote><em>Backend engineering is less about writing code and more about </em><strong><em>reasoning honestly under uncertainty</em></strong><em>.</em></blockquote><h3>Why I Didn’t Use Machine Learning</h3><p>People ask this.</p><p>The answer is simple:<br> ML would have hidden the problem instead of clarifying it.</p><p>This project is about:</p><ul><li>explainability</li><li>auditability</li><li>reasoning</li><li>trust</li></ul><p>A simple statistical model you understand beats a complex one you don’t.</p><p>Every single time.</p><h3>Final State</h3><p>The system now:</p><ul><li>computes retry pressure correctly</li><li>computes dead event ratio with confidence</li><li>refuses to compute when data is insufficient</li><li>persists explainable snapshots</li><li>exposes everything via a clean CLI</li></ul><p>And most importantly:<br> it doesn’t pretend to know more than it does.</p><h3>Closing Thought</h3><p>This project wasn’t hard because the math was complex.</p><p>It was hard because it forced me to confront:</p><ul><li>uncertainty</li><li>assumptions</li><li>and my own impatience</li></ul><p>But that’s exactly why it mattered.</p><p>If I had to summarize it in one sentence:</p><blockquote>I didn’t just build a system that analyzes drift.<br> I built one that refuses to lie about it.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d256f78c549" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Batch Year Dilemma: How to Record Alumni Who Exit Early from Integrated Programs]]></title>
            <link>https://medium.com/@dubeutkarsh7/the-batch-year-dilemma-how-to-record-alumni-who-exit-early-from-integrated-programs-321b744c6552?source=rss-b281194e108b------2</link>
            <guid isPermaLink="false">https://medium.com/p/321b744c6552</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Dubeutkarsh]]></dc:creator>
            <pubDate>Mon, 25 Aug 2025 09:20:50 GMT</pubDate>
            <atom:updated>2025-08-25T09:20:50.341Z</atom:updated>
            <content:encoded><![CDATA[<p>When maintaining an alumni database, some challenges are obvious (missing emails, duplicate entries, outdated companies). But others sneak in from the <strong>structure of the academic programs themselves</strong>.</p><p>At my university, we have two departments:</p><ul><li><strong>IIPS</strong> (offering integrated MCA, MTech, MBA — with an option to exit after 3 years with a UG degree).</li><li><strong>IET</strong> (offering traditional BTech and MTech programs).</li></ul><p>This creates a tough question for alumni data management: <strong>How do you decide the “Batch Year” of a student who exits an integrated program after UG?</strong></p><h3>Why It’s Tricky</h3><p>A student joined Integrated MCA in 2018.</p><p>If they exit in 2021 with a BCA, are they <em>Batch of 2018</em> or <em>Batch of 2021</em>?</p><p>If they continue and finish in 2023, then they’re clearly <em>Batch of 2023 (MCA)</em>.</p><p>If you just record a single year (say, admission), you lose clarity.</p><p>If you record only graduation year, you can’t distinguish between UG exit vs PG completion.</p><h3>Possible Approaches</h3><h4>1. Single Year (Entry Only)</h4><ul><li>Record only the admission year (e.g., <em>Batch of 2018</em>).</li><li>✅ Simple.</li><li>❌ Doesn’t capture exit timing or final degree.</li></ul><h4>2. Year Range (Entry–Exit)</h4><ul><li>Example: 2018–2021 (BCA Exit) vs 2018–2023 (MCA).</li><li>✅ Clear and transparent.</li><li>❌ Inconsistent if data entry is incomplete.</li></ul><h4>3. Dual Fields (Best Practice)</h4><p>Instead of overloading “Batch Year,” split it:</p><ul><li><strong>Admission Year</strong> → When the student joined.</li><li><strong>Graduation Year</strong> → When they exited.</li><li><strong>Exit Status</strong> → UG Exit, Completed Integrated, Dropped.</li><li><strong>Final Degree</strong> → BCA, MCA, MTech, MBA, etc.</li></ul><h3>Takeaway</h3><p>Alumni data should reflect the <strong>journey, not just the label</strong>.<br> By keeping separate fields for Admission Year, Graduation Year, and Exit Status, you avoid ambiguity and build a database that works for <strong>both institutional history and alumni networking</strong>.</p><p>After all, a batch year is more than just a number — it’s a story of entry, growth, and transition.</p><p>If you were maintaining such a database, would you prefer a <strong>single batch year</strong> or a <strong>range with clear exit status</strong>?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=321b744c6552" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Should Alumni Databases Show Reported or Current Employers? A Data Dilemma]]></title>
            <link>https://medium.com/@dubeutkarsh7/should-alumni-databases-show-reported-or-current-employers-a-data-dilemma-3b0eaf430e5d?source=rss-b281194e108b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b0eaf430e5d</guid>
            <category><![CDATA[database-design]]></category>
            <category><![CDATA[data-cleaning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Dubeutkarsh]]></dc:creator>
            <pubDate>Mon, 25 Aug 2025 08:44:35 GMT</pubDate>
            <atom:updated>2025-08-25T08:44:35.466Z</atom:updated>
            <content:encoded><![CDATA[<p>When building an alumni database, one of the most overlooked yet critical challenges is <strong>data freshness</strong>. Recently, while cleaning up an alumni dataset for my university, I ran into a problem:<br> Several alumni had <strong>switched companies</strong> since submitting their details.</p><p>This raised a big question:<br> <strong>Should I keep the information they originally provided, or update it according to their LinkedIn profile?</strong></p><h3>The Two Sides of the Problem</h3><h4>1. Keep Alumni’s Self-Reported Data</h4><p>Pros:</p><ul><li>Reflects what the alumni themselves officially submitted.</li><li>No risk of misrepresentation.</li></ul><p>Cons:</p><ul><li>Becomes outdated quickly.</li><li>Less useful for networking and career benchmarking.</li></ul><h4>2. Update According to LinkedIn (Latest Info)</h4><p>Pros:</p><ul><li>Keeps the database relevant and accurate.</li><li>Helps students and peers see <em>where alumni are now</em>.</li></ul><p>Cons:</p><ul><li>May override what the alumni wanted to share (e.g., their job at graduation).</li><li>Raises ethical questions if updated without consent.</li></ul><h3>The Best of Both Worlds: Dual Fields</h3><p>Instead of choosing one, why not keep both?</p><ul><li><strong>Reported Company / Role</strong> → Data alumni provided at the time of survey.</li><li><strong>Current Company / Role (verified)</strong> → Updated from LinkedIn or other reliable sources.</li></ul><p>By doing this, you:</p><ul><li>Respect alumni’s input.</li><li>Keep the database future-proof and useful for career networks.</li><li>Maintain transparency with a “Last Verified” timestamp.</li></ul><h3>Takeaway</h3><p>Alumni data isn’t static. People change jobs, roles, and even industries. If an alumni database wants to stay <strong>historically accurate</strong> <em>and</em> <strong>practically useful</strong>, it must record both:</p><ul><li><em>What alumni said then.</em></li><li><em>Where they are now.</em></li></ul><p>That’s not just data cleaning — it’s responsible data stewardship.</p><p>I’m curious: If you were maintaining an alumni database, would you <strong>stick to what alumni reported</strong> or <strong>update with LinkedIn</strong>?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b0eaf430e5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>