<?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 Kathan Vakharia on Medium]]></title>
        <description><![CDATA[Stories by Kathan Vakharia on Medium]]></description>
        <link>https://medium.com/@kathanvakharia?source=rss-97e2f5645cc5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MfYg4H7qaEDxuygz_eawVg.jpeg</url>
            <title>Stories by Kathan Vakharia on Medium</title>
            <link>https://medium.com/@kathanvakharia?source=rss-97e2f5645cc5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 18:24:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kathanvakharia/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[Chasing success at the cost of sanity, Was it worth it?]]></title>
            <link>https://medium.com/@kathanvakharia/chasing-success-at-the-cost-of-sanity-was-it-worth-it-0e8a10e02016?source=rss-97e2f5645cc5------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e8a10e02016</guid>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[self-realisation]]></category>
            <category><![CDATA[self-talk]]></category>
            <dc:creator><![CDATA[Kathan Vakharia]]></dc:creator>
            <pubDate>Sun, 28 Jun 2026 16:31:00 GMT</pubDate>
            <atom:updated>2026-06-28T16:31:00.827Z</atom:updated>
            <content:encoded><![CDATA[<p>Was I successful though? At least in the world’s view I am because,</p><ul><li>I topped my high school in PCM — Physics, Chemistry, Math</li><li>I got into the top state college for my bachelors in Computer Science and IT</li><li>I bettered it by getting into a tier-1 NIT for my Masters in Computer Science</li><li>Delivered high value projects at the Dawn of Generative AI</li><li>Today, I work at the heart of semiconductor revolution at Qualcomm</li></ul><p>I have a long way to go but it looks like I have come a long way as well. I paid the cost in advance, and frankly some outcomes aches me till date — why can’t I have it all? I am delusional okay :)</p><p>There were certain controversial choices which turned out to be pivotal moments in life.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/0*RWhOfzrLMxWPRwmF" /><figcaption>The solitude of a high vantage point. Source: StockCake</figcaption></figure><blockquote>Distancing myself from coolest group in college so I could focus on work as I didn’t have time for frequent hangouts, night outs, fancy outings, tours and trips. I lost a great friend with that.</blockquote><p>I wish if I hadn’t lost that friend till date but hey as I moved one, I was able to form a small trio with like minded workaholic folks — friendship with whom carries on today as well. However somewhere in that phase I lost the kid inside me who liked having fun by going out, trips, and what not.</p><p>Work &gt;&gt;&gt; Fun and this principle drives me crazy. I have no way to going back now or have I?</p><blockquote>Let Love to rot so my YouTube channel could grow</blockquote><p>A few years back, my relationship was in a rough phase. My channel suddenly picked up a spark during the same time — You need to realise, it took five-ish years for that spark to arrive. I went all in to content creation which eventually ended up developing a personal brand for me out there and giving me a small passive income. But of course, I lost her or should I say I chose to lose her.</p><p>Work &gt;&gt; Love and this principle breeds loneliness. No cap</p><p>I come from a family with no generational wealth so I know why I made those decisions. What I didn’t realise is somewhere in the process, I have kept the kid inside me behind the bars :|</p><p>This is not sustainable. I am grateful to where I am right now but the principles that have driven this outcomes — need a tweak.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e8a10e02016" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Concurrency: Go vs Python in Practice — Part 2: From Theory to Implementation]]></title>
            <link>https://medium.com/@kathanvakharia/mastering-concurrency-go-vs-python-in-practice-part-2-from-theory-to-implementation-4ac2e2d7c55e?source=rss-97e2f5645cc5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ac2e2d7c55e</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Kathan Vakharia]]></dc:creator>
            <pubDate>Mon, 11 Aug 2025 06:01:19 GMT</pubDate>
            <atom:updated>2025-08-11T06:01:19.982Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mastering Concurrency: Go vs Python in Practice — <em>Part 2: From Theory to Implementation</em></h3><p>In Part 1, we explored why concurrent programming is essential and how hardware evolution made it inevitable. Now it’s time to get our hands dirty. We’ll dive into the practical world of concurrent programming, comparing Go and Python’s approaches.</p><p>If you’ve been wondering how to actually implement those performance gains we talked about — like my 2.5X speedup with asyncio tasks — this is where the magic happens.</p><p><a href="https://medium.com/@kathankv5201/why-your-code-isnt-using-your-computer-s-full-power-and-how-to-fix-it-part-1-understanding-09567985ede8">Why Your Code Isn’t Using Your Computer’s Full Power (And How to Fix It) — Part 1: Understanding…</a></p><h3>Enter Go: The Language Built for Concurrency</h3><p>Go wasn’t designed in the 1990s when single-core CPUs ruled the world. It was crafted in the late 2000s by engineers at Google who were dealing with massive distributed systems daily. They knew that concurrency wasn’t a nice-to-have feature — it was absolutely essential.</p><p><strong>Python was designed in the 1990s when people didn’t care much about writing programs that leverage multiple cores.</strong> Go, on the other hand, was born in an era where distributed systems and multicore processors were the norm.</p><p>This fundamental difference in design philosophy shows in every aspect of how these languages handle concurrency</p><h3>The Go Philosophy: “Don’t Communicate by Sharing Memory; Share Memory by Communicating”</h3><p><strong>Modeling Concurrency in Go</strong> is elegantly simple:</p><ul><li>Want some tasks to happen concurrently? Create a <strong>goroutine</strong> (the fundamental unit of execution in Go)</li><li>Want many tasks to happen concurrently? Create multiple goroutines</li><li>Go handles the scaling based on your hardware and environment</li></ul><pre>// Sequential approach<br>func processDataSequentially() {<br>    processTask1()<br>    processTask2() <br>    processTask3()<br>}<br><br>// Concurrent approach<br>func processDataConcurrently() {<br>    go processTask1()  // Runs concurrently<br>    go processTask2()  // Runs concurrently  <br>    go processTask3()  // Runs concurrently<br>}</pre><p>That go keyword is deceptively simple, but it&#39;s incredibly powerful. Behind the scenes, Go&#39;s runtime manages these goroutines efficiently across available CPU cores.</p><h3>Goroutines: Lightweight Concurrency Champions</h3><p><strong>Goroutines are lightweight compared to traditional threads and processes.</strong> Here’s why that matters:</p><ul><li><strong>Memory footprint:</strong> A goroutine starts with just 2KB of stack space (compared to 1–2MB for OS threads)</li><li><strong>Creation overhead:</strong> Creating a goroutine is much faster than creating an OS thread</li><li><strong>Context switching:</strong> Go’s scheduler can switch between goroutines much more efficiently than the OS switches threads</li></ul><p>You can easily run thousands or even millions of goroutines in a single Go program without breaking a sweat.</p><h3>Channels: The Fast-Food Restaurant of Concurrent Programming</h3><p><strong>Think of channels as an order counter in a fast-food restaurant:</strong></p><ul><li><strong>Customers (goroutines)</strong> place orders by sending data to the channel</li><li><strong>Kitchen staff (other goroutines)</strong> receive these orders from the channel</li><li><strong>Prepared food</strong> gets sent back through channels for delivery</li><li>This orderly communication ensures tasks are handled efficiently without chaos</li></ul><pre>// Creating a channel<br>orders := make(chan string)<br><br>// Sending data (customer placing order)<br>go func() {<br>    orders &lt;- &quot;Burger and Fries&quot;<br>}()<br><br>// Receiving data (kitchen processing order)<br>go func() {<br>    order := &lt;-orders<br>    fmt.Println(&quot;Processing:&quot;, order)<br>}()</pre><p>Channels provide <strong>type-safe, synchronized communication</strong> between goroutines. They prevent the race conditions and data corruption that plague traditional shared-memory concurrency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mn1I9y8OGCql8Kmke6T-yw.png" /></figure><h3>Python’s Approach: AsyncIO to the Rescue</h3><p>Python took a different path to concurrency. Since it was designed in the single-core era, it had to evolve its concurrency model over time. The result is asyncio—Python&#39;s answer to concurrent programming.</p><h3>The Global Interpreter Lock (GIL) Challenge</h3><p>Python has this thing called the <strong>Global Interpreter Lock (GIL)</strong> that prevents true parallelism for CPU-bound tasks. But here’s the thing: <strong>for I/O-bound operations (like API requests, database queries, file operations), asyncio shines brilliantly.</strong></p><p>Remember that 2.5X performance gain I mentioned? That was asyncio working its magic on API requests.</p><h3>AsyncIO: Making Python Concurrent</h3><pre>import asyncio<br>import aiohttp<br><br># Sequential approach<br>def make_api_calls_sequential():<br>    response1 = requests.get(&quot;https://api1.example.com&quot;)<br>    response2 = requests.get(&quot;https://api2.example.com&quot;) <br>    response3 = requests.get(&quot;https://api3.example.com&quot;)<br>    return [response1, response2, response3]<br><br># Concurrent approach with asyncio<br>async def make_api_calls_concurrent():<br>    async with aiohttp.ClientSession() as session:<br>        tasks = [<br>            session.get(&quot;https://api1.example.com&quot;),<br>            session.get(&quot;https://api2.example.com&quot;),<br>            session.get(&quot;https://api3.example.com&quot;)<br>        ]<br>        responses = await asyncio.gather(*tasks)<br>        return responses</pre><p>The async and await keywords are Python&#39;s way of saying &quot;this operation might take time, so let other tasks run while we wait.&quot;</p><h3>Real-World Example: Processing Embedding Requests</h3><p>Let’s see both approaches in action with a practical example — the embedding service scenario I mentioned earlier.</p><p>Channels provide <strong>type-safe, synchronized communication</strong> between goroutines. They prevent the race conditions and data corruption that plague traditional shared-memory concurrency.</p><h3>Go Implementation</h3><pre>package main<br><br>import (<br>    &quot;encoding/json&quot;<br>    &quot;fmt&quot;<br>    &quot;net/http&quot;<br>    &quot;sync&quot;<br>    &quot;time&quot;<br>)<br><br>type EmbeddingResult struct {<br>    Text     string<br>    Duration time.Duration<br>    Error    error<br>    // Embedding []float64  // This would be the actual embedding vector<br>}<br><br>func getEmbedding(text string, wg *sync.WaitGroup, results chan&lt;- EmbeddingResult) {<br>    defer wg.Done()<br>    <br>    // Simulate API call<br>    start := time.Now()<br>    <br>    // Make actual HTTP request here<br>    resp, err := http.Get(fmt.Sprintf(&quot;https://api.openai.com/embeddings?text=%s&quot;, text))<br>    if err != nil {<br>        results &lt;- EmbeddingResult{Error: err}<br>        return<br>    }<br>    defer resp.Body.Close()<br>    <br>    // Process response<br>    duration := time.Since(start)<br>    results &lt;- EmbeddingResult{<br>        Text: text,<br>        Duration: duration,<br>        // Embedding: actualEmbedding,<br>    }<br>}<br><br>func processEmbeddingsConcurrently(texts []string) {<br>    var wg sync.WaitGroup<br>    results := make(chan EmbeddingResult, len(texts))<br>    <br>    // Launch goroutines<br>    for _, text := range texts {<br>        wg.Add(1)<br>        go getEmbedding(text, &amp;wg, results)<br>    }<br>    <br>    // Wait for completion<br>    wg.Wait()<br>    close(results)<br>    <br>    // Collect results<br>    for result := range results {<br>        fmt.Printf(&quot;Processed: %s in %v\n&quot;, result.Text, result.Duration)<br>    }<br>}</pre><h3>Python Implementation</h3><pre>import asyncio<br>import aiohttp<br>import time<br><br>async def get_embedding(session, text):<br>    &quot;&quot;&quot;Get embedding for a single text string&quot;&quot;&quot;<br>    start = time.time()<br>    <br>    try:<br>        async with session.get(f&quot;https://api.openai.com/embeddings?text={text}&quot;) as response:<br>            data = await response.json()<br>            duration = time.time() - start<br>            <br>            return {<br>                &#39;text&#39;: text,<br>                &#39;duration&#39;: duration,<br>                &#39;embedding&#39;: data.get(&#39;embedding&#39;)<br>            }<br>    except Exception as e:<br>        return {&#39;text&#39;: text, &#39;error&#39;: str(e)}<br><br>async def process_embeddings_concurrently(texts):<br>    &quot;&quot;&quot;Process multiple embeddings concurrently&quot;&quot;&quot;<br>    async with aiohttp.ClientSession() as session:<br>        # Create tasks for all embeddings<br>        tasks = [get_embedding(session, text) for text in texts]<br>        <br>        # Execute all tasks concurrently<br>        results = await asyncio.gather(*tasks)<br>        <br>        for result in results:<br>            print(f&quot;Processed: {result[&#39;text&#39;]} in {result[&#39;duration&#39;]:.2f}s&quot;)<br>        <br>        return results<br><br># Usage<br>texts = [&quot;Hello world&quot;, &quot;Concurrent programming&quot;, &quot;Python asyncio&quot;]<br>asyncio.run(process_embeddings_concurrently(texts))</pre><p>There are a lot of key patterns and reusable ideas that can be applied, which we will discuss some other day.</p><h3>When to Choose Go vs Python for Concurrency</h3><h3>Choose Go When:</h3><ul><li><strong>Building distributed systems</strong> or microservices</li><li><strong>CPU-bound tasks</strong> that benefit from true parallelism</li><li><strong>High-throughput applications</strong> with thousands of concurrent connections</li><li><strong>Systems programming,</strong> where performance is critical</li><li>You need <strong>simple, readable concurrent code</strong></li></ul><h3>Choose Python When:</h3><ul><li><strong>I/O-bound operations</strong> dominate your workload</li><li><strong>Rapid prototyping</strong> and development speed matter</li><li><strong>Integrating with ML/AI libraries</strong> that are Python-native</li><li><strong>Web scraping</strong> or API integration tasks</li><li>You have existing Python infrastructure</li></ul><p>In my personal experience, although Go is almost always faster and easier to manage but because of your project’s existing Python infrastructure, you will end up using Python :D</p><h3>Common Pitfalls and How to Avoid Them</h3><h3>1. Race Conditions</h3><p><strong>Problem:</strong> Multiple goroutines/tasks accessing shared data simultaneously</p><p><strong>Go Solution:</strong> Use mutexes or channels</p><pre>var mu sync.Mutex<br>var counter int<br><br>func increment() {<br>    mu.Lock()<br>    defer mu.Unlock()<br>    counter++<br>}</pre><p><strong>Python Solution:</strong> Use asyncio.Lock()</p><pre>lock = asyncio.Lock()<br>counter = 0<br>async def increment():<br>    async with lock:<br>        global counter<br>        counter += 1</pre><h3>2. Deadlocks</h3><p><strong>Problem:</strong> Goroutines/tasks waiting for each other indefinitely</p><p><strong>Solution:</strong> Always acquire locks in the same order, use timeouts, and avoid circular dependencies.</p><h3>3. Resource Leaks</h3><p><strong>Problem:</strong> Not properly closing channels, connections, or cleaning up resources</p><p><strong>Go Solution:</strong></p><pre>defer resp.Body.Close()<br>defer close(channel)</pre><p><strong>Python Solution:</strong></p><pre>async with aiohttp.ClientSession() as session:<br>    # Session automatically closed<br>    pass</pre><h3>Performance Comparison: The Numbers Don’t Lie</h3><p>Based on real-world benchmarks:</p><p><strong>Go Goroutines:</strong></p><ul><li>Can handle <strong>millions of concurrent goroutines</strong></li><li><strong>2KB memory overhead</strong> per goroutine</li><li><strong>Microsecond-level</strong> context switching</li></ul><p><strong>Python AsyncIO:</strong></p><ul><li>Excellent for <strong>I/O-bound concurrency</strong></li><li><strong>Single-threaded</strong> but highly efficient for network operations</li><li><strong>Limited by GIL</strong> for CPU-bound tasks</li></ul><p><strong>The Verdict:</strong> For I/O-bound tasks, both perform similarly. For CPU-bound tasks requiring true parallelism, Go wins decisively.</p><h3>Putting It All Together: A Complete Example</h3><p>Let’s build a simple web scraper that demonstrates both approaches:</p><h3>Go Web Scraper</h3><pre>func scrapeURLs(urls []string) {<br>    var wg sync.WaitGroup<br>    results := make(chan ScrapResult, len(urls))<br>    <br>    for _, url := range urls {<br>        wg.Add(1)<br>        go func(u string) {<br>            defer wg.Done()<br>            content := scrapeURL(u)<br>            results &lt;- ScrapResult{URL: u, Content: content}<br>        }(url)<br>    }<br>    <br>    go func() {<br>        wg.Wait()<br>        close(results)<br>    }()<br>    <br>    for result := range results {<br>        fmt.Printf(&quot;Scraped %s: %d bytes\n&quot;, result.URL, len(result.Content))<br>    }<br>}</pre><h3>Python Web Scraper</h3><pre>async def scrape_urls(urls):<br>    async with aiohttp.ClientSession() as session:<br>        tasks = [scrape_url(https://medium.com/session,%20url) for url in urls]<br>        results = await asyncio.gather(*tasks)<br>        <br>        for url, content in results:<br>            print(f&quot;Scraped {url}: {len(content)} bytes&quot;)<br><br>async def scrape_url(https://medium.com/session,%20url):<br>    async with session.get(url) as response:<br>        content = await response.text()<br>        return url, content</pre><p>Both achieve similar performance for this I/O-bound task, but the Go version can handle more concurrent connections with less memory usage.</p><h3>The Future of Concurrent Programming</h3><p>Concurrency isn’t just a performance optimization — it’s becoming the default way to think about program design. Whether you’re building AI applications, web services, or data processing pipelines, understanding these patterns will set you apart as a developer.</p><h3>Key Takeaways:</h3><ol><li><strong>Start with the problem:</strong> Is it I/O-bound or CPU-bound?</li><li><strong>Choose your tool:</strong> Go for systems programming and high concurrency, Python for rapid development, and I/O operations</li><li><strong>Master the patterns:</strong> Worker pools, error handling, and graceful shutdown ( we didn’t discuss them in this blog)</li><li><strong>Avoid common pitfalls:</strong> Race conditions, deadlocks, and resource leaks</li><li><strong>Measure and optimize:</strong> Profile your concurrent code to find bottlenecks</li></ol><h3>Your Next Steps</h3><p>Ready to put this knowledge into practice? Here’s what I recommend:</p><ol><li><strong>Start small:</strong> Convert a simple sequential script to use concurrency</li><li><strong>Benchmark everything:</strong> Measure the performance gains (you might be surprised!)</li><li><strong>Practice patterns:</strong> Implement worker pools and error handling</li><li><strong>Build something real:</strong> Create a concurrent web scraper or API client</li><li><strong>Share your results:</strong> Track your performance improvements and share them with the community</li></ol><p>With the patterns and techniques we will cover in future blogs, my effort is to equip you with tools to unlock similar (or even better) performance improvements in your own projects.</p><p>The era of single-threaded, sequential programming is over. Welcome to the world of concurrent programming, where your code finally matches the power of your hardware.</p><p><em>What concurrent programming challenge are you excited to tackle next?</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ac2e2d7c55e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Your Code Isn’t Using Your Computer’s Full Power (And How to Fix It) — Part 1: Understanding…]]></title>
            <link>https://medium.com/@kathanvakharia/why-your-code-isnt-using-your-computer-s-full-power-and-how-to-fix-it-part-1-understanding-09567985ede8?source=rss-97e2f5645cc5------2</link>
            <guid isPermaLink="false">https://medium.com/p/09567985ede8</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Kathan Vakharia]]></dc:creator>
            <pubDate>Tue, 05 Aug 2025 05:33:22 GMT</pubDate>
            <atom:updated>2025-08-05T05:33:22.234Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why Your Code Isn’t Using Your Computer’s Full Power (And How to Fix It) — Part 1: Understanding the Concurrency Revolution</h3><p>Picture this: You’re working on an LLM project, making three independent API requests to an embedding service. Each request takes 2 seconds. The naive approach? Make them one after another — 6 seconds total. The smart approach? Fire all three simultaneously using concurrent programming — still 2 seconds total. That’s a <strong>3X performance boost</strong> with just a few lines of code.</p><p>I discovered this the hard way when I achieved a 2.5X performance gain in one of my projects simply by converting three sequential API requests into concurrent Python asyncio tasks. If that doesn’t get you excited about concurrent programming, I don’t know what will!</p><h3>The Problem: Your Supercomputer is Acting Like a Calculator</h3><p>Here’s the harsh truth: <strong>If your code isn’t written to take advantage of multiple CPU cores, it doesn’t matter whether you allocate a supercomputer for the task — it will still perform slowly.</strong></p><p>Think about it. You have this powerful machine with 8, 16, or even 32 cores, but your code is using just one of them like it’s 1995. It’s like hiring a team of 10 brilliant engineers and then asking only one person to do all the work while the other nine sit around playing ping-pong.</p><p>This isn’t just a theoretical problem. In our AI-enabled era, concurrent programming has become a hidden gem that almost all tech companies appreciate. Ever wonder how AI web builder tools like <a href="https://lovable.dev/?utm_source=loveable_redirect">Loveable.dev</a> create fully-fledged websites from a single prompt in almost no time? There are hundreds of goroutines working in parallel behind the scenes! Whether it’s game development, backend services, or mobile apps, businesses want to utilize their hardware resources to full capacity.</p><h3>Concurrency: You’re Already Doing It (Just Not in Code)</h3><p>Concurrency isn’t some mystical computer science concept — you encounter it every day:</p><ul><li><strong>In college:</strong> When one assignment is waiting for the professor&#39;s feedback, you switch to studying for another subject</li><li><strong>At work:</strong> When a task’s milestone has pending approval from your manager, you switch to another task</li><li><strong>On </strong><a href="https://www.irctc.co.in/"><strong>IRCTC</strong></a><strong>:</strong> During Tatkal booking, millions of users make train booking requests simultaneously, yet the system never allocates the same seat to multiple people (well, mostly!)</li></ul><p>Concurrency is about building systems that allow multiple jobs to work in tandem instead of running them one after another. It’s that simple.</p><h3>The Hardware Revolution: Why We Can’t Just Make Faster CPUs</h3><p>To understand why concurrency matters now more than ever, let’s take a quick trip through computing history.</p><h3>The Good Old Days (1990s)</h3><p>Initial speedup in processing hardware came from two main factors:</p><ul><li><strong>Increased clock rates</strong> (faster CPUs)</li><li><strong>Increased transistor count</strong> (doubling every year, thanks to Moore’s Law)</li></ul><p>Life was simple. Want your program to run faster? Wait for next year’s CPU.</p><h3>Reality Check: Physics Strikes Back</h3><p>Then engineers hit a wall — literally, the laws of physics. Higher clock rates meant more heat and power consumption. You can’t fight thermodynamics, and CPUs started melting (okay, not literally, but overheating became a real problem).</p><p><strong>Enter the era of multicore processors.</strong></p><h3>The Scaling Dilemma</h3><p><strong>JARGON ALERT:</strong></p><ul><li><strong>Vertical Scaling:</strong> Improve performance by increasing raw power (faster CPU, more RAM)</li><li><strong>Horizontal Scaling:</strong> Improve performance by distributing the load across multiple resources</li></ul><p>Think of it like developing multiple income streams:</p><ul><li><strong>Vertical Scaling:</strong> Make yourself capable enough to handle a full-time job plus multiple side businesses (there’s a limit to what one person can do)</li><li><strong>Horizontal Scaling:</strong> Hire a team of like-minded people (much more scalable)</li></ul><p>You can already see why the second option wins in the long run.</p><h3>The Cloud Computing Factor</h3><p>Cloud service providers like AWS, GCP, and Azure have democratized access to on-demand compute and storage at prices that make self-hosting look expensive. Since you’re charged for every little bit of usage, writing concurrent programs that maximize processing unit utilization isn’t just smart — it’s economical.</p><h3>Concurrency Makes Programs Feel Alive</h3><p>Remember the last time you used MS Word or Google Docs? A word processor might look simple, but multiple tasks happen simultaneously:</p><ul><li><strong>Input handler:</strong> Listens for keyboard input and displays what you type</li><li><strong>Spell checker:</strong> Continuously checks for grammatical and spelling errors</li><li><strong>Stats generator:</strong> Calculates page count, word count, etc.</li><li><strong>Auto-saver:</strong> Periodically saves your document</li><li><strong>Formatter:</strong> Applies styling and layout changes</li><li>…and many more</li></ul><p>Behind the scenes, the operating system quickly switches between these tasks on the CPU(s), creating the impression that everything happens simultaneously. This is achieved through hardware interrupts and context switching, but the key point is this: <strong>concurrent programming improves the responsiveness of your program.</strong></p><p>Without concurrency, you’d have to finish typing a sentence, wait for spell check to complete, wait for stats to update, wait for auto-save, and then continue typing. Imagine how frustrating that would be!</p><h3>The Core Challenges of Concurrent Programming</h3><p>When you decide to embrace concurrency, you’ll face four fundamental questions:</p><ol><li><strong>How can multiple program instructions happen at the same time?</strong></li><li><strong>How do we ensure they don’t interfere with each other’s execution?</strong></li><li><strong>How do we aggregate results from multiple executions while ensuring proper collaboration?</strong></li><li><strong>What are the common reusable patterns of distributed and concurrent programming?</strong></li></ol><p>These aren’t just theoretical questions — they’re practical problems you’ll solve every time you write concurrent code.</p><h3>The Performance Paradox: Why More Isn’t Always Better</h3><p>Here’s where things get interesting. There’s a limit to how much concurrency can help, and understanding this limit is crucial.</p><h3>Amdahl’s Law: The Sequential Bottleneck</h3><p>Consider this real-world analogy: A construction company gets a contract to build a bridge.</p><ul><li><strong>20 workers:</strong> 36 months to complete</li><li><strong>40 workers:</strong> 18 months (double cost, half time)</li><li><strong>80 workers:</strong> 9 months (again, double cost, half time)</li><li><strong>160 workers:</strong> Still 9 months</li><li><strong>320 workers:</strong> Still 9 months</li></ul><p>What’s happening here? Why can’t we keep doubling resources and halving completion time?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eUZmO4a7Q9fIs10XiBUWeg.png" /><figcaption>You can play around with the <a href="https://github.com/Kathan-Vakharia/medium_parallel_programming_blogs">code</a> for this plot</figcaption></figure><p><strong>Amdahl’s Law explains this:</strong> While parallelizing program execution, we’re limited by the sequential portion that cannot be parallelized.</p><p>In bridge construction, some tasks must happen in order:</p><ul><li>You can’t build the pedestrian walkway before the bridge deck is ready</li><li>If only one road leads to the construction site, transport vehicles create a bottleneck</li><li>Some processes are inherently sequential</li></ul><p>The same applies to programming. Even in highly concurrent systems, there are always some sequential parts that act as bottlenecks.</p><p><strong>The math is sobering:</strong></p><ul><li>With 10% sequential work, 100 workers finish in ~10.1 months</li><li>With 80% sequential work, 100 workers finish in ~33.8 months</li></ul><p>The sequential bottleneck limits how much adding resources can help!</p><h3>Gustafson’s Law: The Silver Lining</h3><p>But the picture isn’t entirely bleak. <strong>Gustafson’s Law</strong> offers hope: As long as we find ways to keep our extra resources busy, speedup should continue to increase without being limited by the serial part of the problem.</p><p>Here’s the key insight: Instead of assigning 1000 workers to one bridge project, assign an optimal number to this project and allocate the rest to other projects the company is working on.</p><p>In software terms: If your application achieves the same performance using half the allocated resources, use those extra resources for other improvements — better accuracy, enhanced features, or handling more users.</p><p>Gustafson’s law relies on the fact that as we increase problem size, the serial part stays relatively constant. The non-parallel portion doesn’t grow proportionally with the problem size, so expected speedup increases in direct proportion to increased resources.</p><h3>Getting the Most Out of Concurrency</h3><p>Here’s a mind-blowing fact: You can achieve considerable speedup even with just one CPU core through concurrent programming. How? <strong>If some tasks are waiting for I/O operations to complete, we can let the CPU work on other tasks instead of sitting idle.</strong></p><p>This is particularly powerful when working with:</p><ul><li><strong>API requests</strong> (like those embedding services I mentioned)</li><li><strong>Database queries</strong></li><li><strong>File operations</strong></li><li><strong>Network communications</strong></li></ul><p>While one task waits for the network response, another task can process data, and a third can handle user input. It’s like being a master multitasker who never wastes time waiting.</p><h3>What’s Next?</h3><p>In this post, we’ve covered why concurrent programming matters, how hardware evolution made it essential, and the fundamental principles that govern its effectiveness. We’ve seen that concurrency isn’t just about using multiple cores — it’s about building responsive, efficient systems that make the most of available resources.</p><p>In <strong>Part 2</strong>, we’ll dive into the practical side: how to implement concurrency in Go and Python, why Go’s approach is particularly elegant for distributed systems, and the specific patterns and tools you need to master concurrent programming.</p><p>We’ll explore:</p><ul><li><strong>Goroutines vs Python’s asyncio:</strong> When to use which approach</li><li><strong>Channels and communication patterns</strong> in concurrent systems</li><li><strong>Common pitfalls</strong> and how to avoid them</li><li><strong>Real-world examples</strong> that you can apply immediately</li></ul><p>Whether you’re building AI applications, web services, or data processing pipelines, understanding these concepts will transform how you think about performance and system design.</p><p>Ready to unlock your hardware’s full potential? Let’s continue this journey in Part 2.</p><p><em>Have you experienced the frustration of slow, sequential code? Or discovered the joy of concurrent programming? Share your experiences in the comments below!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09567985ede8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a URL Shortener in Golang]]></title>
            <link>https://medium.com/@kathanvakharia/getting-hands-dirty-straightaway-building-a-url-shortener-in-golang-4d7eec5b1d55?source=rss-97e2f5645cc5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d7eec5b1d55</guid>
            <category><![CDATA[url-shorteners]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[backend-development]]></category>
            <dc:creator><![CDATA[Kathan Vakharia]]></dc:creator>
            <pubDate>Wed, 23 Apr 2025 17:06:56 GMT</pubDate>
            <atom:updated>2025-04-26T21:25:08.839Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s do something different and dive right into building something simple yet interesting project right away. We will build a basic URL shortener like <a href="https://tinyurl.com/">tinyurl</a> or <a href="https://bitly.com/">bitly</a> .</p><p>Before we jump in..I would recommend that everyone install Go on their system. It is very easy to do that, and there’s no better place to look for that than the official docs.</p><blockquote><a href="https://go.dev/doc/install">https://go.dev/doc/install</a></blockquote><h3>What is the job of a URL shortener?</h3><p>A URL shortener service allows users to input a long URL and receive a shortened version of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QvCjdXCY3mm7dBW4Zw1v7Q.png" /><figcaption>here instead of www.shorty.com you would have your own domain name</figcaption></figure><p>When a client tries to reach www.shorty.com/&lt;id&gt;, it will be redirected to the corresponding <strong>long url</strong>. For example,</p><ul><li>input: <a href="https://www.example.com/very-long-url">https://www.example.com/very-long-url</a></li><li>Output: <a href="http://short.url/abc123">http://shorty.com/abc123</a></li></ul><p>Key Features we are looking to implement here</p><ul><li>Generate a unique short url for each long url — This task of generating ‘unique’ is way harder than it looks in practical life, but we will keep things simple here and use the inbuilt Go packages to generate a unique ID.</li><li>store the mapping {shorturl → longurl} — In production, we must use a database like MySQL or MongoDB, but we will use an in-memory storage for this blog</li><li>Redirect users from shortURL to the original LongURL</li></ul><h3>Set up Development Environment and Define the Project Structure</h3><ol><li>First things first, create a main project directory. I will name it <strong>url-shortener</strong>.</li><li>Initialise the <strong>Go module</strong> — a module is Go’s way of organising projects.</li></ol><pre>go mod init url-shortener</pre><p>This will create a go.mod file to manage project dependencies. A module is further split into multiple packages containing semantically related Go files.</p><p>3. Organise the project into a clean structure. Don’t worry if you don’t get the purpose of most folders as of now.</p><pre>url-shortener/<br>├── main.go          # Entry point of the application<br>├── handlers/        # Handlers for HTTP requests<br>├── models/          # Data models and business logic<br>├── storage/         # Storage layer (in-memory or database)<br>├── go.mod           # Dependency management<br></pre><p>Here we have three packages: <strong>handlers</strong>, <strong>models</strong>, and <strong>storage,</strong> each with its purpose clearly defined.</p><h3>Time for the Implementation</h3><p>Here’s our implementation path,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o-sxRt3Nk9J9M7gthVtEzw.png" /></figure><p>We will start with our storage layer using an in-memory storage. Create a file storage/store.go</p><pre>package storage <br><br><br>import &quot;sync&quot; <br><br><br>//Store represents an in-memory storage for URL mappings <br>type Store struct {<br> urls map[string]string // Key : Short URL, Value: Long URL<br> mu  sync.RWMutex // Mutex for concurrent access: 1 writer and multiple readers<br>}<br><br>// NewStore creates a new in-memory store<br>func NewStore() *Store{<br> return &amp;Store{<br>  urls:make(map[string]string),<br> }<br>}<br><br>//Save adds a new URL mapping to the store <br>func (s *Store) Save(shortURL, longURL string){<br> s.mu.Lock() // Lock for writing <br> defer s.mu.Unlock() // Unlock after writing<br> s.urls[shortURL] = longURL // Save the mapping <br>}<br><br>// Get Retreives a long URL for a given short URL <br>func (s *Store) Get(shortURL string)(string , bool){<br> s.mu.RLock() // Lock for reading <br> defer s.mu.RUnlock() // Unlock after reading<br> longURL, exists := s.urls[shortURL] <br><br> return longURL, exists // Return the long URL and existence status<br>}</pre><p>Next up is implementing a simple mechanism to generate unique short URLs. Create a file models/url.go</p><pre>package models <br><br>import (<br> &quot;crypto/rand&quot;<br> &quot;encoding/base64&quot;<br>)<br><br>// GenerateShortURL creates a unique 6-character short URL <br>func GenerateShortURL() string {<br> randomBytes := make([]byte, 6) // Create a byte slice(array) of length 6<br> _, err := rand.Read(randomBytes) // Fill the byte slice with random bytes<br><br> if err != nil {<br>  panic(err) // Handle error (in production, we might want to return an error instead)<br> }<br><br> return base64.URLEncoding.EncodeToString(randomBytes)[:6] // Encode the bytes to a base64 string and return the first 6 characters<br>}</pre><blockquote>A good question to ask here is, what happens if two long URLs get mapped to same short url ?</blockquote><p>Now it is time to create our handlers. If you don’t know what is HTTP handler then think about it like this :</p><ul><li>When a client hits the endpoint /shorten On our server, what business logic our server should execute is decided by the attached handler to this endpoint /shorten</li><li>Here’s an analogy: Think of an HTTP handler like a friendly robot at a restaurant who listens when someone asks for food, figures out what they want, and brings back exactly what they ordered.</li><li>Or a more technical analogy would be: An HTTP handler is like a trained assistant who waits for web requests coming in, processes them according to specific rules, then sends back the appropriate response with the information or webpage the person asked for.</li></ul><p>Create a file handlers/handler.go</p><pre>package handlers<br><br>import (<br> &quot;fmt&quot;<br> &quot;net/http&quot;<br>//these are our internal packages<br> &quot;url-shortener/models&quot; <br> &quot;url-shortener/storage&quot;<br>)<br><br>// Handler contains dependencies for handling HTTP requests<br>type Handler struct {<br> store *storage.Store<br>}<br><br>// NewHandler initialises a new Handler<br>func NewHandler(store *storage.Store) *Handler {<br> return &amp;Handler{store: store}<br>}<br><br>// ShortenURL handles POST requests to shorten a URL<br>func (h *Handler) ShortenURL(w http.ResponseWriter, r *http.Request) {<br> if r.Method != http.MethodPost {<br>  http.Error(w, &quot;Method Not Allowed&quot;, http.StatusMethodNotAllowed)<br>  return<br> }<br><br> //parse the long url and request body<br> r.ParseForm()<br> longURL := r.FormValue(&quot;url&quot;)<br> if longURL == &quot;&quot; {<br>  http.Error(w, &quot;missing &#39;url&#39; parameter&quot;, http.StatusBadRequest)<br>  return<br> }<br><br> //generate a short URL<br> shortURL := models.GenerateShortURL()<br> h.store.Save(shortURL, longURL) // save mapping in the store<br><br> //respond with the short URL<br> w.WriteHeader(http.StatusCreated)<br> w.Write([]byte(&quot;http://shorty.url/&quot; + shortURL)) // should be a real domain name + shortURL<br><br>}<br><br>// RedirectURL handles GET requests to redirect to the original URL<br>func (h *Handler) RedirectURL(w http.ResponseWriter, r *http.Request) {<br><br> if r.Method != http.MethodGet {<br>  http.Error(w, &quot;Method Not Allowed&quot;, http.StatusMethodNotAllowed)<br>  return<br> }<br><br> //extract the short url from request url<br> shortURL := r.URL.Path[1:]         // remove leading slash<br> fmt.Println(&quot;shortURL:&quot;, shortURL) // Debugging line<br><br> //retrieve the long url from the store<br> longURL, exists := h.store.Get(shortURL)<br> if !exists {<br>  http.Error(w, &quot;URL not found&quot;, http.StatusNotFound)<br>  return<br> }<br><br> //Redirect to original URL <br> http.Redirect(w, r, longURL, http.StatusFound)<br><br>}</pre><p>Finally, it’s time to set up our main application and start our application server. In main.goWe wire everything together:</p><pre>package main<br><br>import (<br> &quot;net/http&quot;<br> &quot;url-shortener/handlers&quot;<br> &quot;url-shortener/storage&quot;<br>)<br><br>func main() {<br> //initialise the store<br> store := storage.NewStore()<br><br> // Initialise the handler<br> handler := handlers.NewHandler(store)<br><br> // Define Routes<br> http.HandleFunc(&quot;/shorten&quot;, handler.ShortenURL) // POST /shorten<br> http.HandleFunc(&quot;/&quot;, handler.RedirectURL)     // GET /:shortURL<br><br> //start the server <br> port := &quot;:8080&quot;<br> println(&quot;Server is running on port&quot;, port)<br> if err := http.ListenAndServe(port, nil); err != nil {<br>  println(&quot;Error starting server:&quot;, err)<br> }<br><br>}</pre><p>Let me explain the routes in a little bit more detail</p><pre>http.HandleFunc(&quot;/shorten&quot;, handler.ShortenURL) // POST /shorten</pre><p>This line tells the web server:<br> 👉 <em>“When someone requests to </em><em>/shorten, call the </em><em>ShortenURL function from the </em><em>handler package.”</em></p><pre>http.HandleFunc(&quot;/&quot;, handler.RedirectURL) // GET /:shortURL</pre><p>This tells the server:<br> 👉 <em>“For any request to the root </em><em>/ path or anything that starts with </em><em>/, call the </em><em>RedirectURL function.” </em>The handler would look up that short code and redirect the user to the full URL.</p><p>All in all,</p><p>When we send a <strong>POST</strong> request to /shorten with &quot;https://example.com/very/long/url&quot; → The server gives us back a short url like <a href="http://shorty.url/xevXH4"><em>http://shorty.url/xevXH4</em></a></p><p>Then, someone visits http://ourserver.com/<em>xevXH4</em> (a <strong>GET</strong> request to /<em>xevXH4</em>) → The server figures out the original URL and redirects them there.</p><h3>Test the application</h3><ol><li>Run the server : go run main.go Now our server is running on port 8080</li></ol><p>2. Use curl Or Postman to test the API endpoint</p><pre>curl -X  POST -d &quot;url=https://www.google.com&quot; http://localhost:8080/shorten</pre><p>Response: <a href="http://shorty.url/E70PVs"><em>http://shorty.url/E70PVs</em></a></p><p>Visit http:localhost:8080/E70PVs In your browser, you should be directed to <a href="https://www.google.com/">https://www.google.com</a></p><p>And that’s how you create a POC implementation of a URL shortener. Of course, it’s just the start, and we have a long way to go to build a robust and scalable URL shortener. Can you think about how we can improve this even further? Here, I will start with some features:</p><ol><li>Instead of in-memory, we should use a SQL or NoSQL-based database</li><li>We should write proper tests to ensure our endpoints behave as expected. A good thing about Go is that it has built-in support for tests. (More on that in some other blog)</li><li>We can think of adding rate limiting and authentication to avoid attacks on our endpoint</li><li>…</li></ol><p>What else? Let me know in the comments. See you in the next one 🌱</p><blockquote>PS: Few of the feature idea(s) are already hidden in the blog</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d7eec5b1d55" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learn Golang With Me: How do we start?]]></title>
            <link>https://medium.com/@kathanvakharia/learn-golang-with-me-how-do-we-start-812fdb068852?source=rss-97e2f5645cc5------2</link>
            <guid isPermaLink="false">https://medium.com/p/812fdb068852</guid>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[golang-development]]></category>
            <category><![CDATA[systems-thinking]]></category>
            <dc:creator><![CDATA[Kathan Vakharia]]></dc:creator>
            <pubDate>Sat, 19 Apr 2025 13:19:29 GMT</pubDate>
            <atom:updated>2025-04-19T13:19:29.188Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Backdrop you didn’t ask for</h3><p>It was 2020, here I am dabbling with my Operating Systems course while simultaneously falling in love with applications of processes, threads, inter process communication, deadlocks, memory management (most challenging topic for me back then but glad I gave it all to understand it well ), and last but not least file management. But you don’t get it if you can’t code stuff, right? C++ and Python were my primary programming languages back then, and I tried looking for some implementations of the concepts I was learning, but it felt like Meh…too difficult for me to make sense of the concurrent programming constructs back then. Then I bumped into this language, Golang, represented by the famous mascot, and I fell for it in no time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/192/1*Op2PQIG5fJL_R0mr3pxFxg.png" /><figcaption>reference: <a href="https://go.dev/">https://go.dev/</a></figcaption></figure><p>I gave it a full week without any distractions, learning with the book ‘GET PROGRAMMING WITH GO,’ and the result is this GitHub repo of exercises, which I was able to solve. I even started calling myself an aspiring Gopher :P</p><p><a href="https://github.com/Kathan-Vakharia/Get-Programming-with-Go">GitHub - Kathan-Vakharia/Get-Programming-with-Go: Solution of all experiments in the book GET PROGRAMMING WITH GO</a></p><p>It has been 5 years since that phase. As life happened, I never got a chance to materialise my love for system programming in this period, but here I am for a restart. I don’t know how this journey will unfold, but I know one thing that I will show up regularly and build stuff with this fantastic tool, which has played a massive role in easing the development of highly scalable systems.</p><h3>So what’s the plan now, Kathan?</h3><p>Good Question.</p><p>The end goal or the primary reason why I am starting this series of blogs is that I want to build systems where Go excels</p><ul><li>Distributed Task Queue like <a href="https://docs.celeryq.dev/en/stable/">Celery</a>. I think I will start with this one first.</li><li>Orchestrator like <a href="https://en.wikipedia.org/wiki/Kubernetes">Kubernetes</a> ( It is written in Go btw )</li><li>and idk we will see whatever sparks my mind🤓</li></ul><h3>How are you planning to learn and build these projects?</h3><p>Go has evolved since 2020 and ‘GET PROGRAMMING WITH GO’ is bit less relevant now. There are three books that I am intending to use to learn Go primarily.</p><ol><li><a href="https://bitfieldconsulting.com/books/love">FOR THE LOVE OF GO</a></li><li><a href="https://www.manning.com/books/go-in-practice">Go in Practice</a></li><li><a href="https://www.manning.com/books/learn-concurrent-programming-with-go?a_aid=cutajarj&amp;a_bid=4360d6bb">Learn Concurrent Programming with Go</a></li></ol><p>And obviously, I will use AI tools like Claude, GPT to understand stuff here and there. However, I will refrain from blindly copy pasting, and instead write every line of code myself.</p><blockquote>I cannot let AI tools make me dumber day by day..end of mini rant.</blockquote><p>That’s that for this announcement blog. I will see you in the next one where we start of with the fundamentals of Go. Bye!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=812fdb068852" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inferiority is NOT Inferiority Complex]]></title>
            <link>https://medium.com/@kathanvakharia/inferiority-is-not-inferiority-complex-b1cdcc7039b2?source=rss-97e2f5645cc5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1cdcc7039b2</guid>
            <category><![CDATA[competition]]></category>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[self-awareness]]></category>
            <dc:creator><![CDATA[Kathan Vakharia]]></dc:creator>
            <pubDate>Sat, 24 Jun 2023 13:39:20 GMT</pubDate>
            <atom:updated>2023-06-24T13:39:20.807Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone. I am Kathan. I am doing my post-graduation in Computer Science. After writing a fair bit of technical content on <a href="https://dev.to/kathanvakharia">dev.to</a>, I wanted to write blogs on general non-technical stuff. And that brings me here on Medium. Let’s see how it goes!</p><p>I have been reading the book “The Courage to be Disliked.” I am just a few chapters into the book, but it has given me some thought-provoking lessons. In this blog, I would like to shed some light upon the idea of Inferiority and WHY it’s not the same as Inferiority Complex!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*J63l_FE4Bm9eqfD9" /><figcaption>Photo by <a href="https://unsplash.com/de/@ianstauffer?utm_source=medium&amp;utm_medium=referral">Ian Stauffer</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Inferiority and Inferiority Complex are often used interchangeably, but are they really the same? Absolutely NOT. The inferiority Complex is a by-product of when an individual cannot handle the feeling of inferiority. In the world that we live in, everyone is bound to feel inferior, but how we react to it creates a difference.</p><p>The ideal way to react is to consider inferiority as a launchpad for success. It should be a trigger for your growth. Problems are just challenges, and luckily the challenge you’re experiencing right now has most likely been tackled by someone else in the past. So, you should look out for the solutions. It should lead you to the ‘pursuit of superiority.’</p><p>The destructive way to react is to make excuses about your circumstances. Using phrases that involve “IF ONLY” is the worst possible way to react when feeling inferior. For e.g., “IF ONLY I had a MacBook, I would succeed in academics. IF ONLY I had my personal room, I could create youtube videos.”,…</p><p>Focusing on achieving healthy growth is important rather than falling into the trap of the Inferiority Complex&#39;s sibling, the Superiority Complex. Unhealthy competition is a major cause of fabricated superiority. When someone constantly boasts about their past achievements, it&#39;s often a sign of deep-seated inferiority.</p><p>Healthy competitions are not bad. It’s a good way to excel in life. There’s a quote, “You are the only one worried about how you look” So next time you feel inferior, look out for solutions and, avoid the superiority complex trap, celebrate others’ happiness.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1cdcc7039b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>