<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: kali kimanzi</title>
    <description>The latest articles on DEV Community by kali kimanzi (@kalikimanzi).</description>
    <link>https://dev.to/kalikimanzi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F298130%2F2a414be8-4c92-4225-a23a-e5b38021cc36.png</url>
      <title>DEV Community: kali kimanzi</title>
      <link>https://dev.to/kalikimanzi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kalikimanzi"/>
    <language>en</language>
    <item>
      <title>Git From Zero to Hero: A Master Class</title>
      <dc:creator>kali kimanzi</dc:creator>
      <pubDate>Mon, 10 Aug 2026 11:11:54 +0000</pubDate>
      <link>https://dev.to/kalikimanzi/git-from-zero-to-hero-a-master-class-3482</link>
      <guid>https://dev.to/kalikimanzi/git-from-zero-to-hero-a-master-class-3482</guid>
      <description>&lt;h1&gt;
  
  
  Git From Zero to Hero: A Master Class
&lt;/h1&gt;

&lt;p&gt;Git runs almost every codebase you have ever touched, yet most developers only know a handful of commands by muscle memory. They type &lt;code&gt;git add .&lt;/code&gt;, &lt;code&gt;git commit&lt;/code&gt;, &lt;code&gt;git push&lt;/code&gt;, and hope for the best. This guide is different. It starts from the absolute beginning and walks all the way to the internals that power tools like GitHub, GitLab, and every CI pipeline you rely on.&lt;/p&gt;

&lt;p&gt;By the end you will not just know the commands. You will understand the model underneath them, which means you will never be afraid of a merge conflict, a detached HEAD, or a broken rebase again.&lt;/p&gt;

&lt;p&gt;This course has three levels.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Beginner&lt;/strong&gt;: what Git is, the three trees, and your first commits&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intermediate&lt;/strong&gt;: branching, merging, rebasing, and working with remotes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expert&lt;/strong&gt;: the object model, refs, the reflog, and advanced recovery and workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Grab a terminal and follow along.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Why Git Exists&lt;/li&gt;
&lt;li&gt;Beginner: The Three Trees&lt;/li&gt;
&lt;li&gt;Beginner: Your First Repository&lt;/li&gt;
&lt;li&gt;Beginner: Ignoring Files&lt;/li&gt;
&lt;li&gt;Intermediate: Branches Are Just Pointers&lt;/li&gt;
&lt;li&gt;Intermediate: Merging&lt;/li&gt;
&lt;li&gt;Intermediate: Rebasing&lt;/li&gt;
&lt;li&gt;Intermediate: Merge vs Rebase, the Real Answer&lt;/li&gt;
&lt;li&gt;Intermediate: Working With Remotes&lt;/li&gt;
&lt;li&gt;Intermediate: Stash and Tags&lt;/li&gt;
&lt;li&gt;Expert: The Object Model&lt;/li&gt;
&lt;li&gt;Expert: Refs, HEAD, and Detached States&lt;/li&gt;
&lt;li&gt;Expert: The Reflog, Your Safety Net&lt;/li&gt;
&lt;li&gt;Expert: Interactive Rebase&lt;/li&gt;
&lt;li&gt;Expert: Cherry-pick and Bisect&lt;/li&gt;
&lt;li&gt;Expert: Workflows That Teams Actually Use&lt;/li&gt;
&lt;li&gt;Cheat Sheet&lt;/li&gt;
&lt;li&gt;Closing Thoughts&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why Git Exists
&lt;/h2&gt;

&lt;p&gt;Before Git, most teams used centralized version control. A single server held the entire history, and every commit required a network round trip. If that server went down, work stopped. If your connection was slow, your workflow suffered with it.&lt;/p&gt;

&lt;p&gt;Linus Torvalds built Git in 2005 to maintain the Linux kernel, and he designed it around a simple idea: every developer keeps a full copy of the project history on their own machine. There is no single point of failure, and almost every operation is instant because it happens locally.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr3ijx844yqvknjj0g1w6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr3ijx844yqvknjj0g1w6.png" alt=" " width="800" height="894"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Diagram by Kali Kimanzi&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Notice the dotted line in the distributed model. Developers can even share commits directly with each other without touching the central remote at all. That single design decision is why Git scales from a solo hobby project to a codebase with thousands of contributors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beginner: The Three Trees
&lt;/h2&gt;

&lt;p&gt;Everything in Git revolves around three areas living on your machine. People new to Git often skip past this and jump straight to memorizing commands, which is exactly why &lt;code&gt;git add&lt;/code&gt; feels mysterious. Once you see the three trees, the commands explain themselves.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frvp5t3u18zf50emcmikv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frvp5t3u18zf50emcmikv.png" alt=" " width="800" height="163"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Diagram by Kali Kimanzi&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;working directory&lt;/strong&gt; is what you see in your editor right now.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;staging area&lt;/strong&gt; (also called the index) is a draft of your next commit. You choose exactly what goes in it.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;repository&lt;/strong&gt; is the permanent, immutable history stored inside the &lt;code&gt;.git&lt;/code&gt; folder.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the entire mental model. &lt;code&gt;git add&lt;/code&gt; moves changes from the working directory into the draft. &lt;code&gt;git commit&lt;/code&gt; seals that draft into history forever. Nothing about Git makes sense until this clicks, so read that diagram twice if you need to.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beginner: Your First Repository
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# one time setup on a new machine&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.name &lt;span class="s2"&gt;"Kali Kimanzi"&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.email &lt;span class="s2"&gt;"you@example.com"&lt;/span&gt;

&lt;span class="c"&gt;# start a new repo&lt;/span&gt;
&lt;span class="nb"&gt;mkdir &lt;/span&gt;my-project &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;my-project
git init

&lt;span class="c"&gt;# check what state things are in&lt;/span&gt;
git status

&lt;span class="c"&gt;# create a file, then stage and commit it&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"# My Project"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; README.md
git add README.md
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Initial commit"&lt;/span&gt;

&lt;span class="c"&gt;# see the history&lt;/span&gt;
git log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A few commands you will run constantly:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What it actually does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git status&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Shows which files are in the working directory vs staged&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git add &amp;lt;file&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Moves a file's changes into the staging area&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git commit -m "msg"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Seals staged changes into a permanent snapshot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git log&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Shows the commit history, newest first&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git diff&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Shows unstaged changes between working directory and staging&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git diff --staged&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Shows staged changes between staging and last commit&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhebce0q4s031cg02j3uv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhebce0q4s031cg02j3uv.png" alt=" " width="552" height="1711"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Diagram by Kali Kimanzi&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Beginner: Ignoring Files
&lt;/h2&gt;

&lt;p&gt;Not everything belongs in history. Build artifacts, dependency folders, and secrets should never be committed. Git reads a &lt;code&gt;.gitignore&lt;/code&gt; file at the root of your repo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node_modules/
dist/
.env
*.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A rule of thumb that will save you from painful incidents: anything that can be regenerated (build output, installed packages) or that contains a secret (API keys, passwords) does not belong in Git.&lt;/p&gt;

&lt;h2&gt;
  
  
  Intermediate: Branches Are Just Pointers
&lt;/h2&gt;

&lt;p&gt;This is the idea that unlocks Git for good. A branch is not a copy of your code. A branch is a small file containing one thing, the hash of a single commit. When you commit again, Git just moves that pointer forward. That is the entire mechanism, and it is why creating a branch in Git is instant regardless of how large the project is.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw9rsdxw1ewjhfdacbfvt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw9rsdxw1ewjhfdacbfvt.png" alt=" " width="800" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Diagram by Kali Kimanzi&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git branch feature/login       &lt;span class="c"&gt;# create a branch, stay where you are&lt;/span&gt;
git switch feature/login       &lt;span class="c"&gt;# move to that branch&lt;/span&gt;
git switch &lt;span class="nt"&gt;-c&lt;/span&gt; feature/signup   &lt;span class="c"&gt;# create and switch in one step&lt;/span&gt;
git branch                     &lt;span class="c"&gt;# list local branches&lt;/span&gt;
git branch &lt;span class="nt"&gt;-d&lt;/span&gt; feature/login    &lt;span class="c"&gt;# delete a branch that has been merged&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because a branch is just a movable pointer, switching branches is cheap and creating experimental branches costs nothing. This is why Git culture leans heavily on branching for every feature, every bugfix, and every experiment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Intermediate: Merging
&lt;/h2&gt;

&lt;p&gt;A merge brings the work from one branch into another. If the two branches changed different parts of the code, Git combines them automatically and creates a new commit with two parents, called a merge commit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcak3tvldkyv6temeplfi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcak3tvldkyv6temeplfi.png" alt=" " width="800" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Diagram by Kali Kimanzi&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git switch main
git merge feature/login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When both branches edited the same lines, Git cannot guess your intent and asks you to resolve a conflict. It marks the file like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; HEAD
const greeting = "Hello there";
=======
const greeting = "Hi friend";
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; feature/login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You edit the file to keep what you actually want, remove the markers, then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &amp;lt;file&amp;gt;
git commit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A conflict is not a failure. It is Git correctly refusing to guess between two changes it cannot reconcile on its own.&lt;/p&gt;

&lt;h2&gt;
  
  
  Intermediate: Rebasing
&lt;/h2&gt;

&lt;p&gt;Rebase takes the commits from your branch and replays them on top of another branch, one at a time, as if you had started your work later than you actually did. The result is a straight, linear history with no merge commit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fotu4yos4evfhuyq8yjr8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fotu4yos4evfhuyq8yjr8.png" alt=" " width="799" height="123"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Diagram by Kali Kimanzi&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git switch feature/login
git rebase main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice the commits become &lt;code&gt;c3'&lt;/code&gt; and &lt;code&gt;c4'&lt;/code&gt;, with a prime mark. Rebase does not move the original commits, it creates brand new ones with the same changes but different parent history and a new hash. This detail matters a lot, and it leads directly to the next section.&lt;/p&gt;

&lt;h2&gt;
  
  
  Intermediate: Merge vs Rebase, the Real Answer
&lt;/h2&gt;

&lt;p&gt;This is one of the most argued about topics in software engineering, and the honest answer is that both are correct tools for different jobs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgmy2dof8rkzs1rfqfcwd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgmy2dof8rkzs1rfqfcwd.png" alt=" " width="800" height="804"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Diagram by Kali Kimanzi&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The one rule that prevents real disasters: never rebase a branch that other people have already pulled. Since rebase rewrites commit hashes, anyone who already has the old commits will end up with duplicated, conflicting history. Merge is always safe on shared branches. Rebase is a personal cleanup tool for your own local, unpublished work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Intermediate: Working With Remotes
&lt;/h2&gt;

&lt;p&gt;A remote is just another copy of the repository, usually hosted on a service like GitHub. Your local repo and the remote sync through three operations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7mjmn0cdtxk4eadylyco.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7mjmn0cdtxk4eadylyco.png" alt=" " width="800" height="611"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Diagram by Kali Kimanzi&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/user/repo.git   &lt;span class="c"&gt;# copy a remote repo locally&lt;/span&gt;
git remote &lt;span class="nt"&gt;-v&lt;/span&gt;                                &lt;span class="c"&gt;# see configured remotes&lt;/span&gt;
git fetch origin                             &lt;span class="c"&gt;# download new commits, do not touch your branch&lt;/span&gt;
git pull origin main                         &lt;span class="c"&gt;# fetch, then merge into your current branch&lt;/span&gt;
git push origin main                         &lt;span class="c"&gt;# upload your commits&lt;/span&gt;
git pull &lt;span class="nt"&gt;--rebase&lt;/span&gt; origin main                &lt;span class="c"&gt;# fetch, then rebase instead of merge&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;fetch&lt;/code&gt; is always safe. It only downloads data, it never touches your working directory or your current branch. &lt;code&gt;pull&lt;/code&gt; is fetch plus an automatic merge, which is convenient but can surprise you with a merge commit you were not expecting. Many experienced developers run &lt;code&gt;git fetch&lt;/code&gt; followed by a manual &lt;code&gt;git merge&lt;/code&gt; or &lt;code&gt;git rebase&lt;/code&gt; so they stay in control of what happens.&lt;/p&gt;

&lt;h2&gt;
  
  
  Intermediate: Stash and Tags
&lt;/h2&gt;

&lt;p&gt;Sometimes you need to switch branches but you are not ready to commit. Stash lets you shelve your changes temporarily.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git stash              &lt;span class="c"&gt;# save working directory changes, revert to clean state&lt;/span&gt;
git stash list          &lt;span class="c"&gt;# see saved stashes&lt;/span&gt;
git stash pop           &lt;span class="c"&gt;# reapply the most recent stash and remove it from the list&lt;/span&gt;
git stash apply         &lt;span class="c"&gt;# reapply without removing it from the list&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tags mark a specific commit permanently, most often used for releases.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git tag v1.0.0                       &lt;span class="c"&gt;# lightweight tag on current commit&lt;/span&gt;
git tag &lt;span class="nt"&gt;-a&lt;/span&gt; v1.0.0 &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"First release"&lt;/span&gt; &lt;span class="c"&gt;# annotated tag with metadata&lt;/span&gt;
git push origin v1.0.0               &lt;span class="c"&gt;# tags are not pushed automatically&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Expert: The Object Model
&lt;/h2&gt;

&lt;p&gt;Here is the part that turns Git from a tool you use into a system you understand. Everything in a Git repository, every file, every folder, every commit, is stored as an object identified by the SHA hash of its content. This is called content addressable storage, and it is the real foundation everything else sits on.&lt;/p&gt;

&lt;p&gt;There are four object types.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fse3pczc5fw3bujnpikeu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fse3pczc5fw3bujnpikeu.png" alt=" " width="800" height="751"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Diagram by Kali Kimanzi&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;blob&lt;/strong&gt; stores the raw content of a single file. It has no filename, no permissions, nothing but content. Two files with identical content anywhere in your repo history share the exact same blob.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;tree&lt;/strong&gt; represents a directory. It lists blobs and other trees along with filenames and modes.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;commit&lt;/strong&gt; points to one tree (the full snapshot of the project at that moment) plus one or more parent commits, an author, and a message.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;tag&lt;/strong&gt; (the annotated kind) points at a commit and adds extra metadata like a signature.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can inspect this yourself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git cat-file &lt;span class="nt"&gt;-p&lt;/span&gt; HEAD                 &lt;span class="c"&gt;# show a commit object&lt;/span&gt;
git cat-file &lt;span class="nt"&gt;-p&lt;/span&gt; HEAD^&lt;span class="o"&gt;{&lt;/span&gt;tree&lt;span class="o"&gt;}&lt;/span&gt;          &lt;span class="c"&gt;# show the tree it points to&lt;/span&gt;
git cat-file &lt;span class="nt"&gt;-t&lt;/span&gt; &amp;lt;&lt;span class="nb"&gt;hash&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;               &lt;span class="c"&gt;# ask Git what type an object is&lt;/span&gt;
git hash-object &lt;span class="nt"&gt;-w&lt;/span&gt; somefile.txt      &lt;span class="c"&gt;# manually create a blob, see the hash&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because objects are addressed by the hash of their content, a commit hash is really a hash of a hash of hashes, a fingerprint of the entire project history up to that point. This is exactly why changing anything in the past, even one character in one old commit, changes that commit's hash and every hash after it. That single fact explains why rebase produces new commit hashes and why Git history is described as immutable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Expert: Refs, HEAD, and Detached States
&lt;/h2&gt;

&lt;p&gt;A ref is a human friendly name that points at a commit hash. Branches live at &lt;code&gt;.git/refs/heads/&lt;/code&gt;, remote tracking branches at &lt;code&gt;.git/refs/remotes/&lt;/code&gt;, and tags at &lt;code&gt;.git/refs/tags/&lt;/code&gt;. &lt;code&gt;HEAD&lt;/code&gt; is special, it usually points at a branch, which then points at a commit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsgfh1z7xic9ai9cd5p9t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsgfh1z7xic9ai9cd5p9t.png" alt=" " width="800" height="63"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Diagram by Kali Kimanzi&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When you check out a specific commit hash instead of a branch, &lt;code&gt;HEAD&lt;/code&gt; points directly at that commit. This is called a detached HEAD.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frsxpbzgyo9op0lo2curg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frsxpbzgyo9op0lo2curg.png" alt=" " width="798" height="188"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Diagram by Kali Kimanzi&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A detached HEAD is not dangerous, it just means new commits you make will not belong to any branch. If you commit here and then switch to another branch without creating a new branch first, those commits become unreachable from any ref. They are not deleted immediately, but they will eventually be garbage collected. If you find yourself in a detached HEAD and want to keep your work, run &lt;code&gt;git switch -c new-branch-name&lt;/code&gt; before doing anything else.&lt;/p&gt;

&lt;h2&gt;
  
  
  Expert: The Reflog, Your Safety Net
&lt;/h2&gt;

&lt;p&gt;Even "unreachable" commits are not gone right away. Git keeps a local log of every place &lt;code&gt;HEAD&lt;/code&gt; has pointed, called the reflog, and it is the single most underused recovery tool in Git.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a1b2c3d HEAD@{0}: commit: fix login bug
e4f5g6h HEAD@{1}: checkout: moving from main to feature/login
i7j8k9l HEAD@{2}: reset: moving to HEAD~1
m0n1o2p HEAD@{3}: commit: initial version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Accidentally ran &lt;code&gt;git reset --hard&lt;/code&gt; and lost commits? Force pushed and overwrote a branch? As long as it is still within the reflog window (90 days by default for reachable commits), you can recover it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git reflog                        &lt;span class="c"&gt;# find the hash right before the disaster&lt;/span&gt;
git reset &lt;span class="nt"&gt;--hard&lt;/span&gt; HEAD@&lt;span class="o"&gt;{&lt;/span&gt;2&lt;span class="o"&gt;}&lt;/span&gt;         &lt;span class="c"&gt;# or: git checkout -b rescue-branch &amp;lt;hash&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Learn this one tool well. It has saved more careers than any other Git feature, and it is the reason the phrase "I force pushed and lost everything" is almost never actually true.&lt;/p&gt;

&lt;h2&gt;
  
  
  Expert: Interactive Rebase
&lt;/h2&gt;

&lt;p&gt;Interactive rebase lets you rewrite local history before sharing it: squash messy commits into one, reorder them, edit messages, or drop a commit entirely.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git rebase &lt;span class="nt"&gt;-i&lt;/span&gt; HEAD~4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This opens an editor with your last four commits listed oldest to newest:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pick a1b2c3d Add login form
pick e4f5g6h Fix typo
pick i7j8k9l Add validation
pick m0n1o2p Fix typo again
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change the keywords to control what happens:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Keyword&lt;/th&gt;
&lt;th&gt;Effect&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;pick&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;keep the commit as is&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;reword&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;keep the changes, edit the message&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;squash&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;merge into the previous commit, combine messages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;fixup&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;merge into the previous commit, discard this message&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;drop&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;remove the commit entirely&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pick a1b2c3d Add login form
fixup e4f5g6h Fix typo
pick i7j8k9l Add validation
fixup m0n1o2p Fix typo again
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save and exit, and those four messy commits become two clean ones. This is exactly how experienced developers keep a readable history despite committing constantly while actually working. The same rule from earlier still applies, only rebase commits that are still local and unpushed, or that you are certain nobody else has already pulled.&lt;/p&gt;

&lt;h2&gt;
  
  
  Expert: Cherry-pick and Bisect
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;cherry-pick&lt;/code&gt; copies a single commit from one branch onto another, creating a new commit with the same changes but a new hash and parent.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This is the tool for the common real world situation where a hotfix landed on &lt;code&gt;main&lt;/code&gt; and you need that exact fix on a &lt;code&gt;release&lt;/code&gt; branch too, without merging all of &lt;code&gt;main&lt;/code&gt;'s other changes.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;bisect&lt;/code&gt; performs a binary search through history to find the exact commit that introduced a bug. Instead of manually checking commits one by one, you tell Git one good commit and one bad commit, and it checks out the midpoint for you to test.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git bisect start
git bisect bad                 &lt;span class="c"&gt;# current commit has the bug&lt;/span&gt;
git bisect good v1.2.0         &lt;span class="c"&gt;# this old tag was fine&lt;/span&gt;
&lt;span class="c"&gt;# Git checks out a commit in the middle, you test it, then:&lt;/span&gt;
git bisect good   &lt;span class="c"&gt;# or: git bisect bad&lt;/span&gt;
&lt;span class="c"&gt;# repeat until Git names the exact commit that broke things&lt;/span&gt;
git bisect reset  &lt;span class="c"&gt;# return to where you started&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqkeqow41hgnpfpq1rbqr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqkeqow41hgnpfpq1rbqr.png" alt=" " width="800" height="76"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Diagram by Kali Kimanzi&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In a history of 1000 commits, bisect finds the culprit in about 10 tests instead of up to 1000, because it halves the search space every step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Expert: Workflows That Teams Actually Use
&lt;/h2&gt;

&lt;p&gt;The commands are the same everywhere, but teams organize branches differently depending on how often they release.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx77z5dsoe07re51wvx3e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx77z5dsoe07re51wvx3e.png" alt=" " width="800" height="783"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Diagram by Kali Kimanzi&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git Flow&lt;/strong&gt; uses long lived &lt;code&gt;develop&lt;/code&gt; and &lt;code&gt;main&lt;/code&gt; branches, plus &lt;code&gt;feature&lt;/code&gt;, &lt;code&gt;release&lt;/code&gt;, and &lt;code&gt;hotfix&lt;/code&gt; branches. It gives strong structure and suits products with scheduled releases, but it adds overhead that many fast moving teams find unnecessary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trunk based development&lt;/strong&gt; keeps everyone working off a single &lt;code&gt;main&lt;/code&gt; branch with short lived feature branches, often merged within a day. It pairs well with feature flags and continuous deployment, and it is what most modern SaaS companies use today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub flow&lt;/strong&gt; sits in between: branch from &lt;code&gt;main&lt;/code&gt;, open a pull request, review, merge, deploy. Simple, and the default most newer teams should reach for unless they have a specific reason not to.&lt;/p&gt;

&lt;p&gt;There is no universally correct choice. Pick the workflow that matches how often your team actually ships.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cheat Sheet
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# setup&lt;/span&gt;
git init
git clone &amp;lt;url&amp;gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.name &lt;span class="s2"&gt;"Kali Kimanzi"&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.email &lt;span class="s2"&gt;"you@example.com"&lt;/span&gt;

&lt;span class="c"&gt;# daily loop&lt;/span&gt;
git status
git add &amp;lt;file&amp;gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"message"&lt;/span&gt;
git push
git pull

&lt;span class="c"&gt;# branching&lt;/span&gt;
git switch &lt;span class="nt"&gt;-c&lt;/span&gt; &amp;lt;branch&amp;gt;
git switch &amp;lt;branch&amp;gt;
git branch &lt;span class="nt"&gt;-d&lt;/span&gt; &amp;lt;branch&amp;gt;
git merge &amp;lt;branch&amp;gt;
git rebase &amp;lt;branch&amp;gt;

&lt;span class="c"&gt;# inspecting&lt;/span&gt;
git log &lt;span class="nt"&gt;--oneline&lt;/span&gt; &lt;span class="nt"&gt;--graph&lt;/span&gt; &lt;span class="nt"&gt;--all&lt;/span&gt;
git diff
git show &amp;lt;&lt;span class="nb"&gt;hash&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
git blame &amp;lt;file&amp;gt;

&lt;span class="c"&gt;# undoing&lt;/span&gt;
git restore &amp;lt;file&amp;gt;              &lt;span class="c"&gt;# discard working directory changes&lt;/span&gt;
git restore &lt;span class="nt"&gt;--staged&lt;/span&gt; &amp;lt;file&amp;gt;     &lt;span class="c"&gt;# unstage, keep changes&lt;/span&gt;
git commit &lt;span class="nt"&gt;--amend&lt;/span&gt;              &lt;span class="c"&gt;# fix the last commit&lt;/span&gt;
git reset &lt;span class="nt"&gt;--soft&lt;/span&gt; HEAD~1         &lt;span class="c"&gt;# undo commit, keep changes staged&lt;/span&gt;
git reset &lt;span class="nt"&gt;--hard&lt;/span&gt; HEAD~1         &lt;span class="c"&gt;# undo commit, discard changes (careful)&lt;/span&gt;
git revert &amp;lt;&lt;span class="nb"&gt;hash&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;               &lt;span class="c"&gt;# safe undo, creates a new commit&lt;/span&gt;

&lt;span class="c"&gt;# recovery&lt;/span&gt;
git reflog
git reset &lt;span class="nt"&gt;--hard&lt;/span&gt; HEAD@&lt;span class="o"&gt;{&lt;/span&gt;n&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# advanced&lt;/span&gt;
git rebase &lt;span class="nt"&gt;-i&lt;/span&gt; HEAD~n
git cherry-pick &amp;lt;&lt;span class="nb"&gt;hash&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
git bisect start
git stash
git tag &lt;span class="nt"&gt;-a&lt;/span&gt; v1.0.0 &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"release"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;Git rewards understanding over memorization. Once you see that a branch is just a pointer, that a commit is just a snapshot linked to its parent, and that almost every command is a small, predictable operation on that graph, the tool stops feeling like magic. You stop fearing conflicts, detached HEADs, and rebases, because you know exactly what is happening underneath and you know the reflog has your back.&lt;/p&gt;

&lt;p&gt;Start with the three trees. Get comfortable branching and merging. Then, when you are ready, go read your own &lt;code&gt;.git&lt;/code&gt; folder with &lt;code&gt;cat-file&lt;/code&gt; and watch the object model become real in front of you. That is the moment Git actually clicks.&lt;/p&gt;

&lt;p&gt;If this guide helped you, follow along for more deep dives like this one.&lt;/p&gt;

&lt;p&gt;Kali Kimanzi&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Vision of One or the Vision of Many: A Dilemma in the Age of Innovation(Elon Musk or Jack Dorsey)</title>
      <dc:creator>kali kimanzi</dc:creator>
      <pubDate>Fri, 27 Oct 2023 15:29:46 +0000</pubDate>
      <link>https://dev.to/kalikimanzi/the-vision-of-one-or-the-vision-of-many-a-dilemma-in-the-age-of-innovationelon-musk-or-jack-dorsey-3okd</link>
      <guid>https://dev.to/kalikimanzi/the-vision-of-one-or-the-vision-of-many-a-dilemma-in-the-age-of-innovationelon-musk-or-jack-dorsey-3okd</guid>
      <description>&lt;p&gt;Imagine a solar system with a single star and many planets, each with its own orbit, rotation, and characteristics. Now imagine another solar system with multiple stars and fewer planets, each influenced by the gravitational forces of different stars. Which solar system is more stable, more diverse, and more conducive to life?&lt;/p&gt;

&lt;p&gt;This is the metaphor that comes to my mind when I think about the vision of one versus the vision of many in the world of technology and innovation. Should we follow the lead of a single visionary who has a clear and ambitious plan for the future, or should we embrace the diversity and creativity of many visionaries who have different perspectives and goals?&lt;/p&gt;

&lt;p&gt;A few years ago, if you had asked me this question, I would have told you that I believe in the vision of many. I would have argued that from chaos comes order, and that the vision of many creates chaos that fosters innovation and adaptation. I would have associated Jack Dorsey with the vision of many, not from his role as the CEO of Twitter, but from his involvement in Bitcoin, Nostr, and Primal, projects that aim to decentralize and democratize various aspects of society.&lt;/p&gt;

&lt;p&gt;But lately, I have been conflicted by the impressive achievements of Elon Musk, who epitomizes the vision of one. He has a grand vision for humanity that spans across multiple domains, such as space exploration, electric vehicles, renewable energy, neural interfaces, and artificial intelligence. He has demonstrated his ability to execute his vision with remarkable speed and efficiency, creating companies that disrupt and dominate their respective industries.&lt;/p&gt;

&lt;p&gt;Can the vision of one and the vision of many coexist and complement each other, or are they incompatible and competitive? While I have not lived long enough to witness the long-term outcomes of these two approaches, I can see from a distance that both have their merits and drawbacks. The vision of one can provide direction, focus, and scale, but it can also entail risk, rigidity, and monopoly. The vision of many can offer diversity, creativity, and resilience, but it can also result in fragmentation, confusion, and conflict.&lt;/p&gt;

&lt;p&gt;What does this mean for the computing systems of the future? Which approach has more advantages over the other, or should we reframe the question and look at how each approach has been implemented? Does this mean that centralized systems are not all that bad, or that decentralized systems are not all that good? Time will tell.&lt;/p&gt;

</description>
      <category>decentralization</category>
      <category>centralized</category>
      <category>systems</category>
    </item>
    <item>
      <title>The Daily Newsletter: Your Secret Weapon for Success in Software Engineering</title>
      <dc:creator>kali kimanzi</dc:creator>
      <pubDate>Tue, 24 Oct 2023 09:11:07 +0000</pubDate>
      <link>https://dev.to/kalikimanzi/the-daily-newsletter-your-secret-weapon-for-success-in-software-engineering-454g</link>
      <guid>https://dev.to/kalikimanzi/the-daily-newsletter-your-secret-weapon-for-success-in-software-engineering-454g</guid>
      <description>&lt;p&gt;As a software engineer, I know how important it is to keep up with the latest developments in technology. But with so much information out there, how can I find the time and energy to read everything?&lt;/p&gt;

&lt;p&gt;That’s why I have adopted a simple habit: reading a newsletter a day. Yes, you heard me right. Just one newsletter a day can make a huge difference in my skills and knowledge as a software engineer.&lt;/p&gt;

&lt;p&gt;Here are some of the benefits of reading a newsletter a day:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It provides concise information that summarizes the most important updates in software engineering.&lt;/li&gt;
&lt;li&gt;It offers curated content from reputable sources or industry experts who know what matters.&lt;/li&gt;
&lt;li&gt;It ensures regular updates that keep me informed about the latest trends, tools, and technologies in software engineering.&lt;/li&gt;
&lt;li&gt;It gives me diverse perspectives from different authors, which broaden my understanding and approach towards software engineering.&lt;/li&gt;
&lt;li&gt;It allows me to learn at my own pace, spending time on complex topics and skipping those that are not relevant to me.&lt;/li&gt;
&lt;li&gt;It creates networking opportunities with online communities or forums where I can interact, ask questions, and share ideas with like-minded professionals.
I have been reading a newsletter a day for the past few months and I can say that it has significantly improved my skills and knowledge as a software engineer. I have learned new things, discovered new tools, and gained new insights that have helped me in my work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re looking for an easy and effective way to stay updated and grow as a software engineer, I highly recommend reading a newsletter a day. You can find many newsletters that cater to your interests and needs online. Just pick one that resonates with you and make it part of your daily routine.&lt;/p&gt;

&lt;p&gt;Trust me, you won’t regret it!&lt;/p&gt;

</description>
      <category>newsletters</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>The Efficacy of Psychometric Tests in Identifying Proficient Software Engineers</title>
      <dc:creator>kali kimanzi</dc:creator>
      <pubDate>Mon, 23 Oct 2023 00:10:47 +0000</pubDate>
      <link>https://dev.to/kalikimanzi/the-efficacy-of-psychometric-tests-in-identifying-proficient-software-engineers-39pj</link>
      <guid>https://dev.to/kalikimanzi/the-efficacy-of-psychometric-tests-in-identifying-proficient-software-engineers-39pj</guid>
      <description>&lt;p&gt;In the recent past, I found myself taking a psychometric test that emphasized speed and accuracy. This approach seemed somewhat out of place to me. Is the essence of engineering truly about speed? Has the discipline been diminished to mere instincts, much like foreign exchange trading? While I recognize that engineering involves solving problems, I question whether reaching a solution more quickly is synonymous with reaching the safest solution.&lt;/p&gt;

&lt;p&gt;Engineering is not merely about finding solutions at a rapid pace. Accuracy is indeed a factor to consider, but it is not the sole determinant of a good engineering solution. Safety and resource efficiency must also be taken into account.&lt;/p&gt;

&lt;p&gt;Interestingly, psychometric tests seem to reduce engineering to an analytical approach, while in reality, engineering is largely a classical discipline.&lt;/p&gt;

&lt;p&gt;So, are psychometric tests the most effective way to determine if an engineer excels in their work? I would challenge this approach to some extent. From my own engineering experience, I have come to realize that solutions can arise from various perspectives and that quick thinking contributes minimally to effective engineering solutions.&lt;/p&gt;

&lt;p&gt;I believe that speed and accuracy only measure certain aspects of an individual engineer's quick thinking abilities. While these traits might be beneficial in certain fields like aviation engineering, I believe that they represent an inner layer - something innate - that has minimal influence on the overall effectiveness of an engineer.&lt;/p&gt;

&lt;p&gt;Finally, psychometric tests can be gamed. There are many resources available online and in books that teach people how to improve their performance on psychometric tests. This means that candidates who are good at taking tests may score higher than candidates who are more skilled in engineering.&lt;/p&gt;

&lt;p&gt;While there may not be a universally accepted approach to determine a good engineer, I am skeptical about the inclusion of psychometric tests in the hiring process. These tests may provide some insights but should not be the sole or primary determinant in the hiring decision.&lt;/p&gt;

</description>
      <category>pyschometricte</category>
      <category>aptitudetest</category>
    </item>
    <item>
      <title>Efficient String Splitting in Go: A Solution for Gophers Dealing with API Responses</title>
      <dc:creator>kali kimanzi</dc:creator>
      <pubDate>Tue, 27 Jun 2023 03:19:17 +0000</pubDate>
      <link>https://dev.to/kalikimanzi/efficient-string-splitting-in-go-a-solution-for-gophers-dealing-with-api-responses-38fh</link>
      <guid>https://dev.to/kalikimanzi/efficient-string-splitting-in-go-a-solution-for-gophers-dealing-with-api-responses-38fh</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When working with API responses in Go, Gophers often encounter the need to split strings based on a specific delimiter. This article aims to provide a solution to this common problem by presenting an efficient code snippet for string splitting in Go. By understanding and implementing this solution, Gophers can effortlessly separate string values, especially when dealing with API responses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Problem
&lt;/h2&gt;

&lt;p&gt;In the realm of API development, parsing and manipulating response data is an essential task. It's not uncommon to receive a string that needs to be split into separate parts based on a specific delimiter, such as a dollar sign ($). While Go provides built-in functions for string manipulation, knowing the most efficient way to split strings can greatly enhance a developer's productivity.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: String Splitting in Go
&lt;/h2&gt;

&lt;p&gt;To tackle this problem efficiently, we will leverage Go's standard library package &lt;code&gt;strings&lt;/code&gt; and its &lt;code&gt;Split&lt;/code&gt; function. The code snippet provided below demonstrates a clean and effective way to split a string using the dollar sign ($) as the delimiter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s"&gt;"fmt"&lt;/span&gt;
    &lt;span class="s"&gt;"strings"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;separateString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;// Split the string using the dollar sign ($) as the delimiter&lt;/span&gt;
    &lt;span class="n"&gt;parts&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;strings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"$"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c"&gt;// Remove any leading or trailing empty strings resulting from the split&lt;/span&gt;
    &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;part&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="k"&gt;range&lt;/span&gt; &lt;span class="n"&gt;parts&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;part&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;part&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;// Example usage&lt;/span&gt;
    &lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="s"&gt;"Hello$world$how$are$you?"&lt;/span&gt;
    &lt;span class="n"&gt;parts&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;separateString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Original String:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Separated Parts:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Results&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Original String: Hello$world$how$are$you?
Separated Parts: [Hello world how are you?]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By utilizing the &lt;code&gt;strings.Split&lt;/code&gt; function, the input string is split into separate parts based on the dollar sign ($) delimiter. To ensure clean results, the code snippet also removes any leading or trailing empty strings that may result from the split.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits and Use Cases
&lt;/h2&gt;

&lt;p&gt;The provided code snippet offers several benefits and can be applied in various scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;API Response Parsing&lt;/strong&gt;: When working with API responses, it's common to receive string data that needs to be parsed and processed. The efficient string splitting solution presented here can be a valuable asset in handling and extracting meaningful information from API responses.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Custom Delimiters&lt;/strong&gt;: While the code snippet uses the dollar sign ($) as the delimiter, it can be easily modified to work with other delimiters based on your specific requirements. This flexibility empowers developers to adapt the solution to a wide range of use cases.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved Productivity&lt;/strong&gt;: By understanding and implementing this efficient string splitting approach, Gophers can save valuable development time and effort. The solution provides a streamlined way to process and manipulate strings, making API response handling more convenient and less error-prone.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Working with API responses often requires Gophers to split strings based on specific delimiters. With the provided solution for efficient string splitting in Go, developers can handle this task effortlessly. By utilizing the &lt;code&gt;strings.Split&lt;/code&gt; function and incorporating the additional logic to remove empty strings, Gophers can extract meaningful information from API responses with ease. Armed with this knowledge, Gophers can enhance their productivity and streamline their string handling capabilities in Go.&lt;/p&gt;

</description>
      <category>go</category>
      <category>strings</category>
      <category>gophers</category>
    </item>
    <item>
      <title>Sending Gmail with Swiftmailer</title>
      <dc:creator>kali kimanzi</dc:creator>
      <pubDate>Mon, 12 Jul 2021 12:02:41 +0000</pubDate>
      <link>https://dev.to/kalikimanzi/sending-gmail-with-swiftmailer-22l6</link>
      <guid>https://dev.to/kalikimanzi/sending-gmail-with-swiftmailer-22l6</guid>
      <description>&lt;p&gt;adding mailing functionality to website is quite an essential part of website development. most website have this sections either in the contact us section, feedback sections among other sections like registration and sign up. It can be quite a hustle when you are beginner because we have you need to have a solutions that works without too much hassle, I prefer swift mailer because i find it straight of the box solutions compared to vanilla solutions and PHPMAILER(you are allowed to have an alternative view who cares though ). This tutorial assumes you have installed your XAMPP or whatever server you have there and also prior knowledge on PHP is a bonus .&lt;/p&gt;

&lt;p&gt;To avoid too much stories let's get straight to it.&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;Download swiftmailer&lt;/li&gt;
&lt;li&gt;create mailing script&lt;/li&gt;
&lt;li&gt;Enable your gmail account for IMAP&lt;/li&gt;
&lt;li&gt;Testing your mailing script &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. Download swiftmailer
&lt;/h2&gt;

&lt;p&gt;In your htdocs folder create your working director in my case i have named it &lt;strong&gt;sendmail.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;inside the sendmail directory install swiftmailer with &lt;strong&gt;composer&lt;/strong&gt;. Check also on the swiftmailer official website &lt;a href="https://swiftmailer.symfony.com/docs/introduction.html#installation"&gt;here&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="n"&gt;composer&lt;/span&gt; &lt;span class="k"&gt;require&lt;/span&gt; &lt;span class="s2"&gt;"swiftmailer/swiftmailer:^6.0"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Create mailing script
&lt;/h2&gt;

&lt;p&gt;This is a simple script which contains mailing function and html form, the message is hardcoded but for demonstration purpose. create this script inside your working directory eg &lt;strong&gt;sendmail&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;isset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$_POST&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;])){&lt;/span&gt;

&lt;span class="c1"&gt;//echo $_POST["email"] ;&lt;/span&gt;

&lt;span class="k"&gt;require_once&lt;/span&gt; &lt;span class="s1"&gt;'./vendor/autoload.php'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Create the Transport&lt;/span&gt;
&lt;span class="nv"&gt;$transport&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Swift_SmtpTransport&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'smtp.gmail.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;465&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'ssl'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;setUsername&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'putyouremail@gmail.com'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;setPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'putyouremailpassword'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Create the Mailer using your created Transport&lt;/span&gt;
&lt;span class="nv"&gt;$mailer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Swift_Mailer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$transport&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Create a message&lt;/span&gt;
&lt;span class="nv"&gt;$message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Swift_Message&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Mail tutorial '&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;setFrom&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s1"&gt;'putyouremail@gmail.com'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'sending mail tutorial'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
  &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;setTo&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nv"&gt;$_POST&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'testing the mail sending option '&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
  &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;setBody&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'congrats you have send your firstmail cheers to your new skill'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Send the message&lt;/span&gt;
&lt;span class="nv"&gt;$result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$mailer&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;placeholder = &lt;/span&gt;&lt;span class="s"&gt;"Email Me"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"Email me"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Enable your gmail account for IMAP
&lt;/h2&gt;

&lt;p&gt;after you have created this script use the following address to enable IMAP settings due to google security settings &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.google.com/settings/security/lesssecureapps"&gt;https://www.google.com/settings/security/lesssecureapps&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Testing your mailing script
&lt;/h2&gt;

&lt;p&gt;Run your script on local host and enjoying using it. you can create complicated mailing systems with swiftmailer among other things. Happy coding&lt;/p&gt;

&lt;h2&gt;
  
  
  ABOUT ME
&lt;/h2&gt;

&lt;p&gt;I hope you have liked this article.&lt;br&gt;
I am Kali Kimanzi a Masters student Energy Informatics at University of Applied Sciences Upper Austria, I am also a software developer at NTUITY a brand of neoom group Gmbh Wien | Freistadt. I take interest in Data sciences using python and I use python libraries like pandas, numpy and Matplotlib. I specialize in Python, PHP/Laravel, Java.&lt;br&gt;
Social media links&lt;br&gt;
Kali kimanzi @ Facebook: Kali Kimanzi&lt;br&gt;
Kali Kimanzi @ Linkedin: Kali Kimanzi&lt;br&gt;
Kali Kimanzi @ instagram : Kali_Kimanzi&lt;br&gt;
Kali Kimanzi GitHub: Kali Kimanzi&lt;br&gt;
kali kimanzi Twitter : Kali Kimanzi&lt;/p&gt;

</description>
      <category>smtp</category>
      <category>php</category>
      <category>swiftmailer</category>
      <category>gmail</category>
    </item>
    <item>
      <title>HOW TO PUT A ANGULAR APPLICATION TO A DOCKER CONTAINER</title>
      <dc:creator>kali kimanzi</dc:creator>
      <pubDate>Wed, 05 Aug 2020 14:03:25 +0000</pubDate>
      <link>https://dev.to/kalikimanzi/how-to-put-a-angular-application-to-a-docker-container-496j</link>
      <guid>https://dev.to/kalikimanzi/how-to-put-a-angular-application-to-a-docker-container-496j</guid>
      <description>&lt;p&gt;I have read quite complicated articles on how to deploy an Angular application to a docker container that is why I am motivated to write this simplest step by step guide to putting your angular app to docker container&lt;/p&gt;

&lt;p&gt;1 Assuming you have already created your app and now you want to dockerize it. run the code below to create a dist folder in your application folder&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ng build&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;2 create a file called Dockerfile under root of your application as illustrated below&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fVwzXs1q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/i1ip1j0pkso1k84kx2n1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fVwzXs1q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/i1ip1j0pkso1k84kx2n1.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3 copy following code to your Dockerfile&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM node:alpine AS my-app-build
WORKDIR /app
COPY . .
RUN npm install &amp;amp;&amp;amp; npm run build

FROM nginx:alpine
COPY --from=my-app-build /app/dist/{name-of-your-application} /usr/share/nginx/html
EXPOSE 80
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;4 Now your application is ready to be put in a docker container. this tutorial assumes you have downloaded docker and a copy is running locally on your machine. if you have not downloaded the docker application visit the Docker website to download the version suitable for your machine&amp;nbsp;. when all that has been set up use the code below to build image for your application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// docker build -t name-of-container:tag-of-image .
docker build -t my-application-container:latest . 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;5 To start your application locally and test it on a browser run&lt;br&gt;
&lt;code&gt;docker run --publish 80:80 --detach --name bb bulletinboard:lastest&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I hope you enjoyed this tutorial. i will write more tutorials on how to deploy your Docker container on Azure.&lt;/p&gt;

</description>
      <category>angular</category>
      <category>docker</category>
    </item>
    <item>
      <title>Finding a minimum number in a Java Array</title>
      <dc:creator>kali kimanzi</dc:creator>
      <pubDate>Fri, 10 Jan 2020 10:35:38 +0000</pubDate>
      <link>https://dev.to/kalikimanzi/finding-a-minimum-number-in-a-java-array-5hc</link>
      <guid>https://dev.to/kalikimanzi/finding-a-minimum-number-in-a-java-array-5hc</guid>
      <description>&lt;p&gt;Sometime back we were given a java assignment but I realized the concepts looked easy but some of my friends had problems implementing them that is why I have decided to be sharing some of the java assignments that I have done in the past to help students and learners who are new to programming in java.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Question:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Write a function int findMin (int[] numbers), which yields the smallest element of numbers that contains positive integers. The result shall be -1, if numbers has the value null or the array does exclusively contain positive integers. Use several test cases.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Java Source Code:&lt;/b&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;FindingMinimum&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// int[] numbers =null;&lt;/span&gt;
        &lt;span class="c1"&gt;// System.out.println(x);&lt;/span&gt;
        &lt;span class="c1"&gt;// int[] numbers= {2,3,4,5,6,20,1,-5};&lt;/span&gt;
        &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;};&lt;/span&gt;
        &lt;span class="c1"&gt;//int[] numbersSet1= {2,3,4,5,6,20,1,-5};&lt;/span&gt;

        &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;minimumNumber&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;findMin&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"The Minimum number is :\t"&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;minimumNumber&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="c1"&gt;//minimumNumber = findMin(numbersSet1);&lt;/span&gt;
        &lt;span class="c1"&gt;//System.out.println("The Minimum number is :\t"+minimumNumber);&lt;/span&gt;

    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;findMin&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;minValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;];&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;isExclusivePositive&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

            &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;minValue&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                    &lt;span class="n"&gt;minValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;];&lt;/span&gt;
                &lt;span class="o"&gt;}&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;minValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;minValue&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;boolean&lt;/span&gt; &lt;span class="nf"&gt;isExclusivePositive&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;];&lt;/span&gt;

            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="o"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/p&gt;

&lt;pre&gt;The Minimum number is : 1
&lt;/pre&gt;

&lt;p&gt;I hope you have liked this article.&lt;/p&gt;

&lt;p&gt;I am Kali Kimanzi a Masters student at University of Applied Sciences Upper Austria, I am a software developer at NTUITY a brand of neoom group gmbh Wien | Freistadt. I take interest in Data sciences using python and i use python libraries like pandas, numpy and Matplotlib. I specialize in Python, PHP/Laravel, Java. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Social media links&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Kali kimanzi @ Facebook: &lt;a href="https://www.facebook.com/Kalikimcel"&gt;Kali Kimanzi  &lt;/a&gt;&lt;br&gt;
Kali  Kimanzi @  Linkedin: &lt;a href="http://linkedin.com/in/kalikimanzi"&gt;Kali Kimanzi&lt;/a&gt;&lt;br&gt;
Kali  Kimanzi @ instagram : &lt;a href="https://www.instagram.com/kalikimanzi/"&gt;Kali Kimanzi &lt;/a&gt;&lt;br&gt;
Kali Kimanzi  GitHub: &lt;a href="https://github.com/kalikim"&gt;Kali Kimanzi  &lt;/a&gt;&lt;br&gt;
kali kimanzi Twitter : &lt;a href="https://twitter.com/karliekimcel"&gt; Kali Kimanzi &lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>arrays</category>
    </item>
    <item>
      <title>Writing Python Api with Flask RESTful</title>
      <dc:creator>kali kimanzi</dc:creator>
      <pubDate>Thu, 09 Jan 2020 22:20:15 +0000</pubDate>
      <link>https://dev.to/kalikimanzi/writing-python-api-with-flask-restful-1ogo</link>
      <guid>https://dev.to/kalikimanzi/writing-python-api-with-flask-restful-1ogo</guid>
      <description>&lt;p&gt;I had been working on a python application, Now it came to the section where I had to write an API for my application. it was such a headache because I was a newbie on Api's and I had little understanding of APIs. So I spend so much time online reading about APIs and how to integrate one to my application. it all looked like rocket science from most of the articles I went through. that is why I decided to come up with this article. it will take you through implementing a simple API, Later I will come up with a more detailed article though this code will take you through most of the basics of flask RESTful API and how to create one successfully. &lt;br&gt;
I have put comments on my code for clarification and detailed walkthrough.&lt;/p&gt;

&lt;p&gt;everything that starts with # is a comment, I believe if you are reading the article you have an understanding of python coding. hope you will like this article.&lt;br&gt;
The concept of using classes with python has been covered in this article to help you have full understanding. I will write a more advanced article for now this &lt;br&gt;
article is for absolute beginners &lt;/p&gt;

&lt;h2&gt;
  
  
  what the application below does
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Receives json file and extracts the json values that are then used for computation &lt;/li&gt;
&lt;li&gt;After computation, the application creates a JSON file. this request can be done through postman which enable to make api calls and request.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Before i begin this article it would be nice if share how the file structure looks on my pycharm IDE.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MeV4UEC1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/vrebue0mef8b4w2mbiau.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MeV4UEC1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/vrebue0mef8b4w2mbiau.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;This is the main file for your flask
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from flask import Flask, jsonify, request
#importing flask restful extenstion
from flask_restful import Resource, Api

#importing a class from a package called ntuity in the application

from ntuity.ntuityprac import  #importing a class from a package called ntuity

app = Flask(__name__)
*api=Api(app)


##class Kamau(Resource):

    def post(self):
        jsonval=request.get_json()
        content=jsonval.get("number")
        sum=10*content
        bestie=["welcome", 525, "kiza"]
        return jsonify({"sum":sum,"kenya":bestie})

class Kithome(Resource):
    p=NtuityPrac() #class object
    getval=p.get_square
    getsum=p.get_sum


    def post(self):
        jsonval = request.get_json()
        content = jsonval.get("number")
        get_add=self.getsum(content)
        get_sum=self.getval(content)
        return jsonify({"square":get_sum, "sum":get_add})


api.add_resource(Kamau,'/kama')
api.add_resource(Kithome,'/kithome')
if __name__ == '__main__':
    app.run()

below is the imported class from a package has two methods 

1. get_square()
2. get_sum()


class NtuityPrac:
#this class has two methods get square and get sum
    def get_square(self,num1):
        return num1*num1

    def get_sum(self, num1):
        return num1+num1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This a post man json request to kithome endpoint&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WEtSr5di--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ipor9i038s0mdrbvuwyn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WEtSr5di--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ipor9i038s0mdrbvuwyn.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The output of this request is json file with sum and square&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8M_UgQGa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/30q2ngadzu7leqljsqjj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8M_UgQGa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/30q2ngadzu7leqljsqjj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you have liked this article.&lt;/p&gt;

&lt;p&gt;I am Kali Kimanzi a Masters student Energy Informatics at University of Applied Sciences Upper Austria, I am also a software developer at NTUITY a brand of neoom group gmbh Wien | Freistadt. I take interest in Data sciences using python and i use python libraries like pandas, numpy and Matplotlib. I specialize in Python, PHP/Laravel, Java. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Social media links&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Kali kimanzi @ Facebook: &lt;a href="https://www.facebook.com/Kalikimcel"&gt;Kali Kimanzi  &lt;/a&gt;&lt;br&gt;
Kali  Kimanzi @  Linkedin: &lt;a href="http://linkedin.com/in/kalikimanzi"&gt;Kali Kimanzi&lt;/a&gt;&lt;br&gt;
Kali  Kimanzi @ instagram : &lt;a href="https://www.instagram.com/kalikimanzi/"&gt;Kali Kimanzi &lt;/a&gt;&lt;br&gt;
Kali Kimanzi  GitHub: &lt;a href="https://github.com/kalikim"&gt;Kali Kimanzi  &lt;/a&gt;&lt;br&gt;
kali kimanzi Twitter : &lt;a href="https://twitter.com/karliekimcel"&gt; Kali Kimanzi &lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>flask</category>
      <category>restfulapi</category>
    </item>
    <item>
      <title>Nesting For loops in Java</title>
      <dc:creator>kali kimanzi</dc:creator>
      <pubDate>Wed, 08 Jan 2020 17:28:32 +0000</pubDate>
      <link>https://dev.to/kalikimanzi/nesting-for-loops-in-java-4p08</link>
      <guid>https://dev.to/kalikimanzi/nesting-for-loops-in-java-4p08</guid>
      <description>&lt;p&gt;this program aims at demystifying the headache behind nesting of for loops in java and other programming languages&lt;/p&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@kalikim/Understanding-nesting-of-for-loops?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;
?signin=true

</description>
      <category>replit</category>
      <category>java</category>
    </item>
  </channel>
</rss>
