<?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 Sathathmiga on Medium]]></title>
        <description><![CDATA[Stories by Sathathmiga on Medium]]></description>
        <link>https://medium.com/@sathathmiga?source=rss-c1750557ed67------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*1f89O9F6tQfSeXWv</url>
            <title>Stories by Sathathmiga on Medium</title>
            <link>https://medium.com/@sathathmiga?source=rss-c1750557ed67------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 23:49:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sathathmiga/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[Exploring ElevenLabs: How AI Is Transforming Voice Technology]]></title>
            <link>https://medium.com/@sathathmiga/exploring-elevenlabs-how-ai-is-transforming-voice-technology-da7e3e2250d3?source=rss-c1750557ed67------2</link>
            <guid isPermaLink="false">https://medium.com/p/da7e3e2250d3</guid>
            <category><![CDATA[eleven-labs]]></category>
            <dc:creator><![CDATA[Sathathmiga]]></dc:creator>
            <pubDate>Fri, 30 Oct 2026 04:19:07 GMT</pubDate>
            <atom:updated>2026-10-30T04:19:07.283Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Discovering how Artificial Intelligence is changing the way we create, communicate, and interact through voice.</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/0*D4hGhVxxofklcJM9" /></figure><h4>Introduction</h4><p>Artificial Intelligence (AI) is rapidly changing the world of technology. From intelligent chatbots to automated systems, AI is becoming an important part of our daily lives.</p><p>One of the most interesting developments in AI is <strong>voice technology</strong>.</p><p>Imagine converting a simple text into natural human-like speech or turning spoken words into written text within seconds.</p><p>This is where <strong>ElevenLabs</strong> comes in.</p><p>ElevenLabs is an AI-powered voice technology platform that helps users and developers generate, process, and interact with audio using Artificial Intelligence.</p><p>In this article, let’s explore what ElevenLabs is, its main features, real-world applications, and why it is interesting for software developers.</p><h4>What Is ElevenLabs?</h4><p>ElevenLabs is an Artificial Intelligence platform focused on voice generation and audio processing.</p><p>Its technology allows users to create realistic AI-generated speech, convert audio into text, translate spoken content, and develop voice-based applications.</p><p>Unlike traditional computer-generated voices, modern AI voice models can produce speech with more natural pronunciation, expression, and emotion.</p><p>ElevenLabs provides tools for both content creators and software developers.</p><h4>Key Features of ElevenLabs</h4><h4>1. Text-to-Speech (TTS)</h4><p>Text-to-Speech is one of the main features of ElevenLabs.</p><p>It converts written text into natural-sounding audio.</p><p>For example, a user can enter:</p><p>“Welcome to the future of Artificial Intelligence.”</p><p>ElevenLabs can generate an audio version of this sentence using an AI voice.</p><p>This technology is useful for audiobooks, educational content, video narration, and accessibility applications.</p><h4>2. Speech-to-Text (STT)</h4><p>Speech-to-Text works in the opposite direction.</p><p>Instead of converting text into audio, it converts spoken words into written text.</p><p>ElevenLabs provides speech recognition technology through its Scribe models.</p><p>This feature can be useful for:</p><ul><li>Voice-based note-taking applications</li><li>Meeting transcription</li><li>Educational applications</li><li>Voice-controlled software</li><li>Converting audio recordings into searchable text</li></ul><p>Speech-to-Text can reduce manual typing and make digital applications more convenient.</p><h4>3. AI Voice Cloning</h4><p>Another interesting feature is AI Voice Cloning.</p><p>This technology can create a synthetic version of a person’s voice using suitable voice recordings.</p><p>It opens up opportunities for personalized voice experiences and content creation.</p><p>However, voice cloning should always be used responsibly, with proper permission from the voice owner.</p><h4>4. AI Dubbing and Multilingual Audio</h4><p>ElevenLabs also offers AI-powered dubbing technology.</p><p>It can help convert spoken content into different languages while attempting to preserve the speaker’s original style and expression.</p><p>This is particularly useful for educational videos, international content creation, and multilingual communication.</p><h4>5. Conversational AI Voice Agents</h4><p>ElevenLabs also supports the development of AI-powered voice agents.</p><p>These systems allow users to interact with software through spoken conversations.</p><p>For example, a customer could speak to an AI assistant, ask a question, and receive a spoken response.</p><p>This technology can be applied to customer support systems, virtual assistants, and interactive applications.</p><h4>Why Is ElevenLabs Interesting for Developers?</h4><p>As a software development student, I find voice AI especially interesting because it creates new possibilities for building interactive applications.</p><p>ElevenLabs provides APIs and developer tools that allow voice capabilities to be integrated into software systems.</p><p>Developers can explore these technologies using programming languages such as Python and JavaScript.</p><p>For example, consider a web application where users normally type information into a form.</p><p>By integrating Speech-to-Text technology, developers could allow users to provide information through voice input.</p><p>Similarly, Text-to-Speech could allow an application to read information aloud.</p><p>These features can improve accessibility and user experience.</p><h4>Real-World Applications</h4><p>AI-powered voice technology can be useful across many industries.</p><p><strong>Education:</strong> Converting educational materials into audio lessons and transcribing recorded lectures.</p><p><strong>Healthcare:</strong> Supporting voice-based documentation and accessibility tools, with appropriate privacy and security protections.</p><p><strong>Business:</strong> Developing voice assistants and customer service applications.</p><p><strong>Content Creation:</strong> Producing voiceovers, narration, and multilingual audio.</p><p><strong>Software Development:</strong> Building applications that support voice input, audio output, and conversational interfaces.</p><p>These examples show that AI voice technology is not limited to entertainment. It can also support practical everyday tasks.</p><h4>Challenges and Limitations</h4><p>Although ElevenLabs offers powerful capabilities, there are some important considerations.</p><p>AI-generated speech may not always pronounce every word correctly, and Speech-to-Text systems can make transcription mistakes, especially with background noise, accents, or specialized vocabulary.</p><p>Developers should also consider API costs, internet connectivity, user privacy, and the security of uploaded audio.</p><p>Voice cloning introduces additional ethical concerns, including consent and the possibility of voice impersonation.</p><p>Therefore, responsible development and human review are important when implementing AI voice technologies.</p><h4>The Future of AI Voice Technology</h4><p>Voice-based interaction is becoming an increasingly interesting area of software development.</p><p>In the future, more applications may allow users to communicate through natural speech rather than relying entirely on keyboards and traditional interfaces.</p><p>Technologies like ElevenLabs demonstrate how AI can make digital experiences more interactive and accessible.</p><p>For developers, understanding these technologies creates opportunities to design smarter, more user-friendly applications.</p><h4>Final Thoughts</h4><p>Exploring ElevenLabs has helped me understand the possibilities of AI-powered voice technology.</p><p>What interests me most is not just the ability to generate realistic voices, but how these capabilities can be integrated into real-world software applications.</p><p>From Speech-to-Text to conversational AI, voice technology offers many opportunities for innovation.</p><p><strong>AI is not only changing how we build software. It is also changing how people interact with it.</strong></p><p>And voice technology is an exciting part of that transformation.</p><p><em>What do you think about the future of AI-powered voice applications? I’d love to hear your thoughts!</em></p><h3>References</h3><ul><li>ElevenLabs Official Website: <a href="https://elevenlabs.io/">https://elevenlabs.io</a></li><li>ElevenLabs Developer Documentation: <a href="https://elevenlabs.io/docs/overview/intro">https://elevenlabs.io/docs/overview/intro</a></li></ul><p><strong>Topics:</strong> Artificial Intelligence, ElevenLabs, Voice AI, Software Development, Speech Recognition</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da7e3e2250d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Banking to Bitcoin Mining: My Journey to Understanding Blockchain]]></title>
            <link>https://medium.com/@sathathmiga/from-banking-to-bitcoin-mining-my-journey-to-understanding-blockchain-6f995963bfe4?source=rss-c1750557ed67------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f995963bfe4</guid>
            <dc:creator><![CDATA[Sathathmiga]]></dc:creator>
            <pubDate>Fri, 09 Oct 2026 14:44:38 GMT</pubDate>
            <atom:updated>2026-10-09T14:44:38.105Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o1fbUQlFuG1J1O9x7hZ6XQ.png" /></figure><p>What I learned about cryptocurrency, digital transactions, cryptographic hashes, and Proof of Work while preparing for my blockchain presentation.</p><p>Today, I had the opportunity to give a presentation on <strong>Blockchain of Cryptocurrency</strong>.</p><p>While preparing for it, I realized something interesting.</p><p>We often hear words like Bitcoin, cryptocurrency, blockchain, mining, and digital wallets. These terms sound familiar, especially in the world of technology. But when someone asks us how they actually work together, explaining them becomes much more challenging.</p><p>I experienced exactly that.</p><p>At first, I knew that blockchain was connected to cryptocurrency and that Bitcoin used blockchain technology. But I had many questions.</p><p>Why do we need blockchain?</p><p>Who verifies transactions if there is no bank?</p><p>What exactly is stored inside a block?</p><p>Why do miners keep changing a number called a nonce?</p><p>And how can thousands of computers maintain a common transaction history without one central authority?</p><p>As I explored these questions, the concepts slowly started connecting.</p><p>Instead of memorizing definitions, I tried to understand the entire process through simple examples.</p><p>In this article, I want to share what I learned, starting with something we already understand: <strong>a normal banking transaction</strong>.</p><h3>1. It All Starts With a Simple Banking Transaction</h3><p>Imagine I want to send Rs. 1,000 to my friend Ravi. In a traditional banking system, the transaction works like this:</p><p><strong>Satha → Bank → Ravi</strong></p><p>When I initiate the transfer, the bank performs several important tasks.</p><p>It checks whether I have enough money in my account, verifies the transaction, updates the account balances, and maintains a record of the transfer.</p><p>The bank acts as a trusted middle party. This is an example of a <strong>centralized system</strong>, where a central organization maintains the authoritative transaction records.</p><p>Now, imagine removing the bank from this process. What would happen?</p><h3>2. What If There Is No Bank?</h3><p>Suppose I want to send digital money directly to Ravi.</p><p><strong>Satha → Ravi</strong></p><p>There is no bank in the middle. At first, this sounds simple. But it creates several important questions.</p><p>Who checks whether I actually have the money? Who verifies that the transaction is valid? Who maintains the transaction records? And what prevents me from spending the same digital money twice?</p><p>That last question introduces an important concept called the <strong>double-spending problem</strong>.</p><h3>Understanding the Double-Spending Problem</h3><p>Imagine I have one digital coin. I try to send that same coin to Ravi. At the same time, I also try to send it to John.</p><p>If there is no reliable system to track which transaction is valid, both people might believe they received the same coin. But I only had one coin to begin with. This is the double-spending problem.</p><p>Traditional banking systems prevent this through centrally maintained account records. Bitcoin approaches the problem differently.</p><p>It uses a decentralized network, cryptographic verification, and a shared transaction history to determine which transactions are valid.</p><p>This brings us to cryptocurrency.</p><h3>3. What Is Cryptocurrency?</h3><p>Cryptocurrency is a form of digital currency or digital asset that uses cryptography to help secure transactions.</p><p>Unlike physical money, such as notes and coins, cryptocurrency exists digitally. Some well-known examples include Bitcoin, Ether, and XRP.</p><p>One important thing I learned is that not all cryptocurrencies operate in the same way.</p><p>Bitcoin, for example, allows users to transfer value through a decentralized network without relying on a bank to maintain the official transaction ledger. But an important question remains.</p><p><strong>If there is no bank, who verifies Bitcoin transactions and keeps their records?</strong></p><p>This is where blockchain technology becomes important.</p><h3>4. Blockchain: Think of It as a Digital Record Book</h3><p>One of the simplest ways I found to understand blockchain was to imagine a digital record book.</p><p>A blockchain is a system that organizes records into blocks and links those blocks together using cryptography. In Bitcoin, the blockchain maintains a history of transactions.</p><p>For example, imagine these transactions:</p><ul><li>Satha sends 1 Bitcoin to Ravi.</li><li>Ravi sends 0.5 Bitcoin to John.</li><li>John sends 0.2 Bitcoin to Alex.</li></ul><p>These transactions can become part of the Bitcoin blockchain.</p><p>But unlike a traditional bank database, the blockchain is not maintained by one central bank. Instead, multiple computers participate in maintaining and verifying the records. This is one of the main ideas behind a decentralized blockchain.</p><h3>5. Centralized vs. Decentralized Systems</h3><p>Understanding this difference helped me connect traditional banking with blockchain.</p><p>In a centralized system, one organization maintains the authoritative records.</p><p>For example:</p><p><strong>Satha → Bank → Ravi</strong></p><p>The bank checks and records the transaction.</p><p>In Bitcoin’s decentralized system:</p><p><strong>Satha → Bitcoin Network → Ravi</strong></p><p>The transaction is broadcast to a network of computers that follow common rules to validate and record transactions. No single bank controls the Bitcoin ledger. However, decentralization does not mean there are no rules.</p><p>It means that independent participants can verify the system using shared protocol rules rather than trusting one central authority.</p><h3>6. Nodes and the Distributed Ledger</h3><p>While learning about blockchain, I came across the term <strong>node</strong>. A node is a computer that participates in a blockchain network. In Bitcoin, full nodes independently verify transactions and blocks. Many full nodes also maintain copies of the blockchain.</p><p>Imagine four computers:</p><p>Node A, Node B, Node C, and Node D.</p><p>Each of these computers can maintain its own copy of the Bitcoin transaction history. When valid new blocks are accepted, their records can be updated.</p><p>This is called a <strong>distributed ledger</strong>.</p><p>Instead of one organization maintaining the only authoritative database, multiple independent participants maintain and verify the ledger.</p><p>That is one of the important differences between traditional centralized systems and public blockchains such as Bitcoin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YuADGh7GxIpOwuGAUWk-eg.png" /></figure><h3>7. What Exactly Is a Block?</h3><p>Now we know that blockchain maintains transaction records. But how are those records organized?</p><p>This is where blocks come in.</p><p>I found it helpful to think of a block as a digital container that holds a group of transactions. For example, transactions involving Satha, Ravi, John, and Alex might be grouped into a block.</p><p>In Bitcoin, a block contains transaction data and a block header with important information such as:</p><ul><li>The previous block’s hash</li><li>A timestamp</li><li>A Merkle root representing the transactions</li><li>Difficulty-related information</li><li>A nonce used during mining</li></ul><p>These details help connect the block to the existing blockchain and allow nodes to verify it. But one of the most interesting concepts inside this process is the <strong>hash</strong>.</p><h3>8. What Is a Hash?</h3><p>A hash can be understood as a digital fingerprint of data. A cryptographic hash function takes input data and produces a fixed-length output.</p><p>For example:</p><p><strong>Block Data → Hash Function → Hash Value</strong></p><p>The interesting part is that even a small change in the input data can produce a completely different hash.</p><p>This makes cryptographic hashes useful for detecting changes in information.</p><p>Bitcoin uses hashing in several important processes, including block linking, transaction organization, and Proof of Work.</p><h3>9. How Are Blocks Linked Together?</h3><p>This is where the name blockchain starts to make sense. Each Bitcoin block contains the hash of the previous block’s header.</p><p>Let’s imagine three blocks with simplified example hashes.</p><p><strong>Block 1</strong></p><p>Hash: ABC123</p><p><strong>Block 2</strong></p><p>Previous Hash: ABC123<br>Hash: XYZ456</p><p><strong>Block 3</strong></p><p>Previous Hash: XYZ456<br>Hash: LMN789</p><p>Notice the connection?</p><p>Block 2 refers to Block 1.</p><p>Block 3 refers to Block 2.</p><p>That is how blocks form a chain. These are simplified example hashes. Real Bitcoin block hashes are much longer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E8UNmRYMOhgyy4NPKnWXvA.png" /></figure><h3>10. What Happens If Someone Changes an Old Block?</h3><p>Imagine a transaction originally says:</p><p>Satha sends 1 Bitcoin to Ravi. Now suppose someone tries to change that record to:</p><p>Satha sends 5 Bitcoin to Ravi.</p><p>Changing the transaction changes the cryptographic information derived from it. In Bitcoin, this affects the Merkle root and therefore the block-header hash.</p><p>But the next block still references the original hash. Now the connection no longer matches. This makes the change detectable.</p><p>However, hashing alone does not make a blockchain secure. Bitcoin also uses Proof of Work and network validation rules, making it extremely difficult to rewrite established transaction history.</p><p>This is why blockchain records are described as <strong>tamper-evident</strong>.</p><h3>11. How Does a Bitcoin Transaction Get Added to the Blockchain?</h3><p>Let’s return to our original example. Suppose I want to send Bitcoin to Ravi.</p><p>What happens behind the scenes?</p><p><strong>Step 1 — Transaction Creation</strong></p><p>I create a transaction using my Bitcoin wallet.</p><p><strong>Step 2 — Broadcasting</strong></p><p>The transaction is broadcast to the Bitcoin network.</p><p><strong>Step 3 — Transaction Validation</strong></p><p>Nodes check whether the transaction follows Bitcoin’s rules.</p><p><strong>Step 4 — Block Preparation</strong></p><p>A miner selects transactions and prepares a candidate block.</p><p><strong>Step 5 — Proof of Work</strong></p><p>The miner performs computational work to find a valid block hash.</p><p><strong>Step 6 — Block Verification</strong></p><p>The miner broadcasts the block, and other nodes independently verify it.</p><p>If the block becomes part of the accepted blockchain, the transaction receives its first confirmation.</p><p>Additional confirmations make it increasingly difficult to reverse the transaction through a blockchain reorganization.</p><p>This process allows Bitcoin to maintain transaction records without a central bank.</p><h3>12. Crypto Wallets, Public Keys, and Private Keys</h3><p>Another important question I had was:</p><p><strong>If Bitcoin exists digitally, where do we keep it?</strong></p><p>That question led me to crypto wallets.</p><p>A cryptocurrency wallet is a digital tool that helps users manage the cryptographic keys needed to control their funds. Interestingly, a wallet does not literally store Bitcoin coins inside it.</p><p>Bitcoin ownership and transaction history are represented through blockchain records. The wallet manages the keys needed to authorize transactions.</p><h4>Public Key</h4><p>A public key can be shared.</p><p>It is used in cryptographic verification, and Bitcoin receiving addresses are derived through related cryptographic processes.</p><h4>Private Key</h4><p>A private key must be kept secret. It is used to create digital signatures that authorize transactions.</p><p>For example, when I send Bitcoin to Ravi, my wallet uses the appropriate private key to sign the transaction.</p><p>The network can verify the signature without knowing my private key. This is one of the important applications of cryptography in Bitcoin.</p><h3>13. What Is Consensus?</h3><p>Now imagine thousands of computers participating in the Bitcoin network. How do they agree on which blockchain history to accept? This is where <strong>consensus</strong> becomes important.</p><p>Consensus is the process through which participants in a blockchain network converge on an accepted ledger history according to shared rules.</p><p>Different blockchains use different consensus mechanisms. Bitcoin uses <strong>Proof of Work</strong>. And this is where my learning journey became particularly interesting.</p><h3>14. Bitcoin Mining: More Than Just Creating Bitcoin</h3><p>Before exploring blockchain, I mainly associated Bitcoin mining with creating new Bitcoin.</p><p>But while preparing for my presentation, I learned that mining also plays an important role in producing new blocks and securing the blockchain.</p><p>A simplified mining process looks like this:</p><ol><li>Valid transactions are available in the network.</li><li>A miner prepares a candidate block.</li><li>The miner performs Proof of Work.</li><li>After finding valid Proof of Work, the miner broadcasts the block.</li><li>Other nodes independently verify it.</li><li>The valid block may become part of the accepted blockchain.</li></ol><p>But what does the miner actually calculate? This question confused me at first. And it led me to one of the most interesting concepts in Bitcoin mining.</p><p>The <strong>nonce</strong>.</p><h3>15. Understanding Proof of Work and the Nonce</h3><p>When I first studied Proof of Work, I kept wondering:</p><p>Why does a miner repeatedly change a number? What exactly are they trying to find?</p><p>Initially, I thought the miner was trying to discover the previous block’s hash. But that was not correct.</p><p>The previous block’s hash is already known. The miner is trying to find a valid hash for the new candidate block.</p><p>To do this, miners repeatedly change a value called the nonce, or other adjustable block information, and calculate the block-header hash. Bitcoin uses double SHA-256 hashing for this process.</p><p>The resulting hash must be below the network’s current difficulty target. Let’s understand this through a simplified example.</p><p><strong>Attempt 1</strong></p><p>Nonce = 101<br>Hash = …F82A<br>Result: Invalid</p><p><strong>Attempt 2</strong></p><p>Nonce = 102<br>Hash = …9C41<br>Result: Invalid</p><p><strong>Attempt 3</strong></p><p>Nonce = 103<br>Hash = …0007<br>Result: Valid</p><p>These are fictional shortened examples. In real Bitcoin mining, validity depends on the complete hash being below the numeric difficulty target, not simply on how many zeros appear in a shortened hash.</p><p>The miner may need to perform an enormous number of calculations before finding a valid result.</p><p>This is why it is called Proof of Work.</p><p><strong>Finding a valid hash requires significant computational effort, but checking it is comparatively easy.</strong></p><p>That was one of the biggest things I learned while preparing for my presentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8mpYfDVBbgl9byPViNjqVw.png" /></figure><h3>16. Miners vs. Nodes: What Is the Difference?</h3><p>Another distinction I found important was understanding the roles of miners and full nodes. At first, I thought miners were responsible for everything.</p><p>But miners and nodes perform different roles.</p><h4>What Do Miners Do?</h4><p>Miners prepare candidate blocks and perform Proof of Work to propose new blocks.</p><p>They compete to find a valid block hash.</p><h4>What Do Full Nodes Do?</h4><p>Full nodes independently verify transactions and blocks against Bitcoin’s protocol rules.</p><p>They do not have to trust a miner simply because the miner found valid Proof of Work.</p><p>For example, even if a miner finds a hash below the difficulty target, a full node can reject the block if it contains invalid transactions.</p><p>This distinction is important.</p><p><strong>Miners propose blocks. Full nodes independently validate them.</strong></p><h3>17. What Happens After a Miner Finds Valid Proof of Work?</h3><p>Finding valid Proof of Work does not mean that the block is automatically accepted by every computer.</p><p>The miner broadcasts the block to the network.</p><p>Other nodes check whether the block follows Bitcoin’s rules, including the validity of its transactions and Proof of Work.</p><p>If the block is valid, nodes can accept it and extend their blockchain.</p><p>When competing valid chains exist, Bitcoin nodes use accumulated Proof of Work as part of their chain-selection rules.</p><p>A successful miner can receive a block subsidy, when applicable, and the transaction fees included in the block.</p><p>This process combines computation, verification, and economic incentives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZaNCmyI8XCxmLDaYaE7u0g.png" /></figure><h3>18. Advantages of Blockchain</h3><p>While preparing my presentation, I also explored why blockchain technology can be useful.</p><p><strong>Decentralization:</strong> Public blockchain networks can operate without depending on one central authority.</p><p><strong>Transparency and Auditability:</strong> Public blockchain records can be independently examined.</p><p><strong>Tamper-Evident Records:</strong> Cryptographic links help reveal changes to historical information.</p><p><strong>Distributed Record Keeping:</strong> Multiple computers can maintain copies of the ledger.</p><p><strong>Cryptographic Security:</strong> Hash functions and digital signatures help protect transaction integrity and authorization.</p><p><strong>Shared Verification:</strong> Participants can independently verify transactions and blocks using common protocol rules.</p><p>These features make blockchain an interesting approach to maintaining shared digital records.</p><p>However, their usefulness depends on the blockchain’s design and purpose.</p><h3>19. Disadvantages and Limitations of Blockchain</h3><p>One important lesson I learned was that blockchain is not a perfect solution for every problem.</p><p>It also has limitations.</p><p><strong>Energy Consumption:</strong> Proof-of-Work systems such as Bitcoin can require significant electricity.</p><p><strong>Scalability:</strong> Some blockchains have limitations in transaction throughput and confirmation speed.</p><p><strong>Transaction Fees:</strong> Fees can increase when network demand becomes high.</p><p><strong>Difficulty Reversing Transactions:</strong> Confirmed cryptocurrency transactions may be difficult or impossible to reverse directly.</p><p><strong>Complexity:</strong> Wallets, private keys, consensus, and mining can be difficult for beginners to understand.</p><p><strong>Key Management Risk:</strong> Losing private keys or recovery information can result in losing access to cryptocurrency funds.</p><p>Learning about these limitations helped me understand blockchain more realistically.</p><p>A technology can offer important advantages without being the best solution for every situation.</p><h3>20. What Preparing This Presentation Taught Me</h3><p>Looking back, the most valuable part of this experience was not simply learning new technical definitions.</p><p>It was understanding how different concepts connect. I s tarted with a familiar banking transaction. Then I questioned what would happen if there were no bank.</p><p>That led me to cryptocurrency and the double-spending problem. From there, I explored blockchain, distributed ledgers, nodes, blocks, and cryptographic hashes.</p><p>I gradually understood how blocks are linked, how transactions are verified, and how wallets use digital signatures. Finally, I explored consensus, Bitcoin mining, and Proof of Work.</p><p>The concept I spent the most time trying to understand was the nonce. I kept asking why miners needed to change it and what they were actually searching for.</p><p>Once I understood that miners were searching for a block-header hash below a difficulty target, the entire Proof-of-Work process started making more sense.</p><p>Preparing to explain these concepts to an audience pushed me to question my own understanding. It reminded me that being familiar with a technical term is different from truly understanding it.</p><p>And sometimes, the best way to learn something is to try explaining it in simple words.</p><h3>Final Thoughts</h3><p>Blockchain is much more than a technology associated with Bitcoin prices or cryptocurrency trading.</p><p>It combines distributed record keeping, cryptography, network protocols, and consensus mechanisms.</p><p>Bitcoin demonstrates how these technologies can work together to maintain a shared transaction history without relying on a central bank.</p><p>My biggest takeaway from preparing this presentation was simple:</p><p><strong>Real learning begins when we stop memorizing technical definitions and start asking how and why things work.</strong></p><p>What initially felt complicated became easier to understand when I connected each concept to the next.</p><p>This presentation was one step in my learning journey, and it encouraged me to keep exploring the technology behind the tools and systems we use.</p><p>There is still a lot more to learn, and that is what makes the journey interesting.</p><p>Thank you for reading</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f995963bfe4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What I Learned About Prompt Engineering]]></title>
            <link>https://medium.com/@sathathmiga/what-i-learned-about-prompt-engineering-1cefcbf327a9?source=rss-c1750557ed67------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cefcbf327a9</guid>
            <dc:creator><![CDATA[Sathathmiga]]></dc:creator>
            <pubDate>Wed, 07 Oct 2026 11:16:59 GMT</pubDate>
            <atom:updated>2026-10-07T11:16:59.245Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zVD9hTO-8SctFCTHiGbk6w.png" /></figure><p>When I first started using ChatGPT, I thought prompting was simple — type a question, press Enter, and get an answer.</p><p>But while learning about prompt engineering, I realized that <strong>the way we ask something can completely change the answer we get.</strong></p><p>A good prompt does not have to be long or complicated. It just needs to clearly tell AI what we actually want.</p><h3>What Is a Prompt?</h3><p>A prompt is simply the instruction or question we give to an AI.</p><p>We actually use prompts in everyday life too. When we search something on Google, ask Siri to set a timer, or ask a friend for a recommendation, we are giving some form of instruction.</p><p>For example “What’s the tallest mountain in the world?”</p><p>That is a simple prompt. But when working with AI, adding the right details can make the response much more useful.</p><h3>What Makes a Good Prompt?</h3><p>One of the main things I learned was that a good prompt usually has three important qualities: <strong>clarity, specificity, and open-endedness.</strong></p><p><strong>Clarity</strong> means clearly explaining what you want.</p><p>Instead of “Create a lesson plan.”we can say “I’m an 8th-grade math teacher preparing to teach trigonometry.”</p><p>Now ChatGPT has some context. <strong>Specificity</strong> means adding useful details.“Create a 60-minute lesson plan for 20 students.”</p><p>Now the requirements are much clearer.</p><p><strong>Open-endedness</strong> gives AI some room to be creative. “Suggest some creative real-world examples to make the lesson interesting.”</p><p>Combining these ideas can turn a simple prompt into a much better one.</p><h3>A Simple Exercise That Helped Me Understand This</h3><p>One exercise asked me to get ChatGPT to suggest a <strong>vegetarian meal that could be prepared in under 30 minutes</strong>.</p><p>ChatGPT suggested <strong>Caprese Pasta Salad</strong> and gave me the ingredients and cooking instructions.</p><p>This simple exercise taught me something useful. Compare “Suggest a meal.” with “Suggest a vegetarian meal that I can prepare in under 30 minutes.”</p><p>The second one is much clearer. The words <strong>“vegetarian”</strong> and <strong>“under 30 minutes”</strong> help ChatGPT understand exactly what I need.</p><p>So I learned that <strong>a better prompt is not always a longer prompt. It is a clearer prompt.</strong></p><h3>Context Makes a Difference</h3><p>Another thing I learned is how important context is. For example, instead of saying “Summarize prompt engineering.” I can say “Using lesson two’s transcript, summarize the main learning objectives.”</p><p>Now ChatGPT knows <strong>what information to use</strong> and <strong>what I expect from the answer</strong>. Even a small amount of useful context can make a big difference.</p><h3>Your First Prompt Doesn’t Have to Be Perfect</h3><p>This was one of my favourite lessons.</p><p>I used to think I had to write the perfect prompt the first time. But prompting can actually be a conversation.</p><p>For example, I could first ask ChatGPT to create a meal plan. Then I could say “Make it cheaper.” Then “Use ingredients commonly available in Sri Lanka.” And finally “Make the recipes beginner-friendly.”</p><p>Each prompt improves the previous answer. So the process is really:</p><p><strong>Ask → Check → Refine → Improve</strong></p><p>That feels much more natural than trying to put everything into one huge prompt.</p><h3>Giving ChatGPT a Role</h3><p>I also learned about <strong>persona prompting</strong>.</p><p>Sometimes ChatGPT gives a very general response because it does not know what kind of style we want.</p><p>Giving it a role can help. For example, instead of simply saying “Write a speech.” we can tell it what kind of audience, tone, or style we want.</p><p>This can be useful when writing emails, speeches, educational content, social media posts, or other types of content.</p><p>We can even give ChatGPT examples of our own writing so it has a better idea of the style we prefer.</p><h3>Zero-Shot, One-Shot and Few-Shot</h3><p>These names sounded technical at first, but the idea is actually simple.</p><p><strong>Zero-shot</strong> — Ask ChatGPT to do something without giving an example.</p><p><strong>One-shot</strong> — Give it one example.</p><p><strong>Few-shot</strong> — Give it a few examples.</p><p>I learned that sometimes we don’t need to explain everything with lots of instructions. Showing ChatGPT an example can make our expectation much clearer.</p><h3>Breaking Big Tasks Into Smaller Ones</h3><p>Another useful idea was <strong>prompt chaining</strong>. Instead of asking ChatGPT to complete a huge task all at once, we can divide it into smaller tasks.</p><p>For example, if I wanted help developing a startup idea, I could start with the idea itself. Then I could ask about the target audience. Then the business model. Then competitors. Then marketing.</p><p>Finally, I could bring everything together into a business plan.</p><p>Each answer helps with the next step.</p><p>This made me see ChatGPT as more than a tool for answering individual questions. It can also help us work through a <strong>complete process step by step</strong>.</p><h3>AI Can Still Be Wrong</h3><p>One important lesson was that a good prompt does not guarantee that every answer will be correct.</p><p>ChatGPT can sometimes provide incorrect information confidently. It can also produce biased or inaccurate responses.</p><p>So even when an answer sounds convincing, important information should still be checked.</p><p>For me, this was an important reminder <strong>AI can assist us, but we still need to think and verify.</strong></p><h3>Different Ways to Improve a Prompt</h3><p>I learned that there are different ways to improve the same prompt depending on what we need.</p><p>For example, a simple social media prompt can be improved by adding a <strong>character limit</strong>, choosing a <strong>specific writing style</strong>, or asking for a <strong>step-by-step plan</strong>.</p><p>This showed me that prompt engineering is flexible. <strong>Small changes to a prompt can help us get a more suitable response.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cefcbf327a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Frontend and Backend Data Flow as a Beginner]]></title>
            <link>https://medium.com/@sathathmiga/understanding-frontend-and-backend-data-flow-as-a-beginner-d2466eb569c4?source=rss-c1750557ed67------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2466eb569c4</guid>
            <dc:creator><![CDATA[Sathathmiga]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 04:10:07 GMT</pubDate>
            <atom:updated>2026-10-01T04:45:57.764Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZZVOWXqjO9-OL0vGX22p8Q.png" /></figure><p>When I started learning full-stack development, I understood the frontend and backend separately, but I was confused about how they actually worked together. I knew that the frontend was what users could see, the backend handled the logic, and the database stored the data. But I still had one question: <strong>when I click a button on the frontend, what actually happens behind the scenes?</strong> Understanding this data flow helped me see how all the parts of a web application connect.</p><p>The <strong>frontend</strong> is the part of the application that the user sees and interacts with. For example, when we open a shopping website, we can see a navigation bar, product cards, prices, buttons, forms, and other information. All of these belong to the frontend. Technologies such as HTML, CSS, JavaScript, and React can be used to build it. But the frontend does not usually contain all the application’s data by itself. If a page needs to display products stored in a database, it has to ask the backend for that information.</p><p>The <strong>backend</strong> works behind the scenes. Its job is to receive requests from the frontend, process them, apply the required rules, communicate with the database, and send a response back. For example, if the frontend asks for all available products, the backend receives that request, gets the products from the database, and returns them to the frontend. Frameworks such as FastAPI, Django, Flask, and Express can be used to build the backend.</p><p>The <strong>database</strong> is where the application stores its information. For example, a shopping application might store users, products, prices, and orders in a database. One thing that was important for me to understand was that the frontend normally does not directly ask the database for information. Instead, the frontend sends a request to the backend, and the backend communicates with the database.</p><p>A simple example makes this much easier to understand. Imagine that I open a website and go to the <strong>Products</strong> page. I expect to see products such as a laptop, keyboard, and headphones. When the page opens, the React frontend needs this product information. So it sends a request to the backend, something like GET /products. In simple words, the frontend is saying, <strong>“Backend, please give me the products.”</strong></p><p>The backend receives this request and understands that the frontend wants product data. The backend then communicates with the database and asks for the available products. The database might contain a laptop for $800, a keyboard for $60, and headphones for $75. It returns those records to the backend. The backend then sends the information back to the frontend, usually as JSON data.</p><p>For example, the response might look like this:</p><pre>[<br>  {<br>    &quot;id&quot;: 1,<br>    &quot;name&quot;: &quot;Laptop&quot;,<br>    &quot;price&quot;: 800<br>  },<br>  {<br>    &quot;id&quot;: 2,<br>    &quot;name&quot;: &quot;Headphones&quot;,<br>    &quot;price&quot;: 75<br>  }<br>]</pre><p>Once React receives this data, it can display it on the page. The user finally sees the laptop and headphones with their prices. So even though the user only sees a product appearing on the screen, several things have happened behind the scenes. The frontend sent a request, the backend processed it, the database returned the information, the backend sent a response, and the frontend displayed it.</p><p>We can think of this complete flow as:</p><p><strong>User → Frontend → API Request → Backend → Database → Backend → API Response → Frontend → User</strong></p><p>Data does not always travel only from the database to the frontend. Sometimes the user also sends new information. For example, imagine a user is creating an account. They enter their name, email, and password into a registration form and click the <strong>Create Account</strong> button. The frontend collects the entered information and sends it to the backend using a request such as POST /register.</p><p>The backend receives the registration data and checks it before saving anything. It might check whether the email is valid, whether all required information was provided, and whether another account already uses the same email address. If everything is correct, the backend stores the new user in the database. It then sends a response to the frontend saying that the account was created successfully. The frontend receives that response and shows the result to the user.</p><p>This is where the words <strong>request</strong> and <strong>response</strong> started to make more sense to me. A request is simply something the frontend asks the backend to do. For example, “Give me all products,” “Create this account,” or “Update this profile.” A response is what the backend sends back after handling that request. It might return data, a success message, or an error message.</p><p>There are also different types of requests. GET is generally used when we want to retrieve data. For example, GET /products can return all products. POST is commonly used when we want to create something new, such as POST /register for creating a new user. PATCH can be used when we want to update existing information, and DELETE can be used when we want to remove something.</p><p>Another thing I came across while working with React was the <strong>service file</strong>. At first, I wondered why we needed another file between the React page and the backend. A service file simply gives us a clean place to keep our API calls. For example, instead of writing the GET /products request directly inside several React components, we can create a function called getProducts() inside productService.js. The React component calls getProducts(), the service sends the request to the backend, and the returned data comes back to the component. This keeps the frontend code cleaner and easier to understand.</p><p>A real-world example also helped me understand this concept. Think about ordering food at a restaurant. We can think of the <strong>customer as the user, the waiter as the frontend, the kitchen as the backend, and the storage area as the database</strong>. The customer tells the waiter what they want. The waiter takes the request to the kitchen. The kitchen processes the request and uses what it needs from storage. Once the food is ready, the waiter brings it back to the customer. The customer does not normally go directly into the kitchen or storage area. In the same way, the frontend normally does not directly access the database. The backend sits in the middle and controls the process.</p><p>After understanding this, frontend-backend communication became much clearer to me. What we see on the screen is only the final part of a larger process happening behind the scenes. When we open a page, submit a form, log in, create something, or click a button, data may be travelling through different parts of the application.</p><p>The simplest way I remember the whole process is this: <strong>the frontend sends a request, the backend receives and processes it, the database stores or returns the required information, the backend sends a response, and the frontend shows the result to the user.</strong></p><p>Understanding this basic flow made it easier for me to connect the concepts I was learning separately. Instead of thinking of React, APIs, FastAPI, and databases as completely different topics, I started seeing them as different parts of one application working together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2466eb569c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Hackathon Experience]]></title>
            <link>https://medium.com/@sathathmiga/my-first-hackathon-experience-53ddeb515bb4?source=rss-c1750557ed67------2</link>
            <guid isPermaLink="false">https://medium.com/p/53ddeb515bb4</guid>
            <dc:creator><![CDATA[Sathathmiga]]></dc:creator>
            <pubDate>Fri, 25 Sep 2026 08:22:48 GMT</pubDate>
            <atom:updated>2026-09-25T08:22:48.928Z</atom:updated>
            <content:encoded><![CDATA[<p>Today was a very special and challenging day in my learning journey because I participated in a hackathon with my team. It was not just about building a project within a limited time. For me, it was an experience of teamwork, leadership, communication, problem-solving, and learning how to handle pressure.</p><p>Our team consisted of only two members, which made the experience even more challenging because we had to manage the entire project between the two of us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y2fmkAIbCMXOHh93fjLOUg.png" /></figure><h3>Our Project Idea</h3><p>For the hackathon, we developed a Group Buying Marketplace.</p><p>The main idea of our application is simple: customers can come together and purchase products as a group to receive them at a lower price.</p><p>Normally, a product may have a regular price. A seller can create a group deal with a discounted group price, a minimum number of buyers, a maximum quantity, and a deadline.</p><p>Customers can browse available deals and join a deal they are interested in.</p><p>For example, if a deal requires at least 10 customers and 10 or more customers join before the deadline, the deal becomes successful. If the required number of customers is not reached before the deadline, the deal fails.</p><p>The application mainly has two important user roles: Seller and Customer.</p><p>A seller can create and manage deals, import multiple deals using CSV files, monitor customer participation, and view reports related to their deals.</p><p>A customer can browse available deals, view deal information, join a deal, leave a deal before the deadline, and track the progress of the group. The main purpose of our project was to make collective purchasing simple while helping customers access group discounts.</p><h3>How Our Application Works</h3><p>The basic workflow of our system is:</p><p>Seller creates a deal → Customer views the deal → Customer joins the deal → System tracks participants → Deadline is reached → Deal becomes Successful or Failed</p><p>We also implemented important business rules.</p><p>The group price must be lower than the normal price. The maximum quantity cannot be lower than the minimum number of buyers. Customers cannot join the same deal multiple times, and joining or leaving a deal is controlled based on the deal deadline.</p><p>These rules helped us understand that developing an application is not only about writing code. We also have to think about how the system should behave in real situations</p><h3>Technologies We Used</h3><p>For our project, we used:</p><ul><li><strong>React with Vite</strong> for the frontend</li><li><strong>FastAPI with Python</strong> for the backend</li><li><strong>MySQL</strong> for the database</li><li><strong>SQLAlchemy</strong> as the ORM</li><li><strong>Python</strong> for data-related functionality</li><li><strong>Swagger/Postman </strong>for testing our APIs</li><li><strong>Git and GitHub</strong> for version control and team collaboration</li></ul><p>Working with these technologies together gave me a much better understanding of how a complete full-stack application is built.</p><h3>My Role — Backend Developer</h3><p>My main technical responsibility was the <strong>backend</strong>.</p><p>I worked on setting up the FastAPI application, connecting the application with MySQL, creating database models and schemas, authentication, API routes, deal management, participation management, validations, and other backend business logic.</p><p>One interesting feature I worked on was CSV deal importing.</p><p>Instead of requiring a seller to manually create every deal one by one, the seller can upload a CSV file containing multiple deals. The backend reads the file, validates the data, identifies incorrect rows, and creates valid deals.</p><p>I also worked with relationships between users, deals, and participations.</p><p>This helped me understand SQLAlchemy and database relationships more practically.</p><p>Before this project, I had learned many of these concepts separately. During the hackathon, I had to connect all of them and make them work as one application.</p><p>That was one of the biggest learning experiences for me.</p><h3>My First Real Team Collaboration and <strong>Being a Team Leader </strong>Experience</h3><p>Another important part of this hackathon was GitHub collaboration.</p><p>When working alone, Git feels much simpler. We can make changes, commit them, and push them. But working as a team is different.</p><p>We had to think about branches, pulling the latest changes, pushing our own changes, avoiding conflicts, and making sure one person’s work did not affect another person’s work.</p><p>We separated our work so that frontend and backend development could happen at the same time. Through this experience, I understood why Git and GitHub are extremely important when multiple developers are working on the same project.</p><p>I also realized that collaboration is not only about dividing tasks. We need to communicate continuously.</p><p>The frontend developer needs to know what the backend API expects. The backend developer needs to understand what data the frontend requires. Everyone needs to understand the current state of the project.</p><p>That coordination was challenging, but it was also one of the most valuable parts of the hackathon. One of the biggest new experiences for me was becoming a team leader.</p><p>Until now, I mostly thought about completing my own work. But as a team leader, I realized that my responsibility was not limited to my backend tasks. I also had to think about: What should we build first? How much can we realistically complete within the hackathon time? Who should work on each part? Is the frontend and backend progressing together? Are we spending too much time on one problem?</p><p>Will we have a working project for the final presentation?</p><p>This made me understand that leadership is not about controlling a team. It is about coordinating people, making decisions, communicating clearly, and keeping the team moving toward the same goal.</p><p>I still have a lot to improve as a team leader, but this hackathon gave me my first real experience of what leadership in a development team feels like.</p><h3>The Most Difficult Part for me</h3><p>Today was not an easy experience for me.</p><p>Even though I worked on the backend of our project, I struggled when I had to explain some parts of my own work to the panel.</p><p>When they started asking questions about the backend, I became nervous and stressed. Because of that pressure, there were moments when I could not understand the questions immediately. Even when I understood the concept and had worked with it myself, I sometimes found it difficult to organize my thoughts and give a clear answer.</p><p>That was one of the hardest moments of the hackathon for me. I realized there is a big difference between knowing how to build something and being able to explain why and how I built it.</p><p>During development, I could look at my code, debug problems, search for solutions, test my APIs, and take some time to understand errors. But during the presentation, I had to listen to a question, understand it quickly, think about my implementation, and explain the answer clearly — all while being under pressure.</p><p>That was much more difficult than I expected.</p><p>Another challenge was that this was my <strong>first time speaking in English in this kind of technical environment</strong>. I already felt nervous about the presentation, and having to explain technical concepts in English added more pressure.</p><p>Sometimes I knew the answer in my mind, but I could not find the right English words quickly enough to explain it. At those moments, I felt disappointed because I knew I had worked hard on the backend. I wanted to explain my work properly, but nervousness affected the way I communicated.</p><p>However, this experience showed me exactly what I need to improve. I do not only need to learn how to write code. I need to understand every part of my code deeply enough to explain:</p><p>What does this code do? Why did I use it? What happens when this API is called? How does the database interact with the backend? What business rule am I implementing? What happens if something goes wrong?</p><p>These are questions I now want to ask myself whenever I build a project.</p><h3>Challenges We Faced</h3><p>This hackathon gave us several challenges. We had limited time, so we had to decide which features were essential and which features could wait.</p><p>Since frontend and backend development were happening separately, we had to make sure both sides worked together correctly.</p><p>We also faced technical challenges such as debugging, API testing, database-related issues, validations, and frontend-backend integration.</p><p>At the same time, I had the additional responsibility of coordinating the team while completing my own backend tasks. Managing both responsibilities within the limited hackathon time was a challenging but valuable experience.</p><h3>What I Learned About Myself</h3><p>This experience helped me understand that knowing how to build something is not enough; I also need to be able to explain it clearly.</p><p>I want to practice listening carefully to questions, organizing my thoughts, and explaining my answers step by step. I also want to become more confident in explaining my own projects without always looking at the code.</p><p>If I create an authentication system, I should be able to explain the complete login flow. If I create database models, I should understand why those tables and relationships are needed.</p><p>Similarly, when I use SQLAlchemy, FastAPI dependencies, JWT authentication, validation, or database queries, I want to understand not only the syntax but also why I am using them and how they work.</p><p>This hackathon made me realize that my next step is not just to write more code, but to understand what I build more deeply and communicate it with confidence.</p><h3>What This Hackathon Taught Me</h3><p>At some points today, I felt stressed because I thought I was not performing as well as I wanted. But when I look at the whole experience, I can see how much I learned in a very short period of time.</p><p>I experienced what it feels like to build under a deadline. I experienced real team collaboration. I worked as a backend developer. I used GitHub collaboratively.</p><p>I had to think about frontend-backend integration. I took responsibility as a team leader. I answered questions under pressure. And I spoke in English in this kind of environment for the first time. Not everything went perfectly — and that is exactly why the experience was valuable.</p><p>The hackathon showed me both what I can already do and what I still need to improve. I still have a long way to go. I need more technical knowledge, more practice, better communication, stronger leadership skills, better time management, and more confidence.</p><p>But now I know more clearly what I need to work on. This hackathon was not just about completing a project.</p><p>For me, it was about discovering how I react under pressure, how I work with a team, how I take responsibility, and how much more I am capable of learning.</p><p><strong>Today I did not just build an application. I gained an experience that will help me become a better developer, communicator, and team member.</strong></p><p>And this is only the beginning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53ddeb515bb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How JWT Authentication Works]]></title>
            <link>https://medium.com/@sathathmiga/how-jwt-authentication-works-2983a1b7c6d9?source=rss-c1750557ed67------2</link>
            <guid isPermaLink="false">https://medium.com/p/2983a1b7c6d9</guid>
            <dc:creator><![CDATA[Sathathmiga]]></dc:creator>
            <pubDate>Fri, 18 Sep 2026 04:13:44 GMT</pubDate>
            <atom:updated>2026-09-18T04:13:44.981Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kUdKPz-2Wsh4ZsQwtPmTug.jpeg" /></figure><p>When I started learning backend development, I kept hearing about <strong>JWT Authentication</strong>.</p><p>At first, JWT looked complicated because of words like token, payload, signature, secret key, and authorization.</p><p>But after understanding the basic flow, it became much easier.</p><p>So in this post, I want to explain <strong>how JWT Authentication works</strong> in a simple way.</p><h4>What is JWT?</h4><p>JWT stands for <strong>JSON Web Token</strong>.</p><p>It is a compact token that a server can give to a user after successful login.</p><p>Instead of sending the username and password with every request, the client can send the JWT token to prove that the user has already authenticated.</p><p>The basic idea is:</p><p><strong>Login → Get Token → Send Token → Server Verifies Token → Access Granted</strong></p><h4>How JWT Authentication Works</h4><p>Let’s imagine we have a library management API. A user wants to borrow a book. The user first needs to log in.</p><h4>Step 1: User Logs In</h4><p>The client sends the login details to the server.</p><p>{<br> “email”: “<a href="/service/mailto:satha@example.com">satha@example.com</a>”,<br> “password”: “mypassword”<br>}</p><p>The server receives this information and checks the database. If the credentials are correct, the server creates a JWT.</p><h4>Step 2: Server Creates a JWT</h4><p>The server generates a token containing information such as the user’s identity and other claims.</p><p>For example:</p><p>{<br> “sub”: “satha”,<br> “role”: “member”<br>}</p><p>The server then signs the token using a secret key. The final JWT looks something like: xxxxx.yyyyy.zzzzz The actual token is much longer, but this shows the basic structure.</p><h4>Step 3: Server Sends the Token</h4><p>After successful login, the server sends the JWT back to the client.</p><p>For example:</p><p>{<br> “access_token”: “eyJhbGciOiJIUzI1NiIs…”,<br> “token_type”: “bearer”<br>}</p><p>The client stores the token and can use it for future protected requests.</p><h4>Step 4: Client Sends the Token</h4><p>Now suppose the user wants to borrow a book. The client sends a request to:</p><p>POST /borrow</p><p>Instead of sending the username and password again, the client sends the JWT in the Authorization header.</p><p>Authorization: Bearer &lt;JWT_TOKEN&gt;</p><p>The word <strong>Bearer</strong> means the client is presenting the token as proof of authentication.</p><h4>Step 5: Server Verifies the Token</h4><p>The server receives the request and checks the JWT.</p><p>It verifies things such as:</p><ul><li>Is the token valid?</li><li>Was the token signed with the expected secret key?</li><li>Has the token expired?</li><li>What user does the token belong to?</li></ul><p>If everything is valid, the server allows the request to continue.</p><p>Valid Token<br> ↓<br>Request Allowed ✅</p><p>If the token is invalid or expired:</p><p>Invalid Token<br> ↓<br>Request Rejected ❌</p><h4>What is Inside a JWT?</h4><p>A JWT normally has three parts:</p><ol><li>Header</li><li>Payload</li><li>Signature</li></ol><p>They are separated by dots.</p><p>For example: xxxxx.yyyyy.zzzzz</p><p><strong>1. Header</strong></p><p>The header contains information about the token.</p><p>For example:</p><p>{<br> “alg”: “HS256”,<br> “typ”: “JWT”<br>}</p><p>alg represents the signing algorithm. typ represents the token type.</p><p><strong>2. Payload</strong></p><p>The payload contains claims about the user or token.</p><p>For example:</p><p>{<br> “sub”: “satha”,<br> “role”: “member”<br>}</p><p>sub is commonly used for the subject, such as the user identity. The payload can contain useful information, but it should <strong>not contain sensitive secrets such as passwords</strong>. A JWT payload is encoded, not encrypted, so it should not be treated like a secret storage area.</p><p><strong>3. Signature</strong></p><p>The signature helps the server verify that the token was created using the expected signing key and has not been modified.</p><p>Conceptually:</p><p>Header + Payload + Secret Key<br> ↓<br> Signature</p><p>If someone changes the payload, the signature will no longer match the expected signature.</p><h3>JWT Authentication Flow</h3><p>The complete flow looks like this:</p><pre>LOGIN<br>               ↓<br>      Username + Password<br>               ↓<br>          Server checks<br>           credentials<br>               ↓<br>       Credentials correct?<br>          ↙           ↘<br>        No             Yes<br>        ↓               ↓<br>     Reject        Create JWT<br>                        ↓<br>                  Send JWT<br>                        ↓<br>                     Client<br>                        ↓<br>              Request protected API<br>                        ↓<br>                Authorization Header<br>                        ↓<br>                 Server verifies JWT<br>                   ↙           ↘<br>                Invalid        Valid<br>                  ↓              ↓<br>                401 ❌       Continue ✅</pre><p>This is the basic idea behind JWT Authentication.</p><h4>JWT and FastAPI</h4><p>While learning FastAPI, JWT can be used to protect API endpoints.</p><p>For example: POST /login</p><p>The user logs in and receives a token.</p><p>Then: GET /books</p><p>might be a protected endpoint.</p><p>The client sends: Authorization: Bearer &lt;token&gt;</p><p>FastAPI can then verify the token before allowing access to the endpoint.</p><p>This is especially useful when building APIs where different users have different permissions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2983a1b7c6d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Authentication vs Authorization: What’s the Difference?]]></title>
            <link>https://medium.com/@sathathmiga/authentication-vs-authorization-whats-the-difference-393a69441d68?source=rss-c1750557ed67------2</link>
            <guid isPermaLink="false">https://medium.com/p/393a69441d68</guid>
            <dc:creator><![CDATA[Sathathmiga]]></dc:creator>
            <pubDate>Thu, 17 Sep 2026 04:49:03 GMT</pubDate>
            <atom:updated>2026-09-17T04:49:03.869Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3dUSnDo86PbK1UkqcpZ0TA.jpeg" /></figure><p>When I started learning backend development, I came across two terms again and again:</p><p><strong>Authentication</strong> and <strong>Authorization</strong>.</p><p>At first, they looked almost the same to me. But they actually answer two completely different questions:</p><p><strong>Authentication → Who are you?</strong></p><p><strong>Authorization → What are you allowed to do?</strong></p><p>In this post, I’ll explain both concepts with simple real-life examples and a backend example.</p><h3>What is Authentication?</h3><p><strong>Authentication</strong> is the process of verifying the identity of a user. For example, when we log in to an application, we usually enter</p><p>Email: satha@gmail.com</p><p>Password: ********</p><p>The server checks these details against the user’s information stored in the database.</p><p>If the details are correct, the login is successful and the user is authenticated. If they are incorrect, the login fails and the user cannot be authenticated.</p><p><strong>Real life example of authentication</strong></p><p>Imagine you are entering a college or library. At the entrance, the security officer asks “Who are you?”. You show your student ID card. The security officer checks your ID and confirms that you are a student.</p><p>This is <strong>Authentication</strong>. The security officer is verifying your identity.</p><p>You → Show ID → Identity is verified →Authentication successful</p><h4>Different Ways to Authenticate</h4><p>Authentication does not always mean using a password. Some common authentication methods are:</p><ul><li>Username and password</li><li>OTP</li><li>Fingerprint</li><li>Face recognition</li><li>Google login</li><li>Other authentication methods</li></ul><p>For example, when you unlock your phone using your fingerprint, the system is trying to verify your identity.</p><h3>What is Authorization?</h3><p>After the system knows <strong>who you are</strong>, there is another important question <strong>What are you allowed to do? </strong>This is <strong>Authorization</strong>.</p><p>Authorization determines what an authenticated user can access or what actions they can perform.</p><p>For example imagine a system with two users, Satha and Ravi. Satha is a normal user, while Ravi is an admin. Both of them can successfully log in to the system, so both users are authenticated.</p><p>However, they may not have the same permissions. Satha, as a normal user, might be able to view and edit their profile and view books, but may not be allowed to delete users or add new admins.</p><p>Ravi, as an admin, may have permission to perform all of these actions, including deleting users and adding admins.</p><p>The process of deciding what each user is allowed to access or do is called <strong>Authorization</strong>.</p><h3>Authentication vs Authorization</h3><p>Authentication and Authorization are closely related, but they have different responsibilities. Authentication verifies the identity of a user, while Authorization determines what that user is allowed to access or do.</p><p>In most applications, authentication comes first because the system needs to identify the user before checking their permissions.</p><h3>How They Work in a Backend Application</h3><p>To understand this better, let’s take a simple Library Management System. Imagine that a user wants to log in to the system. The user provides their email and password, and the backend receives these details.</p><p>The backend then checks the database to see whether the user exists and whether the provided login information is correct. If the credentials are correct, the backend can identify the user.</p><p>For example, it may know that the logged-in user is Satha and that Satha has a normal User role. This process of verifying and identifying the user is <strong>Authentication</strong>.</p><p>But authentication is not the end of the process. After the backend knows who the user is, it also needs to check what that user is allowed to do.</p><p>For example, suppose Satha tries to delete a book by sending a request:</p><p>DELETE /books/10 .</p><p>The backend now needs to check whether Satha has permission to delete books. If Satha is a normal user and normal users are not allowed to delete books, the backend will reject the request.</p><p>However, if the logged-in user is a librarian or an admin who has permission to delete books, the backend can allow the request.</p><p>This permission-checking process is <strong>Authorization</strong>.</p><h3>Where Does JWT Come In?</h3><p>While learning backend development, I also came across another important term called <strong>JWT (JSON Web Token)</strong>. JWT is commonly used when building authentication systems for APIs.</p><p>After a user successfully logs in, the server can create a JWT and send it back to the client. The client can then include that token when making future requests to the backend.</p><p>For example, after logging in successfully, the user might receive a JWT. Later, when the user wants to access a protected API, the client sends the token along with the request. The backend can verify the token and use the information available to identify the user. It can then apply its authorization rules to decide whether that user is allowed to access the requested resource or perform the requested action.</p><p>So, a simplified flow can be understood as</p><p><strong>Email and Password → Authentication → JWT Token → Token sent with future requests → Backend verifies the request → Authorization → Allow or Deny</strong>.</p><h3>What Are Roles?</h3><p>When we talk about authorization, we often come across the concept of <strong>roles</strong>. A role is used to represent what type of user someone is and can be used to control their permissions.</p><p>For example, a Library Management System might have three roles: <strong>Admin, Librarian, and User</strong>.</p><p>Imagine Satha is a normal User, Ravi is an Admin, and Arun is a Librarian. All three users may be able to log in, but they may not have the same permissions.</p><p>A normal User might be allowed to view books but not delete them. A Librarian might be allowed to add or delete books, while an Admin might have additional permissions such as managing users.</p><p>The application checks the user’s role and uses the defined rules to decide which actions are allowed.</p><p>This is commonly known as <strong>role-based authorization</strong>, because the user’s permissions are determined based on their role.</p><h3>What If Authentication Fails?</h3><p>Now let’s imagine that someone tries to log in using an incorrect email or password. The backend checks the provided credentials but cannot verify the user’s identity.</p><p>In this situation, authentication fails because the system cannot confirm who the user is.</p><p>A common HTTP status code used when authentication is required or has failed is <strong>401 Unauthorized</strong>.</p><h3>What If Authorization Fails?</h3><p>Now consider a different situation. Suppose Satha has already logged in successfully, so the backend knows who Satha is. Authentication has therefore been successful.</p><p>However, Satha tries to access an admin-only resource such as /admin/users. The backend checks Satha&#39;s role and finds that a normal user does not have permission to access that resource.</p><p>In this case, authentication was successful, but authorization failed. A common HTTP status code for this situation is <strong>403 Forbidden</strong>.</p><p>The easiest way to understand the difference is: <strong>the system knows who you are, but you are not allowed to perform that action.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=393a69441d68" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Week an AI Safety Warning Shook the Global Stock Market]]></title>
            <link>https://medium.com/@sathathmiga/the-week-an-ai-safety-warning-shook-the-global-stock-market-d5e0d0de3763?source=rss-c1750557ed67------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5e0d0de3763</guid>
            <dc:creator><![CDATA[Sathathmiga]]></dc:creator>
            <pubDate>Tue, 15 Sep 2026 05:22:25 GMT</pubDate>
            <atom:updated>2026-09-15T05:22:25.570Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XxADZKEGBVFVaRwCv4_2BA.jpeg" /></figure><p>September 2026 — Something unusual happened in the tech world this week. Some of the biggest names in AI started publicly talking about the risks of the technology they are building. Soon after, AI related stocks around the world took a hit.</p><p>So, what exactly happened, and why did the stock market react so strongly?</p><h4>Where did the warning come from?</h4><p>On Saturday, September 12, Anthropic CEO <strong>Dario Amodei</strong> published an essay on X called <em>“We Must Pace the Frontier.”</em></p><p>His main point was simple: AI development is moving very quickly, and companies may need to slow down a little and focus more on safety.</p><p>He highlighted three major concerns: AI systems becoming difficult to control, AI being used for things like cyberattacks and bioterrorism, and the possibility of AI causing serious economic disruption.</p><p><strong>Sam Altman</strong>, the CEO of OpenAI, quickly said that he agreed with Amodei. <strong>Elon Musk</strong> from xAI also expressed a similar view.</p><p>However, they were not saying that AI development should stop completely. The idea is more about <strong>“pacing” AI development</strong> continuing to build AI, but with stronger safety checks and monitoring.</p><p>The discussion became even bigger when a former Anthropic researcher posted that AI companies were taking serious risks with people’s lives. Anthropic safety researcher <strong>Evan Hubinger</strong> also said he believes there is more than a 10% chance that AI could cause catastrophic harm to humanity within the next decade.</p><h3>Why did the stock market react?</h3><p>After these warnings became public, many AI-related stocks dropped on Monday, September 14.</p><ul><li><strong>Nvidia</strong> fell around 3%.</li><li><strong>AMD</strong> dropped nearly 5.6%.</li><li><strong>Intel</strong> fell about 6%.</li><li>In Asia, <strong>SK Hynix</strong> lost more than 6%, while <strong>Samsung Electronics</strong> fell more than 4%.</li><li><strong>SoftBank</strong>, which is a major OpenAI investor, dropped around 10–11% in Tokyo.</li><li>South Korea’s <strong>Kospi</strong> index fell 3.3%.</li><li>European companies such as <strong>ASML, Nokia, and Infineon</strong> also saw their stocks fall.</li></ul><p>But why would a warning about AI safety affect the stock market?</p><p>For the past two years, investors have been putting a lot of money into the AI industry. Companies are spending heavily on AI chips, data centers, and new AI products.</p><p>If AI companies slow down their development, investors may worry that this spending could also slow down. That could eventually affect company growth and future profits.</p><p>As Steve Sosnick, chief market strategist at Interactive Brokers, explained, the market has been running very strongly because of the huge amount of money being spent on AI.</p><h4>OpenAI also delays its IPO plans</h4><p>There was another development that added to the uncertainty.</p><p>In an interview with <em>Fortune</em> published on Saturday, Sam Altman said that <strong>OpenAI will not go public this year</strong>.</p><p>He described the current situation as a bad time for an IPO, saying it would be “an ill-advised moment.”</p><p>This also created some uncertainty around the wider AI startup and investment market.</p><h4>The political side</h4><p>The issue also became political.</p><p>U.S. President <strong>Donald Trump</strong> rejected the idea of slowing down AI development. His argument was that if the U.S. slows down, China could gain an advantage in AI.</p><p>China’s state media, on the other hand, criticized the comments from the AI CEOs and suggested that they were trying to present China’s AI development as a threat.</p><h4>So, what does this really mean?</h4><p>This does <strong>not</strong> mean that the AI boom is over. Instead, investors are starting to think about another side of the AI story <strong>risk</strong>. For the last couple of years, the main focus has been on how quickly AI can grow and how much money it can make. Now, people are also asking an important question:</p><p><strong>How fast should AI development actually move?</strong></p><p>AI development will most likely continue, but companies may put more attention on safety, testing, monitoring, and controlling risks. And with the U.S. Federal Reserve’s interest-rate meeting also happening this week, markets could remain uncertain for a while.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5e0d0de3763" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL Queries Are Slow Sometimes — Reasons and Solutions]]></title>
            <link>https://medium.com/@sathathmiga/sql-queries-are-slow-sometimes-reasons-and-solutions-422f9451e98b?source=rss-c1750557ed67------2</link>
            <guid isPermaLink="false">https://medium.com/p/422f9451e98b</guid>
            <dc:creator><![CDATA[Sathathmiga]]></dc:creator>
            <pubDate>Mon, 14 Sep 2026 05:19:19 GMT</pubDate>
            <atom:updated>2026-09-14T05:19:19.215Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5kVoWTqM-ffS7IakRJ12Uw.jpeg" /></figure><p>When working with databases, sometimes SQL queries take longer than expected to return results. This can happen for different reasons. A slow query can affect the performance of an entire application, especially when the database contains a large amount of data. In this post, let’s look at some common reasons why SQL queries become slow and what we can do to solve them.</p><h4>1. Missing Indexes</h4><p><strong>Reason:</strong> One of the most common reasons for a slow SQL query is the lack of proper indexes. An index helps the database find specific data faster instead of checking every row one by one. For example, if we search for a student by name in a table containing millions of students, searching without an index can take more time.</p><p><strong>Solution:</strong> We can create suitable indexes on columns that are frequently used for searching, filtering, or joining. For example:</p><p><strong>CREATE INDEX idx_student_name<br> ON students(name);</strong></p><p>This can help the database find matching records more efficiently. However, we should not create too many indexes because they also require storage and can make insert and update operations slower.</p><h4>2. Selecting Too Much Data</h4><p><strong>Reason:</strong> Using <strong>SELECT * </strong>is another common reason for unnecessary work. It tells the database to return all columns, even if we only need a few of them. When the table contains a large amount of data, returning unnecessary columns can increase processing and data transfer.</p><p><strong>Solution:</strong> We should select only the columns we actually need. Instead of:</p><p><strong>SELECT * FROM students;</strong></p><p>we can write:</p><p><strong>SELECT name, email<br> FROM students;</strong></p><p>This makes the query more focused and reduces unnecessary data.</p><h4>3. Large Amount of Data</h4><p><strong>Reason:</strong> As a database grows, queries can take more time to process. A query that works quickly with 1,000 records may become slower when the table contains millions of records. If we request a large amount of data at once, the database and application have to handle more information.</p><p><strong>Solution:</strong> We can use proper filtering with the <strong>WHERE </strong>condition and retrieve only the required records. For example:</p><p><strong>SELECT name, email<br> FROM students<br> WHERE age &gt; 18;</strong></p><p>For applications with many records, we can also use pagination to load a smaller number of records at a time.</p><h4>4. Unnecessary JOINs</h4><p><strong>Reason:</strong> JOINs are used to get related data from multiple tables. They are very useful, but joining several large tables can require a lot of processing. Unnecessary JOINs can make a query slower.</p><p><strong>Solution:</strong> We should use only the JOINs that are actually required. We should also make sure that the columns used for JOIN conditions are properly indexed when appropriate. This can help the database find related records more efficiently.</p><h4>5. Sorting Large Data</h4><p><strong>Reason:</strong> <strong>ORDER BY </strong>can become expensive when the database needs to sort a very large number of records. For example, sorting millions of students by name can take more time than sorting a small table.</p><p><strong>Solution:</strong> We should filter the data before sorting whenever possible. We can also use suitable indexes for frequently used sorting patterns. If the application only needs a few results, using <strong>LIMIT </strong>can also reduce unnecessary work.</p><p><strong>SELECT name<br> FROM students<br> ORDER BY name<br> LIMIT 20;</strong></p><h4>6. GROUP BY on Large Data</h4><p><strong>Reason:</strong> <strong>GROUP BY </strong>is useful for grouping records and performing calculations. However, when we group millions of records, the database has to process a large amount of data, which can make the query slower.</p><p><strong>Solution:</strong> We should filter unnecessary records before grouping whenever possible. We can use <strong>WHERE </strong>conditions to reduce the amount of data that needs to be processed. Suitable indexes may also help depending on the query.</p><h4>7. Too Many Users at the Same Time</h4><p><strong>Reason:</strong> Sometimes the query itself is not the problem. If many users access the database at the same time, the database server has to process many requests together. This can increase the response time.</p><p><strong>Solution:</strong> We can use techniques such as connection pooling and caching to reduce unnecessary database requests. We can also optimize frequently used queries and make sure the database server has enough resources to handle the workload.</p><h4>8. Limited Server Resources</h4><p><strong>Reason:</strong> A database needs resources such as CPU, RAM, storage, and disk performance. If the server does not have enough resources, queries can become slow even when the SQL query is written correctly.</p><p><strong>Solution:</strong> We should monitor the database server and check CPU, RAM, storage, and disk usage. If the resources are not enough, we may need to improve the server resources or optimize the database configuration.</p><h4>9. Inefficient Query Execution Plan</h4><p><strong>Reason:</strong> When we send a query to the database, the database creates a plan for how it will execute that query. Sometimes it may choose an inefficient way to process the data. This can cause a query to take more time.</p><p><strong>Solution:</strong> We can use <strong>EXPLAIN </strong>to understand how the database plans to execute a query. For example, in MySQL:</p><p>E<strong>XPLAIN<br> SELECT *<br> FROM students<br> WHERE name = ‘Satha’;</strong></p><p>By checking the execution plan, we can identify problems such as unnecessary table scans and understand whether indexes are being used effectively.</p><h4>10. Repeated Database Requests</h4><p><strong>Reason:</strong> Sometimes an application asks the database for the same information again and again. If the same data is requested by many users, sending a new query every time can increase the database workload.</p><p><strong>Solution:</strong> We can use caching for frequently requested data. With caching, commonly requested information can be stored temporarily and returned without querying the database every time. This can reduce database load and improve response time. ithu ipidiye medium pst kku podda sariya eathum change panna vendi irukka</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=422f9451e98b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding SQL ACID Properties with a Real-World Example]]></title>
            <link>https://medium.com/@sathathmiga/understanding-sql-acid-properties-with-a-real-world-example-a17e96899699?source=rss-c1750557ed67------2</link>
            <guid isPermaLink="false">https://medium.com/p/a17e96899699</guid>
            <dc:creator><![CDATA[Sathathmiga]]></dc:creator>
            <pubDate>Thu, 10 Sep 2026 04:44:41 GMT</pubDate>
            <atom:updated>2026-09-10T05:24:48.948Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w6pwng_zvudSrqDhiSPNwg.jpeg" /></figure><p>While learning SQL and databases, I came across an important concept called <strong>ACID properties</strong>.</p><p>ACID helps databases handle transactions in a safe and reliable way.</p><p><strong>ACID stands for:</strong></p><ul><li><strong>A — Atomicity</strong></li><li><strong>C — Consistency</strong></li><li><strong>I — Isolation</strong></li><li><strong>D — Durability</strong></li></ul><p>To understand these properties easily, let’s take a <strong>bank money transfer</strong> as a real world example.</p><h4>What is a Transaction?</h4><p>A <strong>transaction</strong> is a group of database operations that should be completed as one unit.</p><p>For example, if I transfer Rs.1,000 from Account A to Account B, the database needs to:</p><ol><li>Deduct Rs.1,000 from Account A.</li><li>Add Rs.1,000 to Account B.</li></ol><p>These two operations together form one transaction.</p><h4>1. Atomicity — All or Nothing</h4><p>Atomicity means that all operations in a transaction must happen successfully, or none of them should happen.</p><p>For example, if Rs.1,000 is deducted from Account A but adding it to Account B fails, the first operation should also be cancelled.</p><p>SQL uses ROLLBACK to undo the changes.</p><pre>START TRANSACTION;</pre><pre>UPDATE accounts<br>SET balance = balance - 1000<br>WHERE account_id = 1;</pre><pre>UPDATE accounts<br>SET balance = balance + 1000<br>WHERE account_id = 2;</pre><pre>COMMIT;</pre><p>If something goes wrong, we can use ROLLBACK . Either everything happens, or nothing happens.</p><h4>2. Consistency — Keep the Database Valid</h4><p>Consistency means that a transaction should take the database from <strong>one valid state to another valid state</strong>.</p><p>For example, before the transfer:</p><ul><li>Account A = Rs.10,000</li><li>Account B = Rs.5,000</li><li>Total = Rs.15,000</li></ul><p>After transferring Rs.1,000:</p><ul><li>Account A = Rs.9,000</li><li>Account B = Rs.6,000</li><li>Total = Rs.15,000</li></ul><p>The database is still valid because the transaction followed the rules. If the database has a rule that an account cannot have a negative balance, a transaction should not break that rule. <strong>Simple meaning: </strong>The transaction should keep the database correct and follow its rules.</p><h4>3. Isolation — Transactions Work Independently</h4><p>A database can have many users performing transactions at the same time.</p><p>For example, while I am transferring Rs.1,000, another user may be checking an account balance.</p><p>That user should not see a <strong>half-completed transaction</strong>.</p><p>The database manages transactions so that one transaction does not incorrectly interfere with another. <strong>Simple meaning: </strong>One transaction should not interfere with another transaction.</p><h4>4. Durability — Data Stays Saved</h4><p>Durability means that once a transaction is successfully committed, its changes should not be lost. For example, after the transfer is committed:</p><pre>Account A = Rs.9,000<br>Account B = Rs.6,000</pre><p>Even if the database server restarts afterthat , these committed changes should remain saved. <strong>Simple meaning: </strong>Once a transaction is committed, its changes stay saved.</p><h4>ACID in One Bank Transfer</h4><p>We can remember ACID using the same bank transfer:</p><p><strong>Atomicity:</strong> Everything happens, or nothing happens.</p><p><strong>Consistency:</strong> The database remains valid and follows its rules.</p><p><strong>Isolation:</strong> Transactions do not incorrectly interfere with each other.</p><p><strong>Durability:</strong> Committed changes remain saved.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a17e96899699" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>