<?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>DEV Community: Ezeana Micheal</title>
    <description>The latest articles on DEV Community by Ezeana Micheal (@ezeanamichael).</description>
    <link>https://dev.to/ezeanamichael</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F795718%2F32ca5ddb-abe1-44e1-9391-85534fc496af.jpg</url>
      <title>DEV Community: Ezeana Micheal</title>
      <link>https://dev.to/ezeanamichael</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ezeanamichael"/>
    <language>en</language>
    <item>
      <title>Docker Explained for Backend Developers</title>
      <dc:creator>Ezeana Micheal</dc:creator>
      <pubDate>Fri, 13 Nov 2026 19:02:08 +0000</pubDate>
      <link>https://dev.to/ezeanamichael/docker-explained-for-backend-developers-333j</link>
      <guid>https://dev.to/ezeanamichael/docker-explained-for-backend-developers-333j</guid>
      <description>&lt;p&gt;As a backend developer(like me), you probably spend most of your time writing application logic, building APIs, connecting databases, handling authentication, and making sure everything works as expected.&lt;/p&gt;

&lt;p&gt;But there is another important part of backend development: deployment.&lt;/p&gt;

&lt;p&gt;You have built your application, tested it locally, and everything works. Now you need to move it to a server. This is where things can become complicated.&lt;/p&gt;

&lt;p&gt;The server may have a different Python version, missing dependencies, a different environment configuration, or other software conflicts.&lt;/p&gt;

&lt;p&gt;Docker helps solve many of these problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. What Is Docker?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Docker is a platform that allows you to package an application together with the dependencies and configuration it needs to run. This package is called a container.&lt;/p&gt;

&lt;p&gt;For example, imagine you have built a Django application that requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python 3.12
&lt;/li&gt;
&lt;li&gt;Django
&lt;/li&gt;
&lt;li&gt;PostgreSQL client libraries
&lt;/li&gt;
&lt;li&gt;Some Python packages
&lt;/li&gt;
&lt;li&gt;Environment variables&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of manually installing and configuring everything on every server, you can define the application environment using Docker.&lt;/p&gt;

&lt;p&gt;You can then build an image and run it as a container on another machine with Docker installed.&lt;/p&gt;

&lt;p&gt;The idea is simple: &lt;strong&gt;your application should run in a consistent environment, regardless of where you deploy it.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. Understanding Images and Containers&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;These two terms are important when learning Docker.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker Image:&lt;/strong&gt; An image is the packaged blueprint used to create a container. It contains the application code, dependencies, and instructions needed to run it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker Container:&lt;/strong&gt; A container is a running instance of an image.&lt;/p&gt;

&lt;p&gt;Think of an image as a recipe and a container as the actual meal prepared from that recipe. You can create multiple containers from the same image.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;3. Creating a Dockerfile&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Let's use a simple FastAPI application as an example.&lt;/p&gt;

&lt;p&gt;Imagine your project has this structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-api/
├── main.py
├── requirements.txt
└── Dockerfile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your &lt;code&gt;requirements.txt&lt;/code&gt; could contain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fastapi
uvicorn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, create a file called &lt;code&gt;Dockerfile&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt; python:3.12-slim

&lt;span class="k"&gt;WORKDIR&lt;/span&gt; /app

&lt;span class="k"&gt;COPY&lt;/span&gt; requirements.txt .

&lt;span class="k"&gt;RUN&lt;/span&gt; pip install --no-cache-dir -r requirements.txt

&lt;span class="k"&gt;COPY&lt;/span&gt; . .

&lt;span class="k"&gt;EXPOSE&lt;/span&gt; 8000

&lt;span class="k"&gt;CMD&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"uvicorn"&lt;/span&gt;, &lt;span class="s2"&gt;"main:app"&lt;/span&gt;, &lt;span class="s2"&gt;"--host"&lt;/span&gt;, &lt;span class="s2"&gt;"0.0.0.0"&lt;/span&gt;, &lt;span class="s2"&gt;"--port"&lt;/span&gt;, &lt;span class="s2"&gt;"8000"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's understand each instruction.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;FROM python:3.12-slim&lt;/code&gt;: Specifies the base image. We are using a lightweight Python 3.12 image.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;WORKDIR /app&lt;/code&gt;: Sets &lt;code&gt;/app&lt;/code&gt; as the working directory inside the container.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;COPY requirements.txt .&lt;/code&gt;: Copies the requirements file into the container.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;RUN pip install ...&lt;/code&gt;: Installs the Python dependencies.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;COPY . .&lt;/code&gt;: Copies the rest of the application files into the container.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;EXPOSE 8000&lt;/code&gt;: Documents that the application listens on port 8000.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD [...]&lt;/code&gt;: Defines the command that runs when the container starts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Notice that we use &lt;code&gt;0.0.0.0&lt;/code&gt; as the host. This allows the application to accept connections from outside the container.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. Building and Running the Container&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Once your Dockerfile is ready, open your terminal in the project directory.&lt;/p&gt;

&lt;p&gt;Build the image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker build -t my-api .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;docker build&lt;/code&gt; builds an image.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-t my-api&lt;/code&gt; gives the image a name.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.&lt;/code&gt; tells Docker to use the current directory as the build context.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now run the container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run -d -p 8000:8000 --name my-api-container my-api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What does this command do?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;docker run&lt;/code&gt; creates and starts a container.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-d&lt;/code&gt; runs it in the background.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-p 8000:8000&lt;/code&gt; maps port 8000 on your machine to port 8000 inside the container.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--name&lt;/code&gt; gives the container a name.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;my-api&lt;/code&gt; specifies the image to run.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can now access the API through:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;5. Why Docker Matters for Backend Deployment&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is where Docker becomes particularly useful to backend developers.&lt;/p&gt;

&lt;p&gt;When deploying an application without containers, you may need to manually configure the server, install the right runtime, install dependencies, and manage different versions of software.&lt;/p&gt;

&lt;p&gt;With Docker, you can package the application environment and deploy it as a container.&lt;/p&gt;

&lt;p&gt;For example, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build your application image locally.
&lt;/li&gt;
&lt;li&gt;Push the image to a container registry such as Docker Hub or Amazon ECR.
&lt;/li&gt;
&lt;li&gt;Pull that image on your production server.
&lt;/li&gt;
&lt;li&gt;Start the application using the same environment you tested.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes deployments more predictable and reduces problems caused by differences between development and production environments.&lt;/p&gt;

&lt;p&gt;It also makes it easier to roll out new application versions and roll back when something goes wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;6. Docker Compose: Running Your Backend and Database Together&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Most backend applications need more than one service.&lt;/p&gt;

&lt;p&gt;A typical application may have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Django or FastAPI backend.
&lt;/li&gt;
&lt;li&gt;A PostgreSQL database.
&lt;/li&gt;
&lt;li&gt;A Redis instance for caching or background tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Docker Compose allows you to define and manage multiple containers using one configuration file.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;backend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"8000:8000"&lt;/span&gt;
    &lt;span class="na"&gt;depends_on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;db&lt;/span&gt;

  &lt;span class="na"&gt;db&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgres:16&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;POSTGRES_DB&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;myapp&lt;/span&gt;
      &lt;span class="na"&gt;POSTGRES_USER&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;admin&lt;/span&gt;
      &lt;span class="na"&gt;POSTGRES_PASSWORD&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;example&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;postgres_data:/var/lib/postgresql/data&lt;/span&gt;

&lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;postgres_data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can start both services with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker compose up -d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Docker Compose creates and starts the containers based on the configuration.&lt;/p&gt;

&lt;p&gt;The database also has a named volume, which helps preserve its data when the container is replaced.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;7. Docker and DevOps&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Docker is one of the tools that connects backend development with DevOps.&lt;/p&gt;

&lt;p&gt;As a backend developer, understanding Docker means you are not limited to writing code and handing it over to someone else for deployment.&lt;/p&gt;

&lt;p&gt;You can understand how your application is packaged, how its dependencies are managed, how it communicates with other services, and how it runs in production.&lt;/p&gt;

&lt;p&gt;It also prepares you for other DevOps tools and practices, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CI/CD:&lt;/strong&gt; Automatically building and testing Docker images whenever code changes.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Container registries:&lt;/strong&gt; Storing and distributing application images.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud deployment:&lt;/strong&gt; Running containers on AWS, Azure, and other platforms.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kubernetes:&lt;/strong&gt; Managing containers across multiple machines.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure automation:&lt;/strong&gt; Provisioning the infrastructure required to run your applications.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Docker is not just about running applications inside containers. It is about making applications easier to package, move, test, and deploy.&lt;/p&gt;

&lt;p&gt;For backend developers, this is especially important because building an application is only one part of the job. Understanding how to get that application running reliably in production is equally valuable.&lt;/p&gt;

&lt;p&gt;You don't necessarily need to become a DevOps engineer to benefit from Docker. But if you understand Docker, you become a backend developer who understands more of the application lifecycle, from writing the code to getting it running on a server.&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>cloudcomputing</category>
      <category>devops</category>
      <category>webdev</category>
    </item>
    <item>
      <title>AWS IAM Mistakes I Avoided as a Beginner</title>
      <dc:creator>Ezeana Micheal</dc:creator>
      <pubDate>Thu, 12 Nov 2026 12:53:38 +0000</pubDate>
      <link>https://dev.to/ezeanamichael/aws-iam-mistakes-i-avoided-as-a-beginner-57bi</link>
      <guid>https://dev.to/ezeanamichael/aws-iam-mistakes-i-avoided-as-a-beginner-57bi</guid>
      <description>&lt;p&gt;When I started learning AWS, IAM was one of those services I knew I needed to understand, but I didn't immediately appreciate how important it was. IAM stands for Identity and Access Management. It controls who can access AWS resources and what they can do with them.&lt;/p&gt;

&lt;p&gt;As I learned more about AWS, I realized that getting IAM wrong can expose resources, create security problems, or make infrastructure hard to manage.&lt;/p&gt;

&lt;p&gt;Here are some IAM mistakes worth avoiding as a beginner.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. Using the Root Account for Everything&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The AWS root account has unrestricted access to the account. It is created when you first sign up for AWS.&lt;/p&gt;

&lt;p&gt;One mistake beginners can make is using this account for everyday activities.&lt;/p&gt;

&lt;p&gt;Instead, secure the root account, enable MFA, and avoid using it for routine administration. Use IAM identities with appropriate permissions for your regular work.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. Giving Everyone AdministratorAccess&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Sometimes, when something doesn't work, the easiest solution seems to be granting AdministratorAccess. It may solve the immediate permission problem, but it also gives the identity far more access than it needs.&lt;/p&gt;

&lt;p&gt;A better approach is to grant only the permissions required for a particular task.&lt;/p&gt;

&lt;p&gt;This is called the principle of least privilege.&lt;/p&gt;

&lt;p&gt;For example, if an application only needs to read files from an S3 bucket, it shouldn't have permission to delete buckets or modify IAM users.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;3. Hardcoding AWS Access Keys&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Another mistake is putting AWS access keys directly inside application code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="no"&gt;AWS_ACCESS_KEY_ID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"your-access-key"&lt;/span&gt;
&lt;span class="no"&gt;AWS_SECRET_ACCESS_KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"your-secret-key"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If this code gets pushed to a public repository, someone else could use those credentials to access your AWS resources. Instead, use IAM roles and temporary credentials where possible.&lt;/p&gt;

&lt;p&gt;For applications running on EC2, an IAM role attached through an instance profile allows the application to obtain temporary credentials without storing long-term access keys in the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. Confusing IAM Users, Groups, Roles, and Policies&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;These concepts are related, but they serve different purposes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;IAM users:&lt;/strong&gt; Identities that can represent individual people or applications, though roles are generally preferred for workloads.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IAM groups:&lt;/strong&gt; Collections of IAM users that can share permissions.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IAM roles:&lt;/strong&gt; Identities that provide permissions to trusted users, services, or other accounts when assumed.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IAM policies:&lt;/strong&gt; Documents that define what actions are allowed or denied on which resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding these differences makes it easier to design access properly.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;5. Forgetting MFA&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A password alone may not be enough to protect an account. Multi-factor authentication (MFA) adds another layer of security by requiring an additional verification method.&lt;/p&gt;

&lt;p&gt;Enable MFA for the root account and human users, especially those with privileged access.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;6. Not Understanding IAM Roles in AWS Services&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;AWS services often need permission to interact with other AWS services.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 may need permission to read files from S3.
&lt;/li&gt;
&lt;li&gt;Lambda may need permission to write logs to CloudWatch.
&lt;/li&gt;
&lt;li&gt;ECS tasks may need permission to retrieve secrets.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of creating access keys for these services, assign appropriate IAM roles.&lt;/p&gt;

&lt;p&gt;This keeps credentials out of application code and makes access easier to manage.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;7. Ignoring IAM Policy Scope&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;An IAM policy can allow an action on a specific resource or on a much broader set of resources.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"s3:GetObject"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"arn:aws:s3:::my-app-bucket/*"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows reading objects inside the specified bucket.&lt;/p&gt;

&lt;p&gt;Compare that with granting access to every S3 object in the account.&lt;/p&gt;

&lt;p&gt;The difference matters. Restrict permissions to the resources the identity actually needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What I Learned&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;IAM is not just another AWS service to configure. It is part of the security foundation of your infrastructure.&lt;/p&gt;

&lt;p&gt;As a beginner, it is tempting to focus on getting services running first. But understanding IAM early makes working with EC2, S3, Lambda, RDS, and other AWS services much easier.&lt;/p&gt;

&lt;p&gt;The goal isn't simply to make something work. It is to make it work with the right permissions.&lt;/p&gt;

&lt;p&gt;That is one of the habits worth building early as a Cloud or DevOps engineer.&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>devops</category>
      <category>webdev</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>How DNS, HTTP and TLS Work, in Simple Terms</title>
      <dc:creator>Ezeana Micheal</dc:creator>
      <pubDate>Wed, 11 Nov 2026 14:50:50 +0000</pubDate>
      <link>https://dev.to/ezeanamichael/how-dns-http-and-tls-work-in-simple-terms-3c2f</link>
      <guid>https://dev.to/ezeanamichael/how-dns-http-and-tls-work-in-simple-terms-3c2f</guid>
      <description>&lt;p&gt;You may have heard these terms before: TNS. HTTP. DNS.&lt;/p&gt;

&lt;p&gt;Whenever you visit a website, several things happen behind the scenes before the page appears on your screen. For example, you type a URL like &lt;code&gt;https://example.com&lt;/code&gt;, press Enter, and the website loads. But how does your browser know where to find the website? How does it communicate with the server? And how is your connection secured?&lt;/p&gt;

&lt;p&gt;Let's break it down.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. DNS: Finding the Server&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;DNS stands for Domain Name System. It helps translate domain names into IP addresses. Computers communicate with one another using IP addresses, but remembering an IP address for every website would be difficult. DNS allows us to use domain names instead.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;example.com → 93.184.216.34
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you visit a website, your computer needs to find the IP address associated with its domain name. It checks available DNS information, often through a DNS resolver, which may retrieve the answer from its cache or query other DNS servers.&lt;/p&gt;

&lt;p&gt;Once the IP address is available, your browser knows where to send its connection request.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We can think of DNS as the phonebook of the internet.&lt;/strong&gt; You know the person's name, but you need their number to contact them.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. HTTP: Communicating With the Server&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;HTTP stands for Hypertext Transfer Protocol. This defines how a browser and a web server communicate. The browser sends requests, and the server responds.&lt;/p&gt;

&lt;p&gt;For example, when you visit a website, your browser may send a request like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="no"&gt;GET&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="no"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mf"&gt;1.1&lt;/span&gt;
&lt;span class="nc"&gt;Host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells the server that the browser wants to retrieve the homepage.&lt;/p&gt;

&lt;p&gt;The server may respond with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="no"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mf"&gt;1.1&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt; &lt;span class="no"&gt;OK&lt;/span&gt;
&lt;span class="nc"&gt;Content&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;html&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;200 OK&lt;/code&gt; status means the request was successful. The response can then contain the HTML document that your browser displays.&lt;/p&gt;

&lt;p&gt;There are different HTTP methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;GET&lt;/code&gt; – Retrieve information.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;POST&lt;/code&gt; – Send data to the server.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;PUT&lt;/code&gt; – Replace or update a resource.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DELETE&lt;/code&gt; – Delete a resource.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;HTTP also has status codes such as &lt;code&gt;404 Not Found&lt;/code&gt;, &lt;code&gt;500 Internal Server Error&lt;/code&gt;, and &lt;code&gt;403 Forbidden&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think of HTTP as the language your browser and server use to communicate.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;3. TLS: Securing the Connection&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;TLS stands for Transport Layer Security. It protects communication between your browser and the server by encrypting data, helping prevent unauthorized parties from reading or modifying it while it travels across the network. This is why you see HTTPS instead of HTTP when visiting secure websites.&lt;/p&gt;

&lt;p&gt;HTTPS is simply HTTP communication protected by TLS.&lt;/p&gt;

&lt;p&gt;When a browser connects to a website using HTTPS, a TLS handshake takes place. During this process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The server presents its TLS certificate.
&lt;/li&gt;
&lt;li&gt;The browser verifies that the certificate is valid for the domain and trusted.
&lt;/li&gt;
&lt;li&gt;Both sides establish the cryptographic keys used to protect the connection.
&lt;/li&gt;
&lt;li&gt;Secure HTTP communication begins.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This means sensitive information such as passwords, authentication tokens, and payment details can travel securely between the browser and the server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think of TLS as a secure, private channel between your browser and the server.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. How They Work Together&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Let's put everything together.&lt;/p&gt;

&lt;p&gt;When you visit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The process looks something like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Your browser identifies &lt;code&gt;example.com&lt;/code&gt; as the domain it needs to reach.
&lt;/li&gt;
&lt;li&gt;DNS helps your browser obtain the server's IP address.
&lt;/li&gt;
&lt;li&gt;Your browser connects to the server.
&lt;/li&gt;
&lt;li&gt;TLS establishes a secure connection and verifies the server's identity.
&lt;/li&gt;
&lt;li&gt;Your browser sends an HTTP request over that secure connection.
&lt;/li&gt;
&lt;li&gt;The server processes the request and sends an HTTP response.
&lt;/li&gt;
&lt;li&gt;Your browser receives the response and displays the website.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You enter a URL
      |
      v
     DNS
Find the server IP
      |
      v
     TLS
Establish secure connection
      |
      v
     HTTP
Send request and receive response
      |
      v
 Website loads
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;5. Why This Matters in DevOps&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Understanding DNS, HTTP, and TLS is important because many production issues involve one or more of them.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A website pointing to the wrong IP address? Check DNS records.
&lt;/li&gt;
&lt;li&gt;A website returning &lt;code&gt;502 Bad Gateway&lt;/code&gt;? Check the web server or reverse proxy and its upstream application.
&lt;/li&gt;
&lt;li&gt;A website showing a certificate warning? Check its TLS certificate and configuration.
&lt;/li&gt;
&lt;li&gt;An application working on HTTP but failing on HTTPS? Investigate TLS, reverse proxy, and application configuration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These concepts also help when configuring domain names, Nginx, load balancers, cloud infrastructure, and application deployments.&lt;/p&gt;

&lt;p&gt;Before troubleshooting a website, we should understand how a request gets from a user's browser to your server and back again.&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>devops</category>
      <category>cloudcomputing</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Bash Script to Automate Server Setup</title>
      <dc:creator>Ezeana Micheal</dc:creator>
      <pubDate>Wed, 11 Nov 2026 14:33:11 +0000</pubDate>
      <link>https://dev.to/ezeanamichael/bash-script-to-automate-server-setup-1enk</link>
      <guid>https://dev.to/ezeanamichael/bash-script-to-automate-server-setup-1enk</guid>
      <description>&lt;p&gt;When setting up a new Linux server, there are some tasks you perform or carry out almost every time. You may need to update packages, install required tools, create a user, configure permissions, and prepare the server for deployment.&lt;/p&gt;

&lt;p&gt;Doing these steps manually every time is repetitive. This is where Bash scripting becomes useful.&lt;/p&gt;

&lt;p&gt;Bash allows us to write commands in a file and execute them together. Instead of running each setup command one after another, we can create a script that handles the process for us.&lt;/p&gt;

&lt;p&gt;Let's look at a simple Bash script that automates some basic server setup tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The script&lt;/strong&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nb"&gt;set&lt;/span&gt; -e

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Updating server..."&lt;/span&gt;

sudo apt update
sudo apt upgrade -y

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Installing required packages..."&lt;/span&gt;

sudo apt install -y git curl nginx

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Creating deployment user..."&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; ! id &lt;span class="s2"&gt;"deploy"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;gt;&lt;/span&gt;/dev/null&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
    sudo useradd -m -s /bin/bash deploy
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Starting Nginx..."&lt;/span&gt;

sudo systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; nginx
sudo systemctl start nginx

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Server setup completed!"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Understanding each line&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. &lt;code&gt;#!/bin/bash&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is called a shebang. It tells the operating system to use Bash to interpret and execute the script.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. &lt;code&gt;set -e&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This tells Bash to stop executing the script if a command fails. This helps prevent the script from continuing when an important setup step has gone wrong.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. &lt;code&gt;echo "Updating server..."&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;echo&lt;/code&gt; command prints text to the terminal. Here, it tells us which part of the setup process is running.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. &lt;code&gt;sudo apt update&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo&lt;/code&gt; runs a command with administrator privileges, while &lt;code&gt;apt update&lt;/code&gt; refreshes the package lists on the server.&lt;/p&gt;

&lt;p&gt;It checks the configured software repositories for information about available packages and their latest versions. It does not install upgrades yet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. &lt;code&gt;sudo apt upgrade -y&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This installs available updates for packages already on the server.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;-y&lt;/code&gt; option automatically answers yes to confirmation prompts, allowing the process to continue without waiting for manual approval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. &lt;code&gt;echo "Installing required packages..."&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This displays a message before the script begins installing the software needed for the server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. &lt;code&gt;sudo apt install -y git curl nginx&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This installs three packages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git&lt;/code&gt;: Used for version control and working with code repositories.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;curl&lt;/code&gt;: Used to make requests to URLs and test network endpoints.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nginx&lt;/code&gt;: A web server that can also act as a reverse proxy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;code&gt;-y&lt;/code&gt; option automatically confirms the installation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. &lt;code&gt;echo "Creating deployment user..."&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This displays a message to indicate that the script is moving to the user creation stage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. &lt;code&gt;if ! id "deploy" &amp;amp;&amp;gt;/dev/null; then&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This checks whether a user named &lt;code&gt;deploy&lt;/code&gt; already exists.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;id "deploy"&lt;/code&gt; checks whether the user exists.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;!&lt;/code&gt; reverses the result, so the condition is true if the user does not exist.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;amp;&amp;gt;/dev/null&lt;/code&gt; hides the command's output.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;then&lt;/code&gt; tells Bash to execute the following commands if the condition is true.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This check prevents the script from trying to create the same user again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10. &lt;code&gt;sudo useradd -m -s /bin/bash deploy&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This creates a new Linux user called &lt;code&gt;deploy&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;useradd&lt;/code&gt; creates the user.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-m&lt;/code&gt; creates a home directory for the user.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-s /bin/bash&lt;/code&gt; sets Bash as the user's default shell.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;deploy&lt;/code&gt; is the username.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A deployment user can be used to manage application files and run deployment-related tasks without always working as root.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11. &lt;code&gt;fi&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This closes the &lt;code&gt;if&lt;/code&gt; statement. In Bash, &lt;code&gt;fi&lt;/code&gt; marks the end of a conditional block.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12. &lt;code&gt;echo "Starting Nginx..."&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This displays a message before the script starts the Nginx service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;13. &lt;code&gt;sudo systemctl enable nginx&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This configures Nginx to start automatically whenever the server boots.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;14. &lt;code&gt;sudo systemctl start nginx&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This starts the Nginx service immediately, without requiring a server restart.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;15. &lt;code&gt;echo "Server setup completed!"&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This displays a final message to show that the script has reached the end successfully.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Running the script&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Save the script in a file called &lt;code&gt;setup.sh&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;First, give it permission to execute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;chmod +x setup.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;chmod +x&lt;/code&gt; command adds execute permission to the file.&lt;/p&gt;

&lt;p&gt;Next, run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./setup.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;./&lt;/code&gt; tells Linux to execute the script from the current directory.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why this matters in DevOps&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Imagine setting up five different servers. Running the same commands manually on each server takes time and creates room for mistakes. With Bash scripting, you can automate those repeated tasks and make the setup process more consistent.&lt;/p&gt;

&lt;p&gt;This is one of the foundations of DevOps: reducing repetitive manual work through automation.&lt;/p&gt;

&lt;p&gt;As we progress, we can build on this knowledge with tools like Ansible and Terraform, which help automate more complex server and infrastructure configurations.&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>devops</category>
      <category>webdev</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>20 Linux Commands Every DevOps Engineer Needs to Know</title>
      <dc:creator>Ezeana Micheal</dc:creator>
      <pubDate>Tue, 10 Nov 2026 11:48:00 +0000</pubDate>
      <link>https://dev.to/ezeanamichael/20-linux-commands-every-devops-engineer-needs-to-know-4efg</link>
      <guid>https://dev.to/ezeanamichael/20-linux-commands-every-devops-engineer-needs-to-know-4efg</guid>
      <description>&lt;p&gt;Straight to the point: &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. man – Understanding Linux Commands&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;One thing you will quickly discover when working with Linux is that there are many commands, and each command comes with different options and ways of using it.&lt;/p&gt;

&lt;p&gt;You don't have to memorise everything. Linux provides manual pages (man pages) that explain how commands work, their available options, and their usage.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;man ls
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This opens the manual page for the &lt;code&gt;ls&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;You can navigate through the manual using the arrow keys or Page Up and Page Down. When you are done, press &lt;code&gt;q&lt;/code&gt; to quit.&lt;/p&gt;

&lt;p&gt;This is particularly useful when working on servers where you may not have access to a browser or when you need to understand an option before using it.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. sudo – Running Commands with Elevated Privileges&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In Linux, not every user has permission to perform every operation.&lt;/p&gt;

&lt;p&gt;For example, installing software, modifying certain system files, and managing system services usually require administrative privileges.&lt;/p&gt;

&lt;p&gt;This is where &lt;code&gt;sudo&lt;/code&gt; comes in.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo apt install nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command runs with elevated privileges, allowing you to install Nginx on your system.&lt;/p&gt;

&lt;p&gt;You may also come across:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo su
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This opens a root shell, allowing you to run multiple commands with administrative privileges.&lt;/p&gt;

&lt;p&gt;However, I would recommend using &lt;code&gt;sudo&lt;/code&gt; for individual commands rather than staying logged in as root for prolonged periods. Running everything as root increases the risk of accidentally modifying or deleting important system files.&lt;/p&gt;

&lt;p&gt;To leave a root shell, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;3. pwd – Knowing Your Current Location&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Have you ever navigated through several directories and suddenly forgotten where you are?&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;pwd&lt;/code&gt; command solves that problem.&lt;/p&gt;

&lt;p&gt;It stands for Print Working Directory and displays the full path of your current location.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/home/michael/DevOps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When managing servers, you will often move between application directories, configuration folders, log directories, and other system locations.&lt;/p&gt;

&lt;p&gt;Knowing your current directory helps you avoid running commands against the wrong files or folders.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. ls – Listing Files and Directories&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;ls&lt;/code&gt; command allows you to see the files and directories in your current location.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ls
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, there are a few options that make it more useful.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ls -l
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Displays files in a detailed format, including permissions, ownership, file size, and modification dates.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ls -a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Displays hidden files and directories, including files such as &lt;code&gt;.bashrc&lt;/code&gt; and &lt;code&gt;.ssh&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ls -lah
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Combines the options to show hidden files, detailed information, and human-readable file sizes.&lt;/p&gt;

&lt;p&gt;This is one of the commands you will use regularly when inspecting application directories, checking configuration files, and investigating file permissions.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;5. cd – Navigating Between Directories&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;cd&lt;/code&gt; command allows you to change your current directory.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /var/www
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This moves you into the &lt;code&gt;/var/www&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;To move one directory backwards:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ..
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To move up two levels:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ../..
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also return to your home directory by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One small habit worth developing is using the Tab key for autocomplete. Instead of typing an entire directory name, start typing the first few characters and press Tab.&lt;/p&gt;

&lt;p&gt;It saves time and reduces mistakes, especially when working with long directory paths.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;6. mkdir – Creating Directories&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;mkdir&lt;/code&gt; command allows you to create directories.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mkdir DevOps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a directory called &lt;code&gt;DevOps&lt;/code&gt; in your current location.&lt;/p&gt;

&lt;p&gt;You can also create multiple directories at once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mkdir logs backups scripts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another useful option is &lt;code&gt;-p&lt;/code&gt;, which allows you to create nested directories even when the parent directories do not exist.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mkdir -p /var/www/myapp/logs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will find this useful when preparing server environments and organising application files.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;7. touch – Creating Files&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;While &lt;code&gt;mkdir&lt;/code&gt; creates directories, &lt;code&gt;touch&lt;/code&gt; can create empty files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;touch app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates an empty file called &lt;code&gt;app.py&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can also create several files at once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;touch Dockerfile requirements.txt .env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An important detail is that &lt;code&gt;touch&lt;/code&gt; does not overwrite the contents of an existing file. It updates its timestamps instead.&lt;/p&gt;

&lt;p&gt;You will often use it when creating configuration files, scripts, and other application files.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;8. cp – Copying Files and Directories&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;cp&lt;/code&gt; command allows you to copy files from one location to another.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cp app.py backups/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a copy of &lt;code&gt;app.py&lt;/code&gt; inside the &lt;code&gt;backups&lt;/code&gt; directory while leaving the original file in place.&lt;/p&gt;

&lt;p&gt;To copy an entire directory and its contents, use the recursive option:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cp -r myapp backups/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This can be useful when creating backups of configuration files or application directories before making changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;9. mv – Moving and Renaming Files&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;mv&lt;/code&gt; command is used to move files and directories from one location to another.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mv app.py /var/www/myapp/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This moves the file into the specified directory.&lt;/p&gt;

&lt;p&gt;You can also use &lt;code&gt;mv&lt;/code&gt; to rename files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mv old_config.conf new_config.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Unlike &lt;code&gt;cp&lt;/code&gt;, &lt;code&gt;mv&lt;/code&gt; does not leave a second copy behind.&lt;/p&gt;

&lt;p&gt;When working with Linux servers, you may use it to organise application files, move configuration files, or rename files during deployment.&lt;/p&gt;

&lt;p&gt;Be careful when moving files into directories where another file has the same name, as it may replace the existing file.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;10. rm – Removing Files and Directories&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;rm&lt;/code&gt; command allows you to delete files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rm app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To remove a directory and everything inside it, you can use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rm -r myapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You may also encounter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rm -rf myapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;-r&lt;/code&gt; means recursive, while &lt;code&gt;-f&lt;/code&gt; forces removal without prompting for confirmation in many situations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Be very careful with this command.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A wrong path can result in deleting important application files, configuration files, or even critical system data.&lt;/p&gt;

&lt;p&gt;Always check your current directory using &lt;code&gt;pwd&lt;/code&gt; and inspect the target using &lt;code&gt;ls&lt;/code&gt; before running destructive commands. Avoid running recursive deletion commands with &lt;code&gt;sudo&lt;/code&gt; unless you fully understand what you are removing.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;11. cat – Reading File Contents&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;cat&lt;/code&gt; command allows you to display the contents of a file directly in the terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cat config.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is particularly useful when checking configuration files or reading application settings.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cat /etc/hosts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Displays the contents of the system's hosts file.&lt;/p&gt;

&lt;p&gt;You can also combine &lt;code&gt;cat&lt;/code&gt; with other commands using a pipe.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cat config.txt &lt;span class="o"&gt;|&lt;/span&gt; grep &lt;span class="s2"&gt;"DATABASE"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This displays only the lines containing the word &lt;code&gt;DATABASE&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For very large files, commands such as &lt;code&gt;less&lt;/code&gt; are often more convenient because they allow you to navigate through the contents without printing everything at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;12. echo – Printing and Writing Text&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;echo&lt;/code&gt; command prints text to the terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Hello DevOps"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, it is also useful when writing information into files and working with environment variables.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Hello DevOps"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; message.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;&amp;gt;&lt;/code&gt; operator writes the text into the file. If the file already exists, its previous contents will be replaced.&lt;/p&gt;

&lt;p&gt;To append instead of replacing the contents, use &lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Learning Linux commands"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; message.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use &lt;code&gt;echo&lt;/code&gt; to check environment variables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$HOME&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$PATH&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This becomes useful when troubleshooting application environments, checking configuration values, and working with deployment scripts.&lt;/p&gt;

&lt;p&gt;One important thing: avoid using &lt;code&gt;echo&lt;/code&gt; to write secrets into shell commands or scripts that may end up in shell history or logs.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;13. grep – Searching Through Files&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Imagine you are working on a server and have a configuration file containing hundreds of lines. You want to find a particular setting without reading everything.&lt;/p&gt;

&lt;p&gt;This is where &lt;code&gt;grep&lt;/code&gt; becomes useful.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep &lt;span class="s2"&gt;"DATABASE"&lt;/span&gt; .env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This searches for lines containing &lt;code&gt;DATABASE&lt;/code&gt; in the &lt;code&gt;.env&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;You can also search recursively through directories:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -r &lt;span class="s2"&gt;"DEBUG"&lt;/span&gt; /var/www/myapp/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some useful options include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-i&lt;/code&gt; ignores uppercase and lowercase differences.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-n&lt;/code&gt; displays line numbers.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-r&lt;/code&gt; searches recursively through directories.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-v&lt;/code&gt; displays lines that do not match the search.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -in &lt;span class="s2"&gt;"error"&lt;/span&gt; application.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This searches for the word &lt;code&gt;error&lt;/code&gt;, regardless of case, and displays the matching line numbers.&lt;/p&gt;

&lt;p&gt;For DevOps engineers, &lt;code&gt;grep&lt;/code&gt; is particularly useful when investigating application logs, checking configuration files, and troubleshooting deployment issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;14. find – Finding Files and Directories&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;find&lt;/code&gt; command allows you to search for files and directories based on their names, types, sizes, modification times, and other conditions.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find /var/www -name &lt;span class="s2"&gt;"Dockerfile"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This searches the &lt;code&gt;/var/www&lt;/code&gt; directory and its subdirectories for files named &lt;code&gt;Dockerfile&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To find all files ending in &lt;code&gt;.log&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find /var/log -type f -name &lt;span class="s2"&gt;"*.log"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To find directories:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find /var/www -type d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Unlike &lt;code&gt;locate&lt;/code&gt;, which searches an indexed database, &lt;code&gt;find&lt;/code&gt; searches the specified directory tree directly.&lt;/p&gt;

&lt;p&gt;This is useful when investigating where application files are stored, locating configuration files, and identifying old files that may need attention.&lt;/p&gt;

&lt;p&gt;You may also encounter &lt;code&gt;locate&lt;/code&gt;, which can quickly search for files by name using a pre-built index. Its database may need updating before newly created files appear.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;15. history – Viewing Previously Executed Commands&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;history&lt;/code&gt; command displays commands you have previously executed in your terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;history
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This can be particularly useful when you have forgotten a command you ran earlier or want to repeat a previous operation.&lt;/p&gt;

&lt;p&gt;You can search through your command history using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;history&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; grep &lt;span class="s2"&gt;"docker"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You may also execute a previous command using its history number:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;!25
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This executes command number 25 from your history.&lt;/p&gt;

&lt;p&gt;You can configure Bash to display timestamps alongside your command history:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;HISTTIMEFORMAT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"%d-%m-%Y %T "&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes it easier to see when commands were executed, provided the shell has recorded the relevant timestamps.&lt;/p&gt;

&lt;p&gt;However, remember that shell history is not a complete audit log. Commands may not be recorded, and it should not be treated as a reliable security record.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;16. chmod – Managing File Permissions&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Linux uses permissions to control who can read, write, and execute files and directories.&lt;/p&gt;

&lt;p&gt;There are three main permission types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read (r): Allows a user to read a file.
&lt;/li&gt;
&lt;li&gt;Write (w): Allows a user to modify a file.
&lt;/li&gt;
&lt;li&gt;Execute (x): Allows a user to execute a file or access a directory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These permissions are assigned to three categories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Owner: The user who owns the file.
&lt;/li&gt;
&lt;li&gt;Group: Users belonging to the assigned group.
&lt;/li&gt;
&lt;li&gt;Others: Everyone else.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;code&gt;chmod&lt;/code&gt; command allows us to modify these permissions.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;chmod 755 deploy.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives the owner read, write, and execute permissions, while the group and others receive read and execute permissions.&lt;/p&gt;

&lt;p&gt;Another example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;chmod 644 config.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives the owner read and write permissions, while the group and others can only read the file.&lt;/p&gt;

&lt;p&gt;You can also use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;chmod +x deploy.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This adds execute permission without replacing the other existing permissions.&lt;/p&gt;

&lt;p&gt;This is particularly useful when working with deployment scripts, application files, and server configuration.&lt;/p&gt;

&lt;p&gt;A common mistake is using &lt;code&gt;chmod 777&lt;/code&gt; on everything because an application is having permission issues. This gives everyone read, write, and execute permissions, which can create serious security problems. It is better to understand the actual permission requirement and assign only what is necessary.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;17. chown – Changing File Ownership&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;While &lt;code&gt;chmod&lt;/code&gt; manages permissions, &lt;code&gt;chown&lt;/code&gt; allows you to change the ownership of files and directories.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo chown michael app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This changes the owner of &lt;code&gt;app.py&lt;/code&gt; to &lt;code&gt;michael&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can also change both the owner and group:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo chown michael:developers app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To apply the change recursively to a directory and its contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo chown -R michael:developers /var/www/myapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is especially useful when deploying applications.&lt;/p&gt;

&lt;p&gt;For example, if an application runs under a particular Linux user, the application files may need to be owned by that user or a suitable group.&lt;/p&gt;

&lt;p&gt;Understanding the difference between ownership and permissions is important when troubleshooting issues such as applications being unable to read configuration files or write to log directories.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;18. useradd – Creating Linux Users&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Linux allows you to create different user accounts with different permissions and access levels.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;useradd&lt;/code&gt; command is used to create new users.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo useradd michael
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a user account called &lt;code&gt;michael&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you want to create a user with a home directory and an interactive Bash shell, you can use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo useradd -m -s /bin/bash michael
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can then set the user's password using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo passwd michael
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another useful command is &lt;code&gt;groupadd&lt;/code&gt;, which creates a new group.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo groupadd developers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can add an existing user to that group using &lt;code&gt;usermod&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo usermod -aG developers michael
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;-aG&lt;/code&gt; options append the user to the specified supplementary group without removing their existing supplementary group memberships.&lt;/p&gt;

&lt;p&gt;These commands are useful when managing server access, separating responsibilities, and ensuring that different users have only the permissions they need.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;19. apt – Installing and Managing Software&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Most Linux distributions have a package manager that helps you install, update, and remove software.&lt;/p&gt;

&lt;p&gt;On Ubuntu and other Debian-based distributions, one of the package managers you will frequently encounter is APT.&lt;/p&gt;

&lt;p&gt;To update the package information from configured repositories, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo apt update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To upgrade installed packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo apt upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To install a package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo apt install nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To remove a package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo apt remove nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also install multiple packages in one command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo apt install nginx docker.io git curl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As a DevOps engineer, you will regularly install and configure software such as Nginx, Docker, Git, Python, and other server dependencies.&lt;/p&gt;

&lt;p&gt;Understanding package management is important because keeping software updated is part of maintaining a secure and reliable server.&lt;/p&gt;

&lt;p&gt;Note that APT is used on Debian-based distributions. Other Linux distributions use different package managers, such as &lt;code&gt;dnf&lt;/code&gt; on Fedora and many RHEL-based systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;20. systemctl – Managing Linux Services&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is one of the commands I consider particularly important for anyone working with Linux servers.&lt;/p&gt;

&lt;p&gt;Linux runs several background services that perform different tasks. These may include web servers, databases, SSH, monitoring agents, and other application services.&lt;/p&gt;

&lt;p&gt;On most modern Linux distributions using systemd, &lt;code&gt;systemctl&lt;/code&gt; is used to manage these services.&lt;/p&gt;

&lt;p&gt;For example, to check the status of Nginx:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo systemctl status nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To start a service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo systemctl start nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To stop it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo systemctl stop nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To restart it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo systemctl restart nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To make a service start automatically when the server boots:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also check whether a service is enabled:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo systemctl is-enabled nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Imagine you have deployed a Django application behind Nginx and Gunicorn. If your website suddenly stops responding, checking the status of these services is one of the first things you may want to do.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo systemctl status nginx
sudo systemctl status gunicorn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Understanding how to manage services is an important part of server administration and application troubleshooting.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Other Commands Worth Learning&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The 20 commands above provide a good starting point, but there are several others from the book that I would recommend adding to your learning list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For processing command output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight awk"&gt;&lt;code&gt;awk
cut
xargs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;

&lt;code&gt;awk&lt;/code&gt; helps extract specific columns or process structured text.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cut&lt;/code&gt; extracts specific characters or fields from lines of text.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;xargs&lt;/code&gt; takes input from one command and passes it as arguments to another.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;who &lt;span class="o"&gt;|&lt;/span&gt; awk &lt;span class="s1"&gt;'{print $1}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This extracts the usernames from the output of &lt;code&gt;who&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cut -d: -f1 /etc/passwd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This extracts the first field from each line of the Linux user account file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For monitoring and troubleshooting:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps aux
top
df -h
du -sh /var/log
free -h
ss -tulpn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are particularly important for DevOps work.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ps aux&lt;/code&gt; displays running processes.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;top&lt;/code&gt; provides a live view of system processes and resource usage.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;df -h&lt;/code&gt; shows available and used disk space across mounted filesystems.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;du -sh&lt;/code&gt; shows the size of a directory or file.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;free -h&lt;/code&gt; displays memory usage.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ss -tulpn&lt;/code&gt; helps inspect listening network sockets and associated processes (some process details require elevated privileges).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, if an application stops responding, you may need to investigate whether the server has run out of memory, whether a process has stopped, or whether the required network port is listening.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For reading logs:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;journalctl -u nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This displays logs for the Nginx service managed by systemd.&lt;/p&gt;

&lt;p&gt;To follow new log entries as they appear:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;journalctl -u nginx -f
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is useful when investigating why a service failed or monitoring what happens after restarting an application.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Final Thoughts&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Learning Linux commands is not about memorising hundreds of commands or trying to become an expert in every available option. It is about understanding what you are trying to achieve and knowing which tools can help you get there.&lt;/p&gt;

&lt;p&gt;As a DevOps engineer, you will spend a considerable amount of time working with servers, deploying applications, managing services, checking logs, configuring permissions, and troubleshooting problems.&lt;/p&gt;

&lt;p&gt;You may not use every command every day, but you should be comfortable navigating the terminal and knowing where to look when something goes wrong. My advice is to practise these commands on an Ubuntu virtual machine or a Linux environment using WSL. Create files, move them around, install packages, create users, change permissions, and inspect running services.&lt;/p&gt;

&lt;p&gt;Don't just read the commands. Use them.&lt;/p&gt;

&lt;p&gt;The more comfortable you become with the Linux terminal, the easier it becomes to work with Docker, CI/CD pipelines, cloud infrastructure, and other DevOps tools.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>cloud</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Shared Hosting, PaaS, VPS and Cloud Services: What You Need to Know</title>
      <dc:creator>Ezeana Micheal</dc:creator>
      <pubDate>Tue, 10 Nov 2026 11:38:57 +0000</pubDate>
      <link>https://dev.to/ezeanamichael/shared-hosting-paas-vps-and-cloud-services-what-you-need-to-know-17pf</link>
      <guid>https://dev.to/ezeanamichael/shared-hosting-paas-vps-and-cloud-services-what-you-need-to-know-17pf</guid>
      <description>&lt;p&gt;When deploying a website or application, one of the first decisions you have to make is where it will run. You may have come across shared hosting, VPS, cloud services, and Platform as a Service (PaaS). While they all provide ways to host applications, they do not work the same way, and understanding their differences is important.&lt;/p&gt;

&lt;p&gt;Before looking at each of them, it is important to understand what a server is and what we actually mean when we talk about the cloud.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What Is a Server?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A server is a computer that provides resources or services to other computers over a network. It could be a physical computer sitting in a data centre or a virtual machine running on a much larger physical computer.&lt;/p&gt;

&lt;p&gt;For example, when someone visits your website, their browser sends a request to a server. The server processes that request and sends back the appropriate response, which could be a webpage, an image, or data from an API.&lt;/p&gt;

&lt;p&gt;A server has resources such as CPU, RAM, storage, and network connectivity. These resources are used to run applications, process requests, store data, and perform other tasks.&lt;/p&gt;

&lt;p&gt;A server can run Linux or Windows, and it can host different applications depending on how it is configured.&lt;/p&gt;

&lt;p&gt;This is where hosting comes in. Hosting is simply making the resources of a server available for your website or application to run.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What Is the Cloud?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The word cloud is one of the most commonly used terms in technology, but it is also one of the most misunderstood.&lt;/p&gt;

&lt;p&gt;The cloud is not simply another name for the internet, and it is not a magical computer somewhere that stores everything for us.&lt;/p&gt;

&lt;p&gt;Cloud computing is the delivery of computing resources over a network, usually the internet, where those resources can be provisioned, managed, and scaled as needed.&lt;/p&gt;

&lt;p&gt;These resources include servers, storage, databases, networking, security services, and even tools for deploying and running applications.&lt;/p&gt;

&lt;p&gt;For example, instead of buying a physical server, setting it up in an office, and maintaining it yourself, you can provision an EC2 instance on AWS, create a virtual machine on Azure, or deploy an application using a managed platform.&lt;/p&gt;

&lt;p&gt;The physical servers still exist. They are located in data centres and managed by cloud providers. What changes is how we access and use those resources.&lt;/p&gt;

&lt;p&gt;One important thing to understand is that &lt;strong&gt;not everything hosted on the internet is cloud computing&lt;/strong&gt;. A traditional shared hosting service can make your website accessible online without necessarily offering the flexibility, provisioning, automation, or scalability commonly associated with cloud infrastructure.&lt;/p&gt;

&lt;p&gt;Now that we understand what servers and cloud computing are, let's look at the different hosting models.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. Shared Hosting&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Shared hosting is one of the simplest and cheapest ways to host a website.&lt;/p&gt;

&lt;p&gt;In shared hosting, multiple websites run on the same server and share its resources. This means several customers may use the same physical machine, operating system, and underlying server environment.&lt;/p&gt;

&lt;p&gt;You do not usually have full control over the server. The hosting provider manages most of the infrastructure, while you focus on uploading your website, configuring your domain, and managing your application within the available limits.&lt;/p&gt;

&lt;p&gt;For example, if you purchase a shared hosting plan from Namecheap or another hosting provider, you may get access to cPanel, a file manager, email services, databases, and tools for managing your website.&lt;/p&gt;

&lt;p&gt;You can upload a PHP application, create a MySQL database, configure your domain, and get your website running without having to manage Linux, Nginx, or the underlying server.&lt;/p&gt;

&lt;p&gt;However, shared hosting comes with limitations.&lt;/p&gt;

&lt;p&gt;Since multiple websites share the same resources, performance can be affected by other websites running on the server. You also have limited control over software installation, system configurations, and background processes.&lt;/p&gt;

&lt;p&gt;Shared hosting is suitable for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Small business websites.
&lt;/li&gt;
&lt;li&gt;Blogs and personal websites.
&lt;/li&gt;
&lt;li&gt;Simple PHP applications.
&lt;/li&gt;
&lt;li&gt;Websites with relatively low traffic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is not usually the best option for applications that require custom server configurations, extensive background processing, or greater control over the runtime environment.&lt;/p&gt;

&lt;p&gt;From a DevOps perspective, shared hosting is useful to understand because many businesses still use it. You may find yourself configuring DNS, SSL, backups, deployments, and hosting environments for applications running on shared hosting.&lt;/p&gt;

&lt;p&gt;However, it provides limited opportunities to work with infrastructure at the operating system level.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. VPS (Virtual Private Server)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A Virtual Private Server, commonly called a VPS, is a virtual machine created on a physical server.&lt;/p&gt;

&lt;p&gt;Unlike shared hosting, a VPS gives you an isolated environment with its own operating system, allocated resources, and administrative access.&lt;/p&gt;

&lt;p&gt;For example, you can rent a VPS from providers such as DigitalOcean, Hetzner, or other hosting companies and install Ubuntu on it.&lt;/p&gt;

&lt;p&gt;Once you have access to the server, you can configure it almost like a normal Linux computer.&lt;/p&gt;

&lt;p&gt;You can install Nginx, Docker, PostgreSQL, Redis, Python, Node.js, or any other software supported by the operating system and available resources.&lt;/p&gt;

&lt;p&gt;You can also configure firewall rules, create users, manage SSH access, configure system services, and deploy applications using your preferred tools.&lt;/p&gt;

&lt;p&gt;This is where things become more interesting for someone learning DevOps.&lt;/p&gt;

&lt;p&gt;With a VPS, you can practise:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Linux administration.
&lt;/li&gt;
&lt;li&gt;SSH and server access.
&lt;/li&gt;
&lt;li&gt;Nginx configuration.
&lt;/li&gt;
&lt;li&gt;Docker and Docker Compose.
&lt;/li&gt;
&lt;li&gt;Application deployment.
&lt;/li&gt;
&lt;li&gt;CI/CD pipelines.
&lt;/li&gt;
&lt;li&gt;Firewall configuration.
&lt;/li&gt;
&lt;li&gt;Monitoring and logging.
&lt;/li&gt;
&lt;li&gt;Backups and server security.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A VPS gives you much more control than shared hosting, but that control comes with responsibility.&lt;/p&gt;

&lt;p&gt;You are generally responsible for maintaining the operating system, installing updates, securing the server, configuring services, and monitoring the applications running on it.&lt;/p&gt;

&lt;p&gt;A VPS can be hosted on a cloud provider or on a traditional hosting company's infrastructure. &lt;strong&gt;The fact that a server is virtual does not automatically make it a cloud service.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;3. PaaS (Platform as a Service)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Platform as a Service takes things a step further by reducing the amount of infrastructure you have to manage.&lt;/p&gt;

&lt;p&gt;With PaaS, the provider gives you a platform for building, deploying, and running applications without requiring you to manage the underlying operating system and much of the server configuration yourself.&lt;/p&gt;

&lt;p&gt;Instead of provisioning a server, installing dependencies, configuring Nginx, and setting up the application runtime manually, you can deploy your application directly to the platform.&lt;/p&gt;

&lt;p&gt;For example, platforms such as Render, Heroku, Azure App Service, and Google App Engine provide ways to deploy applications without managing a traditional server yourself.&lt;/p&gt;

&lt;p&gt;Imagine you have built a Django application.&lt;/p&gt;

&lt;p&gt;With a VPS, you may need to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Provision the server.
&lt;/li&gt;
&lt;li&gt;Install Python and other dependencies.
&lt;/li&gt;
&lt;li&gt;Configure the application environment.
&lt;/li&gt;
&lt;li&gt;Set up Gunicorn.
&lt;/li&gt;
&lt;li&gt;Configure Nginx as a reverse proxy.
&lt;/li&gt;
&lt;li&gt;Configure SSL.
&lt;/li&gt;
&lt;li&gt;Set up deployment scripts or CI/CD.
&lt;/li&gt;
&lt;li&gt;Monitor and maintain the server.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With a PaaS platform, much of this infrastructure work is handled by the provider or abstracted behind platform configuration.&lt;/p&gt;

&lt;p&gt;You may simply connect your GitHub repository, configure environment variables, specify your build and start commands, and deploy your application.&lt;/p&gt;

&lt;p&gt;The platform handles much of the underlying infrastructure.&lt;/p&gt;

&lt;p&gt;This does not mean you have no responsibility. You still need to understand application configuration, environment variables, security, dependencies, logs, database connections, and deployment behaviour.&lt;/p&gt;

&lt;p&gt;PaaS is particularly useful when you want to focus more on application development and less on managing servers.&lt;/p&gt;

&lt;p&gt;However, it may offer less control over the underlying environment, and some platforms can become expensive as applications grow.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. Cloud Services&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Cloud services are broader than shared hosting, VPS, and PaaS.&lt;/p&gt;

&lt;p&gt;A cloud provider offers different categories of services that allow you to build and operate applications without owning the physical infrastructure.&lt;/p&gt;

&lt;p&gt;Some of these services provide virtual machines, while others provide managed databases, storage, networking, application platforms, security tools, and monitoring systems.&lt;/p&gt;

&lt;p&gt;For example, AWS provides services such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 for virtual machines.
&lt;/li&gt;
&lt;li&gt;S3 for object storage.
&lt;/li&gt;
&lt;li&gt;RDS for managed relational databases.
&lt;/li&gt;
&lt;li&gt;Lambda for serverless computing.
&lt;/li&gt;
&lt;li&gt;VPC for networking.
&lt;/li&gt;
&lt;li&gt;IAM for identity and access management.
&lt;/li&gt;
&lt;li&gt;CloudWatch for monitoring and logging.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Azure and Google Cloud provide similar categories of services, although their service names and implementations differ.&lt;/p&gt;

&lt;p&gt;The important thing is that cloud computing is not just about renting a virtual machine.&lt;/p&gt;

&lt;p&gt;You can build an application using several cloud services that work together.&lt;/p&gt;

&lt;p&gt;For example, a typical web application could use an EC2 instance to run the backend, S3 to store uploaded files, RDS to manage the database, CloudFront to deliver static content, and CloudWatch to monitor the application.&lt;/p&gt;

&lt;p&gt;This is where cloud architecture becomes important.&lt;/p&gt;

&lt;p&gt;Instead of thinking about one server hosting everything, you begin to think about how different services interact, how they communicate, how they are secured, and how they can scale independently.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How Are They Different?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The easiest way to understand these hosting models is to look at how much control and responsibility you have.&lt;/p&gt;

&lt;p&gt;With shared hosting, the provider manages most of the server, and you work within the environment provided.&lt;/p&gt;

&lt;p&gt;With a VPS, you get an isolated virtual machine and more control over its configuration, but you are responsible for maintaining it.&lt;/p&gt;

&lt;p&gt;With PaaS, the provider manages much of the underlying infrastructure and gives you a platform to deploy your application.&lt;/p&gt;

&lt;p&gt;With cloud services, you can choose from a wide range of infrastructure and managed services to build your own architecture. Depending on what you choose, you may manage virtual machines yourself or use services where most infrastructure management is handled by the provider.&lt;/p&gt;

&lt;p&gt;These models are not necessarily mutually exclusive. A VPS can run on cloud infrastructure, and a PaaS application can use cloud databases, storage, and networking services.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why Does This Matter for a Cloud DevOps Engineer?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Understanding these differences is important because a Cloud DevOps Engineer is not simply someone who deploys applications to servers.&lt;/p&gt;

&lt;p&gt;The role involves understanding how applications run, how infrastructure is provisioned, how services communicate, how deployments are automated, and how systems are maintained.&lt;/p&gt;

&lt;p&gt;If you only understand shared hosting, you may know how to upload applications and configure domains, but you may not have much experience managing infrastructure.&lt;/p&gt;

&lt;p&gt;If you understand VPS environments, you begin to develop practical knowledge of Linux, networking, security, application deployment, and server administration.&lt;/p&gt;

&lt;p&gt;If you understand PaaS, you learn how application platforms simplify deployments, what they manage for you, and what responsibilities remain with the developer or operations team.&lt;/p&gt;

&lt;p&gt;If you understand cloud services, you can begin designing and managing infrastructure using different services, automating deployments, managing access, monitoring applications, and building systems that can scale.&lt;/p&gt;

&lt;p&gt;This is also why learning Linux, networking, Docker, CI/CD, cloud platforms, and Infrastructure as Code is important.&lt;/p&gt;

&lt;p&gt;These skills allow you to move beyond manually deploying applications and begin managing infrastructure in a more repeatable and automated way.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Shared hosting, VPS, PaaS, and cloud services all provide ways to run applications, but they differ in the amount of control, flexibility, and responsibility they give you.&lt;/p&gt;

&lt;p&gt;Shared hosting makes it easy to get started. VPS gives you more control over the server. PaaS reduces the need to manage underlying infrastructure. Cloud services provide a broader range of resources for building and operating applications.&lt;/p&gt;

&lt;p&gt;For anyone learning Cloud and DevOps, understanding these differences is a good starting point.&lt;/p&gt;

&lt;p&gt;The goal is not just to know where an application is hosted, but to understand what happens behind the scenes: how the server works, how the application is deployed, how it communicates with other services, how it is secured, and how it is maintained.&lt;/p&gt;

&lt;p&gt;That is what makes the difference between simply deploying an application and understanding the infrastructure that keeps it running.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>cloud</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>My 60-Day DevOps Plan and Why I'm Leaving Backend</title>
      <dc:creator>Ezeana Micheal</dc:creator>
      <pubDate>Mon, 26 Oct 2026 16:47:49 +0000</pubDate>
      <link>https://dev.to/ezeanamichael/my-60-day-devops-plan-and-why-im-leaving-backend-po8</link>
      <guid>https://dev.to/ezeanamichael/my-60-day-devops-plan-and-why-im-leaving-backend-po8</guid>
      <description>&lt;p&gt;P.S. &lt;em&gt;This is just my personal experience and how I've been feeling about things lately. It might be different for you, and that's fine.&lt;/em&gt; 😂&lt;/p&gt;

&lt;p&gt;Coding and programming have become tiring (to me).&lt;/p&gt;

&lt;p&gt;Back in the day, programming was something people dedicated their time to learning. You learned how to write code, understand how things worked, and apply that knowledge to create systems. I enjoyed that. I enjoyed the Stack Overflow days, searching for solutions, learning from other developers, and figuring things out myself.&lt;/p&gt;

&lt;p&gt;But now AI does a lot of that. To an extent, AI can write better code than me when I prompt it well enough. I'm not anti-AI. I actually love working with it because it has sped up my work in certain areas. But it's also taken away some of the joy that was once there.&lt;/p&gt;

&lt;p&gt;I read somewhere that humans have always tried to find the best way to communicate with computers. We've gone from binary to low-level languages, then high-level languages and all the other improvements we've had over the years. Now, prompt engineering is becoming a big part of how we work with computers.&lt;/p&gt;

&lt;p&gt;It's cool, but it's not what I enjoy doing anymore.&lt;/p&gt;

&lt;p&gt;Then I started looking into something I've already been doing but never really saw as a role: &lt;strong&gt;DevOps and Cloud&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I put DevOps and Cloud together because, well, they're pretty interwoven, lol. DevOps isn't limited to the cloud, of course, but cloud platforms are a big part of the work.&lt;/p&gt;

&lt;p&gt;I've been building applications and deploying them for a while now, from shared hosting to VPS, platform services and cloud services. But I never really had the time to sit down and properly design the operational part of the projects. That's what I'm focusing on now.&lt;/p&gt;

&lt;p&gt;I'll use this shift to learn, build myself, and understand the things I've already been doing from a different perspective.&lt;/p&gt;

&lt;p&gt;Applications are for users. AI can help build them, but someone still has to figure out how they get to users, how they're deployed, how they're monitored, and how they keep running. That's the part I want to focus on.&lt;/p&gt;

&lt;p&gt;AI may take this one too, lol, but I like it because it gives me a different level of control. I get to work on operations, design architectures, think about deployments, monitoring, and all the things that happen between building an application and getting it into the hands of users.&lt;/p&gt;

&lt;p&gt;I'm still learning the role as it is and becoming familiar with the terms, but I'll get better at it.&lt;/p&gt;

&lt;p&gt;So, this is a personal rant, or a shift, I might say. What do you think? What do you believe? Feel free to comment down below. Any encouraging words will be appreciated, or simply a like.&lt;/p&gt;

&lt;p&gt;Over the next few days and weeks, I'll be writing and posting as I learn. I'll also be breaking down the things I've already done with deployments and understanding how to streamline them, from getting applications to end users to continuous monitoring.&lt;/p&gt;

&lt;p&gt;My Plan&lt;/p&gt;

&lt;p&gt;So, here's the plan. I'll be spending the next 60 days learning, building projects, and applying for DevOps and Cloud roles.&lt;/p&gt;

&lt;p&gt;I'll start with the basics: Linux, Bash, Git, networking, and AWS setup. I've already worked with Linux, deployments, servers, and cloud services, but I want to understand these things better and get more comfortable with the operational side of things.&lt;/p&gt;

&lt;p&gt;From there, I'll move into Docker, AWS services like EC2, VPC, S3 and RDS, then Terraform and infrastructure as code. I'll also be working on CI/CD with GitHub Actions, container image scanning, and automated deployments. These are things I've already used in different projects, but this time, I want to go deeper and bring them together into proper projects that I can explain and show.&lt;/p&gt;

&lt;p&gt;I'll then move into Kubernetes, Helm, and EKS, followed by ArgoCD, GitOps, Prometheus, Grafana, and monitoring. I'll also spend time on security, Ansible, cost control, troubleshooting, and system design. I've not done these before so I'll understand not just how to deploy an application, but how to manage it, monitor it, secure it, and keep it running.&lt;/p&gt;

&lt;p&gt;Throughout these 60 days, I'll be building three projects, documenting what I learn, improving my GitHub profile and portfolio, and updating my CV as I go. I'll also be applying for DevOps and Cloud roles while preparing for interviews.&lt;/p&gt;

&lt;p&gt;I'll share my progress as I go, including the things I learn, the projects I build, and the challenges I run into.&lt;/p&gt;

&lt;p&gt;Let's see how far I can go in 60 days✌️.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>cloud</category>
      <category>backend</category>
    </item>
    <item>
      <title>The Bilingual Developer: Python and Go, The Error Handling Paradigm</title>
      <dc:creator>Ezeana Micheal</dc:creator>
      <pubDate>Sat, 27 Jun 2026 06:38:35 +0000</pubDate>
      <link>https://dev.to/ezeanamichael/the-bilingual-developer-python-and-go-the-error-handling-paradigm-2c6o</link>
      <guid>https://dev.to/ezeanamichael/the-bilingual-developer-python-and-go-the-error-handling-paradigm-2c6o</guid>
      <description>&lt;p&gt;In the previous article, we explored how functions allow us to package logic into reusable blocks. However, a crucial question remains: what happens when that logic goes wrong?&lt;/p&gt;

&lt;p&gt;Building applications is not just about writing code for the "happy path," the scenario where everything works perfectly. In reality, &lt;strong&gt;our programs interact with the messy, unpredictable outside world&lt;/strong&gt;. Files we try to open might be missing. Network connections might timeout. Databases might be overloaded. Disk drives might fill up mid-write.&lt;/p&gt;

&lt;p&gt;If we ignore these possibilities, our applications will crash spectacularly, leaving users frustrated and data corrupted.&lt;/p&gt;

&lt;p&gt;Therefore, a programming language must provide a clear, disciplined way to predict, handle, and recover from failures. This is where Python and Go diverge in one of the most profound ways possible. They represent two completely different schools of thought on how to manage errors. Python embraces the &lt;strong&gt;Exception Model&lt;/strong&gt;, using structured "try/catch" blocks to intercept errors thrown from anywhere. Go rejects exceptions in favor of &lt;strong&gt;Errors as Values&lt;/strong&gt;, &lt;strong&gt;forcing developers to handle errors immediately and explicitly by checking return values&lt;/strong&gt;. Furthermore, when it comes to cleaning up resources (like closing files or releasing network connections), Python offers the elegant with statement (Context Managers), while Go provides the powerful and unique defer keyword.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Python Way: The Exception Model
&lt;/h2&gt;

&lt;p&gt;Python operates on a philosophy known as &lt;strong&gt;EAFP&lt;/strong&gt;, which stands for &lt;em&gt;"Easier to Ask for Forgiveness than Permission."&lt;/em&gt; This is a distinctly optimistic approach. In Python, you write the code you &lt;em&gt;expect&lt;/em&gt; to work, and if something bad happens, the program "raises" (or throws) an exception that interrupts the normal flow of execution.&lt;/p&gt;

&lt;p&gt;Think of an exception like a &lt;strong&gt;fire alarm&lt;/strong&gt;. When everything is fine, the alarm is silent, and your program runs smoothly. But when a fire starts (an error occurs), the alarm blares. If you have a fire suppression system (except block) ready, you can contain and handle the fire. If you don't, the fire spreads up the chain of command until the whole building (the program) burns down and crashes.&lt;/p&gt;

&lt;h3&gt;
  
  
  The try / except / else / finally Structure
&lt;/h3&gt;

&lt;p&gt;Python provides a layered structure to manage exceptions. The try block contains the code that might fail. The except block catches specific errors. The else block runs only if no errors occurred, and the finally block runs &lt;em&gt;regardless&lt;/em&gt; of what happened—it is the cleanup crew.&lt;/p&gt;

&lt;p&gt;Consider this example where we ask a user for a number:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
    &lt;span class="n"&gt;user_input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Enter a number: "&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
    &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# This might raise a ValueError  &lt;/span&gt;
    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt;     &lt;span class="c1"&gt;# This might raise a ZeroDivisionError  &lt;/span&gt;
&lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Oops! That wasn't a valid number."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nc"&gt;ZeroDivisionError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"You can't divide by zero!"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"The calculation succeeded! Result: {result}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;span class="k"&gt;finally&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Thanks for using the calculator."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the user types "five", the ValueError is caught, and the program prints a friendly message instead of crashing. Crucially, the finally block always executes, ensuring that no matter what happens, we can close a file or log the attempt.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Nature of Python Exceptions
&lt;/h3&gt;

&lt;p&gt;One of the defining characteristics of Python's model is that exceptions &lt;strong&gt;bubble up&lt;/strong&gt;. If you don't catch an exception in the function where it occurs, &lt;strong&gt;it automatically propagates up to the function that called it, then up to the next, and so on, until it either finds a matching except block or terminates the entire process.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This allows developers to write very clean, readable "happy path" code. &lt;strong&gt;The error-handling logic is neatly separated from the business logic.&lt;/strong&gt; However, this convenience has a dark side. It is entirely possible to write Python code that "swallows" exceptions by catching a &lt;strong&gt;generic Exception and doing nothing&lt;/strong&gt;, or &lt;strong&gt;to forget to handle an edge case entirely&lt;/strong&gt;, leading to unexpected production crashes. Python trusts the developer to be disciplined, but it does not enforce that discipline at the language level.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Go Way: Errors as Values
&lt;/h2&gt;

&lt;p&gt;If Python's philosophy is optimistic and permissive, Go's philosophy is &lt;strong&gt;stoic, pragmatic, and hyper-vigilant&lt;/strong&gt;. Go explicitly rejects the exception model (with the exception of panic, which is reserved for catastrophic, unrecoverable events). Instead, Go treats errors as &lt;strong&gt;first-class values&lt;/strong&gt;—just like strings, integers, or booleans.&lt;/p&gt;

&lt;p&gt;In Go, if a function can fail, it returns an error as part of its standard return signature. &lt;strong&gt;The burden of checking for that error falls squarely on the caller&lt;/strong&gt;. There is no implicit bubbling up of exceptions; the error is just a piece of data passed from one function to another.&lt;/p&gt;

&lt;p&gt;Think of it like a pilot going through a pre-flight checklist. At every single step: checking fuel, checking the flaps, checking the radar, the pilot looks at the instrument panel and asks: "Is everything okay?" If at any point the dial reads "Error," the pilot must stop and address it immediately before moving to the next step.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Ubiquitous if err != nil
&lt;/h3&gt;

&lt;p&gt;The idiomatic pattern in Go is so ingrained that it has become a meme in the developer community. It looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;  
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;  
    &lt;span class="s2"&gt;"errors"&lt;/span&gt;  
    &lt;span class="s2"&gt;"fmt"&lt;/span&gt;  
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;divide&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;New&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"cannot divide by zero"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
    &lt;span class="p"&gt;}&lt;/span&gt;  
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;main&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;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nf"&gt;divide&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
        &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Handled error:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Output: Handled error: cannot divide by zero  &lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
        &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Result:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&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;p&gt;Notice the pattern: result, err := divide(...). Immediately following that line is an if statement checking if err != nil.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This design forces the developer to confront the possibility of failure at the exact moment it occurs&lt;/strong&gt;. You cannot ignore the error, because the compiler won't stop you from ignoring it, but the language syntax encourages you to handle it right there.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Beauty of Verbosity
&lt;/h3&gt;

&lt;p&gt;Many new developers look at Go's if err != nil blocks and complain about verbosity(which I personally enjoy it). A simple 5-line function might have 3 lines dedicated to error handling.&lt;/p&gt;

&lt;p&gt;However, this verbosity is an intentional feature, not a bug. By making error handling explicit and visibly "in your face," &lt;strong&gt;Go ensures that the state of the program is always known.&lt;/strong&gt; When you read Go code, &lt;strong&gt;you can trace the exact path the data takes.&lt;/strong&gt; You can see exactly where a function might exit early due to a failure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This eliminates the surprise element found in Python&lt;/strong&gt;. In Go, you never have to guess if an underlying library is going to throw a random exception 12 layers deep. The language is brutally honest: every possible failure is declared in the function signature, and every caller is forced to deal with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cleanup and Resource Management: with vs. defer
&lt;/h2&gt;

&lt;p&gt;Handling errors is only half the battle. Often, when an error occurs, we have to gracefully clean up the mess. For example, if you open a file, you must close it. If you lock a mutex, you must unlock it. If a network connection is established, it must be gracefully terminated. Both Python and Go offer sophisticated tools for resource cleanup, but they operate on entirely different scopes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python’s Context Managers (with statement)
&lt;/h3&gt;

&lt;p&gt;Python manages resources through the with statement, which leverages the concept of &lt;strong&gt;Context Managers&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A context manager is an object that defines two magic methods: &lt;strong&gt;enter&lt;/strong&gt; (executed at the start of the block) and &lt;strong&gt;exit&lt;/strong&gt; (executed when the block finishes, even if an exception occurred).&lt;/p&gt;

&lt;p&gt;Consider the classic example of reading a file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"data.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"r"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
    &lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# The file is automatically closed when the 'with' block ends  &lt;/span&gt;
&lt;span class="c1"&gt;# The file is guaranteed to be closed here, regardless of exceptions in file.read()  &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The with statement brilliantly bundles &lt;em&gt;acquisition&lt;/em&gt; and &lt;em&gt;release&lt;/em&gt; into a single, readable line. The &lt;strong&gt;exit&lt;/strong&gt; method handles the cleanup, ensuring the file pointer is closed, database connections are committed, or locks are released the moment you leave the indented block.&lt;/p&gt;

&lt;p&gt;The beauty here is &lt;strong&gt;scope control&lt;/strong&gt;. The resource exists only within the boundaries of the with block. This makes Python code highly readable and safe, as long as the developer remembers to use the context manager rather than manually opening and closing files.&lt;/p&gt;

&lt;h3&gt;
  
  
  Go’s Deferred Functions (defer keyword)
&lt;/h3&gt;

&lt;p&gt;Go does not have a built-in with statement. Instead, it introduces a deceptively simple yet incredibly powerful keyword: defer.&lt;/p&gt;

&lt;p&gt;When you prefix a function call with defer, Go schedules that function to run &lt;strong&gt;just before the surrounding function returns&lt;/strong&gt;. It doesn't matter whether the function returns normally, hits a return statement early, or encounters a panic and crashes—the defered call will always execute.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nc"&gt;ReadFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;  
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// Defer ensures this runs when the function exits,   &lt;/span&gt;
    &lt;span class="c1"&gt;// regardless of what happens below.  &lt;/span&gt;
    &lt;span class="k"&gt;defer&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Close&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 

    &lt;span class="c1"&gt;// Perform some operations on the file...  &lt;/span&gt;
    &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;make&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="kt"&gt;byte&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
    &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
        &lt;span class="c1"&gt;// Even if we return an error here, file.Close() still runs!  &lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;  
    &lt;span class="p"&gt;}&lt;/span&gt;  
    &lt;span class="c1"&gt;// If we reach the end, file.Close() still runs!  &lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice that defer file.Close() is written immediately after the file is successfully opened. This keeps the resource management right next to the resource allocation, making it easy for developers to see the pairing.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Power of Stacked defer
&lt;/h4&gt;

&lt;p&gt;Go allows you to defer &lt;em&gt;multiple&lt;/em&gt; functions. When you do this, they execute in &lt;strong&gt;Last In, First Out (LIFO)&lt;/strong&gt; order—essentially a stack.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;main&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="k"&gt;defer&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Third"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Runs last  &lt;/span&gt;
    &lt;span class="k"&gt;defer&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Second"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Runs second  &lt;/span&gt;
    &lt;span class="k"&gt;defer&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"First"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Runs first  &lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Output:  &lt;/span&gt;
&lt;span class="c1"&gt;// First  &lt;/span&gt;
&lt;span class="c1"&gt;// Second  &lt;/span&gt;
&lt;span class="c1"&gt;// Third  &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is exceptionally useful when dealing with complex resources like nested locks or database transactions. If you acquire a read lock, then a write lock, defer ensures they are released in the correct reverse order, preventing deadlocks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Philosophical Head-to-Head
&lt;/h2&gt;

&lt;p&gt;Let's boil down the key differences to understand the mindsets behind each language.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python's Philosophy: "You are a responsible adult."
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Errors&lt;/strong&gt;: Exceptions are for exceptional, unexpected cases. We trust you to handle them with try/except, but if you miss one, the interpreter will tell you.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cleanup&lt;/strong&gt;: We provide elegant, block-level tools (with) to ensure resources are cleaned up as soon as you logically leave the context.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result&lt;/strong&gt;: Code is compact, readable, and fast to write. The main logic isn't cluttered with constant checks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Go's Philosophy: "Murphy's Law is absolute."
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Errors&lt;/strong&gt;: Errors are just data. They are not exceptional; they are an expected part of every operation. You must check each one explicitly.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cleanup&lt;/strong&gt;: We provide function-level tools (defer). The scope is the entire function, ensuring cleanup happens no matter how complex the logic gets.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result&lt;/strong&gt;: Code is verbose, bulletproof, and explicit. There is no magic. You can trace exactly what happens at every single line of execution.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;The error handling paradigm of a language reveals its soul.&lt;/p&gt;

&lt;p&gt;When you code in Python, you write in a trusting environment*&lt;em&gt;. You focus on solving the problem&lt;/em&gt;&lt;em&gt;, knowing that if something goes wrong, an exception will give you a very clear stack trace to debug it. It is forgiving, which accelerates prototyping and iteration. **The with statement adds a layer of syntactic sugar that makes resource management almost pleasurable.&lt;/em&gt;*&lt;/p&gt;

&lt;p&gt;When you code in Go*&lt;em&gt;, you write in a defensive environment.&lt;/em&gt;* You are constantly asking, "What if this fails?" You check err != nil religiously. It feels pedantic at first, but over time, it cultivates a profound sense of reliability. By using defer, you ensure that your cleanup is tied to the lifetime of the function, making it incredibly hard to leak resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Python developer moving to Go might initially feel frustrated by the verbosity.&lt;/strong&gt; But the truth is, &lt;strong&gt;Go forces you to be honest about the fragility of the systems you are building.&lt;/strong&gt; In distributed systems, where network calls fail constantly, the "just let it crash" or "ask for forgiveness" model can be dangerous. Go's explicit model, combined with defer, builds software that is designed to withstand the chaos of the real world.&lt;/p&gt;

&lt;p&gt;Mastering both paradigms gives you the wisdom to choose the right tool for the job. For a quick script, Python's exceptions are a lifesaver. For a critical backend server that must run for years without downtime, Go's rigorous error values and cleanup mechanisms are the gold standard.  &lt;/p&gt;

</description>
      <category>python</category>
      <category>go</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>The Day I Confused Task Queues with Message Brokers And Built the Wrong Thing</title>
      <dc:creator>Ezeana Micheal</dc:creator>
      <pubDate>Sat, 27 Jun 2026 06:35:44 +0000</pubDate>
      <link>https://dev.to/ezeanamichael/the-day-i-confused-task-queues-with-message-brokers-and-built-the-wrong-thing-1igm</link>
      <guid>https://dev.to/ezeanamichael/the-day-i-confused-task-queues-with-message-brokers-and-built-the-wrong-thing-1igm</guid>
      <description>&lt;p&gt;In my journey as a backend developer, I had already spent time working with APIs, databases, authentication flows, and background processing. I understood the basic idea that not everything should occur within a request-response cycle, especially when dealing with expensive operations such as sending emails, processing files, or generating reports. Offloading work to the background felt like a solved problem to me.&lt;/p&gt;

&lt;p&gt;That confidence was exactly what led me into confusion.&lt;br&gt;&lt;br&gt;
When I first encountered message brokers and task queues, they looked like different names for the same idea. Both involved queues, both involved workers, and both involved asynchronous processing. In my head, the distinction didn’t seem important, so I treated them interchangeably and assumed that choosing one over the other was just a matter of preference or framework availability.&lt;/p&gt;

&lt;p&gt;The real issue was that I had not yet understood the difference in intent between communication and execution. What I thought was a simple design choice actually turned into an architectural mistake that affected how I structured an entire system.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How I Misunderstood the Problem&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;At the time, I was building systems where the backend had to handle multiple heavy operations. A user could upload files, request reports, or trigger processes that should not block the main API response. Naturally, I reached for a queue-based solution because it is the standard answer for background work.&lt;/p&gt;

&lt;p&gt;However, instead of asking what role the system needed to play, I focused on what tool could make things asynchronous. That small shift in thinking created the confusion. I assumed that anything that gets delayed or processed later should automatically go into a queue, without distinguishing whether I was dealing with a job that must be &lt;strong&gt;executed&lt;/strong&gt; or an &lt;strong&gt;event&lt;/strong&gt; that other services should react to.&lt;/p&gt;

&lt;p&gt;This is where I started building the wrong abstraction.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Where Task Queues Actually Fit&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;task queue&lt;/strong&gt; exists primarily to assign &lt;strong&gt;work that must be completed&lt;/strong&gt;. It is not concerned with broadcasting information, but with ensuring that a specific job gets executed &lt;strong&gt;reliably by a worker&lt;/strong&gt;. In this model, the system is aware that something needs to be done, and it delegates that responsibility to a background process that will eventually complete it.&lt;/p&gt;

&lt;p&gt;For example, generating a PDF report or resizing an image fits naturally into this category. The system issues a clear instruction, and a worker picks it up, executes it, and reports completion. The emphasis is on reliability, retries, scheduling, and tracking the state of a job from pending to completed or failed.&lt;/p&gt;

&lt;p&gt;In this world, tools like Celery or BullMQ make sense because they are designed around the idea of jobs, not just messages. They treat work as something that must be done, not just something that has been announced.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Where Message Brokers Actually Fit&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Message brokers&lt;/strong&gt; serve a different purpose entirely. Instead of focusing on work execution, &lt;strong&gt;they focus on system communication&lt;/strong&gt;. A message is not necessarily a task that must be completed by one worker, &lt;strong&gt;but rather an event that other systems might be interested in&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example, when a user places an order in an e-commerce system, the order service does not need to directly know what happens next. Instead, it emits an event like “Order Created,” and &lt;strong&gt;different services subscribe to that event based on their own responsibilities&lt;/strong&gt;. The &lt;strong&gt;payment service may initiate billing&lt;/strong&gt;, the &lt;strong&gt;inventory service may adjust stock levels&lt;/strong&gt;, and the &lt;strong&gt;notification service may send a confirmation message&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The key idea here is decoupling. The producer of the message does not care who consumes it or how many consumers exist. It simply announces that something happened, and the rest of the system reacts independently.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Mistake That Caused Confusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The mistake I made was designing everything as if it were a task system. I treated every background operation as a job that needed to be executed by a worker. &lt;strong&gt;That meant I ended up forcing event-driven communication into a task-oriented model&lt;/strong&gt;, which created unnecessary coupling and made the system harder to extend.&lt;/p&gt;

&lt;p&gt;At the same time, &lt;strong&gt;I ignored the fact that some operations were not “tasks” at all,&lt;/strong&gt; but events that should naturally be consumed by multiple services. This led to a situation where &lt;strong&gt;my system became rigid&lt;/strong&gt;, because everything was structured around a single execution mindset instead of a flexible communication model.&lt;/p&gt;

&lt;p&gt;The more I added features, the more obvious the flaw became. Services that should have been independent started depending on a central queue, and what should have been a loosely connected system slowly became tightly coupled.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What I Learned from the Experience&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The turning point came when I realized that the real distinction is not about tools, but about intent. &lt;strong&gt;A task queue exists to execute work&lt;/strong&gt;, while &lt;strong&gt;a message broker exists to distribute information&lt;/strong&gt;. One is about responsibility, the other is about awareness.&lt;/p&gt;

&lt;p&gt;Once I understood that, my design approach changed. Instead of asking which queue system to use, I started asking &lt;strong&gt;what kind of relationship existed between components in the system&lt;/strong&gt;. If one service needed another service to perform a specific job, I used a task queue. If one service simply needed to inform others that something had happened, I used a message broker.&lt;/p&gt;

&lt;p&gt;This separation made the architecture cleaner, easier to scale, and much easier to reason about.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Final Reflection&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Looking back, the mistake was not technical. It was conceptual. I was solving the right problem in the wrong mental model, and that is often where most architectural failures begin. Tools like queues, brokers, and workers are powerful, but they only work well when the underlying intent is correctly understood.&lt;/p&gt;

&lt;p&gt;The lesson that stayed with me is simple. Before choosing infrastructure, understand whether you are assigning work or sharing information. Everything else becomes much clearer after that. What kind of mistakes have you made? You can comment below.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>webdev</category>
      <category>backend</category>
      <category>python</category>
    </item>
    <item>
      <title>The Bilingual Developer: Python and Go Core Functions</title>
      <dc:creator>Ezeana Micheal</dc:creator>
      <pubDate>Fri, 19 Jun 2026 18:32:56 +0000</pubDate>
      <link>https://dev.to/ezeanamichael/the-bilingual-developer-python-and-go-core-functions-3045</link>
      <guid>https://dev.to/ezeanamichael/the-bilingual-developer-python-and-go-core-functions-3045</guid>
      <description>&lt;h1&gt;
  
  
  The Bilingual Developer: Python and Go Core Functions
&lt;/h1&gt;

&lt;p&gt;So far in our journey, we have explored the building blocks of programming:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How to store data using variables,
&lt;/li&gt;
&lt;li&gt;How to guide the flow of execution using conditional statements, and
&lt;/li&gt;
&lt;li&gt;How to repeat actions efficiently using loops.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These tools are enough to write simple scripts that can process data or automate mundane tasks.&lt;/p&gt;

&lt;p&gt;However, as you start to write larger, more ambitious applications, a new and significant challenge emerges. Imagine you are building an e-commerce platform. You will need the logic for calculating prices based on complex discount rules, validating user credentials against a database, sending transactional emails, and even securely processing credit card payments.&lt;/p&gt;

&lt;p&gt;If you try to cram all of this functionality into one massive, linear/sequential file, the code quickly descends into what developers affectionately refer to as "spaghetti code." The logic becomes intertwined, variables conflict with each other, and making a single change to a pricing rule might unexpectedly break the email system. Tracking down a single bug in a 10,000-line file becomes a detective's nightmare, and collaborating with other developers becomes nearly impossible.&lt;/p&gt;

&lt;p&gt;This is precisely where &lt;strong&gt;functions&lt;/strong&gt; come into play. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why Functions?
&lt;/h2&gt;

&lt;p&gt;A function allows us to encapsulate a specific piece of logic into an independent, reusable, and named block of code. We can define the logic once and then "call" it whenever we need that specific behavior.&lt;/p&gt;

&lt;p&gt;Think of a function like a specialized machine on an assembly line. You place raw materials at the entrance (these are the &lt;strong&gt;inputs&lt;/strong&gt; or parameters). The gears and motors inside turn and process those materials (this is the internal &lt;strong&gt;processing&lt;/strong&gt;). Finally, a finished product rolls out at the end (this is the &lt;strong&gt;return value&lt;/strong&gt;). &lt;/p&gt;

&lt;p&gt;For example, consider a calculator function: the input would be the numbers and the operation (e.g., 5 + 10), the processing would be the internal addition logic, and the output would be the answer (15). This separation between the "how" (the internal mechanics) and the "what" (the input/output) is what makes functions so powerful.&lt;/p&gt;

&lt;p&gt;Both Python and Go rely heavily on functions, but once again, the way they define, structure, and treat these functions showcases a fundamental difference in the philosophies of the two languages.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Function?
&lt;/h2&gt;

&lt;p&gt;At its core, a function is a reusable block of code designed to perform a single, specific task. Think of it as a verb in your program; it acts.&lt;br&gt;&lt;br&gt;
Instead of writing the same code repeatedly, like manually printing a welcome message for each user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Welcome Michael"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Welcome Sarah"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Welcome David"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can create a function named welcome_user() and simply reuse that one-liner over and over again.&lt;/p&gt;

&lt;p&gt;This simple abstraction provides benefits to software development:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Avoiding Repetition (DRY Principle)&lt;/strong&gt;: Standing for &lt;em&gt;Don't Repeat Yourself&lt;/em&gt;, this is a core tenet of software engineering. If you need to change the welcome message from "Welcome" to "Greetings", you only need to change the code inside the function once, rather than searching through hundreds of files.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better Organization&lt;/strong&gt;: Functions allow you to break a massive, monolithic program into small, digestible, logical modules. You can group related tasks together (e.g., putting all user authentication logic into a single file of functions).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simplified Debugging&lt;/strong&gt;: When a bug occurs, functions help isolate the problem. If the pricing calculation is wrong, you know exactly which function to inspect without sifting through irrelevant code for user validation.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reusable Components&lt;/strong&gt;: Once you write a function, you can use it in different parts of your application, or even copy it into a completely different project, saving precious development time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Anatomy of Function Definition
&lt;/h2&gt;

&lt;p&gt;The very first difference we encounter between Python and Go is the syntax required to &lt;em&gt;declare&lt;/em&gt; a function to the compiler or interpreter.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python: Using def
&lt;/h3&gt;

&lt;p&gt;Python prides itself on readability, and its function definition syntax is an excellent example. It uses the straightforward keyword def, which is an abbreviation for "define."&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;greet&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="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Hello Developer"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To execute this function, you simply call it by its name followed by parentheses:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;greet&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;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello Developer  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can notice how Python's structure almost reads like plain English: &lt;em&gt;Define a function called greet.&lt;/em&gt; Furthermore, Python does not use brackets to define the scope of the function. Instead, it strictly relies on &lt;strong&gt;indentation&lt;/strong&gt;(as we have seen in loops and conditions too). The indented block of code directly underneath the def statement is what belongs to the function. This forces clean, uniform formatting across all Python code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Go: Using func
&lt;/h3&gt;

&lt;p&gt;Go takes a slightly more terse, brace-oriented approach. It uses the keyword func to declare a function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;greet&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;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Hello Developer"&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;p&gt;Calling the function is syntactically similar to Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="nf"&gt;greet&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;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello Developer  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, the structural differences are immediately apparent. Go uses curly braces { } to define the beginning and end of the function's logic, much like C, Java, or JavaScript. Additionally, Go is strict about syntax; the opening curly brace &lt;strong&gt;must&lt;/strong&gt; be on the same line as the function declaration, otherwise, the compiler will throw an error. While Python relies on the developer to maintain consistent whitespace, Go offloads that structural enforcement to the compiler using braces.&lt;/p&gt;

&lt;h2&gt;
  
  
  Passing Information: Functions With Parameters
&lt;/h2&gt;

&lt;p&gt;Most functions are not meant to do the exact same thing every single time. They need dynamic information to work with. For instance, instead of creating a function that always prints "Hello Michael", we want a function that works for anyone.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python Parameters
&lt;/h3&gt;

&lt;p&gt;Python allows you to define parameters inside the parentheses. Because Python is dynamically typed, you just provide the variable name without specifying what &lt;em&gt;kind&lt;/em&gt; of data it is.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;greet&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="p"&gt;:&lt;/span&gt;  
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Hello"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you call this function, you pass the value:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Michael"&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;Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello Michael  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Python's approach emphasizes flexibility. You can pass a string, an integer, or even a list into that name parameter. While this is convenient, it means the interpreter will only realize you passed a wrong type (like a number that breaks the print formatting) when the code is actually running. Although in newer versions of python you can specify a type hint to specify datatype, see more below.&lt;/p&gt;

&lt;h3&gt;
  
  
  Go Parameters
&lt;/h3&gt;

&lt;p&gt;Go, on the other hand, requires explicit type declarations. When defining the function, you must tell the compiler exactly what data type the name parameter is expected to hold.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Hello"&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="p"&gt;}&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The name string part is mandatory. It tells Go: &lt;em&gt;"This function expects a single argument called 'name', and it must strictly be a string."&lt;/em&gt; Calling the function remains the same:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Michael"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This requirement ensures that the Go compiler knows exactly how much memory to allocate for the variable and prevents you from accidentally passing an integer to a function that expects text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Function Signatures
&lt;/h2&gt;

&lt;p&gt;In computer science, a &lt;strong&gt;function signature&lt;/strong&gt; acts as the "contract" of a function. It defines the function's name, the types and order of its parameters, and the types of values it returns. This is where Python and Go fundamentally diverge.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python: Optional Type Hints
&lt;/h3&gt;

&lt;p&gt;Python operates on dynamic typing. By default, Python does not care about the data types, so a signature is simply the name and parameter list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The interpreter figures out what a and b are only when the function runs.&lt;br&gt;&lt;br&gt;
However, Python 3 introduced "Type Hints" to add optional clarity:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we communicate our intention: a and b should be integers, and the output should be an integer. This is fantastic for documentation and helps IDEs catch potential issues. &lt;strong&gt;Crucially, however, Python does not enforce these hints&lt;/strong&gt;. You could still write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Hello"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"World"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Depending on the context, this might run perfectly fine (it would concatenate the strings) or crash. The responsibility lies entirely with the developer and third-party tools like mypy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Go: Mandatory Types
&lt;/h3&gt;

&lt;p&gt;Go is a statically typed language. Types are not optional; they are part of the language's DNA. The function signature is explicitly defined:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, the signature is rigid and unmistakable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Inputs&lt;/strong&gt;: a (int) and b (int).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output&lt;/strong&gt;: int.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Go compiler rigorously checks these type definitions during the &lt;em&gt;compilation phase&lt;/em&gt;, which happens before the code ever runs. This is known as compile-time safety. Consequently, if you try to compile add("Hello", "World"), the compiler will halt and refuse to build the executable, throwing a type mismatch error instantly.&lt;/p&gt;

&lt;p&gt;This difference highlights the core philosophies: Python acts like a flexible workshop where you can modify things quickly with few restrictions, while Go acts like a precision engineering lab where everything must be measured and declared upfront to prevent catastrophic failures later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Returning Data
&lt;/h2&gt;

&lt;p&gt;Most functions are designed not just to perform an action but to compute a result and hand it back to the part of the program that called them. For example, a calculator function isn't helpful if it just calculates internally and throws the answer away; it must return the answer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python: Returning Values
&lt;/h3&gt;

&lt;p&gt;Python uses the return keyword to send data back.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;add&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="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# Output: 15  &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While Python appears to support returning multiple values, it actually does so using a trick. When you write return "Michael", 25, Python is internally creating a tuple and returning that single container.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;user_info&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="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;"Michael"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;25&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;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;user_info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# This is tuple unpacking  &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The function didn't natively return two separate things; it returned one tuple, and Python gracefully unpacked it into two variables.&lt;/p&gt;

&lt;h3&gt;
  
  
  Go: Native Multiple Return Values
&lt;/h3&gt;

&lt;p&gt;Go has native support for returning multiple distinct values directly from the function, without wrapping them in a container.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;userInfo&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="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;"Michael"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;25&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;age&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nf"&gt;userInfo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;span class="c1"&gt;// name is now "Michael", age is now 25  &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The (string, int) part of the signature explicitly declares that this function will produce two separate values. This is a language-level feature, not a trick.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Multiple Returns Are a Game-Changer in Go
&lt;/h2&gt;

&lt;p&gt;The native support for multiple return values isn't just a syntactic convenience; it fundamentally shapes how Go handles errors.&lt;/p&gt;

&lt;p&gt;In many other languages (including Python), errors are often handled using try/except blocks. These exceptions can be thrown deep inside a function and caught elsewhere, potentially leading to situations where a developer forgets to catch an error entirely, causing the program to crash unpredictably.&lt;/p&gt;

&lt;p&gt;Go takes a radically different approach. It discourages exceptions in favor of explicit error handling. The most idiomatic pattern in Go is to return &lt;strong&gt;two values&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The actual result (if successful).
&lt;/li&gt;
&lt;li&gt;An error value (if something went wrong).
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;divide&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;New&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"cannot divide by zero"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
    &lt;span class="p"&gt;}&lt;/span&gt;  
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt; &lt;span class="c1"&gt;// nil means "no error"  &lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you call this function, you are forced to immediately acknowledge both the result and the possibility of an error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nf"&gt;divide&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&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="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Oops:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Result:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&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;p&gt;This pattern appears everywhere in Go. It forces the developer to confront the possibility of failure right at the point of execution, leading to more robust, predictable software.&lt;/p&gt;

&lt;h2&gt;
  
  
  Python vs. Go: The Underlying Philosophies
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Python's Angle:&lt;/strong&gt; Python focuses on developer velocity and flexibility. It uses def, treats types as optional enhancements, and allows functions to accept a variety of data without strict declarations. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Go's Angle:&lt;/strong&gt; Go focuses on clarity, maintainability, and safety. It uses func, mandates types, and ensures that the inputs and outputs of every function are crystal clear to both the developer and the compiler.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finally
&lt;/h2&gt;

&lt;p&gt;Mastering functions is an exciting leap in the programming journey. It marks the transition from writing small, disposable scripts to architecting real, maintainable applications. Functions allow you to take complex, tangled logic and break it down into small, reusable pieces.&lt;/p&gt;

&lt;p&gt;A Python developer moving to Go might initially feel constrained, asking, &lt;em&gt;"Why do I have to write all these types and explicitly handle every error?"&lt;/em&gt;     &lt;/p&gt;

&lt;p&gt;I felt this way before, and honestly, its worth it. This constraint is a feature, not a bug. Go pushes you to clearly articulate how data moves through your program, ensuring you understand the flow of information thoroughly before the code even runs. Learning to appreciate this enforced clarity doesn't just make you better at Go; it fundamentally sharpens your discipline as a developer. It trains you to think critically about data flow and architecture, a skill that is invaluable regardless of which language you ultimately choose to write your applications in.&lt;/p&gt;

&lt;p&gt;Thanks for reaching the end of my article, like, comment and share, lets keep-on our journey dual-learning.  &lt;/p&gt;

</description>
      <category>python</category>
      <category>go</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>Why Go's Goroutines Made Concurrency Finally Click for Me</title>
      <dc:creator>Ezeana Micheal</dc:creator>
      <pubDate>Fri, 19 Jun 2026 18:12:27 +0000</pubDate>
      <link>https://dev.to/ezeanamichael/why-gos-goroutines-made-concurrency-finally-click-for-me-n9e</link>
      <guid>https://dev.to/ezeanamichael/why-gos-goroutines-made-concurrency-finally-click-for-me-n9e</guid>
      <description>&lt;p&gt;I’ve been writing Python for a long time, and like many developers in that space, I got used to a certain way of thinking about concurrency: async/await, event loops, and carefully managing when things pause and resume. It worked well but sometimes it felt like I was always negotiating with the runtime instead of just expressing what I actually want: “run these things at the same time.”&lt;br&gt;&lt;br&gt;
Then I started studying Go (programming language), and specifically goroutines.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Python Mental Model: Concurrency as Coordination
&lt;/h2&gt;

&lt;p&gt;In Python, especially with asyncio, concurrency often feels like structured waiting. With Python (programming language), you typically deal with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An event loop
&lt;/li&gt;
&lt;li&gt;async functions
&lt;/li&gt;
&lt;li&gt;await points that explicitly yield control
&lt;/li&gt;
&lt;li&gt;Tasks that must cooperate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You don’t just “run things at the same time.” You define where they can pause.&lt;br&gt;&lt;br&gt;
That design is nice, especially for I/O-heavy workloads. But mentally, there’s always overhead:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Where do I await?
&lt;/li&gt;
&lt;li&gt;Am I blocking the loop?
&lt;/li&gt;
&lt;li&gt;Why isn’t this coroutine running?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even when you understand it, concurrency still feels like something you carefully orchestrate.&lt;/p&gt;
&lt;h2&gt;
  
  
  Enter Goroutines: Concurrency as a Default State
&lt;/h2&gt;

&lt;p&gt;Then I met goroutines. A goroutine is deceptively simple:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;go doSomething()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That’s it, no need for an async keyword, event loop management or even explicit suspension points. The runtime handles scheduling. You don’t coordinate concurrency, you declare it.&lt;br&gt;&lt;br&gt;
At first, this feels almost too simple. But that’s the shift: Go already made the hard decisions for you.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Mental Shift: From Await Points to Independent Workers
&lt;/h2&gt;

&lt;p&gt;To illustrate, Python async feels like a single chef multitasking in one kitchen. Go feels like hiring multiple cooks.&lt;br&gt;&lt;br&gt;
In Python:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One worker switches tasks
&lt;/li&gt;
&lt;li&gt;You define pause points
&lt;/li&gt;
&lt;li&gt;Everything shares a single execution flow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In Go:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each goroutine is a worker
&lt;/li&gt;
&lt;li&gt;Tasks run independently
&lt;/li&gt;
&lt;li&gt;You just assign work and move on&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That difference is why goroutines clicked: they match how systems feel in real life, not how we simulate them.&lt;/p&gt;
&lt;h2&gt;
  
  
  Async vs Go: Pros and Cons
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Python Async (async/await)
&lt;/h3&gt;

&lt;p&gt;Pros:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Very explicit control over execution flow
&lt;/li&gt;
&lt;li&gt;Excellent for structured I/O concurrency (web servers, APIs)
&lt;/li&gt;
&lt;li&gt;Easier debugging in some cases (you can trace await chains)
&lt;/li&gt;
&lt;li&gt;Fine-grained control over when tasks yield&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Requires careful mental tracking of the event loop
&lt;/li&gt;
&lt;li&gt;“Async all the way down” problem (one blocking call breaks everything)
&lt;/li&gt;
&lt;li&gt;More boilerplate and discipline required
&lt;/li&gt;
&lt;li&gt;Easy to accidentally mix sync + async and create issues
&lt;/li&gt;
&lt;li&gt;Concurrency feels manual rather than natural&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Go Goroutines
&lt;/h3&gt;

&lt;p&gt;Pros:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Extremely simple syntax (go function())
&lt;/li&gt;
&lt;li&gt;Concurrency feels natural and lightweight
&lt;/li&gt;
&lt;li&gt;Runtime handles scheduling automatically
&lt;/li&gt;
&lt;li&gt;Scales easily to thousands/millions of goroutines
&lt;/li&gt;
&lt;li&gt;Cleaner mental model for independent tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Less explicit control over scheduling
&lt;/li&gt;
&lt;li&gt;Can accidentally create race conditions if not careful
&lt;/li&gt;
&lt;li&gt;Requires channels or sync primitives for safe communication
&lt;/li&gt;
&lt;li&gt;Debugging concurrency issues can feel more opaque
&lt;/li&gt;
&lt;li&gt;“Too easy to start tasks” can lead to uncontrolled goroutine growth&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Channels Made It Even Clearer
&lt;/h2&gt;

&lt;p&gt;Goroutines alone are powerful, but channels complete the picture. Instead of shared memory and locks, Go encourages communication:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;ch&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;make&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;chan&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;span class="k"&gt;go&lt;/span&gt; &lt;span class="k"&gt;func&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;ch&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="mi"&gt;42&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;value&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt;&lt;span class="n"&gt;ch&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The idea is simple:&lt;br&gt;&lt;br&gt;
Don’t share memory. Communicate instead. That forces a clean mental model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who sends data?
&lt;/li&gt;
&lt;li&gt;Who receives it?
&lt;/li&gt;
&lt;li&gt;What flows through the system?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why It Clicked After Python Async
&lt;/h2&gt;

&lt;p&gt;Ironically, I don’t think goroutines would’ve made sense to me without first struggling through Python async.&lt;br&gt;&lt;br&gt;
Python taught me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Concurrency is not parallelism
&lt;/li&gt;
&lt;li&gt;Blocking matters
&lt;/li&gt;
&lt;li&gt;Coordination is hard&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Go removed the ceremony and exposed the core idea: Concurrency is just structuring multiple flows of work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Control vs Trust
&lt;/h2&gt;

&lt;p&gt;Python async gives you control, so you decide when things pause. Go gives you trust, the runtime handles scheduling.&lt;br&gt;&lt;br&gt;
That shift is subtle but powerful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python: “I will manage concurrency carefully”
&lt;/li&gt;
&lt;li&gt;Go: “I will describe work and let the system handle it”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At first, trust feels risky. But it’s also what makes Go feel effortless.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;Learning Go didn’t just give me a new tool, it changed how I think about concurrent systems. I still use Python and appreciate async/await, but I see it more clearly: it’s structured concurrency with explicit control. And in Go, I stop thinking about pauses . I just think: Start this. Let it run. Communicate when needed. That’s what finally made concurrency click. Its been a pretty fun journey, Let me know your thoughts, Like, Share and Comment what you think.  &lt;/p&gt;

</description>
      <category>python</category>
      <category>go</category>
      <category>programming</category>
      <category>learning</category>
    </item>
    <item>
      <title>The Bilingual Developer: Python and Go Looping &amp; Iteration</title>
      <dc:creator>Ezeana Micheal</dc:creator>
      <pubDate>Fri, 12 Jun 2026 18:13:42 +0000</pubDate>
      <link>https://dev.to/ezeanamichael/the-bilingual-developer-python-and-go-looping-iteration-cgl</link>
      <guid>https://dev.to/ezeanamichael/the-bilingual-developer-python-and-go-looping-iteration-cgl</guid>
      <description>&lt;p&gt;In the last article, I wrote about how programs make decisions using conditionals. We went through how a program can make a decision, choosing one path over another based on whether a condition is true or false.&lt;/p&gt;

&lt;p&gt;But what if we need to perform the same action multiple times? Let's say you have a list of about 1,000 users and want to email each of them. You wouldn't write the email-sending code 1,000 times. Instead, you would write it once and have the program repeat it for each user. This is where looping comes in.&lt;/p&gt;

&lt;p&gt;Looping allows a program to repeatedly execute a block of code until a condition is met or until all items in a collection have been processed. It's one of the most powerful concepts in programming because it helps us automate repetitive tasks and work with large amounts of data efficiently. Whether you're building a web application, analyzing data, processing files, or developing APIs, you'll find loops everywhere. Let's see how Python and Go approach this concept.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Iteration
&lt;/h2&gt;

&lt;p&gt;Iteration simply means moving through a collection of data one item at a time. For example, if you have:&lt;br&gt;&lt;br&gt;
students = ["John", "Sarah", "David"]&lt;br&gt;&lt;br&gt;
Iteration means accessing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;John
&lt;/li&gt;
&lt;li&gt;Sarah
&lt;/li&gt;
&lt;li&gt;David&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;one after another. Loops are the mechanism that makes iteration possible. We will now consider some types of loops, first the for loop.&lt;/p&gt;

&lt;p&gt;The For Loop&lt;/p&gt;

&lt;p&gt;A for loop is used when you want to repeat something a specific number of times or go through a collection of items. &lt;/p&gt;
&lt;h2&gt;
  
  
  Python's Approach: for item in sequence
&lt;/h2&gt;

&lt;p&gt;Python's for loop is designed around iteration. Instead of asking you to manage counters manually, Python allows you to directly loop through a sequence.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;students&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"John"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Sarah"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"David"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;  
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;student&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;student&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you read that aloud, it almost sounds like English: “For each student in students, print the student.” That's one of the reasons Python is often praised for readability. Python also provides the range() function when you want to repeat something a specific number of times.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&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="p"&gt;:&lt;/span&gt;  
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0  
1  
2  
3  
4  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can note that Python focuses less on how the loop works internally and more on what you're trying to accomplish.&lt;/p&gt;

&lt;h2&gt;
  
  
  Go's Approach: The Universal for Keyword
&lt;/h2&gt;

&lt;p&gt;Instead of providing separate loop structures for different situations, Go uses a single keyword: for. This one keyword handles almost every looping scenario.&lt;br&gt;&lt;br&gt;
A traditional Go for loop looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&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;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&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;p&gt;This structure contains three parts: initialization; condition; post-action&lt;br&gt;&lt;br&gt;
In this example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;i := 0 initializes the counter
&lt;/li&gt;
&lt;li&gt;i &amp;lt; 5 determines how long the loop runs (in this case limiting to 5)
&lt;/li&gt;
&lt;li&gt;i++ updates the counter by 1 after each iteration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When iterating over collections, Go uses the range keyword.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;students&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"John"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Sarah"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"David"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;student&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="k"&gt;range&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;student&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;p&gt;Unlike Python, Go exposes both the position and the value by default.&lt;br&gt;&lt;br&gt;
This reflects Go's preference for being explicit about what's happening during execution.&lt;/p&gt;
&lt;h2&gt;
  
  
  The While Loop
&lt;/h2&gt;

&lt;p&gt;Not every situation involves iterating through a collection. Sometimes you want code to keep running as long as a condition remains true.&lt;br&gt;&lt;br&gt;
For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep asking for a password until the user enters the correct one.
&lt;/li&gt;
&lt;li&gt;Continue processing requests while the server is running.
&lt;/li&gt;
&lt;li&gt;Retry an operation until it succeeds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is where while loops become useful.&lt;/p&gt;
&lt;h2&gt;
  
  
  Python's Explicit while Loop
&lt;/h2&gt;

&lt;p&gt;Python provides a dedicated keyword for this purpose:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;  
&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
    &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The logic is straightforward, It continues running this block while the condition remains true and each time the loop runs, the condition is checked again So once the condition becomes false, the loop stops.&lt;/p&gt;

&lt;h2&gt;
  
  
  Go's Approach: Using for as a While Loop
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Go does not have a while keyword.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Instead, Go reuses its universal for loop. To create while-loop behavior, you simply remove the initialization and post-action sections.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;  
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&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;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
    &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Infinite Loops
&lt;/h2&gt;

&lt;p&gt;Sometimes a loop is intended to run forever until something inside it stops execution.&lt;/p&gt;

&lt;p&gt;Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Running..."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Go:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Running..."&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;p&gt;You'll often see these in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Web servers
&lt;/li&gt;
&lt;li&gt;Background workers
&lt;/li&gt;
&lt;li&gt;Event listeners
&lt;/li&gt;
&lt;li&gt;Real-time systems&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Breaking and Continuing&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To understand breaking and continuing, we should understand that not every loop should run to completion. Sometimes we want to stop a loop early or skip a particular iteration. This is where break and continue become useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using break
&lt;/h2&gt;

&lt;p&gt;The break statement immediately terminates the loop.&lt;br&gt;&lt;br&gt;
Python example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
        &lt;span class="k"&gt;break&lt;/span&gt;  
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0  
1  
2  
3  
4  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The moment the value reaches 5, the loop stops completely. Go works the same way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
        &lt;span class="k"&gt;break&lt;/span&gt;  
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&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;p&gt;Again, execution stops as soon as the break statement is reached.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using continue
&lt;/h2&gt;

&lt;p&gt;The continue statement is slightly different. Instead of stopping the loop, it skips the current iteration and moves to the next one.&lt;br&gt;&lt;br&gt;
Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&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="p"&gt;:&lt;/span&gt;  
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
        &lt;span class="k"&gt;continue&lt;/span&gt;  
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0  
1  
3  
4  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice that 2 is skipped. Go behaves the same way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&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;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
        &lt;span class="k"&gt;continue&lt;/span&gt;  
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&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;p&gt;The current iteration is skipped, but the loop itself continues running.&lt;/p&gt;

&lt;h2&gt;
  
  
  Python's Angle vs Go's Angle
&lt;/h2&gt;

&lt;p&gt;Looking at loops gives us another glimpse into the philosophy of both languages.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Python's Angle&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Python is designed to make iteration feel natural.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;for item in sequence
&lt;/li&gt;
&lt;li&gt;Dedicated while keyword
&lt;/li&gt;
&lt;li&gt;Readable syntax
&lt;/li&gt;
&lt;li&gt;Focus on expressing intent clearly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Python often hides implementation details so you can focus on solving the problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Go's Angle&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Go prefers consistency over having many specialized constructs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One loop keyword (for)
&lt;/li&gt;
&lt;li&gt;Multiple looping styles using the same structure
&lt;/li&gt;
&lt;li&gt;Explicit control over loop behavior
&lt;/li&gt;
&lt;li&gt;Less language complexity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Go's mindset is:&lt;br&gt;&lt;br&gt;
Learn one loop mechanism and use it everywhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finally
&lt;/h2&gt;

&lt;p&gt;Looping is one of the fast ways programs get work done in programming. Without loops, applications would struggle to process lists, handle user input, analyze data, or automate repetitive tasks. Python gives you specialized, highly readable constructs for iteration. Go gives you a single, versatile tool that can adapt to different situations.Both approaches are effective.&lt;/p&gt;

&lt;p&gt;The real skill as a bilingual developer isn't memorizing syntax, but it's understanding the underlying concept. Once you understand what a loop is trying to achieve, switching between Python and Go becomes much easier. The syntax may change, but the logic remains exactly the same: repeat a task until you're done. Thanks for reading this article, hit the like and comment what you think, thanks.  &lt;/p&gt;

</description>
      <category>python</category>
      <category>go</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
