<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Kervie Sazon</title>
    <description>The latest articles on Forem by Kervie Sazon (@kervie_sazon).</description>
    <link>https://forem.com/kervie_sazon</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%2F3733095%2Fe01cd166-2343-4233-bb1a-d7849d9c5ae4.jpg</url>
      <title>Forem: Kervie Sazon</title>
      <link>https://forem.com/kervie_sazon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kervie_sazon"/>
    <language>en</language>
    <item>
      <title>Git &amp; GitHub Notes - Part 3: Undoing Changes &amp; Forking</title>
      <dc:creator>Kervie Sazon</dc:creator>
      <pubDate>Thu, 12 Mar 2026 14:19:04 +0000</pubDate>
      <link>https://forem.com/kervie_sazon/git-github-notes-part-3-undoing-changes-forking-gc6</link>
      <guid>https://forem.com/kervie_sazon/git-github-notes-part-3-undoing-changes-forking-gc6</guid>
      <description>&lt;h2&gt;
  
  
  Undoing Changes
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;git reset&lt;/code&gt;&lt;br&gt;
This command allows you to move the HEAD (current commit pointer) to a previous commit.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;code&gt;git log&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Before undoing commits, it’s useful to see the &lt;strong&gt;commit history&lt;/strong&gt;. &lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;commit d00cb3c91f942a4aa10c3d14e2428344e670e9d5 (HEAD -&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;testing-lang&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="gp"&gt;Author: Kervie Jay &amp;lt;166139157+kervieszn14@users.noreply.github.com&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="go"&gt;Date:   Fri Mar 6 09:23:19 2026 +0800

    Update README.md

commit 896d60f6a6f5f695da06349bed40f530bf083413
&lt;/span&gt;&lt;span class="gp"&gt;Author: Kervie Jay &amp;lt;166139157+kervieszn14@users.noreply.github.com&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="go"&gt;Date:   Fri Mar 6 09:21:59 2026 +0800

    README.md

commit 389969f59a98fe3496660f59a301f8ded48a74fb
&lt;/span&gt;&lt;span class="gp"&gt;Author: Kervie Jay &amp;lt;166139157+kervieszn14@users.noreply.github.com&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="go"&gt;Date:   Fri Mar 6 09:20:26 2026 +0800
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each commit has a &lt;strong&gt;unique commit hash&lt;/strong&gt; which can be used to reset to a specific commit.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;git reset HEAD~1&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;This command moves the repository &lt;strong&gt;one commit back&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Meaning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HEAD - current commit&lt;/li&gt;
&lt;li&gt;~1 - one commit before the current commit&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This removes the latest commit but &lt;strong&gt;keeps the changes in working directory&lt;/strong&gt; so you can edit them again.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;git reset &amp;lt;hash&amp;gt;&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Used to reset a specific commit using its commit hash.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git reset d00cb3c91f942a4aa10c3d14e2428344e670e9d5 
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This moves the project back to that commit.&lt;br&gt;
Use &lt;code&gt;git log&lt;/code&gt; to find the commit hash.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;code&gt;git reset --hard &amp;lt;hash&amp;gt;&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;This command resets the repository completely to a previous commit. &lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git reset d00cb3c91f942a4aa10c3d14e2428344e670e9d5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Important:&lt;/p&gt;

&lt;p&gt;This will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remove commits after the selected commit&lt;/li&gt;
&lt;li&gt;Delete changes in the working directory&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Forking a Repository
&lt;/h2&gt;

&lt;p&gt;Forking is a feature on GitHub that allows you to &lt;strong&gt;create a copy of someone else's repository under your own GitHub account&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;After forking, you can clone your fork to your local machine.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git clone https://github.com/yourusername/project-name.git
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you can make changes and commit them normally.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git add .
git commit -m "Improve documentation"
git push
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pushes the changes to your forked repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a Pull Request
&lt;/h2&gt;

&lt;p&gt;After editing your fork, you can submit your changes back to the original project using a &lt;strong&gt;Pull Request (PR)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A Pull Request allows the original repository owner to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Review your changes&lt;/li&gt;
&lt;li&gt;Discuss improvements&lt;/li&gt;
&lt;li&gt;Merge your contribution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Push changes to your fork&lt;/li&gt;
&lt;li&gt;Go to your forked repository on GitHub&lt;/li&gt;
&lt;li&gt;Click Compare &amp;amp; Pull Request&lt;/li&gt;
&lt;li&gt;Add a description&lt;/li&gt;
&lt;li&gt;Submit the Pull Request&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git log&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;View commit history&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git reset&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Move to a previous commit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;git reset HEAD~1&lt;/code&gt;.&lt;/td&gt;
&lt;td&gt;Undo the last commit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git reset &amp;lt;hash&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reset to a specific commit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git reset --hard &amp;lt;hash&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reset and Delete Changes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Today, I learned how to undo commits in Git using commands like git reset and git reset --hard. I also practiced viewing commit history with git log to identify which commit to revert to. In addition, I learned how forking works on GitHub and how it allows developers to contribute to projects they don’t own. Finally, I understood the workflow of editing a forked repository and submitting contributions through a Pull Request.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>git</category>
      <category>github</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Git &amp; GitHub Learning Notes</title>
      <dc:creator>Kervie Sazon</dc:creator>
      <pubDate>Mon, 09 Mar 2026 15:16:00 +0000</pubDate>
      <link>https://forem.com/kervie_sazon/git-github-learning-notes-9pd</link>
      <guid>https://forem.com/kervie_sazon/git-github-learning-notes-9pd</guid>
      <description>&lt;p&gt;Part 1: &lt;a href="https://dev.to/kervie_sazon/git-github-notes-5h0o"&gt;Fresh Start&lt;/a&gt;&lt;br&gt;
Part 2: &lt;a href="https://dev.to/kervie_sazon/git-github-notes-continuation-branching-2c2l"&gt;Branching&lt;/a&gt;&lt;br&gt;
Part 3: &lt;a href="https://dev.to/kervie_sazon/git-github-notes-part-3-undoing-changes-forking-gc6"&gt;Undoing Changes &amp;amp; Forking&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Git &amp; GitHub Notes - Part 2: Branching</title>
      <dc:creator>Kervie Sazon</dc:creator>
      <pubDate>Mon, 09 Mar 2026 15:10:59 +0000</pubDate>
      <link>https://forem.com/kervie_sazon/git-github-notes-continuation-branching-2c2l</link>
      <guid>https://forem.com/kervie_sazon/git-github-notes-continuation-branching-2c2l</guid>
      <description>&lt;p&gt;Today I continued learning Git and GitHub, focusing on branching and collaboration commands. &lt;/p&gt;

&lt;h1&gt;
  
  
  Branch
&lt;/h1&gt;

&lt;p&gt;A branch in Git is a separate line of development. It allows you to work on new features, fixes, or experiments without affecting the main project. &lt;/p&gt;

&lt;p&gt;Most repositories have a default branch called:&lt;br&gt;
&lt;code&gt;main&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Developers usually create new branches to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add new features&lt;/li&gt;
&lt;li&gt;Fix bugs&lt;/li&gt;
&lt;li&gt;Test ideas safely&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Commands encountered:
&lt;/h3&gt;
&lt;h1&gt;
  
  
  &lt;code&gt;git branch&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;The &lt;code&gt;git branch&lt;/code&gt; command is used to view or manage branches.&lt;br&gt;
&lt;strong&gt;View all branches&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;git branch
&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;* main 
  feature-testing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;*&lt;/code&gt; indicates the current branch you are working on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create new branch&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;git branch feature-testing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates the branch but does not switch to it yet. &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;git checkout&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;git checkout&lt;/code&gt; is used to switch between branches.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;git checkout -b &amp;lt;branch_name&amp;gt;&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;This command creates a new branch and switches to it at the same time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command&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;git checkout -b feature-testing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is equivalent to running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch feature-testing
git checkout feature-testing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  &lt;code&gt;git diff&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;git diff&lt;/code&gt; shows the difference between file changes.&lt;/p&gt;

&lt;p&gt;This helps developers review what has changed before committing or merging.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;git commit -am&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;This command is a shortcut that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Stages tracked files&lt;/li&gt;
&lt;li&gt;Creates a commit&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Command&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;git commit -am "Update test feature"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Important notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Works only for already tracked files&lt;/li&gt;
&lt;li&gt;New files still require &lt;code&gt;git add&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&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;git add newfile.go
git commit -m "Add new file"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  &lt;code&gt;git merge&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;git merge&lt;/code&gt; combines changes from one branch into another.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example workflow&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Switch to the branch you want to merge into:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Merge another branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git merge feature-testing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This brings the changes from &lt;code&gt;feature-testing&lt;/code&gt; into &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;git pull&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;git pull&lt;/code&gt; updates your local repository with the latest changes from GitHub.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command&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;git pull
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It basically does two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Fetch updates from the remote repository&lt;/li&gt;
&lt;li&gt;Merge them into your local branch&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;git branch -d&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;This command &lt;strong&gt;deletes a branch&lt;/strong&gt; after it has been merged.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command&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;git branch -d feature-login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This helps keep the repository clean by removing branches that are no longer needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example Branch Workflow
&lt;/h2&gt;

&lt;p&gt;A common workflow when adding a new feature:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout -b feature-navbar
git add .
git commit -m "Add navbar feature"
git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After finishing the feature:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout main
git merge feature-navbar
git branch -d feature-navbar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In summary, I learned how branching works in Git and how it helps developers work on features without affecting the main branch. I practiced creating and switching branches using commands like &lt;code&gt;git branch&lt;/code&gt; and &lt;code&gt;git checkout -b&lt;/code&gt;. I also learned how to review changes with &lt;code&gt;git diff&lt;/code&gt;, combine branches using &lt;code&gt;git merge&lt;/code&gt;, and update my local repository with &lt;code&gt;git pull&lt;/code&gt;. These commands helped me understand a basic workflow for developing features and managing code changes more efficiently using Git.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>devjournal</category>
      <category>git</category>
      <category>github</category>
    </item>
    <item>
      <title>Git &amp; GitHub Learning Notes - Fresh Start</title>
      <dc:creator>Kervie Sazon</dc:creator>
      <pubDate>Fri, 06 Mar 2026 15:16:00 +0000</pubDate>
      <link>https://forem.com/kervie_sazon/git-github-notes-5h0o</link>
      <guid>https://forem.com/kervie_sazon/git-github-notes-5h0o</guid>
      <description>&lt;p&gt;Today I studied the basics of &lt;strong&gt;Git and GitHub&lt;/strong&gt;. These are essential tools for developers to track code changes and collaborate with others. I’m writing these notes so I can quickly remember the workflow when I use them again.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. What is Git?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Git&lt;/strong&gt; is a version control system that helps developers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Track changes in code&lt;/li&gt;
&lt;li&gt;Revert to previous versions&lt;/li&gt;
&lt;li&gt;Work on projects collaboratively&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of saving multiple copies of files, Git keeps a history of changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. What is GitHub?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GitHub&lt;/strong&gt; is a cloud platform that hosts Git repositories online. It allows developers to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Store code remotely&lt;/li&gt;
&lt;li&gt;Collaborate with teams&lt;/li&gt;
&lt;li&gt;Share projects publicly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of it as &lt;strong&gt;Git + cloud storage + collaboration tools&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Cloning a Repository
&lt;/h2&gt;

&lt;p&gt;Cloning means &lt;strong&gt;downloading an existing repository from GitHub to your local machine&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Command
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone &amp;lt;repository-url&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/username/project-name.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After cloning, a folder with the project will be created on your computer.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The Basic Git Workflow
&lt;/h2&gt;

&lt;p&gt;The typical Git workflow looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Edit files
   ↓
git add
   ↓
git commit
   ↓
git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. &lt;code&gt;git add&lt;/code&gt; Command
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;git add&lt;/code&gt; command moves changes into the &lt;strong&gt;staging area&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The staging area is where you prepare files before committing them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add a specific file
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Add all changes
&lt;/h3&gt;



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

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. &lt;code&gt;git commit&lt;/code&gt; Command
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;commit&lt;/strong&gt; saves a snapshot of the staged changes into Git history.&lt;/p&gt;

&lt;h3&gt;
  
  
  Command
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"your message"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add index.html page"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Tips for commit messages
&lt;/h3&gt;

&lt;p&gt;Good commit messages are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Short&lt;/li&gt;
&lt;li&gt;Clear&lt;/li&gt;
&lt;li&gt;Descriptive&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Add login page&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Fix navigation bug&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Update README&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7. &lt;code&gt;git push&lt;/code&gt; Command
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;git push&lt;/code&gt; uploads your commits to GitHub.&lt;/p&gt;

&lt;h3&gt;
  
  
  Command
&lt;/h3&gt;



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

&lt;/div&gt;



&lt;p&gt;If it's your first push:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push &lt;span class="nt"&gt;--set-upstream&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, you can simply run:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  8. SSH Key
&lt;/h2&gt;

&lt;p&gt;An &lt;strong&gt;SSH key&lt;/strong&gt; allows you to connect to GitHub securely without typing your username and password every time.&lt;/p&gt;

&lt;p&gt;It works like a &lt;strong&gt;secure authentication key&lt;/strong&gt; between your computer and GitHub.&lt;/p&gt;

&lt;h3&gt;
  
  
  Generate SSH key
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; ed25519 &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"your_email@example.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  View your public key
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; ~/.ssh/id_ed25519.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy the key and add it to GitHub under:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Settings → SSH and GPG Keys
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  9. Useful Git Commands
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Check repository status
&lt;/h3&gt;



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

&lt;/div&gt;



&lt;h3&gt;
  
  
  See commit history
&lt;/h3&gt;



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

&lt;/div&gt;



&lt;h3&gt;
  
  
  Check remote repository
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  10. My Simple Daily Git Workflow
&lt;/h2&gt;

&lt;p&gt;When working on a project, I will usually do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"describe what I changed"&lt;/span&gt;
git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Key Takeaways 🧠
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;git clone&lt;/strong&gt; → download a repository&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;git add&lt;/strong&gt; → stage files&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;git commit&lt;/strong&gt; → save changes locally&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;git push&lt;/strong&gt; → upload changes to GitHub&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SSH key&lt;/strong&gt; → secure authentication without passwords&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Learning Git and GitHub felt confusing at first, but understanding the &lt;strong&gt;basic workflow (add → commit → push)&lt;/strong&gt; makes it much easier. I’ll keep practicing these commands while working on small projects.&lt;/p&gt;

&lt;p&gt;Next topics I want to learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Branching&lt;/li&gt;
&lt;li&gt;Pull requests&lt;/li&gt;
&lt;li&gt;Merging&lt;/li&gt;
&lt;li&gt;Git collaboration workflows&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>git</category>
      <category>github</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Go Learning Notes - Part 8: Concurrency &amp; Goroutines</title>
      <dc:creator>Kervie Sazon</dc:creator>
      <pubDate>Thu, 05 Mar 2026 15:00:20 +0000</pubDate>
      <link>https://forem.com/kervie_sazon/go-learning-notes-part-8-concurrency-goroutines-3kpi</link>
      <guid>https://forem.com/kervie_sazon/go-learning-notes-part-8-concurrency-goroutines-3kpi</guid>
      <description>&lt;p&gt;Today I explored Concurrency in Go using Goroutines and learned how Go can perform tasks in the background while the program continues executing. In my conference booking application, I implemented a goroutine to simulate sending a ticket confirmation email without blocking the main program. &lt;/p&gt;

&lt;h2&gt;
  
  
  Concurrency in Go
&lt;/h2&gt;

&lt;p&gt;Concurrency allows a program to run multiple tasks independently. Go provides a simple way to achieve this using goroutines, which are lightweight threads managed by the Go runtime.&lt;/p&gt;

&lt;p&gt;Instead of waiting for a task to finish, Go can run it in the background. &lt;/p&gt;

&lt;h2&gt;
  
  
  Goroutines with the &lt;code&gt;go&lt;/code&gt; keyword
&lt;/h2&gt;

&lt;p&gt;A goroutine is created by adding the &lt;code&gt;go&lt;/code&gt; keyword before a function call.&lt;/p&gt;

&lt;p&gt;In my program, I run the &lt;code&gt;sendTicket&lt;/code&gt; function as a goroutine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wg.Add(1)
go sendTicket(userTicket, fName, lName, email)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows the program to continue running other code while the ticket is being "sent".&lt;/p&gt;

&lt;h2&gt;
  
  
  Simulating Work with &lt;code&gt;time.Sleep&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Inside the &lt;code&gt;sendTicket&lt;/code&gt; function, I simulate a delay to represent sending an email.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;time.Sleep(10 * time.second)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pauses the goroutines for 10 seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Formatting Strings with &lt;code&gt;fmt,Sprintf&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;I also used &lt;code&gt;fmt.Sprintf&lt;/code&gt; to format a string without immediately printing it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ticket := fmt.Sprintf("%v tickets for %v %v \n", userTickets, fName, lName)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Unlike &lt;code&gt;fmt.Printf&lt;/code&gt;, &lt;code&gt;fmt.Sprintf&lt;/code&gt; returns the formatted string, which can then be stored in a variable or used later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Synchronizing Goroutines with &lt;code&gt;WaitGroup&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;When using goroutines, the program might finish before the goroutines complete. &lt;br&gt;
To prevent this, Go provides the &lt;strong&gt;WaitGroup&lt;/strong&gt; from the &lt;code&gt;sync&lt;/code&gt; package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var wg = sync.WaitGroup{}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A WaitGroup helps the main program &lt;strong&gt;wait for all goroutines to finish&lt;/strong&gt; before exiting.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;Add()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Add()&lt;/code&gt; tells the WaitGroup how many goroutines to wait for.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wg.add(1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means the program expects &lt;strong&gt;one goroutine to finish&lt;/strong&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;Done()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Inside the goroutine, &lt;code&gt;Done()&lt;/code&gt; signals that the task is completed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wg.Done()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In my program, this is called at the of the &lt;code&gt;sendTicket&lt;/code&gt; function.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;Wait()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Wait()&lt;/code&gt; block the program until all goroutines have called &lt;code&gt;Done()&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wg.wait()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures the main program does not exit until the background task is finished. &lt;/p&gt;

&lt;h3&gt;
  
  
  Example: Sending Tickets Concurrently
&lt;/h3&gt;

&lt;p&gt;My &lt;code&gt;sendTicket&lt;/code&gt; function runs in the background and simulates sending a confirmation email.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func sendTicket(userTickets uint, fName string, lName string, email string) {
    time.Sleep(10 * time.Second)

    ticket := fmt.Sprintf("%v tickets for %v %v \n", userTickets, fName, lName)

    fmt.Println("############")
    fmt.Printf("Sending ticket: \n %v to email address %v \n", ticket, email)
    fmt.Println("############")

    wg.Done()
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This demonstrates how goroutines allow long-running tasks to execute without blocking the main application flow. &lt;/p&gt;

&lt;p&gt;In summary, I learned how Go uses goroutines to run functions concurrently using the &lt;code&gt;go&lt;/code&gt; keyword. I also learned how to simulate background tasks using &lt;code&gt;time.Sleep&lt;/code&gt; and format strings using &lt;code&gt;fmt.Sprintf&lt;/code&gt;. Another key concept I discovered was synchronizing goroutines using &lt;code&gt;WaitGroup&lt;/code&gt; from the &lt;code&gt;sync&lt;/code&gt; package. Using &lt;code&gt;Add()&lt;/code&gt;, &lt;code&gt;Done()&lt;/code&gt;, and &lt;code&gt;Wait()&lt;/code&gt; ensures that goroutines complete their execution before the program exits. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>devjournal</category>
      <category>go</category>
      <category>learning</category>
    </item>
    <item>
      <title>Go Learning Notes - Part 7: Struct</title>
      <dc:creator>Kervie Sazon</dc:creator>
      <pubDate>Wed, 04 Mar 2026 14:06:08 +0000</pubDate>
      <link>https://forem.com/kervie_sazon/go-learning-notes-part-7-structs-1mok</link>
      <guid>https://forem.com/kervie_sazon/go-learning-notes-part-7-structs-1mok</guid>
      <description>&lt;p&gt;Today I learned about Structs in Go and encountered the &lt;code&gt;type&lt;/code&gt; keyword, which allows us to create custom data types. This lesson helped me improve my booking app by replacing maps with a more structured and type-safe approach. &lt;/p&gt;

&lt;h2&gt;
  
  
  Struct
&lt;/h2&gt;

&lt;p&gt;A struct is a composite data type that groups together variables under a single name. It helps organize related data into one logical unit.&lt;/p&gt;

&lt;p&gt;In my booking app, instead of using a &lt;code&gt;map[string]string&lt;/code&gt;, I created a custom struct:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type UserData struct {
    firstName        string
    lastName         string
    email            string
    numberOfTickets  uint
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;UserData&lt;/code&gt; is a &lt;strong&gt;custom type&lt;/strong&gt; created using the &lt;code&gt;type&lt;/code&gt; keyword.&lt;/p&gt;

&lt;h2&gt;
  
  
  The &lt;code&gt;type&lt;/code&gt; Keyword
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;type&lt;/code&gt; keyword in Go allows us to define our own data types.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type UserData struct {
    ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I created a new type called &lt;code&gt;UserData&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;It has fields like &lt;code&gt;firstName&lt;/code&gt;, &lt;code&gt;lastName&lt;/code&gt;, &lt;code&gt;email&lt;/code&gt;, and &lt;code&gt;numberOfTickets&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;It behaves like a blueprint for user booking information&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes the program cleaner and more structured.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a &lt;code&gt;struct&lt;/code&gt; Instance
&lt;/h2&gt;

&lt;p&gt;Inside my &lt;code&gt;bookTicket()&lt;/code&gt; function, I create a new struct instance like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;userData := UserData{
    firstName:        fName,
    lastName:         lName,
    email:            email,
    numberOfTickets:  userTickets,
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I store it in a slice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bookings = append(bookings, userData)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now instead a slice of maps, I use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bookings = make([]UserData, 0)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is much more readable and type-safe. &lt;/p&gt;

&lt;h2&gt;
  
  
  Accessing Struct Fields
&lt;/h2&gt;

&lt;p&gt;To get all first names, I loop through the slice and access struct fields using dot(&lt;code&gt;.&lt;/code&gt;) notation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for _, booking := range bookings {
    firstNames = append(firstNames, booking.firstName)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Unlike maps, struct fields are accessed using &lt;code&gt;.&lt;/code&gt; instead of &lt;code&gt;["key"]&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;In summary, I learned how to use structs in Go to group related data into a single, organized unit. I understood that the &lt;code&gt;type&lt;/code&gt; keyword allows me to create custom data types like &lt;code&gt;UserData&lt;/code&gt;, which act as blueprints for structured information. I also learned how to create struct instances and access their fields using dot notation.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>go</category>
      <category>learning</category>
      <category>programming</category>
    </item>
    <item>
      <title>Go Learning Notes - Part 6: Maps &amp; Type Conversion (strconv)</title>
      <dc:creator>Kervie Sazon</dc:creator>
      <pubDate>Mon, 02 Mar 2026 14:16:03 +0000</pubDate>
      <link>https://forem.com/kervie_sazon/go-learning-notes-part-6-maps-2ech</link>
      <guid>https://forem.com/kervie_sazon/go-learning-notes-part-6-maps-2ech</guid>
      <description>&lt;p&gt;Today I learned about Maps in Go and how to properly handle type conversion using the &lt;code&gt;strconv&lt;/code&gt; package. &lt;/p&gt;

&lt;h2&gt;
  
  
  Maps in Go
&lt;/h2&gt;

&lt;p&gt;I improved my booking app by replacing simple slices with maps to store structured user data. &lt;/p&gt;

&lt;p&gt;Instead of storing only names like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bookings := []string{}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I now use a &lt;strong&gt;slice of maps&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;bookings := make([]maps[string]string, 0)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each user booking is stored as a map:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;userData := make([]map[string]string)
userData["firstName"] = fName
userData["lastName"] = lName
userData["email"] = email 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes the data more organized, easier to access and more scalable for real-world applications.&lt;/p&gt;

&lt;p&gt;Now I can easily access specific values like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bookings["firsName"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Type Conversion in Go (&lt;code&gt;strconv&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;In my app, &lt;code&gt;userTickets&lt;/code&gt; is a &lt;code&gt;uint&lt;/code&gt;, but maps store values as &lt;code&gt;string&lt;/code&gt;. &lt;br&gt;
So I needed to convert the number into a string before storing it. &lt;/p&gt;

&lt;p&gt;Solution: &lt;code&gt;strconv.FormatUint()&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;userData["numberOfTickets"] = strconv.FormatUint(uint64(userTickeets), 10)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What’s happening here?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;uint64(userTickets)&lt;/code&gt; - Convert &lt;code&gt;uint&lt;/code&gt; to &lt;code&gt;uint64&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;10&lt;/code&gt; - Base 10 (decimal)&lt;/li&gt;
&lt;li&gt;Returns a &lt;code&gt;string&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now the ticket number can safely be stored inside the map.&lt;/p&gt;




&lt;h3&gt;
  
  
  For Better Understanding
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Slice of Maps Declaration&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;var (
    bookings = make([]map[string]string, 0)
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Creating and Storing User Data in a Map&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;func bookTicket(userTickets uint, fName string, lName string, email string) {
    RemainingTickets = RemainingTickets - userTickets

    // create a map for a user
    userData := make(map[string]string)
    userData["firstName"] = fName
    userData["lastName"] = lName
    userData["email"] = email
    userData["numberOfTickets"] = strconv.FormatUint(uint64(userTickets), 10)

    bookings = append(bookings, userData)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Accessing Map Values Inside a Loop&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;func getFNames() []string {
    firstNames := []string{}
    for _, booking := range bookings {
        firstNames = append(firstNames, booking["firstName"])
    }
    return firstNames
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Import for Type Conversion&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;import "strconv"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This lesson made my booking application more structured and closer to real-world development.&lt;br&gt;
Using maps helped me understand how Go handles data organization, and learning strconv improved my understanding of Go’s strict type system.&lt;/p&gt;

&lt;p&gt;In summary, I learned how to use &lt;strong&gt;maps&lt;/strong&gt; in Go to store structured user data more efficiently by creating a slice of &lt;code&gt;map[string]string&lt;/code&gt;. I understood how to access specific values from a map while looping through the slice, such as retrieving all first names. I also learned that Go is strongly typed and requires explicit type conversion when working with different data types. Using &lt;code&gt;strconv.FormatUint()&lt;/code&gt; helped me convert a &lt;code&gt;uint&lt;/code&gt; value into a string so it can be stored properly inside a map.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>devjournal</category>
      <category>go</category>
      <category>learning</category>
    </item>
    <item>
      <title>Go Learning Notes - Part 5: Packages, Exported Functions &amp; Variables, &amp; Scope</title>
      <dc:creator>Kervie Sazon</dc:creator>
      <pubDate>Sun, 01 Mar 2026 15:49:56 +0000</pubDate>
      <link>https://forem.com/kervie_sazon/go-learning-notes-part-5-packages-exported-functions-variables-scope-3i5l</link>
      <guid>https://forem.com/kervie_sazon/go-learning-notes-part-5-packages-exported-functions-variables-scope-3i5l</guid>
      <description>&lt;p&gt;Today I focused on organizing Go programs using packages, exporting functions and variables, and understanding different levels of variable scope. I improved my Conference Booking App by moving input validation logic into a separate package called &lt;code&gt;helper&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here's what I do:&lt;/p&gt;

&lt;h2&gt;
  
  
  Packages in Go
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;package&lt;/strong&gt; is a way to organize Go code into reusable modules.&lt;/p&gt;

&lt;p&gt;In my app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import (
    "fmt"
    "strings"
    "booking-app/helper"
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;fmt&lt;/code&gt; and &lt;code&gt;strings&lt;/code&gt; are standard Go packages&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;helper&lt;/code&gt; is a custom package I created&lt;/li&gt;
&lt;li&gt;Packages allow me to separate concerns, like moving input validation out of &lt;code&gt;main()&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My Go module is defined as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module booking-app

go 1.26.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures the project is recognized as a Go module and allows me to import packages like &lt;code&gt;helper&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Exported Functions &amp;amp; Variables
&lt;/h2&gt;

&lt;p&gt;In Go, functions or variables are exported if their name starts with a &lt;strong&gt;capital letter&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Example from the &lt;code&gt;helper&lt;/code&gt; package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;isValidName, isValidEmail, isValidTicketNumber := helper.ValidateUserInput(fName, lName, email, userTickets, RemainingTickets)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ValidateUserInput&lt;/code&gt; is exported because it starts with a capital letter&lt;/li&gt;
&lt;li&gt;I can call it from main even though it’s in another package&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The helper package looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package helper

import "strings"

func ValidateUserInput(fName string, lName string, email string, userTickets uint, remainingTickets uint) (bool, bool, bool) {
    isValidName := len(fName) &amp;gt;= 2 &amp;amp;&amp;amp; len(lName) &amp;gt;= 2
    isValidEmail := strings.Contains(email, "@")
    isValidTicketNumber := userTickets &amp;gt; 0 &amp;amp;&amp;amp; userTickets &amp;lt;= remainingTickets
    return isValidName, isValidEmail, isValidTicketNumber
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Variables can also be exported:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var RemainingTickets uint = 50
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;RemainingTickets&lt;/code&gt; is accessible across functions because it starts with a capital letter&lt;/li&gt;
&lt;li&gt;Exporting variables allows sharing state safely between packages (but should be done carefully)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Levels of Scope in Go
&lt;/h2&gt;

&lt;p&gt;There are three main types of variable scope:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Local Scope&lt;/strong&gt; – Variables declared inside a function, only accessible in that function:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var fName string 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Package Scope&lt;/strong&gt; – Variables declared at the package level (outside any function) are accessible to all functions in the package:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var bookings = []string{}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Global / Exported Scope&lt;/strong&gt; – Variables or functions that start with a capital letter are accessible from other packages:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var RemainingTickets uint = 50
helper.ValidateUserInput(...)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Understanding scope helps control where variables are accessible and avoid accidental misuse. &lt;/p&gt;

&lt;h2&gt;
  
  
  How I Applied This Today
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Moved input validation logic to helper.ValidateUserInput() → cleaner main()&lt;/li&gt;
&lt;li&gt;Exported the function and variable so main can use them&lt;/li&gt;
&lt;li&gt;Learned how to structure Go programs into packages for better readability and maintainability&lt;/li&gt;
&lt;li&gt;Practiced using local, package, and global scope effectively in a real program&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, I learned how to organize Go programs using packages, which allows me to separate logic into reusable modules. I practiced exporting functions and variables so they can be accessed from other packages, like moving my input validation into a helper package. I also learned about the three levels of variable scope: local (inside functions), package (accessible within a package), and global/exported (accessible across packages). &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>devjournal</category>
      <category>go</category>
      <category>learning</category>
    </item>
    <item>
      <title>Linux Fundamentals - Part 16: Connecting from Mac to Ubuntu VirtualBox using SSH</title>
      <dc:creator>Kervie Sazon</dc:creator>
      <pubDate>Thu, 26 Feb 2026 15:44:59 +0000</pubDate>
      <link>https://forem.com/kervie_sazon/linux-fundamentals-part-16-connecting-from-mac-to-ubuntu-virtualbox-with-ssh-4mo</link>
      <guid>https://forem.com/kervie_sazon/linux-fundamentals-part-16-connecting-from-mac-to-ubuntu-virtualbox-with-ssh-4mo</guid>
      <description>&lt;p&gt;Today, I practiced connecting from my Mac to my Ubuntu VirtualBox using SSH. I also tested basic file and directory operations to see how commands from Mac reflect in Ubuntu. &lt;/p&gt;

&lt;p&gt;Steps I followed:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Configure VirtualBox Network&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open VirtualBox, Select Ubuntu VM, Settings, Network&lt;/li&gt;
&lt;li&gt;Change network adapter from NAT to Bridged Adapter&lt;/li&gt;
&lt;li&gt;Selected Mac Wi-Fi interface and saved changes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Install SSH Server on Ubuntu&lt;/strong&gt;&lt;br&gt;
Update package list:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Install OpenSSH server, started and enabling the service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install openssh-server
sudo systemctl start ssh
sudo systemctl enable ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Verify SSH service status&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;sudo systemctl status ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check if &lt;code&gt;running&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Ensure firewall allows SSH&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;sudo ufw allow ssh
sudo ufw status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This step is important to make sure the firewall doesn’t block incoming SSH connections.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;5. Connect from Mac using Terminal&lt;/strong&gt;&lt;br&gt;
Get the IP Address first from ubuntu setup:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Mine is &lt;code&gt;192.168.100.153&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In Mac Terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh kerviejay@192.168.100.153
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I entered my Ubuntu password and successfully accessed my Ubuntu machine remotely!&lt;/p&gt;

&lt;p&gt;Today, I have learned that SSH allows me to connect from Mac to Ubuntu VM and run commands remotely. Using a Bridged Adapter gives the VM its own IP on the same network. I learned to check my username (&lt;code&gt;whoami&lt;/code&gt;), current directory (&lt;code&gt;pwd&lt;/code&gt;), and list files (&lt;code&gt;ls&lt;/code&gt;) from SSH. Creating and removing directories and files from Mac reflects directly in Ubuntu. Ensuring the firewall allows SSH is crucial for successful connections. Making a file with a message confirms SSH connectivity, which makes practicing Linux more interesting. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>linux</category>
      <category>networking</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Go Learning Notes - Part 4: Functions, Input Validation &amp; Encapsulating Logic</title>
      <dc:creator>Kervie Sazon</dc:creator>
      <pubDate>Wed, 25 Feb 2026 16:41:33 +0000</pubDate>
      <link>https://forem.com/kervie_sazon/go-learning-notes-part-4-input-validation-function-encapsulating-logic-1738</link>
      <guid>https://forem.com/kervie_sazon/go-learning-notes-part-4-input-validation-function-encapsulating-logic-1738</guid>
      <description>&lt;p&gt;Today was a step forward in my Go journey. Instead of writing everything inside &lt;code&gt;main()&lt;/code&gt;, I refactored my Conference Booking App by separating logic into functions, validating user input properly, and organizing my code structure. &lt;/p&gt;

&lt;p&gt;Here's what I learned:&lt;/p&gt;

&lt;h2&gt;
  
  
  Encapsulating Logic with Functions
&lt;/h2&gt;

&lt;p&gt;I broke my program into smaller, focused functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;greetUser()&lt;/code&gt; - Displays conference details&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;getUserInput()&lt;/code&gt; - Collects user input&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;validateUserInput()&lt;/code&gt; - Validates the input&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;bookTicket()&lt;/code&gt; - Handles ticket booking logic&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;getFNames()&lt;/code&gt; - Extracts first names from bookings&lt;/li&gt;
&lt;/ul&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;func bookTicket(userTickets uint, fName string, lName string, email string) {
    remainingTickets = remainingTickets - userTickets
    bookings = append(bookings, fName+" "+lName)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What I Realized:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Functions make &lt;code&gt;main()&lt;/code&gt; cleaner&lt;/li&gt;
&lt;li&gt;Code becomes reusable&lt;/li&gt;
&lt;li&gt;Logic is easier to test and understand&lt;/li&gt;
&lt;li&gt;Each function has a single responsibility&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Validating User Input
&lt;/h2&gt;

&lt;p&gt;I created a validation function that returns multiple boolean values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func validateUserInput(fName string, lName string, email string, userTickets uint) (bool, bool, bool) 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;isValidName := len(fName) &amp;gt;= 2 &amp;amp;&amp;amp; len(lName) &amp;gt;= 2
isValidEmail := strings.Contains(email, "@")
isValidTicketNumber := userTickets &amp;gt; 0 &amp;amp;&amp;amp; userTickets &amp;lt;= remainingTickets
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What I Learned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Functions can return multiple values in Go&lt;/li&gt;
&lt;li&gt;Boolean expressions control decision-making&lt;/li&gt;
&lt;li&gt;Validation prevents bad input&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Using Global Variables Carefully
&lt;/h2&gt;

&lt;p&gt;I defined shared data outside &lt;code&gt;main()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var conferenceName = "Go Conference"
const conferenceTickets = 50
var remainingTickets uint = 50
var bookings = []string{}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allowed multiple functions to access shared state. &lt;/p&gt;

&lt;h2&gt;
  
  
  Clean Main Function
&lt;/h2&gt;

&lt;p&gt;Now my &lt;code&gt;main()&lt;/code&gt; function is much cleaner:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fName, lName, email, userTickets := getUserInput()
isValidName, isValidEmail, isValidTicketNumber := validateUserInput(...)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of being crowded with logic, &lt;code&gt;main()&lt;/code&gt; now:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Gets input&lt;/li&gt;
&lt;li&gt;Validates input&lt;/li&gt;
&lt;li&gt;Books tickets if valid&lt;/li&gt;
&lt;li&gt;Displays first names&lt;/li&gt;
&lt;li&gt;Stops when tickets are sold out&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This separation made the flow much easier to read.&lt;/p&gt;

&lt;h2&gt;
  
  
  Extracting First Names
&lt;/h2&gt;

&lt;p&gt;I also created:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func getFNames() []string
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Loops through the &lt;code&gt;bookings&lt;/code&gt; slice&lt;/li&gt;
&lt;li&gt;Uses &lt;code&gt;strings.Fields()&lt;/code&gt; to split names&lt;/li&gt;
&lt;li&gt;Returns only first names&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, I learned how to encapsulate logic into separate functions to make my Go program cleaner and more organized. I created dedicated functions for greeting users, collecting input, validating data, booking tickets, and extracting first names. I also learned how to return multiple boolean values from a function to validate user input properly. Structuring my code this way made main() easier to read and improved the overall flow of the program. This lesson helped me understand the importance of modular and maintainable code in real-world development. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>devjournal</category>
      <category>go</category>
      <category>learning</category>
    </item>
    <item>
      <title>Go Learning Notes - Part 3: If, Else If, Else Statements</title>
      <dc:creator>Kervie Sazon</dc:creator>
      <pubDate>Tue, 24 Feb 2026 14:18:40 +0000</pubDate>
      <link>https://forem.com/kervie_sazon/go-learning-notes-part-3-if-else-if-else-statements-56kb</link>
      <guid>https://forem.com/kervie_sazon/go-learning-notes-part-3-if-else-if-else-statements-56kb</guid>
      <description>&lt;p&gt;Today I improved my Go Conference Booking App by adding conditional logic and better loop control. Instead of allowing any booking, I now validate user input using &lt;code&gt;if&lt;/code&gt;, &lt;code&gt;else if&lt;/code&gt;, and &lt;code&gt;else&lt;/code&gt; statements.&lt;/p&gt;

&lt;p&gt;Here’s what I learned:&lt;/p&gt;

&lt;h3&gt;
  
  
  Boolean Expressions in Go
&lt;/h3&gt;

&lt;p&gt;In Go, conditions inside &lt;code&gt;if&lt;/code&gt; statements must evaluate to a boolean (&lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Example from my program:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if userTickets &amp;lt; remainingTickets
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This expression returns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;true&lt;/code&gt; - booking is allowed&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;false&lt;/code&gt; -  booking is denied&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Comparison operators I used:&lt;br&gt;
&lt;code&gt;&amp;lt;&lt;/code&gt; less than&lt;br&gt;
&lt;code&gt;==&lt;/code&gt; equal to&lt;br&gt;
&lt;code&gt;&amp;gt;&lt;/code&gt; greater than&lt;/p&gt;
&lt;h3&gt;
  
  
  If Statement (Main Booking Logic)
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if userTickets &amp;lt; remainingTickets {
    remainingTickets = remainingTickets - userTickets
    bookings = append(bookings, fName+" "+lName)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;What This Does:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Checks if enough tickets are available&lt;/li&gt;
&lt;li&gt;Deducts tickets&lt;/li&gt;
&lt;li&gt;Saves the booking&lt;/li&gt;
&lt;li&gt;Displays confirmation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This made my app smarter and prevented overbooking.&lt;/p&gt;
&lt;h3&gt;
  
  
  Else If Statement
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;else if userTickets == remainingTickets {
    // do something else
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This condition handles the case where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The user books exactly the remaining tickets
It allows handling a special edge case separately.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Else Statement (Invalid Booking)
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;else {
    fmt.Printf("We only have %v tickets, so you can't book %v tickets.\n", remainingTickets, userTickets)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This runs when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The user tries to book more tickets than available&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now my program protects against invalid input.&lt;/p&gt;
&lt;h3&gt;
  
  
  Infinite Loop with Condition-Based Exit
&lt;/h3&gt;

&lt;p&gt;The booking system runs inside:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This creates an infinite loop.&lt;/p&gt;

&lt;p&gt;But I added a stopping condition:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if remainingTickets == 0 {
    fmt.Println("Our Conference is fully booked. Come back next year!")
    break
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;break&lt;/code&gt; Statement
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;break&lt;/code&gt; keyword:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Immediately exits the loop&lt;/li&gt;
&lt;li&gt;Stops the program once tickets are sold out&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without break, the loop would continue forever.&lt;/p&gt;

&lt;p&gt;Today I learned how to use boolean expressions and if, else if, and else statements to control the flow of a Go program. I practiced validating user input and handling different booking scenarios to prevent overbooking. I also learned how to use break to stop an infinite loop when tickets are sold out. Combining conditionals with loops and slices made my program smarter and more dynamic. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>go</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Linux Fundamentals - Part 15: Server Review (Uptime &amp; Load)</title>
      <dc:creator>Kervie Sazon</dc:creator>
      <pubDate>Mon, 23 Feb 2026 14:44:18 +0000</pubDate>
      <link>https://forem.com/kervie_sazon/linux-fundamentals-part-15-server-review-uptime-load-4p36</link>
      <guid>https://forem.com/kervie_sazon/linux-fundamentals-part-15-server-review-uptime-load-4p36</guid>
      <description>&lt;p&gt;One of the fastest ways to review a server’s condition is with a single command:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  The &lt;code&gt;uptime&lt;/code&gt; Command
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;uptime&lt;/code&gt; command gives a information of a Linux system’s current state — all in one line. &lt;/p&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;21:36  up 48 mins, 2 users, load averages: 1.63 1.67 1.65
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This output tells:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Part of Output&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Current Time&lt;/td&gt;
&lt;td&gt;Local server time when the command was run&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Up time&lt;/td&gt;
&lt;td&gt;How long the server has been running since last reboot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Users count&lt;/td&gt;
&lt;td&gt;Number of logged-in users&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Load averages&lt;/td&gt;
&lt;td&gt;System load over 1, 5, and 15 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This is often the first command engineers run after SSH-ing into a server. &lt;/p&gt;

&lt;h2&gt;
  
  
  Breaking Down the Output
&lt;/h2&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;21:36  up 48 mins, 2 users, load averages: 1.63 1.67 1.65
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;21:36&lt;/code&gt; - current system time.&lt;br&gt;
&lt;code&gt;up 48mins&lt;/code&gt; - The server has been running for 48 mins.&lt;br&gt;
&lt;code&gt;2 users&lt;/code&gt; - 2 active logged in session.&lt;br&gt;
&lt;code&gt;load average: 1.63 1.67 1.65&lt;/code&gt;&lt;br&gt;
These are the load averages for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Last 1 minute&lt;/li&gt;
&lt;li&gt;Last 5 minutes&lt;/li&gt;
&lt;li&gt;Last 15 minutes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Uptime Options&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;uptime -p&lt;/code&gt; - show only the running time of the system.&lt;br&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;up 58 minutes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;uptime -s&lt;/code&gt; - shows the date/time since when the system has been running.&lt;br&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;2026-02-23 10:27:58
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;uptime -h&lt;/code&gt; - shows help and exit.&lt;br&gt;
&lt;code&gt;uptime -V&lt;/code&gt; - shows information and exit.&lt;/p&gt;
&lt;h2&gt;
  
  
  Load Average
&lt;/h2&gt;

&lt;p&gt;Load Average represents how much &lt;em&gt;work&lt;/em&gt; the system is doing.&lt;/p&gt;

&lt;p&gt;Specifically it measures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Processes currently using the CPU.&lt;/li&gt;
&lt;li&gt;Processes waiting for CPU.&lt;/li&gt;
&lt;li&gt;Processes in uninterruptible sleep (often waiting for disk I/O). &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The three values represents:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Represents&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;First&lt;/td&gt;
&lt;td&gt;Average load over 1 minute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Second&lt;/td&gt;
&lt;td&gt;Average load over 5 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Third&lt;/td&gt;
&lt;td&gt;Average load over 15 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  What does Load Average Actually Mean?
&lt;/h3&gt;

&lt;p&gt;Load average is &lt;strong&gt;not CPU percentage&lt;/strong&gt;.&lt;br&gt;
Instead, it shows how many processes are demanding CPU resources.&lt;br&gt;
&lt;strong&gt;Interpretation Rule:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Load = 0&lt;/strong&gt;; means System is idle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Load = Number of CPU cores&lt;/strong&gt;; means Fully utilized.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Load &amp;gt; CPU cores&lt;/strong&gt;; means Overloaded (processes waiting)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example Scenarios&lt;/strong&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Single-Core System
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Load &amp;gt; 1.0 = Overloaded &lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  4-Core System
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Load = 4.0 = Fully Utilized&lt;/li&gt;
&lt;li&gt;Load = 6.0 = Overloaded (2 processes waiting)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To check CPU Cores:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;CPU count matters. Load numbers alone mean nothing without context. &lt;/p&gt;

&lt;h3&gt;
  
  
  Interpreting Load in Practice
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Load Example&lt;/th&gt;
&lt;th&gt;Interpretation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;0.50, 0.40, 0.30&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Light load&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;4.00, 3.50, 2.00&lt;/code&gt; (4 cores)&lt;/td&gt;
&lt;td&gt;Fully utilized but stable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;10.00&lt;/code&gt; (4 cores)&lt;/td&gt;
&lt;td&gt;Severe overload&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;A rising 1 minute load but stable 15 minutes load?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Probably a temporary spike.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;High load but low CPU usage?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Likely I/O bottleneck (disk, network, database lock). &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is where real troubleshooting begins. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters for Platform Engineers
&lt;/h2&gt;

&lt;p&gt;Checking &lt;code&gt;uptime&lt;/code&gt; helps with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monitoring server health&lt;/li&gt;
&lt;li&gt;Detecting performance bottlenecks&lt;/li&gt;
&lt;li&gt;Identifying overload conditions&lt;/li&gt;
&lt;li&gt;Capacity planning&lt;/li&gt;
&lt;li&gt;Incident response diagnostics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When someone says: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The server is slow."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;First step is often:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;It gives immediate situational awareness.&lt;/p&gt;

&lt;p&gt;Today I learned how to use the uptime command to quickly check a Linux server’s health and status. I now understand how to interpret load average values and compare them properly against the number of CPU cores. I also learned that load average measures CPU demand, not CPU percentage, and can indicate overload or I/O bottlenecks. This lesson strengthened my foundation in server monitoring, which is essential for becoming a Platform Engineer. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>cli</category>
      <category>linux</category>
      <category>todayilearned</category>
    </item>
  </channel>
</rss>
