<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Arma Sahar</title>
    <description>The latest articles on Forem by Arma Sahar (@_armasahar_).</description>
    <link>https://forem.com/_armasahar_</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3048001%2Fcbe821fe-bbad-4c91-82d4-e15dbab8c07f.jpg</url>
      <title>Forem: Arma Sahar</title>
      <link>https://forem.com/_armasahar_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/_armasahar_"/>
    <language>en</language>
    <item>
      <title>The Universal Handshake: Why the Modern World Runs on APIs</title>
      <dc:creator>Arma Sahar</dc:creator>
      <pubDate>Fri, 27 Feb 2026 02:15:44 +0000</pubDate>
      <link>https://forem.com/_armasahar_/the-universal-handshake-why-the-modern-world-runs-on-apis-12ck</link>
      <guid>https://forem.com/_armasahar_/the-universal-handshake-why-the-modern-world-runs-on-apis-12ck</guid>
      <description>&lt;p&gt;While you’re sleeping, your weather app is whispering to a satellite server in Nebraska. &lt;/p&gt;

&lt;p&gt;Yes, you read that right. If you look at your phone right now, you aren’t just looking at a piece of hardware; you are looking at a &lt;strong&gt;central hub for thousands of digital handshakes&lt;/strong&gt;. Every time you check the weather, log into an app using your Google account, or pay for a chai via &lt;strong&gt;GPay&lt;/strong&gt;, a silent, high-speed conversation is happening in the background.&lt;/p&gt;

&lt;p&gt;This constant, &lt;em&gt;invisible chatter&lt;/em&gt; is what makes the modern world feel "smart." And all this chatter is happening because of &lt;strong&gt;APIs (Application Programming Interfaces)&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Bit of History
&lt;/h2&gt;

&lt;p&gt;To understand why we need APIs, we have to go back to &lt;strong&gt;1951&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A guy named &lt;strong&gt;Maurice Wilkes&lt;/strong&gt;. He’s working on one of the world’s first computers, the &lt;strong&gt;EDSAC&lt;/strong&gt;. It’s the size of a room, and it’s incredibly slow. Maurice realized something that every junior dev eventually learns: &lt;em&gt;Writing the same code twice is a nightmare.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;He was tired of manually writing the math to calculate a "square root" every single time he needed it. So, he had a "eureka" moment. He wrote the math &lt;strong&gt;once&lt;/strong&gt;, put it on a special shelf (a &lt;strong&gt;library&lt;/strong&gt;), and told the computer: &lt;em&gt;"Whenever you need a square root, don't ask me. Just use that library."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That was the first &lt;strong&gt;Digital Handshake.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Fast forward to the year &lt;strong&gt;2000&lt;/strong&gt;. The internet was growing, but it was messy. Every company was a closed island. &lt;strong&gt;Salesforce&lt;/strong&gt; changed everything. They realized that if they let other people &lt;strong&gt;"plug into"&lt;/strong&gt; their data, they didn't have to build every feature themselves, other people would do it for them. They opened the &lt;strong&gt;first Web API&lt;/strong&gt;, and the internet finally started talking to itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an API?
&lt;/h2&gt;

&lt;p&gt;To understand an API, forget the complicated diagrams. Think of a &lt;strong&gt;USB-C port&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You have a laptop, a pair of headphones, and a charger. All three are made by different companies, using different internal parts and different languages. But they all "talk" to each other because they agree on the &lt;strong&gt;shape and the rules&lt;/strong&gt; of the USB-C port.&lt;/p&gt;

&lt;p&gt;An API is that port. It is a &lt;strong&gt;Contract&lt;/strong&gt;. It says: &lt;em&gt;If you plug into me and send this specific signal, I promise to give you this specific result.&lt;/em&gt; You don't need to know how the laptop’s brain works; you just need to know how to plug into the port.&lt;/p&gt;

&lt;p&gt;In the tech world, this is called &lt;strong&gt;Abstraction&lt;/strong&gt;. It means I can change the entire engine of my app, but as long as the &lt;em&gt;plug&lt;/em&gt; stays the same, you won't even notice I changed anything.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The Whisper Logic:&lt;/strong&gt; When you "Like" a post, your phone whispers a request to the server: &lt;em&gt;Arma Sahar interacted with you post by liking it. Permission to update?&lt;/em&gt; The server checks the baggage system (&lt;strong&gt;Database&lt;/strong&gt;), updates the ledger, and whispers back: &lt;em&gt;&lt;em&gt;Permission granted. Turn the heart red.&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is the &lt;strong&gt;"Contract.&lt;/strong&gt; The API promises that if the client sends a specific set of data, the server will return a specific result. The moment you break that contract by &lt;em&gt;changing a variable name&lt;/em&gt; or a data format the puppet's strings are cut, and the app dies.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  APIs in the Wild (The Desi Version)
&lt;/h2&gt;

&lt;p&gt;You are using APIs every single day, especially in the &lt;strong&gt;Digital India&lt;/strong&gt; era. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Swiggy/Zomato Magic:&lt;/strong&gt; Ever wonder how Swiggy knows exactly where your rider is? Swiggy doesn't own satellites. They &lt;strong&gt;"plug into"&lt;/strong&gt; the &lt;strong&gt;Google Maps API&lt;/strong&gt;. They basically pay Google to use their "brain" to find your house so your biryani arrives hot.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The UPI Revolution:&lt;/strong&gt; This is the ultimate Indian API success story. When you scan a QR code with &lt;strong&gt;PhonePe&lt;/strong&gt; or &lt;strong&gt;GPay&lt;/strong&gt;, the app doesn't actually have your money. It sends a "whisper" via an API to the &lt;strong&gt;NPCI (National Payments Corporation of India)&lt;/strong&gt;, which then talks to your bank. The bank says &lt;em&gt;Haan, iske paas paisa hai&lt;/em&gt; and the transaction is done. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;BookMyShow:&lt;/strong&gt; When you book a movie ticket, BookMyShow uses an API to ask the cinema's local system: &lt;em&gt;"Is Seat K-12 empty for Jawan?"&lt;/em&gt; The cinema shouts back &lt;em&gt;YES, if the seats are available&lt;/em&gt; and the booking is confirmed.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Big Picture
&lt;/h2&gt;

&lt;p&gt;We are living in the age of &lt;strong&gt;Connectivity&lt;/strong&gt;. We no longer build software as one giant, lonely machine. We build it like a &lt;strong&gt;Cricket Team&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;One player (API) handles the &lt;strong&gt;payments&lt;/strong&gt;, another handles the &lt;strong&gt;maps&lt;/strong&gt;, and another handles the &lt;strong&gt;login&lt;/strong&gt;. An API is the ultimate team player. It’s the handshake that lets a small startup in a garage in &lt;strong&gt;India&lt;/strong&gt; talk to a massive server in &lt;strong&gt;California&lt;/strong&gt; to solve a problem for a user in a village in &lt;strong&gt;Lucknow&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Once you understand APIs, you realize the &lt;strong&gt;Cloud&lt;/strong&gt; isn't some mysterious thing in the sky, it’s just a &lt;strong&gt;billion tiny, polite conversations&lt;/strong&gt; happening every second to make our lives easier.&lt;/p&gt;

&lt;h1&gt;
  
  
  SoftwareEngineering #SystemDesign #APIs #DigitalIndia #Backend #CodingLife #TechSimplified
&lt;/h1&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>I call it language of cloud</title>
      <dc:creator>Arma Sahar</dc:creator>
      <pubDate>Mon, 26 Jan 2026 10:08:57 +0000</pubDate>
      <link>https://forem.com/_armasahar_/-2ng8</link>
      <guid>https://forem.com/_armasahar_/-2ng8</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/_armasahar_" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3048001%2Fcbe821fe-bbad-4c91-82d4-e15dbab8c07f.jpg" alt="_armasahar_"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/_armasahar_/language-of-cloud-1c41" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Language of Cloud&lt;/h2&gt;
      &lt;h3&gt;Arma Sahar ・ Jan 25&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#programming&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#devops&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>devops</category>
    </item>
    <item>
      <title>Language of Cloud</title>
      <dc:creator>Arma Sahar</dc:creator>
      <pubDate>Sun, 25 Jan 2026 15:13:59 +0000</pubDate>
      <link>https://forem.com/_armasahar_/language-of-cloud-1c41</link>
      <guid>https://forem.com/_armasahar_/language-of-cloud-1c41</guid>
      <description>&lt;p&gt;If you look at your phone or laptop, you are most probably looking at only the colors and animations and few buttons. If you think that all the data of your WhatsApp chat, snaps, photos are living inside your devices, then you're wrong. &lt;/p&gt;

&lt;p&gt;Your device is mostly empty. Because it is just a client and a client is nothing more than a very expensive and smart looking remote control. &lt;/p&gt;

&lt;p&gt;Let's see how computes talk to each other on internet using, I call it &lt;strong&gt;Language of Cloud,&lt;/strong&gt; but the industry calls it &lt;strong&gt;Client Server Architecture&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Apparently Client Server architecture was born from simple realisation, i.e Why should one single device should do the hardwork of heavy lifting? In old days, if you want to updated any single thing you have to buy a whole new disc, just because the brain, "the logic/server" lived on your PC, which did not help in scaling at all. &lt;/p&gt;

&lt;p&gt;So.. Their was a shift wherein they split the software into 2 personas: &lt;/p&gt;

&lt;p&gt;The data, the logic, the server was put in a high security warehouses with massive power, which is called as Server. &lt;/p&gt;

&lt;p&gt;The buttons, the colors and screen are in your hand which is called as Client. &lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;language of cloud&lt;/strong&gt; is the conversation between the client and the server. &lt;/p&gt;

&lt;p&gt;When you like a photo on instagram, your phone doesn't actually do anything except send a tiny &lt;strong&gt;request&lt;/strong&gt; across the cables across the ocean to the &lt;strong&gt;server&lt;/strong&gt; of instagram and you/your phone is the &lt;strong&gt;client&lt;/strong&gt; here.  The request says: &lt;em&gt;user _armasahar&lt;/em&gt; clicked the heart button on post #82u8e8_&lt;/p&gt;

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

&lt;p&gt;The server receives that request and updates the massive &lt;strong&gt;database&lt;/strong&gt; and &lt;strong&gt;responds&lt;/strong&gt; back changed the button color to red, and added the post to liked posts category.&lt;/p&gt;

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

&lt;p&gt;This is how Client Server talks and it is called as &lt;strong&gt;Client Server Architecture.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To understand the language and deliver it with etiquette we must follow some set of rules like Grammar right?&lt;/p&gt;

&lt;p&gt;This applies to the Client Server Architecture as well, so that the request and responses should be formatted and can be understood by both the client and server. &lt;/p&gt;

&lt;p&gt;And it is possible through a protocol called as HTTP(Hyper Text Transfer Protocol). &lt;/p&gt;

&lt;p&gt;HTTP helps you to format the message, by using a standard. It follows three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;It sees what do we want to do? And the whole internet is divided into mainly 4 types of actions (GET, POST, PUT, DELETE). So HTTP check which kind of an &lt;strong&gt;Method&lt;/strong&gt;/action do we want to use. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The context of the message, it sets the Metadata like if it is html, json etc. and this is set through &lt;strong&gt;Headers&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The data itslef which it captures the information in the &lt;strong&gt;Body.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Quick tip: Open your browser, go to any website, right click on the page, inspect, and click the Network tab. Refresh the page. Look at the &lt;strong&gt;Status&lt;/strong&gt; and &lt;strong&gt;Method&lt;/strong&gt; columns. You are now seeing the &lt;strong&gt;Language of the Cloud&lt;/strong&gt; in real-time.&lt;/p&gt;

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

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>devops</category>
    </item>
    <item>
      <title>Did you knew this??</title>
      <dc:creator>Arma Sahar</dc:creator>
      <pubDate>Fri, 28 Nov 2025 17:37:21 +0000</pubDate>
      <link>https://forem.com/_armasahar_/did-you-knew-this-2i9e</link>
      <guid>https://forem.com/_armasahar_/did-you-knew-this-2i9e</guid>
      <description>&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/_armasahar_/temporal-dead-zone-in-javascript-3nf4" class="crayons-story__hidden-navigation-link"&gt;Temporal Dead Zone in JavaScript&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/_armasahar_" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3048001%2Fcbe821fe-bbad-4c91-82d4-e15dbab8c07f.jpg" alt="_armasahar_ profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/_armasahar_" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Arma Sahar
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Arma Sahar
                
              
              &lt;div id="story-author-preview-content-3068053" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/_armasahar_" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3048001%2Fcbe821fe-bbad-4c91-82d4-e15dbab8c07f.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Arma Sahar&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/_armasahar_/temporal-dead-zone-in-javascript-3nf4" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Nov 28 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/_armasahar_/temporal-dead-zone-in-javascript-3nf4" id="article-link-3068053"&gt;
          Temporal Dead Zone in JavaScript
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/javascript"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;javascript&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/beginners"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;beginners&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/tutorial"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;tutorial&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/node"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;node&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/_armasahar_/temporal-dead-zone-in-javascript-3nf4" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;7&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/_armasahar_/temporal-dead-zone-in-javascript-3nf4#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;




</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>node</category>
    </item>
    <item>
      <title>Temporal Dead Zone in JavaScript</title>
      <dc:creator>Arma Sahar</dc:creator>
      <pubDate>Fri, 28 Nov 2025 12:48:05 +0000</pubDate>
      <link>https://forem.com/_armasahar_/temporal-dead-zone-in-javascript-3nf4</link>
      <guid>https://forem.com/_armasahar_/temporal-dead-zone-in-javascript-3nf4</guid>
      <description>&lt;p&gt;&lt;strong&gt;Overview:&lt;/strong&gt; Did you know that &lt;strong&gt;JavaScript read your code not once, but twice&lt;/strong&gt;. In the first read it &lt;strong&gt;scans&lt;/strong&gt; all the &lt;strong&gt;variable&lt;/strong&gt; and &lt;strong&gt;function declarations&lt;/strong&gt; and &lt;strong&gt;allocate memory&lt;/strong&gt; for all of them and no matter wherever it is declared, &lt;strong&gt;those declaration moves to top&lt;/strong&gt; of their current scope before the code starts getting executed. This is called &lt;strong&gt;Hoisting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What do I mean by JavaScript read my code not for once, but twice?&lt;br&gt;
JavaScript follows &lt;strong&gt;two phase processing model&lt;/strong&gt; for executing code. &lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Memory creation phase&lt;/strong&gt;: In this phase the JS engine scans the entire codebase before executing anything it allocates the memory for all the variable and function declarations. &lt;code&gt;var&lt;/code&gt; in declared as undefined, &lt;code&gt;let&lt;/code&gt; &amp;amp; &lt;code&gt;const&lt;/code&gt; are uninitialised. In &lt;code&gt;function&lt;/code&gt; declarations the entire function body is stored in memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Execution Phase&lt;/strong&gt;: This is when JavaScript engine &lt;strong&gt;executes&lt;/strong&gt; code line by line. During this phase actual values are assigned to the variables that were stored in memory earlier as undefined or uninitiated. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hoisting&lt;/strong&gt; means you can sometimes use variables and functions at &lt;strong&gt;top&lt;/strong&gt; even if those variables and functions are declared at the end of the code. &lt;/p&gt;

&lt;p&gt;Hoisting is JavaScript's default behaviour of moving the declaration to the top before execution due to it's two phase processing.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Let's have a look at Hoisting of Variables&lt;/em&gt;:&lt;/p&gt;

&lt;h2&gt;
  
  
  Hoisting of variable
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Hoisting of "var" keyword:&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;In the above case, &lt;code&gt;var a&lt;/code&gt;- The declaration is moved to the top because of the JS two phase processing. In the memory creation space the code block has scanned for all the variables present in it are allocated a space in the memory whose value is automatically saved as &lt;strong&gt;undefined&lt;/strong&gt;. &lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The value which we assigned to the variable stays exactly where we wrote it, its just that the memory has the variable stored in it.&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Now in the code execution phase the codeblock checks the code &lt;strong&gt;line by line&lt;/strong&gt; and &lt;strong&gt;executes it&lt;/strong&gt;. &lt;/p&gt;

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

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

&lt;p&gt;same case with the &lt;code&gt;var b = 2&lt;/code&gt;. First the memory saves b = undefined and then when the code is being executed it will assign the value 2 to the variable b. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;In case of &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;These variables are also hoisted but they are not initialised. Instead, they are placed in a state called &lt;strong&gt;Temporal Dead Zone.&lt;/strong&gt; Any attempt to access them before their actual declaration line in the code will result in a &lt;strong&gt;ReferenceError&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Temporal Dead Zone here?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's always a mistake to try &amp;amp; use a variable before it has been explicitly declared &amp;amp; assigned a value. Hence why &lt;strong&gt;Temporal Dead Zone&lt;/strong&gt; was introduced, where &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt; variables are also hoisted (The engine knows that these variables exists in code while memory allocation phase) but they are deliberately not initialised. &lt;/p&gt;

&lt;p&gt;When JS engine scans a codeblock and if it finds let &amp;amp; const declarations, It creates a &lt;strong&gt;binding&lt;/strong&gt; (the association between the variable name and a memory location) for the variable.&lt;/p&gt;

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

&lt;p&gt;During the execution phase - If during execution, it encounters a line that tries to occur &lt;code&gt;let&lt;/code&gt; or &lt;code&gt;const&lt;/code&gt; variable before its declaration line is reached, the engine checks if the variable is in &lt;strong&gt;Temporal Dead Zone&lt;/strong&gt;. If it is found, it immediately throws a &lt;strong&gt;ReferenceError&lt;/strong&gt;.&lt;/p&gt;

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

&lt;p&gt;Once the engine reaches the actual let or const declaration line, then the variable is &lt;strong&gt;initialized&lt;/strong&gt; &amp;amp; it is also &lt;strong&gt;removed&lt;/strong&gt; from &lt;strong&gt;Temporal Dead Zone&lt;/strong&gt;, from this point onwards it can be &lt;strong&gt;accessed&lt;/strong&gt; normally within its &lt;strong&gt;scope&lt;/strong&gt;. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>node</category>
    </item>
    <item>
      <title>JavaScript reads your code twice - Hoisting in var, let &amp; const</title>
      <dc:creator>Arma Sahar</dc:creator>
      <pubDate>Wed, 19 Nov 2025 11:33:27 +0000</pubDate>
      <link>https://forem.com/_armasahar_/javascript-reads-your-code-twice-hoisting-in-var-let-const-260b</link>
      <guid>https://forem.com/_armasahar_/javascript-reads-your-code-twice-hoisting-in-var-let-const-260b</guid>
      <description>&lt;p&gt;&lt;strong&gt;Overview:&lt;/strong&gt; Did you know that &lt;strong&gt;JavaScript read your code not once, but twice&lt;/strong&gt;. In the first read it &lt;strong&gt;scans&lt;/strong&gt; all the &lt;strong&gt;variable&lt;/strong&gt; and &lt;strong&gt;function declarations&lt;/strong&gt; and &lt;strong&gt;allocate memory&lt;/strong&gt; for all of them and no matter wherever it is declared, &lt;strong&gt;those declaration moves to top&lt;/strong&gt; of their current scope before the code starts getting executed. This is called &lt;strong&gt;Hoisting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What do I mean by JavaScript read my code not for once, but twice?&lt;br&gt;
JavaScript follows &lt;strong&gt;two phase processing model&lt;/strong&gt; for executing code. &lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Memory creation phase&lt;/strong&gt;: In this phase the JS engine scans the entire codebase before executing anything it allocates the memory for all the variable and function declarations. &lt;code&gt;var&lt;/code&gt; in declared as undefined, &lt;code&gt;let&lt;/code&gt; &amp;amp; &lt;code&gt;const&lt;/code&gt; are uninitialised. In &lt;code&gt;function&lt;/code&gt; declarations the entire function body is stored in memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Execution Phase&lt;/strong&gt;: This is when JavaScript engine &lt;strong&gt;executes&lt;/strong&gt; code line by line. During this phase actual values are assigned to the variables that were stored in memory earlier as undefined or uninitiated. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hoisting&lt;/strong&gt; means you can sometimes use variables and functions at &lt;strong&gt;top&lt;/strong&gt; even if those variables and functions are declared at the end of the code. &lt;/p&gt;

&lt;p&gt;Hoisting is JavaScript's default behaviour of moving the declaration to the top before execution due to it's two phase processing.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Let's have a look at Hoisting of Variables&lt;/em&gt;:&lt;/p&gt;

&lt;h2&gt;
  
  
  Hoisting of variable
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Hoisting of "var" keyword:&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;In the above case, &lt;code&gt;var a&lt;/code&gt;- The declaration is moved to the top because of the JS two phase processing. In the memory creation space the code block has scanned for all the variables present in it are allocated a space in the memory whose value is automatically saved as &lt;strong&gt;undefined&lt;/strong&gt;. &lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The value which we assigned to the variable stays exactly where we wrote it, its just that the memory has the variable stored in it.&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Now in the code execution phase the codeblock checks the code &lt;strong&gt;line by line&lt;/strong&gt; and &lt;strong&gt;executes it&lt;/strong&gt;. &lt;/p&gt;

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

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

&lt;p&gt;same case with the &lt;code&gt;var b = 2&lt;/code&gt;. First the memory saves b = undefined and then when the code is being executed it will assign the value 2 to the variable b. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;In case of &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;These variables are also hoisted but they are not initialised. Instead, they are placed in a state called &lt;strong&gt;Temporal Dead Zone.&lt;/strong&gt; Any attempt to access them before their actual declaration line in the code will result in a &lt;strong&gt;ReferenceError&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Temporal Dead Zone here?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's always a mistake to try &amp;amp; use a variable before it has been explicitly declared &amp;amp; assigned a value. Hence why &lt;strong&gt;Temporal Dead Zone&lt;/strong&gt; was introduced, where &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt; variables are also hoisted (The engine knows that these variables exists in code while memory allocation phase) but they are deliberately not initialised. &lt;/p&gt;

&lt;p&gt;When JS engine scans a codeblock and if it finds let &amp;amp; const declarations, It creates a &lt;strong&gt;binding&lt;/strong&gt; (the association between the variable name and a memory location) for the variable.&lt;/p&gt;

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

&lt;p&gt;During the execution phase - If during execution, it encounters a line that tries to occur &lt;code&gt;let&lt;/code&gt; or &lt;code&gt;const&lt;/code&gt; variable before its declaration line is reached, the engine checks if the variable is in &lt;strong&gt;Temporal Dead Zone&lt;/strong&gt;. If it is found, it immediately throws a &lt;strong&gt;ReferenceError&lt;/strong&gt;.&lt;/p&gt;

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

&lt;p&gt;Once the engine reaches the actual let or const declaration line, then the variable is &lt;strong&gt;initialized&lt;/strong&gt; &amp;amp; it is also &lt;strong&gt;removed&lt;/strong&gt; from &lt;strong&gt;Temporal Dead Zone&lt;/strong&gt;, from this point onwards it can be &lt;strong&gt;accessed&lt;/strong&gt; normally within its &lt;strong&gt;scope&lt;/strong&gt;. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>A smart move or a silly one?</title>
      <dc:creator>Arma Sahar</dc:creator>
      <pubDate>Fri, 17 Oct 2025 09:24:53 +0000</pubDate>
      <link>https://forem.com/_armasahar_/a-smart-move-or-a-silly-one-2k3n</link>
      <guid>https://forem.com/_armasahar_/a-smart-move-or-a-silly-one-2k3n</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/_armasahar_" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3048001%2Fcbe821fe-bbad-4c91-82d4-e15dbab8c07f.jpg" alt="_armasahar_"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/_armasahar_/how-i-set-up-my-private-git-server-push-pull-and-manage-your-code-safely-19i9" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Step by step guide to make a Git server&lt;/h2&gt;
      &lt;h3&gt;Arma Sahar ・ Oct 14&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#programming&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Was it a dumb move or a smart one?</title>
      <dc:creator>Arma Sahar</dc:creator>
      <pubDate>Fri, 17 Oct 2025 09:24:06 +0000</pubDate>
      <link>https://forem.com/_armasahar_/was-it-a-dumb-move-or-a-smart-one-4j12</link>
      <guid>https://forem.com/_armasahar_/was-it-a-dumb-move-or-a-smart-one-4j12</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/_armasahar_" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3048001%2Fcbe821fe-bbad-4c91-82d4-e15dbab8c07f.jpg" alt="_armasahar_"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/_armasahar_/how-i-set-up-my-private-git-server-push-pull-and-manage-your-code-safely-19i9" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Step by step guide to make a Git server&lt;/h2&gt;
      &lt;h3&gt;Arma Sahar ・ Oct 14&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#programming&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>This is what I enjoy doing!</title>
      <dc:creator>Arma Sahar</dc:creator>
      <pubDate>Fri, 17 Oct 2025 09:23:01 +0000</pubDate>
      <link>https://forem.com/_armasahar_/this-is-what-i-enjoy-doing-56ga</link>
      <guid>https://forem.com/_armasahar_/this-is-what-i-enjoy-doing-56ga</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/_armasahar_/how-i-set-up-my-private-git-server-push-pull-and-manage-your-code-safely-19i9" class="crayons-story__hidden-navigation-link"&gt;Step by step guide to make a Git server&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/_armasahar_" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3048001%2Fcbe821fe-bbad-4c91-82d4-e15dbab8c07f.jpg" alt="_armasahar_ profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/_armasahar_" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Arma Sahar
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Arma Sahar
                
              
              &lt;div id="story-author-preview-content-2915248" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/_armasahar_" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3048001%2Fcbe821fe-bbad-4c91-82d4-e15dbab8c07f.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Arma Sahar&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/_armasahar_/how-i-set-up-my-private-git-server-push-pull-and-manage-your-code-safely-19i9" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Oct 14 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/_armasahar_/how-i-set-up-my-private-git-server-push-pull-and-manage-your-code-safely-19i9" id="article-link-2915248"&gt;
          Step by step guide to make a Git server
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/programming"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;programming&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/javascript"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;javascript&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/beginners"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;beginners&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/_armasahar_/how-i-set-up-my-private-git-server-push-pull-and-manage-your-code-safely-19i9" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;8&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/_armasahar_/how-i-set-up-my-private-git-server-push-pull-and-manage-your-code-safely-19i9#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            4 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Step by step guide to make a Git server</title>
      <dc:creator>Arma Sahar</dc:creator>
      <pubDate>Tue, 14 Oct 2025 09:30:31 +0000</pubDate>
      <link>https://forem.com/_armasahar_/how-i-set-up-my-private-git-server-push-pull-and-manage-your-code-safely-19i9</link>
      <guid>https://forem.com/_armasahar_/how-i-set-up-my-private-git-server-push-pull-and-manage-your-code-safely-19i9</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is a server?&lt;/strong&gt; &lt;br&gt;
&lt;strong&gt;Server&lt;/strong&gt; means which listens to &lt;strong&gt;request&lt;/strong&gt; coming from a different computer and &lt;strong&gt;responds&lt;/strong&gt; back to the request. &lt;/p&gt;

&lt;p&gt;For example: &lt;br&gt;
You go and search on Google, that means you are making a request from your system to Google's server. &lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Then from somewhere another computer replies:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhmuyidpsk0vle6hxyfin.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhmuyidpsk0vle6hxyfin.png" alt="armasahar" width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As the web pages are hosted on Google, you get a response back from Google's server. That computer which listens, processes, and responds is the "server"!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Servers differ based on what they serve&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Like &lt;strong&gt;Web Server&lt;/strong&gt; - serves Web pages, &lt;strong&gt;File server&lt;/strong&gt; - Lets you store and access files, &lt;strong&gt;Database server&lt;/strong&gt; - Stores and manages structured data, in the same way &lt;br&gt;
&lt;strong&gt;GIT SERVER&lt;/strong&gt; Stores git repositories and handles push/pull requests just like how Github does. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;The difference between all of these is just the software we use to build a server and port number&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;So today I am going to make my own &lt;strong&gt;Git Server&lt;/strong&gt;, but why do I need it in the first place? What's the &lt;strong&gt;importance&lt;/strong&gt; of having our own Git servers? &lt;/p&gt;

&lt;p&gt;Recently we have been hearing a lot about many &lt;strong&gt;vibe coders&lt;/strong&gt; are &lt;em&gt;pushing their API keys on Github repositories&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;And also what if Github crashes what are you gonna do?&lt;/p&gt;

&lt;p&gt;Have you ever seen large &lt;strong&gt;companies&lt;/strong&gt; push their codes on Github? Where do they store their codebases?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Think...think... till then I will make my Git server and share my point of view.&lt;/em&gt; &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Oh by the way! &lt;br&gt;
&lt;strong&gt;A general Question&lt;/strong&gt;: What is the significance of "Origin"&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxl8pqwvj0clygt81e0l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxl8pqwvj0clygt81e0l.png" alt="what is mean by origin in git command" width="800" height="63"&gt;&lt;/a&gt;&lt;br&gt;
Comment down the answer below!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I am going to use my &lt;strong&gt;Virtual Machine&lt;/strong&gt; as my Git Server and from my local terminal, I'll access the server to push and pull the code. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; Before starting with Git server setup, I created a separate &lt;strong&gt;user&lt;/strong&gt; called as &lt;strong&gt;Git&lt;/strong&gt; &amp;amp; Generated &lt;strong&gt;SSH key&lt;/strong&gt; for it. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Step 1: &lt;strong&gt;Switch the user to git&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Step 2: &lt;strong&gt;Check if you have Git installed&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Step 3: &lt;strong&gt;Create a directory for the git server and go to that directory&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;That's it this is going to be that space where you are going to create a new repository and push the code here. Just in case if you are wondering how is it going to work, then let me clarify; &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is a Repository?&lt;/strong&gt;&lt;br&gt;
It is just a folder on Github, ain't it? So just like how we go and create a new repo on Github we do it here locally. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Step 4: &lt;strong&gt;Initialise a bare git repository&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;This will create&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/home/gitserver/myFirstRepo.git/
├── branches/
├── config
├── description
├── HEAD
├── hooks/
├── info/
└── refs/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now as I have setup the Git server on my Virtual Machine, I will be connecting to it via &lt;strong&gt;SSH&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;ssh git@&amp;lt;Virtual Machine's IP Address&lt;/code&gt;&lt;br&gt;
I made sure you have &lt;strong&gt;ssh enabled&lt;/strong&gt; and &lt;strong&gt;active&lt;/strong&gt; on the virtual Machine. &lt;/p&gt;

&lt;p&gt;Once I get connected I will be shown like this on my local terminal (!Virtual Machine)&lt;/p&gt;

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

&lt;p&gt;This is just to check if my local machine is able to access my SSH connection from my Virtual Machine. &lt;/p&gt;

&lt;p&gt;Now I am going to push few files from my local terminal to the Git server. Currently I am here:&lt;/p&gt;

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

&lt;p&gt;Now I am going to follow the same git commands, which we use to push the code on Github.&lt;/p&gt;

&lt;p&gt;I have initialised git in my directory &lt;/p&gt;

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

&lt;p&gt;The next step is we &lt;strong&gt;add&lt;/strong&gt; the remote repository (&lt;em&gt;git-server's path&lt;/em&gt;) to the folder. Now watch carefully when I add the repository, their's a slight difference in it:&lt;/p&gt;

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

&lt;p&gt;TA DAAA!!&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;Did you notice that I didn't use git remote add "&lt;strong&gt;origin&lt;/strong&gt;", instead I chose to write &lt;strong&gt;gitServer&lt;/strong&gt;. That means Origin has no specific significance neither it is by default. Its like a variable name for your repository. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Okay so final test of this server! Let's check if I can push the code.&lt;/p&gt;

&lt;p&gt;The OG commands: &lt;br&gt;
Git &lt;strong&gt;add&lt;/strong&gt; &amp;amp;&amp;amp; git &lt;strong&gt;commit&lt;/strong&gt;: &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fejbe6e4leymrypin80qm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fejbe6e4leymrypin80qm.png" alt="git server" width="800" height="50"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and Now I am going to &lt;strong&gt;push&lt;/strong&gt; it into the repository which is on Git server&lt;/p&gt;

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

&lt;p&gt;Let's check!!&lt;/p&gt;

&lt;p&gt;Here you go, my repo has been &lt;strong&gt;updated&lt;/strong&gt; with the pushed code!&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz4m8rlnck0kcu54bpmnj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz4m8rlnck0kcu54bpmnj.png" alt="git server" width="800" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As this was my first commit on the bare repository hence I did not had to &lt;strong&gt;merge&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So why make your own Git server?&lt;/strong&gt;&lt;br&gt;
Because using GitHub is convenient, but it’s still someone else’s computer right!?&lt;/p&gt;

&lt;p&gt;When you push code to GitHub, you’re &lt;strong&gt;trustin&lt;/strong&gt;g them with everything: their servers to stay online, their policies not to change, their security to keep your data private.&lt;/p&gt;

&lt;p&gt;If GitHub deletes your repo by any chance, it’s gone unless you’ve backed it up.&lt;/p&gt;

&lt;p&gt;Having your own Git server means; you have control over backups, you decide who can access it, you decide when to update or migrate.&lt;/p&gt;

&lt;p&gt;I have mentioned above about “&lt;em&gt;vibe coders pushing their API keys&lt;/em&gt;!”&lt;/p&gt;

&lt;p&gt;That’s exactly why &lt;strong&gt;public Git hosting is risky&lt;/strong&gt;: Git’s &lt;strong&gt;history&lt;/strong&gt; is permanent.. even if you delete a key, it’s still available somewhere in previous commits. &lt;/p&gt;

&lt;p&gt;Or attackers use &lt;strong&gt;bots&lt;/strong&gt; that &lt;strong&gt;scans&lt;/strong&gt; GitHub in real time for exposed .env or API keys. Once compromised, attackers can steal data, send emails, or any other kind of malicious activity &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Anything can happen, so safe side have your own git server and for backup or secondary source use Github&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Did you knew this before?</title>
      <dc:creator>Arma Sahar</dc:creator>
      <pubDate>Tue, 30 Sep 2025 18:42:19 +0000</pubDate>
      <link>https://forem.com/_armasahar_/did-you-knew-this-before-3ol5</link>
      <guid>https://forem.com/_armasahar_/did-you-knew-this-before-3ol5</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/_armasahar_" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3048001%2Fcbe821fe-bbad-4c91-82d4-e15dbab8c07f.jpg" alt="_armasahar_"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/_armasahar_/git-exposed-part-1-git-isnt-what-you-think-it-is-p7l" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Git Exposed!&lt;/h2&gt;
      &lt;h3&gt;Arma Sahar ・ Sep 30&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#coding&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#opensource&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>coding</category>
      <category>opensource</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Did you know this?</title>
      <dc:creator>Arma Sahar</dc:creator>
      <pubDate>Tue, 30 Sep 2025 11:37:32 +0000</pubDate>
      <link>https://forem.com/_armasahar_/-440n</link>
      <guid>https://forem.com/_armasahar_/-440n</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/_armasahar_" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3048001%2Fcbe821fe-bbad-4c91-82d4-e15dbab8c07f.jpg" alt="_armasahar_"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/_armasahar_/git-exposed-part-1-git-isnt-what-you-think-it-is-p7l" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Git Exposed!&lt;/h2&gt;
      &lt;h3&gt;Arma Sahar ・ Sep 30&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#coding&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#opensource&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>github</category>
      <category>programming</category>
      <category>ai</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
