<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Charles Kasasira - Fullstack developer]]></title><description><![CDATA[Hi, I'm Charles. A full-stack web developer, aiming to design and developer experiences that make people's lives better.]]></description><link>https://blog.charleskasasira.com</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 23:33:11 GMT</lastBuildDate><atom:link href="https://blog.charleskasasira.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Articles & Books I (re)read [2025]]]></title><description><![CDATA[Articles

It's Hard to Forego Efficiency → https://rauchg.com/2017/its-hard-to-forego-efficiency

A Lesson on Elementary Worldly Wisdom As It Relates To Investment Management & Business - Charlie Munger https://fs.blog/great-talks/a-lesson-on-worldly...]]></description><link>https://blog.charleskasasira.com/articles-and-books-i-reread-2025</link><guid isPermaLink="true">https://blog.charleskasasira.com/articles-and-books-i-reread-2025</guid><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Wed, 31 Dec 2025 20:57:33 GMT</pubDate><content:encoded><![CDATA[<h3 id="heading-articles">Articles</h3>
<ul>
<li><p>It's Hard to Forego Efficiency → <a target="_blank" href="https://rauchg.com/2017/its-hard-to-forego-efficiency">https://rauchg.com/2017/its-hard-to-forego-efficiency</a></p>
</li>
<li><p>A Lesson on Elementary Worldly Wisdom As It Relates To Investment Management &amp; Business - Charlie Munger <a target="_blank" href="https://fs.blog/great-talks/a-lesson-on-worldly-wisdom/">https://</a><a target="_blank" href="http://fs.blog/great-talks/a-lesson-on-worldly-wisdom/">fs.blog/great-talks/a-lesson-on-worldly-wisdom/</a></p>
<ul>
<li><img src="https://www.farnamstreetblog.com/wp-content/uploads/2013/07/one-leg-man.jpg" alt="one leg man" class="image--center mx-auto" /></li>
</ul>
</li>
<li><p>A passionate detailed case for Investing in Uganda's Treasury Bonds. <a target="_blank" href="https://kakandealex.substack.com/p/a-passionate-case-for-investing-in">https://kakandealex.substack.com/p/a-passionate-case-for-investing-in</a></p>
</li>
<li><p>2025 LLM Year in Review - <a target="_blank" href="https://x.com/karpathy/status/2002118205729562949">https://x.com/karpathy/status/2002118205729562949</a></p>
</li>
<li><p>An interview with Nikola Tesla by John B.  Kennedy - <a target="_blank" href="http://www.tfcbooks.com/tesla/1926-01-30.htm">http://www.tfcbooks.com/tesla/1926-01-30.htm</a></p>
</li>
</ul>
<h3 id="heading-books">Books</h3>
<ul>
<li><p>Atomic Habits</p>
</li>
<li><p>Steel like an artist</p>
</li>
<li><p>The Algebra of Happiness</p>
</li>
<li><p>Shoe Dog A Memoir by the Creator of Nike.</p>
</li>
<li><p>The Defining Decade: Why Your Twenties Matter - And How to Make the Most of Them Now</p>
</li>
<li><p>The design of everyday things</p>
</li>
<li><p><em>Time Enough for Love -</em> Robert A. Heinlein</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Deploying a Simple HTML Page Using a Self-hosted GitLab Runner]]></title><description><![CDATA[Push to GitLab → automatically deploy index.html on your own machine.

This article walks through setting up GitLab CI/CD with a self-hosted runner to deploy a simple single-page HTML website. No Docker. No Kubernetes. Just Git, SSH, and GitLab Runne...]]></description><link>https://blog.charleskasasira.com/deploying-a-simple-html-page-using-a-self-hosted-gitlab-runner</link><guid isPermaLink="true">https://blog.charleskasasira.com/deploying-a-simple-html-page-using-a-self-hosted-gitlab-runner</guid><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Mon, 22 Dec 2025 16:04:53 GMT</pubDate><content:encoded><![CDATA[<blockquote>
<p>Push to GitLab → automatically deploy <code>index.html</code> on your own machine.</p>
</blockquote>
<p>This article walks through setting up <strong>GitLab CI/CD with a self-hosted runner</strong> to deploy a simple <strong>single-page HTML website</strong>. No Docker. No Kubernetes. Just Git, SSH, and GitLab Runner.</p>
<h3 id="heading-step-1-create-a-simple-html-page-and-create-gitlab-ciyml">Step 1: Create a Simple HTML page and create <code>.gitlab-ci.yml</code></h3>
<p>This is the only time we will need the IDE, just a simple <code>index.html</code> and <code>.gitlab-ci.yml</code>. Add the project to GitLab.</p>
<pre><code class="lang-xml"><span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"viewport"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"width=device-width, initial-scale=1.0"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Document<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Hello World<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<pre><code class="lang-yaml"><span class="hljs-attr">stages:</span>
  <span class="hljs-bullet">-</span> <span class="hljs-string">deploy</span>

<span class="hljs-attr">deploy_local:</span>
  <span class="hljs-attr">stage:</span> <span class="hljs-string">deploy</span>
  <span class="hljs-attr">tags:</span> [<span class="hljs-string">local</span>]
  <span class="hljs-attr">only:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-string">main</span>
  <span class="hljs-attr">script:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-string">echo</span> <span class="hljs-string">"Deploying on local machine"</span>
    <span class="hljs-bullet">-</span> <span class="hljs-string">cd</span> <span class="hljs-string">/var/www/html/myapp</span>
    <span class="hljs-bullet">-</span> <span class="hljs-string">git</span> <span class="hljs-string">pull</span> <span class="hljs-string">origin</span> <span class="hljs-string">main</span>
</code></pre>
<h3 id="heading-step-2-install-gitlab-runner-on-your-server">Step 2: Install GitLab Runner on Your Server</h3>
<p>On the machine where deployment should happen:</p>
<pre><code class="lang-bash">curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash

sudo apt install gitlab-runner

gitlab-runner --version
</code></pre>
<h3 id="heading-step-3-register-the-runner">Step 3: Register the Runner</h3>
<p>In your GitLab project:</p>
<ul>
<li><p><strong>Settings → CI/CD → Runners</strong></p>
</li>
<li><p>Copy the <strong>registration token</strong></p>
</li>
</ul>
<p>On the server:</p>
<pre><code class="lang-bash">sudo gitlab-runner register
</code></pre>
<p>Use:</p>
<ul>
<li><p>GitLab URL: <a target="_blank" href="https://gitlab.com"><code>https://gitlab.com</code></a></p>
</li>
<li><p>Executor: <strong>shell</strong></p>
</li>
<li><p>Tags: <code>local</code></p>
</li>
<li><p>Run untagged jobs: <strong>false</strong></p>
</li>
</ul>
<p>Confirm:</p>
<pre><code class="lang-bash">sudo gitlab-runner list
</code></pre>
<p>If jobs stay <strong>Pending</strong>, this step was missed or done without <code>sudo</code>.</p>
<h3 id="heading-step-4-prepare-the-web-directory">Step 4: Prepare the Web Directory</h3>
<p>Create the deployment directory and give ownership to the runner user:</p>
<pre><code class="lang-bash">sudo mkdir -p /var/www/html/myapp
sudo chown -R gitlab-runner:www-data /var/www/html/myapp
sudo chmod -R 775 /var/www/html/myapp
</code></pre>
<h3 id="heading-step-5-set-up-ssh-access-for-gitlab-runner">Step 5: Set Up SSH Access for <code>gitlab-runner</code></h3>
<p>The runner pulls code using Git, so it needs SSH access.</p>
<pre><code class="lang-bash">sudo -u gitlab-runner -H ssh-keygen -t ed25519 -C <span class="hljs-string">"gitlab-runner"</span> <span class="hljs-comment"># Generate SSH key</span>

sudo -u gitlab-runner -H ssh-keyscan -H gitlab.com &gt;&gt; /home/gitlab-runner/.ssh/known_hosts <span class="hljs-comment"># Add GitLab to known hosts</span>

sudo cat /home/gitlab-runner/.ssh/id_ed25519.pub <span class="hljs-comment"># Add the public key to GitLab</span>
</code></pre>
<p>Add this key in:</p>
<ul>
<li><strong>Project → Settings → Repository → Deploy Keys</strong></li>
</ul>
<p>(Deploy keys are safer than user keys.)</p>
<h3 id="heading-step-6-clone-the-repository-as-gitlab-runner">Step 6: Clone the Repository as <code>gitlab-runner</code></h3>
<p>This step is critical to avoid permission and “dubious ownership” errors.</p>
<pre><code class="lang-bash">sudo -u gitlab-runner -H bash -lc \
<span class="hljs-string">'git clone git@gitlab.com:ckasasira/gitlab-runner-test.git /var/www/html/myapp'</span>
</code></pre>
<p>Verify, You should see <code>.git/</code> owned by <code>gitlab-runner</code>.</p>
<pre><code class="lang-bash">ls -la /var/www/html/myapp
</code></pre>
<h2 id="heading-step-7-watch-it-deploy">Step 7: Watch It Deploy</h2>
<p>Make any changes to the HTML, commit and push:</p>
<pre><code class="lang-bash">git add .
git commit -m <span class="hljs-string">"Add local deployment pipeline"</span>
git push origin main
</code></pre>
<p>In GitLab:</p>
<ul>
<li><p>Go to <strong>CI/CD → Pipelines</strong></p>
</li>
<li><p>The job should move from <strong>Pending → Running → Passed</strong></p>
</li>
</ul>
<p>Refresh your browser:</p>
<pre><code class="lang-bash">http://&lt;your-server-ip&gt;/myapp/
</code></pre>
<p>You should see:</p>
<blockquote>
<p><strong>Hello World 1</strong></p>
</blockquote>
<p>Change the heading, push again, and watch it update instantly.</p>
<hr />
<h2 id="heading-common-errors-and-what-they-teach-you">Common Errors (and What They Teach You)</h2>
<ul>
<li><p><code>Job pending</code>: Runner not registered or tag mismatch.</p>
</li>
<li><p><code>Permission denied</code>: Files owned by <code>root</code>, not <code>gitlab-runner</code>.</p>
</li>
<li><p><code>detected dubious ownership</code>: Repo created with <code>sudo git init</code>.<br />  Fix by re-cloning as <code>gitlab-runner</code>.</p>
</li>
<li><p><code>Permission denied (publickey)</code>: Missing SSH deploy key.</p>
</li>
</ul>
<h2 id="heading-final-thoughts">Final Thoughts</h2>
<p>CI/CD doesn’t start with Kubernetes.<br />It starts with <strong>one file, one push, one automated deployment</strong>.</p>
<p>Once you understand this flow, everything else (Docker, cloud runners, pipelines) makes sense.</p>
<p>If you’re learning DevOps: <strong>this is the right place to start.</strong></p>
<p>If you want, I can:</p>
<ul>
<li><p>Rewrite this for <a target="_blank" href="http://Dev.to"><strong>Dev.to</strong></a> <strong>/ Medium tone</strong></p>
</li>
<li><p>Add <strong>architecture diagrams</strong></p>
</li>
<li><p>Add <strong>rollback support</strong></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[What is GitHub and Why use it.]]></title><description><![CDATA[As a software developer, it is crucial to have a way to keep your code together or even a backup, and today we will be talking about GitHub, what it is, and when to use it.
Good to have

A basic understanding of git.

A GitHub account. If you do not ...]]></description><link>https://blog.charleskasasira.com/what-is-github-and-why-use-it</link><guid isPermaLink="true">https://blog.charleskasasira.com/what-is-github-and-why-use-it</guid><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Wed, 05 Jul 2023 00:21:35 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1649422267283/D36ZBy1Xv.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As a software developer, it is crucial to have a way to keep your code together or even a backup, and today we will be talking about GitHub, what it is, and when to use it.</p>
<p>Good to have</p>
<ul>
<li><p>A basic understanding of <a target="_blank" href="https://git-scm.com/about">git</a>.</p>
</li>
<li><p>A GitHub account. If you do not have one, you can simply signup here <a target="_blank" href="https://github.com">https://github.com</a></p>
</li>
</ul>
<h3 id="heading-so-what-is-it">So, what is it?</h3>
<blockquote>
<p>GitHub is a hosting service for Git repositories based on a distributed version control system. It's an online database that allows you to keep track of and share your Git version control projects outside of your local computer/server. Unlike Git, GitHub is exclusively cloud-based.</p>
</blockquote>
<p>Before we dive in, let's clear up a common misconception: Git isn't the same thing as GitHub.</p>
<p><strong>Git</strong> is a version-control system (i.e., a piece of software) that helps you keep track of your computer programs and files and the changes that are made to them over time. It also allows you to collaborate with your peers on a program, code, or file.</p>
<p>while</p>
<p><strong>GitHub</strong> and similar services (including GitLab and BitBucket) are websites that host a Git server program to hold your code.</p>
<p>Github Alternatives</p>
<ul>
<li><p>GitLab</p>
</li>
<li><p>GitBucket</p>
</li>
<li><p>BitBucket</p>
</li>
<li><p>Gitea</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Does sort(), Ever sort anything]]></title><description><![CDATA[When sorting an array, if you are like me the first thing that comes to mind is sort().
An hour before writing this, I was having a great Sunday and decided to do some of the easy katas in codewars. One of the questions I found required me to add one...]]></description><link>https://blog.charleskasasira.com/does-sort-ever-sort-anything</link><guid isPermaLink="true">https://blog.charleskasasira.com/does-sort-ever-sort-anything</guid><category><![CDATA[sorting]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[array methods]]></category><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Sun, 26 Mar 2023 14:39:46 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1679841159268/4a927718-fba3-42cd-91db-957a866eaf1b.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When sorting an array, if you are like me the first thing that comes to mind is <code>sort()</code>.</p>
<p>An hour before writing this, I was having a great Sunday and decided to do some of the easy katas in <a target="_blank" href="http://codewars.com">codewars</a>. One of the questions I found required me to add one line of code to sort an integer array, easy right?</p>
<p><img src="https://media.giphy.com/media/3o7btNa0RUYa5E7iiQ/giphy.gif" alt class="image--center mx-auto" /></p>
<p>The <code>sort()</code> method sorts the elements of an array in place and returns the sorted array. By default, the <code>sort()</code> method sorts the elements in ascending order according to the <strong><mark>Unicode values</mark></strong> of the elements.</p>
<pre><code class="lang-javascript"><span class="hljs-comment">// input: [1, 2, 3, 10, 5]</span>
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">sortArr</span>(<span class="hljs-params">input</span>) </span>{
 <span class="hljs-keyword">return</span> input.sort()
}

<span class="hljs-comment">// output: [1, 10, 2, 3, 5]</span>
<span class="hljs-comment">// 😡 expect output: [1, 2, 3, 5, 10]</span>
</code></pre>
<p>So this got me 😡 but then if we are to go back and re-read how the sort method works, it by default sorts the elements in ascending order according to the Unicode values of the elements with <mark>Unicode values</mark> being highlighted.</p>
<p>So what is happening here:</p>
<p>The <code>sort()</code> method converts the numbers to strings and sorts them lexicographically (dictionary order) based on their string representations.</p>
<p>The Unicode code points for the characters "10" and "2" are:</p>
<ul>
<li><p>"1": U+0031</p>
</li>
<li><p>"0": U+0030</p>
</li>
<li><p>"2": U+0032</p>
</li>
</ul>
<p>In the string "10", the character "1" has a lower Unicode code point than the character "2", which means that in lexicographic order, "10" comes before "2". This is why the <code>sort()</code> method sorts the array <code>[1,2,3,10,5]</code> as <code>[1,10,2,3,5]</code>.</p>
<p>But we are not doomed,</p>
<p><img src="https://media.giphy.com/media/8JQOSC9rq8StxyzKz6/giphy.gif" alt class="image--center mx-auto" /></p>
<p>that's how <code>sort()</code> works by default, but you can provide a function to the <code>sort()</code> <em>(I guess that would make it the sorting function)</em> to specify a custom sort order. so to sort elements in ascending order by their numerical values add this function.</p>
<pre><code class="lang-javascript"><span class="hljs-comment">// input: [1, 2, 3, 10, 5]</span>
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">sortArr</span>(<span class="hljs-params">input</span>) </span>{
 <span class="hljs-keyword">return</span> input.sort(<span class="hljs-function">(<span class="hljs-params">a,b</span>) =&gt;</span> a - b)
}

<span class="hljs-comment">//😃 output: [1, 2, 3, 5, 10]</span>
</code></pre>
<p>In this example, the sorting function <code>(a, b) =&gt; a - b</code> subtracts <code>b</code> from <code>a</code>, so if <code>a</code> is less than <code>b</code>, the result is negative and <code>a</code> is sorted before <code>b</code>. If <code>a</code> is greater than <code>b</code>, the result is positive and <code>b</code> is sorted before <code>a</code>. If <code>a</code> and <code>b</code> are equal, the result is 0 and their order in the sorted array is unchanged.</p>
<p>You are sorted now, take that, elements :)</p>
]]></content:encoded></item><item><title><![CDATA[How to create a simple modal/popup with reactjs and tailwindcss]]></title><description><![CDATA[What we will build
Hello Hope all is well, in this article I share on how to create a simple popup or modal component in reactjs using the useState hook. for the styles I will be using tailwindcss.
Your can checkout the video version for more details...]]></description><link>https://blog.charleskasasira.com/how-to-create-a-simple-modalpopup-with-reactjs-and-tailwindcss</link><guid isPermaLink="true">https://blog.charleskasasira.com/how-to-create-a-simple-modalpopup-with-reactjs-and-tailwindcss</guid><category><![CDATA[modal]]></category><category><![CDATA[React]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Fri, 16 Sep 2022 16:08:44 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1663328999558/aO3n3tTPI.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-what-we-will-build">What we will build</h3>
<p>Hello Hope all is well, in this article I share on how to create a simple popup or modal component in reactjs using the useState hook. for the styles I will be using tailwindcss.</p>
<p>Your can checkout the video version for more details.</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.youtube.com/watch?v=nxHS0lRBziQ">https://www.youtube.com/watch?v=nxHS0lRBziQ</a></div>
<h3 id="heading-create-react-app">Create React App</h3>
<p>First we will create our app with create-react-app, that's assuming you already have nodejs installed.</p>
<pre><code>npx create<span class="hljs-operator">-</span>react<span class="hljs-operator">-</span>app react<span class="hljs-operator">-</span>modal
</code></pre><h3 id="heading-adding-tailwindcss-to-a-react-js-project">Adding Tailwindcss to a react js project</h3>
<p>To install tailwindcss in reactjs is very easy. you will only need this few commands
first make sure you are in the project folder that is you should be able to see the node modules folder and other folders plus files. then just copy and paste these commands</p>
<pre><code>npm install <span class="hljs-operator">-</span>D tailwindcss postcss autoprefixer
npx tailwindcss init <span class="hljs-operator">-</span>p
</code></pre><p>Then update the <code>tailwind.config.js</code> file, this should be in the root of your project, that is next the package.json file.</p>
<pre><code>/** @<span class="hljs-keyword">type</span> {import('tailwindcss').<span class="hljs-type">Config</span>} */
<span class="hljs-title">module</span>.exports = {
  content: [
    <span class="hljs-string">"./src/**/*.{js,jsx,ts,tsx}"</span>,
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}
</code></pre><p>Then next, add these Add the Tailwind directives to your <code>index.css</code> file.</p>
<pre><code><span class="hljs-variable">@tailwind</span> base;
<span class="hljs-variable">@tailwind</span> components;
<span class="hljs-variable">@tailwind</span> utilities;
</code></pre><p>Tailwindcss is configured</p>
<h3 id="heading-installing-react-icons">Installing React-icons</h3>
<pre><code>  <span class="hljs-built_in">npm</span> install react-icons
</code></pre><p>This package will help us use the different icons, for this component, we shall use one in particular, the (IoWarning) icon, you can checkout <a target="_blank" href="react-icons.github.io/react-icons">React-icons</a> for all the available icons.</p>
<h3 id="heading-creating-modal-using-usestate-hook">Creating Modal using useState Hook</h3>
<p>In the <code>App.js</code> file, we setup the button which will trigger our model.</p>
<pre><code class="lang-jsx"><span class="hljs-keyword">import</span> { useState } <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>
<span class="hljs-keyword">import</span> Modal <span class="hljs-keyword">from</span> <span class="hljs-string">'./Modal'</span>

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">App</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> [popUp, setPopUp] = useState(<span class="hljs-literal">false</span>)

  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'p-20'</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'flex gap-8 items-center mb-10'</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'bg-gray-700 text-white w-16 h-16 rounded-full flex items-center justify-center'</span>&gt;</span>
          CK
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'flex flex-col justify-center'</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'font-bold text-3xl'</span>&gt;</span>Charles Kasasira<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'text-gray-700'</span>&gt;</span>Web developer<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'outline outline-1 px-3 py-2 hover:bg-black hover:text-white'</span>
      <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span> setPopUp(true)}
      &gt;Open Modal<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
      {popUp &amp;&amp; <span class="hljs-tag">&lt;<span class="hljs-name">Modal</span> <span class="hljs-attr">setPopUp</span>=<span class="hljs-string">{setPopUp}</span> /&gt;</span>}
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
  );
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> App;
</code></pre>
<p>Modal Component
This is our model component, you can watch more of the explanation on my youtube channel https://youtube.com/charleskasasira</p>
<pre><code class="lang-jsx"><span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>
<span class="hljs-keyword">import</span> { IoWarning} <span class="hljs-keyword">from</span> <span class="hljs-string">'react-icons/io5'</span>

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Modal</span>(<span class="hljs-params">{setPopUp}</span>) </span>{
  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'w-screen h-screen bg-black bg-opacity-30 fixed top-0 right-0 flex justify-center items-center'</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'bg-white p-10 rounded-md shadow-md'</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'font-bold text-center text-lg my-5'</span>&gt;</span>Delete User<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>
          Are you sure you want to delete <span class="hljs-tag">&lt;<span class="hljs-name">b</span>&gt;</span>Charle Kasasira<span class="hljs-tag">&lt;/<span class="hljs-name">b</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'bg-[#ffe9d9] p-2 border-l-2 border-[#fa703f] text-[#bc4c2e] flex flex-col text-sm my-1'</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'text-[#771505] font-bold flex items-center gap-1'</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">IoWarning</span> /&gt;</span>
              Warning
            <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
            By Deleting this account, you won't be able to access the system.
          <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'flex justify-between mt-5'</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'outline outline-1 outline-[#101f20] bg-[#101f20] text-white py-2 px-4 hover:bg-transparent hover:text-black'</span>
          <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span> setPopUp(false)}
          &gt;No, Cancel<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">className</span>=<span class="hljs-string">'outline outline-1 outline-[#101f20] hover:bg-[#101f20] hover:text-white py-2 px-4 bg-transparent text-black'</span>
          <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span> console.log("Please like and subscribe")}
          &gt;Yes, Delete<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
  )
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Modal
</code></pre>
<p>And that's it. hope this was helpful.</p>
]]></content:encoded></item><item><title><![CDATA[CSS Art: Instagram Logo with pure CSS]]></title><description><![CDATA[In this (mostly code, "little plain text") post, I show you how I created an Instagram logo using CSS only. You can find the full source code here: CodePen
https://www.youtube.com/watch?v=wKQX3yHEj94&list=PL5R42MN8NiQQbGWhs2_8sRYWMLweM7Dhx
 
First, t...]]></description><link>https://blog.charleskasasira.com/css-art-instagram-logo-with-pure-css</link><guid isPermaLink="true">https://blog.charleskasasira.com/css-art-instagram-logo-with-pure-css</guid><category><![CDATA[CSS]]></category><category><![CDATA[CSS3]]></category><category><![CDATA[css speed]]></category><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Sat, 21 May 2022 10:56:15 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1653124818659/tdoEHVZgt.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this (mostly code, "little plain text") post, I show you how I created an Instagram logo using CSS only. You can find the full source code here: <a target="_blank" href="https://codepen.io/Charles-Kasasira/pen/VwQmNvO?editors=0100">CodePen</a></p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.youtube.com/watch?v=wKQX3yHEj94&amp;list=PL5R42MN8NiQQbGWhs2_8sRYWMLweM7Dhx">https://www.youtube.com/watch?v=wKQX3yHEj94&amp;list=PL5R42MN8NiQQbGWhs2_8sRYWMLweM7Dhx</a></div>
<p> </p>
<h3 id="heading-first-the-structure-of-the-logo-this-is-the-html-part">First, the structure of the logo, (this is the HTML part).</h3>
<p>The Instagram logo we are working on today is a gradient background and a rounded square with two circles, one in the center and the other in the top right to represent sort of a camera.</p>
<p>So to structure this, we will create a container class for our background containing an Instagram class that contains two classes circle and ball.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1653129249132/WI1wajvVV.png" alt="explain-instagram-logo.png" /></p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"container flex"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"instagram flex"</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"circle"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"ball"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<h4 id="heading-positioning-and-style-css">Positioning and Style - CSS</h4>
<p>We will first style our <code>body</code> to remove the presets on the margin and padding and then center the contents.</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">body</span> {
  <span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span>;
  <span class="hljs-attribute">padding</span>: <span class="hljs-number">0</span>;
  <span class="hljs-attribute">box-sizing</span>: border-box;
  <span class="hljs-attribute">width</span>: <span class="hljs-number">100vw</span>;
  <span class="hljs-attribute">height</span>: <span class="hljs-number">100vh</span>;
  <span class="hljs-attribute">display</span>: flex;
  <span class="hljs-attribute">justify-content</span>: center;
  <span class="hljs-attribute">align-items</span>: center;
  <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#fff</span>;
}
</code></pre>
<h4 id="heading-container-class">container class</h4>
<p>Then we will work on the <code>container</code> which will have the linear gradient as its background, plus the <code>flex</code> class which is shared by the container and Instagram classes in HTML. I have also added a animation <code>zoom</code> which I will work on last.</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.container</span> {
  <span class="hljs-attribute">padding</span>: <span class="hljs-number">15px</span>;
  <span class="hljs-attribute">background</span>: <span class="hljs-built_in">linear-gradient</span>(<span class="hljs-number">225deg</span>, #<span class="hljs-number">7</span>f37be, #ea041e <span class="hljs-number">70%</span>, #f6c900);
  <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">20px</span>;
  <span class="hljs-attribute">box-shadow</span>: -<span class="hljs-number">3px</span> <span class="hljs-number">3px</span> <span class="hljs-number">10px</span> <span class="hljs-built_in">rgba</span>(<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0.3</span>);
  <span class="hljs-attribute">animation</span>: zoom .<span class="hljs-number">2s</span>;
}

<span class="hljs-selector-class">.flex</span> {
  <span class="hljs-attribute">display</span>: flex;
  <span class="hljs-attribute">justify-content</span>: center;
  <span class="hljs-attribute">align-items</span>: center;
}
</code></pre>
<h4 id="heading-instagram-class">instagram class</h4>
<p>The Instagram class is a rounded square so we will give it a border of 5px plus a medium border-radius, I went with 20px. then notice that I give it a position of relative, this is to help when positioning the <code>ball</code>.</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.instagram</span> {
  <span class="hljs-attribute">position</span>: relative;
  <span class="hljs-attribute">border</span>: <span class="hljs-number">5px</span> solid <span class="hljs-number">#fff</span>;
  <span class="hljs-attribute">padding</span>: <span class="hljs-number">20px</span>;
  <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">20px</span>;
}
</code></pre>
<h4 id="heading-circle-class">circle class</h4>
<pre><code class="lang-css"><span class="hljs-selector-class">.circle</span> {
  <span class="hljs-attribute">padding</span>: <span class="hljs-number">20px</span>;
  <span class="hljs-attribute">border</span>: <span class="hljs-number">5px</span> solid <span class="hljs-number">#fff</span>;
  <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">50%</span>;
}
</code></pre>
<h4 id="heading-ball-class">ball class</h4>
<pre><code class="lang-css"><span class="hljs-selector-class">.ball</span> {
  <span class="hljs-attribute">position</span>: absolute;
  <span class="hljs-attribute">width</span>: <span class="hljs-number">15px</span>;
  <span class="hljs-attribute">height</span>: <span class="hljs-number">15px</span>;
  <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#fff</span>;
  <span class="hljs-attribute">top</span>: <span class="hljs-number">10px</span>;
  <span class="hljs-attribute">left</span>: <span class="hljs-number">70px</span>;
  <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">50%</span>;
}
</code></pre>
<p>Finally, let's give our logo a little zoom animation at the start.</p>
<pre><code class="lang-javascript">@keyframes zoom  {
  <span class="hljs-number">0</span>% {
    <span class="hljs-attr">transform</span>: scale(<span class="hljs-number">0</span>);
  }
  <span class="hljs-number">80</span>% {
    <span class="hljs-attr">transform</span>: scale(<span class="hljs-number">1.75</span>);
  }
  <span class="hljs-number">100</span>% {
    <span class="hljs-attr">transform</span>: scale(<span class="hljs-number">1</span>);
  }
}
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Cheat sheet: Arrays in JavaScript]]></title><description><![CDATA[JavaScript Arrays are a very flexible data structure and are used as lists, stacks, queues, etc. Every value in an array is associated with a numeric index starting with 0. Here is everything you need to get started with arrays
Using Arrays
How to cr...]]></description><link>https://blog.charleskasasira.com/cheat-sheet-arrays-in-javascript</link><guid isPermaLink="true">https://blog.charleskasasira.com/cheat-sheet-arrays-in-javascript</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[array methods]]></category><category><![CDATA[array]]></category><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Sat, 22 Jan 2022 13:57:59 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1649419834262/6U-DEQyOs.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>JavaScript Arrays are a very flexible data structure and are used as lists, stacks, queues, etc. Every value in an array is associated with a numeric index starting with 0. Here is everything you need to get started with arrays</p>
<h2 id="heading-using-arrays">Using Arrays</h2>
<p>How to create an array.</p>
<pre><code class="lang-js"><span class="hljs-comment">//1. using array literals</span>
<span class="hljs-keyword">const</span> arrayName = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>]

<span class="hljs-comment">//2. Using array constructor</span>
<span class="hljs-keyword">const</span> arrayName = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Array</span>.from(<span class="hljs-string">"foo"</span>)
</code></pre>
<p>How to read from an array</p>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> arrayName = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>]

<span class="hljs-comment">//1. Using array indices</span>
arrayName[<span class="hljs-number">0</span>] <span class="hljs-comment">// this returns a value at index 0 of the array.</span>
<span class="hljs-built_in">console</span>.log(arrayName[<span class="hljs-number">0</span>]) <span class="hljs-comment">// Output: 1</span>

<span class="hljs-comment">//2. Using the at() method</span>
<span class="hljs-built_in">console</span>.log(arrayName.at(<span class="hljs-number">-1</span>)) <span class="hljs-comment">// Output: 4</span>
</code></pre>
<p><em>When reading from an array using indices, negative indices don’t work while when using the at() method, you can use a negative or positive index.</em></p>
<p>How to update an array</p>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> arrayName = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>];
arrayName[<span class="hljs-number">0</span>] = <span class="hljs-number">9</span>; <span class="hljs-comment">// this will change the value at index one to 9</span>
<span class="hljs-built_in">console</span>.log(arrayName); <span class="hljs-comment">// Output: [9, 2, 3, 4]</span>
</code></pre>
<p>How to determine the length of an array</p>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> arrayName = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>];
<span class="hljs-comment">// use the length method</span>
<span class="hljs-built_in">console</span>.log(arrayName.length); <span class="hljs-comment">//Output: 4</span>
</code></pre>
<p>How to write to an array (adding elements)</p>
<pre><code class="lang-js"><span class="hljs-comment">// add an element to the end of the array</span>
arrayName.push(<span class="hljs-number">4</span>);

<span class="hljs-comment">// alternatively, you could add an element at indices of the length of the array.</span>
arrayName[arrayName.length] = <span class="hljs-number">4</span>;

<span class="hljs-comment">// add element(s) to the beginning of the array</span>
arrayName.unshift(element);
</code></pre>
<p>How to remove an element from an Array</p>
<pre><code class="lang-js"><span class="hljs-comment">// remove the last element</span>
arrayName.pop();

<span class="hljs-comment">// leaves only elements at a specified length of an array</span>
arrayName.length = <span class="hljs-number">1</span>;

<span class="hljs-comment">// to remove all elements</span>
arrayName.length = <span class="hljs-number">0</span>;

<span class="hljs-comment">// removes an element at index 0</span>
arrayName.shift();
</code></pre>
<p>How to concatenate arrays</p>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> arr1 = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>]
<span class="hljs-keyword">const</span> arr2 = [<span class="hljs-number">4</span>, <span class="hljs-number">5</span>, <span class="hljs-number">6</span>]

<span class="hljs-comment">// using the spread operator</span>
<span class="hljs-keyword">const</span> arr3 = […arr1, …arr2]
<span class="hljs-built_in">console</span>.log(arr3) <span class="hljs-comment">// Output: [1, 2, 3, 4, 5, 6]</span>

<span class="hljs-comment">// using the concat() method</span>
<span class="hljs-keyword">const</span> arr3 = arr1.concat(arr2)
<span class="hljs-built_in">console</span>.log(arr3) <span class="hljs-comment">// Output: [1, 2, 3, 4, 5, 6]</span>
</code></pre>
<h2 id="heading-array-methods">Array methods</h2>
<p>slice()</p>
<pre><code class="lang-repl">&gt; ['■','●','▲'].slice(1, 3)
['●','▲']
</code></pre>
<p>filter()</p>
<pre><code class="lang-repl">&gt; ['■','●','■'].filter(x =&gt; x==='■')
['■','■']
</code></pre>
<p>map()</p>
<pre><code class="lang-repl">&gt; ['▲','●'].map(x =&gt; x+x)
&gt; ['▲▲','●●']
</code></pre>
<p>flatMap()</p>
<pre><code class="lang-repl">&gt; ['▲','●'].flatMap(x =&gt; [x,x])
&gt; ['▲','▲','●','●']
</code></pre>
<p>splice()</p>
<pre><code class="lang-repl">&gt; ['■','●','▲'].some(x =&gt; x==='●')
&gt; true
</code></pre>
<p>some()</p>
<pre><code class="lang-repl">&gt; ['■','●','▲'].every(x =&gt; x==='●')
true
</code></pre>
<p>every()</p>
<pre><code class="lang-repl">&gt; ['■','●','▲'].every(x =&gt; x==='●')
false
</code></pre>
<p>join()</p>
<pre><code><span class="hljs-operator">&gt;</span> [<span class="hljs-string">'■'</span>,<span class="hljs-string">'●'</span>,<span class="hljs-string">'▲'</span>].join(<span class="hljs-string">'-'</span>)
<span class="hljs-string">'■-●-▲'</span>
</code></pre><p>reduce()</p>
<pre><code class="lang-repl">&gt; ['■','●'].reduce((result,x) =&gt; result+x, '▲')
'▲■●'
</code></pre>
<p>reduceRight()</p>
<pre><code class="lang-repl">&gt; ['■','●'].reduceRight((result,x) =&gt; result+x, '▲')
'▲●■'
</code></pre>
<p>fill()</p>
<pre><code class="lang-repl">&gt; ['■','●','▲'].fill('●')
['●','●','●']
</code></pre>
<p>sort()</p>
<pre><code class="lang-repl">&gt; ['■','●','■'].sort()
['■','■','●']
</code></pre>
<p>reverse()</p>
<pre><code class="lang-repl">&gt; ['■','●','▲'].reverse()
['▲','●','■']
</code></pre>
<p>includes()</p>
<pre><code class="lang-repl">&gt; ['■','●','■'].includes('■')
true
</code></pre>
<p>indexOf()</p>
<pre><code class="lang-repl">&gt; ['■','●','■'].indexOf('■')
0
</code></pre>
<p>lastIndexOf()</p>
<pre><code class="lang-repl">&gt; ['■','●','■'].lastIndexOf('■')
2
</code></pre>
<p>find()</p>
<pre><code class="lang-repl">&gt; ['■','●','■'].find(x =&gt; x==='■')
'■'
</code></pre>
<p>findIndex()</p>
<pre><code class="lang-repl">&gt; ['■','●','■'].findIndex(x =&gt; x==='■')
0
</code></pre>
<p>Hope you found this helpful.</p>
]]></content:encoded></item><item><title><![CDATA[HOW TO: Click outside to close in Javascript]]></title><description><![CDATA[Hey, Charles Kasasira here, time to time, I write 2-minutes packaged articles on how to do some cool stuff in web development, and in this short "Do It Yourself", I would like to show you how you too can write a short piece of code using HTML, CSS an...]]></description><link>https://blog.charleskasasira.com/how-to-click-outside-to-close-in-javascript</link><guid isPermaLink="true">https://blog.charleskasasira.com/how-to-click-outside-to-close-in-javascript</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[HTML5]]></category><category><![CDATA[CSS]]></category><category><![CDATA[click outside to close]]></category><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Tue, 18 Jan 2022 06:10:40 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1663828744471/VbTZZIBF2.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hey, Charles Kasasira here, time to time, I write 2-minutes packaged articles on <em>how to</em> do some cool stuff in web development, and in this short "Do It Yourself", I would like to show you how you too can write a short piece of code using HTML, CSS and vanilla javascript to close a modal or any context by clicking outside, just like twitter's context menu.</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.youtube.com/watch?v=5G3usm0LXWw&amp;t=169s">https://www.youtube.com/watch?v=5G3usm0LXWw&amp;t=169s</a></div>
<p>This might be important in some instances, like</p>
<ul>
<li>When you have to implement your own modal.</li>
<li>When implementing context menus like twitter's context menu.</li>
<li>It's good UX, that you can click-to-open something, and then not only be able to click that same thing to close it, but click outside to close as well.</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1642485414278/ACl9ia5jo.gif" alt="clickOutside.gif" /></p>
<h3 id="heading-html-the-structure">HTML: the structure.</h3>
<pre><code class="lang-html">    <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">onclick</span>=<span class="hljs-string">"toggleMenu()"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"btn"</span>&gt;</span>
        Click to Show
    <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"menu"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"menu-item"</span>&gt;</span>Edit<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"menu-item"</span>&gt;</span>Delete<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"menu-item"</span>&gt;</span>Close<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span> 
    <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
</code></pre>
<p>For the skeleton of the project, all I needed was a button that will toggle our dropdown on and off, plus an unordered list which will be our dropdown menu.</p>
<h3 id="heading-css-the-style">CSS: the style</h3>
<pre><code class="lang-CSS"><span class="hljs-selector-class">.btn</span>{
    <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#147</span>;
    <span class="hljs-attribute">color</span>: <span class="hljs-number">#fff</span>;
    <span class="hljs-attribute">border</span>: none;
    <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">5px</span>;
    <span class="hljs-attribute">padding</span>: <span class="hljs-number">10px</span> <span class="hljs-number">49px</span>;
    <span class="hljs-attribute">font-weight</span>: <span class="hljs-number">500</span>;
    <span class="hljs-attribute">cursor</span>: pointer;
}

<span class="hljs-selector-class">.btn</span><span class="hljs-selector-pseudo">:hover</span>{
    <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#148</span>;
}

<span class="hljs-selector-id">#menu</span>{
    <span class="hljs-attribute">display</span>: none;
    <span class="hljs-attribute">position</span>: absolute;
    <span class="hljs-attribute">z-index</span>: <span class="hljs-number">1000</span>;
    <span class="hljs-attribute">min-width</span>: <span class="hljs-number">10rem</span>;
    <span class="hljs-attribute">padding</span>: .<span class="hljs-number">5rem</span> <span class="hljs-number">0</span>;
    <span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span>;
    <span class="hljs-attribute">font-size</span>: <span class="hljs-number">1rem</span>;
    <span class="hljs-attribute">color</span>: <span class="hljs-number">#212529</span>;
    <span class="hljs-attribute">text-align</span>: left;
    <span class="hljs-attribute">list-style</span>: none;
    <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#fff</span>;
    <span class="hljs-attribute">background-clip</span>: padding-box;
    <span class="hljs-attribute">border</span>: <span class="hljs-number">1px</span> solid <span class="hljs-built_in">rgba</span>(<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,.<span class="hljs-number">15</span>);
    <span class="hljs-attribute">border-radius</span>: .<span class="hljs-number">25rem</span>;
}

<span class="hljs-selector-id">#menu</span><span class="hljs-selector-class">.show</span> {
    <span class="hljs-attribute">display</span>: block;
}

<span class="hljs-selector-class">.menu-item</span>{
    <span class="hljs-attribute">padding</span>: <span class="hljs-number">8px</span> <span class="hljs-number">20px</span>;
    <span class="hljs-attribute">cursor</span>: pointer;
}
</code></pre>
<p>Went with close to the minimum styles to design the button and #myDropdown for the unordered list which starts with the display as none but is toggled with a show class setting the display to block with an event using javascript, for the behavior. !Important, You need to give the dropdown menu a position of absolute and z-index greater than 1 to appear to the top of other content if there is any.</p>
<h3 id="heading-js-the-behavior">JS: the behavior</h3>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> menu = <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">"menu"</span>);

<span class="hljs-keyword">const</span> toggleMenu = <span class="hljs-function">() =&gt;</span> menu.classList.toggle(<span class="hljs-string">"show"</span>);

<span class="hljs-built_in">window</span>.onclick = <span class="hljs-function">(<span class="hljs-params">event</span>) =&gt;</span> {
    <span class="hljs-keyword">if</span> (!event.target.matches(<span class="hljs-string">'.btn'</span>)) {
        <span class="hljs-keyword">if</span>(menu.classList.contains(<span class="hljs-string">'show'</span>)){
            menu.classList.remove(<span class="hljs-string">'show'</span>)
        }
    }
}

menu.addEventListener(<span class="hljs-string">'click'</span>, <span class="hljs-function">(<span class="hljs-params">event</span>) =&gt;</span> event.stopPropagation());
</code></pre>
<p>Lastly, with javascript. I first defined the menu id, then on the toggleMenu() method which I call on click of the button, I toggle, (add or remove) the show class from the menu.</p>
<p>I am using arrow functions here, if you are not used to them, you could use the function declaration or read something about them. And that's it, as always you can have more fun of course with more css for fancy styling plus adding an animation.</p>
<p>Full Source Code: <a target="_blank" href="https://github.com/CharlesKasasira/Articles-Code/tree/master/how-to-click-outside-to-close-in-javascript">Github</a></p>
<p>What could I learn from this small feature?. Small as it is, I got to refresh my knowledge of the event.stopPropagation() method. <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation">MDN</a> - The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.</p>
<blockquote>
<p>USE YOUR CODE FOR GOOD. -beau</p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[HOW TO: Create a dynamic avatar from the user's initials pure Javascript.]]></title><description><![CDATA[Hey, am Charles Kassira and in this short "Do It Yourself", I would like to show you how to write a short piece of code using HTML, CSS, and vanilla javascript to create dynamic avatars from the user’s initials. Which you can see commonly used on pla...]]></description><link>https://blog.charleskasasira.com/how-to-create-a-dynamic-avatar-from-the-users-initials-pure-javascript</link><guid isPermaLink="true">https://blog.charleskasasira.com/how-to-create-a-dynamic-avatar-from-the-users-initials-pure-javascript</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[CSS]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Thu, 13 Jan 2022 06:29:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1642054548685/Ek0kEz7bv.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hey, am Charles Kassira and in this short "Do It Yourself", I would like to show you how to write a short piece of code using HTML, CSS, and vanilla javascript to create dynamic avatars from the user’s initials. Which you can see commonly used on platforms like Trello, Gmail before a user uploads an avatar. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1642054548685/Ek0kEz7bv.png" alt="dyamic avatar.png" /></p>
<h3 id="heading-why-did-i-want-to-solve-it">Why did I want to solve it</h3>
<p>During a project I was lucky to work on, I was tasked to create this small feature, a dynamic avatar because the users on this particular system didn’t usually update their profile picture, so I had to create one from the initials of their display names, (the female and male avatar placeholders are not fun anymore) hence this post.</p>
<p>Since I was using react js for the project, I wrote the original component in react js but I figured that since it’s relatively a few lines of code, I would write it in vanilla javascript for those that are anti-react plus if you can do it in vanilla, you definitely can do it in any js library or framework.</p>
<h3 id="heading-html-the-structure">HTML: the structure</h3>
<p>In the HTML file, I only created a div with an id of avatar and that's all.</p>
<pre><code class="lang-html"><span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">http-equiv</span>=<span class="hljs-string">"X-UA-Compatible"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"IE=edge"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"viewport"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"width=device-width, initial-scale=1.0"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Dynamic Avatar<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
    <span class="hljs-comment">&lt;!-- div for the avatar --&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"avatar"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<h3 id="heading-css-the-style">CSS: The style</h3>
<p>I went with the minimal styling since most avatars are circular, I gave it a uniform width and height and then a 50% border-radius, then to make sure that the initials are always at the center, I gave it a display of flex then aligned its items to the center.</p>
<pre><code class="lang-css"><span class="hljs-selector-id">#avatar</span>{
        <span class="hljs-attribute">width</span>: <span class="hljs-number">50px</span>;
        <span class="hljs-attribute">height</span>: <span class="hljs-number">50px</span>;
        <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">50%</span>;
        <span class="hljs-attribute">background-color</span>: gray;
        <span class="hljs-attribute">color</span>: <span class="hljs-number">#fff</span>;
        <span class="hljs-attribute">display</span>: flex;
        <span class="hljs-attribute">justify-content</span>: center;
        <span class="hljs-attribute">align-items</span>: center;
    }
</code></pre>
<h3 id="heading-js-the-behavior">JS: The behavior</h3>
<p>And finally, with javascript, the big part is to get the first letter of each name in the string. For the first initial, all you have to do is get the character at index zero, then consider that the second name starts after the first space and get the character at index zero of the string after the space.</p>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> avatar = <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'avatar'</span>)
<span class="hljs-keyword">const</span> username = <span class="hljs-string">'Charles Kasasira'</span> <span class="hljs-comment">// will be fetching the username, just used my to illustrate</span>
<span class="hljs-keyword">const</span> firstNameInitial = username[<span class="hljs-number">0</span>]
<span class="hljs-keyword">const</span> secondNameInitial = username.split(<span class="hljs-string">' '</span>)[<span class="hljs-number">1</span>].split(<span class="hljs-string">''</span>)[<span class="hljs-number">0</span>]
avatar.innerHTML= firstNameInitial + secondNameInitial
</code></pre>
<p>And that's it, you can make it more fun with random colors for different users and add more CSS for fancy styling to make it better.</p>
<p>What did I learn from this small feature?. </p>
<p>Small as it is, this was my first approach to this problem and I got to learn that even a simple solution may be hard if you don’t think of breaking it down to the simplest parts. All I had to do here was create a circle, split a string, and display the index zero of the different chunks of the name. I hope you learned one or two things. </p>
<p>As beau says, </p>
<blockquote>
<p>USE YOUR CODE FOR GOOD.</p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[What is a Flow Chart In programming?]]></title><description><![CDATA[A Flowchart is a graphical representation of an algorithm. Programmers often use it as a planning tool to aid in solving a problem step by step. 
Flow Charts are not a new thing in the world of programming, they were borrowed from the engineering and...]]></description><link>https://blog.charleskasasira.com/what-is-a-flow-chart-in-programming</link><guid isPermaLink="true">https://blog.charleskasasira.com/what-is-a-flow-chart-in-programming</guid><category><![CDATA[flowtype]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[webdev]]></category><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Sat, 08 Jan 2022 08:17:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1641629419160/yKFivvGbD.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1641629419160/yKFivvGbD.png" alt="Flow Charts.png" />
 A Flowchart is a graphical representation of an algorithm. Programmers often use it as a planning tool to aid in solving a problem step by step. 
Flow Charts are not a new thing in the world of programming, they were borrowed from the engineering and business industries in the '90s.</p>
<p>Definition from Oxford Languages </p>
<blockquote>
<p>a graphical representation of a computer program in relation to its sequence of functions (as distinct from the data it processes).</p>
</blockquote>
<p>A flow chart is made of symbols that are connected in a certain way to show how information and processes flow <em>(go from one place to another in a steady stream)</em>. So why would a programmer use a flow chart or better yet, why would anyone layout a process(algorithm) in a graphical way? Well, like all established modes of organizing information, a flow chart pinpoints the implementation of the algorithm, what happens in each case of the data flow. Flow charts help programmers or coders visualization the program or the idea, way before committing efforts of writing several lines of code.</p>
<blockquote>
<p>One might even go ahead to say that these inter-linked shapes promote efficient code.</p>
</blockquote>
<p>"Do professional programmers use Flow Charts or pseudo code?" from quora.</p>
<p>There is no doubt pseudo-code is vital in the development process and I don't think drawing flow charts is a substitute for pseudocode, but a flow chart comes with its benefits, a simple one being in the documentation of the program for non-programmers. though on quora most of the comments are against them, one goes ahead to say that they are obsolete but I guess this is a personal judgment.</p>
<p>With that said there are different ways to create a Flow chart. You could simply draw a flow chart with a piece of paper, or if you could afford a whiteboard and markers. But today, there are a lot of tools out there that make the creation of flow charts easier with some offering templates to build from. I use Figma for my flowcharts.</p>
<p>The Common Flow Chart Symbols.</p>
<ol>
<li>terminator</li>
<li>input/output block</li>
<li>process block</li>
<li>decision block</li>
<li>Flow arrow</li>
<li>Documents</li>
</ol>
<p>Thanks for reading.</p>
]]></content:encoded></item><item><title><![CDATA[Spot the difference  URL VS URI]]></title><description><![CDATA[URL(Uniform Resource Locator) known as the address of a website is a reference for a resource and a way to access that resource
structure of a URL
protocol://[hostname]path[?query][#fragment]
While 
URI(Uniform Resource Identifier) is a way to identi...]]></description><link>https://blog.charleskasasira.com/spot-the-difference-url-vs-uri</link><guid isPermaLink="true">https://blog.charleskasasira.com/spot-the-difference-url-vs-uri</guid><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Sun, 12 Dec 2021 19:59:49 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1638891053272/Etxeeav3qn.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638891053272/Etxeeav3qn.png" alt="uri-vs-url.png" />
URL(Uniform Resource Locator) known as the address of a website is a reference for a resource and a way to access that resource</p>
<p>structure of a URL</p>
<p>protocol://[hostname]path[?query][#fragment]</p>
<p>While </p>
<p>URI(Uniform Resource Identifier) is a way to identify a resource.
Unlike the URL, the Uniform Resource Identifier doesn't necessarily provide the means to locate the resource</p>
<p>To summarize it, the URL is a subset of a URI, ( that is to say, URL is a URI with a way to access that resource), another example of a URI is an ISBN. ( The International Standard Book Number is a numeric commercial book identifier that is intended to be unique. )</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>URI</td><td>URL</td></tr>
</thead>
<tbody>
<tr>
<td>Uniform Resource Identifier</td><td>Uniform Resource Locator</td></tr>
<tr>
<td>superset of URL that identifies a resource</td><td>subset of URI that specifies where a resource exists and the mechanism for retrieving it</td></tr>
<tr>
<td>the main aim of URI is to find a resource.</td><td>The main aim of URL is to get the location or address of a resource</td></tr>
<tr>
<td>URI in used in HTML, XML and other files.</td><td>URL is used to locate only web pages,</td></tr>
<tr>
<td>Example urn:isbn:0-486-27557-4.</td><td>Example   'https://kasasira.pages.dev'</td></tr>
</tbody>
</table>
</div>]]></content:encoded></item><item><title><![CDATA[Nice imports paths in reactjs with jsconfig.json]]></title><description><![CDATA[Nice imports paths in reactjs with jsconfig.json
There is not much here. just came across the jsconfig.json file and was promised that it will blow my mind( actually, come to think of it, most things claim to blow minds in one way or the other).
Oh y...]]></description><link>https://blog.charleskasasira.com/nice-imports-paths-in-reactjs-with-jsconfig-json-df856f8427c8</link><guid isPermaLink="true">https://blog.charleskasasira.com/nice-imports-paths-in-reactjs-with-jsconfig-json-df856f8427c8</guid><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Mon, 15 Nov 2021 09:16:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603048424/cvVMM_mC3.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Nice imports paths in reactjs with jsconfig.json</strong></p>
<p>There is not much here. just came across the <strong>jsconfig.json</strong> file and was promised that it will blow my mind( <em>actually, come to think of it, most things claim to blow minds in one way or the other</em>).</p>
<p>Oh ya, straight to the point, when you put the <strong>jsconfig.json</strong> file at the root of your project, (That’s beside the package.json file, <em>you knew, sorry about that</em>). Then you can use the absolute paths instead of the ‘../../components’.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603044717/pg0pPaGKj.png" alt /></p>
<p>Project folder structure</p>
<p>contents of the jsconfig.json file</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603046547/0IVKQRtD1.png" alt /></p>
<p>how to import files.</p>
<p>That’s it for this short and and and, well bye.</p>
]]></content:encoded></item><item><title><![CDATA[Day2: 7 days of Reactjs for absolute beginners.]]></title><description><![CDATA[Day2: 7 days of Reactjs for absolute beginners.
On the second day of reactjs, I share one of the most important concepts of react, components. A component is like a javascript function that has a specific functionality.

Components let you split the ...]]></description><link>https://blog.charleskasasira.com/day2-7-days-of-reactjs-for-absolute-beginners-69ecb80bb9a8</link><guid isPermaLink="true">https://blog.charleskasasira.com/day2-7-days-of-reactjs-for-absolute-beginners-69ecb80bb9a8</guid><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Sat, 30 Oct 2021 10:31:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603054859/mtApbxtwM.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Day2: 7 days of Reactjs for absolute beginners.</strong></p>
<p>On the second day of reactjs, I share one of the most important concepts of react, components. A component is like a javascript function that has a specific functionality.</p>
<blockquote>
<p>Components let you split the UI into independent, reusable pieces, and think about each piece in isolation.</p>
</blockquote>
<p>There are two types of components, class and functional-based components</p>
<p><strong>Class components</strong></p>
<p>Class components are defined using the ES6 class. This was the only way of creating components before function components. But for now, I will be focused on the Functional based components which are easier and better with the use of <a target="_blank" href="https://reactjs.org/docs/hooks-intro.html">hooks</a>.</p>
<p><strong>Functional based components</strong></p>
<p>Functional components were introduced in React v16.8. They can take in props (properties) just like parameters in javascript and may return HTML (using JSX) telling the browser how the UI should look like.</p>
<p>When writing a component name, It's best to use a title case.</p>
<pre><code class="lang-js"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">ComponentName</span>(<span class="hljs-params"></span>)</span>{  
 <span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Hello, world<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span></span>  
}
</code></pre>
<p>The above component is similar to this class component</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ComponentName</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">component</span></span>{  
   render(){  
      <span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Hello, world<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span></span>  
   }  
}
</code></pre>
<p>A React project usually contains many components which can interact with each other. To make a component accessible by another, you will need to expose it and later on import it.</p>
<pre><code class="lang-js"><span class="hljs-comment">//ComponentOne.js</span>

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">ComponentOne</span>(<span class="hljs-params"></span>)</span>{  
    <span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Hello, world<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span></span>  
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> ComponentOne;
</code></pre>
<pre><code class="lang-js">ComponentTwo.js

<span class="hljs-keyword">import</span> ComponentOne <span class="hljs-keyword">from</span> <span class="hljs-string">'./ComponentOne'</span>

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">ComponentTwo</span>(<span class="hljs-params"></span>)</span>{  
     <span class="hljs-keyword">return</span> (  
          <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">ComponentOne</span> /&gt;</span></span>  
     )  
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> ComponentTwo;
</code></pre>
<p>Conclusion<br />One of the pros of React is the reusability of components. I did mention props but more of that and state in another part of the 7days.</p>
<p>Happy coding.</p>
]]></content:encoded></item><item><title><![CDATA[Day 1: 7 days of Reactjs for Absolute beginners.]]></title><description><![CDATA[Most of the cool kids are using react, why?. The main purpose of React is to be fast, scalable, and simple while allowing developers to create large web applications that can change data, without reloading the page. React is a Javascript library used...]]></description><link>https://blog.charleskasasira.com/day-1-7-days-of-react-724281dd22a2</link><guid isPermaLink="true">https://blog.charleskasasira.com/day-1-7-days-of-react-724281dd22a2</guid><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Thu, 28 Oct 2021 06:57:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603063558/zzmNkv-NL.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most of the cool kids are using react, why?. The main purpose of React is to be fast, scalable, and simple while allowing developers to create large web applications that can change data, without reloading the page. React is a Javascript library used to build User Interfaces and component UI, It was built by Facebook back in 2011, with its newsfeed being the first use case.</p>
<p>Photo by <a target="_blank" href="https://unsplash.com/@lautaroandreani?utm_source=medium&amp;utm_medium=referral">Lautaro Andreani</a> on <a target="_blank" href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplas</a>h</p>
<blockquote>
<p>Disclaimer: In no way, am I saying that I learnt all aspects of React in a week. This gave me the ability to think in React (declarative, components, props and state). Plus my prerequisite was a good grasp of Javascript.</p>
</blockquote>
<p><strong>DAY ONE</strong></p>
<ol>
<li>Installing React.</li>
<li>React App structure.</li>
</ol>
<blockquote>
<p>A declarative style like react, allows you to control flow and state in your application by saying “It should look like this” as opposed to an imperative style which allows you to control your application by saying “This is what you should do”.</p>
</blockquote>
<p><strong>Installing React</strong></p>
<p>To use react you need to install node.js, if you don’t already have node install visit <a target="_blank" href="https://nodejs.org/en/download/">https://nodejs.org/en/download/</a> and select a version depending on your the operating system.</p>
<p>node.js comes with npm or in this case, npx (node package execute) which we can use to create a react app.<br />To check which version of node you have installed</p>
<p>node -v</p>
<p>To create a react app (my-react-app) with npx</p>
<p>npx create-react-app my-react-app</p>
<p><strong>React App Structure</strong></p>
<p>It’s most said that react is all about components.<br />“ Components refer to small independent parts of your app of specific functionality and UI that can be re-used throughout your app. For example, Button, Header and Footer Components.” but more about components on day 2.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603061898/qpAgvC7ch.png" alt /></p>
<p>React folder structure</p>
<p>The <strong>public folder</strong> contains static files like index. html, images, and other assets. which don’t need to be processed by the webpack.</p>
<p>the <strong>src folder</strong>, which initially contains the App.js file which you can edit the app.</p>
<p><strong>index.js</strong>, the main/ entry file which allows you to import the parent file (App.js) as a module.</p>
<p><strong>package.json</strong>, which holds a list of dependencies for your project plus some metadata like name, version etc.</p>
<p><strong>Conclusion</strong></p>
<p>Day one was a general introduction to the library and nothing complicated. You could check out day two, where I share about components, class vs functional components.<br />Thanks for reading.</p>
]]></content:encoded></item><item><title><![CDATA[Semantic Versioning, what you should know.]]></title><description><![CDATA[Semantic Versioning (SemVer), is an industry-standard for software versioning aiming to make it easier to manage dependencies. Semantic Versioning works by structuring each version identifier into three parts, “MAJOR.MINOR.PATCH” notation.
Why SemVer...]]></description><link>https://blog.charleskasasira.com/semantic-versioning-what-you-should-know-4beb159e9365</link><guid isPermaLink="true">https://blog.charleskasasira.com/semantic-versioning-what-you-should-know-4beb159e9365</guid><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Wed, 22 Sep 2021 10:36:30 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603069746/Gj2iIS2zP.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Semantic Versioning (SemVer), is an industry-standard for software versioning aiming to make it easier to manage dependencies. Semantic Versioning works by structuring each version identifier into three parts, “MAJOR.MINOR.PATCH” notation.</p>
<p>Why SemVer?</p>
<ul>
<li>You can keep track of every transition in the software development phase.</li>
<li>Versioning can do the job of explaining to the developers what type of changes have taken place and the possible updates that should take place in the software.</li>
<li>It helps to keep things clean and meaningful.</li>
<li>It helps other people who might be using your project as a dependency.</li>
</ul>
<p>Each of these parts is managed as a number and incremented according to the following rules:</p>
<ul>
<li>PATCH is incremented for bug fixes or other changes that do not change the behaviour of the API.</li>
<li>MINOR is incremented for backward-compatible changes of the API, meaning that existing consumers can safely ignore such a version change.</li>
<li>MAJOR is incremented for breaking changes, i.e. for changes that are not within the backwards compatibility scope. Existing consumers have to adapt to the new API, very likely by adapting their code.</li>
</ul>
<p>More should know</p>
<p>~(tilde): will update you to all future patch versions, without incrementing the minor version. ~1.2.3 will use releases from 1.2.3 to &lt;1.3.0.</p>
<p>^(caret): will update you to all future minor/patch versions, without incrementing the major version. ^2.3.4 will use releases from 2.3.4 to &lt; 3.0.0</p>
<p>The first version starts at 0.1.0 and not at 0.0.1, as no bug fixes have taken place, rather we start with a set of features as the first draft of the project.</p>
]]></content:encoded></item><item><title><![CDATA[Introduction to the Node Package Manager]]></title><description><![CDATA[npm is the default package manager for the JavaScript runtime environment Node.js. It was developed by Isaac Z. Schlueter, written entirely in JavaScript. npm comes with node.js. Yarn and pnpm are alternatives to npm cli.
It consists of a command lin...]]></description><link>https://blog.charleskasasira.com/introduction-to-the-node-package-manager-ac6c3a23d148</link><guid isPermaLink="true">https://blog.charleskasasira.com/introduction-to-the-node-package-manager-ac6c3a23d148</guid><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Mon, 23 Aug 2021 14:06:12 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603075969/Z7pt1nUFE.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>npm is the default package manager for the JavaScript runtime environment <a target="_blank" href="https://en.wikipedia.org/wiki/Node.js">Node.js</a>. It was developed by Isaac Z. Schlueter, written entirely in JavaScript. npm comes with node.js. <a target="_blank" href="https://yarnpkg.com/en/"><strong>Yarn</strong></a> and <a target="_blank" href="https://pnpm.js.org/"><strong>pnpm</strong></a> are alternatives to npm cli.</p>
<p>It consists of a command line client, also called npm, and an online database of public and paid-for private packages, called the npm registry. The registry is accessed via the client, and the available packages can be browsed and searched via the <a target="_blank" href="https://www.npmjs.com/">npm website</a>. The package manager and the registry are managed by npm, Inc.</p>
<p>To check which version of the package manager is installed on your computer use <code>npm -v</code></p>
<p><code>npm</code> manages downloads of dependencies of your project.</p>
<h4 id="heading-installing-all-dependencies">Installing all dependencies</h4>
<p>If a project has a <code>package.json</code> file, by running <code>npm install</code> it will install everything the project needs, in the <code>node_modules</code> folder, creating it if it's not existing already.</p>
<h4 id="heading-installing-a-single-package">Installing a single package</h4>
<p>You can also install a specific package. Furthermore, since npm 5, this command adds <code>&lt;package-name&gt;</code> to the <code>package.json</code> file <em>dependencies</em>.</p>
<p>npm install </p>
<h4 id="heading-updating-packages">Updating packages</h4>
<p>npm update</p>
<p>npm will check all packages for a newer version that satisfies your versioning constraints.</p>
<p>You can specify a single package to update as well:</p>
<p>npm update </p>
<h4 id="heading-running-tasks">Running Tasks</h4>
<p>The package.json file supports a format for specifying command line tasks that can be run by using</p>
<p>npm run </p>
]]></content:encoded></item><item><title><![CDATA[My Time at Ablestate Creatives Limited]]></title><description><![CDATA[Hey Charles here, I am an aspiring UI/UX designer with the ability to translate designs into the functional front-end. To achieve my goals, I am undertaking the Ablesolver Cohort at Ablestate Creatives Limited, which I was blessed to participate in o...]]></description><link>https://blog.charleskasasira.com/my-time-at-ablestate-creatives-limited-ea28ec4eea01</link><guid isPermaLink="true">https://blog.charleskasasira.com/my-time-at-ablestate-creatives-limited-ea28ec4eea01</guid><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Fri, 20 Aug 2021 17:00:23 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603086844/lBQzA_4VJ.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hey Charles here, I am an aspiring UI/UX designer with the ability to translate designs into the functional front-end. To achieve my goals, I am undertaking the Ablesolver Cohort at <a target="_blank" href="http://theablestate.com/">Ablestate Creatives Limited</a>, which I was blessed to participate in on a scholarship basis. In this short article, or I at least intended it to be short, I write about my time at Ablestate from the life lessons learnt to the technical skills and tools.</p>
<p>my time at Ablestate</p>
<h4 id="heading-what-is-ablestate">What is Ablestate</h4>
<p><a target="_blank" href="http://theablestate.com">Ablestate Creatives Limited</a> is a software company with the aim of “Making technology education fun, accessible &amp; short term”. Ablesolver is one of the courses offered, this course helps you to become a World-Class Web Developer. I joined as a student in late March this year(2021) with a couple of colleagues.</p>
<p>In the past few months at Ablestate, I have gained alot of skills, I have been able to learn the different tools used in the industry.</p>
<h4 id="heading-soft-skills">Soft skills</h4>
<p>Documenting: (Do not solve the same problem twice). Since day one we were encouraged to document our learning, work and processes. Documentation encourages knowledge sharing. We shared stuff we had learnt on our social media platforms daily for accountability purposes and also to share with the tech community the knowledge we had gained. Here are the words of our own Coach <a target="_blank" href="https://twitter.com/davidofug">David Wampamba</a> about self marketing and documenting.</p>
<blockquote>
<p><a target="_blank" href="https://twitter.com/davidofug/status/1395398348862001152?s=20"></a></p>
</blockquote>
<p>A tweet from coach David</p>
<h4 id="heading-hard-skills">Hard skills</h4>
<p>Touch typing: when I joined Ablestate, touch typing wasn’t know to me and to type without having to look at your keyboard seemed like a skill that would require ages of practice. but since day one, We have learnt how to type and in a period of 3 months, I was able to type at a speed of 38wpm and still going faster.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603082668/9A9vTZXBM.png" alt /></p>
<p>Git and GitHub: Git is a version control system and GitHub is a cloud-based hosting service that lets you manage Git repositories. This was part of the package we learnt in the first few weeks and we we able to use Github’s page feature to host our GitHub pages, charleskasasira.github.io</p>
<p>We have been able to look at many other technical skills Agile development, UI/UX design, Html, CSS, Bootstrap, SQL, Javascript , test-driven development using the Jest library, and currently we are learning Node.js as we are on the journey to become full-stack developers. With weekly assessments to help us grasp the knowledge, and other self reading assessments like SOLID principles, Data structure and algorithms and many more.</p>
<p>And we have been able to use the industry standard tools, we use Figma which is used to make wireframes and mockups. I was able to design my portiofolio from low fidelity wireframes and see it through the development, check it out <a target="_blank" href="https://www.figma.com/file/ffKUwRiNSueAs0VqfECDMe/My-Profile-v2?node-id=184%3A2">here</a>.</p>
<p>Github, mysql, trello, codesandbox, the terminal.</p>
<h4 id="heading-challenges">Challenges</h4>
<p>During the cohort, Uganda faced the second wave of covid-19 and under government measures to fight the virus, we had a lockdown, Though this didn’t stop the team at Ablestate. We conducted online sessions using zoom which are still ongoing.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603084721/N7FAWcpe2.jpeg" alt /></p>
<p>Ablestate Zoom session</p>
<h4 id="heading-conclusion">Conclusion</h4>
<p>So far (at the time of writing this article) we have covered almost 75% of the Ablesolver Cohort at Ablestate and with the knowledge gained and I am positive that I will be able to design and develop experiences that will make people’s lives simple. Thanks to the team at <a target="_blank" href="http://theablestate.com/">Ablestate</a>.</p>
]]></content:encoded></item><item><title><![CDATA[Output to the command Line using Node.js]]></title><description><![CDATA[Node.js provides a console module which provides tons of very useful ways to interact with the command line. It is basically the same as the console you find in the browser.
The most basic and most used method is console.log(), which prints the strin...]]></description><link>https://blog.charleskasasira.com/output-to-the-command-line-using-node-js-6a43cfcd3db7</link><guid isPermaLink="true">https://blog.charleskasasira.com/output-to-the-command-line-using-node-js-6a43cfcd3db7</guid><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Thu, 12 Aug 2021 18:13:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603100327/uY7Jyl2Zr.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Node.js provides a console module which provides tons of very useful ways to interact with the command line. It is basically the same as the console you find in the browser.</p>
<p>The most basic and most used method is <code>console.log()</code>, which prints the string you pass to it to the console.</p>
<p>We can also format pretty phrases by passing variables and a format specifier.</p>
<ul>
<li><code>%s</code> format a variable as a string</li>
<li><code>%d</code> format a variable as a number</li>
<li><code>%i</code> format a variable as its integer part only</li>
<li><code>%o</code> format a variable as an object</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603093519/AffsE-LWW.png" alt /></p>
<p><code>console.clear()</code> clears the console (the behavior might depend on the console used)</p>
<p><code>console.count()</code> counts the number of times a string is printed, and prints the count next to it:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603095246/kGUBhMD-N.png" alt /></p>
<p>The <code>console.countReset()</code>method resets counter used with console.count().</p>
<p>Print the stack trace</p>
<p>There might be cases where it’s useful to print the call stack trace of a function, maybe to answer the question <em>how did you reach that part of the code?</em></p>
<p>You can do so using <code>console.trace()</code>:</p>
<p>Calculate the time spent</p>
<p>You can easily calculate how much time a function takes to run, using <code>time()</code> and <code>timeEnd()</code></p>
<p>The simplest way to go about coloring the console output is by using a library. <a target="_blank" href="https://github.com/chalk/chalk">Chalk</a> is such a library, and in addition to coloring it also helps with other styling facilities, like making text bold, italic or underlined.</p>
<p>You install it with <code>npm install chalk</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603096939/9cH4wv05j.png" alt /></p>
<p>Create a progress bar</p>
<p><a target="_blank" href="https://www.npmjs.com/package/progress">Progress</a> is an awesome package to create a progress bar in the console. Install it using <code>npm install progress</code></p>
<p>This snippet creates a 10-step progress bar, and every 100ms one step is completed.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603098639/kaWyYT727.png" alt /></p>
]]></content:encoded></item><item><title><![CDATA[Node REPL]]></title><description><![CDATA[REPL (Read Evaluate Print Loop) is a programming language environment that takes single expression as user input and returns the result back to the console. REPL is just like the IDLE for Python.

Read -It reads the user’s input and parses it into Ja...]]></description><link>https://blog.charleskasasira.com/node-repl-2f9f44270e8b</link><guid isPermaLink="true">https://blog.charleskasasira.com/node-repl-2f9f44270e8b</guid><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Thu, 12 Aug 2021 17:22:03 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603119938/pDa8e6O65.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>REPL (Read Evaluate Print Loop) is a programming language environment that takes single expression as user input and returns the result back to the console. REPL is just like the <strong>IDLE</strong> for Python.</p>
<ul>
<li><strong>Read -</strong>It reads the user’s input and parses it into JavaScript data structure and stores it into memory.</li>
<li><strong>Evaluate -</strong>it evaluates the JavaScript data structure.</li>
<li><strong>Print -</strong>It prints the result of the evaluated data structure.</li>
<li><strong>Loop -</strong>Loops the command until the user exits.</li>
</ul>
<p>To enter the RELP terminal, you use the node command.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603107094/pIKT8UKM0A.png" alt /></p>
<p>As the console is just like the browser’s console, you can test anything on it. e.g, if you write <strong>1+ 2</strong> it will display the addition of 1 and 2 i.e. <strong>3</strong> in the new line</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603108817/A0j0lOObL.png" alt /></p>
<h4 id="heading-exploring-javascript-objects">Exploring JavaScript objects</h4>
<p>Enter the name of a JavaScript class, like <code>Number</code>, add a dot and press <code>tab</code>.The REPL will print all the properties and methods you can access on that class</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603110567/FGtPJ18ud.png" alt /></p>
<p>You can inspect the globals you have access to by typing <code>global.</code> and pressing <code>tab</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603112623/SUUTPe8X8.png" alt /></p>
<h4 id="heading-the-special-variable">The _ special variable</h4>
<p>If after some code you type <code>_</code>, that is going to print the result of the last operation.</p>
<h3 id="heading-dot-commands">Dot commands</h3>
<p>The REPL has some special commands, all starting with a dot <code>.</code></p>
<ul>
<li><code>.help</code>: shows the dot commands help</li>
<li><code>.editor</code>: enables editor mode, to write multi-line code. Once you are in this mode, enter <code>Ctrl+D</code> to run the code you wrote.</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603114669/Ad_Bfa9JZ.png" alt /></p>
<ul>
<li><code>.break</code>: when inputting a multi-line expression, entering the <code>.break</code> command will abort further input. Same as pressing <code>Ctrl+C</code>.</li>
<li><code>.clear</code>: resets the REPL context to an empty object and clears any multi-line expression currently being input.</li>
<li><code>.load</code>: loads a JavaScript file, relative to the current working directory</li>
<li><code>.save</code>: saves all you entered in the REPL session to a file (specify the filename)</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603116355/VMobPOW8P.png" alt /></p>
<ul>
<li><code>.exit</code>: exits the REPL or you can press <code>Ctrl+C</code> twice</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603118142/D72v61NLf.png" alt /></p>
]]></content:encoded></item><item><title><![CDATA[CONTRIBUTE TO OPEN SOURCE (10 outlined steps)]]></title><description><![CDATA[CONTRIBUTE TO OPEN SOURCE (10 outlined steps)
I remember when I made, well my first open source contribution to first-contributions and thought I could share the outlined basic steps for contributing as a beginner.
making your first Open-Source contr...]]></description><link>https://blog.charleskasasira.com/contribute-to-open-source-10-outlined-steps-2c8c80f8c538</link><guid isPermaLink="true">https://blog.charleskasasira.com/contribute-to-open-source-10-outlined-steps-2c8c80f8c538</guid><dc:creator><![CDATA[Charles Kasasira]]></dc:creator><pubDate>Thu, 12 Aug 2021 14:34:35 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1638603126241/X5RE2_Smf.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h4 id="heading-contribute-to-open-source-10-outlined-steps">CONTRIBUTE TO OPEN SOURCE (10 outlined steps)</h4>
<p>I remember when I made, well my first open source contribution to <a target="_blank" href="https://github.com/firstcontributions/first-contributions">first-contributions</a> and thought I could share the outlined basic steps for contributing as a beginner.</p>
<p>making your first Open-Source contribution</p>
<h3 id="heading-why-contribute-to-open-source">Why contribute to open source?</h3>
<p>Contributing to open source projects comes with it benefits</p>
<ul>
<li>You get to practice with Git and GitHub for version control.</li>
<li>This as other contributions to any community builds a sense of belonging</li>
<li>Contributing improves your portfolio, as it shows you can collaborate well with others.</li>
</ul>
<h3 id="heading-the-10-steps">The 10 steps</h3>
<ol>
<li>Open a GitHub account if you don’t have one, if you do sign in</li>
<li>Fork a project you want to contribute to</li>
<li>Clone your fork</li>
</ol>
<p>git clone <a target="_blank" href="https://github.com/CharlesKasasira/first-contributions.git">https://github.com/your-username/first-contributions.git</a></p>
<p>4. Navigate to the local repository</p>
<p>cd path/to/local_repository</p>
<p>5. Create a new branch</p>
<p>git checkout - b branch_name</p>
<p>6. Make changes in your local repository</p>
<p>7. Add and Commit your changes</p>
<p>git add . // this adds all the changes made to the stage</p>
<p>git add filename // an</p>
<p>git commit -m "message goes here"</p>
<p>8. Push your changes to your fork</p>
<p>git push origin branch_name</p>
<p>9. Create a pull request</p>
<p>10. Review your pull request</p>
<p>Your changes will be reviewed and merged to the main if approved. This is a brief of the process and though it is for beginners, it might not be that friendly to those that have not use git or github before.</p>
]]></content:encoded></item></channel></rss>