<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Sameer Kumar</title>
    <description>The latest articles on Forem by Sameer Kumar (@sameer_701).</description>
    <link>https://forem.com/sameer_701</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1984264%2Fc1e2963e-9386-4d8f-a92d-6430b8af7f59.jpg</url>
      <title>Forem: Sameer Kumar</title>
      <link>https://forem.com/sameer_701</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sameer_701"/>
    <language>en</language>
    <item>
      <title>Day 3 - Virtual Machine</title>
      <dc:creator>Sameer Kumar</dc:creator>
      <pubDate>Tue, 02 Dec 2025 18:30:00 +0000</pubDate>
      <link>https://forem.com/sameer_701/day-3-virtual-machine-37lg</link>
      <guid>https://forem.com/sameer_701/day-3-virtual-machine-37lg</guid>
      <description>&lt;h3&gt;
  
  
  The Initial Use of Resources
&lt;/h3&gt;

&lt;p&gt;Imagine you have a &lt;strong&gt;one-acre plot of land&lt;/strong&gt; in your village or hometown. You decide to build your dream house on this land, constructing a home for you and your family. You use the entire one acre of land to live comfortably. You have access to water, a garden, a park, and other resources, and you’re happily living in this space.&lt;/p&gt;

&lt;h3&gt;
  
  
  Realization: Wasting Resources
&lt;/h3&gt;

&lt;p&gt;After some time, you realize that even though you’re enjoying the one-acre property, you’re only using &lt;strong&gt;half of the land&lt;/strong&gt;. The other half remains unused, meaning much of the land and its resources are going to waste. You then start thinking of ways to use the extra land more efficiently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvkznkrj5skef6vce1int.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvkznkrj5skef6vce1int.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Efficient Use of Resources
&lt;/h3&gt;

&lt;p&gt;Instead of letting that &lt;strong&gt;unused half-acre&lt;/strong&gt; go to waste, you decide to build &lt;strong&gt;another property&lt;/strong&gt; on it. You keep living in your original home with your family, but now you rent out the second property. This means that without compromising your comfort, you are now using the entire one-acre efficiently and also generating extra income from the rented property.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sharing Resources Without Interference
&lt;/h3&gt;

&lt;p&gt;Even with another family renting the additional property, there’s no interference. Each household has its own space and resources. The tenant uses one-fourth of the property, while you and your family continue using the remaining three-fourths. Both families are living comfortably, utilizing water resources, parks, and gardens without disturbing each other.&lt;/p&gt;

&lt;h3&gt;
  
  
  Increased Efficiency and Optimization
&lt;/h3&gt;

&lt;p&gt;Now, instead of two people living on the land, &lt;strong&gt;four people&lt;/strong&gt; are living comfortably, and the resources are being used to their full potential. This is an example of improving efficiency by ensuring that &lt;strong&gt;nothing goes to waste&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The DevOps Connection
&lt;/h3&gt;

&lt;p&gt;In a similar way, the purpose of &lt;strong&gt;DevOps&lt;/strong&gt; is to improve efficiency, especially through &lt;strong&gt;automation&lt;/strong&gt;. As a DevOps engineer, your goal is to ensure that resources are being utilized in the best way possible. Whether working on platforms like AWS or Azure, your role is to optimize resource usage—ensuring that virtual machines and other resources are allocated properly, reducing waste, and improving overall system performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Concept of Cloud Servers
&lt;/h3&gt;

&lt;p&gt;Just as &lt;strong&gt;example.com&lt;/strong&gt; might purchase five servers from a company like HP, cloud providers such as Amazon, Microsoft, and Google do the same—but on a much larger scale. These providers buy or build millions of servers and store them in data centers around the world.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F750z872m5o4dmgs7hhlz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F750z872m5o4dmgs7hhlz.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Example: Amazon's Data Center in Mumbai
&lt;/h3&gt;

&lt;p&gt;Let’s take an example of Amazon's AWS data center in Mumbai. When a user, such as you or me, makes a request to Amazon for cloud services and selects Mumbai as the region, AWS will provide resources from that location. &lt;/p&gt;

&lt;h3&gt;
  
  
  Requesting a Virtual Machine (EC2 Instance)
&lt;/h3&gt;

&lt;p&gt;In AWS, you can request a &lt;strong&gt;virtual machine&lt;/strong&gt;—or, as Amazon calls it, an &lt;strong&gt;EC2 instance&lt;/strong&gt;. This is the same as asking for a virtual machine on any cloud platform, regardless of the terminology used. Once you select the Mumbai region, your request is sent to one of the physical servers in the Mumbai data center.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0gba0i1yprwa2w8fr556.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0gba0i1yprwa2w8fr556.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Role of Hypervisors
&lt;/h3&gt;

&lt;p&gt;These physical servers have &lt;strong&gt;hypervisors&lt;/strong&gt; installed, which are responsible for creating and managing virtual machines (VMs). When you request a virtual machine, the hypervisor creates one on the physical server and allocates the necessary resources.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Virtual Machines Operate
&lt;/h3&gt;

&lt;p&gt;In the world of cloud computing, whether it's AWS, Google Cloud, or Microsoft Azure, &lt;strong&gt;hypervisors&lt;/strong&gt; play a critical role. They enable cloud providers to efficiently allocate virtual machines from physical servers in data centers. So, when you request a virtual machine from a specific region, like Mumbai, the hypervisor ensures that your VM is created on one of the physical servers in that region.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scaling Beyond Physical Servers
&lt;/h3&gt;

&lt;p&gt;Imagine if Amazon’s Mumbai data center had 100 physical servers. In a traditional setup, each server could be allocated to just one user or team. This means only &lt;strong&gt;100 users or teams&lt;/strong&gt; could access the resources of that data center. However, with the introduction of &lt;strong&gt;virtual machines (VMs)&lt;/strong&gt; and &lt;strong&gt;hypervisors&lt;/strong&gt;, Amazon can now serve &lt;strong&gt;millions of users&lt;/strong&gt; with those same 100 physical servers.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Virtual Machines Enhance Efficiency
&lt;/h3&gt;

&lt;p&gt;By using &lt;strong&gt;hypervisors&lt;/strong&gt;, each physical server can host multiple virtual machines, allowing cloud providers like Amazon to &lt;strong&gt;maximize resource usage&lt;/strong&gt;. Instead of just 100 users having access, &lt;strong&gt;millions of users&lt;/strong&gt; can now utilize the resources provided by those servers, significantly improving efficiency.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzo28mpkzynex4aktixx3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzo28mpkzynex4aktixx3.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  A Leap in Technology
&lt;/h3&gt;

&lt;p&gt;If we go back 20 or 30 years, the concept of virtual machines didn’t exist. Back then, each organization had to rely on dedicated &lt;strong&gt;physical servers&lt;/strong&gt;, which limited scalability. The invention of virtual machines revolutionized how servers are used by allowing multiple users to share the same physical hardware.&lt;/p&gt;

&lt;h3&gt;
  
  
  Virtualization on Personal Devices
&lt;/h3&gt;

&lt;p&gt;You can even experience this on your &lt;strong&gt;personal laptop&lt;/strong&gt; today. For example, by installing &lt;strong&gt;Oracle VirtualBox&lt;/strong&gt;, you can create a virtual machine on your laptop. You could then share this virtual machine with others in your household, allowing multiple people to use the same laptop at the same time. While you use the main system, others can use the virtual machine—this is an example of how &lt;strong&gt;virtualization&lt;/strong&gt; has improved everyday processes.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>cloudcomputing</category>
      <category>learning</category>
    </item>
    <item>
      <title>Day 2 - Improve SDLC with DevOps</title>
      <dc:creator>Sameer Kumar</dc:creator>
      <pubDate>Sun, 30 Nov 2025 18:30:00 +0000</pubDate>
      <link>https://forem.com/sameer_701/day-2-improve-sdlc-with-devops-2g8f</link>
      <guid>https://forem.com/sameer_701/day-2-improve-sdlc-with-devops-2g8f</guid>
      <description>&lt;h3&gt;
  
  
  Understanding the Software Development Life Cycle (SDLC)
&lt;/h3&gt;

&lt;p&gt;When working in an organization, whether it's a startup, multinational corporation (MNC), or unicorn, there are specific standards and processes that are universally followed. These standards are crucial for ensuring the smooth functioning of the organization, especially in the software or IT industry. One of the most important of these standards is the &lt;strong&gt;Software Development Life Cycle (SDLC)&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the Software Development Life Cycle (SDLC)?
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Software Development Life Cycle&lt;/strong&gt; is a structured process used by the software industry to design, develop, and test software. It provides a systematic approach to ensure that high-quality software products are delivered to end users. Whether you're working at companies like Amazon, Flipkart, or Tesla, all organizations follow these core steps—&lt;strong&gt;design, develop, and test&lt;/strong&gt;—as part of their SDLC. &lt;/p&gt;

&lt;p&gt;While the SDLC might also involve additional phases, these three are at the heart of the process, ensuring that the final product meets customer expectations.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Key Phases of SDLC
&lt;/h3&gt;

&lt;p&gt;Let's break down the core phases involved in the SDLC:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Design Phase&lt;/strong&gt;: &lt;br&gt;
In this phase, the software architecture is created based on the requirements. It lays the foundation for the development phase and ensures that the product is built on a solid structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Development Phase&lt;/strong&gt;: &lt;br&gt;
Here, developers build the actual product based on the designs created in the previous phase. Code is written, and all the functional components of the application are implemented.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Testing Phase&lt;/strong&gt;: &lt;br&gt;
Once the development is complete, the product undergoes rigorous testing to identify and fix any bugs or issues. This phase ensures that the product functions as expected and meets quality standards.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  What is the End Goal of SDLC?
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;primary goal&lt;/strong&gt; of the SDLC is to deliver a &lt;strong&gt;high-quality product&lt;/strong&gt; that meets customer expectations. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why Testing is Crucial&lt;/strong&gt;: Imagine delivering a product that hasn't been tested. While it may have been well-designed and developed, the lack of testing means that issues and bugs could go unnoticed until it's in the hands of the customer. Without testing, you're risking delivering a product that fails to meet expectations, which can harm the company's reputation and customer satisfaction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, the SDLC helps ensure that every product:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is well-designed,&lt;/li&gt;
&lt;li&gt;Developed according to specifications, and&lt;/li&gt;
&lt;li&gt;Thoroughly tested to ensure high quality.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why Following the SDLC is Important
&lt;/h3&gt;

&lt;p&gt;Without following a standard process like the SDLC, it would be difficult to produce high-quality software. Each phase—&lt;strong&gt;design, development, and testing&lt;/strong&gt;—plays a critical role in delivering a successful product. Skipping or underestimating any of these phases can result in a subpar product that does not meet customer expectations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Practical Application: Diving Deeper into SDLC
&lt;/h3&gt;

&lt;p&gt;Now that we've covered the basics of the SDLC, let's move on to see how it applies in a practical context. We'll look at how an example organization might implement these steps to build and deliver high-quality software. Understanding these real-world applications will give you a clearer picture of the importance of each phase and how it all comes together in practice.&lt;/p&gt;




&lt;p&gt;When working in the software or IT industry, whether at a startup or a multinational corporation (MNC), there are standard processes followed by every organization. These standards are essential for understanding how to work efficiently within any company. One of the key standards is the &lt;strong&gt;Software Development Life Cycle (SDLC)&lt;/strong&gt;. It is a structured process that organizations use to design, develop, and test high-quality software products.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the Software Development Life Cycle (SDLC)?
&lt;/h2&gt;

&lt;p&gt;The SDLC is a process used across the software industry to guide the creation of software products. It involves a series of phases that ensure the successful development of software, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Designing&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Developing&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Testing&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These phases are standard regardless of the organization—whether you're working at Amazon, Flipkart, Tesla, or a smaller company. The goal is to deliver a high-quality product that meets customer expectations.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Importance of Testing in SDLC
&lt;/h3&gt;

&lt;p&gt;You might wonder, what happens if we skip testing? If a product is designed and developed but not thoroughly tested, there’s a risk of delivering a faulty or low-quality product to the customer. Testing ensures the product works as expected and meets the required standards. Without testing, there’s no guarantee that the software will function correctly in real-world scenarios.&lt;/p&gt;

&lt;p&gt;In summary, the SDLC is a &lt;strong&gt;cyclic&lt;/strong&gt; process that involves these steps at a high level:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Design&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Develop&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The ultimate goal is to deliver a high-quality product to customers.&lt;/p&gt;




&lt;h1&gt;
  
  
  Phases of the Software Development Life Cycle
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuie7l4pezmt3bxjftxc8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuie7l4pezmt3bxjftxc8.jpg" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's explore the key phases of the SDLC using a hypothetical e-commerce company, "example.com" (similar to Flipkart or Amazon), to understand how the process works in a real-world scenario.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Planning Phase
&lt;/h2&gt;

&lt;p&gt;The first step in any software project is the &lt;strong&gt;planning phase&lt;/strong&gt;, where you gather the requirements and ideas for the new feature or product. This phase is crucial as it lays the foundation for the entire project.&lt;/p&gt;

&lt;p&gt;For example, let's say the team at "example.com" decides to introduce a new &lt;strong&gt;kids' clothing section&lt;/strong&gt;. Previously, the platform only sold men’s and women’s clothing, but based on market research, the company decides to expand its offerings to include kids’ clothing.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Happens in the Planning Phase?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The product owner or business analyst gathers customer feedback and research.&lt;/li&gt;
&lt;li&gt;The team assesses whether the new feature (kids' clothing) would be beneficial based on customer demand.&lt;/li&gt;
&lt;li&gt;If the research supports the new feature, the idea moves forward. If not, the idea may be suspended at this stage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The planning phase is one of the most critical stages because it ensures that you are building something that customers want.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Defining &amp;amp; Requirements Phase
&lt;/h2&gt;

&lt;p&gt;Once the planning is done, the team moves to the &lt;strong&gt;requirements phase&lt;/strong&gt;, where they define the project’s specific needs. This involves documenting the exact details of the new feature.&lt;/p&gt;

&lt;p&gt;For example, in the case of the kids' clothing section:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The team documents the age range for the clothing (e.g., 6–12 years, 1–4 years).&lt;/li&gt;
&lt;li&gt;They create a &lt;strong&gt;Software Requirements Specification (SRS)&lt;/strong&gt; document, outlining everything the system should accomplish.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Designing Phase
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;designing phase&lt;/strong&gt; is where high-level and low-level design plans are created. This phase includes creating both a &lt;strong&gt;High-Level Design (HLD)&lt;/strong&gt; and a &lt;strong&gt;Low-Level Design (LLD)&lt;/strong&gt; for the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  High-Level Design (HLD)
&lt;/h3&gt;

&lt;p&gt;The HLD outlines the system architecture, scalability, and other overarching details. For example, the team might plan to ensure that the new kids' section is highly available and scalable, especially during peak times like Christmas.&lt;/p&gt;

&lt;h3&gt;
  
  
  Low-Level Design (LLD)
&lt;/h3&gt;

&lt;p&gt;The LLD focuses on the detailed components of the software, including specific functions, modules, and how different systems interact. The team specifies which databases, programming languages (Java, Python, etc.), and other technical details will be used.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Building Phase
&lt;/h2&gt;

&lt;p&gt;This is the &lt;strong&gt;development phase&lt;/strong&gt;, where the actual coding takes place. The engineering team builds the software based on the design specifications. &lt;/p&gt;

&lt;h3&gt;
  
  
  DevOps Role in the Building Phase
&lt;/h3&gt;

&lt;p&gt;As a DevOps engineer, this is where you can introduce automation tools to streamline the development process. Automating builds and deployments can save time and reduce errors.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Testing Phase
&lt;/h2&gt;

&lt;p&gt;After the software is built, it undergoes thorough testing to ensure that it functions correctly. The testing phase checks for bugs, performance issues, and overall functionality.&lt;/p&gt;

&lt;h3&gt;
  
  
  DevOps Role in Testing
&lt;/h3&gt;

&lt;p&gt;In this phase, DevOps engineers can implement continuous integration/continuous deployment (CI/CD) pipelines, automating testing to ensure faster feedback and bug fixes.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Deployment Phase
&lt;/h2&gt;

&lt;p&gt;Once the software passes all tests, it is &lt;strong&gt;deployed&lt;/strong&gt; to the live environment. This is the phase where the software is made available to the users.&lt;/p&gt;

&lt;h3&gt;
  
  
  DevOps Role in Deployment
&lt;/h3&gt;

&lt;p&gt;DevOps engineers play a critical role here by automating the deployment process, ensuring that new features or products are deployed with minimal downtime.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Maintenance &amp;amp; Updates
&lt;/h2&gt;

&lt;p&gt;The SDLC is cyclical. After deployment, if the team decides to introduce new features or updates (like adding more categories to the kids' section), they follow the same process again. This ensures a consistent and high-quality approach to software development.&lt;/p&gt;




&lt;h1&gt;
  
  
  The Role of DevOps in the SDLC
&lt;/h1&gt;

&lt;p&gt;As a DevOps engineer, your focus will be on automating the following phases:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Building&lt;/strong&gt;: Automating code builds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing&lt;/strong&gt;: Setting up continuous integration pipelines to automate tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment&lt;/strong&gt;: Ensuring smooth and efficient deployment processes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;While your primary focus might be on these phases, you should still understand the planning, defining, and design phases, as they directly impact the success of the project. Automation is the key to improving efficiency in the organization.&lt;/p&gt;




&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;In conclusion, the &lt;strong&gt;Software Development Life Cycle (SDLC)&lt;/strong&gt; is a process followed by organizations to design, develop, and test high-quality products. Each phase, from planning to deployment, plays a critical role in ensuring the success of the project. As a DevOps engineer, your role is to automate processes in the building, testing, and deployment phases, thereby improving the overall efficiency of the development lifecycle.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>devops</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Day 1 - Fundamentals Of DevOps</title>
      <dc:creator>Sameer Kumar</dc:creator>
      <pubDate>Sun, 30 Nov 2025 18:30:00 +0000</pubDate>
      <link>https://forem.com/sameer_701/day-1-fundamentals-of-devops-40bn</link>
      <guid>https://forem.com/sameer_701/day-1-fundamentals-of-devops-40bn</guid>
      <description>&lt;h3&gt;
  
  
  Understanding DevOps: A Single Definition Among Many
&lt;/h3&gt;

&lt;p&gt;There are countless definitions for DevOps depending on where you look. For instance, if you check Amazon or Red Hat, they each have their unique take on it. However, in simple terms, &lt;strong&gt;DevOps is a culture that enhances an organization’s ability to deliver applications efficiently.&lt;/strong&gt; The key focus here is on delivery—how quickly and reliably new features, fixes, or updates reach the end-users.&lt;/p&gt;

&lt;h3&gt;
  
  
  DevOps in Action: The PUBG Example
&lt;/h3&gt;

&lt;p&gt;To illustrate the importance of quick delivery, let’s consider a popular game like PUBG. Imagine there’s an issue with the game, or the developers want to introduce a new feature. If the development work is completed but it takes 10 days to deliver the new version due to multiple stages like unit testing, staging, and final production, that’s not ideal. &lt;/p&gt;

&lt;p&gt;In today’s world, where time is critical, such a delay is unacceptable. For instance, if your Android device has a security vulnerability, Android would release a patch immediately, urging all users to update their devices. &lt;strong&gt;This rapid delivery is what DevOps aims to achieve—ensuring that updates, bug fixes, and features are deployed within hours, not days or weeks.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  More Than Just Delivery: The Pillars of DevOps
&lt;/h3&gt;

&lt;p&gt;While delivering quickly is crucial, DevOps is not just about speed. Several key components are necessary to ensure effective delivery:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. &lt;strong&gt;Automation&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Just like in a factory, automation plays a vital role in DevOps. If you think of a company manufacturing chips, automating the process reduces manual labor, speeding up production. Similarly, in software development, &lt;strong&gt;automation ensures that tasks are completed efficiently&lt;/strong&gt; without manual intervention.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. &lt;strong&gt;Quality&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Automation alone isn’t enough. End users expect quality. If chips are being manufactured quickly but are of poor quality, customers will not be happy. In the same way, &lt;strong&gt;DevOps ensures that quality is maintained&lt;/strong&gt; even while speeding up the delivery process.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. &lt;strong&gt;Monitoring&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Once automation and quality are in place, the next crucial aspect is &lt;strong&gt;monitoring&lt;/strong&gt;. Monitoring helps track the system's performance and quality in real-time. It ensures that if anything goes wrong—be it with automation or quality—&lt;strong&gt;you are alerted immediately, allowing for quick fixes.&lt;/strong&gt; This is also known as observability, which goes hand-in-hand with monitoring.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. &lt;strong&gt;Testing&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Without proper testing, neither quality nor automation can be guaranteed. &lt;strong&gt;Continuous testing&lt;/strong&gt; is an essential part of DevOps. It ensures that all updates are rigorously tested before reaching users, reducing the chances of bugs or issues in production.&lt;/p&gt;

&lt;h3&gt;
  
  
  The New Definition of DevOps
&lt;/h3&gt;

&lt;p&gt;To summarize, &lt;strong&gt;DevOps is the process of continuously delivering applications quickly&lt;/strong&gt; by ensuring proper automation, maintaining quality, implementing continuous monitoring, and conducting rigorous testing. These pillars help organizations achieve fast and reliable software delivery, ensuring that users get the best possible experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Role of a DevOps Engineer
&lt;/h3&gt;

&lt;p&gt;As a DevOps Engineer, your goal is to streamline the application delivery process. For example, if you're hired by example.com and their current delivery timeline is two weeks, &lt;strong&gt;your job would be to reduce that to one week&lt;/strong&gt; while ensuring automation, quality, monitoring, and testing are all in place. The ultimate aim is to minimize manual processes and accelerate delivery, improving overall efficiency.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why DevOps Engineer needed?
&lt;/h3&gt;

&lt;p&gt;Long long ago, Before DevOps...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F787fvuttgak1h7u4ophs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F787fvuttgak1h7u4ophs.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a step-by-step summary based on the provided image:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multiple Developers (#1):&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Multiple developers work on the code and store it at a central location.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;System Administrator Creates Testing Server (#2):&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
A system administrator sets up a server where the application will be tested.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tester Tests the Application (#3):&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The tester performs tests on the application running on the server to ensure functionality.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Application After Testing (#4):&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Once testing is complete, the application is ready for further processing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Build and Release Engineer (BRE) (#5):&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The Build and Release Engineer promotes the tested application to the next stage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Promotion to Staging or Pre-Production (#6):&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The application is promoted to the staging or pre-production environment for further testing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Testing in Staging or Pre-Production (#7):&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The same application undergoes testing again in the staging or pre-production environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Moving to Production (#8):&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Once the application passes all tests, it is moved to the production environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;End Users (#9):&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Finally, the application is delivered to the end users, who can now access it on their devices. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each step involves collaboration between developers, system administrators, testers, and build and release engineers, ensuring a smooth delivery process from development to production. &lt;/p&gt;

&lt;h3&gt;
  
  
  The Challenges of Application Delivery Before DevOps
&lt;/h3&gt;

&lt;p&gt;Before DevOps, the process of delivering applications was much more manual and time-consuming than it is today. Here's how it worked and why the need for DevOps emerged.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. &lt;strong&gt;Multiple Roles Involved&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;To deliver an application from a developer’s laptop to the production server, several roles were required:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;System Administrator&lt;/strong&gt;: Responsible for setting up and managing servers for testing and production.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build and Release Engineer&lt;/strong&gt;: Managed the process of building the application and deploying it to the server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server Administrator&lt;/strong&gt;: Ensured the production servers were running smoothly and that the application was deployed correctly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. &lt;strong&gt;Manual Process and Collaboration&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The process was manual and heavily dependent on collaboration between these different teams. For example, a system administrator would set up the server, while the build and release engineer handled the deployment. Each step required communication and coordination, often leading to delays.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. &lt;strong&gt;Time-Consuming Workflow&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Due to the manual nature of the process and the need for different teams to work together, the delivery of an application could take a significant amount of time. It wasn’t unusual for this process to take:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;10 days&lt;/strong&gt;,
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One month&lt;/strong&gt;,
&lt;/li&gt;
&lt;li&gt;Or in the best cases, around &lt;strong&gt;five days&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The variability in time depended on the complexity of the application and the efficiency of communication between teams.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. &lt;strong&gt;Why DevOps Emerged&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The concept of &lt;strong&gt;DevOps&lt;/strong&gt; was introduced to address these inefficiencies. The main reasons for the shift towards DevOps include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Manual Effort Slows Down Processes&lt;/strong&gt;: Manual interventions made the entire delivery process slow and prone to errors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaboration Overhead&lt;/strong&gt;: Involving multiple teams in every step increased the risk of miscommunication and further delayed the process.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Need for Automation&lt;/strong&gt;: Automating these steps became essential to reduce time, effort, and human errors in the delivery process.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  5. &lt;strong&gt;The Solution: DevOps&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;DevOps emerged as a &lt;strong&gt;new concept&lt;/strong&gt; to improve the speed, reliability, and effectiveness of delivering applications. By integrating development and operations teams and emphasizing automation, DevOps transformed the way applications were built, tested, and deployed. It reduced the time needed to deliver applications and made the process much more streamlined.&lt;/p&gt;

&lt;p&gt;In summary, the manual, time-consuming processes before DevOps, which involved multiple teams like system administrators, build and release engineers, and server administrators, led to inefficiencies. DevOps evolved to automate and optimize these workflows, allowing for faster, more reliable application delivery.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🌱 Type-safe navigation in Jetpack Compose - Quick Guide</title>
      <dc:creator>Sameer Kumar</dc:creator>
      <pubDate>Wed, 11 Sep 2024 13:27:17 +0000</pubDate>
      <link>https://forem.com/sameer_701/type-safe-navigation-in-jetpack-compose-quick-guide-1p50</link>
      <guid>https://forem.com/sameer_701/type-safe-navigation-in-jetpack-compose-quick-guide-1p50</guid>
      <description>&lt;p&gt;Type-safe navigation in Jetpack Compose allows for strong typing and safety when passing arguments between composable screens. Here's a detailed explanation of how it works, along with the provided code and comments:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Dependencies&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;First, you need to add the necessary dependencies for Kotlin serialization and Jetpack Navigation in &lt;code&gt;Libs.toml&lt;/code&gt; and &lt;code&gt;build.gradle&lt;/code&gt; files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;libs.version.toml&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;

&lt;span class="nn"&gt;[versions]&lt;/span&gt;
&lt;span class="py"&gt;kotlinxSerializationJson&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"1.7.1"&lt;/span&gt;
&lt;span class="py"&gt;kotlinxSerialization&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"2.0.20"&lt;/span&gt;
&lt;span class="py"&gt;navigationCompose&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"2.8.0"&lt;/span&gt;

&lt;span class="nn"&gt;[libraries]&lt;/span&gt;
&lt;span class="py"&gt;androidx-navigation-compose&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="py"&gt;group&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"androidx.navigation"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="py"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"navigation-compose"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="py"&gt;version.ref&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"navigationCompose"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="py"&gt;kotlinx-serialization-json&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="py"&gt;module&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"org.jetbrains.kotlinx:kotlinx-serialization-json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="py"&gt;version.ref&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"kotlinxSerializationJson"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nn"&gt;[plugins]&lt;/span&gt;
&lt;span class="py"&gt;jetbrains-kotlin-serialization&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="py"&gt;id&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"org.jetbrains.kotlin.plugin.serialization"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="py"&gt;version.ref&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"kotlinxSerialization"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;build.gradle.kts&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;

&lt;span class="nf"&gt;plugins&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;libs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;jetbrains&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kotlin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;serialization&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;apply&lt;/span&gt; &lt;span class="k"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Another &lt;code&gt;build.gradle.kts&lt;/code&gt; file:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;

&lt;span class="nf"&gt;plugins&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;libs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;jetbrains&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kotlin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;serialization&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nf"&gt;id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"kotlin-parcelize"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// needed for non-primitive classes&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;dependencies&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;implementation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;libs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;androidx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;navigation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;compose&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nf"&gt;implementation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;libs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kotlinx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;serialization&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Data Class Definition&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;We create a simple data class &lt;code&gt;User&lt;/code&gt; to hold user-related data like ID, name, age, and gender.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;

&lt;span class="kd"&gt;data class&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Defining Navigation Routes with Serialization&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;NavRoutes&lt;/code&gt; sealed class defines the possible screens in the app. Each screen can have parameters passed, making navigation type-safe.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;

&lt;span class="nd"&gt;@Serializable&lt;/span&gt;
&lt;span class="k"&gt;sealed&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;NavRoutes&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ListScreen with no arguments&lt;/span&gt;
    &lt;span class="nd"&gt;@Serializable&lt;/span&gt;
    &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="kd"&gt;object&lt;/span&gt; &lt;span class="nc"&gt;ListScreen&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;NavRoutes&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="c1"&gt;// UserDetailScreen that accepts parameters for user details&lt;/span&gt;
    &lt;span class="nd"&gt;@Serializable&lt;/span&gt;
    &lt;span class="kd"&gt;data class&lt;/span&gt; &lt;span class="nc"&gt;UserDetailScreen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;
    &lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nc"&gt;NavRoutes&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;ListScreen (First Screen)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In this screen, we display a list of users from popular anime characters. The items are arranged in a LazyColumn, and each user is clickable, navigating to a detailed screen.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;

&lt;span class="nd"&gt;@Composable&lt;/span&gt;
&lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;ListScreen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;navController&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;NavController&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Sample user data (anime characters)&lt;/span&gt;
    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;myUser&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;listOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Naruto"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Male"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"TenTen"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Female"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Hinata"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Female"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Shikamaru"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Male"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Sakura"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Female"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Kakashi"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Male"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;// Display the user list in a LazyColumn&lt;/span&gt;
    &lt;span class="nc"&gt;LazyColumn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;modifier&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Modifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Add padding to the list&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Iterate over the list of users and display each as a SingleUser composable&lt;/span&gt;
        &lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nc"&gt;SingleUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;navController&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gender&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;SingleUser&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This composable represents an individual user in the list. It’s clickable and navigates to the UserDetailScreen when selected.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;

&lt;span class="nd"&gt;@Composable&lt;/span&gt;
&lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;SingleUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;navController&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;NavController&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;Row&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;modifier&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Modifier&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fillMaxSize&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Add padding around each user entry&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;clip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;RoundedCornerShape&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dp&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="c1"&gt;// Rounded corners for a polished look&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;background&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Color&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;LightGray&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Light gray background color&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;clickable&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="c1"&gt;// Navigate to UserDetailScreen with the user's details&lt;/span&gt;
                &lt;span class="n"&gt;navController&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;navigate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                    &lt;span class="nc"&gt;NavRoutes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;UserDetailScreen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                        &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="n"&gt;gender&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gender&lt;/span&gt;
                    &lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="n"&gt;horizontalArrangement&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Arrangement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;SpaceEvenly&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Space out elements evenly&lt;/span&gt;
        &lt;span class="n"&gt;verticalAlignment&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Alignment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;CenterVertically&lt;/span&gt; &lt;span class="c1"&gt;// Align items vertically in the center&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Display user's name, age, and gender with a font size of 15sp&lt;/span&gt;
        &lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fontSize&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;fontSize&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fontSize&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;UserDetailScreen (Second Screen)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This screen displays detailed information about a selected user. The user can also navigate back to the list.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;

&lt;span class="nd"&gt;@Composable&lt;/span&gt;
&lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;UserDetailScreen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;navController&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;NavController&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;Column&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;modifier&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Modifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fillMaxSize&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="c1"&gt;// Take full available space&lt;/span&gt;
        &lt;span class="n"&gt;horizontalAlignment&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Alignment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;CenterHorizontally&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Align content horizontally in the center&lt;/span&gt;
        &lt;span class="n"&gt;verticalArrangement&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Arrangement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Center&lt;/span&gt; &lt;span class="c1"&gt;// Align content vertically in the center&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Display user name, age, and gender with some spacing in between&lt;/span&gt;
        &lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fontSize&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Name with larger font size&lt;/span&gt;
        &lt;span class="nc"&gt;Spacer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;modifier&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Modifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;height&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dp&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="c1"&gt;// Spacer between text elements&lt;/span&gt;
        &lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;fontSize&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nc"&gt;Spacer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;modifier&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Modifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;height&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dp&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fontSize&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nc"&gt;Spacer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;modifier&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Modifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;height&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dp&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

        &lt;span class="c1"&gt;// Back button to return to the previous screen&lt;/span&gt;
        &lt;span class="nc"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;onClick&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;navController&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;popBackStack&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Back"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;MainActivity Setup&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In the &lt;code&gt;NavigationExample&lt;/code&gt; activity, we set up navigation using &lt;code&gt;NavHost&lt;/code&gt;. It maps the &lt;code&gt;NavRoutes&lt;/code&gt; to corresponding composables.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;NavigationExample&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;ComponentActivity&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;onCreate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;savedInstanceState&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Bundle&lt;/span&gt;&lt;span class="p"&gt;?)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;onCreate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;savedInstanceState&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;setContent&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// Create a NavController to handle navigation&lt;/span&gt;
            &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;navController&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;rememberNavController&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

            &lt;span class="c1"&gt;// Define the NavHost which manages the navigation graph&lt;/span&gt;
            &lt;span class="nc"&gt;NavHost&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;navController&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;navController&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;startDestination&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;NavRoutes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ListScreen&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="c1"&gt;// Composable for ListScreen&lt;/span&gt;
                &lt;span class="n"&gt;composable&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;NavRoutes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ListScreen&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="nc"&gt;ListScreen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;navController&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;
                &lt;span class="c1"&gt;// Composable for UserDetailScreen with safely passed arguments&lt;/span&gt;
                &lt;span class="n"&gt;composable&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;NavRoutes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;UserDetailScreen&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;navBackStackEntry&lt;/span&gt; &lt;span class="p"&gt;-&amp;gt;&lt;/span&gt;
                    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;args&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;navBackStackEntry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;toRoute&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;NavRoutes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;UserDetailScreen&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;()&lt;/span&gt;
                    &lt;span class="nc"&gt;UserDetailScreen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;navController&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Explanation&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Type Safety&lt;/strong&gt;: &lt;code&gt;NavRoutes&lt;/code&gt; uses Kotlin's sealed classes and serialization to safely pass arguments between screens, ensuring type safety. When navigating, you can only pass the expected arguments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Serialization&lt;/strong&gt;: The &lt;code&gt;@Serializable&lt;/code&gt; annotation allows passing complex data types (like objects) through the navigation system in a type-safe way.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Back Navigation&lt;/strong&gt;: On the &lt;code&gt;UserDetailScreen&lt;/code&gt;, you can navigate back using &lt;code&gt;navController.popBackStack()&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Output&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6f69fa4c9tsrycroewx4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6f69fa4c9tsrycroewx4.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This setup allows for safe and robust navigation between screens with parameterized data in Jetpack Compose.&lt;/p&gt;

&lt;p&gt;Now, it’s time to unleash your new superpowers on the coding world!&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;aside&amp;gt;
  &amp;lt;p&amp;gt;
    Thanks for taking the time to read!&amp;lt;br&amp;gt;
    If you found this post helpful,&amp;lt;br&amp;gt;
    I'd appreciate a clap. 😄
  &amp;lt;/p&amp;gt;
&amp;lt;/aside&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>android</category>
      <category>jetpackcompose</category>
      <category>navigation</category>
      <category>kotlin</category>
    </item>
  </channel>
</rss>
