<?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[Parvez's Blog]]></title><description><![CDATA[A blog created as a part of chaicode's Jan 2026 Web Dev Cohort. Mainly for my assignments, but I may write a few of my own articles. A follow would be appreciated! :)]]></description><link>https://parvezr-chaicode2026.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 19 Jun 2026 05:36:20 GMT</lastBuildDate><atom:link href="https://parvezr-chaicode2026.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[DNS Record Types Explained]]></title><description><![CDATA[Have you ever wondered when you type a website on your browser, how it finds that exact server that hosts that site among a gazillion sites on the internet? This is where the “magic” of DNS comes in.
What is DNS?
DNS stands for Domain Name System. Th...]]></description><link>https://parvezr-chaicode2026.hashnode.dev/dns-record-types-explained</link><guid isPermaLink="true">https://parvezr-chaicode2026.hashnode.dev/dns-record-types-explained</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[chaicode webdev cohort 2026]]></category><category><![CDATA[#dnsrecords]]></category><category><![CDATA[dns]]></category><dc:creator><![CDATA[Parvez Rashid]]></dc:creator><pubDate>Sun, 15 Feb 2026 18:26:54 GMT</pubDate><content:encoded><![CDATA[<p>Have you ever wondered when you type a website on your browser, how it finds that exact server that hosts that site among a gazillion sites on the internet? This is where the “magic” of DNS comes in.</p>
<h3 id="heading-what-is-dns">What is DNS?</h3>
<p>DNS stands for Domain Name System. Think of it like your phone’s contacts app.</p>
<ul>
<li><p>You search for a name</p>
</li>
<li><p>Your phone finds the number</p>
</li>
<li><p>You tap the name instead of memorising the number</p>
</li>
</ul>
<p>So, DNS basically translates names to numbers. But what names? What numbers?</p>
<p>Humans like names:</p>
<ul>
<li><p><a target="_blank" href="http://google.com">google.com</a></p>
</li>
<li><p><a target="_blank" href="http://netflix.com">netflix.com</a></p>
</li>
</ul>
<p>Computers prefer numbers (IP addresses):</p>
<ul>
<li>142.250.182.14</li>
</ul>
<p>DNS is a global system responsible for mapping human-readable hostnames to their corresponding Internet Protocol (IP) addresses. For example, if you want to access a website using a domain name like <a target="_blank" href="http://example.com">example.com</a>, that domain name must point to a valid IP address.</p>
<p>The human-readable hostname is a string of words that are easy to remember. IP addresses, on the other hand, contain numbers separated by dots and are harder to remember. For example, <a target="_blank" href="http://example.com">example.com</a> is the human-readable domain name, while 93.184.216.34 is the current IP address for <a target="_blank" href="http://example.com">example.com</a>. Also, note that the IP address associated with a domain name may change depending on the server hosting the website.</p>
<h3 id="heading-why-dns-records-are-required">Why DNS Records Are Required</h3>
<p>A domain name is of no use unless the internet knows:</p>
<ul>
<li><p>which server hosts the website</p>
</li>
<li><p>which server handles email</p>
</li>
<li><p>who controls/owns the domain</p>
</li>
<li><p>extra configuration and security info</p>
</li>
</ul>
<p>DNS records basically have instruction for the internet for <em>what to do</em> with the domain name.</p>
<h3 id="heading-types-of-dns-records">Types of DNS records</h3>
<p>The following are the five major DNS record types:</p>
<ul>
<li><p>A record</p>
</li>
<li><p>AAAA record</p>
</li>
<li><p>CNAME record</p>
</li>
<li><p>Nameserver (NS) record</p>
</li>
<li><p>Mail exchange (MX) record</p>
</li>
</ul>
<p>There are other types too like TXT, SOA, DNAME, etc. We will only briefly touch upon the TXT record.</p>
<ol>
<li><p><strong>A record:</strong> The A record is the most important DNS record type. The "A" in A record stands for "address." The main use of A record is for IP address lookup. Using an A record, a web browser is able to load a website using the domain name. As a result, we can access websites on the internet without knowing their IP addresses. Note that the A record only supports IPV4 addresses, which look something like <code>142.250.182.14</code>.</p>
</li>
<li><p><strong>AAAA record:</strong> AAAA record, just like A record, point to the IP address for a domain. However, this DNS record type is different in the sense that it points to IPV6 addresses. IPV6 is an upgrade over IPV4 as it offers more IP addresses, as the internet keeps growing and we're running out of unique IPV4 addresses. An IPV6 address looks something like <code>3001:0db7:3c5d:0024:0000:0000:1a2f:3c1b</code></p>
</li>
<li><p><strong>CNAME record:</strong> CNAME - or, in full, "canonical name" - s a DNS record that points a domain name (an <em>alias</em>) to another domain. In a CNAME record, the alias doesn't point to an IP address. And the domain name that the alias points to is the canonical name. For example, the subdomain <a target="_blank" href="http://ng.example.com">ng.example.com</a> can point to <a target="_blank" href="http://example.com">example.com</a> using CNAME. Here <a target="_blank" href="http://example.com">example.com</a> points to the actual IP address using an A record. A practical example for the use of CNAME records is running multiple subdomains for different purposes on the same server. For example, we can use <a target="_blank" href="http://ftp.example.com">ftp.example.com</a> for file transfer protocol (FTP) and serve webpages via <a target="_blank" href="http://www.example.com">www.example.com</a>. We can then use a CNAME record to point both subdomains to <a target="_blank" href="http://example.com">example.com</a>. The main domain <a target="_blank" href="http://example.com">example.com</a> then points to the server's IP address using an A record.</p>
</li>
<li><p><strong>NS record:</strong> A nameserver (NS) record specifies the authoritative DNS server for a domain. In other words, the NS record helps point to where internet applications like a web browser can find the IP address for a domain name. Usually, multiple nameservers are specified for a domain. For example, these could look like <a target="_blank" href="http://ns1.examplehostingprovider.com">ns1.examplehostingprovider.com</a> and <a target="_blank" href="http://ns2.examplehostingprovider.com">ns2.examplehostingprovider.com</a>.</p>
</li>
<li><p><strong>MX record:</strong> A mail exchange (MX) record shows where emails for a domain should be routed to. In other words, an MX record makes it possible to direct emails to a mail server. With an MX record, it's possible to hand off emails to a dedicated email server. For example, you can decide to leave all the trouble of setting up webmail on a server you own to a specialized email provider. This comes with many benefits, including custom email clients for reading and sending emails, and improved security and spam filters.</p>
</li>
<li><p><strong>TXT record:</strong> TXT stands for "text," and this record type lets the owner of a domain store text values in the DNS. Several services use this record to verify ownership of a domain, email security among other purposes.</p>
</li>
</ol>
<h3 id="heading-how-all-dns-records-work-together-for-one-website">How All DNS Records Work Together for One Website</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771179967797/060903ac-ab56-4768-a9d8-f4d87b362a72.png" alt class="image--center mx-auto" /></p>
<p>Let’s say we own a domain <code>example.com</code>. The way it all works together is:</p>
<ol>
<li><p><strong>NS records</strong> tell which DNS servers control <a target="_blank" href="http://example.com">example.com</a>.</p>
</li>
<li><p><strong>A / AAAA records</strong> tell browsers where the website server is.</p>
</li>
<li><p><strong>CNAME records</strong> create aliases like <a target="_blank" href="http://www.example.com"><code>www.example.com</code></a>.</p>
</li>
<li><p><strong>MX records</strong> tell email systems where to send mail.</p>
</li>
<li><p><strong>TXT records</strong> verify ownership and secure email.</p>
</li>
</ol>
<p>So when you visit a website:</p>
<ul>
<li><p>Browser asks DNS: “Where is <a target="_blank" href="http://example.com">example.com</a>?”</p>
</li>
<li><p>DNS follows NS → A/AAAA → IP</p>
</li>
<li><p>Browser connects to the server</p>
</li>
</ul>
<p>When you send an email:</p>
<ul>
<li><p>Mail server asks DNS: “Where is <a target="_blank" href="http://example.com">example.com</a>’s mail server?”</p>
</li>
<li><p>DNS returns MX → mail server address</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Git for Beginners: Basics and Essential Commands]]></title><description><![CDATA[What is Git and why is it used?
Git, created by Linus Torvalds in 2005, is something we call a version control system or VCS. Now what is a VCS, you may ask? A VCS is a software tool that helps manage changes to source code (or any data) over time.

...]]></description><link>https://parvezr-chaicode2026.hashnode.dev/git-for-beginners-basics-and-essential-commands</link><guid isPermaLink="true">https://parvezr-chaicode2026.hashnode.dev/git-for-beginners-basics-and-essential-commands</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[chaicode webdev cohort 2026]]></category><category><![CDATA[Git]]></category><category><![CDATA[gitforbeginners]]></category><category><![CDATA[Git for Beginners]]></category><dc:creator><![CDATA[Parvez Rashid]]></dc:creator><pubDate>Fri, 13 Feb 2026 14:08:36 GMT</pubDate><content:encoded><![CDATA[<h3 id="heading-what-is-git-and-why-is-it-used">What is Git and why is it used?</h3>
<p>Git, created by Linus Torvalds in 2005, is something we call a version control system or VCS. Now what is a VCS, you may ask? A VCS is a software tool that helps manage changes to source code (or any data) over time.</p>
<blockquote>
<p>Git is a system that tracks changes to source code over time.</p>
</blockquote>
<p>In basic terms, Git helps us store what changed, who changed it, and when it changed. It even allows us to revert to a specific “version” of the code or file if needed (often done if any change ends up breaking the code!). It also allows collaboration with multiple developers, and gracefully manages simultaneous changes to the same code. If you want to understand why we even need systems like Git, read my other article <a target="_blank" href="https://parvezr-chaicode2026.hashnode.dev/why-version-control-exists-the-pendrive-problem">here</a>. It is an industry standard as almost every software organisation uses a platform that uses Git, most famously Github, and a few others like BitBucket, GitLab, etc.</p>
<h3 id="heading-basic-terms">Basic terms</h3>
<ul>
<li><p><strong>Repository (Repo):</strong> This is the folder that git tracks. It contains your project files, and also Git’s metadata and history. Any folder in your system can be made into a Git repo by running the command <code>git init</code> inside it.</p>
</li>
<li><p><strong>Branch:</strong> It is like a separate workspace where changes can be made without affecting the original codebase. Branches can be a new version of a repository, experimental changes, or personal <em>forks</em> (refer below) of a repo for users to make and test change<strong>s.</strong> The default or top level branch is usually the <code>main</code> (or <code>master</code>) branch. Other branches (usually called feature branches) can be created from <code>main</code>.</p>
</li>
<li><p><strong>Commit:</strong> If you’ve ever played video games, you can think of it as a save game. It saves your progress at a point in time. If you are WASTED (if you get the reference, we’re friends) at any point in the game, latest save game is loaded. Similarly, a commit is a snapshot of your project at a specific point in time, with a message describing what changed, and who changed it. You can always go back to a previous commit if you need to (in case anything “breaks”).</p>
</li>
<li><p><strong>HEAD:</strong> It is a reference to your current position in Git history. By default, it points to the latest commit of the current branch. So, if you make a new commit to the same branch, the HEAD will point to that commit. You can even switch to a different branch, then the HEAD will point to the latest commit of that branch.</p>
</li>
<li><p><strong>Fork:</strong> A copy of any repository, usually done to make your own customised version or build on top of that codebase.</p>
</li>
<li><p><strong>Checkout:</strong> Refers to switching between branches in a repo. Syntax is: <code>git checkout &lt;branch-name&gt;</code>. So if you hear someone say checkout to <code>main</code> or checkout to <code>feature-a</code>, they’re telling you to switch to that branch.</p>
</li>
<li><p><strong>Push:</strong> Updates a remote with the commits made to the current branch using the <code>git push</code> command. You are literally "pushing" your changes to the remote.</p>
</li>
<li><p><strong>Pull:</strong> Simply means retrieving updates from remote into your local environment. Usually done with <code>git pull</code> command, which is technically <code>git fetch</code> + <code>git merge</code>. In short, <code>git fetch</code> downloads new changes, <code>git merge</code> applies those changes to your local.</p>
</li>
<li><p><strong>Remote:</strong> A copy of the original repo. It simply points to another “version” of the repo, which usually resides on a server like GitHub. So if you create a repo on your machine, that is your local repo. You then push it to GitHub, then that repo becomes the remote. This repo will be used by you and other collaborators to push and pull changes.</p>
</li>
<li><p><strong>Origin:</strong> The default name for the primary version of a repository. Git also uses <code>origin</code> as a system alias for pushing and fetching data to and from the primary branch. For example, <code>git push origin main</code>, when run on a remote, will push the changes to the main branch of the primary repository.</p>
</li>
</ul>
<h3 id="heading-git-workflow">Git workflow</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770989795391/70047e30-7c41-470c-a6d9-ff52c56549a7.png" alt class="image--center mx-auto" /></p>
<p>The above figure roughly represents how git organises your workflow. There are three main areas:</p>
<ol>
<li><p>Working directory - where your files reside and you make changes</p>
</li>
<li><p>Staging area - where you prepare changes for committing</p>
</li>
<li><p>Repository - where Git permanently stores commits</p>
</li>
</ol>
<h3 id="heading-essential-commands">Essential commands</h3>
<ul>
<li><p><strong>git init</strong>: Initialises git in your project folder. This creates a .git folder within your project folder that git uses to track your content. If you want to know more about the .git folder, read a part of my other article <a target="_blank" href="https://parvezr-chaicode2026.hashnode.dev/inside-git-how-it-works#heading-understanding-the-git-folder">here</a>.</p>
</li>
<li><p><strong>git add</strong>: Adds files you want to track in the “staging area”, which means that you intend to commit these files. Syntax is <code>git add &lt;file-name&gt;</code> but usually use <code>git add .</code> to add <strong>all files</strong> in the workspace to the staging area.</p>
</li>
<li><p><strong>git commit</strong>: Creates a snapshot of the staged changes. Once you commit, the changes/files are ready to be pushed to remote. Syntax: <code>git commit -m “commit-message”</code>. The commit message is a short and meaningful description of the changes.</p>
</li>
<li><p><strong>git push</strong>: Pushes your changes to the remote.</p>
</li>
<li><p><strong>git branch</strong>: Lists all branches</p>
</li>
<li><p><strong>git status</strong>: Shows the current state of the repo like which files were modified, which ones are new, what changes are staged, etc.</p>
</li>
<li><p><strong>git log</strong>: It shows the commit history of the repo, which includes commit hash (unique ID), author, date, commit message. Below is a rough representation of how commits work and how commit history may be shown.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770991214492/b3a6d9a3-0671-4b57-a310-a92fdade77ab.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-basic-git-workflow">Basic Git workflow</h3>
<p>This is a follow along so that you can make your first git commit! All commands will be from terminal (cmd or powershell for Windows).</p>
<ol>
<li>Create a new project: You can create a new folder anywhere on your system and go into that folder.</li>
</ol>
<p><code>mkdir new-project</code></p>
<p><code>cd new-project</code></p>
<ol start="2">
<li><p>Initialise git: <code>git init</code></p>
</li>
<li><p>Create a file: <code>touch index.html</code></p>
</li>
<li><p>Check status: <code>git status</code></p>
</li>
<li><p>Add file to staging area: <code>git add index.html</code></p>
</li>
<li><p>Commit changes: <code>git commit -m “add index.html”</code></p>
</li>
</ol>
<p>Congratulations! You’ve just made your first git commit.</p>
]]></content:encoded></item><item><title><![CDATA[Inside Git: How It Works]]></title><description><![CDATA[As software professionals, Git is a part of our daily lives. Terms like fetch, merge, pull, commit are etched into our minds. But how many of us actually know how Git works behind the scenes? How it is able to keep track of every change and give us t...]]></description><link>https://parvezr-chaicode2026.hashnode.dev/inside-git-how-it-works</link><guid isPermaLink="true">https://parvezr-chaicode2026.hashnode.dev/inside-git-how-it-works</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[chaicode webdev cohort 2026]]></category><category><![CDATA[Git]]></category><category><![CDATA[Git-Internals]]></category><dc:creator><![CDATA[Parvez Rashid]]></dc:creator><pubDate>Wed, 11 Feb 2026 16:57:27 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/UT8LMo-wlyk/upload/8dd97a749c5bcbb6e500eb0b09e88e98.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As software professionals, Git is a part of our daily lives. Terms like fetch, merge, pull, commit are etched into our minds. But how many of us actually know how Git works behind the scenes? How it is able to keep track of every change and give us the exact code whenever we want?</p>
<h2 id="heading-what-is-git">What is Git?</h2>
<p>Git is something called a Version Control System. If you want to read more on version control systems and why we need them, visit my other <a target="_blank" href="https://hashnode.com/post/cmkgatwm3000502kyhl9xa39l">article</a>. In short, it basically tracks changes to any kind of content, it does not even have to be a software project. It can track changes to any kind of file. According to Git’s own home page:</p>
<blockquote>
<p>Git is a <a target="_blank" href="https://git-scm.com/about/#free-and-open-source">free and open source</a> <a target="_blank" href="https://git-scm.com/about/#free-and-open-source">distributed version</a> control system designed to handle everything from small to very large projects with speed and efficiency.</p>
</blockquote>
<p>That was basic stuff, but if we want to be a bit more technical, we could say that Git is a content-addressable filesystem. That means in essence, Git works with a simple key-value data store. The key is the content address, and the value is the data/content. If you want to read more on this, visit Git’s own book <a target="_blank" href="https://git-scm.com/book/en/v2/Git-Internals-Git-Objects">here</a>.</p>
<h2 id="heading-how-does-git-track-stuff">How does Git track stuff?</h2>
<p>Git will assign a unique key to the value (whatever content we want to track), and it is basically converted into a series of bytes. Whenever there is change or an update to the value, Git stores the new value and creates a hash key for it using SHA-1. These keys allow Git to identify the specific value. If the value is the same (no change in content) then the same hash key will be generated.</p>
<h2 id="heading-understanding-the-git-folder">Understanding the .git folder</h2>
<p>The <code>.git</code> folder provides all of the information that Git needs to track changes to your codebase and is a key component of the Git workflow.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769923194456/1ddf3e7b-ca3f-425d-8047-58ed0ad88e52.png" alt class="image--center mx-auto" /></p>
<p>Let's begin with a summary of the contents of the .git folder before getting into the specifics. The .git folder is created in your project's root directory when you setup a new Git repository. Various files and folders containing details about your codebase can be found inside this folder.</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Content</strong></td><td><strong>Description</strong></td></tr>
</thead>
<tbody>
<tr>
<td><code>HEAD</code> File</td><td>Keeps track of the current branch</td></tr>
<tr>
<td><code>refs</code> Folder</td><td>Stores references to commits and branches</td></tr>
<tr>
<td><code>objects</code> Folder</td><td>Stores codebase as a series of snapshots</td></tr>
<tr>
<td><code>config</code> File</td><td>Stores configuration information for Git</td></tr>
<tr>
<td><code>hooks</code> Folder</td><td>Runs scripts at specific points in the Git workflow</td></tr>
</tbody>
</table>
</div><ul>
<li><h3 id="heading-the-head-file-keeps-track-of-the-current-branch"><strong>The</strong> <code>HEAD</code> file: Keeps track of the current branch</h3>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769923897244/7940d4dc-2650-4346-8e07-82ead50ba741.png" alt class="image--center mx-auto" /></p>
<p>The HEAD file is a basic text file containing the SHA hash of the currently checked-out commit in your repository. This file is used to monitor your current branch and is automatically updated each time you checkout a certain commit or switch branches.</p>
<ul>
<li><h3 id="heading-the-refs-folder-stores-references-to-commits-and-branches"><strong>The</strong> <code>refs</code> folder: Stores references to commits and branches</h3>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769951654084/c0179fae-986c-41b7-b839-d9da2b15a492.png" alt class="image--center mx-auto" /></p>
<p>Git keeps references to commits and branches of the repository in the <code>refs</code> folder. There are many subfolders in this folder, and each one represents a different kind of reference. For example, references to the heads of branches in repository is present in the <code>heads</code> subfolder, and references to any tags created is present in the <code>tags</code> subfolder.</p>
<h3 id="heading-the-objects-folder-stores-codebase-as-a-series-of-snapshots"><strong>The</strong> <code>objects</code> folder: stores codebase as a series of snapshots</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770265236468/8e0f3f0a-c461-444a-9cad-18b69829f61c.png" alt class="image--center mx-auto" /></p>
<p>The <code>objects</code> folder is where the codebase itself is stored as a series of <em>snapshots</em> (more on objects later). Each snapshot represents the state of the codebase at a specific point in time, and Git uses these to track changes to the code over time. Inside this folder, there are subfolders info and pack. pack contains compressed snapshots of the codebase, and info contains metadata about those snpashots.</p>
<h3 id="heading-the-config-file-stores-configuration-information-for-git"><strong>The</strong> <code>config</code> file: stores configuration information for Git</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770266285005/000cbb16-12cf-4be5-9ddc-902d3df05e8e.png" alt class="image--center mx-auto" /></p>
<p>In the config file, Git stores information about the repository. This includes various settings that control how Git behaves, such as the username and email address, the default branch for checkouts, and Git’s behaviour for merge and diff tools.</p>
<h3 id="heading-the-hooks-folder-runs-scripts-at-specific-points-in-the-git-workflow"><strong>The</strong> <code>hooks</code> folder: runs scripts at specific points in the Git workflow</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770269394085/683b052e-d7e1-4d12-9032-084fb7f52702.png" alt class="image--center mx-auto" /></p>
<p>The <code>hooks</code> folder is where you can add custom scripts that run at specific points in the Git workflow. For example, you can add a script that runs before each commit to make sure that your code meets certain quality standards, or a script that runs after each checkout to set up your development environment.</p>
<h3 id="heading-git-objects-blob-tree-and-commit">Git Objects: Blob, Tree, and Commit</h3>
<p>Git objects are the fundamental building blocks of a Git repository, used to store data such as commits, files, and directories.</p>
<ul>
<li><h4 id="heading-blob-objects"><strong>Blob objects</strong></h4>
<p>  A blob (<em>binary large object</em>) is a type of Git object that stores the contents of a file as a snapshot in the Git object database. To generate the hash for a blob object, Git calculates the SHA-1 hash of the file contents, which is later used to locate the blob object in the Git object database (<code>.git/objects</code>). When you make changes to a file and commit them, Git stores the new content of the file (<em>fully, not just the diff</em>) as a new blob object with a new SHA-1 hash. This allows Git to track the changes to the file over time and manage the file’s history. One thing to keep in mind is that blobs do not store the name of the file(s), only the contents of it. Then, a question arises - how can we know which file has what content? Here’s where tree objects come in.</p>
</li>
<li><p><strong>Tree objects</strong><br />  A tree object represents the contents of a directory in a Git repository. It enables Git to store a collection of files and directories together in a single object. It does this by including a list of the files and directories contained in the directory, along with the SHA-1 object name (a unique identifier) of each file or directory. This creates a mapping between the names of the files and directories to their corresponding hashes.</p>
</li>
<li><h4 id="heading-commit-objects"><strong>Commit objects</strong></h4>
<p>  A commit object represents a snapshot of the repository at a particular point in time. It stores a <em>reference</em> to a tree object, which represents the state of the repository’s directories and their respective files at the time of the commit, and also a reference to one or more parent commit objects. Commit objects also include metadata such as the commit message, author, and timestamp. Commit objects are created when you run <code>git commit</code>, and they form a linear chain of commits in the repository’s history. Each commit object is linked to its parent(s) through a reference, creating a linked list of commits.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770818196957/e76387f7-027d-4dc1-aa68-d535dfdc2363.png" alt class="image--center mx-auto" /></p>
<p>In summary:</p>
<ul>
<li><p><strong>Commit</strong> points to <strong>one tree</strong> (the root directory snapshot) and to its <strong>parent commit</strong>.</p>
</li>
<li><p><strong>Tree</strong> represents a directory and contains:</p>
<ul>
<li><p>Filenames</p>
</li>
<li><p>Pointers to blobs (files)</p>
</li>
<li><p>Pointers to other trees (subfolders)</p>
</li>
</ul>
</li>
<li><p><strong>Blob</strong> stores <strong>only file content</strong>, not filenames.</p>
</li>
</ul>
<h3 id="heading-what-happens-internally-with-git-add-and-git-commit">What happens internally with <code>git add</code> and <code>git commit</code></h3>
<p>Let us try to understand the entire process, from adding a file to the staging area to committing it, through an example.</p>
<p>When we added the file to our staging area, we essentially took a snapshot of the contents of server.js. To take this snapshot, we create a blob object and generate a SHA-1 hash of the contents of the file, server.js. for the key.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770823773634/1effa3e9-ddaf-4ab5-86e6-cdc1f4fffdc1.png" alt class="image--center mx-auto" /></p>
<p>Now, if you run “find .git/objects -type f” in the command line, it’ll come up with a file path that resembles a SHA-1 Hash — because that’s exactly what it is!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770827389484/10b3b72e-31fa-4686-be30-9e6ee61b00c5.png" alt class="image--center mx-auto" /></p>
<p><em>(I discovered while doing this - if there is no content in the file, then it will return nothing. This confused me at first, but then I looked it up, and added some content. So, the hash</em> <code>e6/9de2…</code> <em>is the one with no content, and the hash</em> <code>b9/de1626…</code> <em>is with updated content. Below, I check with the latter hash.)</em></p>
<p>To check the value (or the content of the .git/object that we just found), we can use <code>git cat-file -p &lt;HASH&gt;</code>. The git cat-file command will display the contents of a git object, such as a blob in this example.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770827349307/640ffc01-9ebc-40c1-bc70-4c09ed9775d4.png" alt class="image--center mx-auto" /></p>
<p>In this example, we are operating at the lowest level of abstraction (tracking only files, not directories, etc), so we are just taking the SHA-1 of files and creating blob objects. Now, we can also create a tree object. How? We know that a commit object is a reference to a tree object. So, if we now <code>git commit</code> our staged changes, we not only create a tree object, but also a commit object.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770827835772/ac3a7221-c7f8-490b-82e3-f894dd9106a1.png" alt class="image--center mx-auto" /></p>
<p>Here, we re-use the <code>git cat-file</code> command to explore the tree object that’s pointed to by the latest commit object on the main branch currently. Then, to explore the commit object that is pointing to the tree object, we can use <code>git rev-parse</code> to first find the hash of the latest commit on the main branch:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770828018822/225ae439-10fe-4b6b-81d7-3f68b4c9dde1.png" alt class="image--center mx-auto" /></p>
<p>Then we can use the <code>git cat-file</code> command again to display the contents of the commit object, using the SHA-1 object name obtained in the above step:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770828087141/a4bdadae-b374-4c12-b662-58e8dec2aa5f.png" alt class="image--center mx-auto" /></p>
<p>Finally, let’s list all of the git objects in our .git/objects folder by using find .git/objects -type f</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770828464987/24773ddb-c1eb-44a3-9260-37423b199c70.png" alt class="image--center mx-auto" /></p>
<p>We can see the 3 git objects we’ve explored using git plumbing commands: b9de16.. (blob), bf066cb…(tree), 097ed… (commit). We can double-check these via the hashes we found in the previous steps.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>So in the end, I hope this article helped you understand what actually is Git, and its the internal workings. We learned that Git is a version control system, so it can track changes to any kind of content over time. Interanally, we can say that it is a content-addressable file system, which basically means it works with a key-value system, with key being the content address, and the value being data/content. We learned the structure of the .git folder, and learned about blob, tree, and commit objects. We also learned how these obejcts are created and manipulated internally when we run commands <code>git add</code> and <code>git commit</code>.</p>
]]></content:encoded></item><item><title><![CDATA[TCP vs UDP: The Basics]]></title><description><![CDATA[The internet runs on certain rules (protocols in technical terms) and one can say that they’re pretty strict. Whenever we do anything on the internet, be it send a message, watch a video, or comment on one, the data doesn’t simply “go” wherever we wa...]]></description><link>https://parvezr-chaicode2026.hashnode.dev/tcp-vs-udp-the-basics</link><guid isPermaLink="true">https://parvezr-chaicode2026.hashnode.dev/tcp-vs-udp-the-basics</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[chaicode webdev cohort 2026]]></category><category><![CDATA[TCP]]></category><category><![CDATA[UDP]]></category><category><![CDATA[http]]></category><category><![CDATA[protocols]]></category><dc:creator><![CDATA[Parvez Rashid]]></dc:creator><pubDate>Mon, 02 Feb 2026 16:33:02 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/40XgDxBfYXM/upload/82f6933e80e242c4a022711b47394187.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The internet runs on certain rules (protocols in technical terms) and one can say that they’re pretty strict. Whenever we do anything on the internet, be it send a message, watch a video, or comment on one, the data doesn’t simply “go” wherever we want it to. It follows certain rules and regulations which are agreed upon. These basically define <em>how</em> data is sent, received, and interpreted. Two of these rules are the topic of this article - TCP and UDP.</p>
<h2 id="heading-introduction">Introduction</h2>
<p>TCP stands for Transmission Control Protocol and UDP for User Datagram Protocol. These are simply two different ways of transmitting data. Let us understand both in basic terms.</p>
<p>TCP is like a courier service (say Blue Dart, if you’re from India). It makes sure that your parcel or package:</p>
<ul>
<li><p>Reaches the destination</p>
</li>
<li><p>Arrives in the order in which it was sent</p>
</li>
<li><p>Is returned to source if lost</p>
</li>
<li><p>Is acknowledged by the receiver</p>
</li>
</ul>
<p>UDP is like a live announcement or broadcast. Data is sent out quickly, but:</p>
<ul>
<li><p>There’s no guarantee it reaches</p>
</li>
<li><p>No confirmation from the receiver</p>
</li>
<li><p>No retries if something is lost</p>
</li>
</ul>
<p>Both are used widely, the only thing is that it depends on the use case, or what you care about <em>more</em>: reliability or speed.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770042877035/c62be633-116d-41f7-92b4-82665e650684.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770013981523/35422d1b-8ff2-4377-b5e6-d95a29dbf18c.png" alt class="image--center mx-auto" /></p>
<p>In the above diagrams, both TCP and UDP data flows are visualized. As you can see, TCP sets up the connection using a 3-way handshake - SYN, SYN + ACK, ACK (synchronize and acknowledge) - between client and server before data flow starts. After the data transmission ends, it has a similar procedure for ending the connection as well. But in UDP, the client simply sends a request to the server from which it wants data, and boom! The server just throws out data one-way without caring whether it is being received reliably or not.</p>
<h2 id="heading-what-is-http">What is HTTP?</h2>
<p><strong>HTTP (Hypertext Transfer Protocol)</strong> is an <strong>application-level protocol, not</strong> a data transmission protocol like TCP or UDP. HTTP defines:</p>
<ul>
<li><p>How requests are made (<code>GET</code>, <code>POST</code>)</p>
</li>
<li><p>How responses are structured</p>
</li>
<li><p>Status codes like <code>200</code>, <code>404</code>, <code>500</code></p>
</li>
</ul>
<p>In other words, HTTP describes <em>what</em> is being communicated—not <em>how</em> it travels across the network.</p>
<p>Let us touch upon the OSI (Open Systems Interconnection) model briefly to understand the relationship between HTTP and TCP. It was created by the ISO in 1984 to standardize network communications into seven distinct layers (Physical to Application).</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770042502560/05b68636-2ee5-4a05-b6f7-12957c987c86.png" alt class="image--center mx-auto" /></p>
<p>For now, in the diagram above, only focus on application and transport layers. As you can see, the transport and application are two layers apart. HTTP sits at the application layer, and TCP sits at the transport layer.</p>
<p>In simple terms:</p>
<ul>
<li><p><strong>TCP</strong> handles safe delivery of data</p>
</li>
<li><p><strong>HTTP</strong> defines the meaning of that data</p>
</li>
</ul>
<p>So when you open a website:</p>
<ol>
<li><p>TCP establishes a reliable connection</p>
</li>
<li><p>HTTP sends requests and receives responses over that connection</p>
</li>
<li><p>TCP ensures all the HTTP data arrives correctly</p>
</li>
</ol>
<p>So, in conclusion, we can say that HTTP does not replace TCP, it runs on top of it. Both solve different problems.</p>
<h2 id="heading-tcp-vs-udp-use-cases">TCP vs UDP use cases</h2>
<p>Generally, <strong>TCP</strong> is used when correctness matters:</p>
<ul>
<li><p>Loading web pages</p>
</li>
<li><p>Sending emails</p>
</li>
<li><p>File downloads</p>
</li>
<li><p>APIs and backend communication</p>
</li>
</ul>
<p>Even if a small piece of data is missing or not in order, the result could be completely wrong—so TCP’s reliability is important.</p>
<p>Generally, <strong>UDP</strong> is used when speed matters more than correctness of data:</p>
<ul>
<li><p>Live video or audio streaming</p>
</li>
<li><p>Online multiplayer games</p>
</li>
<li><p>Video calls</p>
</li>
<li><p>DNS lookups</p>
</li>
</ul>
<p>In a video call, a frame skip is better than the whole call getting stuck waiting for missing data. UDP is okay with small losses as long as things are moving smoothly.</p>
<p>Notice I used the word “generally”. This means that there are exceptions to the rule. For example, with new custom/proprietary protocols (used by Zoom, for example), UDP’s reliability can be considerably increased, making it closer to TCP.</p>
]]></content:encoded></item><item><title><![CDATA[Why Version Control Exists: The Pendrive Problem]]></title><description><![CDATA[If you’re building a software project, there is an inherent need to track it—from the very first line of code to the latest bug fix and everything in between. You need a way to do this that doesn’t result in a headache for everyone involved.
The age ...]]></description><link>https://parvezr-chaicode2026.hashnode.dev/why-version-control-exists-the-pendrive-problem</link><guid isPermaLink="true">https://parvezr-chaicode2026.hashnode.dev/why-version-control-exists-the-pendrive-problem</guid><category><![CDATA[version control]]></category><category><![CDATA[version control systems]]></category><category><![CDATA[Git]]></category><dc:creator><![CDATA[Parvez Rashid]]></dc:creator><pubDate>Fri, 16 Jan 2026 03:08:27 GMT</pubDate><content:encoded><![CDATA[<p>If you’re building a software project, there is an inherent need to track it—from the very first line of code to the latest bug fix and everything in between. You need a way to do this that doesn’t result in a headache for everyone involved.</p>
<h3 id="heading-the-age-of-finalv2reallyfinal">The age of "Final_v2_REALLY_FINAL"</h3>
<p>In the early days, or when you're just starting out, the project is usually just folders. You’ve probably been there: you have a folder named <code>project</code>, then <code>project_backup</code>, then <code>project_final</code>, and eventually <code>project_final_v2_use_this_one</code>.</p>
<p>Even with a single developer, this is a disaster waiting to happen. Which one actually works? Which one has the bug you fixed yesterday? It’s unreliable, but it’s a cakewalk compared to what happens when you add more developers to the mix.</p>
<h3 id="heading-the-pendrive-analogy">The Pendrive Analogy</h3>
<p>In the real world, software development is a team game. Imagine the logistics of a team working without a Version Control System (VCS).</p>
<p>Developer A finishes a feature. To share it, he zips the folder, puts it on a <strong>pendrive</strong>, and hands it to Developer B. Now, Developer B has the "latest" code. But what if Developer C was working on a different part of the app at the exact same time?</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768497971687/b5432f2f-1576-4da2-87bc-df8e482a2d5e.png" alt class="image--center mx-auto" /></p>
<p>Do you see the problem?</p>
<ul>
<li><p><strong>The Overwrite Trap:</strong> If Developer C gives his pendrive to Developer B, does Developer B just copy-paste over everything? If he does, Developer A’s work might just... vanish.</p>
</li>
<li><p><strong>The Sync Struggle:</strong> There is no "master copy." The code exists in three different states on three different desks.</p>
</li>
<li><p><strong>No Paper Trail:</strong> If the app suddenly starts crashing, no one knows why. Who changed line 42? Was it on the first pendrive or the third? There’s no history, just a bunch of zip files and hopes.</p>
</li>
</ul>
<h3 id="heading-moving-from-chaos-to-version-control">Moving from Chaos to Version Control</h3>
<p>This is exactly why <strong>Version Control Systems</strong> (like Git) became mandatory. Think of a VCS as a "Living Map" of your project rather than a series of snapshots.</p>
<p>Instead of passing a physical drive or emailing a <code>.zip</code> file, every developer works on a shared history.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768498343700/eb0f4dfc-8d48-49d8-bf92-fd24e31786db.png" alt class="image--center mx-auto" /></p>
<p>When you use a VCS, the system handles the heavy lifting:</p>
<ul>
<li><p><strong>Merging:</strong> Identifies if two people edited the same file and helps combine them without losing data.</p>
</li>
<li><p><strong>The Time Machine:</strong> If you break everything at 2:00 AM, you can "roll back" to the version from 1:59 AM.</p>
</li>
<li><p><strong>Accountability:</strong> Records exactly who changed what, helping to understand the "why" behind a change six months later.</p>
</li>
</ul>
<p>A Version Control System works by tracking 'deltas'—which are the specific changes between lines of code—instead of just saving hundreds of copies of the whole folder. By using a Directed Acyclic Graph (DAG) (above diagram roughly represents it) to map out commits, the software can use merging algorithms to combine work automatically. It can see that Developer A changed line 10 and Developer B changed line 50, and it merges them without any issues. This move from managing badly named folders to 'line-based tracking' is what allows a team to have a single source of truth.</p>
<p>At the end of the day, Version Control exists because humans are messy and collaboration is hard. It turns the pendrive problem into a structured, searchable, and safe environment where you can actually focus on writing code instead of managing folders.</p>
]]></content:encoded></item></channel></rss>