<?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 Chiran Jeewantha on Medium]]></title>
        <description><![CDATA[Stories by Chiran Jeewantha on Medium]]></description>
        <link>https://medium.com/@askchiran?source=rss-465b1d7bdbf4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*elDICaJrvN2ju5YGYFdSNg.png</url>
            <title>Stories by Chiran Jeewantha on Medium</title>
            <link>https://medium.com/@askchiran?source=rss-465b1d7bdbf4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 23:55:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@askchiran/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[The Prompt is Not Enough: Why Developer Testing is Surviving the AI Revolution]]></title>
            <link>https://askchiran.medium.com/the-prompt-is-not-enough-why-developer-testing-is-surviving-the-ai-revolution-921f3372b645?source=rss-465b1d7bdbf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/921f3372b645</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[test-driven-development]]></category>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Chiran Jeewantha]]></dc:creator>
            <pubDate>Wed, 02 Sep 2026 10:47:44 GMT</pubDate>
            <atom:updated>2026-09-02T10:47:44.452Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AlEGSpiUPY8RGHsT1UWqZA.jpeg" /></figure><p>I watched an AI churn out a complex data-fetching service yesterday. It was incredibly fast, beautifully indented, and completely plausible.</p><p>It was also subtly, dangerously wrong.</p><p>If you hang around daily stand-ups right now, you’ll hear the same question: <em>“If AI can write the feature, why am I still writing unit tests? Is developer testing dead?”</em></p><p>After integrating AI tools into daily full-stack development, I’ve realized the exact opposite is true. <strong>In the AI era, writing tests is the most bulletproof skill you can possess.</strong> Here is why.</p><h4>AI Writes on Probability. You Test on Reality.</h4><p>AI coding assistants are brilliant, but they are essentially highly confident autocomplete engines. They know syntax, but they lack the one thing that makes software work: <strong>Context.</strong></p><p>An AI doesn’t know that if a user with a legacy account clicks a button, your database needs to handle the payload differently. It can write the logic you ask for, but it cannot verify if that logic solves your unique business problem without quietly breaking three other things.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vIlQBMNhUPdRommkcZLhOA.jpeg" /></figure><h4>AI is the Engine. Your Tests are the Brakes.</h4><p>When we rely on AI to generate chunks of complex architecture, testing steps in as the ultimate safety net:</p><ul><li><strong>Catching Hallucinations</strong>: AI models hallucinate logic just as easily as facts. A well-written unit test is an instant lie detector, catching when the AI confidently returns a string instead of a Boolean.</li><li><strong>Fearless Refactoring</strong>: AI lets you build ridiculously fast. Comprehensive test coverage ensures you can actually hit ‘merge’ on that AI-generated code without holding your breath.</li><li><strong>Executable Documentation</strong>: When code is generated in seconds, reading it becomes a bottleneck. Tests act as living documentation, telling the next developer (and the next AI) exactly what the boundaries of the system are.</li></ul><h4>Test-Driven Development (TDD) Just Got an Upgrade</h4><p>Historically, writing tests before the “real” code felt tedious. AI completely flips this paradigm.</p><p><strong>Your tests are now your ultimate prompt.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mJxNd4TVnvCnFYhN4qGfvw.jpeg" /><figcaption>TDD Workflow</figcaption></figure><p>If you clearly define your inputs, expected outputs, and edge cases in a test script, you have handed the AI the exact, unambiguous blueprint it needs. You stop being a code-typist and become a software architect. You define the absolute truth (the test), and the AI does the manual labor (the implementation).</p><h4>The Human Touch</h4><p>Software engineering is about solving human problems reliably. As AI democratizes the ability to write boilerplate code, the distinguishing factor of a high-impact developer won’t be how fast they type out an API. It will be their ability to validate, secure, and guarantee the systems they build.</p><p>The bots can have the boilerplate. I’ll keep the peace of mind that comes with a green test suite.</p><p>How has AI changed your workflow? Are you writing more tests to keep the AI in check, or fewer? Let’s discuss in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=921f3372b645" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MCP vs. API: Why Traditional APIs Are Failing AI Agents]]></title>
            <link>https://askchiran.medium.com/mcp-vs-api-why-traditional-apis-are-failing-ai-agents-15b891482d2c?source=rss-465b1d7bdbf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/15b891482d2c</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[tech-trends]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Chiran Jeewantha]]></dc:creator>
            <pubDate>Thu, 23 Jul 2026 14:18:09 GMT</pubDate>
            <atom:updated>2026-07-23T14:18:09.026Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lgk1BnO_7dAHweFcpzfd0w.png" /><figcaption>cover image</figcaption></figure><p>If you have spent any time building across the stack in recent years, you are intimately familiar with APIs. They are the universal handshake of the web. You define an endpoint, send a request with a perfectly structured JSON payload, and you get a predictable response back.</p><p>For traditional software, this is perfect. But as we rush to integrate Large Language Models (LLMs) and AI agents into our applications, a frustrating reality is setting in: traditional APIs are actually becoming a bottleneck.</p><p>Here is a look at why APIs are struggling to keep up with the demands of AI, and why a new standard the Model Context Protocol (MCP) is being called the biggest architectural shift since the API itself.</p><h4><strong>The Problem: APIs Were Built for Code, Not Context</strong></h4><p>When a traditional software program talks to another program, it knows exactly what to expect.</p><p>But when an AI model enters the picture, everything changes. Models don’t just want to call a single endpoint. They want to chain ten endpoints together. They need to interpret unstructured data, ask follow-up questions, and reason about what to do next.</p><p>Think of a traditional API like a locked cabinet. To get what you want, you need to know exactly which drawer to open and the exact shape of the key. But an AI model is trying to understand what is inside the cabinet without clear labels. It doesn’t inherently know which function to call or which parameters to pass.</p><h4>Historically, we have solved this through brute force: Prompt Engineering.</h4><p>If you were building an AI support agent connected to Gmail, Notion, and Jira using traditional APIs, you would have to write custom code for each integration (handling auth, pagination, rate limits) and then write massive, brittle prompts to teach the model how to use them: “When you want to create a Jira ticket, call this exact endpoint with these exact fields…”</p><p>It requires constant handholding. It isn’t scalable.</p><h4>Enter Model Context Protocol (MCP)</h4><p>To fix this, we need a way for models to autonomously discover and use tools without us hardcoding every step. That is exactly what the Model Context Protocol (MCP) was built to do.</p><p>Instead of the model needing to be manually taught about each endpoint, MCP gives the model a standardized way to discover what a tool can do, what inputs it expects, and what outputs it returns all through context.</p><p>It is like giving the AI a live, machine-readable map of your backend environment. You don’t tell the model how to do it; you give it the context, and it figures it out dynamically.</p><h4>Does MCP Replace APIs?<br>The short answer is: No.</h4><p>APIs are still the foundation. They are how your systems actually function. MCP doesn’t replace your backend; it replaces the middleware between the model and the API.</p><p>An MCP server sits right next to your service or data source. It acts as a smart translator, converting your existing APIs into a semantic format that models can understand automatically using JSON schemas.</p><h4>The distinction comes down to the client:</h4><p>With an API, the client is another software program.</p><p>With MCP, the client is the AI model itself.</p><p>You build one MCP interface, and suddenly any compliant AI whether it’s Gemini, Claude, or GPT can instantly understand and interact with your backend securely, without you having to rewrite code for each specific model.</p><h4>The “HTTP” of the AI Era</h4><p>Think about the moment HTTP unified the internet. Before HTTP, we had fragmented protocols like FTP, Gopher, and Telnet. Once the web standardized on HTTP, everything became interoperable.</p><p>MCP is attempting to do the exact same thing for AI agents.</p><p>We are moving away from building systems strictly for humans and hard-coded software, and moving toward model-native software architecture. We are building shared ecosystems where context, tools, and reasoning can live in harmony.</p><p>If you are building agentic systems today, shifting your mindset from “<strong>endpoints and routes</strong>” to “<strong>capabilities and context</strong>” is going to be your biggest advantage.</p><p><em>What are your thoughts on MCP? Have you started experimenting with it in your stack yet? Let’s discuss in the comments below.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15b891482d2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Making Your Database Work Harder Than It Has To: A Developer’s Guide to Indexing]]></title>
            <link>https://askchiran.medium.com/stop-making-your-database-work-harder-than-it-has-to-a-developers-guide-to-indexing-458bdef7dbd6?source=rss-465b1d7bdbf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/458bdef7dbd6</guid>
            <category><![CDATA[database-design]]></category>
            <category><![CDATA[tech-tips]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Chiran Jeewantha]]></dc:creator>
            <pubDate>Sun, 05 Jul 2026 14:57:06 GMT</pubDate>
            <atom:updated>2026-07-05T14:57:06.311Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JCp-Q-XIPfzdAc5Nf60ECw.png" /><figcaption>cover image</figcaption></figure><p>We’ve all been there: staring at a loading spinner on the frontend, wondering why a simple API call is suddenly taking forever to resolve.</p><p>Early on, it’s incredibly easy to fall into a common developer trap: assuming the solution to a slow application is just throwing more server power at the problem or completely rewriting your backend logic. But in my experience building full-stack applications, whether I’m optimizing complex queries in a backend or trying to serve data instantly to a frontend UI, the most effective fix usually comes down to one fundamental concept: Database Indexing.</p><p>It is easily one of the most powerful tricks we have to take query times from agonizing seconds down to lightning-fast milliseconds.</p><p>But it’s a double-edged sword. If you index the wrong way — or try to index everything — you can actually drag your system’s performance down. Here is a practical breakdown of how database indexing actually works, when to use it, and when to look for alternatives.</p><p><strong>What Exactly is an Index?</strong></p><p>Think of a massive, 1,000-page reference book. If you need to find every mention of a specific topic, you aren’t going to read every single page from cover to cover. You flip to the Index at the back, find your keyword, and jump straight to the exact page number.</p><p>Database indexing does the exact same thing for your database tables. Instead of doing a full “table scan” (where the database is forced to read every single row to find a match), an index gives your database a shortcut to the exact location of the data it needs.</p><p><strong>How it Actually Works</strong></p><p>When you create an index on a column, the database doesn’t just remember it; it builds a separate, specialized data structure behind the scenes.</p><p>Most commonly, this is a B-Tree (Balanced Tree) or a Hash Table.</p><ul><li>B-Trees keep data sorted and allow for incredibly efficient searches, ranges, insertions, and deletions.</li><li>Hash Indexes are perfect for exact-match queries, mapping keys directly to values.</li></ul><p>Instead of scanning row by row like a slow snail, the database traverses this structured tree and retrieves your data almost instantly.</p><p><strong>Why It’s a Game-Changer</strong></p><p>When you implement indexing correctly, the benefits ripple across your entire stack:</p><ul><li>Massive Speed Boosts: Data retrieval (SELECT queries) becomes exponentially faster.</li><li>Reduced Server Load: Because the database isn’t working as hard to scan tables, your CPU overhead drops, saving valuable server resources.</li><li>Better User Experience: Faster database queries mean faster API responses, which translates to a snappy, seamless experience for the end-user.</li></ul><p><strong>Best Practices: Where Should You Use Indexes?</strong></p><p>Here is the golden rule: Do not index everything. You have to be strategic. You should typically apply indexes to:</p><ol><li>Primary and Foreign Keys: This is usually done by default, but it’s crucial for maintaining fast relationships between tables.</li><li>Columns frequently used in WHERE clauses: If your users are constantly searching for records by an email or status column, that column needs an index.</li><li>Columns used for JOIN conditions: Speeding up the bridge between two massive tables is essential.</li><li>Columns regularly used for sorting: If you frequently use ORDER BY or GROUP BY on a date or ID column, an index will prevent the database from having to sort the data on the fly every single time.</li></ol><p><strong>The Write Penalty</strong></p><p>Indexes are not free. This is the biggest catch that catches newer developers off guard.</p><p>Every single time you INSERT, UPDATE, or DELETE a row in your table, the database also has to update the underlying index structure. If you have ten indexes on a table, a single row insertion actually requires multiple write operations behind the scenes.</p><p>The Takeaway: Indexes are perfect for read-heavy tables. However, you need to be very cautious when applying them to write-heavy tables (like logging systems or real-time analytics), as too many indexes will severely slow down your write speeds.</p><p><strong>What if Indexing Isn’t Enough?</strong></p><p>Sometimes, you outgrow basic indexing. If your dataset is absolutely massive or your write operations are slowing down due to too many indexes, it’s time to look at architectural alternatives:</p><ul><li>Caching (e.g., Redis): Instead of hitting the database for frequently requested data, keep it in memory so it can be served instantly.</li><li>Database Partitioning: Break giant, monolithic tables down into smaller, more manageable pieces based on categories like date ranges.</li><li>Dedicated Search Engines (e.g., Elasticsearch): If you are building complex, full-text search features, offload that work from your primary database to a tool built specifically for searching text.</li></ul><p><strong>Over to You</strong></p><p>Database optimization is a continuous learning process. A single index can literally be the difference between a crashed server and a perfectly scaling application.</p><p>Have you ever accidentally brought a server to its knees because of a missing index, or experienced a massive speed boost after adding just one? Drop your database battle stories in the comments below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=458bdef7dbd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why we need an `ORM`?]]></title>
            <link>https://askchiran.medium.com/why-we-need-an-orm-78956e41a114?source=rss-465b1d7bdbf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/78956e41a114</guid>
            <category><![CDATA[orm]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[object-relational-mapping]]></category>
            <dc:creator><![CDATA[Chiran Jeewantha]]></dc:creator>
            <pubDate>Thu, 01 Aug 2024 11:22:04 GMT</pubDate>
            <atom:updated>2024-08-01T11:22:04.603Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2X1-9Bg1U_zL8ymlFHtA9g.png" /></figure><p>In today’s fast-paced software development environment, managing databases efficiently and securely is crucial. Have you ever found yourself tangled in a web of complex SQL queries and repetitive code when dealing with database operations?</p><p>Enter Object-Relational Mapping (ORM), a powerful technique that bridges the gap between object-oriented programming languages and relational databases. ORMs simplify database interactions, making them more intuitive and less error-prone.</p><p>This article aims to explain why using an ORM is essential for modern software development. We’ll explore its benefits, address common challenges in traditional database management, and highlight real-world use cases to demonstrate its value.</p><h4>What is an ORM?</h4><p>An ORM, or Object-Relational Mapper, is a programming tool that allows developers to interact with a database using the programming language of their choice. It automates the conversion of data between incompatible systems, specifically between an object-oriented language and a relational database.</p><p>At its core, an ORM maps database tables to classes and records to objects. This abstraction allows developers to perform database operations without writing raw SQL queries. Instead, they can use familiar programming constructs to interact with the data.</p><h4>What are the Challenges of Traditional Database Management ?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*FXeUVXHk05wnooYFHEPTnw.png" /></figure><ol><li><em>Writing </em><strong><em>manual SQL queries</em></strong><em> for every database operation can be time-consuming and error-prone. Each query must be carefully crafted to avoid syntax errors and ensure it performs the desired operation correctly.</em></li><li><em>In traditional database management, CRUD (Create, Read, Update, Delete) operations often result in </em><strong><em>duplicated code</em></strong><em> across the application. This not only clutters the codebase but also makes it harder to maintain and update.</em></li><li><strong><em>Handling schema changes manually</em></strong><em> is another significant challenge. Each change requires updates to SQL queries and careful coordination to ensure the application remains consistent with the database structure.</em></li></ol><h4>What are the Benefits of Using an ORM ?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*whqR3ZGUGVxOIe38YRELWQ.jpeg" /></figure><ol><li><em>ORMs abstract the database layer, allowing developers to interact with the database using the language’s syntax. This makes it </em><strong><em>easier to perform complex operations</em></strong><em> without delving into SQL.</em></li><li><em>By reducing the amount of boilerplate code and centralizing database interactions, ORMs enhance </em><strong><em>code readability and maintainability</em></strong><em>. Developers can focus on business logic rather than database details.</em></li><li><em>ORMs </em><strong><em>handle CRUD operations automatically</em></strong><em>, reducing the need for repetitive code. This automation streamlines development and ensures consistency across the application.</em></li><li><em>ORMs often come with tools for </em><strong><em>managing database schema changes</em></strong><em>. These tools can apply migrations, making it easier to evolve the database structure alongside the application.</em></li></ol><h4>How ORM Enhancing Productivity and Efficiency ?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JsXw-Qt-1QAUPFx-8Zdt-Q.png" /></figure><ul><li>By simplifying database interactions and automating common tasks, ORMs significantly speed up the development process. Developers can build features faster and with fewer errors.</li><li>ORMs enforce consistent data models across the application. This consistency helps maintain data integrity and reduces the risk of discrepancies between the application and the database.</li><li>Automated query generation and schema management reduce the likelihood of errors, such as SQL injection attacks. This improves the overall security and reliability of the application.</li></ul><h4>What are the Popular ORMs in the Industry ?</h4><ul><li><strong>Hibernate </strong>is a widely-used ORM for Java applications. It offers comprehensive mapping capabilities, query language support, and tools for managing database schema changes.</li><li><strong>Django </strong>ORM is an integral part of the Django framework. It provides an easy-to-use interface for defining and querying data models, making it a favorite among Python developers.</li><li><strong>Sequelize </strong>is a robust ORM for JavaScript applications, particularly those using Node.js. It supports multiple databases and offers powerful query capabilities and model validation.</li><li><strong>TypeORM </strong>is an ORM designed for TypeScript and JavaScript applications. It supports multiple databases, complex queries, and both Active Record and Data Mapper patterns.</li><li><strong>Eloquent </strong>ORM is a core component of the Laravel framework for PHP applications. It offers an elegant syntax for defining models and relationships, and supports advanced features like eager loading and query scopes.</li><li><strong>Entity Framework</strong> is a popular ORM for .NET applications. It simplifies data access by providing a high-level API for interacting with the database and supports various database providers.</li></ul><h4>Potential Drawbacks and Considerations</h4><ul><li>While ORMs offer many benefits, they can introduce some <strong>performance overhead</strong>. This is usually due to the abstraction layer and automated query generation. It’s important to evaluate the trade-offs and optimize where necessary.</li><li>For highly <strong>complex queries</strong> or performance-critical operations, raw SQL might be more efficient. Developers should be aware of the limitations of ORMs and use raw SQL when appropriate.</li><li>Adopting an ORM requires learning its specific <strong>syntax and conventions</strong>. While this initial investment pays off in the long run, it can be a hurdle for developers new to ORMs.</li></ul><p><em>In summary, ORMs provide a powerful and efficient way to manage database interactions in modern software development. They simplify database operations, enhance code readability, and improve productivity. Adopting an ORM can significantly streamline your development process and reduce the likelihood of errors. While there are some considerations to keep in mind, the benefits often outweigh the drawbacks. Explore and integrate an ORM into your projects to experience the advantages firsthand. By doing so, you’ll be able to focus more on delivering value to your users and less on managing database intricacies.</em></p><p><strong>Community and Support:</strong></p><ul><li><a href="https://stackoverflow.com/questions/tagged/orm">Stack Overflow ORM Questions</a></li><li><a href="https://github.com/topics/orm">GitHub ORM Repositories</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78956e41a114" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Choosing the Right Framework(2024): Unveiling the Strengths of Nest.js]]></title>
            <link>https://askchiran.medium.com/choosing-the-right-framework-2024-unveiling-the-strengths-of-nest-js-972433eed2fe?source=rss-465b1d7bdbf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/972433eed2fe</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[nestjs]]></category>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Chiran Jeewantha]]></dc:creator>
            <pubDate>Thu, 22 Feb 2024 12:25:52 GMT</pubDate>
            <atom:updated>2024-02-22T12:30:40.052Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Choosing the Right Framework(2024): Unveiling the Strengths of Nest.js and Express.js for Aspiring Developers</strong></h3><h3>1. Picking the Right Framework</h3><p>When it comes to developing with Node, there are many options, but Express and Nest.js stand out for those who want a strong, reliable, scalable, and stable application. In this article, we’ll focus on these two frameworks, making it easier for you to decide which one suits your needs.</p><p>Express and Nest.js are like two close friends, each offering something unique for developers. While many frameworks play essential roles in development, understanding the strengths of these two is crucial. They’re in a bit of a competition, and choosing the perfect one might seem challenging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yaQ7U-lo3tE9sPekF_f6hg.png" /></figure><p>If you’re just starting with Node.js development and are familiar with both Express.js and Nest.js, you’re in a good place. These frameworks are well-known and widely used, making them suitable for beginners. Express.js is especially popular, while Nest.js, although newer, brings its own strengths. Let’s take a closer look at both frameworks to help you make a better choice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cH6Gnkr3nUg3Cmws6jGlXA.png" /></figure><h3>2. Navigating the Building Blocks: Understanding Architecture in both frameworks.</h3><p>Building a web application is like constructing a house — you need a solid plan and the right tools. In the web development world, frameworks like Nest.js and Express.js provide the blueprints for this digital construction. Let’s take a closer look at the architectural structures of these two frameworks, making it as simple as building with Lego blocks.</p><h3>2.1 Express.js: The Minimalist’s Blueprint</h3><p>Express.js is like a minimalist architect’s dream. It believes in simplicity, giving developers the freedom to build their applications with fewer constraints. In the world of Express.js, everything revolves around routes and middleware.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*igsTOJNvPT5roAeEEwUn7Q.png" /></figure><h4>2.1.1 Routes: The Pathways of Your Application</h4><p>Think of routes as the pathways in your house. Each route guides the user to a different room or functionality. Here’s a simple example:</p><pre>// Setting up a route in Express.js<br>const express = require(&#39;express&#39;);<br>const app = express();<br><br>app.get(&#39;/&#39;, (req, res) =&gt; {<br>  res.send(&#39;Welcome to the living room!&#39;);<br>});<br><br>app.get(&#39;/kitchen&#39;, (req, res) =&gt; {<br>  res.send(&#39;Time to cook in the kitchen!&#39;);<br>});<br><br>// ...and so on</pre><p>In this example, going to the root URL (&#39;/&#39;) is like entering the living room, while going to &#39;/kitchen&#39; takes you to the kitchen. Simple, right?</p><h4>2.1.2 Middleware: The Helpers Along the Way</h4><p>Now, imagine middleware as the helpful hands that assist you along these pathways. They can check if you’re allowed to enter a room, modify something on the way, or even guide you to a different path. Here’s a glimpse:</p><pre>// Middleware example in Express.js<br>const checkPermission = (req, res, next) =&gt; {<br>  // Some logic to check if the user has permission<br>  if (userHasPermission) {<br>    next(); // Move on to the next step<br>  } else {<br>    res.status(403).send(&#39;Access denied!&#39;);<br>  }<br>};<br><br>app.use(checkPermission); // Applying middleware to all routes<br><br>// Now, every route will check permission before allowing access</pre><p>Express.js keeps it straightforward, making it an excellent choice for smaller projects or when you prefer a hands-on approach to construction.</p><h3>2.2 Nest.js: The Modular Architect’s Masterpiece</h3><p>Now, let’s switch gears to Nest.js — the modular architect’s masterpiece. Nest.js loves organization and believes in dividing your application into small, manageable pieces called modules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*JVo-2qenCDPlqJQWDxwGww.png" /></figure><h4>2.2.1 Modules: The Organized Toolkits</h4><p>Think of modules as separate toolkits for different parts of your house. Each toolkit (module) has its specific role and functionality. Let’s illustrate:</p><pre>// Creating a module in Nest.js<br>import { Module, Controller } from &#39;@nestjs/common&#39;;<br><br>@Module({<br>  controllers: [LivingRoomController],<br>})<br>export class LivingRoomModule {}<br><br>@Controller(&#39;/&#39;)<br>export class LivingRoomController {<br>  // Your route handlers go here<br>}</pre><p>In this Nest.js example, we’ve created a LivingRoomModule that houses the LivingRoomController. This controller is responsible for handling requests related to the living room. Each module is like a neatly organized toolkit for a specific purpose.</p><h4>2.2.2 Providers: The Handy Helpers</h4><p>Nest.js also introduces the concept of providers, which are like your handy helpers. They can be services, repositories, or anything you need to make your application function smoothly.</p><pre>// Provider example in Nest.js<br>import { Injectable } from &#39;@nestjs/common&#39;;<br><br>@Injectable()<br>export class HelperService {<br>  doSomething() {<br>    // Your helper service logic<br>  }<br>}</pre><p>Here, HelperService is a provider that can assist your controllers or other providers. Nest.js makes sure everything has its place and purpose.</p><h3>3. Validations</h3><p>Building a web application is like driving a car — you want to make sure it stays on the right path and follows the rules. In the world of web development, validations act as guardrails, ensuring that the data flowing through your application is safe and reliable. Nest.js, taking it a step further, introduces Data Transfer Objects (DTOs) to enhance the validation process. Let’s take a ride through how validations and DTOs work in Nest.js and compare it with the approach in Express.js, using simple examples that even a beginner driver — I mean, developer — can understand.</p><h3>3.1 Express.js: The Traffic Signs Approach</h3><p>Express.js, like a set of traffic signs, provides a straightforward way to guide and control the data traffic in your application. It offers middleware as a tool to implement validations and keep your data in check.</p><h4>3.1.1 Middleware: The Traffic Controllers</h4><p>Middleware in Express.js can be compared to traffic controllers who check every vehicle passing through. They ensure that the data follows the rules you’ve set. Let’s look at a simple example:</p><pre>// Middleware example for validation in Express.js<br>const express = require(&#39;express&#39;);<br>const app = express();<br><br>// Middleware to check if the request has a valid API key<br>const checkApiKey = (req, res, next) =&gt; {<br>  const apiKey = req.headers[&#39;api-key&#39;];<br><br>  if (apiKey &amp;&amp; apiKey === &#39;my-secret-key&#39;) {<br>    next(); // Move on to the next step if the key is valid<br>  } else {<br>    res.status(401).send(&#39;Invalid API key&#39;);<br>  }<br>};<br><br>app.use(checkApiKey); // Applying middleware to all routes<br><br>// Your routes go here, and they will only be accessible if the API key is valid</pre><p>In this example, the checkApiKey middleware acts as a guardrail, making sure that requests without a valid API key don&#39;t get through. It&#39;s like a traffic sign saying, &quot;No entry without the right key!&quot;</p><h3>3.2 Nest.js: The Traffic Control Center with DTOs</h3><p>Nest.js takes validations to the next level by providing decorators that act as your dedicated traffic control officers. These decorators help define the rules directly in your controllers. Introducing DTOs into Nest.js adds an extra layer of validation before data even reaches your controllers.</p><h4>3.2.1 Decorators and DTOs: The Dedicated Officers with Precise Instructions</h4><p>Decorators in Nest.js are like dedicated officers stationed at specific points, ensuring that data adheres to the rules. Let’s see an example with DTOs:</p><pre>// Validation example with decorators and DTOs in Nest.js<br>import { Controller, Get, Query } from &#39;@nestjs/common&#39;;<br><br>class GetCarsDto {<br>  color: string;<br>}<br><br>@Controller(&#39;/cars&#39;)<br>export class CarsController {<br>  @Get()<br>  getCars(@Query() params: GetCarsDto) {<br>    // Your logic goes here, and params.color is guaranteed to be a string<br>  }<br>}</pre><p>In this Nest.js example, we introduced the GetCarsDto class, which serves as a DTO, specifying the expected structure of the incoming data. The @Query decorator ensures that the parameters in the request adhere to this structure. It&#39;s like a traffic control officer checking not only the type but also the precise details of the vehicles passing through.</p><h3>4. Exploring the Database Landscape</h3><p>Building a web application is like creating a story, and the database is the library where all the information is stored. In the realm of web development, frameworks like Nest.js and Express.js offer unique approaches to connect and interact with databases. Let’s embark on a journey to understand how these frameworks handle databases, with examples that even a library-loving beginner developer can comprehend.</p><h4>4.1 Express.js: The DIY Library Explorer</h4><p>Express.js, like a do-it-yourself library explorer, gives developers the freedom to choose how they want to interact with databases. It doesn’t prescribe a specific library or method, allowing you to handpick the tools that best suit your needs.</p><p>Middleware in Express.js can be compared to tools in your library explorer kit. You can choose different libraries, like Mongoose or Sequelize, to navigate and interact with your database.</p><p>Here’s a simplified example using Mongoose for MongoDB:</p><pre>// Example using Mongoose with Express.js<br>const express = require(&#39;express&#39;);<br>const mongoose = require(&#39;mongoose&#39;);<br>const app = express();<br><br>mongoose.connect(&#39;mongodb://localhost/library&#39;, { useNewUrlParser: true, useUnifiedTopology: true });<br><br>const BookSchema = new mongoose.Schema({<br>  title: String,<br>  author: String,<br>});<br><br>const Book = mongoose.model(&#39;Book&#39;, BookSchema);<br><br>app.get(&#39;/books&#39;, async (req, res) =&gt; {<br>  const books = await Book.find();<br>  res.json(books);<br>});<br><br>app.listen(3000, () =&gt; {<br>  console.log(&#39;Server is running on port 3000&#39;);<br>});</pre><p>In this example, we use Mongoose, a popular library for MongoDB, to define a schema for books and fetch all books from the database when someone visits the ‘/books’ endpoint. It’s like exploring the library shelves and listing all the available books.</p><h4>4.2 Nest.js: The Library Catalog with Decorators</h4><p>Nest.js, akin to a well-organized library catalog, introduces decorators and a built-in module system to seamlessly integrate databases into your application. It follows a more structured approach, making it a great choice for those who appreciate organization.</p><p>Decorators in Nest.js act as the labels on the library shelves, providing clear instructions on how to interact with the database. Let’s see a simple example using TypeORM for a PostgreSQL database:</p><pre>// Example using TypeORM with Nest.js<br>import { Module, Controller, Get } from &#39;@nestjs/common&#39;;<br>import { TypeOrmModule } from &#39;@nestjs/typeorm&#39;;<br>import { Entity, Column, PrimaryGeneratedColumn } from &#39;typeorm&#39;;<br><br>@Entity()<br>class Book {<br>  @PrimaryGeneratedColumn()<br>  id: number;<br><br>  @Column()<br>  title: string;<br><br>  @Column()<br>  author: string;<br>}<br><br>@Controller(&#39;/books&#39;)<br>class BooksController {<br>  constructor(private readonly bookService: BookService) {}<br><br>  @Get()<br>  async getBooks() {<br>    return await this.bookService.findAll();<br>  }<br>}<br><br>@Module({<br>  imports: [TypeOrmModule.forRoot(), TypeOrmModule.forFeature([Book])],<br>  controllers: [BooksController],<br>  providers: [BookService],<br>})<br>class BooksModule {}<br><br>class BookService {<br>  async findAll(): Promise&lt;Book[]&gt; {<br>    return await Book.find();<br>  }<br>}</pre><p>In this Nest.js example, we use TypeORM to create a Book entity, a service to fetch all books, and a controller to handle requests. Decorators like @Entity and @Column provide clear instructions on how to define the database structure. It&#39;s like consulting a well-organized library catalog to find and fetch books.</p><h3>5. Unpacking Performance</h3><p>When it comes to building web applications, performance is like the speed of your favorite race car. In the world of web development, frameworks like Nest.js and Express.js are the engines that power your digital race car. Let’s delve into the realm of performance in these frameworks without getting tangled in technical jargon</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*k8Z5VJovrdxmeXo2XNFbnA.jpeg" /></figure><h4>5.1 Express.js: The Sprinter</h4><p>Express.js is like a nimble sprinter. It’s quick, lightweight, and gets the job done in a flash. If your goal is to build a small to medium-sized application, Express.js is your go-to sprinter. Its simplicity and minimalism make it a speedy choice for simpler projects.</p><blockquote><strong>Features:</strong></blockquote><blockquote>- Forms the backend component of the MEAN stack (MongoDB, ExpressJS, AngularJS, NodeJS).<br>- Designed for building APIs, web applications, and mobile apps, catering to single-page and multi-page applications.<br>- Utilizes middleware modules for handling HTTP requests, sessions, and other tasks.<br>- Easily connects with databases such as MongoDB, Redis, MySQL, etc.<br>- Employs a sophisticated routing mechanism and offers template engines for dynamic content creation.</blockquote><p><strong><em>Pros:</em></strong></p><p><em>Enables quick and easy web application development, saving coding time.</em></p><p><em>Easy to learn, especially for those familiar with JavaScript.</em></p><p><em>Strong and supportive online community, providing a wealth of resources.</em></p><p><strong><em>Cons:</em></strong></p><p><em>Error messages might be challenging to understand for beginners.</em></p><p><em>May face callback issues, which could complicate asynchronous programming.</em></p><p><em>More suitable for small to medium-sized projects, lacking optimal scalability for large projects.</em></p><h4>- Key Points:</h4><ul><li><em>Lightweight and quick to set up.</em></li><li><em>Ideal for smaller applications and quick development.</em></li><li><em>Well-suited for microservices architecture.</em></li></ul><h4>5.2 Nest.js: The Marathon Runner</h4><p>Nest.js, on the other hand, is the marathon runner of frameworks. It’s built for endurance, scalability, and handling larger, complex applications. If you’re envisioning a big, long-term project, Nest.js is designed to go the distance. Its modular structure and TypeScript support contribute to a more organized and scalable development process.</p><blockquote><strong>Features:</strong><br>- Leverages TypeScript, blending OOP, FP, and FRP elements.<br>Platform agnostic, initially using Express but adaptable to various HTTP frameworks.<br>- Compatible with multiple databases like PostgreSQL, MongoDB, MySQL, Redis, and Apache Cassandra.<br>- Provides extensive functionalities, APIs, and libraries to streamline development.<br>- Offers built-in Dependency Injection container for cleaner and readable code.<br>- Organizes code into modules, promoting modular and reusable chunks.<br>Facilitates building both Monoliths and Micro-services.<br>- Easily integrates with technologies like Mongoose, TypeORM, GraphQL, and supports logging, validation, caching, and Web Sockets.</blockquote><p><strong><em>Pros:</em></strong></p><p><em>Takes advantage of TypeScript, enhancing code reliability and readability.<br>Active Development:</em></p><p><em>Maintains an actively developed codebase with detailed documentation.</em></p><p><em>User-friendly, easy to learn, and comes with a powerful CLI for efficient development.</em></p><p><strong><em>Cons:</em></strong><br><em>Requires knowledge of TypeScript, which might be a learning curve for some developers.</em></p><p><em>Relatively smaller user base compared to more established frameworks, leading to less online support.</em></p><h4>- Key Points:</h4><ul><li><em>Structured and modular for larger applications.</em></li><li><em>Built-in support for TypeScript enhances code organization.</em></li><li><em>Suitable for projects that require scalability and maintainability.</em></li></ul><h4>5.3 Comparing the Racers:</h4><h4>~ Speed:</h4><ul><li><em>Express.js is like a sprinter, quickly handling smaller tasks.</em></li><li><em>Nest.js is a marathon runner, built for long-term and larger projects.</em></li></ul><h4>~ Complexity:</h4><ul><li><em>Express.js excels in simplicity, making it great for straightforward projects.</em></li><li><em>Nest.js shines in handling complexity, providing a more organized structure.</em></li></ul><h4>~ Development Approach:</h4><ul><li><em>Express.js is ideal for rapid development and smaller tasks.</em></li><li><em>Nest.js suits projects where long-term scalability and maintainability are key.</em></li></ul><h4>~ TypeScript Support:</h4><ul><li><em>Express.js primarily uses JavaScript.</em></li><li><em>Nest.js has built-in support for TypeScript, adding static typing for better code organization.</em></li></ul><h3>6. Conclusion</h3><p>In the realm of web development, NestJS and ExpressJS emerge as prominent players, each with its unique strengths and considerations.</p><p>NestJS stands out for its versatility, leveraging TypeScript and offering a modular structure that simplifies building scalable server-side applications. With an extensive feature set, it seamlessly integrates with various databases and technologies, providing a robust foundation for both monolithic and microservices architectures.</p><p>On the other hand, ExpressJS is celebrated for its simplicity and efficiency. As the backend powerhouse of the MEAN stack, it excels in quickly building APIs and web applications. Its straightforward approach and strong community support make it an excellent choice for small to medium-sized projects.</p><p>In the end, the choice between NestJS and ExpressJS boils down to the complexity and scale of your project. For those seeking a versatile and structured framework with TypeScript advantages, NestJS shines. Meanwhile, ExpressJS remains a reliable and efficient option, particularly for rapid development and community support. Whether you opt for the structured elegance of NestJS or the straightforward efficiency of ExpressJS, both frameworks offer pathways to successful web development endeavors.</p><p><strong><em>For those looking to dive deeper into the world of NestJS and ExpressJS, I recommend exploring the following resources:</em></strong></p><blockquote><a href="https://docs.nestjs.com/">NestJS Documentation:</a> Delve into the official NestJS documentation for comprehensive insights into the framework’s features, functionalities, and best practices.</blockquote><blockquote><a href="https://expressjs.com/en/guide/routing.html">ExpressJS Documentation:</a> Explore the ExpressJS documentation to gain a deeper understanding of the framework’s capabilities, middleware usage, and efficient routing mechanisms.</blockquote><blockquote><a href="https://www.typescriptlang.org/docs/handbook/intro.html">TypeScript Documentation</a>: If you’re new to TypeScript, the official TypeScript documentation provides valuable information on the language NestJS is built upon.</blockquote><p><em>Happy coding and exploring!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=972433eed2fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s talk about Version Controlling.]]></title>
            <link>https://askchiran.medium.com/lets-talk-about-version-controlling-3e09789a4bdd?source=rss-465b1d7bdbf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e09789a4bdd</guid>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Chiran Jeewantha]]></dc:creator>
            <pubDate>Fri, 16 Feb 2024 04:43:31 GMT</pubDate>
            <atom:updated>2024-02-16T04:43:31.048Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is Version Controlling?</h3><p>Version control is a crucial aspect of modern software development, acting as a systematic way to manage changes in a project’s code base. It provides a structured approach to tracking alterations, facilitating collaboration among developers, and ensuring the integrity and stability of software applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tMiy5uMYSxNB6KY3LHGYag.jpeg" /></figure><p>In the earlier days of software development, version control was a manual process, often involving the creation of multiple copies of code files or the use of rudimentary tracking systems. This approach was error-prone and time-consuming, leading to difficulties in coordinating development efforts and identifying the origins of issues.</p><p>The evolution from manual version control to contemporary tools marks a significant stride in the efficiency and productivity of software development teams. With the advent of version control systems like Git, Mercurial, and Subversion, developers gained the ability to track changes, manage different versions of the code simultaneously, and collaborate seamlessly across distributed teams.</p><p>Today, version control is an integral part of the software development life-cycle, providing developers with the means to work concurrently on a project, roll back to previous states if needed, and merge changes effortlessly. This evolution has not only streamlined the development process but also contributed to the establishment of best practices, enhancing code quality and project manageability.</p><h3>Why Version Controlling?</h3><p>In the dynamic landscape of software development, version control emerges as an indispensable tool, addressing critical challenges that developers face in the absence of systematic control over code changes. Understanding its importance involves recognizing the potential pitfalls and inefficiencies that can arise without a robust version control system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*u2tivGYJjUhdLLheLwqftA.jpeg" /></figure><p><strong><em>Challenges without Version Control:</em></strong></p><p>One of the primary challenges in a version control-less environment is the heightened risk of code conflicts. Imagine multiple developers working on different aspects of a project simultaneously. Without version control, integrating their changes becomes a manual, error-prone process, often leading to conflicts that can jeopardize the stability of the code base.</p><p>Loss of work is another ominous specter haunting the absence of version control. Without a structured system to track changes, reverting to a previous state or identifying the source of an issue becomes an arduous task. Code alterations made by one team member may inadvertently overwrite the contributions of another, resulting in the inadvertent loss of valuable work.</p><p><strong><em>Enhancing Collaboration and Project Management:</em></strong></p><p>Version control serves as a linchpin for collaboration, allowing developers to work concurrently on different branches of a project. It promotes seamless integration of code changes, reducing the likelihood of conflicts and providing a unified platform where developers can contribute without stepping on each other’s toes.</p><p>Furthermore, version control systems enhance project management by offering a clear timeline of changes. Developers can pinpoint when specific features were added, bugs were introduced, or improvements were made. This historical context is invaluable for troubleshooting, auditing, and ensuring the overall stability and reliability of the software.</p><p>In essence, version control is not merely a technical necessity, it’s a collaborative and organizational asset that empowers development teams to work efficiently, mitigates risks, and ultimately contributes to the success of software projects.</p><h3>How Version Controlling?</h3><p>Implementing version control involves choosing a methodology that aligns with the collaborative needs of a development team. Two prominent approaches are centralized version control systems (<strong>CVCS</strong>) and distributed version control systems (<strong>DVCS</strong>), each with its own set of advantages and considerations.</p><p><strong><em>Centralized vs. Distributed Version Control Systems:</em></strong></p><p><em>Centralized Version Control Systems (</em><strong><em>CVCS</em></strong><em>):</em></p><p>In a <strong>CVCS</strong>, there exists a central repository that stores the entire version history of the project. Developers work with a local copy of the code and synchronize their changes with the central repository. Examples include CVS (Concurrent Versions System) and SVN (Subversion). While <strong>CVCS</strong> facilitates collaboration, it has limitations, such as a single point of failure and dependency on a network connection to access the full version history.</p><p><em>Distributed Version Control Systems (</em><strong><em>DVCS</em></strong><em>):</em></p><p>Paradoxically, <strong>DVCS</strong> provides each developer with a complete repository, including the entire version history. Git and Mercurial are prominent examples of <strong>DVCS</strong>. This decentralization offers increased flexibility and resilience. Developers can work independently, committing changes locally, and later synchronize with other repositories. <strong>DVCS</strong> mitigates the risks associated with a single central point of failure and allows for more streamlined offline work.</p><p><strong><em>Common Version Control Practices and Workflows:</em></strong></p><p>Branching and Merging: Version control systems facilitate branching, allowing developers to create separate lines of development. This is particularly useful for working on new features, bug fixes, or experiments without affecting the main code base. Merging involves combining different branches, ensuring a smooth integration of changes.</p><p><em>Pull Requests and Code Reviews:</em></p><p>In collaborative environments, pull requests are commonly used to propose changes to the main code base. This practice enables peer review, where team members can assess the proposed changes for code quality, adherence to coding standards, and potential issues before merging.</p><p><em>Continuous Integration (CI) and Continuous Deployment (CD):</em></p><p>Integration of version control with <strong>CI/CD pipelines</strong> automates the testing and deployment processes. This ensures that changes made by developers are thoroughly tested and seamlessly deployed to production environments, reducing the likelihood of introducing bugs or issues.</p><p>Adopting these version control practices and workflows empowers development teams to collaborate efficiently, manage code changes effectively, and maintain a robust and reliable software development process.</p><h3>What is Git?</h3><p>In the realm of version control systems, Git stands out as a powerful and widely adopted tool, revolutionizing the collaborative aspects of software development. Git is not just a version control system; it is a distributed version control system (<strong>DVCS</strong>), setting it apart from its predecessors and influencing the way developers collaborate on projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*Z2TqTel4f1NYAVfpcYtmTQ.jpeg" /></figure><p><strong><em>Defining Git as a Distributed Version Control System:</em></strong></p><p>Git’s distributed nature is a key aspect of its design. Unlike centralized version control systems (<strong>CVCS</strong>), each developer in a Git environment possesses a complete repository, including the entire version history. This decentralization allows developers to work independently, making local commits, branching, and merging changes seamlessly. The distributed model enhances flexibility, enabling developers to work offline and fostering a more resilient and collaborative development process.</p><p><strong><em>The Genesis by Linus Torvalds:</em></strong></p><p>Git was conceived and created by Linus Torvalds, the visionary behind the Linux operating system. Torvalds initiated the development of Git in 2005, aiming to address the limitations he encountered with existing version control systems while managing the Linux kernel’s massive code-base and the collaborative efforts of a global community of contributors.</p><p>Torvalds’ vision for Git was to create a system that would be fast, efficient, and capable of handling large projects with speed and reliability. Git’s design philosophy reflects these principles, emphasizing performance and scalability, making it an ideal choice for projects of varying sizes and complexities.</p><p>Since its inception, Git has become the de facto standard for version control in the software development industry. Its popularity is not only attributed to its robust and distributed architecture but also to the thriving ecosystem around it, including hosting services like GitHub, GitLab, and Bit-bucket. Git’s impact on collaborative software development is profound, shaping the way teams manage and collaborate on code, and influencing the broader <em>Dev-Ops</em> landscape.</p><h3>About Git Services: Git-Hub, Git-Lab, Bit-bucket</h3><p><strong><em>GitHub:</em></strong></p><p>GitHub stands as a cornerstone in the world of version control and collaboration. It is a web-based platform designed for hosting Git repositories, making it a hub for developers to store, manage, and collaborate on projects. GitHub provides a user-friendly interface, enabling seamless navigation through code repositories, issues, and project documentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*WaaXnUvhvrswhBJSw4YTuQ.png" /></figure><p>Emphasizing its popularity in open-source projects, GitHub has become the go-to platform for many developers and organizations to share, contribute to, and collaborate on open-source software. The platform’s social features, such as pull requests, issues, and discussions, foster a vibrant ecosystem for community-driven development. GitHub has played a pivotal role in democratizing software development, making it accessible and transparent for a global audience.</p><p><strong><em>Git Lab:</em></strong></p><p>Git Lab positions itself not just as a version control platform but as a comprehensive DevOps life-cycle platform. In addition to offering Git repository hosting, Git Lab integrates seamlessly with various DevOps tools, providing a unified environment for source code management, continuous integration (CI), continuous deployment (CD), and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XV6YkiOe_UPhAExSntyadA.png" /></figure><p>Git Lab is available in both self-hosted and cloud options, allowing flexibility in deployment. The self-hosted option empowers organizations to have full control over their infrastructure and data, while the cloud version offers the convenience of a managed service. The platform’s commitment to DevOps practices makes it a compelling choice for teams seeking an end-to-end solution for their software development life-cycle.</p><p><strong><em>Bit bucket:</em></strong></p><p>Bit bucket, an Atlassian product, distinguishes itself by offering support not only for Git repositories but also for Mercurial, providing flexibility for teams with varied version control preferences. As a web-based platform, Bitbucket facilitates version control, collaboration, and code management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m7Z6IwBk7BDHk_r0_tJecw.png" /></figure><p>Bit-bucket’s integration with Jira, another popular Atlassian product, enhances project management by linking code changes to specific issues and enabling a holistic view of the development process. This tight integration with Atlassian’s suite of tools, along with support for both Git and Mercurial, positions Bitbucket as a versatile choice for teams looking for an integrated development environment.</p><p>In summary, GitHub, Git Lab, and Bit-bucket represent the vanguard of modern version control services, each offering unique features and strengths. The choice among them depends on specific project requirements, team preferences, and the overall development workflow.</p><h3>Main Git Commands</h3><p><strong><em>Git Add:</em></strong></p><p>The git add command plays a pivotal role in the Git workflow by allowing developers to stage changes before committing them. Staging serves as a way to selectively choose which modifications should be included in the upcoming commit. By using git add, developers can control the granularity of their commits, grouping related changes together and excluding others. This fine-tuned staging process ensures that commits are coherent, focused, and contribute meaningfully to the project&#39;s version history.</p><p><strong><em>Git Commit:</em></strong></p><p>Once changes are staged using git add, the git commit command is employed to capture a snapshot of the staged modifications. A commit represents a coherent and atomic set of changes, complete with a commit message that succinctly describes the purpose of the modifications. Commits serve as milestones in the project&#39;s development, providing a chronological history of alterations, which proves invaluable for debugging, collaboration, and project management.</p><p><strong><em>Git Push/Pull:</em></strong></p><p>Git push and git pull are commands crucial for collaborative development in a distributed version control system. With git push, developers send their committed changes to a remote repository, making them accessible to others. This facilitates collaboration by allowing team members to share their work. Conversely, git pull is used to fetch changes from a remote repository and merge them into the local working copy. This ensures that a developer&#39;s local branch is up-to-date with the latest changes made by others.</p><p><strong><em>Git Merge:</em></strong></p><p>Branching is a fundamental concept in Git, enabling developers to work on features, bug fixes, or experiments independently. The git merge command is employed to combine changes from one branch into another, typically merging a feature branch into the main branch. This process ensures that the changes made in separate branches are unified, allowing for the seamless integration of new features or bug fixes into the main code base.</p><p><strong><em>Git Fetch:</em></strong></p><p>While git pull fetches changes and automatically merges them into the local branch, git fetch retrieves changes from a remote repository without automatically merging them. This command is useful when a developer wants to inspect changes before incorporating them into their local branch. It allows for a more controlled and deliberate approach to integrating changes, reducing the risk of conflicts and providing a clearer understanding of the modifications made by others in the project.</p><h3>Conclusion:</h3><p>In conclusion, version control stands as the linchpin of modern software development, providing a systematic approach to managing code changes and facilitating collaborative efforts among development teams. Throughout this exploration, we delved into the fundamentals of version control, understanding its evolution from manual processes to the sophisticated tools we have today.</p><p>We highlighted the pivotal role of version control in addressing challenges such as code conflicts and the potential loss of work, illustrating how it acts as a guardian of code integrity. Version control not only mitigates risks but also elevates collaboration and project management by offering streamlined workflows and practices.</p><p>Git, as a distributed version control system, emerged as a revolutionary force in the software development landscape. We explored its creation by Linus Torvalds and its profound impact on collaborative coding. GitHub, Git Lab, and Bit bucket, as hosting platforms, were presented as essential tools, each contributing uniquely to the collaborative development ecosystem.</p><p>The main Git commands, from staging changes with git add to merging branches with git merge, were examined, showcasing the practical aspects of version control in everyday development tasks. These commands, combined with effective version control practices, create a robust foundation for managing code changes and fostering collaboration.</p><p>In essence, version control is not just a technical necessity; it is a catalyst for innovation, efficiency, and reliability in software development. Its importance cannot be overstated, serving as a cornerstone that enables teams to work seamlessly, manage complex projects with clarity, and adapt to the ever-evolving demands of the development landscape. As we navigate the future of software development, version control remains a cornerstone, ensuring the success and sustainability of projects in a fast-paced and collaborative world.</p><p>For those eager to delve deeper into the intricacies of version control, I recommend exploring the following resources:</p><ul><li><a href="https://git-scm.com/doc">Git Documentation</a> for an in-depth understanding of Git.</li><li><a href="https://github.com/topics/documentation">GitHub Guides</a> for practical tutorials and best practices.</li><li><a href="https://docs.gitlab.com/">Git-Lab Documentation</a> for insights into Git-Lab’s features and functionalities.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e09789a4bdd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction for Cloud Storage]]></title>
            <link>https://askchiran.medium.com/introduction-for-cloud-storage-ebd21808490?source=rss-465b1d7bdbf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebd21808490</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[cloud-storage-services]]></category>
            <category><![CDATA[icloud]]></category>
            <category><![CDATA[intro-about-cloud]]></category>
            <dc:creator><![CDATA[Chiran Jeewantha]]></dc:creator>
            <pubDate>Wed, 23 Dec 2020 07:39:50 GMT</pubDate>
            <atom:updated>2020-12-23T10:48:40.866Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g4bFZRZoNndtngMkuTtO2g.jpeg" /></figure><p><strong>What is cloud storage?</strong></p><p><em>Cloud storage is a cloud computing classic in which data is stored in remote servers accessed from the internet, or “cloud”. It is continued, operated and managed by a cloud storage service provider on stage servers that are built on virtualization methods.</em></p><p><em>cloud storage is also known as utility storage ,a term subject to differentiation based on actual implementation and service delivery.</em></p><p><strong>Advantages and Benefits</strong></p><ul><li>Trade capital expense for variable expense.</li><li>Benefit from massive economies of scale.</li><li>Stop guessing capacity.</li><li>stop spending money on running and maintaining data centers.</li><li>Go global in minutes.</li><li>Increase speed and agility.</li></ul><p><strong>Examples for cloud services</strong></p><ul><li><strong><em>iCloud</em></strong></li></ul><p>iCloud storage is a cloud storage computing service. It was launched on October 12,2011 as of 2013, the service has 320 million users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*czja_b-53UzlJLjJ6iQbCw.png" /></figure><p>iOS based devices, personal computer running OSX, Microsoft Windows based computers are examples of devices which use iCloud.</p><ul><li><strong><em>Google Drive</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*BU8sUaczTHI5JYubJsyl5Q.png" /></figure><p>Google drive is a file storage and synchronization service created by Google. It allows users to store files in the cloud synchronize files across devices, and share files. Users are given 15 GB free storage.</p><ul><li><strong><em>Microsoft OneDrive</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*-UdKhJiOyw4dBo4JEXKK0w.png" /></figure><p>Microsoft OneDrive is also an online storage service from Microsoft. OneDrive is formally known as SkyDrive, Windows 8.1 operating system. OneDrive is available over the web and can be downloaded as a desktop app. For earlier versions of Windows, Mac, Android, iOS, Windows phone and Xbox any kind of files cloud be stored in OneDrive. Example : photo, video, documents. And it is easy to find them. OneDrive is tightly integrated with Microsoft Office applications such as Microsoft Word, Microsoft PowerPoint.</p><p><strong><em>Thank you so much for reading the article.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebd21808490" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>