<?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: Diogo</title>
    <description>The latest articles on DEV Community by Diogo (@diogojlq).</description>
    <link>https://dev.to/diogojlq</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3376270%2F272f6268-927b-425b-8c97-12501da3819a.jpeg</url>
      <title>DEV Community: Diogo</title>
      <link>https://dev.to/diogojlq</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/diogojlq"/>
    <language>en</language>
    <item>
      <title>Self-hosted Gitea CI</title>
      <dc:creator>Diogo</dc:creator>
      <pubDate>Mon, 05 Jan 2026 19:01:48 +0000</pubDate>
      <link>https://dev.to/diogojlq/self-hosted-gitea-ci-10e9</link>
      <guid>https://dev.to/diogojlq/self-hosted-gitea-ci-10e9</guid>
      <description>&lt;p&gt;The goal of this guide is to turn your Gitea from a simple code repository into a full automation pipeline. We’ll use &lt;strong&gt;Gitea Actions&lt;/strong&gt;, which is compatible with &lt;strong&gt;GitHub Actions syntax&lt;/strong&gt;, making the process straightforward if you already know GitHub CI/CD.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The Concept: Gitea Actions and Runners
&lt;/h2&gt;

&lt;p&gt;Unlike GitHub, where the machines that execute workflows (Runners) are provided by Microsoft, in a self-hosted environment &lt;strong&gt;you must run your own Runner&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Since your Gitea is already running in Docker, the most natural approach is to create a &lt;strong&gt;sibling container&lt;/strong&gt; that acts as the Runner.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Enabling Actions in Gitea
&lt;/h2&gt;

&lt;p&gt;First, you need to explicitly enable Actions in Gitea.&lt;/p&gt;

&lt;p&gt;Edit the Gitea configuration file (usually located at &lt;code&gt;gitea/conf/app.ini&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Add or update the following section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ini
[actions]
ENABLED = true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart the Gitea container to apply the changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Creating the Gitea Runner (The Worker)
&lt;/h2&gt;

&lt;p&gt;Now you need a service that continuously listens to Gitea and waits for jobs.&lt;br&gt;
We’ll use the official act_runner.&lt;/p&gt;

&lt;p&gt;Create a docker-compose.yml file for the runner (it can be in the same compose file as Gitea or a separate one):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;services:
  runner:
    image: gitea/act_runner:latest
    container_name: gitea-runner
    environment:
      - CONFIG_FILE=/config.yaml
      - GITEA_INSTANCE_URL=http://192.168.x.x:3000
      - GITEA_RUNNER_REGISTRATION_TOKEN=&amp;lt;TOKEN_HERE&amp;gt;
      - GITEA_RUNNER_NAME=thinkpad-runner
    volumes:
      - ./data:/data
      - /var/run/docker.sock:/var/run/docker.sock
    restart: always
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Getting the Runner Registration Token
&lt;/h3&gt;

&lt;p&gt;Go to Site Administration → Actions → Runners → Create new Runner.&lt;br&gt;
Copy the generated token and paste it into the GITEA_RUNNER_REGISTRATION_TOKEN field.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. The Workflow: From Push to Deployment
&lt;/h2&gt;

&lt;p&gt;Inside your repository (for example, a Next.js or Python project), create a workflow that defines what happens when code is pushed.&lt;/p&gt;

&lt;p&gt;Create the following file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.gitea/workflows/deploy.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Below is a simple end-to-end example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;:&lt;br&gt;
You push new code to main, a Docker image is built, pushed to a registry, and the production container is updated automatically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: Deploy to Production
run-name: ${{ gitea.actor }} is deploying 🚀

on:
  push:
    branches:
      - main

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Login to Docker Hub (optional)
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_TOKEN }}

      - name: Build and push Docker image
        uses: docker/build-push-action@v4
        with:
          context: .
          push: true
          tags: your-user/your-app:latest

      - name: Update production container
        uses: appleboy/ssh-action@v1.0.0
        with:
          host: ${{ secrets.HOST_IP }}
          username: ${{ secrets.HOST_USER }}
          key: ${{ secrets.SSH_KEY }}
          script: |
            docker pull your-user/your-app:latest
            docker stop my-app-prod || true
            docker rm my-app-prod || true
            docker run -d \
              --name my-app-prod \
              -p 8080:80 \
              your-user/your-app:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why a Separate production Branch Is Usually a Bad Idea
&lt;/h3&gt;

&lt;p&gt;You might consider creating a production branch and having Gitea automatically merge main into it.&lt;br&gt;
In practice, this often introduces unnecessary complexity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Modern CI/CD follows Trunk-Based Development principles&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;main is the single source of truth&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Code merged into main must always be production-ready&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CI/CD builds and deploys directly from main&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This eliminates manual merges, reduces errors, and keeps the pipeline simple.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Optional: Mirroring the Repository to GitHub&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Even when using &lt;strong&gt;Gitea as your primary Git platform&lt;/strong&gt;, mirroring your repository to &lt;strong&gt;GitHub&lt;/strong&gt; can be a &lt;strong&gt;strategic advantage&lt;/strong&gt; rather than a contradiction.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why Mirror to GitHub?&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Visibility &amp;amp; Portfolio&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GitHub is still the most widely used platform by recruiters and open-source communities.  Mirroring ensures your work is &lt;strong&gt;publicly visible&lt;/strong&gt; without changing your main workflow.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Backup &amp;amp; Redundancy&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your self-hosted Gitea remains the &lt;strong&gt;source of truth&lt;/strong&gt;, while GitHub acts as a &lt;strong&gt;read-only backup&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ecosystem Compatibility&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some tools, integrations, and third-party services still &lt;strong&gt;only support GitHub natively&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero Workflow Impact&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You continue pushing to &lt;strong&gt;Gitea&lt;/strong&gt;, while GitHub stays automatically in sync.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;How Gitea Repository Mirroring Works&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Gitea supports &lt;strong&gt;one-way and two-way mirroring&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
For most setups, &lt;strong&gt;one-way push mirroring&lt;/strong&gt; is the safest option:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Gitea → GitHub&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Main branch remains authoritative&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No accidental changes coming back from GitHub&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Setting Up Push Mirroring (Gitea → GitHub)&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Create an &lt;strong&gt;empty repository on GitHub&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;In Gitea, open your repository settings&lt;/li&gt;
&lt;li&gt;Navigate to &lt;strong&gt;Settings → Repository → Mirroring&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Add a &lt;strong&gt;new push mirror&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Use the GitHub repository URL (SSH is recommended)&lt;/li&gt;
&lt;li&gt;Add your GitHub SSH key or token (example: &lt;a href="mailto:git@github.com"&gt;git@github.com&lt;/a&gt;:your-name/your-repo.git)&lt;/li&gt;
&lt;li&gt;Enable Push Mirror&lt;/li&gt;
&lt;li&gt;Save the configuration&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;From this point on, &lt;strong&gt;every push to Gitea is automatically mirrored to GitHub&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recommended Best Practices&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Disable GitHub Actions on the mirrored repository
Gitea remains responsible for CI/CD.&lt;/li&gt;
&lt;li&gt;Protect the GitHub repository
Treat it as read-only to avoid divergence.&lt;/li&gt;
&lt;li&gt;Mirror only main (optional)
Keeps the public repo clean and focused.
&lt;strong&gt;Mental Model&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gitea = Source of Truth&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GitHub = Public Mirror / Backup&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CI/CD = Gitea Actions&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This setup gives you full ownership and control, while still benefiting from &lt;strong&gt;GitHub’s network effects&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary: Key Benefits&lt;/strong&gt;&lt;br&gt;
Automation&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No more SSH access and manual git pull on the server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Observability&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each build and deployment is logged and visible directly in the Gitea UI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Safety&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the build fails (syntax errors, failing tests, broken TypeScript or Python code), the deployment is automatically blocked, keeping production stable.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>cicd</category>
      <category>devops</category>
      <category>docker</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How a Binary Search Tree Works</title>
      <dc:creator>Diogo</dc:creator>
      <pubDate>Sun, 07 Sep 2025 14:03:20 +0000</pubDate>
      <link>https://dev.to/diogojlq/how-a-binary-search-tree-works-2of</link>
      <guid>https://dev.to/diogojlq/how-a-binary-search-tree-works-2of</guid>
      <description>&lt;p&gt;A Binary Search Tree (BST) is a special type of binary tree that organizes data in a way that makes searching, inserting, and deleting efficient. It is widely used in computer science because it combines the structure of a binary tree with the efficiency of a sorted dataset.&lt;/p&gt;

&lt;h3&gt;
  
  
  Structure of a BST
&lt;/h3&gt;

&lt;p&gt;A binary search tree is made up of nodes, where each node has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A key (or value)&lt;/li&gt;
&lt;li&gt;A reference to a left child&lt;/li&gt;
&lt;li&gt;A reference to a right child&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key property of a BST is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Left Subtree Rule: All values in the left subtree of a node are smaller than the node’s value.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Right Subtree Rule: All values in the right subtree of a node are greater than the node’s value.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This ordering ensures that the tree remains sorted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Searching in a BST
&lt;/h2&gt;

&lt;p&gt;The search process follows the BST property:&lt;/p&gt;

&lt;p&gt;Start at the root node.&lt;/p&gt;

&lt;p&gt;Compare the target value with the current node:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the target is equal to the node’s value → Found.&lt;/li&gt;
&lt;li&gt;If the target is smaller → Move to the left child.&lt;/li&gt;
&lt;li&gt;If the target is greater → Move to the right child.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Repeat until the value is found or the search reaches a null reference (meaning the value does not exist in the tree).&lt;/p&gt;

&lt;p&gt;This process has an average time complexity of O(log n), assuming the tree is balanced.&lt;/p&gt;

&lt;h2&gt;
  
  
  Insertion in a BST
&lt;/h2&gt;

&lt;p&gt;To insert a new value:&lt;/p&gt;

&lt;p&gt;Start at the root and compare the new value with the current node.&lt;/p&gt;

&lt;p&gt;If the new value is smaller, go to the left child; if greater, go to the right child.&lt;/p&gt;

&lt;p&gt;Repeat until you find an empty spot (null), then insert the new node there.&lt;/p&gt;

&lt;p&gt;By maintaining the BST property, the tree remains sorted after insertion.&lt;br&gt;
Deletion in a BST&lt;/p&gt;

&lt;p&gt;Deleting a node is slightly more complex and has three cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Leaf Node (no children): Simply remove the node.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;One Child: Remove the node and connect its child directly to its parent.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Two Children: Find the node’s inorder successor (the smallest value in its right subtree), replace the node’s value with it, and then delete the successor.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;A Binary Search Tree is a powerful data structure that enables efficient searching and organization of data. Its simplicity makes it fundamental in computer science, while its limitations highlight the need for more advanced balanced tree structures in real-world applications.&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>programming</category>
      <category>leetcode</category>
    </item>
    <item>
      <title>Using GORM as an ORM in Go: A Quick Overview</title>
      <dc:creator>Diogo</dc:creator>
      <pubDate>Sun, 03 Aug 2025 11:00:00 +0000</pubDate>
      <link>https://dev.to/diogojlq/using-gorm-as-an-orm-in-go-a-quick-overview-1ja2</link>
      <guid>https://dev.to/diogojlq/using-gorm-as-an-orm-in-go-a-quick-overview-1ja2</guid>
      <description>&lt;p&gt;&lt;strong&gt;GORM&lt;/strong&gt; is one of the most popular Object Relational Mappers for Go. It provides a clean, expressive API for interacting with databases, abstracting away much of the boilerplate SQL code while still allowing fine-tuned control when needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;To start using GORM, first install the library:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go get -u gorm.io/gorm
go get -u gorm.io/driver/sqlite # or another driver like mysql/postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, set up a simple connection:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import (
    "gorm.io/gorm"
    "gorm.io/driver/sqlite"
)

db, err := gorm.Open(sqlite.Open("test.db"), &amp;amp;gorm.Config{})
if err != nil {
    panic("failed to connect database")
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Defining Models
&lt;/h2&gt;

&lt;p&gt;You define your data structures as Go structs. GORM uses reflection to map these to database tables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type User struct {
    gorm.Model
    Name  string
    Email string
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Basic Operations
&lt;/h2&gt;

&lt;p&gt;Create:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;db.Create(&amp;amp;User{Name: "Alice", Email: "alice@example.com"})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var user User
db.First(&amp;amp;user, 1) // find user with ID 1
db.Where("name = ?", "Alice").First(&amp;amp;user)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Update:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;db.Model(&amp;amp;user).Update("Email", "new@example.com")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Delete:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;db.Delete(&amp;amp;user)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why Use GORM?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Productivity: Less boilerplate, cleaner code.&lt;/li&gt;
&lt;li&gt;Portability: Works with multiple databases.&lt;/li&gt;
&lt;li&gt;Flexibility: Lets you drop down to raw SQL when needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Downsides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Slightly larger binary size.&lt;/li&gt;
&lt;li&gt;May not be the fastest for high-performance use cases — consider raw SQL or sqlx if needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;GORM is a great tool for building Go applications that need reliable database interaction with minimal friction. It’s especially useful for rapid development, small to medium-sized apps, and teams looking for readability over raw performance.&lt;/p&gt;

</description>
      <category>go</category>
      <category>backend</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Diogo</dc:creator>
      <pubDate>Sun, 27 Jul 2025 16:13:28 +0000</pubDate>
      <link>https://dev.to/diogojlq/-2e1c</link>
      <guid>https://dev.to/diogojlq/-2e1c</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/parizad" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3253692%2F9be63b1a-3821-41d0-af42-56fa2d3047d1.jpg" alt="parizad"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/parizad/the-difference-between-kanban-and-scrum-from-a-developers-perspective-4of4" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;The difference between Kanban and Scrum from a developer's perspective&lt;/h2&gt;
      &lt;h3&gt;Parizad ・ Jul 26 '25&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#scrum&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#development&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#developer&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#developers&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>scrum</category>
      <category>development</category>
      <category>developer</category>
      <category>developers</category>
    </item>
    <item>
      <title>Understanding Go Modules: A Brief Guide</title>
      <dc:creator>Diogo</dc:creator>
      <pubDate>Sun, 27 Jul 2025 14:42:43 +0000</pubDate>
      <link>https://dev.to/diogojlq/understanding-go-modules-a-brief-guide-1nb</link>
      <guid>https://dev.to/diogojlq/understanding-go-modules-a-brief-guide-1nb</guid>
      <description>&lt;p&gt;A Go module is a collection of Go packages stored in a directory with a go.mod file at its root. This file defines the module’s path and its dependencies. It allows developers to version, upgrade, and manage dependencies cleanly.&lt;/p&gt;

&lt;p&gt;Key Files&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;go.mod&lt;/strong&gt;: Contains the module name, Go version, and required dependencies with their versions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;go.sum&lt;/strong&gt;: Maintains checksums to verify the integrity of modules used.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Basic Commands&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;go mod init : Initializes a new module.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;go get @: Adds or updates a dependency.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;go mod tidy: Cleans up unused dependencies and adds missing ones.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;go build / go run / go test: Automatically resolves and uses modules.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Benefits&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;No need for GOPATH.&lt;/li&gt;
&lt;li&gt;Clear version control and reproducibility.&lt;/li&gt;
&lt;li&gt;Easier to work across multiple projects.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go mod init github.com/username/myproject
go get github.com/gin-gonic/gin@v1.9.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a go.mod file and fetch the specified version of the Gin web framework.&lt;/p&gt;

&lt;p&gt;Go Modules make dependency management in Go modern and efficient, especially important as projects grow in complexity.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Atomic Commits</title>
      <dc:creator>Diogo</dc:creator>
      <pubDate>Mon, 21 Jul 2025 18:52:18 +0000</pubDate>
      <link>https://dev.to/diogojlq/atomic-commits-3777</link>
      <guid>https://dev.to/diogojlq/atomic-commits-3777</guid>
      <description>&lt;p&gt;Why You Should Use Atomic Commits&lt;br&gt;
If you've ever scrolled through a Git history and struggled to understand what changed and why, you're not alone. This is where atomic commits come in — a simple but powerful practice that can level up your workflow.&lt;/p&gt;

&lt;p&gt;What Are Atomic Commits?&lt;br&gt;
An atomic commit means that each commit is small, self-contained, and focused on a single purpose. It should answer:&lt;/p&gt;

&lt;p&gt;“What is the smallest meaningful change I can make and commit right now?”&lt;/p&gt;

&lt;p&gt;Instead of dumping multiple unrelated changes into one commit, you break them down into logical units — fixing a bug, adding a feature, or refactoring a method.&lt;/p&gt;

&lt;p&gt;Why It Matters&lt;br&gt;
Better Code Reviews: Smaller commits are easier to understand and review.&lt;/p&gt;

&lt;p&gt;Easier Reverts: A single bad commit? No problem. You can safely roll it back without undoing unrelated changes.&lt;/p&gt;

&lt;p&gt;Clearer History: Your Git log becomes readable and meaningful — like a story of your codebase.&lt;/p&gt;

&lt;p&gt;Less Merge Hell: Smaller, isolated changes reduce merge conflicts.&lt;/p&gt;

&lt;p&gt;Good vs Bad Examples&lt;br&gt;
Bad Commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m "fix bugs and add new feature and update styles"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Atomic Commits:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m "fix: handle null values in user input"
git commit -m "feat: add password visibility toggle"
git commit -m "style: update button padding"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tips for Writing Atomic Commits&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Stage changes selectively (git add -p)&lt;/li&gt;
&lt;li&gt;Use clear and consistent commit messages (e.g., conventional commits)&lt;/li&gt;
&lt;li&gt;Commit often, but with intention — each commit should have a purpose&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Atomic commits take a bit more discipline, but they pay off quickly — especially in team environments. Clean history, fewer bugs, and better collaboration. Worth it.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>git</category>
    </item>
  </channel>
</rss>
