<?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[Mursaleen's Blog]]></title><description><![CDATA[Mursaleen's Blog]]></description><link>https://blog.mursaleennisar.com</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 17:54:10 GMT</lastBuildDate><atom:link href="https://blog.mursaleennisar.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[CSS Selectors 101: Targeting Elements with Precision]]></title><description><![CDATA[CSS selectors are a way to choose elements. It helps to target a specific HTML element or a group of elements to style them in CSS. Think of it like addressing people; one is you’ll say, “All people just listen to me,” another is “People with green s...]]></description><link>https://blog.mursaleennisar.com/css-selectors-101-targeting-elements-with-precision</link><guid isPermaLink="true">https://blog.mursaleennisar.com/css-selectors-101-targeting-elements-with-precision</guid><category><![CDATA[css selectors]]></category><category><![CDATA[CSS]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Mursaleen Nisar]]></dc:creator><pubDate>Fri, 30 Jan 2026 04:10:12 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769746175142/2d7bda0d-9d3d-439f-8997-d70f8119fa2f.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>CSS selectors are a way to choose elements. It helps to target a specific HTML element or a group of elements to style them in CSS. Think of it like addressing people; one is you’ll say, “All people just listen to me,” another is “People with green shirts listen to me,” and you can be more specific, like “Hey John, listen to me.” Same is the case with CSS selectors; they can select a broad group of elements or a specific element. So, in this article we will learn about different CSS selectors, how to target elements with selectors, and the selector priority.</p>
<h2 id="heading-css-selectors">CSS selectors</h2>
<h3 id="heading-element-selector">Element selector</h3>
<p>The element selector uses HTML tags to target all the defined tag elements of HTML. Like we can select all paragraph elements with p and style them.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769745919308/6db42cd3-4a82-498f-848d-e5b419e488a8.webp" alt class="image--center mx-auto" /></p>
<h3 id="heading-class-selector">Class selector</h3>
<p>Class selector selects HTML elements by their defined class. Like if there are different elements (h2, p, a) in HTML having the same class (color-red). We can target them all at once with class selector. The syntax of class selector is <code>.class-name</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769745940097/32868f45-18e2-4e2c-99b9-5c4ece15bb95.webp" alt class="image--center mx-auto" /></p>
<h3 id="heading-id-selector">ID selector</h3>
<p>Similarly, ID selector selects HTML elements based on their ID. ID is always unique, meaning one HTML document can have only one ID given to one element; same ID can’t be given to more than one element. The syntax of ID selector is <code>#id-name</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769745955045/76b81bee-4818-4d97-9370-3d1ab5e8e2ba.webp" alt class="image--center mx-auto" /></p>
<h3 id="heading-group-selectors">Group selectors</h3>
<p>If we need to give some styling to the same different elements, we can use group selector; it selects various groups of elements at once. Like if we need to select <code>h2, p, .container, #card</code>, we use comma to separate these, and it’s called group selector.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769745966494/6a511751-c249-4303-8a3a-1d569d840a8c.webp" alt class="image--center mx-auto" /></p>
<h3 id="heading-descendant-selector">Descendant selector</h3>
<p>Descendant selector helps to select elements in a specific location. Like if we need to select the <code>p</code> elements that are inside a <code>div</code>, that can be done using this selector. The syntax of this is simple, <code>element-name descendant-name</code>. First we write the element name inside which we want to select descendants, a space, and then the descendant name.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769745979744/2b12649a-e3a2-4d2f-a352-911b1315c2de.webp" alt class="image--center mx-auto" /></p>
<h2 id="heading-selector-priority">Selector priority</h2>
<p>What if we select same element by using different selectors like the element selector, class selector, and ID selector? Which styling will apply. So I’ll explain this at a very high level.</p>
<p>Element selectors have the lowest priority, class selectors have medium priority, and ID selectors have high priority. That means if we select the same element by using these three selectors, always the styling of ID selector will apply.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769745991747/34f28903-d0bc-45d1-918e-564a50487139.webp" alt class="image--center mx-auto" /></p>
<p>This is a high-level overview; if you want to dig deeper into this, you can learn about CSS <em>cascading and specificity</em> algorithms.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Selectors are the foundation of CSS; with selectors, we are able to target different elements or groups of elements to style them. There are various selectors like element selector, class selector, ID selector, group selector, descendant selector, and more. Different selectors have different priorities; most priority selector styling applies in case of multiple selectors targeting the same element.</p>
<p>This is just a basic overview of CSS selectors and their priorities. I encourage you to practice it on your own; once you understand this well, you can then learn more things about CSS.</p>
]]></content:encoded></item><item><title><![CDATA[Emmet for HTML: A Beginner’s Guide to Writing Faster Markup]]></title><description><![CDATA[First we will see what Emmet is. Emmet is a free and open-source toolkit for text editors to boost the speed and efficiency of coding languages like HTML and CSS. Think of it like a shortcut language for HTML. It provides us with various short abbrev...]]></description><link>https://blog.mursaleennisar.com/emmet-for-html-a-beginners-guide-to-writing-faster-markup</link><guid isPermaLink="true">https://blog.mursaleennisar.com/emmet-for-html-a-beginners-guide-to-writing-faster-markup</guid><category><![CDATA[Emmet]]></category><category><![CDATA[html emmet]]></category><category><![CDATA[HTML5]]></category><category><![CDATA[HTML]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Mursaleen Nisar]]></dc:creator><pubDate>Thu, 29 Jan 2026 05:55:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769666441419/482c2384-20be-4b9d-8bfc-2573755f8433.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>First we will see what Emmet is. Emmet is a free and open-source toolkit for text editors to boost the speed and efficiency of coding languages like HTML and CSS. Think of it like a shortcut language for HTML. It provides us with various short abbreviations, which then turn into full code snippets. In this article we will learn about writing HTML faster using Emmet abbreviations.</p>
<p>Emmet is useful for HTML beginners because with this, most mistakes that are usually done by beginners, like forgetting to close the tags, are avoided, but with Emmet abbreviations, tags are auto-closed.</p>
<h2 id="heading-installation">Installation</h2>
<p>Emmet is almost pre-installed with most of the popular code editors that we use. Like in this article, we will use VS Code, and Emmet is pre-installed in VS Code. I assume you will also be using VS Code, and you don’t need to explicitly install Emmet.</p>
<h2 id="heading-emmet-abbreviations">Emmet abbreviations</h2>
<p>Starting with the basic, when we create a new HTML file, first we have to write the boilerplate code of HTML, which takes time to write manually. Emmet provides us with <code>!</code> abbreviation with which HTML boilerplate code is written.</p>
<p>Create a new HTML file. Write <code>!</code> and hit tab or enter.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769660078423/1ea22ae0-9206-4400-a774-e4e32d00591f.webp" alt class="image--center mx-auto" /></p>
<p>Is it not easy? This is just the beginning of learning, Emmet. We’ll learn about many abbreviations, which will increase our speed in writing HTML a lot.</p>
<h3 id="heading-creating-html-elements-using-emmet">Creating HTML elements using Emmet</h3>
<p>So if we have to create elements in HTML, we first write &lt;, then the tag name, then &gt;, then the content, and then the closing tag &lt;/tagname&gt;, which is very slow process and often involves mistakes like forgetting to close the tag.</p>
<p>Using Emmet, type only the tag name like <code>h1 or p</code> and hit tab or enter.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769660598720/dc5513df-6bc2-4101-803c-aec75524d93b.webp" alt class="image--center mx-auto" /></p>
<h3 id="heading-adding-classes-ids-and-attributes">Adding classes, IDs, and attributes</h3>
<p>For adding classes, we use the tag name + . + class name, like h2.heading, then hit tab or enter.</p>
<p>Similarly, for adding an ID, we use # instead of . like p#paragraph.</p>
<p>And for adding any other attribute to any tag, like width to the img tag, we use tag name + [attr=value], like img[width=200], then hit tab or enter.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769661163013/7b75470c-d4dd-4eed-aaf2-f55c6dec99a7.webp" alt class="image--center mx-auto" /></p>
<h3 id="heading-creating-nested-elements">Creating nested elements</h3>
<p>Nested elements means elements inside another element, like:</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Heading 1<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>This is a paragraph.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<p>So, here it is <code>h1</code> and <code>p</code> nested inside <code>div</code>. To insert this using the Emmet abbreviation, we need to first understand two symbols of Emmet: one is <code>&gt;</code> and another is <code>+</code>. <code>&gt;</code> means child (inside) and <code>+</code> means sibling (beside). So in plain English, here we need a div, and inside it two children h1 and p, and h1 and p are siblings. To insert this using Emmet:</p>
<pre><code class="lang-plaintext">div&gt;h1+p
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769661869261/f04aa3c8-677b-445c-bd58-e03c3ec58a33.webp" alt class="image--center mx-auto" /></p>
<h3 id="heading-repeating-elements-using-multiplication">Repeating elements using multiplication</h3>
<p>Now what if we need to add 20 <code>div</code> elements, adding these manually one by one will take a lot of time. So, to add these using Emmet, type tag name * number, like:</p>
<pre><code class="lang-plaintext">div*20
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769665852217/dbb011b5-87c9-46d7-b56c-c5dd0a40322f.webp" alt class="image--center mx-auto" /></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Emmet is optional but powerful and makes writing HTML very easy. I showed you some of the daily-used Emmet abbreviations; now try all these Emmet abbreviations on your own and explore more abbreviations to make your daily HTML writing easy. I hope you enjoyed this article and learnt something new with this.</p>
]]></content:encoded></item><item><title><![CDATA[Understanding HTML Tags and Elements]]></title><description><![CDATA[HTML (Hypertext Markup Language) is a standard language used for creating the structure of web pages. It’s like the skeleton of a web page, which defines which thing should be where. HTML is very important in creating web pages because without this a...]]></description><link>https://blog.mursaleennisar.com/understanding-html-tags-and-elements</link><guid isPermaLink="true">https://blog.mursaleennisar.com/understanding-html-tags-and-elements</guid><category><![CDATA[HTML5]]></category><category><![CDATA[HTML tags ]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Mursaleen Nisar]]></dc:creator><pubDate>Wed, 28 Jan 2026 05:33:29 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769578394318/906f5dd7-2f5e-4e92-8547-d8424214f5ab.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>HTML (Hypertext Markup Language) is a standard language used for creating the structure of web pages. It’s like the skeleton of a web page, which defines which thing should be where. HTML is very important in creating web pages because without this a web page can’t be created. In this article we will understand what HTML tags and elements are.</p>
<h2 id="heading-what-are-html-tags">What are HTML tags?</h2>
<p>HTML tags are the building blocks of this language. It defines how content should be displayed and where. Every tag is written in this format, <code>&lt;tagname&gt;</code> and each tag has its closing tag also <code>&lt;/tagname&gt;</code>. In the middle of opening and closing tags, content is placed there. Together these 3 things - opening tag, content, and closing tag, form an HTML element. We’ll see what HTML elements are in a bit. Think of HTML tags like boxes, opening and closing tags define the box boundaries, and every box is closed.</p>
<p>There are various tags in HTML; we’ll see some of them.</p>
<h3 id="heading-lth1gt">&lt;h1&gt;</h3>
<p>There is <code>&lt;h1&gt;Content&lt;/h1&gt;</code> tag in HTML that defines the large heading; similarly, there are <code>&lt;h2&gt;&lt;/h2&gt;, &lt;h3&gt;&lt;/h3&gt; … upto &lt;h6&gt;&lt;/h6&gt;</code> tags that define smaller headings.</p>
<h3 id="heading-ltpgt">&lt;p&gt;</h3>
<p>A p tag defines a paragraph, like <code>&lt;p&gt;This is a paragraph&lt;/p&gt;</code>.</p>
<h3 id="heading-ltdivgt">&lt;div&gt;</h3>
<p>A div tag is like a box which holds similar items; it groups some elements inside it, like</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">h2</span>&gt;</span>Heading<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>This is a paragraph.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<p>Here <code>&lt;div&gt;</code> tag wraps <code>&lt;h2&gt;</code> and <code>&lt;p&gt;</code> tags inside it to make them one group.</p>
<h3 id="heading-ltspangt">&lt;span&gt;</h3>
<p>A span tag is an inline element that groups a small part of content inside a block-level element. Don’t panic; I’ll explain inline and block-level elements in a while. Think of it like a highlighted line in a textbook.</p>
<p><strong>Note:</strong> Every tag does not have a closing tag; there are some tags, which are called <em>empty elements</em> or <em>void elements</em>, that do not have closing tags like <code>&lt;br&gt;</code>, it does the function of breaking content to the next line. There is no content inside it, hence no closing tag.</p>
<h2 id="heading-what-are-html-elements">What are HTML elements?</h2>
<p>HTML elements are composed of three parts: opening tag, content, and closing tag. Together they form an HTML element. These elements tell the browser how content is structured, like where a heading is starting and where it is closing, what is after what, and more.</p>
<h2 id="heading-inline-vs-block-level-elements">Inline vs block-level elements</h2>
<p>This is so simple: block-level elements are those that take the full width of the screen, and the next element comes on the next line. Like <code>&lt;h1&gt;, &lt;p&gt;</code>, and more.</p>
<p>Inline elements take only the width necessary for their content, and the next element comes after where the first element ends, not on the next line. Like <code>&lt;span&gt;, &lt;a&gt;</code>, and more.\</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769578157668/ff2c73b2-b2c3-4b49-bdc6-d6f7ff93f3e0.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>HTML is a standard markup language used for creating the structure of the web pages. Tags are building blocks of HTML; many tags have their closing tags as well, but some of the tags are empty elements, which do not contain any content and do not have closing tags. When a tag is written, inside it is content, and it has a closing tag; together these three things form an HTML element.</p>
<p>There are two types of HTML elements: inline and block-level elements. Inline elements tags only the width that is needed for their content, while block elements take the full screen width.</p>
<p>I’ll suggest you use browser inspect to view the HTML code of your favorite website. To open it, right-click on a webpage and select “<strong>inspect</strong>” from the menu; a window will open. From the elements tab you can see all the HTML code used in this website.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769577730373/a3dff628-7350-4997-a83d-7507e12f5bd2.png" alt class="image--center mx-auto" /></p>
]]></content:encoded></item><item><title><![CDATA[How a Browser Works: A Beginner-Friendly Guide to Browser Internals]]></title><description><![CDATA[We use browsers daily to browse websites, but have you ever thought about “What happens when I type a URL and press enter?” In this article we’ll understand how a browser works and what process happens behind the scenes from when we hit enter until t...]]></description><link>https://blog.mursaleennisar.com/how-a-browser-works-a-beginner-friendly-guide-to-browser-internals</link><guid isPermaLink="true">https://blog.mursaleennisar.com/how-a-browser-works-a-beginner-friendly-guide-to-browser-internals</guid><category><![CDATA[working of browser]]></category><category><![CDATA[browser]]></category><category><![CDATA[Browser Internals]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Mursaleen Nisar]]></dc:creator><pubDate>Tue, 27 Jan 2026 13:25:47 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769520119494/d40fe60e-31b0-40f0-8168-c2e7a4faa733.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We use browsers daily to browse websites, but have you ever thought about “What happens when I type a URL and press enter?” In this article we’ll understand how a browser works and what process happens behind the scenes from when we hit enter until the website is displayed.</p>
<h2 id="heading-what-is-a-browser">What is a browser?</h2>
<p>Before understanding how a browser works, we’ll understand what a browser actually is. A browser is software, or in simple terms, we can say it’s a collection of various components working together to locate, retrieve, and display content from the World Wide Web (WWW).</p>
<h3 id="heading-main-part-of-a-browser">Main part of a browser</h3>
<ol>
<li><p><strong>User Interface (UI):</strong> Everything we see and click on a browser, like address bar, bookmarks, navigation buttons, refresh, etc.</p>
</li>
<li><p><strong>Browser Engine: The</strong> browser engine is like a manager who acts as a bridge between the UI and other components.</p>
</li>
<li><p><strong>Rendering Engine:</strong> This is the core part that parses HTML, CSS, and media files and builds a visual page on screen.</p>
</li>
<li><p><strong>Networking:</strong> It manages all network communication, like requesting HTML, CSS, JS, and media files or scripts or sending data over a network.</p>
</li>
<li><p><strong>JavaScript Interpreter:</strong> It executes JavaScript code, which makes a website interactive and dynamic.</p>
</li>
<li><p><strong>UI Backend:</strong> It works alongside the networking layer, the JavaScript engine, and the rendering engine. It powers the logic of the UI frontend, like clicking of buttons, etc., and more.</p>
</li>
<li><p><strong>Data Persistence:</strong> Stores things locally like cache, cookies, or key-value pairs, which helps in many things like user preferences, session persistence across sessions, etc.</p>
</li>
</ol>
<h2 id="heading-how-does-browser-work">How does browser work?</h2>
<p>Now we have an understanding of what a browser is and the main components of a browser. We’ll see the main thing, which is how a browser works behind the scenes.</p>
<p>When you add a URL in the address bar, for instance, <code>https://example.com</code> and hit enter. The browser doesn’t know what this text is, so it requests a DNS query resolver with this URL to get the IP of this URL. If you want to know how DNS resolution works basically how this whole process works from URL to IP address, you can read this article <a target="_blank" href="https://blog.mursaleennisar.com/how-dns-resolution-works">here</a>. After getting the IP address, TCP establishes a <a target="_blank" href="https://blog.mursaleennisar.com/tcp-working-3-way-handshake-and-reliable-communication">3-way handshake</a> connection with the server. When a connection is established successfully, both client and server are ready to send and receive data. The server sends necessary HTML and CSS files, which are received by the network layer of the browser, which then forwards them to the rendering engine.</p>
<p>Rendering engine have parsers for both HTML and CSS. An HTML parser parses HTML line by line and parses every HTML element into an object in a DOM tree. The DOM tree is like a family tree that has parent, child, sibling, and more.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769520211695/e8b68641-b72a-4b98-ace9-36da5989ae14.webp" alt class="image--center mx-auto" /></p>
<p><strong>What is a parser?</strong> So I used parser work frequently; you may be confused about what a parser is. Think of parsing like breaking sentences into meaning. It breaks the HTML and CSS files into small pieces and converts them into a tree, which a browser can understand.</p>
<p>Similarly, CSS gets parsed, and the browser understands its selectors, which selector is for which node of the DOM, and converts it into a CSSOM. If DOM is what exists, CSSOM is how it should look.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769520246946/bcb53d8f-15ba-49a3-b58f-ab2cf7c0a829.webp" alt class="image--center mx-auto" /></p>
<p>After the formation of DOM and CSSOM, DOM says there is a button inside a div, CSSOM says the button color is blue and it has padding. Together they form a render tree.</p>
<p>Now DOM and CSSOM are ready, but the browser doesn’t know where to place what. So for this, layout or reflow comes into action. Reflow calculates the positions of the elements, where to place what, and the paint process applies the styles to the elements, and finally the web page is displayed. So this is reflow → paint → display.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769520264856/401c677e-2802-4b63-be4f-92ea85fdefbf.webp" alt class="image--center mx-auto" /></p>
<p>This whole process, from entering a URL to rendering a webpage, happens in milliseconds. This is the engineering of browsers.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>A browser is software that locates, retrieves, and displays content from the WWW. There are many components in a browser that work together to do this whole process. Different components do different tasks and work together to make it possible to show a webpage on our display. I hope you enjoyed reading this article. If there is any mistake or missing information, I’m sorry for that I’m a fellow learner like you.</p>
]]></content:encoded></item><item><title><![CDATA[TCP vs UDP: When to Use What, and How TCP Relates to HTTP]]></title><description><![CDATA[Think if millions of computers start communicating with each other without any rules, there will be chaos. That is why we need protocols like TCP and UDP to make communication effective and meaningful. In this article we will understand TCP and UDP t...]]></description><link>https://blog.mursaleennisar.com/tcp-vs-udp-when-to-use-what-and-how-tcp-relates-to-http</link><guid isPermaLink="true">https://blog.mursaleennisar.com/tcp-vs-udp-when-to-use-what-and-how-tcp-relates-to-http</guid><category><![CDATA[how tcp relate http]]></category><category><![CDATA[TCP]]></category><category><![CDATA[UDP]]></category><category><![CDATA[tcp vs udp]]></category><category><![CDATA[http]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Mursaleen Nisar]]></dc:creator><pubDate>Mon, 26 Jan 2026 13:45:23 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769435019995/af4e568b-3653-4875-aabf-a3f144e86ce3.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Think if millions of computers start communicating with each other without any rules, there will be chaos. That is why we need protocols like TCP and UDP to make communication effective and meaningful. In this article we will understand TCP and UDP transport protocols, when to use what, and how TCP relates to HTTP protocol.</p>
<h2 id="heading-tcp-vs-udp">TCP vs UDP</h2>
<p>TCP (Transmission Control Protocol) is a transport protocol that transfers data from one computer to another reliably, ordered, and error-free. It ensures safety and reliability. Think of it like a courier, which takes the package, ensures everything is OK, and delivers it safely and reliably.</p>
<p>UDP (User Datagram Protocol) is also a transport protocol that does the same work of transferring the data from one computer to another, but the working of both protocols is different. UDP is fast but not reliable; it’s risky because it does not ensure that all data will be delivered, it does not retransmit the lost data, and it throws data and does not care whether the receiver will receive it or not. Think of it like an announcement; an announcement is made, and they don’t care whether anyone listens or not; they make it.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769435049927/36d78dc7-5fd7-49b5-8d58-5f629f3d5b92.webp" alt class="image--center mx-auto" /></p>
<p>So the use cases of TCP and UDP are different TCP is used when accuracy matters more than speed, like loading a website, logging into a system, banking, etc. Think if a single chunk of data will be lost while making an online payment and you’ll transfer $1000 and the receiver will receive only $1. On the other side UDP is used when speed matters more than accuracy and precision, like in video calling, live streaming, etc.</p>
<h2 id="heading-how-does-tcp-relate-to-http">How does TCP relate to HTTP?</h2>
<p>HTTP works on top of TCP, TCP works in the transport layer, and HTTP works in the application layer. Both of the protocols work together to ensure effective communication with the server. HTTP defines <em>what</em> data is to be sent or fetched, and TCP sends the data or fetches it. Many think that these protocols are the same, but no, they are totally different and work together. And some may be thinking that if HTTP is used, then why use TCP? I already mentioned it. HTTP can’t work without TCP.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769435064235/a09fbf3b-5672-4c34-938f-d190895f73b0.webp" alt class="image--center mx-auto" /></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Both TCP and UDP are transport protocols that are used to transfer the data on a network. TCP ensures reliability, ordering of data packets, error-free delivery, etc., while UDP is fast but unreliable and risky; it doesn’t ensure the delivery of data packets.</p>
<p>HTTP works on top of TCP, and both of the protocols work together to ensure effective and reliable web communication.</p>
]]></content:encoded></item><item><title><![CDATA[TCP Working: 3-Way Handshake & Reliable Communication]]></title><description><![CDATA[TCP (Transmission Control Protocol) is a networking protocol that allows devices to communicate reliably over a network. It ensures reliable, ordered, and error-free transfer of data between applications. TCP works on the transport layer of the OSI m...]]></description><link>https://blog.mursaleennisar.com/tcp-working-3-way-handshake-and-reliable-communication</link><guid isPermaLink="true">https://blog.mursaleennisar.com/tcp-working-3-way-handshake-and-reliable-communication</guid><category><![CDATA[tcp working]]></category><category><![CDATA[TCP Working: 3-Way Handshake & Reliable Communication]]></category><category><![CDATA[TCP]]></category><category><![CDATA[TCP Handshake]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Mursaleen Nisar]]></dc:creator><pubDate>Sun, 25 Jan 2026 16:06:42 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769357143608/7eef7294-8a5d-4a2d-b8df-5fc3cc2bb1be.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>TCP (Transmission Control Protocol) is a networking protocol that allows devices to communicate reliably over a network. It ensures reliable, ordered, and error-free transfer of data between applications. TCP works on the transport layer of the OSI model.</p>
<h2 id="heading-why-use-tcp">Why use TCP?</h2>
<p>The question is “Why will we not communicate without TCP?” There are a lot of problems without TCP.</p>
<ul>
<li><p>There is no agreement on how communication should start.</p>
</li>
<li><p>There is no guarantee that data will arrive.</p>
</li>
<li><p>There is no ordering of data received.</p>
</li>
<li><p>No mechanism to detect missing data.</p>
</li>
<li><p>No confirmation if data is received or not.</p>
</li>
<li><p>There is no agreement on closing the connection.</p>
</li>
</ul>
<p>To solve these problems, TCP was built; it solves all these problems, which we will understand in detail in this article.</p>
<h2 id="heading-what-is-the-tcp-3-way-handshake">What is the TCP 3-Way Handshake?</h2>
<p>Before sending the actual data, TCP establishes a connection and ensures that the receiver is available by a method called the 3-way handshake. Think of you need to start a conversation with a friend; you tell your friend, “Hey, are you there?” Your friend replies, “Yes, I’m here. Are you there?” You say, “Yes, I’m also here. Let’s talk.”</p>
<p>TCP does similarly before sending the data. These steps are SYN, SYN-ACK, and ACK. Let’s understand the step-by-step working of SYN, SYN-ACK, and ACK.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769356854183/1320df6b-9bd8-43a7-bcad-c3a84dd21ce6.webp" alt class="image--center mx-auto" /></p>
<p>Step 1: SYN (Synchronise)</p>
<ul>
<li><p>The sender sends a SYN packet to the receiver.</p>
</li>
<li><p>It means, “I want to connect."</p>
</li>
</ul>
<p>Step 2: SYN-ACK (Synchronise-Acknowledge)</p>
<ul>
<li><p>The receiver replies with SYN-ACK.</p>
</li>
<li><p>“I received your request.” (ACK).</p>
</li>
<li><p>“I’m ready too” (SYN).</p>
</li>
</ul>
<p>Step 3: ACK</p>
<ul>
<li><p>The sender sends an ACK.</p>
</li>
<li><p>It means “I received your response.”</p>
</li>
</ul>
<p>With these steps the sender and receiver establish a successful connection, and both are ready to send and receive data.</p>
<h2 id="heading-how-does-data-transfer-work-in-tcp">How does data transfer work in TCP?</h2>
<h3 id="heading-segmenting">Segmenting</h3>
<ul>
<li><p>TCP breaks the data into smaller segments; each segment contains some data and headers.</p>
</li>
<li><p>Headers contain information like sequence number, port, and flag.</p>
</li>
<li><p>TCP does not care about routing and addressing; it’s handled by IP.</p>
</li>
</ul>
<h3 id="heading-routing-via-ip">Routing via IP</h3>
<ul>
<li><p>After segments are created, these are handled to IP.</p>
</li>
<li><p>The IP address sends the segments through the network to the receiver, possibly through different paths.</p>
</li>
</ul>
<h3 id="heading-reassembly-at-receiver">Reassembly at Receiver</h3>
<ul>
<li><p>Segments may arrive out of order because they can take different paths through the network.</p>
</li>
<li><p>Segments are reassembled through their sequence numbers.</p>
</li>
</ul>
<h3 id="heading-acknowledgement-ack">Acknowledgement (ACK)</h3>
<ul>
<li><p>The receiver sends ACK to the sender on each segment or group of segments it receives.</p>
</li>
<li><p>The sender waits for ACK; if it is not received for any segment, it retransmits that particular segment.</p>
</li>
</ul>
<h3 id="heading-retransmission">Retransmission</h3>
<ul>
<li><p>If the sender doesn’t receive ACK in a specific time, it assumes the segment is lost and retransmits it.</p>
</li>
<li><p>It ensures that every segment is received by the receiver, which makes TCP reliable.</p>
</li>
</ul>
<h2 id="heading-how-a-tcp-connection-is-closed">How a TCP connection is closed</h2>
<p>Closing a TCP connection is similar to opening a connection, but this time it’s a four-way handshake:</p>
<ol>
<li><p><strong>FIN (Finish)</strong>: The sender who wants to close the connection sends the FIN to the receiver.</p>
</li>
<li><p><strong>ACK (Acknowledge)</strong>: The receiver acknowledges the FIN with ACK.</p>
</li>
<li><p><strong>FIN (Finish)</strong>: The receiver then sends his own FIN when it’s ready to close the connection.</p>
</li>
<li><p><strong>ACK (Acknowledge)</strong>: The sender responds with an ACK, completing the connection termination.</p>
</li>
</ol>
<h2 id="heading-conclusion">Conclusion</h2>
<p>TCP is a networking protocol that allows the transmission of the data reliably, orderly, and error-free over a network. TCP solves a bunch of problems like communication starting agreement, data arrival confirmation, data ordering, retransmission of missing or lost data, acknowledgement on getting data, agreement on closing the connection to ensure data is fully transmitted.</p>
<p>TCP starts a connection with 3-way handshaking SYN → SYN-ACK → ACK. And similarly closes the connection by 4-way handshaking FIN → ACK → FIN → ACK.</p>
<p>I’m a fellow learner, just like you all. If there is anything missing or incorrect in this article, do let me know. I’m always open to learning and mistakes.</p>
]]></content:encoded></item><item><title><![CDATA[DNS Record Types Explained]]></title><description><![CDATA[How does a browser know where a website lives? If you know about “How DNS resolution works,” you may tell that the DNS resolver will get the IP of the server from the authoritative name server. Well, that’s ok, but how does the authoritative name ser...]]></description><link>https://blog.mursaleennisar.com/dns-record-types-explained</link><guid isPermaLink="true">https://blog.mursaleennisar.com/dns-record-types-explained</guid><category><![CDATA[DNS Record Types]]></category><category><![CDATA[dns]]></category><category><![CDATA[dns-records]]></category><category><![CDATA[dns zone]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Mursaleen Nisar]]></dc:creator><pubDate>Sat, 24 Jan 2026 05:15:49 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769231466819/6e4beb83-c153-468b-ba10-60043bef7d3b.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>How does a browser know where a website lives? If you know about “<a target="_blank" href="https://blog.mursaleennisar.com/how-dns-resolution-works">How DNS resolution works,</a>” you may tell that the DNS resolver will get the IP of the server from the authoritative name server. Well, that’s ok, but how does the authoritative name server know the IP address of the server where the website is hosted? The answer is through DNS records, which are defined at the DNS zone on the authoritative name server. In this article we’ll learn about DNS records and will know about what problem each record solves.</p>
<p>Before jumping to the DNS records, let me explain briefly what DNS is. DNS (Domain Name System) is a system that converts human-readable domain names into IP addresses, which makes it possible to serve a website and do other things on the internet. Think of it like a phone book; the browser tells the DNS server, "Hey, what’s the IP of example.com?" The DNS server replies, “<code>192.0.0.1</code> is the IP address of example.com,” and then a browser is able to request something from the actual web server. Now you have a basic or good understanding of DNS, let’s understand what DNS records.</p>
<h2 id="heading-dns-record-types">DNS Record Types</h2>
<p>The common DNS records are:</p>
<ol>
<li><p>A record.</p>
</li>
<li><p>AAAA record.</p>
</li>
<li><p>CNAME record.</p>
</li>
<li><p>NS record.</p>
</li>
<li><p>MX record.</p>
</li>
<li><p>TXT record.</p>
</li>
</ol>
<p>NOTE: There are more DNS records that are not used so much. If you want to read about those as well, you can <a target="_blank" href="https://www.cloudflare.com/en-gb/learning/dns/dns-records/">read here</a>.</p>
<p>Let’s understand each DNS record in detail.</p>
<h3 id="heading-a-record">A record</h3>
<p>A stand for “address”; it is the main record used to store the IPv4 address of the server, which is then sent to the browser for accessing the resource.</p>
<h3 id="heading-aaaa-record">AAAA record</h3>
<p>Similar to the A record, but it stores the IPv6 record of the server. The IPv6 address solves the problem of the IPv4 address limit.</p>
<h3 id="heading-cname-record">CNAME record</h3>
<p>CNAME stands for “Canonical Name.” It does not point to an IP; it always points to another domain name. It acts as an alias to another domain. It simplifies management by allowing multiple subdomains or services to use the same underlying server. For instance <code>blog.mursaleennisar.com</code> → <code>mursaleennisar.com</code> → <code>217.21.87.95</code>.</p>
<h3 id="heading-ns-record">NS record</h3>
<p>NS stands for “Name Server.” It defines the server that is responsible for DNS zones, which, in simple terms, holds the DNS records. It doesn’t store the IP address of the authoritative server, but it stores the URL of that, which is then converted into an IP address to reach that server.</p>
<h3 id="heading-mx-record">MX record</h3>
<p>MX stands for “Mail Exchange.” It tells other servers where to send the email of a specific domain. We can insert multiple MX records; each record has a priority value. A lower number means a higher priority, and the higher priority server handles it; if it’s unavailable, then the next server handles it.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769231585221/eb9094cb-6618-45a3-b96b-38fef933f4d3.webp" alt class="image--center mx-auto" /></p>
<h3 id="heading-txt-record">TXT record</h3>
<p>TXT stands for “Text.” It is a flexible type that stores the human-readable or machine-readable values. It is primarily used for domain ownership and verification purposes.</p>
<h2 id="heading-dns-records-explained-with-a-practical-example"><strong>DNS Records Explained with a Practical Example</strong></h2>
<p>Let’s say we have a domain name, example.com, which is pointing to the hosting server through an A record. When we enter this domain name in the browser, the website will load. Now we’ve purchased an email like user@example.com on Google Workspace; this will be configured through the MX record, which will point to the Google Workspace mail server. Now we’ve set up the blog.example.com subdomain, which we want to connect to a different server like wordpressblog.com. We’ll add a CNAME in the DNS record to point it to that. For setting email security records like SPF, DKIM, and DMARK, we’ll add them via TXT record.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769231694801/4e659515-eef5-4bb3-84e8-1d8ed80d59e7.webp" alt class="image--center mx-auto" /></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>DNS records are stored inside the DNS zone of the authoritative server, which stores different DNS records for different purposes, like A for the IPv4 address of the server, AAAA for the IPv6 address of the server, MX for the mail server, TXT for verifications and domain ownership purposes, CNAME for pointing to another domain, and NS, which defines the authoritative server. A single domain uses multiple records together to connect various services on one single domain.</p>
]]></content:encoded></item><item><title><![CDATA[How DNS Resolution Works]]></title><description><![CDATA[When you open any website on a browser, do you know how it opens? Every website is hosted on a server, so to access it, we need the IP address of the server to reach it, like 142.250.182.238. It is hard to remember the IP address of every website, so...]]></description><link>https://blog.mursaleennisar.com/how-dns-resolution-works</link><guid isPermaLink="true">https://blog.mursaleennisar.com/how-dns-resolution-works</guid><category><![CDATA[dns working]]></category><category><![CDATA[dns]]></category><category><![CDATA[#DNS Resolution]]></category><category><![CDATA[DNS Hierarchy]]></category><category><![CDATA[How DNS works]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Mursaleen Nisar]]></dc:creator><pubDate>Fri, 23 Jan 2026 10:07:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769162791347/2bd4f11c-6cb6-4500-b03a-f726ab6f76eb.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When you open any website on a browser, do you know how it opens? Every website is hosted on a server, so to access it, we need the IP address of the server to reach it, like <code>142.250.182.238</code>. It is hard to remember the IP address of every website, so this is why domain names exist, these are human-friendly, and we can easily remember google.com instead of <code>142.250.182.238</code>. Think of DNS (Domain Name System) as a phonebook of the internet where every domain name is like the contact name and the IP address is like the contact number. The process of converting a domain name into an IP address is called DNS resolution. And in this article we will understand how DNS resolution actually works.</p>
<h2 id="heading-how-does-it-work">How does it work?</h2>
<p>To understand this, we need to be clear about some terms to understand this whole process:</p>
<ol>
<li><p>DNS Resolver: It is a server typically owned by your ISP. It is responsible for the whole process of converting a domain name into an IP address.</p>
</li>
<li><p>Root Server: There are a total of 13 logical root servers in the world, these servers hold the record of the TLD (Top-Level Domains) servers like com, org, uk, in, etc.</p>
</li>
<li><p>TLD Server: TLD server is a server which holds the record of all domains’ authoritative nameserver under a specific TLD like com, org, in, us, etc.</p>
</li>
<li><p>Authoritative Nameserver: It is the final server in the DNS resolution process, which returns the actual IP address to the DNS resolver of a specific domain name. It manages DNS zone of a domain where there is specified the A record, AAAA record, CNAME record, etc.</p>
</li>
<li><p>Web Server: It is the actual server where the website is hosted. It’s IP address is returned to the client by DNS resolver.</p>
</li>
</ol>
<p>This process starts from our browser when we type any address in the address bar, the browser sends a recursive query to the DNS resolver to do the whole work. Browsers don’t take any headache to do the work. The DNS resolver is responsible for getting the IP address of a domain name. It initiates an iterative query; first, it requests the root server. The root server checks the TLD of the domain name, like com, in, us, uk, etc., and returns the IP address of the TLD server to the query resolver. The query resolver sends the request to the TLD server of the domain name, and the TLD server sends the address of the authoritative nameserver. The authoritative name server holds the actual IP address of the domain name as it manages the DNS zone where there are specified A, AAAA, or CNAME records. It returns the IP address to the DNS resolver. The DNS resolver then returns the IP address to the browser, and then the browser is able to request the actual web server for a web page or some resources.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769160010580/8d60006f-99b2-4c8b-9191-ef57144d1f09.webp" alt class="image--center mx-auto" /></p>
<h2 id="heading-a-practical-guide-with-dig">A Practical Guide with <code>dig</code></h2>
<p>DIG is a powerful command-line tool used to interrogate DNS name servers and troubleshoot DNS issues. It is preinstalled on Mac, and for Windows, you can search for how to download <code>dig</code> in Windows.</p>
<p>To get an A record of the domain name, we can run <code>dig {domain-name} +short</code> to get its A record, which is its server IP address.</p>
<p><strong>Note</strong>: <code>+short</code> is a flag; it is <em>optional.</em> We can also run these commands without <code>+short</code> flag, but it will give us all the details; to get short, to-the-point details, <code>+short</code> is used.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769160793083/1422953f-bc6c-469f-901d-87c5f25fb670.png" alt /></p>
<p>To get other records, we can specify the record, like NS.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769160916931/adeac630-b82d-4ef7-adca-20c48de5318f.png" alt /></p>
<p>We can also check these details for root servers. To check the nameservers of root, we can run <code>dig . NS +short</code> (.) means root server here.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769161283474/6bc799d8-506a-4554-b3bf-3f1da6f537da.png" alt /></p>
<p>These are the nameservers of all the 13 root servers from A-M.</p>
<p>Similarly, we can check details of the TLD servers. To check for com TLD. Run <code>dig com NS +short</code> command in your terminal.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769161452433/846be5f3-6fdd-4b25-a7fe-06348da00326.png" alt /></p>
<p>Now to check the whole process of DNS, you can run command <code>dig {domain-name} +trace</code> it shows us the whole process of how an IP address is returned.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>First the browser requests the DNS resolver to get the IP address of the domain name. The DNS resolver makes iterative queries to different servers in the DNS hierarchy, like the root, TLD, and authoritative name server. It finally gets the IP address from the authoritative name server and returns it to the browser.</p>
<p>The DIG command-line tool helps us to interrogate DNS name servers and troubleshoot DNS issues. To check the DNS records of the root, we can use . and for TLD server we can use com, org, etc.</p>
<p>By now you should have solid knowledge about how DNS resolution works. I’m a fellow developer like you trying to explain what I learned; if there is any mistake in this, I’m open for feedback. Thanks</p>
]]></content:encoded></item><item><title><![CDATA[Getting Started with cURL]]></title><description><![CDATA[cURL stands for client URL. It helps us to send messages to a server by using a terminal. The question is, what is a server, and why do we need to talk to it? Well, a server is a powerful computer that provides resources, data, or services to other d...]]></description><link>https://blog.mursaleennisar.com/getting-started-with-curl</link><guid isPermaLink="true">https://blog.mursaleennisar.com/getting-started-with-curl</guid><category><![CDATA[curl]]></category><category><![CDATA[data transfer]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Mursaleen Nisar]]></dc:creator><pubDate>Thu, 22 Jan 2026 03:58:41 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769054251604/bf41c85a-dfe8-413f-b763-d73ebfa22326.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>cURL stands for client URL. It helps us to send messages to a server by using a terminal. The question is, what is a server, and why do we need to talk to it? Well, a server is a powerful computer that provides resources, data, or services to other devices called clients on a network. Like if you hit any URL in the browser, it tells the server to give us a specific webpage, and the server sends it to us, and we can see it. To access the resources, data, or services from a server or to send the data to the server, we need to talk to it via APIs. Let’s understand what cURL is and how we use it to communicate with a server.</p>
<h2 id="heading-what-is-curl">What is cURL?</h2>
<p>cURL is a command-line tool and library for transferring data with URLs. Developers need it for testing the APIs and debugging them. cURL is used to send messages to a server from a terminal. In Linux and Mac it is pre-installed, and in Windows you can download it. To check if it’s installed in our system or not, run a simple command on your terminal <code>curl -h</code>. If it shows some curl options, then it’s installed, if it throws an error, then you need to install it.</p>
<p>We will start it with the simplest command <code>curl &lt;URL&gt;</code>. By default, without any flag, it sends a GET request to the given URL. For example, here we will use JSON Placeholder APIs.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769052105102/a2134b45-c86f-4118-9cdc-f1e0089bc8f6.png" alt class="image--center mx-auto" /></p>
<p>As you can see here, it fetches posts from the server and displays them here. It shows only response data. To get headers also, we pass <code>-i</code> or <code>—include</code> flag with this command.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769052342823/4a7b6359-1fd9-468d-a66c-27a695833200.png" alt class="image--center mx-auto" /></p>
<p>Now the question is if we want to send a post request to any API and want to send data to the server. Now we’ll see how to do it. To specify the request type to cURL, we use flag <code>-X</code> or <code>—request</code> and specify the name of the request type.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769052580612/91983b6f-4e37-4ffb-b66d-f1026348e950.png" alt /></p>
<p>What if we want to send data? For this we use <code>-d</code> or <code>—data</code> flag and pass the data inside quotes in this format <code>curl -X POST -d "param1=value1&amp;m2=value2"</code> <a target="_blank" href="https://example.com/api/data"><code>https://example.com/api/data</code></a>. We’ll understand it by doing it ourselves.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769052901517/f98b962c-9c22-4a34-bc4e-4a0f135e1cac.png" alt /></p>
<p>We’ve successfully sent the data to the server using cURL. Similarly, we can use other request types like PUT, PATCH, and DELETE also, which I want you to practice yourself.</p>
<h2 id="heading-why-curl-if-we-have-tools-like-postman">Why cURL if we have tools like Postman?</h2>
<p>By now you should be having a doubt about why we will use a difficult command-line tool like cURL if we have easy GUIs like Postman. Same was the doubt in my mind when I learned about cURL, but then I got to know about some points, and I’ll try to make you understand also.</p>
<ol>
<li><p>GUIs like Postman use cURL under the hood.</p>
</li>
<li><p>GUIs are heavy and resource intensive, while cURL is a lightweight command-line tool that we don’t need to install in Linux, it comes pre-installed, ideal for servers.</p>
</li>
<li><p>The main thing that is missing in GUIs like Postman is automation, cURL is great for scripts, CI/CD, and cron jobs.</p>
</li>
</ol>
<p>These are some of the main reasons for using cURL, you can learn more about it by yourself.</p>
<h2 id="heading-summary">Summary</h2>
<p>cURL is a way to communicate with a server using a terminal. We understood cURL from its basic GET request to sending data to the server using a POST request. Discussed some of the flags of cURL. And cleared one doubt about why cURL over GUI tools like Postman. By now you should be confident about cURL, how to use it, and where to use it. I’ll recommend you to learn about the automation where it’s used in automation.</p>
]]></content:encoded></item><item><title><![CDATA[Inside Git: How It Works and the Role of the .git Folder]]></title><description><![CDATA[Most of the developers know about Git and use Git a lot, but do you know how it internally works? It takes snapshots of our projects and stores them in its object database, where each object contains a hash key generated using the SHA-1 algorithm. We...]]></description><link>https://blog.mursaleennisar.com/inside-git-how-it-works-and-the-role-of-the-git-folder</link><guid isPermaLink="true">https://blog.mursaleennisar.com/inside-git-how-it-works-and-the-role-of-the-git-folder</guid><category><![CDATA[Git]]></category><category><![CDATA[Git-Internals]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Mursaleen Nisar]]></dc:creator><pubDate>Wed, 21 Jan 2026 17:43:48 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769017416979/5b09c1eb-dcc6-4e06-b4a3-e111adc395a7.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most of the developers know about Git and use Git a lot, but do you know how it internally works? It takes snapshots of our projects and stores them in its object database, where each object contains a hash key generated using the SHA-1 algorithm. We’ll dive deep into how it works and how it saves our codebase snapshots into an object database.</p>
<h2 id="heading-what-is-the-git-folder">What is the .git folder?</h2>
<p>Before understanding how Git works, we need to understand about <code>.git</code> folders. <code>.git</code> folder is the backbone of Git, all the information and data is saved into this folder. When we initialize a Git repository using the command, <code>git init</code> a hidden folder is created inside our working directory named <code>.git</code> by Git.</p>
<p>You can verify this by running <code>ls -a</code> command in the current working directory. If you’ll see the content of this folder by running a command <code>ls .git</code>, you’ll see a lot of things cooking there.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769013515234/460e1bf3-1cb6-4826-bf41-d6d97505dc1e.png" alt /></p>
<p>There are files HEAD, config, and description and folders hooks, info, objects, and refs. We’ll try to understand most of these in detail, and this will eventually help us understand how Git works.</p>
<h2 id="heading-how-does-git-work">How does Git work?</h2>
<p>Now we’ve understood the <strong>.git</strong> folder with which the working of Git is possible, now we’ll dive into this folder and see how things work internally.</p>
<p>First we’ll understand objects, there are three types of Git objects commit, blob, and tree. By the end of this article you’ll understand all of these three object types. Every object is assigned with a hash key.</p>
<p>The every snapshot taken by Git is saved in the object database, which I mentioned earlier. The object database is inside <em>the</em> <strong><em>.git/objects</em></strong> directory. We’ve fresh project where we initialized Git and have not committed anything yet. If we try to see what is inside objects. By running a command <code>ls .git/objects</code> so we see there are two default folders <code>into</code> and <code>pack</code> which are by default added by Git for optimisations.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769014458325/215dbd91-f965-4ac6-b58d-8a7cd2f66779.png" alt /></p>
<p>Now I’ll make a commit into this repository to see what changes inside the objects directory.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769014592769/737d908f-82ac-4535-bd0f-4de63cbe1f60.png" alt /></p>
<p>If I check again by running, <code>ls .git/objects</code>, there are three new folders inside objects. These folders are named with the first 2 digits of their commit hash.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769014695753/e69f4269-aa6f-4dfe-ae41-06e6ae77e2d9.png" alt /></p>
<p>To check the commit we made and it’s hash key run <code>git log</code> on terminal</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769014831558/570ecb3f-1d94-4ba7-b628-0156a1cdaadf.png" alt /></p>
<p>This commit has 67 as first 2 digits and we’ll go into the 67 folder to check what is inside it in <code>.git/objects</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769014985271/3fe67250-17b0-40b1-bc5d-6345c8bf2600.png" alt /></p>
<p>It contains the hash of the commit we saw earlier with <code>git log</code>:</p>
<p><code>67225eab133b6e98c2fe054404554272506f7ba0</code> = commit hash</p>
<p><code>67+225eab133b6e98c2fe054404554272506f7ba0</code> = folder name + hash file inside folder.</p>
<p>Now to check the content of this hash file, Git provide us with a low-level command <code>cat-file</code> which we’ll use to see the content of this file.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769015298150/ee19cd26-0c95-4024-96ea-51ce1a85ddb2.png" alt /></p>
<p>So with <code>git cat-file &lt;commit hash&gt; -t(to check the type of object) -p(to check content of this object)</code> . We got to know that this object is of type <code>commit</code>. So one type of object is now cleared.</p>
<p>There is a tree with a hash reference inside the commit object content. <code>Tree</code> is an object used to store directories in our project. A tree can contain other trees or blobs to make a complete tree hierarchy. This tree hash starts with <code>fd</code> which I earlier mentioned that inside objects there are folders named first 2 digits of their hash, now we’ll see if there is any folder inside <code>.git/objects</code> named <code>fd</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769016016769/71776f52-3127-46ff-9bee-b7ccf60f4f8f.png" alt /></p>
<p>You can see that one folder is named as <code>fd</code> inside objects. Inside this, there is a hash file similar to the earlier one that we saw. If we try to see the type of this object and content:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769016123154/d9b705f8-02cc-4a42-b2fb-87ca89574962.png" alt /></p>
<p>You can see the type of this object is <code>tree</code> and it contains only a <code>blob</code>, of which a hash reference is given. And it contains a filename, which has the reason why it’s stored here instead of storing it in <code>blob</code>. I earlier said a tree contains blobs and other trees as well. Here is only a blob because this commit only contains one file, which is <code>app.js</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769016327023/77a6643a-4dbc-47f5-af5a-d4a237ae42d6.png" alt /></p>
<p>With this the second type of object is now cleared. Now let’s move forward and see <code>blob</code>. In tree content above we was getting blog hash reference starting with <code>69</code>, we’ll find a folder in .git/objects.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769016535746/fa18d0e5-306e-43ca-8300-036f55d86f0a.png" alt /></p>
<p>When we try to check the type of this object it’s <code>blob</code> it’s content is the actual code of this file, which was there when we committed it into the repository. Congratulations, now you have an understanding of all three object types <code>commit</code> <code>tree</code> and <code>blob</code>.</p>
<p>We only saw about the commits and how Git stores data and snapshots internally. But we have many more things of Git, like branches, and more. If you enjoy this article and understood the whole thing. Comment on this article and I’ll write another article on the remaining things of Git.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Git works under the hood inside the hidden .git folder, which is inside our working directory. Git stores everything in its object database, and every object inside it has a hash key. Objects are of three types: commit, tree, and blob. We saw how all these types are linked with each other.</p>
<p>I encourage you to check this all by yourself to see that it’s actually true. Hope you enjoyed reading this article. Thanks for giving your valuable time.</p>
]]></content:encoded></item><item><title><![CDATA[Git for Beginners: Basics and Essential Commands]]></title><description><![CDATA[What is Git?
Git is a tool used to track changes in your code. It is termed a Distributed Version Control System (DVCS) because it allows multiple developers to collaborate on a project, track changes, and switch back to previous versions if needed.
...]]></description><link>https://blog.mursaleennisar.com/git-for-beginners-basics-and-essential-commands</link><guid isPermaLink="true">https://blog.mursaleennisar.com/git-for-beginners-basics-and-essential-commands</guid><category><![CDATA[Git]]></category><category><![CDATA[version control]]></category><category><![CDATA[version control systems]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Mursaleen Nisar]]></dc:creator><pubDate>Tue, 20 Jan 2026 06:35:23 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1768885533284/75219f5c-e1d8-45cb-ba45-5e6748eca0a2.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-what-is-git">What is Git?</h2>
<p>Git is a tool used to track changes in your code. It is termed a Distributed Version Control System (DVCS) because it allows multiple developers to collaborate on a project, track changes, and switch back to previous versions if needed.</p>
<h2 id="heading-why-is-git-used">Why is Git used?</h2>
<p>When working on projects, we need to keep track of the changes and versions, this is where Git comes into the picture. If we complete one feature, push it to the repository, and then start working on another feature, if the feature breaks any changes and we need to go back to the previous commit, we can do it easily.</p>
<p>In teams, it allows us to collaborate. Git allows us to add a local copy of the project to our system, work on it offline, and then, when the work is done, sync it with the central repository.</p>
<h2 id="heading-core-terminologies">Core Terminologies</h2>
<ul>
<li><p><strong>Repository:</strong> A repository is a database, either local or on a central server, that saves the project files, folders, changes, etc.</p>
</li>
<li><p><strong>Working Directory:</strong> It is the directory where we are working on the project.</p>
</li>
<li><p><strong>Staging:</strong> Staging area is where changes are prepared for committing into the repository.</p>
</li>
<li><p><strong>Commit:</strong> A snapshot of the staged changes at a specific point of time. Every commit has a unique identifier (SHA) and a commit message.</p>
</li>
<li><p><strong>Branch:</strong> A branch is a separate line of code used for adding new features, fixing bugs, etc. It is separate from the main codebase and can be later merged into main.</p>
</li>
<li><p><strong>HEAD:</strong> It is a reference to the last commit in the current branch.</p>
</li>
<li><p><strong>Main/Master:</strong> It is a default branch where there is production-ready code.</p>
</li>
</ul>
<h2 id="heading-common-git-commands">Common Git commands</h2>
<p><code>git init</code> is used to initialize a Git repository in our project. It adds a <em>.git</em> hidden directory inside our working directory where everything is stored.</p>
<p><code>git add &lt;filename&gt;</code> is used to commit a specific file into the staging area.</p>
<p><code>git add .</code> is used to add all the files of the project into the staging area.</p>
<p><code>git commit -m &lt;message&gt;</code> is used to commit the staging area changes into the repository with a message.</p>
<p><code>git status</code> shows the status of the changes as untracked, modified, or staged.</p>
<p><code>git log</code> displays all logs of commits in the current working branch history.</p>
<p><code>git branch</code> list all local branches.</p>
<p><code>git branch &lt;branch-name&gt;</code> is used to create a new branch.</p>
<p><code>git switch &lt;branch-name&gt;</code> is used to switch to another branch.</p>
<p>There are many more Git commands, you can read about them <a target="_blank" href="https://www.geeksforgeeks.org/git/useful-github-commands/">here</a>.</p>
<h2 id="heading-practically-using-git-inside-our-project">Practically using Git inside our project</h2>
<ol>
<li><p>Open any project inside your favorite code editor.</p>
</li>
<li><p>Initialize Git repository with <code>git init</code></p>
</li>
<li><p>Make changes and add these changes to staging area with <code>git add .</code></p>
</li>
<li><p>Finally push changes into repository with <code>git commit -m “Initial commit”</code></p>
</li>
</ol>
<p>Congratulations, you have used Git inside your own project.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In this article we understood what Git is, why it is used in modern software development, and the core terminologies of Git, like “repository,” “commit,” “branch,” etc. Also, we learned about some common Git commands, and we used it practically in our project. With the basic understanding of Git, you can now confidently manage your code and work efficiently in a team. Now the best way to learn it thoroughly is by practicing it regularly in your projects.</p>
]]></content:encoded></item><item><title><![CDATA[Why Version Control Exists: The Pendrive Problem]]></title><description><![CDATA[Have you ever thought about why version control systems (VCS) like Git exist? How did developers collaborate on a project and share code before this? Well, in this article we’ll try to understand why version control systems exist and how developers w...]]></description><link>https://blog.mursaleennisar.com/why-version-control-exists-the-pendrive-problem</link><guid isPermaLink="true">https://blog.mursaleennisar.com/why-version-control-exists-the-pendrive-problem</guid><category><![CDATA[version control]]></category><category><![CDATA[version control systems]]></category><category><![CDATA[Git]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Mursaleen Nisar]]></dc:creator><pubDate>Mon, 19 Jan 2026 09:19:26 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1768807200039/ac06e46b-6593-429c-b1bf-db6b7f3a0147.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Have you ever thought about why version control systems (VCS) like <strong><em>Git</em></strong> exist? How did developers collaborate on a project and share code before this? Well, in this article we’ll try to understand why version control systems exist and how developers were sharing and collaborating before this.</p>
<h2 id="heading-what-is-a-version-control-system">What is a Version Control System?</h2>
<p>Version control system is software used to track the changes in code, allows collaboration on a codebase, and allows you to roll back changes in case something breaks. One of the most famous and widely used version control system is <em>Git,</em> which was developed by <strong>Linus Torvalds</strong> as a side project to manage and track changes in the Linux codebase when it grew a lot.</p>
<h2 id="heading-why-does-version-control-exist">Why Does Version Control Exist?</h2>
<p>You may be thinking, "What were engineers and developers doing before the Version Control System”? How they were sharing code, tracking changes, and collaborating on projects. Well, this leads us to a different era called “<strong>The Pendrive Analogy.”</strong></p>
<p>Before <strong>version control system</strong>, developers were sharing code using pen drives, emails, etc. This process was so slow and had many problems. For instance, there is a project on which I’m working now. I told my friend to create a feature in it. I had to put the codebase on a pen drive and give it to my friend. My friend would do all the changes in the code and return my pen drive. This causes the first problem, when my friend was working on it, I had to stay idle for that time, we both couldn’t work together on this.</p>
<p>Now my friend completed it and returned the pen drive to me. I saw the code, but I don’t know what changes were made by my friend, this leads to another problem of tracking changes.</p>
<p>Now I move forward and start working on another feature on this project. Then my friend realizes that there are some bugs in this project, he fixes the bugs, and another problem arises, the pen drive is with me, and I can’t get the new code where my friend fixed the bugs.</p>
<p>Now I made another feature, and he fixed the bugs. When we have to merge the code, we have to manually check for conflicts. This is another problem.</p>
<p>Problems do not stop here. What if my friend’s code breaks things in my project? I can’t roll back the code.</p>
<p>That’s why version control system exist.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768814094945/e8aba595-4d1d-4e85-b04e-78d86ab4d473.png" alt class="image--center mx-auto" /></p>
]]></content:encoded></item><item><title><![CDATA[What is a load balancer, and why do scalable systems need it?]]></title><description><![CDATA[When you open a browser or an app, the request does not go directly to the server. In modern systems there is more than one server working together, it goes to a load balancer, which routes your request to a healthy and reliable server, and the serve...]]></description><link>https://blog.mursaleennisar.com/what-is-a-load-balancer-and-why-do-scalable-systems-need-it</link><guid isPermaLink="true">https://blog.mursaleennisar.com/what-is-a-load-balancer-and-why-do-scalable-systems-need-it</guid><category><![CDATA[Load Balancing]]></category><category><![CDATA[Load Balancer]]></category><category><![CDATA[System Design]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Mursaleen Nisar]]></dc:creator><pubDate>Sun, 18 Jan 2026 09:33:38 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1768712289276/1e6ac020-a268-48ae-933a-99ae4d31db02.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When you open a browser or an app, the request does not go directly to the server. In modern systems there is more than one server working together, it goes to a load balancer, which routes your request to a healthy and reliable server, and the server processes it and sends back a response through the load balancer.</p>
<h2 id="heading-what-is-a-load-balancer">What is a load balancer?</h2>
<p>A load balancer is either hardware or software, in modern technology it is software that does the single job of distributing traffic across servers. Think of it as a restaurant where there are many chefs, a host gets orders and assigns them to the appropriate chef. He does not take orders himself, but his only job is to assign orders to the correct chef. Similarly, a load balancer takes all the requests and routes them to different servers.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768727294876/9dc7fd0f-f2c0-4953-a78e-819a93b87345.png" alt="Load Balancer" class="image--center mx-auto" /></p>
<h2 id="heading-why-do-scalable-systems-need-it">Why do scalable systems need it?</h2>
<p>A load balancer is a core component of scalable systems, a system without a load balancer is very hard to scale. Because some of the servers will be idle and some will be overwhelmed by requests. Below are some of the advantages of a load balancer in a scalable system:</p>
<ol>
<li><p><strong>No single point of failure</strong>: If any server goes down, it will not affect the application because requests will be routed to the healthy servers.</p>
</li>
<li><p><strong>Easy scaling</strong>: Adding a new server to the system is easy, when a new server is booted, the load balancer automatically detects it and starts routing requests to it also.</p>
</li>
<li><p><strong>Better performance:</strong> When traffic is distributed, servers are not overloaded hence, they perform better.</p>
</li>
</ol>
<h2 id="heading-conclusion">Conclusion</h2>
<p>A load balancer is an essential component of a scalable system that works like a traffic police officer who routes the traffic across different lanes (servers) to avoid traffic jams. It distributes traffic across different servers, constantly checking if the servers are healthy, makes adding new servers into the system easy and more.</p>
]]></content:encoded></item></channel></rss>