<?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 Naveed Khosa on Medium]]></title>
        <description><![CDATA[Stories by Naveed Khosa on Medium]]></description>
        <link>https://medium.com/@naveedkhosa2006?source=rss-f2ab8aa5577d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*p1uFGxE6vW8FP5DpE-PMyQ.png</url>
            <title>Stories by Naveed Khosa on Medium</title>
            <link>https://medium.com/@naveedkhosa2006?source=rss-f2ab8aa5577d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:08:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@naveedkhosa2006/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[Demystifying Asymmetric Cryptography: From Chat Apps to Go Microservices]]></title>
            <link>https://medium.com/@naveedkhosa2006/demystifying-asymmetric-cryptography-from-chat-apps-to-go-microservices-a494d077ffc5?source=rss-f2ab8aa5577d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a494d077ffc5</guid>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[assymetric-encryption]]></category>
            <dc:creator><![CDATA[Naveed Khosa]]></dc:creator>
            <pubDate>Sat, 31 Oct 2026 12:33:46 GMT</pubDate>
            <atom:updated>2026-10-31T12:33:46.431Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever wondered how your data stays completely private when traveling across the untrusted infrastructure of the public internet? Or how modern chat apps like Signal and WhatsApp guarantee that not even their own servers can read your messages?</p><p>The answer lies in <strong>Asymmetric Cryptography</strong> (also known as Public-Key Cryptography).</p><p>In this article, we’ll break down exactly how this mind-bending math works using simple analogies, clear up common architectural misconceptions, and look at how to implement it correctly in Go.<br>The Core Concept: The Two-Key Rule</p><p>Unlike traditional symmetric encryption — where a single password locks and unlocks data — asymmetric cryptography uses a mathematically linked pair of distinct keys:</p><ul><li><strong>Public Key:</strong> Think of this as an open padlock. You can hand it out to absolutely anyone, publish it on your website, or throw it out into the world. It can <strong>only lock (encrypt)</strong> data.</li><li><strong>Private Key:</strong> This is the physical key that opens that padlock. You must keep it strictly secret. It can <strong>only unlock (decrypt)</strong> data.</li></ul><p>The Mailbox Analogy</p><p>Imagine a heavy-duty mailbox slot on a street corner. Anyone walking by can drop an envelope through the slot (Encryption with the Public Key). But once that letter falls inside, no one on the street can reach back in to grab it. Only the banker with the actual physical vault key (the Private Key) can open the door and read the letters (Decryption).</p><p>If an attacker intercepts an encrypted message mid-transit and tries to decrypt it with their own private key, <strong>the math fails.</strong> A private key cannot unlock data encrypted by someone else’s public key.</p><p>How It Works in Modern Chat Apps</p><p>As a layman using a chat app, you don’t have to generate keys manually. The application transforms your device into a personal keysmith seamlessly behind the scenes:</p><ol><li><strong>On Device Setup:</strong> The second you download a secure chat app, your phone’s processor generates a private key and a matching public key.</li><li><strong>The Lockdown:</strong> Your private key is buried deep inside your phone’s hardware security vault (like Apple’s Secure Enclave). It <em>never</em> leaves your device.</li><li><strong>The Upload:</strong> Your public key is uploaded to the chat platform’s central server and mapped directly to your account identity (like your phone number).</li></ol><p>When a friend messages you, their phone silently queries the server for your public key, encrypts the message locally, and ships it over. Only your physical device holds the secret key capable of turning that scrambled ciphertext back into text.</p><p>Because of this hardware tie, your keys are stuck to your device and application. If you switch to a brand new phone, your new device generates a totally new pair of keys, triggering that familiar notification to your friends: <em>“Your security code with this contact has changed.”</em></p><p>The Landscape: RSA, ECC, and Hashing</p><p>When implementing cryptography, it helps to understand the distinct building blocks available:</p><ul><li><strong>RSA vs. ECC:</strong> RSA is the reliable veteran of the internet, relying on the difficulty of factoring giant prime numbers. However, to stay secure today, RSA requires massive 3072-bit keys. Elliptic Curve Cryptography (ECC) uses the geometry of algebraic curves to achieve the exact same security wall with a tiny 256-bit key — making it exponentially faster and the default choice for modern mobile apps.</li><li><strong>Hashing vs. Encryption:</strong> While encryption is a two-way street (locking and unlocking), <strong>Hashing</strong> (like SHA-256) is a strict one-way function. It turns data into a fixed-size fingerprint that can never be reversed.</li><li><strong>Digital Signatures:</strong> A digital signature elegantly combines them both. By hashing a file and encrypting that hash backward with your <em>private</em> key, anyone using your <em>public</em> key can mathematically verify both your identity (authenticity) and that the file wasn’t altered in transit (integrity).</li></ul><p>The Architectural Trap: JWTs and Microservices</p><p>A common point of confusion among backend developers occurs when building JWT (JSON Web Token) authentication systems. Let’s look at a typical Go implementation using the popular golang-jwt/jwt/v5 package:</p><pre>// Inside an Auth package<br>token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)<br>tokenString, err := token.SignedString([]byte(secret))</pre><p>Look closely at <strong>HS256</strong> (HMAC using SHA-256). This is <strong>symmetric signing</strong>. It means your backend uses a single, shared string variable (JWT_SECRET) to both sign the token and validate it when a user returns.</p><p>If your backend is a simple monolithic application, this works perfectly fine. But what happens when your application grows into a <strong>Microservices Architecture</strong>?</p><h3><strong>The Microservice Advantage of Asymmetric Cryptography</strong></h3><p>If you stick to symmetric HS256 signing across microservices, <strong>every single microservice</strong> (Payment, Analytics, Shipping, Profile) must possess your secret JWT_SECRET string to verify incoming user requests. If a hacker compromises your low-security analytics service, they steal the secret string and gain the power to forge fake tokens for the entire ecosystem.</p><p>By switching your JWT architecture to asymmetric signing (like <strong>EdDSA</strong> or <strong>RS256</strong>), you unlock a massive architectural advantage:</p><ol><li>The <strong>Central Auth Service</strong> holds the <strong>Private Key</strong> completely isolated and safe. It uses this key to sign user tokens.</li><li>Every independent microservice is handed the <strong>Public Key</strong>.</li><li>When a microservice receives a token, it uses the public key to instantly verify that the Central Auth Service signed it.</li></ol><p>Even if a malicious actor completely breaches your Analytics database, they only obtain a public key. They remain entirely powerless to forge new tokens or manipulate data across the rest of your system.</p><h3><strong>Refactoring to Asymmetric EdDSA in Go</strong></h3><p>Transitioning your Go code from symmetric to asymmetric is straightforward. Here is how you can update your validation logic to strictly enforce asymmetric public-key checks using EdDSA:</p><pre>package auth<br><br>import (<br> &quot;fmt&quot;<br> &quot;os&quot;<br> &quot;://github.com&quot;<br>)<br><br>type Claims struct {<br> UserID string `json:&quot;user_id&quot;`<br> jwt.RegisteredClaims<br>}<br><br>func ValidateAsymmetricToken(tokenString string) (*Claims, error) {<br> // 1. Load the public key string from environment variables<br> publicKeyPEM := os.Getenv(&quot;JWT_PUBLIC_KEY&quot;)<br> <br> // 2. Parse it into an Ed25519 public key object<br> publicKey, err := jwt.ParseEdPublicKeyFromPEM([]byte(publicKeyPEM))<br> if err != nil {<br>  return nil, fmt.Errorf(&quot;failed to parse public key: %w&quot;, err)<br> }<br><br> // 3. Parse and validate the token<br> token, err := jwt.ParseWithClaims(tokenString, &amp;Claims{}, func(token *jwt.Token) (interface{}, error) {<br>  // Strict check: Enforce that the incoming token algorithm matches EdDSA<br>  if _, ok := token.Method.(*jwt.SigningMethodEd25519); !ok {<br>   return nil, fmt.Errorf(&quot;unexpected signing method: %v&quot;, token.Header[&quot;alg&quot;])<br>  }<br>  return publicKey, nil<br> })<br><br> if err != nil {<br>  return nil, fmt.Errorf(&quot;invalid token: %w&quot;, err)<br> }<br><br> if claims, ok := token.Claims.(*Claims); ok &amp;&amp; token.Valid {<br>  return claims, nil<br> }<br><br> return nil, fmt.Errorf(&quot;invalid token claims&quot;)<br>}</pre><h3>Conclusion</h3><p>Cryptography doesn’t have to be an opaque box of intimidating math formulas. By understanding the core directional flow of public and private keys, you can make better architectural decisions — ensuring your end-user applications remain safe on your device, and your backend microservices scale securely in production.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a494d077ffc5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Golang Concurrency: A 5-Layer Roadmap from Foundations to Production Systems]]></title>
            <link>https://medium.com/@naveedkhosa2006/mastering-golang-concurrency-a-5-layer-roadmap-from-foundations-to-production-systems-c5e7cb9cf2a7?source=rss-f2ab8aa5577d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5e7cb9cf2a7</guid>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[backend-development]]></category>
            <dc:creator><![CDATA[Naveed Khosa]]></dc:creator>
            <pubDate>Sat, 02 May 2026 16:34:10 GMT</pubDate>
            <atom:updated>2026-05-02T16:34:10.407Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XrUyXZqNVSdiuoQWcv6iHg.png" /><figcaption>Concurrency in Golang</figcaption></figure><p>Concurrency in Go is one of its greatest strengths — but also one of the most misunderstood areas for developers.</p><p>Many engineers learn how to launch goroutines or send data through channels, but very few develop a true systems-level understanding of concurrency. The result?</p><p>Code that works in small demos but breaks under production load.</p><p>Deadlocks. Race conditions. Goroutine leaks. Memory issues.</p><p>To truly master Go concurrency, you need structured progression.</p><p>This roadmap breaks Go concurrency into five layers — from absolute foundations to production-grade engineering.</p><h4>Why Most Developers Fail at Concurrency</h4><p>Most developers:</p><ul><li>Learn syntax before fundamentals</li><li>Overuse goroutines</li><li>Misuse channels</li><li>Ignore synchronization</li><li>Skip production concerns like cancellation and backpressure</li></ul><p>Concurrency is not about “doing multiple things at once.”</p><p>It’s about:</p><blockquote>Building safe, scalable, efficient systems.</blockquote><h4>Layer 1 — Foundations (Non-Negotiable)</h4><p>If this layer is weak, everything built on top becomes fragile.</p><h3>Core concepts:</h3><ul><li>Processes vs Threads</li><li>Concurrency vs Parallelism</li><li>Context switching cost</li><li>Race conditions</li><li>Memory visibility</li><li>Goroutines</li><li>Go scheduler basics (G-M-P model)</li></ul><h3>Critical takeaway:</h3><p>You must understand that concurrency introduces complexity — not free performance.</p><p>Skipping this layer leads to unpredictable production failures.</p><h3>Layer 2 — Core Primitives (The Heart of Go Concurrency)</h3><p>This is where real implementation begins.</p><h3>Must master:</h3><ul><li>goroutine</li><li>channel</li><li>Buffered vs unbuffered channels</li><li>Blocking behavior</li><li>select</li><li>sync.WaitGroup</li></ul><h3>Practical systems you should build:</h3><ul><li>Parallel API requests</li><li>Worker pools</li><li>Pipeline processing</li></ul><h3>Rule:</h3><p>If you cannot implement these from memory, your concurrency understanding is incomplete.</p><h3>Layer 3 — Synchronization &amp; Safety</h3><p>This layer is about correctness.</p><h3>Essential tools:</h3><ul><li>sync.Mutex</li><li>sync.RWMutex</li><li>sync.Once</li><li>sync/atomic</li><li>Go race detector (-race)</li></ul><h3>Critical decision:</h3><h3>Channels:</h3><p>For communication</p><h3>Mutex:</h3><p>For shared memory protection</p><p>Many developers confuse these and create unnecessary complexity.</p><p>Correct synchronization separates reliable systems from fragile ones.</p><h3>🌊 Layer 4 — Engineering Patterns</h3><p>This is where syntax becomes architecture.</p><h3>Production patterns:</h3><ul><li>Worker Pool</li><li>Fan-out / Fan-in</li><li>Pipeline architectures</li><li>Rate limiting</li><li>Timeout management</li><li>context.Context</li><li>Cancellation propagation</li></ul><h3>Why this matters:</h3><p>Without proper context handling, systems leak resources and fail silently.</p><p>This layer is where Go becomes a true backend engineering tool.</p><h3>🧨 Layer 5 — Production-Grade Concurrency</h3><p>This is where advanced engineers operate.</p><h3>Must understand:</h3><ul><li>Goroutine leaks</li><li>Deadlocks</li><li>Backpressure</li><li>Load shedding</li><li>Error propagation</li><li>Structured concurrency</li><li>Starvation</li><li>Fairness</li></ul><h3>Reality:</h3><p>Most developers never fully reach this layer.</p><p>But this is the difference between:</p><h3>Writing concurrent code</h3><p>and</p><h3>Engineering resilient distributed systems.</h3><h3>My Practical Implementation</h3><p>I’ve implemented code examples covering the first three layers in my GitHub repository, including:</p><ul><li>Goroutines</li><li>Channels</li><li>Worker pools</li><li>Mutexes</li><li>Race detection</li><li>Synchronization primitives</li></ul><h3>GitHub Repository:</h3><blockquote><a href="https://github.com/MRNaveed-stack/mastering-go-concurrency">https://github.com/MRNaveed-stack/mastering-go-concurrency</a></blockquote><h3>Recommended Learning Strategy</h3><h4>Study order:</h4><h4>First:</h4><p>Foundations</p><h4>Then:</h4><p>Primitives</p><h4>Then:</h4><p>Synchronization</p><h4>Then:</h4><p>Patterns</p><h4>Finally:</h4><p>Production resilience</p><h4>Final Thought</h4><p>Go concurrency is not about spawning thousands of goroutines.</p><p>It’s about:</p><h3>Building systems that remain correct, scalable, and maintainable under real-world load.</h3><p>Mastering concurrency means thinking like a systems engineer — not just a programmer.</p><p>If you approach it layer by layer, you’ll build backend systems that are faster, safer, and production-ready.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5e7cb9cf2a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick test: If I share a container image with you, whose RAM does it use?]]></title>
            <link>https://medium.com/@naveedkhosa2006/quick-test-if-i-share-a-container-image-with-you-whose-ram-does-it-use-1733dc1cac32?source=rss-f2ab8aa5577d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1733dc1cac32</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Naveed Khosa]]></dc:creator>
            <pubDate>Sun, 26 Apr 2026 17:27:15 GMT</pubDate>
            <atom:updated>2026-04-26T17:27:15.364Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*auZveq-JdH62s-glbwqxZQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OEl2w7gK0-aeHrE2jeqqow.jpeg" /></figure><blockquote>If you said “yours,” you’re right.<br>If you said “mine,” you just made the same mistake I did.<br>Let me break down why containers and virtual memory are completely different — even though both have “virtual” in their name.<br>CONTAINERS (Docker, etc.)<br>When I share a container image with you, I’m sharing a blueprint. Nothing more.<br>You run it on YOUR system:<br>• Your CPU does the processing<br>• Your RAM holds the data<br>• Your storage saves the files<br>• Your network makes the connections<br>The image is just the recipe. You bake the cake in your own oven, with your own ingredients.<br>This is why containers exploded in popularity. Same software, anywhere, using whatever resources you have locally.<br>VIRTUAL MEMORY<br>Virtual memory is different. It’s an OS trick happening inside your own machine.<br>Your computer has maybe 8GB of physical RAM. But every running process thinks it has its own private memory space:<br>• Process A thinks: “I have 4GB all to myself”<br>• Process B thinks: “I have 4GB all to myself”<br>• Process C thinks: “I have 4GB all to myself”<br>Same 8GB physical RAM. Just cleverly mapped and managed so processes don’t collide.<br>THE KEY INSIGHT<br>Containers = Share the recipe, run on your hardware<br>Virtual memory = Share the hardware, safely<br>Or as someone on Reddit put it: “Containers isolate execution environments. Virtual memory isolates address spaces.”<br>ONE MORE: VIRTUAL MACHINES<br>Since someone will ask — VMs are different from both:<br>Virtual machines virtualize entire hardware. Each VM runs its own complete OS, thinking it’s alone on dedicated hardware.<br>That’s why VMs are heavy (gigabytes, minutes to start) while containers are light (megabytes, seconds to start).<br>THE FULL STACK<br>Virtual memory → OS-level isolation for memory<br>Containers → OS-level isolation for everything (files, processes, network)<br>VMs → Hardware-level isolation for entire systems<br>WHY THIS MATTERS<br>Understanding these layers helps you:<br>• Debug performance issues (memory pressure or CPU contention?)<br>• Design better systems (container or VM?)<br>• Secure applications (what’s actually being isolated?)</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1733dc1cac32" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Built and Hosted a Full-Stack MERN Application for Free (And What “Production-Ready” Means in…]]></title>
            <link>https://medium.com/@naveedkhosa2006/how-i-built-and-hosted-a-full-stack-mern-application-for-free-and-what-production-ready-means-in-7828859c0477?source=rss-f2ab8aa5577d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7828859c0477</guid>
            <category><![CDATA[supabase]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[full-stack]]></category>
            <category><![CDATA[mern-stack]]></category>
            <category><![CDATA[free-hosting]]></category>
            <dc:creator><![CDATA[Naveed Khosa]]></dc:creator>
            <pubDate>Fri, 26 Dec 2025 09:09:03 GMT</pubDate>
            <atom:updated>2025-12-26T09:09:03.264Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I Built and Hosted a Full-Stack MERN Application for Free (And What “Production-Ready” Means in This Context)</h3><h3>Naveed Khosa</h3><p>As a computer science student, I wanted to answer a practical question:</p><blockquote>Can I design, deploy, and run a real full-stack web application using modern tools — without spending money?</blockquote><p>Not a tutorial demo.<br> Not a local project.<br> A <strong>live, publicly accessible system</strong> with authentication, database, and deployment constraints.</p><p>This article explains <strong>exactly how I built and hosted my MERN application for free</strong>, the tools I used, and the <strong>tradeoffs I consciously accepted</strong>.</p><p>🔗 <strong>Live Application:</strong></p><p><a href="https://my-e-commerce-z5c4.onrender.com/"><strong>https://my-e-commerce-z5c4.onrender.com/</strong></a></p><h3>High-Level Architecture</h3><p>The system consists of:</p><ul><li><strong>Frontend:</strong> React 18 + TypeScript</li><li><strong>Backend:</strong> Node.js + Express (TypeScript)</li><li><strong>Database:</strong> PostgreSQL</li><li><strong>Authentication:</strong> Supabase</li><li><strong>Database Hosting:</strong> Neon.tech</li><li><strong>App Hosting:</strong> Render.com</li><li><strong>Uptime Management:</strong> Cloudflare proxy</li><li><strong>Development Acceleration:</strong> Replit (agentic AI)</li></ul><p>All components run on <strong>free tiers</strong>.</p><h3>Frontend: Modern MERN Stack</h3><p>The frontend is built using:</p><ul><li>React 18 with TypeScript for type safety</li><li>TailwindCSS + shadcn/ui for consistent UI</li><li>Supabase client SDK for authentication</li></ul><p>Why this approach:</p><ul><li>Type safety reduces runtime errors</li><li>UI tooling speeds iteration without sacrificing structure</li><li>Clear upgrade path if the app grows</li></ul><p>No unnecessary libraries, no premature optimization.</p><h3>Backend: Express with Full Control</h3><p>The backend uses:</p><ul><li>Node.js + Express</li><li>TypeScript across the stack</li><li>REST APIs with clean separation of concerns</li></ul><p>Why Express:</p><ul><li>Minimal abstraction</li><li>Full middleware control</li><li>Easy integration with Supabase and PostgreSQL</li></ul><p>This backend is intentionally <strong>boring</strong> — because boring systems scale better.</p><h3>Authentication: Supabase</h3><p>Authentication is handled via <strong>Supabase Auth</strong>:</p><ul><li>User sign-up and login</li><li>Secure password handling</li><li>Token-based sessions</li></ul><p>Why I delegated auth:</p><ul><li>Rolling custom auth is risky</li><li>Supabase handles cryptography and session lifecycle</li><li>I validate tokens server-side before processing requests</li></ul><p>This is a <strong>conscious trust decision</strong>, not blind dependency.</p><h3>Database: PostgreSQL via Neon.tech</h3><p>I used <strong>Neon.tech</strong> for managed PostgreSQL:</p><ul><li>Real Postgres, not a simplified abstraction</li><li>Free tier with connection pooling</li><li>Easy schema evolution</li></ul><p>This separates authentication (Supabase) from application data (Neon), which improves flexibility.</p><h3>Hosting Everything for Free (The Hard Part)</h3><h3>Render.com</h3><p>Both frontend and backend are hosted on <strong>Render’s free tier</strong>.</p><p>Render has one major limitation:</p><blockquote><em>Free services </em><strong><em>sleep after ~15 minutes of inactivity</em></strong><em>.</em></blockquote><p>That causes cold starts and poor UX.</p><h3>Preventing Sleep: Cloudflare Proxy Strategy</h3><p>To mitigate Render’s sleep behavior:</p><ul><li>I placed the app behind <strong>Cloudflare</strong></li><li>A scheduled script sends a request every 30 minutes</li></ul><p>This keeps the service warm and reduces cold starts.</p><p>Is this enterprise-grade?<br> No.</p><p>Is it effective for free-tier hosting?<br> Yes.</p><p>This is a <strong>cost vs control tradeoff</strong>, not a claim of perfection.</p><h3>Using Replit &amp; Agentic AI (Honestly)</h3><p>I used Replit’s AI tooling to:</p><ul><li>Scaffold boilerplate</li><li>Speed up repetitive coding</li><li>Accelerate iteration</li></ul><p>What AI did <strong>not</strong> do:</p><ul><li>Decide architecture</li><li>Understand tradeoffs</li><li>Own production failures</li></ul><p>AI was a <strong>tool</strong>, not the engineer.</p><h3>What “Production-Ready” Means Here</h3><p>When I say <em>production-ready</em>, I mean:</p><h3>Included:</h3><ul><li>Live deployment</li><li>Real users</li><li>Auth + database</li><li>Public availability</li><li>Uptime considerations</li></ul><h3>Not Included (yet):</h3><ul><li>Advanced monitoring</li><li>Rate limiting</li><li>Load testing</li><li>Multi-region redundancy</li></ul><p>This system is <strong>production-capable within defined constraints</strong> — and I know exactly where it breaks.</p><h3>Demo Video</h3><p><a href="https://youtu.be/3HwxqBb98YQ">https://youtu.be/3HwxqBb98YQ</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7828859c0477" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top 5 Python Libraries Every Beginner Should Know in 2025]]></title>
            <link>https://medium.com/@naveedkhosa2006/top-5-python-libraries-every-beginner-should-know-in-2025-662c16751c23?source=rss-f2ab8aa5577d------2</link>
            <guid isPermaLink="false">https://medium.com/p/662c16751c23</guid>
            <category><![CDATA[learning-and-development]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[libraries]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Naveed Khosa]]></dc:creator>
            <pubDate>Fri, 23 May 2025 11:57:13 GMT</pubDate>
            <atom:updated>2025-05-23T11:57:13.449Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*TR_mkcLZ8gI9PCUr0czWug.jpeg" /></figure><h3>1. NumPy — The Foundation of Numerical Computing</h3><p>If you want to work with numbers, arrays, or matrices, <strong>NumPy</strong> is your go-to library. It’s the backbone of scientific computing in Python, letting you perform fast mathematical operations with ease.</p><ul><li><strong>Why learn it?</strong> Almost every data science and machine learning project starts with NumPy.</li><li><strong>Use cases:</strong> Handling large datasets, performing complex math, and preparing data for analysis.</li></ul><h3>2. Pandas — Your Data’s Best Friend</h3><p>Once you have data, you need to make sense of it. That’s where <strong>Pandas</strong> shines. It lets you manipulate and analyze data in a simple, readable way.</p><ul><li><strong>Why learn it?</strong> It turns messy data into clean, usable formats quickly.</li><li><strong>Use cases:</strong> Data cleaning, filtering, merging datasets, and basic statistics.</li></ul><h3>3. Matplotlib — Bring Your Data to Life</h3><p>Numbers are great, but visuals help tell the story. <strong>Matplotlib</strong> is the classic Python library for creating graphs and charts.</p><ul><li><strong>Why learn it?</strong> Visualizing data helps in understanding trends and presenting results.</li><li><strong>Use cases:</strong> Line charts, bar graphs, histograms, scatter plots, and more.</li></ul><h3>4. Requests — Making the Web Work for You</h3><p>Want your Python programs to talk to websites or APIs? <strong>Requests</strong> makes sending HTTP requests and handling responses ridiculously simple.</p><ul><li><strong>Why learn it?</strong> It’s essential for web scraping, working with APIs, and integrating online data.</li><li><strong>Use cases:</strong> Downloading data, accessing web services, automation tasks.</li></ul><h3>5. Flask — Build Your First Web App</h3><p>Ready to turn your Python scripts into web apps? <strong>Flask</strong> is a lightweight web framework perfect for beginners.</p><ul><li><strong>Why learn it?</strong> It’s simple to set up, yet powerful enough for real-world projects.</li><li><strong>Use cases:</strong> Creating websites, building APIs, prototyping applications.</li></ul><h3>A Quick Note</h3><p>Mastering these libraries will give you a solid foundation in Python programming. Don’t worry about learning everything at once — pick one, experiment with it, and build small projects. That’s the best way to learn.</p><p>If you want to dive deeper or need help with code examples for any of these libraries, feel free to reach out! You can connect with me on LinkedIn: <a href="https://www.linkedin.com/in/naveed-khosa-330345323/">https://www.linkedin.com/in/naveed-khosa-330345323/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=662c16751c23" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Built and Secured My Python Desktop App With a License Key System]]></title>
            <link>https://medium.com/@naveedkhosa2006/how-i-built-and-secured-my-python-desktop-app-with-a-license-key-system-775e93fa00d1?source=rss-f2ab8aa5577d------2</link>
            <guid isPermaLink="false">https://medium.com/p/775e93fa00d1</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[student-project]]></category>
            <category><![CDATA[license-key]]></category>
            <category><![CDATA[pyqt5]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Naveed Khosa]]></dc:creator>
            <pubDate>Fri, 16 May 2025 06:43:42 GMT</pubDate>
            <atom:updated>2025-05-16T06:43:42.672Z</atom:updated>
            <content:encoded><![CDATA[<p>As a computer science student, I wanted to build something that wasn’t just for practice — but also something I could sell. I ended up creating a desktop app using Python and PyQt5 for small retail businesses. But one major challenge came up: <strong>how do I protect it from being shared or used without a license?</strong></p><p>In this article, I’ll show you exactly how I added a <strong>simple license key system</strong> to protect my app — without using any paid service or advanced cryptography. If you’re building a real-world Python app and thinking of distributing it, this guide is for you.</p><h3>🔧 Tools &amp; Stack</h3><p>Here’s what I used:</p><ul><li><strong>Python</strong></li><li><strong>PyQt5</strong> (for GUI)</li><li><strong>SQLite</strong> (for basic internal data)</li><li><strong>.key file-based system</strong> for license validation</li><li><strong>PyInstaller</strong> (to generate .exe file for Windows)</li></ul><h3>🪜 Step-by-Step Guide</h3><h3>1. Designing the GUI with PyQt5</h3><p>I built the app interface using PyQt5. It includes:</p><ul><li>Login screen</li><li>Billing window</li><li>Product management section</li></ul><p>PyQt5 gave me full control over the layout and styling, and it worked great for a desktop experience</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*skKLbr7FyVjN2YlpCiJTZA.png" /></figure><h3>2. Creating a License Validator Script</h3><p>I wrote a simple Python script named license_validator.py. It checks if a file named license.key exists and reads the key inside. If it matches a valid key, the app launches. If not, it exits or shows an error message.</p><p>I kept valid keys either hardcoded in a list (for now) or checked against a small SQLite DB.</p><h3>3. Checking the .key File on App Launch</h3><p>In my main Python file (main.py), I added a function that runs before the GUI loads. It checks for the license.key file. If missing or invalid, the app doesn’t proceed.</p><p>Example:</p><p>def check_license():<br> try:<br> with open(“license.key”, “r”) as f:<br> key = f.read().strip()<br> if key in VALID_KEYS:<br> return True<br> except:<br> pass<br> return False</p><h3>4. Handling Invalid or Expired Keys</h3><p>I added logic to:</p><ul><li>Show a friendly message if the key is invalid</li><li>Optionally allow a <strong>trial period</strong> (with a timestamp saved in SQLite)</li><li>Prevent usage beyond expiry date</li></ul><h3>5. Packaging the App</h3><p>I used <strong>PyInstaller</strong> to generate an .exe file:</p><p>pyinstaller — onefile — windowed main.py</p><p>This bundles all code into one executable, which is what I send to clients. I place the license.key file in the same folder.</p><h3>🧱 Key Challenges &amp; Fixes</h3><h3>🔸 File Not Found Errors</h3><p>Sometimes users didn’t copy the license.key into the correct folder. I solved it by checking paths and showing clear errors.</p><h3>🔸 Bypassing Protection</h3><p>Anyone could open the .py file and remove the license logic. That’s why I always distribute only the .exe, not the .py files. PyInstaller helps, though it&#39;s not bulletproof.</p><h3>🔸 Multiple PC Use</h3><p>I thought about binding the key to a PC (using MAC address), but skipped it for now. That’s something I’ll explore in v2.</p><h3>🎓 What I Learned</h3><ul><li><strong>Security matters</strong> even in student projects.</li><li>Protecting your app boosts its value and makes it look professional.</li><li>You don’t need fancy services — even a .key file + logic can work.</li><li>Most importantly, <strong>building real software gave me confidence</strong> that I can sell my own tools, not just build them for grades.</li></ul><h3>✅ Final Thoughts &amp; Advice</h3><p>If you’re a student or beginner developer, try building <strong>complete apps</strong>, not just practice scripts. Add license protection, package them, and test with real users. You’ll learn 10x more than from theory.</p><p>If this article helped you — feel free to <strong>clap, share, or reach out</strong>. I’d love to hear your thoughts.</p><p>🔗<a href="https://github.com/MRNaveed-stack">https://github.com/MRNaveed-stack</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=775e93fa00d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>