<?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 Kavindu praneeth on Medium]]></title>
        <description><![CDATA[Stories by Kavindu praneeth on Medium]]></description>
        <link>https://medium.com/@kavindupraneeth8?source=rss-d218fdb3dfc8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zQQBJ2l-7vYfCZeU1VKU2Q.jpeg</url>
            <title>Stories by Kavindu praneeth on Medium</title>
            <link>https://medium.com/@kavindupraneeth8?source=rss-d218fdb3dfc8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 00:28:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kavindupraneeth8/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[Understanding Hashing in Cybersecurity: A Beginner-Friendly Guide]]></title>
            <link>https://medium.com/@kavindupraneeth8/understanding-hashing-in-cybersecurity-a-beginner-friendly-guide-8bdd367b9572?source=rss-d218fdb3dfc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/8bdd367b9572</guid>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[hashing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[datasecure]]></category>
            <category><![CDATA[hashing-algorithm]]></category>
            <dc:creator><![CDATA[Kavindu praneeth]]></dc:creator>
            <pubDate>Thu, 04 Jun 2026 04:39:44 GMT</pubDate>
            <atom:updated>2026-06-04T04:39:44.490Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LP4yyNjpeng0uB0_xNlMIQ.png" /></figure><h3>Introduction</h3><p>Have you ever wondered how websites keep your passwords secure without actually storing them? Or how you can verify that a downloaded file hasn’t been modified by a hacker?</p><p>The answer often involves a powerful cybersecurity concept called <strong>Hashing</strong>.</p><p>In this article, we’ll explore what hashing is, how it works, why it’s important, and where it’s used in real life.</p><h3>What is Hashing?</h3><p>A <strong>hash function</strong> takes any amount of input data and converts it into a fixed-size output called a <strong>hash value</strong>, <strong>message digest</strong>, or <strong>digital fingerprint</strong>.</p><p>Think of hashing like a fruit blender:</p><ul><li>You put fruits into the blender.</li><li>The blender creates a smoothie.</li><li>It is easy to make the smoothie.</li><li>But it’s practically impossible to turn the smoothie back into the original fruits.</li></ul><p>Hashing works similarly.</p><h3>Example</h3><p>Input:</p><pre>Hello World</pre><p>Possible Hash Output:</p><pre>a591a6d40bf420404a011733cfb7b190</pre><p>Even a tiny change in the input creates a completely different hash.</p><p>Input:</p><pre>hello World</pre><p>Output:</p><pre>fc5e038d38a57032085441e7fe7010b0</pre><p>Notice that changing just one letter completely changes the hash value.</p><h3>Why is Hashing Important?</h3><p>Hashing is mainly used for:</p><h3>1. Data Integrity</h3><p>Data integrity means ensuring that information has not been changed accidentally or intentionally.</p><p>Imagine downloading a software file from a website.</p><p>The website publishes the original hash:</p><pre>SHA-256:<br>7f83b1657ff1fc53b92dc18148a1d65d...</pre><p>After downloading, your computer calculates the file’s hash.</p><p>If both hashes match: File is unchanged</p><p>If they differ: File may be corrupted or modified</p><p>This is one of the most common uses of hashing.</p><h3>2. Authentication</h3><p>Hashing can also help verify identities when combined with secret keys and authentication protocols.</p><p>For example:</p><p>When logging into a system:</p><ol><li>User enters password.</li><li>System hashes the password.</li><li>Stored hash and entered hash are compared.</li><li>If they match, access is granted.</li><li>The actual password never needs to be stored.</li></ol><h3>One-Way Function: The Magic Behind Hashing</h3><p>Hash functions are designed as <strong>one-way functions</strong>.</p><p>This means:</p><ul><li>Easy to calculate the hash.</li><li>Extremely difficult to recover the original data from the hash.</li></ul><h3>Real-Life Analogy</h3><p>Imagine shredding a document into thousands of tiny pieces.</p><p>Shredding is easy.</p><p>Reconstructing the original document is extremely difficult.</p><p>Hashing works in a similar way.</p><h3>Can Hashing Encrypt Data?</h3><p>Many beginners think hashing and encryption are the same.</p><p>They are not.</p><p>EncryptionHashingCan be reversed with a keyCannot be reversedUsed to hide informationUsed to verify informationExample: AESExample: SHA-256</p><p>If you need to recover the original data later, use encryption.</p><p>If you only need to verify data integrity, use hashing.</p><h3>Limitations of Hashing</h3><p>Hashing is excellent for detecting accidental changes, but it has limitations.</p><p>Since anyone can calculate a hash, hashing alone cannot prove who created the data.</p><h3>Example Attack</h3><p>Suppose:</p><ul><li>Alice sends a file.</li><li>Attacker intercepts it.</li><li>Attacker modifies the file.</li><li>Attacker generates a new hash.</li></ul><p>The receiver sees a matching file and hash but cannot know the file was altered.</p><p>This is why additional security mechanisms are needed.</p><h3>Popular Hashing Algorithms</h3><h3>MD5 (Message Digest 5)</h3><p>MD5 was developed by Ron Rivest and produces a <strong>128-bit digest</strong>.<br>Example:</p><pre>Password123<br>↓<br>482c811da5d5b4bc6d497ffa98491e38</pre><p>Advantages:</p><ul><li>Fast</li><li>Simple</li></ul><p>Disadvantages:</p><ul><li>Vulnerable to collision attacks</li><li>Not recommended for modern security systems</li></ul><p>Today, MD5 is mostly used for non-critical integrity checks.</p><h3>SHA (Secure Hash Algorithm)</h3><p>SHA was developed by the U.S. National Institute of Standards and Technology (NIST).</p><p>Common versions include:</p><ul><li>SHA-224</li><li>SHA-256</li><li>SHA-384</li><li>SHA-512</li></ul><p>Among these, <strong>SHA-256</strong> is one of the most widely used today.</p><p>Example:</p><pre>Password123<br>↓<br>ef92b778bafe771e89245b89ecbc08a4...</pre><p>Benefits:</p><ol><li>More secure than MD5</li></ol><p>2. Larger hash values</p><p>3. Stronger protection against brute-force attacks</p><h3>What is HMAC?</h3><p>Hashing alone cannot verify who created the data.</p><p>To solve this problem, cybersecurity experts use <strong>HMAC (Hash-based Message Authentication Code)</strong>.</p><p>HMAC combines:</p><ul><li>A hash function</li><li>A secret key</li></ul><p>The output depends on both the message and the secret key.</p><h3>Real-Life HMAC Example</h3><p>Imagine Alice and Bob share a secret key:</p><pre>SecretKey123</pre><p>Message:</p><pre>Transfer Rs. 50,000</pre><p>HMAC creates:</p><pre>A1B2C3D4E5...</pre><p>If an attacker changes the message to:</p><pre>Transfer Rs. 500,000</pre><p>The HMAC changes completely.</p><p>Since the attacker doesn’t know the secret key, they cannot generate a valid HMAC.</p><p>This allows Bob to verify:</p><ul><li>The message wasn’t changed.</li><li>The message really came from Alice.</li></ul><p>This provides authenticity and helps prevent man-in-the-middle attacks.</p><h3>Where Do We Use Hashing Today?</h3><p>Hashing is everywhere:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yNlxoZV7IU41ZVPHcusQ-g.png" /></figure><h3>1.Password Storage</h3><p>When you create a password on a website:</p><pre>MyPassword123</pre><p>The website stores:</p><pre>SHA-256(MyPassword123)</pre><p>Instead of storing the actual password.</p><h3>2.Software Downloads</h3><p>Operating systems often publish SHA-256 checksums so users can verify downloaded files.</p><h3>3.Digital Signatures</h3><p>Digital signatures use hashing to verify document integrity and authenticity.</p><h3>4.Blockchain Technology</h3><p>Cryptocurrencies such as Bitcoin heavily rely on cryptographic hash functions to secure transactions.</p><h3>Why Key Management Matters</h3><p>Even the strongest encryption or hashing system can fail if keys are poorly managed.</p><p>Important key management activities include:</p><ul><li>Key Generation</li><li>Key Verification</li><li>Key Storage</li><li>Key Exchange</li><li>Key Revocation</li><li>Key Destruction</li></ul><h3>Simple Example</h3><p>Imagine a company uses a secret key for secure communication.</p><p>If an employee leaks that key:</p><ol><li>The key must be revoked.</li><li>A new key must be generated.</li><li>The old key must be securely destroyed.</li></ol><p>This prevents attackers from continuing to use the compromised key.</p><h3>Final Thoughts</h3><p>Hashing is one of the fundamental building blocks of cybersecurity.</p><p>It helps ensure:</p><ul><li>Data Integrity</li><li>Authentication</li><li>Secure Password Storage</li><li>File Verification</li></ul><p>While algorithms like MD5 played an important role in the past, modern systems rely more on SHA-256 and HMAC-based approaches for stronger security.</p><p>The next time you log into a website, verify a downloaded file, or make an online transaction, there’s a good chance hashing is working behind the scenes to keep your data safe.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8bdd367b9572" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[World Wide Web vs Semantic Web: The Difference Explained Simply (With Easy Examples)]]></title>
            <link>https://medium.com/@kavindupraneeth8/world-wide-web-vs-semantic-web-the-difference-explained-simply-with-easy-examples-bbaa5b2234f5?source=rss-d218fdb3dfc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbaa5b2234f5</guid>
            <category><![CDATA[www]]></category>
            <category><![CDATA[semanticweb]]></category>
            <category><![CDATA[semantic-search]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[world-wide-web]]></category>
            <dc:creator><![CDATA[Kavindu praneeth]]></dc:creator>
            <pubDate>Fri, 16 Jan 2026 14:13:04 GMT</pubDate>
            <atom:updated>2026-01-16T14:13:04.221Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aqOL2PjJ7zc1cS4s.png" /></figure><p>The internet has become a daily part of our lives. We search on Google, read blogs, watch videos, and use social media every day. But have you ever wondered how the web actually understands what you are searching for?</p><p>This is where the difference between the World Wide Web (WWW) and the Semantic Web becomes important.</p><p>In this article, I’ll explain the difference in very simple terms, using real-life examples that anyone can understand — even if you are completely new to this topic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Sp_WyY0BpU09P52B" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*W23VWn4vRvv1fUKc.png" /></figure><h3>What is the World Wide Web (WWW)?</h3><p>The <strong>World Wide Web (WWW)</strong> is the traditional web that we all use today.</p><h3>Key idea:</h3><p><strong>The WWW is designed for humans, not for computers to understand meaning.</strong></p><p>Web pages on the WWW contain:</p><ul><li>Text</li><li>Images</li><li>Videos</li><li>Links</li></ul><p>Computers can <strong>display</strong> this content, but they <strong>do not truly understand what it means</strong>.</p><h3>Simple Example: Searching on Google</h3><p>Imagine you search for the word:Apple</p><p>What happens?</p><p>Google may show:</p><ul><li>Apple (fruit)</li><li>Apple Inc. (company)</li><li>iPhone</li><li>Apple nutrition facts</li></ul><p>The search engine does not fully understand what you want.<br>It simply matches <strong>keywords</strong>.</p><p><strong>You</strong>, the human, must choose the correct result.</p><h3>In short:</h3><ul><li>WWW stores information</li><li>Humans understand meaning</li><li>Machines only read text</li></ul><h3>What is the Semantic Web?</h3><p>The Semantic Web is an advanced version of the web.</p><h3>Key idea:</h3><p>The Semantic Web is designed for computers to understand meaning, not just text.</p><p>In the Semantic Web:</p><ul><li>Data is structured</li><li>Relationships are defined</li><li>Meaning is clearly described</li></ul><p>This allows machines to:</p><ul><li>Understand context</li><li>Connect related information</li><li>Give more accurate results</li></ul><h3>Simple Example: Smarter Search</h3><p>If you search: Apple fruit calories</p><p>The Semantic Web understands:</p><ul><li>Apple = <strong>Fruit</strong></li><li>Calories = <strong>Nutrition</strong></li><li>Not Apple Inc.</li></ul><p>Result:</p><ul><li>Correct calorie data</li><li>Related healthy food suggestions</li><li>No company-related results</li></ul><p>This happens because the data has <strong>meaning attached to it</strong>.</p><h3>Real-Life Analogy (Very Easy to Understand)</h3><h3>World Wide Web = Normal Library</h3><ul><li>Books without proper labels</li><li>You must open each book to understand it</li><li>Time-consuming and confusing</li></ul><h3>Semantic Web = Smart Digital Library</h3><ul><li>Books have categories and tags</li><li>Relationships are defined</li><li>The system helps you find exactly what you need</li></ul><h3>Why is the Semantic Web Important?</h3><p>The Semantic Web enables many modern technologies, such as:</p><ul><li>AI Chatbots</li><li>Google Knowledge Panels</li><li>Smart Assistants (Siri, Alexa)</li><li>Healthcare decision systems</li><li>Recommendation engines</li></ul><p>Without the Semantic Web, <strong>AI would not be smart</strong> — it would only match keywords like the old web.</p><h3>How the Semantic Web Works (Simple View)</h3><p>The Semantic Web uses:</p><ul><li><strong>Ontologies</strong> → Define concepts</li><li><strong>Relationships</strong> → Connect data</li><li><strong>Metadata</strong> → Describe meaning</li></ul><p>This allows machines to answer questions like:</p><ul><li>“Which fruits are good for diabetics?”</li><li>“Which movies are directed by the same person?</li><li>“Which student passed all exams?”</li></ul><h3>One-Sentence Difference</h3><blockquote><strong><em>The World Wide Web is a web of documents, while the Semantic Web is a web of meaningful data.</em></strong></blockquote><blockquote><strong><em>The World Wide Web is a web of documents, while the Semantic Web is a web of meaningful data.</em></strong></blockquote><h3>Final Thoughts</h3><p>The World Wide Web helped us <strong>access information</strong>.<br>The Semantic Web helps machines <strong>understand information</strong>.</p><p>As we move toward AI-driven systems, the Semantic Web plays a <strong>critical role</strong> in making the internet smarter, more accurate, and more useful.</p><p>If you are learning:</p><ul><li>Artificial Intelligence</li><li>Data Science</li><li>Ontologies</li><li>Information Systems</li><li>Semantic Technologies</li></ul><p>👉 Understanding this difference is <strong>essential</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbaa5b2234f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Beginner’s Guide to RDF Graphs and Turtle Syntax: Unlocking the Semantic Web]]></title>
            <link>https://medium.com/@kavindupraneeth8/a-beginners-guide-to-rdf-graphs-and-turtle-syntax-unlocking-the-semantic-web-364617f87e7d?source=rss-d218fdb3dfc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/364617f87e7d</guid>
            <category><![CDATA[rdf]]></category>
            <category><![CDATA[semanticweb]]></category>
            <category><![CDATA[ontology]]></category>
            <category><![CDATA[turtles]]></category>
            <category><![CDATA[protege]]></category>
            <dc:creator><![CDATA[Kavindu praneeth]]></dc:creator>
            <pubDate>Tue, 16 Dec 2025 04:57:45 GMT</pubDate>
            <atom:updated>2025-12-16T04:57:45.494Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*2y7G8N5yF_wetMPXIPReOg.jpeg" /></figure><p>In the world of data and computing, making information machine-readable and interconnected is key to building smarter applications. This guide, inspired by foundational lectures on ontologies, RDF, and OWL, will walk you through the basics of RDF (Resource Description Framework) graphs and Turtle syntax. Whether you’re a student preparing for exams or a curious beginner, we’ll break it down step by step, incorporating concepts from ontology introductions, RDF schemas, and tools like Protégé. Let’s dive in and explore how these technologies power the Semantic Web.</p><h4>What is Ontology and Why Does It Matter?</h4><p>Ontology in computing is a way to represent knowledge about a domain in a structured, logical format that computers can process. An ontology captures concepts and relationships, like in the African Wildlife Ontology (AWO): “Giraffes eat leaves and twigs,” “Giraffes are herbivores,” and “Herbivores are animals.” This can be represented in various ways, from first-order predicate logic to graphical diagrams.</p><p>Fundamentally, ontologies help machines understand human-like knowledge, enabling applications in search engines, AI, and data integration.</p><h4>Introducing RDF: The Foundation of Structured Data</h4><p>RDF is a formal language for describing structured information. Its goal is to enable applications to exchange data on the Web while preserving meaning, making it the basic format for the Semantic Web. First published by W3C in 1999 for metadata (e.g., authorship, copyright), it expanded in 2004 to broader semantics.</p><p>Today, RDF is used in tools like programming libraries, triple stores for large datasets, and even commercial databases with RDF extensions. It’s widely applied in web news syndication (RSS 1.0), Adobe XMP for PDF metadata, and SVG for vector graphics annotations.</p><p>RDF represents data as a directed graph — a set of nodes linked by arrows — rather than trees, allowing flexible, non-hierarchical relationships.</p><h4>RDF Triples: The Core Building Blocks</h4><p>At its heart, RDF uses triples: simple statements in the form of Subject-Predicate-Object.</p><p>- Subject: The resource being described (e.g., a URI like <a href="http://example.org/Alice">http://example.org/Alice</a>).<br>- Predicate: The property or relationship (e.g., <a href="http://example.org/knows">http://example.org/knows</a>).<br>- Object: The value or another resource (e.g., <a href="http://example.org/Bob">http://example.org/Bob</a>).</p><p>This forms facts like “Alice knows Bob.” Triples combine to create graphs, where nodes are subjects/objects and edges are predicates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*WhE0MyuFQTdY86_YHRX03Q.png" /></figure><p>From the exam paper example: For “Dr. Silva treats the patient P001,” the triple is:<br>- Subject: &lt;<a href="http://example.org/DrSilva">http://example.org/DrSilva</a>&gt;<br>- Predicate: &lt;<a href="http://example.org/treats">http://example.org/treats</a>&gt;<br>- Object: &lt;<a href="http://example.org/P001">http://example.org/P001</a>&gt;</p><h4>Why Graphs Over Trees? RDF’s Flexible Structure</h4><p>Trees are hierarchical and ideal for strict organization, but real-world data often has multiple relationships. Graphs allow cycles, shared nodes, and complex links — perfect for the Semantic Web.</p><p>For instance, a book can link to multiple authors, publishers, and reviews without fitting a single tree branch. This makes RDF great for describing resources that aren’t purely hierarchical.</p><h4>Turtle Syntax: A Human-Friendly Way to Write RDF</h4><p>Turtle is a compact syntax for RDF, making it easier to read and write than XML. It uses prefixes to shorten URIs and symbols like semicolons (;) for reusing subjects and commas (,) for multiple objects.</p><p>Simple Example:</p><pre>@prefix ex: &lt;http://example.org/&gt; .<br>ex:Alice ex:knows ex:Bob ;<br> ex:age &quot;25&quot; .</pre><ul><li>This creates two triples:</li></ul><p>Triples</p><ul><li>ex:Alice ex:knows ex:Bob .</li><li>ex:Alice ex:age “25” .</li></ul><p>Graphs</p><ul><li>Alice → knows → Bob</li><li>Alice → age → “25”</li></ul><p>Another Example with Multiple Objects (using comma):</p><pre>@prefix ex: &lt;http://example.org/&gt; .<br><br>ex:Alice ex:knows ex:Bob , ex:Charlie .</pre><p>Triples</p><ul><li>ex:Alice ex:knows ex:Bob .</li><li>ex:Alice ex:knows ex:Charlie .</li></ul><p>Graph:</p><ul><li>Alice → knows → Bob</li><li>Alice → knows → Charlie</li></ul><h4>Getting Started with Protégé: Building Your First Ontology</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D6qqhm_Oou3bpY3m8SWBxQ.png" /></figure><p>From the Protégé tutorial (Edition 3.2 by Michael DeBellis), Protégé is a free tool for OWL ontologies. Chapters cover named classes, reasoners, property restrictions, and more — like creating a Pizza ontology with toppings hierarchies.</p><p>Key sections: Using a Reasoner (p.15), OWL Properties (p.22), Domains and Ranges (p.26), Existential Restrictions (p.31).</p><p>Download Protégé to experiment — it’s user-friendly for beginners.</p><p><a href="https://protege.stanford.edu/">https://protege.stanford.edu/</a></p><h4>Conclusion: Step Into the Semantic Web</h4><p>RDF graphs and Turtle syntax are gateways to ontologies and the Semantic Web, where data gains meaning. From simple triples to OWL’s logical models, these tools enable powerful applications. Practice with examples, explore Protégé, and you’ll be building knowledge representations in no time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=364617f87e7d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Everyone Talks About “The Cloud” (And What It Really Is)]]></title>
            <link>https://medium.com/@kavindupraneeth8/why-everyone-talks-about-the-cloud-and-what-it-really-is-1fb66411d82c?source=rss-d218fdb3dfc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/1fb66411d82c</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[gcp]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Kavindu praneeth]]></dc:creator>
            <pubDate>Sat, 13 Dec 2025 04:55:04 GMT</pubDate>
            <atom:updated>2025-12-13T04:55:04.344Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q4TrFiFeIuxGHdX5u-eLvg.png" /></figure><p>Almost every product pitch, startup deck, or tech talk today mentions “the cloud,” but many people still think it’s just “someone else’s computer.” For students, junior developers, and early-stage founders, understanding cloud computing is now as fundamental as understanding the internet itself</p><p>This article breaks cloud computing down using real-world analogies and practical examples, without assuming deep technical background. By the end, you will know what the cloud is, why it replaced traditional servers, and how IaaS, PaaS, and SaaS actually change the way products are built and shipped.</p><h3>From Owning Servers To Renting Power</h3><p>Think about how people used to listen to music. First you bought CDs, then you downloaded MP3s, and now you stream on Spotify without owning any songs. Computing followed a similar journey.</p><p>In traditional on-premise setups, companies bought physical servers, set up data centers, hired IT staff, and took weeks or months to deploy a new application. It meant high upfront cost, slow experimentation, and painful upgrades.</p><p>Cloud computing flips this model:</p><ul><li>You rent computing resources (virtual machines, storage, databases) from providers like AWS, Azure, or Google Cloud.</li><li>You pay only for what you use instead of investing heavily upfront.</li><li>You can deploy an application in minutes instead of waiting for new hardware.</li><li>For learners and small teams, this means you can build production-grade projects without owning a single server.</li></ul><h3>A Simple Definition That Actually Makes Sense</h3><p>Formal definitions describe cloud computing as on-demand network access to a shared pool of configurable resources that can be rapidly provisioned and released with minimal management effort. That sounds complex, so let’s simplify.</p><p>Cloud computing means:</p><ul><li>Computing is delivered as a service over the internet.</li><li>Resources are elastic, so you can scale them up or down instantly.</li><li>You share large data centers with other users but stay logically isolated and secure.</li><li>In practice, that might look like spinning up an EC2 instance on AWS, deploying an app on Heroku, or collaborating in Google Docs — all without touching any physical hardware.</li></ul><h3>How We Got Here: Clusters, Grids, Utilities, Cloud</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*yKuKglobWyJwHwcB5PKBuw.png" /></figure><p>If you like understanding “how” things evolved, the history is interesting and helps you see why cloud is more than rebranding.</p><ul><li>Cluster computing: Many similar machines in one place working together for parallel processing inside a single organization.</li><li>Grid computing: Different organizations sharing distributed, heterogeneous resources over a network, but with complex management overhead.</li><li>Utility computing: Computing as a metered service, similar to electricity — pay only for what you consume.</li><li>Cloud computing: Combines virtualization, internet-scale access, automated management, and service-based delivery (IaaS, PaaS, SaaS) into a cohesive platform.</li></ul><p>Cloud is popular today because it bundles technical capabilities with a business model that works for everyone from solo developers to global enterprises.</p><h3>Deployment Models: Picking Where Your Cloud Lives</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L_7fiy784k_To0fIVlI0xA.png" /></figure><p>When people say “we’re on the cloud,” they might be using very different setups. Cloud deployment models define where your resources live and who can access them.</p><ul><li>Public cloud: Run by providers and open to anyone willing to pay, with massive scale and lower costs per user. Ideal for startups, experiments, and SaaS products.</li><li>Private cloud: Dedicated to a single organization, usually behind strict firewalls, often used in banking, healthcare, or government where regulation is high.</li><li>Hybrid cloud: Mixes public and private cloud so you can keep sensitive data in a private environment while using public cloud for scalable workloads like analytics or web apps.</li><li>Community cloud: Shared by organizations with similar needs (for example, several universities or hospitals).</li></ul><p>As a student or junior dev, you will most often interact with the public cloud, but understanding the others helps when discussing architecture with more experienced engineers.</p><h3>The Three Big Service Models: IaaS, PaaS, SaaS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yneC4FbTCG1PVTVb7vJANw.png" /></figure><p>A lot of confusion disappears once you understand the three core cloud service models. They differ mainly in how much you manage versus how much the provider manages.</p><p>How to think about them:</p><ul><li>IaaS (Infrastructure as a Service): “Give me virtual machines and networks; I’ll handle everything above.”</li><li>PaaS (Platform as a Service): “Give me a place to run my code; don’t make me manage servers or runtimes.”</li><li>SaaS (Software as a Service): “Give me a complete app; I’ll just log in and use it.”</li></ul><p>For early-career developers, PaaS and SaaS are great for productivity, while IaaS teaches you low-level control and architecture.</p><h3>What Makes Cloud “Cloud”: Key Characteristics</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pos3bRgDFlMkwnPsN8bldw.png" /></figure><p>Cloud providers follow a set of core principles that define modern cloud behavior.</p><ul><li>On-demand self-service: You can create servers, storage, or databases via a web console or API without waiting for a human approval chain.</li><li>Broad network access: Services are reachable over the internet from phones, laptops, or tablets using standard protocols.</li><li>Resource pooling and multi-tenancy: Many customers share large pools of resources, but isolation keeps their workloads separate and secure.</li><li>Rapid elasticity: Resources scale up during peak traffic (for example, a sale or viral event) and scale down afterward, often automatically.</li><li>Measured service: Usage is monitored and billed per compute hour, gigabyte of storage, or number of API calls.</li></ul><p>These features underpin the business value of cloud: fine-grained control, fast response to change, and costs that track real usage.</p><h3>Why Cloud Matters For Your Career And Projects</h3><p>For beginners and junior developers, cloud computing is not just another buzzword; it is the environment where most real-world software lives today.</p><p>Here is why it matters:</p><ul><li>Cost and access: A student can deploy a global app with free tiers instead of needing a company-sized budget.</li><li>Speed: You can iterate quickly, deploy changes continuously, and learn modern DevOps practices early.</li><li>Scalability: If your side project unexpectedly goes viral, cloud infrastructure can scale without you rebuilding everything from scratch.</li><li>Collaboration: Cloud-based tools (from code repos to office suites) let distributed teams work as if they were in the same room.</li></ul><p>If you are planning a career in software engineering, data science, AI, or tech entrepreneurship, understanding the basics of cloud models, deployment types, and core characteristics is now part of the fundamentals.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1fb66411d82c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why We Wait: A Simple Guide to the M/M/1 Queuing Model]]></title>
            <link>https://medium.com/@kavindupraneeth8/why-we-wait-a-simple-guide-to-the-m-m-1-queuing-model-575da2debc2d?source=rss-d218fdb3dfc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/575da2debc2d</guid>
            <category><![CDATA[fcf]]></category>
            <category><![CDATA[queue-theory]]></category>
            <category><![CDATA[queue]]></category>
            <category><![CDATA[queue-management]]></category>
            <category><![CDATA[mm1model]]></category>
            <dc:creator><![CDATA[Kavindu praneeth]]></dc:creator>
            <pubDate>Fri, 12 Dec 2025 02:55:13 GMT</pubDate>
            <atom:updated>2025-12-12T02:55:13.893Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eKItOzsGLIpmTISQrukKyw.jpeg" /></figure><p>Have you ever stood in a long line at a grocery store or waited on hold for a customer service agent, wondering if there is a science behind the wait? There is. It is called <strong>Queuing Theory</strong>, and it helps businesses estimate how long you will wait and decide how many staff members they need.</p><p>One of the most fundamental models in this field is the <strong>M/M/1 Model</strong>. It might sound complex, but it is actually a simple way to predict how a single line works. Let’s break it down into plain English.</p><h3>What Does “M/M/1” Mean?</h3><p>The name M/M/1 is a code that describes the system’s three main parts:</p><ol><li><strong>First “M” (Arrivals):</strong> This stands for “Memoryless” (or Markovian). It assumes that customers arrive randomly, but at a predictable average rate. We usually describe this using a <strong>Poisson Distribution</strong>.</li><li><strong>Second “M” (Service):</strong> This also stands for “Memoryless.” It assumes the time it takes to serve a customer varies but follows an average pattern, described by an <strong>Exponential Distribution</strong>.</li><li><strong>“1” (Server):</strong> This simply means there is only <strong>one</strong> person or machine serving the customers.</li></ol><p>In short: <strong>Random Arrivals + Random Service Times + One Server = M/M/1.</strong></p><h3>The Key Variables</h3><p>To calculate how busy a system is, we need two numbers:</p><ul><li><strong>(Lambda):</strong> The arrival rate (e.g., 2 patients per hour).</li><li><strong>(Mu) :</strong> The service rate (e.g., the doctor can treat 3 patients per hour).</li></ul><p>From these two numbers, we can calculate everything else.</p><h3>The Magic Formulas</h3><p>Here are the four “Magic Formulas” managers use to check if their system is working well. Note that we first calculate <strong>Rho</strong>, which is the utilization factor (how busy the server is).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/177/1*VpeAOyZZdwHJkXEkRs0Z3w.png" /></figure><p>If rho is less than 1, the system is stable. If it is greater than or equal to 1, the line will grow forever!.</p><p>1. Average number of customers in the system (L):</p><p>(This includes the person being served and those waiting)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/172/1*Ib-eMcgbAYYASP3JkZhRtg.png" /></figure><p>2. Average time a customer spends in the system (W):</p><p>(Wait time + Service time)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/171/1*UJ6A3N_DOfrsbwSvp0x43A.png" /></figure><p>3. Average number of customers waiting in line (L_q):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/236/1*6d5zeMpLs5FBP-109Zq2ew.png" /></figure><p>4. Average time waiting in the line (W_q):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/222/1*Yglk32kKE6GfJwuZYcOxhg.png" /></figure><h3>Real-World Example: The Hospital ER</h3><p>Let’s look at a real scenario involving an Emergency Room (ER) to see these formulas in action.</p><p><strong>The Scenario:</strong></p><ul><li>Patients arrive at the ER randomly at a rate of <strong>lambda = 2$ patients per hour</strong>.</li><li>A single doctor can treat patients at an average rate of <strong>mu = 3$ patients per hour</strong>.</li></ul><p><strong>The Questions:</strong></p><ol><li>How busy is the doctor?</li><li>How long will a patient wait in the lobby before seeing the doctor?</li></ol><p><strong>The Solution:</strong></p><p>Step 1: Calculate Utilization</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/1*v1yW7v_eiC8zT45FajbMMg.png" /></figure><p>The doctor is busy 67% of the time. Since this is less than 100%, the system can handle the traffic15.</p><p>Step 2: Calculate Waiting Time in the Queue (W_q)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*poCbNHVqISXyobqy--3jmg.png" /></figure><p>So, the average wait time is <strong>40 minutes</strong>16.</p><p>Step 3: Calculate Total Time in the ER (W)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/239/1*AowrkqxWlnionHqVkcltXA.png" /></figure><p>A patient spends about <strong>1 hour</strong> total in the hospital (40 minutes waiting + 20 minutes with the doctor).</p><h3>Test Your Knowledge: The University Help Desk</h3><p>Now it’s your turn. Try to solve this problem derived from a university computer lab scenario.</p><h3>The Problem</h3><p>A university help desk has <strong>one server</strong> (student assistant).</p><ul><li><strong>Arrivals (lambda):</strong> Students arrive at a rate of <strong>15 per hour</strong>.</li><li><strong>Service (mu):</strong> The assistant can help <strong>20 students per hour</strong>.</li></ul><p><strong>Calculate the following:</strong></p><ol><li>What is the average utilization of the server ?</li><li>What is the average number of students in the system (L)?</li><li>What is the average number of students waiting in line (L_q)?</li></ol><p><em>(Scroll down for the answers!)</em></p><p>…</p><p>…</p><p>…</p><h3>The Answers</h3><p>1. Average Utilization :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/203/1*CcpcmtmDcW87hXt6RjGZDA.png" /></figure><p><strong>Answer:</strong> The server is busy <strong>75%</strong> of the time20.</p><p>2. Average Number of Students in the System (L):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*5QQN3LYm8LobVPJ1Yz185Q.png" /></figure><p><strong>Answer:</strong> On average, there are <strong>3 students</strong> in the area (waiting or being helped).</p><p>3. Average Number of Students Waiting in Line (L_q):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*1kJkWdH7OkoBrhz9uNsEqw.png" /></figure><p><strong>Answer:</strong> On average, <strong>2.25 students</strong> are waiting in line.</p><h3>Conclusion</h3><p>The M/M/1 model is a powerful tool for managers. By knowing just the arrival rate and the service rate, you can predict if customers will be happy or frustrated. In our examples, we saw that even if the server is faster than the arrivals (like the doctor treating 3/hr vs 2/hr arriving), there is still a significant wait time. That is the paradox of queuing!</p><p><strong><em>Second Part M/M/c with next Article</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=575da2debc2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding localStorage vs. sessionStorage: Key Differences and Use Cases]]></title>
            <link>https://medium.com/@kavindupraneeth8/understanding-localstorage-vs-sessionstorage-key-differences-and-use-cases-de167e4019ee?source=rss-d218fdb3dfc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/de167e4019ee</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[localstorage]]></category>
            <category><![CDATA[webdev]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[sessionstorage]]></category>
            <dc:creator><![CDATA[Kavindu praneeth]]></dc:creator>
            <pubDate>Mon, 31 Mar 2025 08:15:57 GMT</pubDate>
            <atom:updated>2025-03-31T08:48:10.624Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mfHIX-zUxTqnFbGaaWmUvA.png" /></figure><p>When building web applications, one of the key concerns is storing and managing data on the client side. While server-side databases and APIs are used to store permanent data, browsers provide built-in mechanisms to store data locally in a user’s device. Two popular methods for local storage in the browser are localStorage and sessionStorage. Although they may seem similar at first glance, they serve different purposes and come with their own unique features.</p><p>In this article, we’ll explore what localStorage and sessionStorage are, how they differ from each other, and when to use each one in your web development projects.</p><h3>What is localStorage?</h3><p>localStorage is a web API that allows you to store data on a client’s device in a persistent way. Data stored in localStorage is saved across browser sessions, meaning it is retained even after the browser is closed and reopened, or when the page is refreshed. This makes localStorage ideal for storing user preferences, authentication tokens, or other non-sensitive data that needs to persist between sessions.</p><h4>Key Features of localStorage:</h4><ul><li><strong>Persistence</strong>: Data stored in localStorage will remain available until explicitly deleted by the user or the application. It persists even when the browser is closed and reopened.</li><li><strong>Scope</strong>: The data is available across all tabs and windows opened from the same domain.</li><li><strong>Storage Capacity</strong>: Most modern browsers allow approximately <strong>5MB</strong> of data to be stored in localStorage per domain.</li><li><strong>Security</strong>: While localStorage is convenient for storing non-sensitive data, it is <strong>not encrypted</strong>. Therefore, it should not be used for storing sensitive information such as passwords or credit card numbers.</li></ul><h4>Example Usage of localStorage:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*rCwJMs2rWWBpBfk1ja4tXg.png" /><figcaption>localstorage</figcaption></figure><p>localStorage is particularly useful for scenarios where data needs to be available on multiple pages or sessions without the need for server communication. Common use cases include:</p><ul><li>Storing a user’s theme preference (light/dark mode).</li><li>Saving authentication tokens or session IDs.</li><li>Remembering a user’s settings or preferences (e.g., language, layout).</li></ul><h3>What is sessionStorage?</h3><p>sessionStorage is another web API that allows you to store data on the client side. However, unlike localStorage, the data stored in sessionStorage is only available for the duration of a single browser session. As soon as the user closes the browser tab or window, all data stored in sessionStorage is lost.</p><h4>Key Features of sessionStorage:</h4><ul><li><strong>Persistence</strong>: Data in sessionStorage only lasts for the duration of the page session. A page session begins when a user opens a new tab or window and ends when the tab or window is closed.</li><li><strong>Scope</strong>: The data is only accessible within the same tab or window. If the user opens a new tab or window, the data is not shared across them.</li><li><strong>Storage Capacity</strong>: Just like localStorage, browsers generally allow <strong>5MB</strong> of data per domain in sessionStorage.</li><li><strong>Security</strong>: Like localStorage, sessionStorage is not encrypted, so it should not be used for storing sensitive information.</li></ul><h4>Example Usage of sessionStorage:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2T5Ib43bRwHL3mKERBI9MA.png" /><figcaption>session storage methods</figcaption></figure><p>sessionStorage is often used for situations where the data only needs to be available for the current session and should be cleared when the session ends. Typical use cases include:</p><ul><li>Storing temporary data during a form submission process.</li><li>Storing session-specific data, such as a session ID or temporary form values, that is not needed after the page is closed.</li><li>Tracking the user’s progress through a multi-step process (e.g., checkout, registration) that should reset when the session ends.</li></ul><h3>Key Differences Between localStorage and sessionStorage</h3><p>While both localStorage and sessionStorage provide a way to store data on the client side, they are designed to meet different needs. Below is a quick comparison of the two:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J2FKQKPU_gBRqvPBT-4kjw.png" /><figcaption>Difference Summary</figcaption></figure><h3>When to Use localStorage vs. sessionStorage?</h3><p>The decision between using localStorage and sessionStorage depends on the data’s <strong>lifetime</strong> and <strong>scope</strong>:</p><ol><li><strong>Use </strong><strong>localStorage when:</strong></li></ol><ul><li>You need to store data that should persist across sessions (e.g., user preferences like theme or language settings).</li><li>You want the data to be accessible across multiple tabs and windows opened from the same domain.</li><li>You don’t need the data to expire immediately (e.g., authentication tokens that should persist until the user logs out).</li></ul><p><strong>2. Use </strong><strong>sessionStorage when:</strong></p><ul><li>You only need the data to last for the duration of the session (e.g., temporary form data or session-specific information).</li><li>You need the data to be isolated to a specific tab or window, such as multi-step forms or user-specific session states.</li><li>The data should be automatically cleared when the session ends (i.e., when the tab is closed).</li></ul><h3>Conclusion</h3><p>Both localStorage and sessionStorage provide useful ways to store data on the client side in modern web development. Understanding their key differences and use cases is crucial for deciding which one to use in your applications.</p><ul><li>Use <strong>localStorage</strong> when you need data to persist across sessions or to store settings that should be remembered across visits.</li><li>Use <strong>sessionStorage</strong> when the data should be temporary, only existing during the current page session.</li></ul><p>By using these storage options appropriately, you can create a more efficient and personalized user experience, while also improving the performance of your web applications by reducing the need for constant server requests.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de167e4019ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Key Optimization Strategies to Speed Up Your Website]]></title>
            <link>https://medium.com/@kavindupraneeth8/5-key-optimization-strategies-to-speed-up-your-website-ca595a27acba?source=rss-d218fdb3dfc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca595a27acba</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[frontend-optimization]]></category>
            <category><![CDATA[coding-trick]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Kavindu praneeth]]></dc:creator>
            <pubDate>Wed, 12 Feb 2025 14:16:51 GMT</pubDate>
            <atom:updated>2025-02-12T14:16:51.427Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7SD3RLPAy45ySo5-iTSD1A.jpeg" /></figure><p>Website speed is crucial for user experience and search engine rankings. A slow-loading website can drive users away and negatively impact SEO. In this article, we will explore five essential optimization strategies that can help you improve your website’s performance.</p><h3>1. Minimizing and Compressing Assets (CSS, JavaScript, Images)</h3><p>Large CSS, JavaScript, and image files can slow down your website. By minimizing and compressing these assets, you can reduce their size and enhance loading speed.</p><h3>How it Helps</h3><ul><li>Reduces page load time.</li><li>Decreases bandwidth usage.</li></ul><h3>Example</h3><h4>CSS &amp; JavaScript Minification</h4><p>Before minification:</p><pre>body {<br>    background-color: white;<br>    font-size: 16px;<br>}</pre><p>After minification:</p><pre>body{background-color:#fff;font-size:16px;}</pre><h4>Image Compression</h4><p>A PNG image of 500 KB can be converted to WebP format and reduced to 100 KB without losing quality.</p><h3>2. Implementing Lazy Loading for Images and Components</h3><p>Lazy loading ensures that images and components load only when needed instead of all at once.</p><h3>How it Helps</h3><ul><li>Reduces initial page load time.</li><li>Enhances performance for pages with many images.</li></ul><h3>Example</h3><h4>Lazy Loading in HTML:</h4><pre>&lt;img src=&quot;image.jpg&quot; loading=&quot;lazy&quot; alt=&quot;Example Image&quot;&gt;</pre><h4>Lazy Loading in React:</h4><pre>import React, { lazy, Suspense } from &#39;react&#39;;<br>const LazyComponent = lazy(() =&gt; import(&#39;./HeavyComponent&#39;));<br><br>function App() {<br>    return (<br>        &lt;Suspense fallback={&lt;div&gt;Loading...&lt;/div&gt;}&gt;<br>            &lt;LazyComponent /&gt;<br>        &lt;/Suspense&gt;<br>    );<br>}</pre><h3>3. Using a CDN (Content Delivery Network) for Static Assets</h3><p>A CDN distributes website assets across multiple servers worldwide, allowing users to load files from the nearest server.</p><h3>How it Helps</h3><ul><li>Improves load time by reducing the distance between the server and users.</li><li>Reduces server load and bandwidth costs.</li></ul><h3>Example</h3><p>Instead of hosting a JavaScript file on your server, use a CDN:</p><pre>&lt;script src=&quot;https://cdn.jsdelivr.net/npm/jquery@3.6.0/jquery.min.js&quot;&gt;&lt;/script</pre><h3>4. Optimizing CSS Selectors</h3><p>Complex CSS selectors can slow down page rendering. Optimizing them ensures faster style application.</p><h3>How it Helps</h3><ul><li>Speeds up rendering by reducing browser workload.</li></ul><h3>Example</h3><h4>Inefficient Selector (Too specific, slower):</h4><pre>div.container ul.menu li a {<br>    color: blue;<br>}</pre><h4>Optimized Selector (Less specific, faster):</h4><pre>.menu a {<br>    color: blue;<br>}</pre><h3>5. Leveraging Browser Caching</h3><p>Browser caching allows frequently used resources to be stored locally, reducing the need for repeated downloads.</p><h3>How it Helps</h3><ul><li>Improves page speed on repeat visits.</li><li>Reduces server requests.</li></ul><h3>Example</h3><p>Setting cache in an .htaccess file (for Apache servers):</p><pre>&lt;IfModule mod_expires.c&gt;<br>    ExpiresActive On<br>    ExpiresByType image/jpg &quot;access plus 1 year&quot;<br>    ExpiresByType image/png &quot;access plus 1 year&quot;<br>    ExpiresByType text/css &quot;access plus 1 month&quot;<br>    ExpiresByType application/javascript &quot;access plus 1 month&quot;<br>&lt;/IfModule&gt;</pre><h3>Conclusion</h3><p>By implementing these five optimization strategies, you can significantly enhance your website’s speed, improve user experience, and boost your SEO rankings. Start optimizing today and enjoy a faster, more efficient website!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca595a27acba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ What is XML?]]></title>
            <link>https://medium.com/@kavindupraneeth8/what-is-xml-44ffc22be459?source=rss-d218fdb3dfc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/44ffc22be459</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[xml-parse]]></category>
            <category><![CDATA[mysql-data]]></category>
            <category><![CDATA[xml]]></category>
            <category><![CDATA[node-js-tutorial]]></category>
            <dc:creator><![CDATA[Kavindu praneeth]]></dc:creator>
            <pubDate>Sun, 17 Nov 2024 09:07:51 GMT</pubDate>
            <atom:updated>2024-11-17T09:25:20.751Z</atom:updated>
            <content:encoded><![CDATA[<p>XML stands for <strong>Extensible Markup Language</strong>, and it’s a format designed to store and transport data. Unlike other formats, XML is both <strong>human-readable</strong> and <strong>machine-readable</strong>, making it an ideal choice for data interchange between systems.</p><h3>🔑 Why Use XML?</h3><p>XML plays a crucial role in:</p><ul><li><strong>Web Services</strong>: For example, SOAP APIs use XML for communication.</li><li><strong>Configuration Files</strong>: Many software applications store settings in XML.</li><li><strong>Data Storage</strong>: It provides a portable way to save structured data.</li></ul><h3>Key Features and Advantages of XML</h3><ol><li><strong>Separation of Data from Presentation</strong><br>XML allows storing data in external files, keeping it separate from HTML. This makes data easier to manage and reuse.</li><li><strong>Platform Independence</strong><br>Data stored in XML can be used across different platforms, browsers, or operating systems.</li><li><strong>Simplifies Data Sharing</strong><br>Different applications and systems can seamlessly exchange data using XML due to its plain text format.</li><li><strong>Versatility</strong><br>XML can define custom tags to meet specific data needs.</li></ol><h3>XML vs. HTML</h3><h4>Purpose</h4><ul><li><strong>HTML</strong>: Marks up text for display.</li><li><strong>XML</strong>: Marks up data for processing.</li></ul><h4>Tag Flexibility</h4><ul><li><strong>HTML</strong>: Uses fixed, pre-defined tags.</li><li><strong>XML</strong>: Allows creating custom tags.</li></ul><h4>Structure</h4><ul><li><strong>HTML</strong>: Focuses on appearance and layout.</li><li><strong>XML</strong>: Focuses on content and meaning.</li></ul><p>Example of an HTML snippet:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*z1yy4o27fDctz_sPijg1Sw.png" /></figure><p>Equivalent XML structure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*6xz1WgVGLOku9bSqubmv2g.png" /></figure><h3>Building Blocks of XML</h3><ol><li><strong>Elements</strong><br>Delimited by start (&lt;tag&gt;) and end (&lt;/tag&gt;) tags.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*fULn7O0CYmnA3DWyUE-GyA.png" /></figure><p>2. <strong>Attributes</strong><br> Provide additional details about elements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*esgHK53xgJuLY_dodRT0ZA.png" /></figure><p>3. <strong>Entities</strong></p><p>These entities can be used even in places where they are not absolutely required. These are the only predefined entities in XML</p><ul><li><strong>&amp;gt;</strong>: Represents &gt; (not usually necessary).</li><li><strong>&amp;quot;</strong>: Represents &quot; (necessary inside double quotes).</li><li><strong>&amp;apos;</strong>: Represents &#39; (necessary inside single quotes).</li><li><strong>&amp;lt;</strong>: Represents &lt; (almost always necessary).</li><li><strong>&amp;amp;</strong>: Represents &amp; (almost always necessary).</li></ul><h3>XML Syntax Rules</h3><ul><li>Tags are <strong>case-sensitive</strong>.</li><li>Elements must be <strong>properly nested</strong>.</li><li>Every XML document must have a <strong>single root tag</strong>.</li><li>Attribute values must be enclosed in quotes.</li></ul><h3>Real-World Applications of XML</h3><h4>Sending and Receiving XML Data with Node.js</h4><p>When working with XML data, you can use the body-parser-xml library to parse XML requests and xml2js to convert XML to JavaScript objects and vice versa.</p><h4>Steps:</h4><ol><li><strong>Set up Node.js</strong> with Express and MySQL.</li><li><strong>Receive XML data</strong> from a client.</li><li><strong>Parse and insert the data</strong> into the MySQL database.</li><li><strong>Fetch data from MySQL</strong> and return it in XML format.</li></ol><h4>1. Install Dependencies</h4><p>xml2js and body-parser-xml node modules are important for this xml data convert and parse.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6LRTtz2Afk3Rzf_38JtANA.png" /><figcaption>Node Modules</figcaption></figure><pre>npm install express body-parser body-parser-xml mysql xml2js</pre><h4>2.Create Backend Code</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x7Ej5vZG7TVtTpLnwCKXgw.png" /><figcaption>Server.js</figcaption></figure><p>code</p><pre><br>const express = require(&#39;express&#39;);<br>const bodyParser = require(&#39;body-parser&#39;);<br>const bodyParserXml = require(&#39;body-parser-xml&#39;);//for parse xml data<br>const { parseString, Builder } = require(&#39;xml2js&#39;);//convert xml to json and json to xml<br>const mysql = require(&#39;mysql&#39;);<br><br>const app = express();<br>bodyParserXml(bodyParser);<br><br>app.use(bodyParser.xml({ limit: &#39;1MB&#39;, xmlParseOptions: { explicitArray: false } }));<br><br>// MySQL Database Connection<br>const db = mysql.createConnection({<br>  host: &#39;localhost&#39;,<br>  user: &#39;root&#39;,<br>  password: &#39;&#39;,<br>  database: &#39;xmlexampledatabase&#39;,<br>});<br><br>db.connect(err =&gt; {<br>  if (err) throw err;<br>  console.log(&#39;Connected to MySQL database&#39;);<br>});<br><br>// Route to Receive XML Data and Insert into Database<br>app.post(&#39;/send-xml&#39;, (req, res) =&gt; {<br>  const { name, age, email } = req.body.person;<br><br>  const sql = &#39;INSERT INTO users (name, age, email) VALUES (?, ?, ?)&#39;;<br>  db.query(sql, [name, age, email], (err, result) =&gt; {<br>    if (err) {<br>      res.status(500).send(&#39;Error inserting data&#39;);<br>      return;<br>    }<br>    res.send(&#39;&lt;response&gt;&lt;message&gt;Data inserted successfully&lt;/message&gt;&lt;/response&gt;&#39;);<br>  });<br>});<br><br>// Route to Retrieve Data from Database and Respond in XML<br>app.get(&#39;/get-xml&#39;, (req, res) =&gt; {<br>  const sql = &#39;SELECT * FROM users&#39;;<br>  db.query(sql, (err, results) =&gt; {<br>    if (err) {<br>      res.status(500).send(&#39;Error fetching data&#39;);<br>      return;<br>    }<br><br>    //Create instance of xml builder<br>    const builder = new Builder();<br>    // Convert JSON to XML<br>    const xml = builder.buildObject({ users: { user: results } });<br><br>    res.set(&#39;Content-Type&#39;, &#39;application/xml&#39;);<br>    res.send(xml);<br>  });<br>});<br><br>// Start the Server<br>app.listen(3000, () =&gt; {<br>  console.log(&#39;Server running on port 3000&#39;);<br>});</pre><h4>3.Create Database Structure</h4><p>Create a database and table using xampp.</p><p>Database name:</p><pre>xmlexampledatabse</pre><p>Table name :</p><pre>users</pre><pre>CREATE TABLE users (<br>  id INT AUTO_INCREMENT PRIMARY KEY,<br>  name VARCHAR(50),<br>  age INT,<br>  email VARCHAR(100)<br>);</pre><h4>4. Example XML Data</h4><ol><li>Request: Send XML to Server</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Duy13NQCbP3KxsvY_ELyw.png" /><figcaption>Post Data</figcaption></figure><p>Code</p><pre>&lt;person&gt;<br>  &lt;name&gt;John Doe&lt;/name&gt;<br>  &lt;age&gt;30&lt;/age&gt;<br>  &lt;email&gt;john.doe@example.com&lt;/email&gt;<br>&lt;/person&gt;</pre><p>2. Response: XML from Server</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hY1Vng2mLUfXSZNuJ_PAKg.png" /><figcaption>get data</figcaption></figure><h4>Example Video</h4><p><a href="https://vm.tiktok.com/ZSj5scAbD/">https://vm.tiktok.com/ZSj5scAbD/</a></p><h3>Questions to Explore</h3><ul><li>Have you worked with XML in your projects?</li><li>What do you prefer for data exchange: XML or JSON? Why?</li></ul><p>Let’s discuss in the comments! Together, we can explore the evolving world of technology. 🚀💬</p><p>#XML #DataSharing #WebDevelopment #TechExplained #LearningTogether</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44ffc22be459" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Beginner’s Guide to Writing Perfect GitHub ReadMe Files Using Markdown Language ]]></title>
            <link>https://medium.com/@kavindupraneeth8/a-beginners-guide-to-writing-perfect-github-readme-files-using-markdown-language-8664bf55fa4d?source=rss-d218fdb3dfc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/8664bf55fa4d</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[markdown]]></category>
            <category><![CDATA[tips-for-students]]></category>
            <category><![CDATA[readme]]></category>
            <dc:creator><![CDATA[Kavindu praneeth]]></dc:creator>
            <pubDate>Wed, 13 Nov 2024 02:48:51 GMT</pubDate>
            <atom:updated>2024-11-13T02:48:51.161Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XmIEeVFB7N_os01A3L8X9A.jpeg" /></figure><p>If you’re diving into GitHub or contributing to open-source projects, you’ve probably come across a <strong>ReadMe.md</strong> file. It’s the first thing people see when they visit your repository. This file is written in <strong>Markdown Language</strong>, a lightweight markup language that makes it easy to format text and present information clearly.</p><p>In this article, I’ll guide you through the essentials of Markdown and how to create a well-structured ReadMe file for your GitHub projects. Whether you’re a complete beginner or someone looking to improve your ReadMe game, this is for you!</p><h3>🌟 What Is Markdown Language?</h3><p>Markdown is a simple, human-readable syntax for formatting text that gets converted into HTML. It’s widely used in GitHub, especially in <strong>ReadMe.md</strong> files, because it allows developers to easily create headings, lists, tables, and more without diving into complex HTML or CSS.</p><p>Think of Markdown as the secret sauce behind clean, professional-looking documentation! ✨</p><h3>😎 Why Is a Good ReadMe Important?</h3><p>A <strong>ReadMe file</strong> acts as the face of your project. It’s where you explain:</p><ul><li>What your project does 🤔</li><li>How someone can set it up and run it ⚙️</li><li>Any additional information, such as licensing, contributions, or troubleshooting 💡</li></ul><p>Without a proper ReadMe, your project might seem incomplete or unprofessional, discouraging potential collaborators or users.</p><h3>🛠️ Mastering Markdown Language for Your ReadMe</h3><p>Many people rely on tools like <strong>ChatGPT</strong> to generate their ReadMe files. While this is convenient, understanding how Markdown works gives you control over customization and helps you debug or improve your documentation effortlessly.</p><p>Here are some <strong>key Markdown features</strong> to include in your ReadMe file:</p><h4>1. Headings</h4><p>Use #, ##, or ### to create headings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xMCs8rShln34kDR-Kllbqw.png" /></figure><h4>2. Lists</h4><ul><li><strong>Unordered Lists</strong> use - or *</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ohwl2R0I9k2yfXbXnKjhwg.png" /><figcaption>Unordered List</figcaption></figure><p><strong>Ordered Lists</strong> use numbers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MdCFDqr5XzziDGOkx_YLmg.png" /><figcaption>Ordered List</figcaption></figure><h4>3. Tables</h4><p>Create clean tables using | and -:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rvLsw5iD0EcryncvniSbkQ.png" /><figcaption>Tables</figcaption></figure><h4>4. Images and Links</h4><ul><li>Add an image:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3dcE76tlUgJ_O5sbJ_kRng.png" /><figcaption>Image</figcaption></figure><p>Add a hyperlink:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sAOh46V9MOGX4mn8eMQj5A.png" /><figcaption>Link</figcaption></figure><p>5. <strong>Code Blocks</strong></p><p>Show code snippets with proper formatting:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7MzG_YtowMa7aYYxyX-lgQ.png" /><figcaption>Code Blocks</figcaption></figure><p><strong>6. Horizontal Lines</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ZCenF5AUrEW8S9X4grGLw.png" /><figcaption>Horizontal Line</figcaption></figure><p><strong>7.Imojies</strong></p><p>use colon before use emojis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*srdcWYe-QhuNqKweki0ILg.png" /><figcaption>imojies</figcaption></figure><p><strong>8.Task Lists</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K2wJu0L1bxxbbwrJLDVY1g.png" /><figcaption>Task Lists</figcaption></figure><h3>🎥 Check Out My YouTube Tutorial</h3><p>If you’re a visual learner, I’ve created a <a href="https://youtu.be/ze8JAYATlKM?si=TK6NIcMTC9ycJ4bK"><strong>YouTube video</strong></a> covering all these basics and more!<br>In this video, I explain:</p><ul><li>How to create <strong>tables</strong>, <strong>lists</strong>, and <strong>links</strong>.</li><li>How to embed <strong>images</strong> and share your <strong>code snippets</strong>.</li><li>Tips to make your ReadMe file more engaging and informative.</li></ul><h3>🤔 Quick Tips for Writing a Great ReadMe</h3><ol><li><strong>Start with a Clear Title:</strong> Make sure it reflects your project.</li><li><strong>Add a Short Description:</strong> Explain your project in 1–2 lines.</li><li><strong>Include Instructions:</strong> Detail how to install and run your project.</li><li><strong>Use Visuals:</strong> Add screenshots or diagrams if applicable.</li><li><strong>Focus on Readability:</strong> Use headings, lists, and tables to structure your content.</li></ol><h3>📥 Bonus: Download My Markdown CheatSheet</h3><p>I’ve created a simple <strong>Markdown CheatSheet</strong> to make your ReadMe writing journey smoother.<br>It covers the essential syntax and formatting tips you’ll need to get started. <a href="https://drive.google.com/file/d/17U0RkV4m3GKlnG-5TYe5y0mCRk-LRN0j/view?usp=sharing"><strong>Click here to download</strong></a><strong>!</strong></p><h3>📌 Final Thoughts</h3><p>A well-written ReadMe is a sign of a polished project. It not only helps users understand your project but also makes your repository more approachable to contributors.</p><p>Even if you use tools like <strong>ChatGPT</strong>, having a basic understanding of Markdown can significantly enhance the quality of your documentation. So, take some time to practice and level up your ReadMe writing skills today!</p><p>Happy documenting! ✍️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8664bf55fa4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding JavaScript Promises : A Comprehensive Guide]]></title>
            <link>https://medium.com/@kavindupraneeth8/understanding-javascript-promises-a-comprehensive-guide-cc1439ccf37b?source=rss-d218fdb3dfc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc1439ccf37b</guid>
            <category><![CDATA[asynchronous-programming]]></category>
            <category><![CDATA[javascript-promise]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[readability]]></category>
            <category><![CDATA[efficient-code]]></category>
            <dc:creator><![CDATA[Kavindu praneeth]]></dc:creator>
            <pubDate>Mon, 05 Aug 2024 12:13:47 GMT</pubDate>
            <atom:updated>2024-08-05T12:13:47.071Z</atom:updated>
            <content:encoded><![CDATA[<h3>Understanding JavaScript Promises : A Comprehensive Guide</h3><p>JavaScript promises are a powerful feature for handling asynchronous operations. They allow you to write cleaner and more manageable code. In this blog post, we’ll explore four types of promises: Promise.all, Promise.race, Promise.any, and Promise.allSettled. Each of these methods provides a different way to handle multiple promises. Let&#39;s dive in!</p><h3>What is a Promise?</h3><p>A promise in JavaScript represents a value that may be available now, or in the future, or never. It’s an object that encapsulates the result of an asynchronous operation and allows you to attach handlers to be executed when the operation is either completed or failed.</p><p>Basic Promise Example</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vRnVoyB5lefaJFkTsUZDQQ.png" /><figcaption>Simple Code For Create Promise</figcaption></figure><h3>1. Promise.all</h3><p>Promise.all takes an array of promises and returns a single promise that resolves when all of the promises in the array have resolved or if any of the promises reject.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*McZy7T8mvt_BS5AIPW-EJQ.png" /><figcaption>Simple Code For Promise.All</figcaption></figure><h3>Use Case</h3><p>Promise.all is useful when you need to wait for multiple asynchronous operations to complete before proceeding. For example, loading multiple data sets from different APIs before rendering a page.</p><h3>Handling Rejections</h3><p>If any of the promises passed to Promise.all reject, the entire Promise.all operation will immediately reject with the reason of the first promise that rejects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G1hOTuWA38IawCO-p2zlsg.png" /><figcaption>Simple Code For Promise.All Reject</figcaption></figure><h3>2. Promise.race</h3><p>Promise.race returns a promise that resolves or rejects as soon as one of the promises in the array resolves or rejects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZK8W4DXXMThJKUCnNINhrQ.png" /><figcaption>Simple Code For Promise.race</figcaption></figure><h3>Use Case</h3><p>Promise.race is useful when you need to proceed as soon as the fastest promise completes. For example, you might want to load the first resource that becomes available from multiple sources.</p><h3>Handling Rejections</h3><p>If the first promise to settle in Promise.race rejects, the Promise.race promise will reject with the reason of that first promise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gX7OfIs-4A79-7WBi3mrlg.png" /><figcaption>Simple Code For Promise.race Reject</figcaption></figure><h3>Promise.any</h3><p>Promise.any takes an array of promises and returns a single promise that resolves as soon as any of the promises in the array fulfill. If all of the given promises are rejected, it returns a rejected promise with an AggregateError.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W931eEgKrOEQu7utRLYEWA.png" /><figcaption>Simple Code For Promise.any</figcaption></figure><h3>Use Case</h3><p>Promise.any is useful when you need at least one promise to succeed, and you don&#39;t care which one it is. For example, trying multiple redundant requests to different servers and using the first successful response.</p><h3>Handling Rejections</h3><p>If all promises passed to Promise.any reject, the returned promise will reject with an AggregateError containing all the rejection reasons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M7ouKrSjmbDo3L-EBwYY1w.png" /><figcaption>Simple Code For Promise.any Reject</figcaption></figure><h3>4. Promise.allSettled</h3><p>Promise.allSettled returns a promise that resolves after all of the given promises have either resolved or rejected. The returned promise fulfills with an array of objects that each describe the outcome of each promise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yYvPs8yaW14TjAsGta_RLg.png" /><figcaption>Simple Code For Promise.allsettled</figcaption></figure><h3>Use Case</h3><p>Promise.allSettled is useful when you need to know the outcome of all promises, regardless of whether they were fulfilled or rejected. For example, gathering results from multiple API calls where some might fail, but you want to process all results anyway.</p><h3>Handling Rejections</h3><p>Promise.allSettled does not reject; it always resolves with an array of the results of all promises, indicating whether each promise was fulfilled or rejected</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*phDMN6tZv13uJokEU8TDiw.png" /><figcaption>Simple Code For Promise.allsettled Reject</figcaption></figure><h3>Conclusion</h3><p>Understanding and using promises effectively can significantly improve the readability and maintainability of your asynchronous JavaScript code. The Promise.all, Promise.race, Promise.any, and Promise.allSettled methods each provide unique ways to handle multiple promises, allowing you to choose the right tool for your specific use case.</p><p>Happy coding!</p><p>All Source Codes Here-<a href="https://github.com/praneeth724/Promise-in-js.git">https://github.com/praneeth724/Promise-in-js.git</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc1439ccf37b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>