<?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[Git for Beginners]]></title><description><![CDATA[Git for Beginners]]></description><link>https://mahesh0642.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 09:34:37 GMT</lastBuildDate><atom:link href="https://mahesh0642.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[TCP Working: 3-Way Handshake & Reliable Communication]]></title><description><![CDATA[In computer networks, data must travel across unreliable networks and still reach the destination accurately, in order, and without loss. This is exactly what TCP (Transmission Control Protocol) is designed to do.
TCP is a connection-oriented, reliab...]]></description><link>https://mahesh0642.hashnode.dev/tcp-working-3-way-handshake-and-reliable-communication</link><guid isPermaLink="true">https://mahesh0642.hashnode.dev/tcp-working-3-way-handshake-and-reliable-communication</guid><category><![CDATA[TCP]]></category><category><![CDATA[tcp-3-way-handshake]]></category><category><![CDATA[SYN SYN-ACK ACK]]></category><dc:creator><![CDATA[Mahesh]]></dc:creator><pubDate>Wed, 28 Jan 2026 12:29:09 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769603293420/71ab647a-f232-4a8e-92cb-844f83c73df0.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In computer networks, data must travel across unreliable networks and still reach the destination <strong>accurately, in order, and without loss</strong>. This is exactly what <strong>TCP (Transmission Control Protocol)</strong> is designed to do.</p>
<p>TCP is a <strong>connection-oriented, reliable transport layer protocol</strong> widely used by applications such as HTTP, HTTPS, FTP, SMTP, and more.</p>
<p>This blog explains:</p>
<ul>
<li><p>How TCP establishes a connection using the <strong>3-Way Handshake</strong></p>
</li>
<li><p>How TCP ensures <strong>reliable communication</strong></p>
</li>
</ul>
<hr />
<h2 id="heading-what-is-tcp">What is TCP?</h2>
<p><strong>TCP (Transmission Control Protocol)</strong> operates at the <strong>Transport Layer</strong> of the TCP/IP model. It provides:</p>
<ul>
<li><p>Reliable data transfer</p>
</li>
<li><p>Ordered delivery of packets</p>
</li>
<li><p>Error detection and recovery</p>
</li>
<li><p>Flow control</p>
</li>
<li><p>Congestion control</p>
</li>
</ul>
<p>Before sending data, TCP must <strong>establish a connection</strong> between the sender and receiver.</p>
<hr />
<h2 id="heading-tcp-3-way-handshake-connection-establishment">TCP 3-Way Handshake (Connection Establishment)</h2>
<p>The <strong>3-Way Handshake</strong> is the process TCP uses to establish a reliable connection between a client and a server.</p>
<h3 id="heading-why-is-it-needed">Why is it needed?</h3>
<ul>
<li><p>To confirm both sides are ready to communicate</p>
</li>
<li><p>To synchronize <strong>sequence numbers</strong></p>
</li>
<li><p>To prevent old or duplicate connections</p>
</li>
</ul>
<hr />
<h3 id="heading-step-1-syn-synchronize">Step 1: SYN (Synchronize)</h3>
<ul>
<li><p>The <strong>client</strong> sends a packet with the <strong>SYN flag</strong> set</p>
</li>
<li><p>It includes an initial sequence number</p>
</li>
</ul>
<pre><code class="lang-plaintext">Client → Server : SYN
</code></pre>
<p>✔️ Meaning: <em>“I want to start a connection.”</em></p>
<hr />
<h3 id="heading-step-2-syn-ack-synchronize-acknowledge">Step 2: SYN-ACK (Synchronize + Acknowledge)</h3>
<ul>
<li><p>The <strong>server</strong> responds with:</p>
<ul>
<li><p>SYN (its own sequence number)</p>
</li>
<li><p>ACK (acknowledging client’s SYN)</p>
</li>
</ul>
</li>
</ul>
<pre><code class="lang-plaintext">Server → Client : SYN + ACK
</code></pre>
<p>✔️ Meaning: <em>“I received your request and I’m ready.”</em></p>
<hr />
<h3 id="heading-step-3-ack-acknowledge">Step 3: ACK (Acknowledge)</h3>
<ul>
<li>The <strong>client</strong> sends an ACK to confirm</li>
</ul>
<pre><code class="lang-plaintext">Client → Server : ACK
</code></pre>
<p>✔️ Meaning: <em>“Connection established.”</em></p>
<hr />
<h3 id="heading-result">Result</h3>
<p>✅ TCP connection is now <strong>established</strong><br />✅ Data transfer can begin</p>
<hr />
<h2 id="heading-reliable-communication-in-tcp">Reliable Communication in TCP</h2>
<p>Once the connection is established, TCP ensures reliability using several mechanisms.</p>
<hr />
<h3 id="heading-1-sequence-numbers">1. Sequence Numbers</h3>
<ul>
<li><p>Every byte of data is assigned a <strong>sequence number</strong></p>
</li>
<li><p>Helps the receiver:</p>
<ul>
<li><p>Reassemble data in correct order</p>
</li>
<li><p>Detect missing packets</p>
</li>
</ul>
</li>
</ul>
<hr />
<h3 id="heading-2-acknowledgements-acks">2. Acknowledgements (ACKs)</h3>
<ul>
<li><p>Receiver sends ACKs for received data</p>
</li>
<li><p>Confirms successful delivery</p>
</li>
</ul>
<p>If ACK is not received → <strong>data is retransmitted</strong></p>
<hr />
<h3 id="heading-3-retransmission">3. Retransmission</h3>
<ul>
<li><p>If packets are:</p>
<ul>
<li><p>Lost</p>
</li>
<li><p>Corrupted</p>
</li>
<li><p>Delivered out of order</p>
</li>
</ul>
</li>
</ul>
<p>TCP <strong>automatically retransmits</strong> them.</p>
<hr />
<h3 id="heading-4-flow-control">4. Flow Control</h3>
<ul>
<li><p>Uses a <strong>sliding window mechanism</strong></p>
</li>
<li><p>Prevents sender from overwhelming the receiver</p>
</li>
<li><p>Receiver controls how much data it can accept</p>
</li>
</ul>
<hr />
<h3 id="heading-5-congestion-control">5. Congestion Control</h3>
<ul>
<li><p>Prevents network congestion</p>
</li>
<li><p>Adjusts sending rate based on network conditions</p>
</li>
<li><p>Uses algorithms like:</p>
<ul>
<li><p>Slow Start</p>
</li>
<li><p>Congestion Avoidance</p>
</li>
<li><p>Fast Retransmit</p>
</li>
</ul>
</li>
</ul>
<hr />
<h3 id="heading-6-error-detection">6. Error Detection</h3>
<ul>
<li><p>Uses <strong>checksums</strong></p>
</li>
<li><p>Corrupted packets are discarded and retransmitted</p>
</li>
</ul>
<hr />
<h2 id="heading-tcp-connection-termination">TCP Connection Termination</h2>
<p>After data transfer, TCP closes the connection gracefully using a <strong>4-way termination process</strong> involving FIN and ACK flags.</p>
<hr />
<h2 id="heading-real-world-example">Real-World Example</h2>
<p>When you open a website:</p>
<ol>
<li><p>Browser establishes TCP connection (3-way handshake)</p>
</li>
<li><p>HTTP request is sent over TCP</p>
</li>
<li><p>TCP ensures all webpage data arrives correctly</p>
</li>
<li><p>Connection is closed after completion</p>
</li>
</ol>
<hr />
<h2 id="heading-summary">Summary</h2>
<ul>
<li><p>TCP is a <strong>reliable, connection-oriented protocol</strong></p>
</li>
<li><p>Uses <strong>3-Way Handshake</strong> to establish connections</p>
</li>
<li><p>Ensures reliability through:</p>
<ul>
<li><p>Sequence numbers</p>
</li>
<li><p>ACKs</p>
</li>
<li><p>Retransmissions</p>
</li>
<li><p>Flow &amp; congestion control</p>
</li>
</ul>
</li>
</ul>
<p>Without TCP, modern internet applications would not function reliably.</p>
]]></content:encoded></item><item><title><![CDATA[Git for Beginners: Basics and Essential Commands]]></title><description><![CDATA[Before understanding Git and GitHub, it’s important to look at the challenges developers faced in the past. Managing code changes, collaborating with team members, and maintaining multiple versions of a project were difficult without a proper trackin...]]></description><link>https://mahesh0642.hashnode.dev/git-for-beginners-basics-and-essential-commands</link><guid isPermaLink="true">https://mahesh0642.hashnode.dev/git-for-beginners-basics-and-essential-commands</guid><category><![CDATA[GitHub]]></category><category><![CDATA[version control]]></category><category><![CDATA[Git]]></category><dc:creator><![CDATA[Mahesh]]></dc:creator><pubDate>Tue, 06 Jan 2026 06:00:14 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1767697112521/59db8465-8054-437d-9d0a-9fcc5c19eb2f.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Before understanding Git and GitHub, it’s important to look at the challenges developers faced in the past. Managing code changes, collaborating with team members, and maintaining multiple versions of a project were difficult without a proper tracking system. These challenges raise important questions: <em>Why should we learn Git and GitHub? How was collaborative coding done before these tools existed? What problems led to their creation?</em></p>
<p>To answer these questions, let’s explore how software development worked earlier and how Git and GitHub became essential tools.</p>
<hr />
<h2 id="heading-the-pen-drive-collaboration-problem">The Pen Drive Collaboration Problem</h2>
<p>Imagine a team of developers working on a project without any version control system like Git. After writing some initial code, one developer needs help to add new features. Since there is no proper collaboration tool, he compresses the entire project into a ZIP file and shares it with team members using a pen drive.</p>
<p>Each team member copies the files to their own system and starts working independently. However, because there is no tracking system, several problems quickly arise:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767678999485/15930e21-6ef3-4d6e-ad02-0d837ab6c0cb.png" alt class="image--center mx-auto" /></p>
<ul>
<li><p>No way to identify <strong>who made which changes</strong></p>
</li>
<li><p>No record of <strong>when changes were made</strong></p>
</li>
<li><p>Confusion about <strong>which version of the code is the latest</strong></p>
</li>
</ul>
<p>As the project grows, these issues turn into a <strong>massive headache</strong>. Developers spend more time resolving confusion than writing code. Bug fixes and new features become risky, productivity drops, and collaboration becomes frustrating.</p>
<hr />
<h2 id="heading-solution-1-introducing-git">Solution 1: Introducing Git</h2>
<p>To solve these problems, the team introduces <strong>Git</strong>.</p>
<p><strong>Git</strong> is a <strong>distributed version control system</strong> that tracks changes in source code. It maintains a complete history of every modification, allowing developers to see what changed, who changed it, and when it happened. Git enables developers to work independently using <strong>branches</strong>, safely merge their work, and roll back to previous versions if something goes wrong.</p>
<p>This brings structure, clarity, and control to the development process.</p>
<h3 id="heading-limitation-of-git-without-a-remote-repository">Limitation of Git (Without a Remote Repository)</h3>
<p>Even with Git, the team still relies on pen drives to share the repository. There is <strong>no central storage</strong>, no instant sharing of updates, and no reliable backup. If a pen drive is lost or corrupted, the code can be lost entirely.</p>
<hr />
<h2 id="heading-solution-2-introducing-github-remote-repository">Solution 2: Introducing GitHub (Remote Repository)</h2>
<p>To overcome this final challenge, the team adopts <strong>GitHub</strong>.</p>
<p><strong>GitHub</strong> is a <strong>cloud-based platform</strong> that hosts Git repositories and acts as a central location for collaboration. Developers can push their changes, pull the latest updates, and access the code from anywhere. It provides a secure backup and ensures everyone works on the same, most recent version of the project.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767679018045/71fdfb5c-0c6f-4a11-abb1-25f6c0f8aed4.jpeg" alt class="image--center mx-auto" /></p>
<p>GitHub also offers powerful collaboration features such as:</p>
<ul>
<li><p>Pull requests</p>
</li>
<li><p>Code reviews</p>
</li>
<li><p>Issue tracking</p>
</li>
<li><p>Access control</p>
</li>
</ul>
<p>Together, <strong>Git and GitHub</strong> provide a modern, efficient, and scalable solution for collaborative software development.</p>
<hr />
<h2 id="heading-basic-git-workflow-beginner-friendly">Basic Git Workflow (Beginner Friendly)</h2>
<ol>
<li><p>Write code</p>
</li>
<li><p>Git tracks file changes</p>
</li>
<li><p>Save changes using a commit</p>
</li>
<li><p>Push code to GitHub</p>
</li>
<li><p>Team members pull the latest updates</p>
</li>
</ol>
<hr />
<h2 id="heading-essential-git-commands">Essential Git Commands</h2>
<ul>
<li><p><code>git init</code> – Initialize a Git repository</p>
</li>
<li><p><code>git status</code> – Check the current state of files</p>
</li>
<li><p><code>git add</code> – Stage changes for commit</p>
</li>
<li><p><code>git commit</code> – Save changes with a message</p>
</li>
<li><p><code>git push</code> – Upload code to GitHub</p>
</li>
<li><p><code>git pull</code> – Download the latest code</p>
</li>
</ul>
<hr />
<h3 id="heading-final-note">Final Note</h3>
<p>Today, Git and GitHub are industry-standard tools. Whether you are a beginner or an experienced developer, mastering them is essential for building reliable, collaborative, and scalable <a target="_blank" href="http://software.ad">software</a></p>
]]></content:encoded></item></channel></rss>