<?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 Yasindu Sanjeewa on Medium]]></title>
        <description><![CDATA[Stories by Yasindu Sanjeewa on Medium]]></description>
        <link>https://medium.com/@yasindusanjeewa8?source=rss-bf77b1675438------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*w1tNNjxnaY89u3N5qj6Ejg.jpeg</url>
            <title>Stories by Yasindu Sanjeewa on Medium</title>
            <link>https://medium.com/@yasindusanjeewa8?source=rss-bf77b1675438------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 16:44:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yasindusanjeewa8/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[Terraform Part Two — Creating an Azure VM with Service Principal Authentication]]></title>
            <link>https://medium.com/@yasindusanjeewa8/terraform-part-two-creating-an-azure-vm-with-service-principal-authentication-2a3087c935dd?source=rss-bf77b1675438------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a3087c935dd</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-infrastructure]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[iac]]></category>
            <dc:creator><![CDATA[Yasindu Sanjeewa]]></dc:creator>
            <pubDate>Tue, 25 Jun 2024 18:19:58 GMT</pubDate>
            <atom:updated>2024-06-25T18:19:58.707Z</atom:updated>
            <content:encoded><![CDATA[<h3>Terraform Part Two — Creating an Azure VM with Service Principal Authentication</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AmjkQDuD4wGcXZgaVqsMWg.png" /></figure><p>In the <a href="https://medium.com/@yasindusanjeewa8/terraform-part-one-getting-started-ef0e72058cb5">first part</a> of the Terraform series, we covered the basics of getting started with Terraform. Now, Let’s dive deeper and create first Azure Virtual Machine (VM) using Terraform. In this article, we will walk through setting up a free-tier eligible VM(B1S) on Azure, utilizing best practices and secure authentication via a service principal. By the end of this guide, you will have a fully functioning VM along with essential infrastructure components such as a resource group, virtual network, subnet, and network security group.</p><p>We’ll begin by setting up our directory structure, followed by configuring the necessary files. Let’s get started!</p><p>Create a directory structure for Terraform project. I use this kind of structure.</p><pre>terraform-project/<br>├── main.tf<br>├── variables.tf<br>├── outputs.tf<br>└── provider.tf</pre><h4><strong>provider.tf file</strong></h4><p>In this file, configure the Azure provider using environment variables for authentication.</p><pre>provider &quot;azurerm&quot; {<br>  features {}<br><br>  subscription_id = var.ARM_SUBSCRIPTION_ID<br>  client_id       = var.ARM_CLIENT_ID<br>  client_secret   = var.ARM_CLIENT_SECRET<br>  tenant_id       = var.ARM_TENANT_ID<br>}</pre><h4>variable.tf file</h4><p>Since we are using environment variables directly, define placeholder variables in variables.tf for documentation purposes and type validation.</p><pre>variable &quot;ARM_SUBSCRIPTION_ID&quot; {}<br>variable &quot;ARM_CLIENT_ID&quot; {}<br>variable &quot;ARM_CLIENT_SECRET&quot; {}<br>variable &quot;ARM_TENANT_ID&quot; {}<br><br>variable &quot;resource_group_name&quot; {<br>  description = &quot;The name of the resource group&quot;<br>  type        = string<br>  default     = &quot;terraform-example-rg&quot;<br>}<br><br>variable &quot;location&quot; {<br>  description = &quot;The Azure region to deploy resources&quot;<br>  type        = string<br>  default     = &quot;East US&quot;<br>}<br><br>variable &quot;vm_admin_username&quot; {<br>  description = &quot;The admin username for the virtual machine&quot;<br>  type        = string<br>  default     = &quot;azureuser&quot;<br>}<br><br>variable &quot;vm_admin_password&quot; {<br>  description = &quot;The admin password for the virtual machine&quot;<br>  type        = string<br>  sensitive   = true<br>}<br><br>variable &quot;vm_size&quot; {<br>  description = &quot;The size of the virtual machine&quot;<br>  type        = string<br>  default     = &quot;Standard_B1s&quot;<br>}<br><br>variable &quot;address_space&quot; {<br>  description = &quot;The address space for the virtual network&quot;<br>  type        = list(string)<br>  default     = [&quot;10.0.0.0/16&quot;]<br>}<br><br>variable &quot;subnet_prefixes&quot; {<br>  description = &quot;The address prefixes for the subnet&quot;<br>  type        = list(string)<br>  default     = [&quot;10.0.1.0/24&quot;]<br>}</pre><h4>Main.tf file</h4><p>This file will contain the resource definitions for the Azure infrastructure: resource group, virtual network, subnet, network security group, and virtual machine.</p><pre>resource &quot;azurerm_resource_group&quot; &quot;tf-rg&quot; {<br>  name     = var.resource_group_name<br>  location = var.location<br>}<br><br>resource &quot;azurerm_virtual_network&quot; &quot;tf-vn&quot; {<br>  name                = &quot;learn-terraform-vnet&quot;<br>  address_space       = var.address_space<br>  location            = azurerm_resource_group.tf-rg.location<br>  resource_group_name = azurerm_resource_group.tf-rg.name<br>}<br><br>resource &quot;azurerm_subnet&quot; &quot;tf-subnet&quot; {<br>  name                 = &quot;learn-terraform-subnet&quot;<br>  resource_group_name  = azurerm_resource_group.tf-rg.name<br>  virtual_network_name = azurerm_virtual_network.tf-vn.name<br>  address_prefixes     = var.subnet_prefixes<br>}<br><br>resource &quot;azurerm_network_security_group&quot; &quot;tf-sg&quot; {<br>  name                = &quot;learn-terraform-nsg&quot;<br>  location            = azurerm_resource_group.tf-rg.location<br>  resource_group_name = azurerm_resource_group.tf-rg.name<br><br>  security_rule {<br>    name                       = &quot;Allow_SSH&quot;<br>    priority                   = 1001<br>    direction                  = &quot;Inbound&quot;<br>    access                     = &quot;Allow&quot;<br>    protocol                   = &quot;Tcp&quot;<br>    source_port_range          = &quot;*&quot;<br>    destination_port_range     = &quot;22&quot;<br>    source_address_prefix      = &quot;*&quot;<br>    destination_address_prefix = &quot;*&quot;<br>  }<br><br>  security_rule {<br>    name                       = &quot;Allow_HTTP&quot;<br>    priority                   = 1002<br>    direction                  = &quot;Inbound&quot;<br>    access                     = &quot;Allow&quot;<br>    protocol                   = &quot;Tcp&quot;<br>    source_port_range          = &quot;*&quot;<br>    destination_port_range     = &quot;80&quot;<br>    source_address_prefix      = &quot;*&quot;<br>    destination_address_prefix = &quot;*&quot;<br>  }<br><br>  security_rule {<br>    name                       = &quot;Allow_HTTPS&quot;<br>    priority                   = 1003<br>    direction                  = &quot;Inbound&quot;<br>    access                     = &quot;Allow&quot;<br>    protocol                   = &quot;Tcp&quot;<br>    source_port_range          = &quot;*&quot;<br>    destination_port_range     = &quot;443&quot;<br>    source_address_prefix      = &quot;*&quot;<br>    destination_address_prefix = &quot;*&quot;<br>  }<br>}<br><br>resource &quot;azurerm_network_interface&quot; &quot;tf-ni&quot; {<br>  name                = &quot;learn-terraform-nic&quot;<br>  location            = azurerm_resource_group.tf-rg.location<br>  resource_group_name = azurerm_resource_group.tf-rg.name<br><br>  ip_configuration {<br>    name                          = &quot;internal&quot;<br>    subnet_id                     = azurerm_subnet.tf-subnet.id<br>    private_ip_address_allocation = &quot;Dynamic&quot;<br>  }<br>}<br><br>resource &quot;azurerm_virtual_machine&quot; &quot;tf-vm&quot; {<br>  name                  = &quot;learn-terraform-vm&quot;<br>  location              = azurerm_resource_group.tf-rg.location<br>  resource_group_name   = azurerm_resource_group.tf-rg.name<br>  network_interface_ids = [azurerm_network_interface.tf-ni.id]<br>  vm_size               = var.vm_size<br><br>  storage_os_disk {<br>    name              = &quot;learn-terraform-os-disk&quot;<br>    caching           = &quot;ReadWrite&quot;<br>    create_option     = &quot;FromImage&quot;<br>    managed_disk_type = &quot;Standard_LRS&quot;<br>  }<br><br>  storage_image_reference {<br>    publisher = &quot;Canonical&quot;<br>    offer     = &quot;UbuntuServer&quot;<br>    sku       = &quot;18.04-LTS&quot;<br>    version   = &quot;latest&quot;<br>  }<br><br>  os_profile {<br>    computer_name  = &quot;my-vm&quot;<br>    admin_username = var.vm_admin_username<br>    admin_password = var.vm_admin_password<br>  }<br><br>  os_profile_linux_config {<br>    disable_password_authentication = false<br>  }<br>}</pre><h4>outputs.tf</h4><p>This file defines the outputs for the Terraform configuration.</p><pre>output &quot;resource_group_name&quot; {<br>  value = azurerm_resource_group.tf-rg.name<br>}<br><br>output &quot;virtual_network_name&quot; {<br>  value = azurerm_virtual_network.tf-vn.name<br>}<br><br>output &quot;subnet_name&quot; {<br>  value = azurerm_subnet.tf-subnet.name<br>}<br><br>output &quot;network_security_group_name&quot; {<br>  value = azurerm_network_security_group.tf-sg.name<br>}<br><br>output &quot;virtual_machine_id&quot; {<br>  value = azurerm_virtual_machine.tf-vm.id<br>}</pre><h4>Usage Instructions</h4><p>I) Install Terraform — <a href="https://developer.hashicorp.com/terraform/install">download link</a></p><p>II) Create a Service Principal (Using Azure Portal):</p><ul><li>Provide a name for the application for example terraform-service-principle and then click Register.</li><li>After the application is created, note the Application (client) ID and Directory (tenant) ID from the overview page.</li><li>Go to certificates &amp; secrets and then click on new client secret. Provide a description and an expiration period, then click Add. Note the value of the client secret, as it will not be shown again.</li><li>Assign the application to a role:</li><li>Navigate to your subscription, click Access control (IAM), and then Add role assignment.</li><li>Select the Contributor role, search for the application name, and then click Save.</li></ul><p>III) Set Environment Variables</p><ul><li>Open your terminal or command prompt and set the environment variables with your actual Azure credentials</li></ul><pre>export ARM_SUBSCRIPTION_ID=&quot;actual-subscription-id&quot;<br>export ARM_CLIENT_ID=&quot;actual-client-id&quot;<br>export ARM_CLIENT_SECRET=&quot;actual-client-secret&quot;<br>export ARM_TENANT_ID=&quot;actual-tenant-id&quot;</pre><p>IV) Initialize Terraform</p><pre>terraform init</pre><p>V) Plan the Deployment</p><pre>terraform plan</pre><p>VI) Apply the Configuration</p><pre>terraform apply</pre><p>VII) Destroy the Infrastructure</p><pre>#When you no longer need the resources, run the terraform destroy command to clean up.<br><br>terraform destroy</pre><p>By following this guide, you’ve successfully created a free eligible VM on Azure using Terraform, adhering to best practices, and utilizing Service Principal authentication. This hands-on approach demonstrates the power and flexibility of Terraform in managing infrastructure as code. You’ve learned how to set up the necessary environment variables, configure the provider, define your infrastructure resources, and execute the deployment seamlessly.</p><h3><strong>What’s Next?</strong></h3><p>In the next part of this series, we’ll shift our focus to another popular cloud provider: AWS. We’ll explore how to create an EC2 instance using Terraform, diving into the specifics of AWS configurations and best practices. Stay tuned for “Terraform Part Three — Creating an AWS EC2 Instance.”</p><p>Thank you for following along with this tutorial, and happy terraforming!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a3087c935dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Terraform Part One — Getting Started]]></title>
            <link>https://medium.com/@yasindusanjeewa8/terraform-part-one-getting-started-ef0e72058cb5?source=rss-bf77b1675438------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef0e72058cb5</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[iac]]></category>
            <category><![CDATA[cloud-technology]]></category>
            <dc:creator><![CDATA[Yasindu Sanjeewa]]></dc:creator>
            <pubDate>Sun, 23 Jun 2024 09:23:59 GMT</pubDate>
            <atom:updated>2024-06-23T09:23:59.499Z</atom:updated>
            <content:encoded><![CDATA[<h3>Terraform Part One — Getting Started</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AmjkQDuD4wGcXZgaVqsMWg.png" /></figure><p>Terraform is an open-source Infrastructure as Code (IaC) tool developed by HashiCorp. It enables users to define and provision infrastructure using a high-level configuration language known as HashiCorp Configuration Language (HCL), or optionally JSON. Terraform allows you to manage both existing and popular service providers as well as custom in-house solutions.</p><p>Let’s go forward with AWS. Creating AWS resources can be done through various methods, depending on your preference and the tools you are comfortable with. Here are the primary ways to create resources without using Terraform;</p><ul><li>AWS Management Console</li><li>AWS CLI</li><li>AWS SDKs</li><li>AWS CloudFormation</li><li>AWS Cloud Development Kit</li></ul><h4>Why Should Use Terraform Instead of These Ways?</h4><p>Terraform offers several distinct advantages that make it a preferred choice for many organizations when it comes to managing cloud infrastructure. Here’s a closer look at why Terraform stands out compared to using the AWS Console, AWS CLI, or any other methods;</p><blockquote>Declarative Configuration</blockquote><ul><li>With Terraform’s declarative approach, you define the desired state of your infrastructure in configuration files. Terraform automatically determines the necessary steps to reach that state, simplifying the management process.</li></ul><blockquote>Version Control and Collaboration</blockquote><ul><li>Terraform configurations can be stored in version control systems like Git. This enables teams to track changes, revert to previous versions, and review modifications through pull requests, ensuring greater accountability and collaboration. Multiple team members can work on the same infrastructure codebase, facilitating better collaboration and reducing the risk of conflicts or misconfigurations.</li></ul><blockquote>Consistency and Reproducibility</blockquote><ul><li>Terraform ensures that the same configuration file will consistently create the same infrastructure, minimizing the chances of discrepancies and human error. Whether you are deploying infrastructure in a development, staging, or production environment Terraform guarantees that the deployments are identical, leading to more predictable outcomes.</li></ul><blockquote>Multi-Cloud and Multi-Service Management</blockquote><ul><li>Terraform supports multiple cloud providers such as AWS, Google Cloud, and Azure, as well as a wide range of services. This allows organizations to manage their entire infrastructure using a single tool, promoting a unified and consistent approach. For organizations with multi-cloud strategies, Terraform provides the flexibility to deploy and manage resources across different cloud environments seamlessly.</li></ul><blockquote>State Management</blockquote><ul><li>Terraform maintains the state of your infrastructure in a state file. This state file records the current status of all resources managed by Terraform, enabling it to detect changes and manage updates effectively. The state file allows Terraform to track changes over time, making it easier to understand the impact of updates and modifications to the infrastructure.</li></ul><h4>Key Features and Concepts of Terraform</h4><p>When starting to learn Terraform, there are several key features and concepts that you should focus on to effectively use the tool for infrastructure management. Here are the main features and topics to cover;</p><blockquote>Providers</blockquote><p>Providers are responsible for managing the lifecycle of resources in a specific service (e.g., AWS, Azure, Google Cloud). You can learn how to configure and use different providers by referring documentation of terraform :- <a href="https://registry.terraform.io/browse/providers">Browse Providers | Terraform Registry</a></p><p>Here is an example to install AWS provider in Terraform;</p><pre>terraform {<br>  required_providers {<br>    aws = {<br>      source  = &quot;hashicorp/aws&quot;<br>      version = &quot;~&gt; 5.0&quot;<br>    }<br>  }<br>}<br><br># Configure the AWS Provider<br>provider &quot;aws&quot; {<br>  region = &quot;us-east-1&quot;<br>}<br><br># Create a VPC<br>resource &quot;aws_vpc&quot; &quot;first-vpc&quot; {<br>  cidr_block = &quot;10.0.0.0/16&quot;<br>}</pre><blockquote>Resources</blockquote><p>Resources describe infrastructure objects such as EC2 instances, S3, etc.</p><pre><br>resource &quot;aws_subnet&quot; &quot;public&quot; {<br>  vpc_id            = aws_vpc.first-vpc.id<br>  cidr_block        = &quot;10.0.1.0/24&quot;<br>  availability_zone = &quot;us-east-1a&quot;<br>  <br>  tags = {<br>    Name = &quot;terraform-example-subnet&quot;<br>  }<br>}</pre><blockquote>provisioners</blockquote><p>Execute scripts on local or remote machines during resource creation or destruction.</p><pre>  provisioner &quot;local-exec&quot; {<br>    command = &quot;echo &#39;Hello, World&#39; &gt; hello.txt&quot;<br>  }</pre><blockquote>Modules</blockquote><p>Modules are reusable configurations.</p><p>First, create a directory for your module. For this example, we’ll create a directory called modules/network and the necessary Terraform files within that directory</p><p>modules/network/main.tf</p><pre>resource &quot;aws_vpc&quot; &quot;first-vpc&quot; {<br>  cidr_block = var.cidr_block<br><br>  tags = {<br>    Name           = var.vpc_name<br>    ResourceGroup  = var.resource_group_name<br>  }<br>}<br><br>resource &quot;aws_subnet&quot; &quot;public&quot; {<br>  count = var.public_subnet_count<br><br>  vpc_id                  = aws_vpc.first-vpc.id<br>  cidr_block              = element(var.public_subnet_cidrs, count.index)<br>  availability_zone       = element(var.availability_zones, count.index)<br>  map_public_ip_on_launch = true<br><br>  tags = {<br>    Name           = &quot;${var.vpc_name}-public-${count.index + 1}&quot;<br>    ResourceGroup  = var.resource_group_name<br>  }<br>}<br><br>resource &quot;aws_internet_gateway&quot; &quot;first-gw&quot; {<br>  vpc_id = aws_vpc.this.id<br><br>  tags = {<br>    Name           = var.vpc_name<br>    ResourceGroup  = var.resource_group_name<br>  }<br>}<br><br>resource &quot;aws_route_table&quot; &quot;public&quot; {<br>  vpc_id = aws_vpc.this.id<br><br>  tags = {<br>    Name           = &quot;${var.vpc_name}-public&quot;<br>    ResourceGroup  = var.resource_group_name<br>  }<br>}<br><br>resource &quot;aws_route&quot; &quot;default_route&quot; {<br>  route_table_id         = aws_route_table.public.id<br>  destination_cidr_block = &quot;0.0.0.0/0&quot;<br>  gateway_id             = aws_internet_gateway.first-gw.id<br>}<br><br>resource &quot;aws_route_table_association&quot; &quot;public&quot; {<br>  count          = var.public_subnet_count<br>  subnet_id      = aws_subnet.public[count.index].id<br>  route_table_id = aws_route_table.public.id<br>}<br></pre><p>use this module in your main.tf like this;</p><pre>provider &quot;aws&quot; {<br>  region = &quot;us-east-1&quot;<br>}<br><br>module &quot;network&quot; {<br>  source = &quot;./modules/network&quot;<br><br>  vpc_name            = &quot;first-vpc&quot;<br>  cidr_block          = &quot;10.0.0.0/16&quot;<br>  public_subnet_count = 2<br>  public_subnet_cidrs = [&quot;10.0.1.0/24&quot;, &quot;10.0.2.0/24&quot;]<br>  availability_zones  = [&quot;us-east-1a&quot;, &quot;us-east-1b&quot;]<br>  resource_group_name = &quot;example-resources&quot;<br>}</pre><blockquote>Variables</blockquote><p>Terraform variables allow you to customize your infrastructure configurations dynamically. They enable you to get user input, define default values, and make your Terraform configurations more flexible and reusable.</p><pre>provider &quot;aws&quot; {<br>  region = &quot;us-east-1&quot;<br>}<br><br>resource &quot;aws_s3_bucket&quot; &quot;s3-bucket&quot; {<br>  bucket = var.bucket_name<br>  acl    = var.bucket_acl<br><br>  tags = var.tags<br>}<br><br>output &quot;bucket_arn&quot; {<br>  value = aws_s3_bucket.s3-bucket.arn<br>}</pre><blockquote>Terraform CLI Commands</blockquote><p>Essential commands to interact with Terraform</p><pre>terraform init <br><br>#Initializes the configuration</pre><pre>terraform plan<br><br>#Previews the changes</pre><pre>terraform apply<br><br>#Applies the changes</pre><pre>terraform destroy<br><br>#Destroys the infrastructure</pre><blockquote>Best Practices</blockquote><p>For example, Structure your Terraform code for maintainability</p><pre>project/<br>├── main.tf<br>├── variables.tf<br>├── outputs.tf<br>├── modules/<br>│   └── network/<br>│       ├── main.tf<br>│       ├── variables.tf<br>│       ├── outputs.tf<br></pre><p>You can refer <a href="https://developer.hashicorp.com/terraform/docs">Documentation</a> for explore more concepts of Terraform.</p><p>In next chapters Let’s explore how to provision Amazon EC2 instances and Azure virtual machines using Terraform.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef0e72058cb5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Overview of Deep Fake]]></title>
            <link>https://medium.com/@yasindusanjeewa8/overview-of-deep-fake-291daafb91fa?source=rss-bf77b1675438------2</link>
            <guid isPermaLink="false">https://medium.com/p/291daafb91fa</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[social-impact]]></category>
            <category><![CDATA[gans]]></category>
            <category><![CDATA[deep-fake-technology]]></category>
            <dc:creator><![CDATA[Yasindu Sanjeewa]]></dc:creator>
            <pubDate>Sat, 25 May 2024 16:20:36 GMT</pubDate>
            <atom:updated>2024-05-25T16:20:36.852Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5nGC1NUm6ER_HdAZRm83bA.png" /></figure><p>Artificial intelligence has been rapidly improving in the last few years and has given way to a new era of possibilities and potential risks. One of the most alarming advances in the field is deepfake technology, which creates videos or images that appear very realistic but are totally false. Deepfakes use generative adversarial networks (GANs), which is a type of AI that puts two neural networks against each other to create more and more realistic outcomes. As the technology continues to improve, the potential implications for society, privacy, and political manipulation are staggering. This post looks at the rise of deepfake technology, its present applications, and the future of artificial manipulation.</p><blockquote><strong>Dangers of Deepfake: Threats to Individuals and Society</strong></blockquote><p>The rapid advancement of deepfake technology poses significant threats to individuals and society. With the ability to create highly realistic yet entirely fabricated videos or images, the potential for harm is extensive.</p><p>One of the gravest dangers lies in the exploitation of deepfakes for malicious purposes, such as revenge porn, cyberbullying, or online scams. Unfortunately, the level of realism makes it challenging to distinguish between genuine and manipulated content, putting innocent individuals at risk of harm and reputational damage.</p><p>Moreover, Deepfakes enable the spread of misinformation and disinformation with dire consequences in the field of politics, journalism, or public perception. The potential for influencing elections or inciting social unrest is immense, which means a loss of trust in institutions and an increase in already existing divisions in society. As deep fake technology continues to evolve, it is crucial to understand and address the dangers it poses.</p><blockquote><strong>The Evolution of Deepfake Technology: From Images to Videos</strong></blockquote><p>With the rapid evolution of deepfake technology, the manipulation of images has gradually taken a backseat. Instead, the focus has shifted to videos, where the potential for deception is even greater. Deepfake videos can now seamlessly merge a person’s face and voice onto a different body, allowing for highly realistic and convincing simulations.</p><p>This evolution is concerning as it amplifies the threats posed by deepfakes. The ability to manipulate not just images, but also videos, opens the door to more sophisticated forms of misinformation and disinformation. As a result, the impact on society and the potential for harm have intensified.</p><blockquote><strong>Implications for Business and Politics: How Deepfakes Are Impacting Trust</strong></blockquote><p>As deepfake technology continues to advance, it is increasingly important to consider its implications for both business and politics. The ability to create highly realistic and convincing fake videos has the potential to erode trust in these domains, with far-reaching consequences.</p><p>In the realm of business, deepfakes pose a significant threat to reputation and brand trust. Imagine a scenario where a deepfake video is created, showing a CEO of a prominent company engaging in unethical or illegal activities. Such a video, if convincing enough, could cause irreparable harm to the company’s image, leading to loss of customers and investors.</p><p>Similarly, in politics, deepfakes can be used to manipulate public opinion and undermine the integrity of electoral processes. With the ability to create videos that appear to show political candidates saying or doing things they didn’t, deepfakes can sow discord and confusion among voters. This can ultimately erode trust in the democratic system and lead to societal polarization.</p><p>The impact of deepfakes on trust is something that businesses and political entities must take seriously. Proactive steps should be taken to implement robust authentication measures and educate the public about the existence and potential dangers of deepfakes. Only by addressing these challenges can we preserve trust in an increasingly digital and interconnected world.</p><blockquote><strong>Navigating the Ethical Landscape: Responsibly Managing Deepfake Technology</strong></blockquote><p>While the rise of deepfakes presents numerous challenges, it is crucial that we navigate the ethical landscape surrounding this technology to ensure responsible use. As deepfakes become more sophisticated and accessible, it is inevitable that they will be used for both positive and negative purposes.</p><p>In the realm of entertainment and creative expression, deepfakes offer exciting opportunities. Actors can be seamlessly inserted into classic films, breathing new life into beloved characters. However, it is essential to establish clear guidelines and obtain proper consent to protect the rights of individuals whose likenesses are being manipulated.</p><p>In addition, the ethical implications of deepfakes extend beyond the entertainment industry. The potential for misuse in areas such as politics, journalism, and revenge porn cannot be ignored. Safeguards, regulations, and legal frameworks must be established to prevent the malicious use of deepfakes and protect individuals from harm.</p><p>Furthermore, educating the public about deepfake technology is paramount. By increasing awareness, people can become more discerning consumers of information, questioning the authenticity of media before accepting it as truth.</p><blockquote><strong>Combating Deepfakes: Strategies for Detection and Prevention</strong></blockquote><p>As the prevalence and sophistication of deepfake technology continue to grow, it is imperative that we develop effective strategies for detecting and preventing the spread of these manipulative videos. While it may seem like an uphill battle, there are steps that can be taken to combat deepfakes and mitigate their potential harm.</p><p>One crucial aspect of combating deepfakes is technological advancement. As deepfake algorithms evolve, so must our methods for identifying and debunking them. The development of advanced detection tools and artificial intelligence systems can help us distinguish between real and manipulated content, allowing us to flag and remove deepfakes before they can cause widespread damage.</p><p>However, technology alone is not sufficient in the fight against deepfakes. Collaborative efforts are essential to tackling this issue comprehensively. Cooperation between tech companies, social media platforms, and government agencies can lead to the establishment of industry standards, guidelines, and protocols for handling deepfake content.</p><p>Another aspect that requires attention is public awareness. Educating individuals about the existence and potential dangers of deepfakes equips them with the knowledge to critically evaluate online content. By teaching media literacy skills and promoting digital skepticism, we can empower the public to identify and report deepfakes, ultimately reducing their impact.</p><p>Furthermore, content creators and influencers should also play an active role in combating deepfakes. By consistently producing credible and verified content, they can build trust with their audience and set an example for responsible digital practices.</p><blockquote><strong>The Future of Deepfake: Anticipating Challenges and Opportunities</strong></blockquote><p>As the threat of deepfakes continues to loom, it is crucial to anticipate the challenges and opportunities that lie ahead in addressing this issue. The emergence of highly convincing deepfake technology raises concerns about the potential misuse in various domains.</p><p>One major challenge is the erosion of trust. With the increasing sophistication of deepfakes, it becomes increasingly difficult to discern what is real and what is fabricated. This can have severe consequences for public figures, businesses, and even democratic processes, as misinformation and manipulation spread like wildfire.</p><p>The exponential growth of deepfakes also poses challenges for legal systems worldwide. Current laws struggle to keep up with the rapidly evolving technology, making it harder to hold creators and distributors of deepfakes accountable. Addressing this issue may require the introduction of new legislation specifically targeting deepfake creation and distribution.</p><p>However, amidst the challenges, there are also opportunities. The rise of deepfakes has highlighted the importance of media literacy and critical thinking skills. Efforts to educate and empower individuals to identify and combat manipulated content can lead to a more discerning and skeptical society.</p><p>Additionally, the development of more advanced detection tools and algorithms serves as an opportunity to stay one step ahead of deepfake creators. Investing in research and innovation can help us improve our ability to identify and mitigate the impact of deepfakes.</p><p>In the rapidly advancing age of deepfakes, embracing accountability becomes crucial to safeguarding the integrity of our society. As we have explored in this blog, the rise of deepfake technology brings forth several challenges that must be addressed to protect individuals, organizations, and democratic processes.</p><p>To mitigate the erosion of trust caused by highly convincing deepfakes, it is imperative that we invest in media literacy and critical thinking education. By equipping individuals with the ability to discern between real and manipulated content, we empower them to make informed decisions and become active participants in combating misinformation.</p><p>Furthermore, governments and legal systems must adapt swiftly to the emergence of deepfakes. Strong legislation targeting deepfake creation and distribution is necessary to hold offenders accountable. A coordinated global effort is needed to ensure that laws keep pace with rapidly evolving technology.</p><p>Alongside legislative measures, the development of advanced detection tools and algorithms is paramount. Continued investment in research and innovation will enable us to stay ahead of deepfake creators and effectively detect and mitigate the impact of deepfakes on society.</p><p>Ultimately, our ability to navigate the future of deepfakes with resilience and integrity relies on collaboration and proactive measures. By fostering collaboration among policymakers, technology experts, and the public, we can collectively develop strategies and solutions that protect the truth and preserve trust in an age of artificial manipulation.</p><p>Together, we can forge a future where accountability prevails, ensuring that the rising tide of deepfakes does not erode the foundations of our society. Let us move forward with determination and vigilance, united in the pursuit of truth and authenticity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=291daafb91fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Five Microsoft Platforms You Should Know and Visit]]></title>
            <link>https://medium.com/@yasindusanjeewa8/five-microsoft-platforms-you-should-know-and-visit-07f1ee2743bc?source=rss-bf77b1675438------2</link>
            <guid isPermaLink="false">https://medium.com/p/07f1ee2743bc</guid>
            <category><![CDATA[knowledge]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[microsoft-learn]]></category>
            <category><![CDATA[microsoft-azure]]></category>
            <dc:creator><![CDATA[Yasindu Sanjeewa]]></dc:creator>
            <pubDate>Thu, 08 Feb 2024 13:20:09 GMT</pubDate>
            <atom:updated>2024-02-22T08:09:47.020Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Microsoft Logo" src="https://cdn-images-1.medium.com/max/1024/1*uHrDUCEbFVxRTdSSRjC5_g.jpeg" /></figure><p>Are you interested in learning new skills, building cloud applications, staying updated on software development, launching your own startup, or connecting with other Microsoft enthusiasts and experts? If yes, then you are reading exact article, because Microsoft has a lot of websites that can help you achieve your goals with Microsoft technologies. In this blog post, I will introduce and review five of the most useful and popular Microsoft websites that you should know and visit. Links in the end of the article</p><h3><strong><em>Microsoft Learn</em></strong></h3><p>Microsoft Learn is a platform that offers free online courses and certifications on various Microsoft products and services. You can use Microsoft Learn to acquire new skills, prepare for exams, or advance your career with Microsoft technologies. Microsoft Learn provides interactive learning paths and modules that are tailored to your needs, goals, and experience level. You can also earn points, levels, and badges to track your progress and showcase your achievements. Microsoft Learn covers a wide range of topics, such as Azure, Power Platform, Microsoft 365, Dynamics 365, .NET, Visual Studio, Windows, AI, and more. You can access Microsoft Learn from any device and learn at your own pace. You can also join the Microsoft Learn community and connect with other learners and experts.</p><p>I have completed 80+ modules. Also, I have earned 145 badges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RXOxISJdEmXF17NQ9CJcog.png" /><figcaption>My MS Learn profile</figcaption></figure><h3>Microsoft Azure</h3><p>Microsoft Azure is a cloud computing service that enables users to build, deploy, and manage applications and services using Microsoft tools and frameworks. Azure offers a wide range of features and capabilities, such as compute, storage, networking, databases, AI and machine learning, IoT, DevOps, and security. These features and capabilities allow users to run different workloads and scenarios on the cloud, store and manage data, connect and secure their cloud resources, create intelligent and innovative solutions, connect, monitor, and control devices and sensors, develop, test, deploy, and manage applications and services, and protect their data and resources with the highest standards of security and compliance.</p><h3>Microsoft For Startups</h3><p>Microsoft Startups is a program that supports startups with Microsoft resources, guidance, mentorship, and access to customers and investors. It helps startups to launch and grow their businesses with Microsoft technologies, such as Azure, GitHub, Microsoft 365, and more. It offers various benefits and opportunities to startups, such as free Azure credits, technical guidance, mentorship, customer and investor access, and co-selling and co-marketing. To join Microsoft Startups, startups need to meet the following eligibility criteria:</p><ul><li>Building a software-based product or service</li><li>Privately held and for-profit</li><li>Pre-Series D or privately funded.</li><li>Have not previously received more than $10,000 in Azure credits.</li></ul><h3>Microsoft Dev Blogs</h3><p>Microsoft Dev Blogs are a collection of blogs that provide news, updates, and best practices on software development with Microsoft technologies. You can use Microsoft Dev Blogs to stay informed and inspired by the latest innovations and insights from Microsoft engineers and experts. Microsoft Dev Blogs cover a wide range of topics and categories, such as .NET, ASP.NET, Blazor, Entity Framework, ML.NET, NuGet, Xamarin, C#, F#, Visual Basic, and Popular Topics. These topics and categories cover various aspects of building apps, web applications and services, interactive web UIs, data access, machine learning, package management, native mobile apps, programming languages, and developer community interests with Microsoft technologies.</p><h3>Microsoft Tech Community</h3><p>Microsoft Tech Community is a community that connects users with other Microsoft enthusiasts and experts, and hosts forums and events on various Microsoft topics. You can use Microsoft Tech Community to ask questions and get answers from Microsoft engineers and MVPs, share your feedback and suggestions with Microsoft product teams, learn from webinars, podcasts, blogs, and videos on Microsoft technologies, join discussions and groups on topics such as Azure, Microsoft 365, Windows, Power Platform, and more, attend online and in-person events, such as Microsoft Ignite, Microsoft Build, and Microsoft Inspire, and earn badges and recognition for your contributions and achievements. Microsoft Tech Community is a great place to learn, network, and grow with Microsoft technologies.</p><p>These websites can help you with your development, entrepreneurship, and learning journey with Microsoft technologies. They can provide you with valuable information, resources, opportunities, and support. I encourage you to visit these websites and explore what they have to offer. You can also find links to each website in the blog post for more information and resources.</p><p>hope you have learned from this blog post. If you have any questions, feedback, or suggestions, please feel free to leave a comment below. I would love to hear from you and help you with your Microsoft journey. Thank you for reading and happy learning!</p><p><strong>Links To the Websites</strong></p><p>MS Startups — <a href="https://www.microsoft.com/startups/?wt_mc_id=studentamb_296644">https://www.microsoft.com/startups/?wt_mc_id=studentamb_296644</a></p><p>MS Learn — <a href="https://learn.microsoft.com/training/browse/?wt.mc_id=studentamb_296644">https://learn.microsoft.com/training/browse/?wt.mc_id=studentamb_296644</a></p><p>MS Azure — <a href="https://azure.microsoft.com/?wt_mc_id=studentamb_296644">https://azure.microsoft.com/?wt_mc_id=studentamb_296644</a></p><p>MS Dev Blogs — <a href="https://devblogs.microsoft.com/?wt_mc_id=studentamb_296644">https://devblogs.microsoft.com/?wt_mc_id=studentamb_296644</a></p><p>MS Cloud Blogs — <a href="https://www.microsoft.com/en-us/microsoft-cloud/blog/?wt_mc_id=studentamb_296644">https://www.microsoft.com/en-us/microsoft-cloud/blog/?wt_mc_id=studentamb_296644</a></p><p>Visual Studio — <a href="https://code.visualstudio.com/?wt_mc_id=studentamb_296644">https://code.visualstudio.com/?wt_mc_id=studentamb_296644</a></p><p>MS Developer — <a href="https://developer.microsoft.com/?wt_mc_id=studentamb_296644">https://developer.microsoft.com/?wt_mc_id=studentamb_296644</a></p><p>MS Tech Community — <a href="https://social.technet.microsoft.com/?wt_mc_id=studentamb_296644">https://social.technet.microsoft.com/?wt_mc_id=studentamb_296644</a></p><p>MS Technet — <a href="https://social.technet.microsoft.com/?wt_mc_id=studentamb_296644">https://social.technet.microsoft.com/?wt_mc_id=studentamb_296644</a></p><p>Social MSDN — <a href="https://social.msdn.microsoft.com/?wt_mc_id=studentamb_296644">https://social.msdn.microsoft.com/?wt_mc_id=studentamb_296644</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07f1ee2743bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dense Vectors in Natural Language Processing]]></title>
            <link>https://medium.com/@yasindusanjeewa8/dense-vectors-in-natural-language-processing-06818dff5cd7?source=rss-bf77b1675438------2</link>
            <guid isPermaLink="false">https://medium.com/p/06818dff5cd7</guid>
            <category><![CDATA[dense-vector]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Yasindu Sanjeewa]]></dc:creator>
            <pubDate>Fri, 15 Dec 2023 17:05:05 GMT</pubDate>
            <atom:updated>2023-12-15T17:05:05.578Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1TpjDZFiy9cCiV783fLEMQ.jpeg" /></figure><blockquote><strong>What is a Dense Vector?</strong></blockquote><p>Dense vectors are a type of mathematical objects that represent data in machine learning and artificial intelligence. They amount to a kind of vector, where non-zero values mainly populate its elements (features), opposite to sparse vectors overwhelmed with zeroes. Such representation allows the creating of models capable of capturing rich and subtle aspects characteristic of the data.</p><blockquote><strong>Importance of Dense Vectors</strong></blockquote><p>Many machine learning applications require the use of dense vectors mainly due to their ability to describe subtle relations and nuances that may exist between data. In addition to this semantic similarity that cannot be seen in sparse vectors, other significant utilities of dense vectors include applying them to illustrate word frequency characteristics sets or packages for remotely supervised purposes such as solving or processing natural language, recommendation systems, and sentiment analysis.</p><blockquote><strong>Characteristics of Dense Vectors</strong></blockquote><ul><li>Continuous Values: Dense vectors are represented by real-valued numbers as opposed to the binary or categorical representation. Each dimension represents a feature or characteristic, and the value across that dimension is an actual number.</li><li>Semantic Richness: Dense vectors are thus designed to capture semantic relationships that exist between entities. Hence, the dense vector representations indicate the similarity of objects or concepts. Therefore, when two things are similar, their vector representations are close in the vector space. This property allows meaning operations, like vector addition and subtraction, to reflect semantic relationships (e.g., “king” — “man” + “woman” results in a vector close to “queen”).</li><li>High Dimensionality: Typically, their dimensionality is hundreds if not thousands in the case of dense vectors, where each dimension of the vector is usually representative of some feature or aspect of the data. Their high dimensionality results in active spaces that allow the encoding of much more information than sparse vectors like complex and nuanced relations.</li><li>Multi-Dimensional: Dense vectors have more than one-dimensionality or length, making them multi-dimensional. A dense vector’s expressiveness and ability to depict complex relationships are strongly influenced by its number of dimensions.</li><li>Efficient Representations: For some tasks, particularly those involving machine learning models where computing performance is critical, dense vectors are frequently more efficient than sparse representations.</li></ul><blockquote><strong>Where are Dense Vectors Used?</strong></blockquote><p>Diverse applications within the realms of machine learning and artificial intelligence heavily rely on dense vectors. These usage paradigms are pervasive in Natural Language Processing (NLP), where they play quite a fundamental role. They are involved in language understanding, document structuring, and word embeddings, too. Aside from these, the use of dense vectors in recommendation systems helps represent the preferences of the end-user with a high level of accuracy to be able to give a more specific item recommended just for the individual. The compact representations, again, are helpful extractors of features in various computer vision tasks, such as image recognition or extracting features from an image.</p><blockquote><strong>Sparse Vectors vs Dense Vectors</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*SVdQ8bX8WmYwuT4AWdCUEw.png" /></figure><p>Both sparse and dense vectors are useful in many machine learning and artificial intelligence applications. While they have some characteristics, their representation and uses are not the same.</p><p>Significantly Representation</p><ul><li>Sparse vectors: mainly consisting of zeros, with a small number of non-zero elements denoting particular characteristics. Imagine them like wall-mounted light switches that can only have a few buttons on at once.</li><li>Dense vectors: in most dimensions, there are non-zero values, which can be interpreted as greater complexity and precision to when it comes to data awareness. Dense vectors are like switches or dimmers — every level means different levels of information.</li><li>Sparse vectors: Focus on explicitly represented features, explicitly stating which elements are present or absent.</li><li>Dense vectors: Go beyond explicitly stated features. They capture complex relationships and subtle information within the data through the values and relationships between different dimensions.</li></ul><p>Computational efficiency</p><ul><li>Sparse vectors: Require specialized algorithms for operations like distance and similarity calculations due to their sparsity.</li><li>Dense vectors: Allow for efficient computation using standard vector operations due to their dense representation. This makes them faster and more convenient to work with applications.</li><li>Sparse vectors: Ideal for high-dimensional data with few active features, such as text data with limited vocabulary or genetic data with few active genes.</li><li>Dense vectors: More versatile and widely used in various applications like natural language processing, computer vision, recommendation systems, and anomaly detection.</li></ul><p>Choosing between sparse and dense vectors:</p><p>The choice between sparse and dense vectors depends on the specific task and data characteristics. Consider the following factors:</p><ul><li>Data size and sparsity: If the data is high-dimensional with few active features, sparse vectors may be more efficient.</li><li>Computational requirements: If computational efficiency is crucial, dense vectors might be a better choice.</li><li>Information richness and task complexity: Dense vectors are preferred for tasks requiring capturing complex relationships and subtle information.</li></ul><blockquote><strong>Methods to Create Dense Vectors</strong></blockquote><p>There are several ways to create dense vectors, and which one to choose depends on the requirements, data, and particular task at hand. These are a few common techniques for creating dense vectors.</p><ul><li>Neural Language Models (NLMs): Robust algorithms examine huge amounts of data to discover word, sentence, and document representations. A few well-known NLMs are Universal Sentence Encoder (USE), GloVe, and Word2Vec.</li><li>Word Embeddings: Create dense vectors for individual words based on their relationships in text data.</li><li>Sentence Embeddings: Generate dense vectors for entire sentences, capturing their overall meaning and relationships.</li><li>Vision Embeddings: Using the visual characteristics of the photos and videos, extract dense representations.</li></ul><p>Neural Language Models for Embeddings:</p><p>There are different ways to train neural language models and obtain embeddings, but two of the most popular ones are skip-gram and CBOW (Continuous Bag-of-Words). These methods are based on the idea that words that appear in similar contexts tend to have similar meanings, and therefore, similar embeddings.</p><ul><li>Skip-gram: Skip-gram is a method that takes a word as input and tries to predict the surrounding words in a window of a given size. For example, given the word “dog”, skip-gram might try to predict “the”, “brown”, “barked”, and “loudly” in a window of size 2. The embeddings are learned by optimizing the model to make accurate predictions.</li><li>CBOW (Continuous Bag-of-Words): CBOW is a method that takes a group of words as input and tries to predict the word in the middle. For example, given the words “the”, “brown”, “_”, “barked”, and “loudly”, CBOW might try to predict “dog” in the blank. The embeddings are learned by optimizing the model to make accurate predictions.</li></ul><p>Both skip-gram and CBOW are simple and efficient ways to train neural language models and generate embeddings, but they have some limitations. For instance, they do not account for the order or the position of the words, and they treat each word as a single unit, ignoring the possibility of multiple meanings or senses. To overcome these issues, more advanced methods have been developed, such as graph embeddings, sense embeddings, and contextualized embeddings.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=06818dff5cd7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How SOLID Principles Eradicate Code Smells]]></title>
            <link>https://medium.com/@yasindusanjeewa8/how-solid-principles-eradicate-code-smells-9f853a00ab46?source=rss-bf77b1675438------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f853a00ab46</guid>
            <category><![CDATA[design-principles]]></category>
            <category><![CDATA[code-smells]]></category>
            <category><![CDATA[oop-concepts]]></category>
            <category><![CDATA[solid-principles]]></category>
            <dc:creator><![CDATA[Yasindu Sanjeewa]]></dc:creator>
            <pubDate>Thu, 07 Dec 2023 13:16:43 GMT</pubDate>
            <atom:updated>2023-12-07T13:16:43.067Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hIGhZCkQV_o1fJ1ag3Vqsw.png" /></figure><p>Building a house and developing software are similar. It should be strong, stable, and beautiful. However, your code may deteriorate due to careless practises, much like a house may have leaks and cracks. This is where code smells come in.</p><p>Code smells are subtle indications that your code is becoming difficult to maintain, understand, and extend. They might not seem like a big deal at first, but like termites in the foundation, they can gradually weaken your code’s integrity and lead to major problems down the road.</p><p>Fortunately, there’s a powerful solution to combat code smells: the SOLID principles. These five principles, introduced by Robert C. Martin and are widely used in object-oriented programming, provide a blueprint for writing clean, maintainable, and flexible code.</p><p>Let’s first dive into the world of code smells and understand what they are and why they are detrimental. we’ll explore each SOLID principle and discover how it acts as a shield against specific code smells, protecting your code from deterioration and ensuring its long-term health.</p><blockquote><strong>1.</strong> <strong>Single Responsibility Principle</strong></blockquote><p>This principle states that a class should have only one reason to change, meaning it should have only one responsibility. This helps in making the class more maintainable.</p><p>Consider a class representing a file manager. According to the Single Responsibility Principle, this class should have one specific responsibility. Let’s say its initial responsibility is to read and write files to disk.</p><pre>class FileManager:<br>    def read_file(self, filename):<br>        # Code to read file from disk<br><br>    def write_file(self, filename, content):<br>        # Code to write file to disk</pre><p>In the above example, the FileManager class has two responsibilities, reading files and writing files. If there are changes to file reading logic or file writing logic, the class would need to be modified for both reasons. This violates the Single Responsibility Principle.</p><pre>class FileReader:<br>    def read_file(self, filename):<br>        # Code to read file from disk<br><br>class FileWriter:<br>    def write_file(self, filename, content):<br>        # Code to write file to disk</pre><p>In this improved design, we have two separate classes: FileReader and FileWriter. Each class now has a single responsibility — either reading or writing files. If there are changes in how files are read, only the FileReader class needs to be modified, and similarly for writing files. This adheres to the Single Responsibility Principle, making the code more maintainable and modular.</p><p>Avoided Code Smells;</p><ul><li><em>Long Class</em> - The &quot;Long Class&quot; code smell refers to classes that are too large and complex, containing too many fields, methods, and lines of code. These classes typically violate the Single Responsibility Principle (SRP) and can be difficult to understand, maintain, and test.</li><li><em>Long Method</em> - The &quot;Long Method&quot; code smell refers to methods that are excessively long and difficult to understand. These methods typically span many lines of code and handle more than one responsibility.</li><li><em>Long Parameter List</em> - The &quot;Long Parameter List&quot; code smell refers to methods and functions that have an excessively large number of parameters. This can lead to several problems.</li></ul><blockquote><strong>2. Open Close Principle</strong></blockquote><p>One of the SOLID principles, the Open/Closed Principle (OCP), emphasises that software entities, such classes, modules, and functions, should be closed to modification but open for extension. In simpler terms, a module’s behavior can be extended without changing the source code.</p><p>Let us consider a system that determines the areas of various geometric shapes, such as circles and rectangles. Every shape has a class at initial;</p><pre><br>public abstract class Shape {<br>    public abstract double calculateArea();<br>}<br><br><br>public class Rectangle extends Shape {<br>    private double width;<br>    private double height;<br><br>    public Rectangle(double width, double height) {<br>        this.width = width;<br>        this.height = height;<br>    }<br><br>    @Override<br>    public double calculateArea() {<br>        return width * height;<br>    }<br>}<br><br><br>public class Circle extends Shape {<br>    private double radius;<br><br>    public Circle(double radius) {<br>        this.radius = radius;<br>    }<br><br>    @Override<br>    public double calculateArea() {<br>        return Math.PI * radius * radius;<br>    }<br>}</pre><p>Let’s now assume that we want to include a Triangle as a new shape. According to the Open/Closed Principle, Without changing the current Shape, Rectangle, or Circle classes, we should be able to achieve this</p><pre>// Triangle class (new shape)<br>public class Triangle extends Shape {<br>    private double base;<br>    private double height;<br><br>    public Triangle(double base, double height) {<br>        this.base = base;<br>        this.height = height;<br>    }<br><br>    @Override<br>    public double calculateArea() {<br>        return 0.5 * base * height;<br>    }<br>}</pre><p>By adhering to the Open/Closed Principle, we can add new shapes (extension) without modifying the existing code (closed for modification). This makes the system more maintainable and less prone to introducing bugs when extending its functionality.</p><p>Avoided Code Smells;</p><ul><li><em>Long Methods</em></li><li><em>Duplicate Codes</em> — Duplicate code is a code smell that occurs when the same code is repeated multiple times in different parts of the application. It can also increase the risk of bugs, as changes to one copy of the code may not be reflected in all of the other copies. Duplicate code indicates that you are not taking advantage of the OCP. By refactoring your code to eliminate duplicate code, you make it easier to extend the functionality of your code without modifying the existing code</li><li><em>To many if statements / Nested Loops</em> — A large number of if statements and nested loops increase time complexity of the application. It will reduce the efficiency of application. OCP encourages using polymorphism to avoid complex branching logic.</li></ul><blockquote><strong>3. Liskov Substitution Principle</strong></blockquote><p>It states that objects of a superclass should be able to be replaced with objects of a subclass without affecting the correctness of the program. In other words, if a class S is a subclass of class T, an object of type T should be replaceable with an object of type S without affecting the functionality of the program.</p><p>Consider the class Account and two subclasses and CheckingAccount. Following the Liskov Substitution Principle, you should be able to use instances of the subclasses wherever and is expected without affecting the correctness of the program.</p><pre>// Base class<br>public class Account {<br>    private String accountNumber;<br>    private double balance;<br><br>    public void deposit(double amount) {<br>        balance += amount;<br>    }<br><br>    public void withdraw(double amount) {<br>        balance -= amount;<br>    }<br><br>    public double getBalance() {<br>        return balance;<br>    }<br>}</pre><pre>// Subclass 1<br>public class SavingsAccount extends Account {<br>    private double interestRate;<br><br>    public void applyInterest() {<br>        // Logic to apply interest to savings account balance<br>        double interest = getBalance() * interestRate / 100;<br>        deposit(interest);<br>    }<br>}</pre><pre>// Subclass 2<br>public class CheckingAccount extends Account {<br>    private double overdraftLimit;<br><br>    @Override<br>    public void withdraw(double amount) {<br>        // Allowing overdraft up to the specified limit<br>        if (getBalance() - amount &gt;= -overdraftLimit) {<br>            super.withdraw(amount);<br>        } else {<br>            System.out.println(&quot;Insufficient funds!&quot;);<br>        }<br>    }<br>}</pre><p>In this example, the SavingsAccount and CheckingAccount classes are subclasses of Account. Each subclass extends the base functionality of Account and provides its own specific features. For instance, SavingsAccount has an interest rate, and CheckingAccount has an overdraft limit. Now, let’s see how these classes might be used in a banking system;</p><pre>public class BankingSystem {<br>    public static void main(String[] args) {<br>        Account savingsAccount = new SavingsAccount(&quot;SA123&quot;, 1000.0, 2.5);<br>        Account checkingAccount = new CheckingAccount(&quot;CA456&quot;, 2000.0, 500.0);<br><br>        // Using Liskov Substitution Principle<br>        processAccount(savingsAccount);<br>        processAccount(checkingAccount);<br>    }<br><br>    public static void processAccount(Account account) {<br>        // Perform some operations on the account<br>        account.deposit(500.0);<br>        account.withdraw(200.0);<br><br>        // Display the balance<br>        System.out.println(&quot;Account Balance: &quot; + account.getBalance());<br><br>        // If it&#39;s a SavingsAccount, apply interest<br>        if (account instanceof SavingsAccount) {<br>            ((SavingsAccount) account).applyInterest();<br>        }<br><br>        // If it&#39;s a CheckingAccount, display overdraft limit<br>        if (account instanceof CheckingAccount) {<br>            System.out.println(&quot;Overdraft Limit: &quot; + ((CheckingAccount) account).getOverdraftLimit());<br>        }<br>    }<br>}</pre><p>In this example, the BankingSystem class processes different types of accounts without knowing their specific types. The methods work with the base class Account, and polymorphism allows us to substitute objects of the derived classes (SavingsAccount and CheckingAccount). This adherence to the Liskov Substitution Principle promotes flexibility and maintainability in the system, allowing for easy extension with new types of accounts.</p><p>Avoided Code Smells ;</p><ul><li><em>Long Parameter List</em> — LSP encourages creating smaller, more specific classes that require fewer parameters</li></ul><blockquote><strong>4. Interface Segregation Principle</strong></blockquote><p>Interface Segregation Principle asserts that a class should not be forced to implement interfaces it does not use. In other words, it promotes the idea of having small, specific interfaces rather than large, monolithic ones.</p><p>Let’s consider a real-world scenario in the context of a user authentication system for a web application. Initially, there might be a comprehensive UserAuthentication interface that includes methods for various authentication methods;</p><pre>class UserAuthentication:<br>    def authenticate_with_username_password(self, username, password):<br>        # implementation of username-password authentication<br><br>    def authenticate_with_oauth(self, oauth_token):<br>        # implementation of OAuth authentication<br><br>    def authenticate_with_biometric(self, biometric_data):<br>        # implementation of biometric authentication</pre><p>In practice, not all user accounts may support all authentication methods. For example, some accounts might only support username-password authentication, while others support OAuth or biometric authentication.</p><pre>class BasicAuthentication(UserAuthentication):<br>    def authenticate_with_username_password(self, username, password):<br>        # Code for username-password authentication<br><br># This forces BasicAuthentication to implement methods for OAuth and biometric authentication, even though it doesn&#39;t use them.<br><br>class UsernamePasswordAuthentication:<br>    def authenticate_with_username_password(self, username, password):<br>        # Code for username-password authentication<br><br>class OAuthAuthentication:<br>    def authenticate_with_oauth(self, oauth_token):<br>        # Code for OAuth authentication<br><br># BiometricAuthentication is omitted for simplicity, but it would follow the same pattern.<br><br>class AdvancedUserAuthentication(UsernamePasswordAuthentication, OAuthAuthentication):<br>    pass<br><br># This way, a class can implement only the authentication methods it needs.</pre><p>In this improved design, we’ve segregated the original UserAuthentication interface into smaller, more specific interfaces (UsernamePasswordAuthentication, OAuthAuthentication, and potentially others). Classes can now implement only the interfaces relevant to the authentication methods they support.</p><p>Avoided Code Smells ;</p><ul><li><em>Forced Implementation</em> — Some classes are forced to implement methods that are not relevant to their behavior or role. Use ISP to create interfaces tailored to specific responsibilities. Classes can then implement only the interfaces that are relevant to their behavior.</li></ul><blockquote><strong>5. Dependency Inversion Principle</strong></blockquote><p>It suggests that high-level modules (e.g., business logic) should not depend on low-level modules (e.g., specific implementations or details), but rather both should depend on abstractions (e.g., interfaces or abstract classes). Additionally, it states that abstractions should not depend on details; details should depend on abstractions. Let’s consider a real-world scenario in a software application where the Dependency Inversion Principle (DIP) is applied.</p><p>Suppose you are developing an e-commerce system that sends email notifications to customers. Initially, you might have a simple implementation where the OrderProcessor class directly depends on a concrete email service class;</p><pre>// Low-level module (details)<br>class EmailService {<br>    public void sendEmail(String to, String subject, String message) {<br>        // Implementation to send email<br>        System.out.println(&quot;Sending email to &quot; + to + &quot;: &quot; + subject + &quot; - &quot; + message);<br>    }<br>}<br><br>// High-level module<br>class OrderProcessor {<br>    private EmailService emailService;<br><br>    public OrderProcessor() {<br>        this.emailService = new EmailService();<br>    }<br><br>    public void processOrder(String customerEmail, String orderDetails) {<br>        // Order processing logic<br><br>        // Sending email notification<br>        emailService.sendEmail(customerEmail, &quot;Order Confirmation&quot;, &quot;Thank you for your order: &quot; + orderDetails);<br>    }<br>}</pre><p>In this design, the OrderProcessor directly depends on the EmailService class, violating the Dependency Inversion Principle. To adhere to DIP, we can introduce an abstraction (interface) for the email service and make OrderProcessor depend on this abstraction</p><pre>// Abstraction<br>interface NotificationService {<br>    void sendNotification(String to, String subject, String message);<br>}<br><br>// Low-level module (details)<br>class EmailService implements NotificationService {<br>    @Override<br>    public void sendNotification(String to, String subject, String message) {<br>        // Implementation to send email<br>        System.out.println(&quot;Sending email to &quot; + to + &quot;: &quot; + subject + &quot; - &quot; + message);<br>    }<br>}<br><br>// High-level module<br>class OrderProcessor {<br>    private NotificationService notificationService;<br><br>    public OrderProcessor(NotificationService notificationService) {<br>        this.notificationService = notificationService;<br>    }<br><br>    public void processOrder(String customerEmail, String orderDetails) {<br>        // Order processing logic<br><br>        // Sending email notification<br>        notificationService.sendNotification(customerEmail, &quot;Order Confirmation&quot;, &quot;Thank you for your order: &quot; + orderDetails);<br>    }<br>}</pre><p>Now, OrderProcessor depends on the NotificationService interface rather than the concrete EmailService class. This adheres to the Dependency Inversion Principle. You can easily extend the system by introducing new notification services (e.g., SMS, push notifications) without modifying the OrderProcessor class. As long as the new notification service implements the NotificationService interface, it can be seamlessly integrated into the system.</p><p>Avoided Code Smells ;</p><ul><li><em>Rigidity to change</em><strong> — </strong>When a class is tightly coupled to other classes, it becomes difficult to change without affecting the rest of the system. By following the DIP, developers can create code that is more flexible and easier to adapt to changing requirements.</li></ul><p>By embracing these principles, developers can build software architectures that stand the test of time, enabling easier maintenance, extension, and adaptation to changing requirements. Keep your code clean, follow the SOLID principles, and watch your software flourish in its strength, stability, and beauty.</p><p>In addition to the SOLID principles, there are several other code smells that developers should be mindful of to ensure the overall quality of their code. Let’s briefly discuss a few common code smells and how they can be addressed:</p><blockquote><strong>Magic Numbers</strong></blockquote><p>Using raw, hardcoded numbers in your code without explaining their significance.</p><p>Solution: Define constants with meaningful names to replace magic numbers. This enhances code readability and makes it easier to maintain.</p><blockquote><strong>Comments Overuse</strong></blockquote><p>excessive or unnecessary use of comments in the source code. While comments can be valuable for explaining complex algorithms or providing high-level overviews, overusing them can be counterproductive.</p><p>Example;</p><pre>Example;<br>// Loop through the list<br>for (int i = 0; i &lt; list.size(); i++) {<br>    // Get the current item<br>    Item currentItem = list.get(i);<br><br>    // Process the item<br>    processItem(currentItem);<br><br>    // Log the item processing<br>    logger.log(&quot;Item processed: &quot; + currentItem);<br>}</pre><p>In this case, comments are used excessively to describe each step of a simple loop. This not only clutters the code but also makes it harder to see the actual logic</p><p>While “To-Do” comments are not recommended as a long-term solution, developers often use them to mark tasks that need attention. A better practice is to integrate a ticket management system (e.g., GitHub issues, Jira) to track tasks and issues, making it easier to manage and prioritize work without cluttering the code with to-do comments.</p><p>Solution: Focus on writing self-explanatory code. Use comments sparingly, and when needed, ensure they provide valuable insights that aren’t immediately apparent from the code itself. A better practice is to integrate a ticket management system like GitHub issues or Jira to track tasks and issues, making it easier to manage and prioritize work without cluttering the code with to-do comments.</p><blockquote><strong>Poor Exception Handling</strong></blockquote><p>Catching generic exceptions or not handling exceptions appropriately.</p><p>Solution: Catch specific exceptions and handle them appropriately. This makes troubleshooting easier and improves the robustness of the code.</p><blockquote><strong>Misleading Names</strong></blockquote><p>Names that mislead or provide inaccurate information about the purpose of a variable, method, or class.</p><p>Example;</p><pre>int average = calculateSum(a, b, c) / 3;</pre><p>In this example, the variable named average is misleading because it is calculated as the sum divided by 3, not the average. A better name for the variable would be sum to accurately reflect its purpose.</p><p>Solution: Ensure that names accurately reflect the behavior and intent of the code entity. Avoid using names that might lead to misconceptions or misinterpretations.</p><p>As developers, we strive to create code that is not only functional but also maintainable, scalable, and adaptable to changing requirements. By adhering to the SOLID principles and avoiding common code smells, we can build software architectures that stand the test of time. Embrace these principles, keep your code clean, and watch your software flourish in its strength, stability, and beauty.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f853a00ab46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Alternative Databases Beyond RDBMS]]></title>
            <link>https://medium.com/@yasindusanjeewa8/alternative-databases-beyond-rdbms-97fe5b7f5312?source=rss-bf77b1675438------2</link>
            <guid isPermaLink="false">https://medium.com/p/97fe5b7f5312</guid>
            <category><![CDATA[futuristic]]></category>
            <category><![CDATA[database-management]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Yasindu Sanjeewa]]></dc:creator>
            <pubDate>Thu, 02 Nov 2023 07:06:43 GMT</pubDate>
            <atom:updated>2023-11-02T07:06:43.825Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YLpkDmIuVlfJDMeZS7bMnw.jpeg" /></figure><p>The value of excellent data management cannot be emphasized in our increasingly data-driven world. Every day, innumerable organizations and individuals generate and depend on massive volumes of data, which include customer information, financial records, product inventories, and other information. As the volume and complexity of data increase, also rises the demand for efficient and scalable systems to store, retrieve, and modify this data. Databases come into play in this situation.</p><p><strong><em>What is a database?</em></strong></p><p>A database is a structured collection of data that is organized, stored, and managed so that access, retrieval, and manipulation are simple. Databases are the foundation of numerous applications and systems, allowing them to handle data efficiently. They come in various shapes and sizes, but the most well-known and widely used type is the Relational Database Management System (RDBMS), which manages and queries data using SQL (Structured Query Language). For decades, SQL RDBMS such as MySQL, PostgreSQL, and Microsoft SQL Server have been the go-to solution for managing structured data.</p><p>Although SQL RDBMS has been the standard choice for database administration, alternatives have evolved to meet increasing data requirements. In this article, we will explore some of these alternatives to SQL RDBMS and the unique strengths they bring to the table, offering solutions for specific use cases and data requirements. Whether you’re dealing with extensive data, NoSQL databases, or distributed systems, there’s a database alternative that may be the perfect fit for your needs.</p><p><strong><em>Five futuristic databases</em></strong></p><blockquote>Dolt</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*61jTHf75V9ZC2Fs3TcBEyQ.png" /></figure><p><em>Dolt is an open-source, version-controlled relational database. It combines the power of SQL databases with the ability to track changes in the data over time, much like a version control system. This database would be like if MySQL and Git had a baby. Most importantly, it allows you to create branches from the main database, where you can experiment with new data without breaking things. It makes it easy to analyse the diff between changes, and when everything looks good, the changes can be merged back into the main branch. And it’s done with the same conventions found in Git that virtually every developer is familiar with.</em></p><blockquote>Fauna DB</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*_hcccTDVb83vO8Hbch7ldQ.png" /></figure><p><em>Fauna DB is a globally distributed, serverless, and transactional NoSQL database. It offers a multi-model approach that combines document, graph, and relational data models. It’s effortless use like a document database similar to MongoDB, but unlike a document database, it supports features like native joins, which is the number one missing feature in document databases, and that means Fauna is more well suited for complex relational data like social graphs. To interact with it, it has its custom query language called FQL but also comes with a GraphQL API</em></p><blockquote>Minds DB</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*bfynR7oW-5dEn25kB6kkoA.png" /></figure><p><em>Minds DB is a machine learning system that offers automated machine learning (AutoML) capabilities. It aims to simplify and democratize machine learning by providing an intuitive interface for creating predictive models without extensive coding or machine learning expertise. It can also integrate with your existing machine learning models or those from third parties like hugging face or open AI.</em></p><blockquote>Planet Scale</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*M7wUeufgv8JVgyRx4kVvMA.png" /></figure><p><em>Planet Scale is a serverless platform for MySQL. Considering YouTube, it uses MySQL. However, in 2010, when it was getting popular, it took a lot of work to scale, at least for an app with millions of simultaneous connections. Instead of switching to a NoSQL document database, they developed a library called Vitess, which makes some tradeoffs to scale MySQL horizontally. And Planet scale is built upon this technology. It offers a wholly managed database that is compatible with Vitess and is accessible through an elegant dashboard along with SDKs. It also works well with tools like Prisma.</em></p><blockquote>YugaByte DB</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*fyGaimG50joEG5g2zs_tMQ.png" /></figure><p><em>Yugabyte DB is an open-source, distributed SQL database with global scalability and high availability. It is compatible with PostgreSQL and provides strong consistency. Its goal is to scale infinitely in the cloud but attempt to support all the native features in Postgres, which is challenging in a cloud-native environment. You can use a multi-cloud strategy to host your database on multiple clouds simultaneously, eliminating the dreaded vendor lock-in issue.</em></p><p>Now, you have five different futuristic databases to choose from for your next project. These databases cater to specific use cases and data requirements, offering alternatives to traditional SQL RDBMS for managing data effectively in our data-rich world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97fe5b7f5312" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build Tools for Developers]]></title>
            <link>https://medium.com/@yasindusanjeewa8/build-tools-for-developers-4c6e02be6231?source=rss-bf77b1675438------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c6e02be6231</guid>
            <category><![CDATA[build-tool]]></category>
            <category><![CDATA[process-automation]]></category>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[developer-tools]]></category>
            <dc:creator><![CDATA[Yasindu Sanjeewa]]></dc:creator>
            <pubDate>Wed, 18 Oct 2023 10:51:04 GMT</pubDate>
            <atom:updated>2023-10-18T10:51:04.337Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AdlKte8q2h7u-aB19fIHVg.jpeg" /></figure><p>The code used in the production and development of a software or system is separate. We must handle dependencies, automate processes, load external modules, and other duties in production. Build tools are available to help with those chores. Programs called build tools automate the process of turning source code into executable applications. Build tools are devices that enable the integration of development and production code.</p><h3><strong>Types of Build Tools</strong></h3><p>· Package Manager</p><p>· Task Runners</p><p>· Module Bundlers</p><h4><strong>Package Managers</strong></h4><p>A package manager is a software tool or system that automates the process of installing, updating, configuring and removing software packages. Package managers are classified into two types. There are package managers for operating systems and package managers for languages.</p><p><em>1. operating system based package managers.</em></p><p>Windows — Windows package manager, Ninite, Chocolatey</p><p>MacOS — Homebrew, MacPorts,</p><p>Linux — yum, Snappy, APT</p><p><em>2. language-based package managers</em></p><p>Language-based package managers are a tool to create project environments and easily import external dependencies. Each language often has its package manager tailored to the needs and conventions of that language’s community. Here are some examples of language-based package managers.</p><p><strong>1. Java</strong></p><p><em>I. Maven</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*YLlTVkXH8er0Rhv30qv11A.png" /></figure><p>· Maven is the industry standard.</p><p>· C#, Ruby, Scala, and other programming languages can all be used with Maven to create and maintain projects.</p><p><em>II. Gradle</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/242/1*3uwiTUQukxIOgk7fBDRfPA.png" /></figure><p>· It offers a more flexible and customizable approach to building and managing software projects.</p><p>· It manages every step of the development process, from testing, deployment, and publishing through compilation and packaging</p><p>· Supported languages include Kotlin, groovy, Scala, C/C++, and JavaScript</p><p><strong>2. Python</strong></p><p><em>I. Pip</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*EcOPlYET-p90OQStetU4aA.jpeg" /></figure><p>· It simplifies the process of managing dependencies and allows developers to integrate third-party libraries and modules into their Python projects easily.</p><p>· It connects to the Python package index, a repository of public and paid-for private packages.</p><p>· widely used for software development, data analysis, and scientific computing</p><p><em>II. Conda</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*0UuCNKFaZ-kwnVsPseiYsw.png" /></figure><p>· Conda can be installed as a standalone package manager or as part of the Anaconda or Miniconda distribution.</p><p>· It is a valuable tool for data science, scientific computing, and software development projects.</p><p>· Conda packages work with more than just Python software. They could also include R packages, C or C++ libraries, or any other program.</p><p><strong>3. PHP</strong></p><p><em>I. Composer</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/195/1*OZvbhFEok4mhny6POPb0Tg.jpeg" /></figure><p>· Composer simplifies the management of PHP dependencies.</p><p>· The composer can automatically resolve and install the necessary packages and their dependencies based on the information in the composer.json file.</p><p><strong>4. JavaScript</strong></p><p><em>I. NPM</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*nvOwu2WiB-t5JFrTVpiW4g.png" /></figure><p>· Default package manager of Node.js</p><p>· Npm is automatically installed when installing node.js</p><p>· May execute a single command to install any node.js package</p><p><em>II. Yarn</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*5rSmqjaexOy_mGt7qFyZzA.png" /></figure><p>· An alternative to npm for frontend package management</p><p>· Yarn accelerates the build process by catching every package so that dependencies don’t have to be downloaded again.</p><h4><strong>Task runners</strong></h4><p>Task runners are automation tools commonly used in software development to automate repetitive tasks and streamline various aspects of the development workflow. Task runners are mainly used with JavaScript. Run commands for you that would otherwise be tedious or impossible. They do things like your code from SCSS to CSS or TypeScript to JavaScript. They also copy files from location to location, minifying files, running lines, and serving files from a local computer port</p><ol><li><em>Grunt</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*d-AHDqM3-fw2KXnvyv2oRA.png" /></figure><p>· Frontend task runner that enables the automation of repetitive tasks like testing, linting, and minification, among others</p><p>· Grunt is a node js package. You can install it using npm, yarn, or pnpm.</p><p><em>2. Gulp</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*ULNBfV_uWvK0Ic8QzKterw.png" /></figure><p>· Another automated task runner and grunt’s main competitor.</p><p>· Like grunt, gulp may be used to automate recurrent frontend activities like CSS preprocessing, auto prefixing, and image optimization.</p><h4><strong>Module bundlers</strong></h4><p>A module bundler is a tool that combines dependent pieces of JavaScript into a single file, typically for use in a browser. It helps you to load your assets in dependency order, image assets, CSS assets, etc.. This bundling process helps optimize web applications for performance and reduces the number of HTTP requests made to the server.</p><ol><li><em>Browserify</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*qi2CZy8UxIfLYua1JO6fOQ.png" /></figure><p>· Browserify was one of the first JavaScript module bundlers and is still used today.</p><p>· You can bundle your frontend dependencies and load them as a single javascript file in the user’s browser using the Node.js module loader.</p><p>· Browserify makes a required method available on the client side, which could significantly improve performance.</p><p><em>2. Webpack</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*e_ON6s4tH-zsaXbC5_5fyQ.png" /></figure><p>· One of the most popular module bundlers in contemporary web development is Webpack.</p><p>· It can bundle JavaScript and other assets like CSS, images, and fonts.</p><p>· Webpack supports a rich ecosystem of plugins and loaders to handle various tasks, making it highly configurable and extensible.</p><p>· Additionally, Webpack may include AMD and native ECMAScript modules.</p><p><em>3. Parcel</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*1sPaKbxf3hdpz0JptklW3w.jpeg" /></figure><p>· Parcel is a quick and zero-config web application bundler. It seeks to make the setup more accessible and offer a seamless development environment.</p><p>· It supports many asset types, including JavaScript, CSS, HTML, and more.</p><p><em>4. ESbuild</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*Kuzc_hwVxr4Hs4-j1LKG-A.png" /></figure><p>· ESbuild is an extremely fast and lightweight JavaScript bundler and minifier</p><p>· While it may not have as many features as Webpack or Rollup, it excels in simple bundling tasks and is gaining popularity for its speed.</p><p>These tools are not mere utilities but essential companions on your journey to crafting modern, efficient, and maintainable software applications. As the development landscape changes, these build tools will adapt to new technologies and industry best practices. Staying informed about the latest developments in build tools is not just a recommendation but a necessity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c6e02be6231" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>