<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Henry of Oracus 🇳🇬</title>
    <description>The latest articles on DEV Community by Henry of Oracus 🇳🇬 (@ezeanyim_henry).</description>
    <link>https://dev.to/ezeanyim_henry</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%2F870195%2F314c5c02-b88b-4830-b2fd-0fdc9de28d98.jpg</url>
      <title>DEV Community: Henry of Oracus 🇳🇬</title>
      <link>https://dev.to/ezeanyim_henry</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ezeanyim_henry"/>
    <language>en</language>
    <item>
      <title>DNS for Beginners: How Your Browser Finds Websites</title>
      <dc:creator>Henry of Oracus 🇳🇬</dc:creator>
      <pubDate>Tue, 19 May 2026 13:42:48 +0000</pubDate>
      <link>https://dev.to/ezeanyim_henry/dns-for-beginners-how-your-browser-finds-websites-27bm</link>
      <guid>https://dev.to/ezeanyim_henry/dns-for-beginners-how-your-browser-finds-websites-27bm</guid>
      <description>&lt;h1&gt;
  
  
  DNS for Beginners: How Your Browser Finds Websites
&lt;/h1&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%2Fla2gdp3tvmlv3qlmov12.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%2Fla2gdp3tvmlv3qlmov12.png" alt="Cover image for DNS for Beginners: How Your Browser Finds Websites" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You type a website name like &lt;code&gt;example.com&lt;/code&gt;, press Enter, and the page starts loading.&lt;/p&gt;

&lt;p&gt;That feels simple.&lt;br&gt;
But under the hood, your device has to answer an important question first:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where is this website actually located?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is where &lt;strong&gt;DNS&lt;/strong&gt; comes in.&lt;/p&gt;

&lt;p&gt;DNS is one of those internet basics that beginners hear about a lot, but it can feel fuzzy at first. In this post, we will make it practical.&lt;/p&gt;
&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;DNS stands for Domain Name System.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Its job is to help your device turn a human-friendly website name like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;into a machine-friendly IP address like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;93.184.216.34
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Computers use IP addresses to find each other on a network.&lt;br&gt;
Humans prefer names.&lt;br&gt;
DNS is the translator between the two.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why do we even need DNS?
&lt;/h2&gt;

&lt;p&gt;Imagine if every website required you to memorize a number.&lt;/p&gt;

&lt;p&gt;Instead of typing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;google.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;github.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;wikipedia.org&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You would have to remember their IP addresses.&lt;/p&gt;

&lt;p&gt;That would be annoying, error-prone, and honestly a terrible user experience.&lt;/p&gt;

&lt;p&gt;DNS exists so we can use names while computers still use addresses.&lt;/p&gt;
&lt;h2&gt;
  
  
  A simple real-world analogy
&lt;/h2&gt;

&lt;p&gt;Think of DNS like your phone contacts.&lt;/p&gt;

&lt;p&gt;You do not memorize every friend's phone number.&lt;br&gt;
You save names like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Alice&lt;/li&gt;
&lt;li&gt;Tunde&lt;/li&gt;
&lt;li&gt;Sarah&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you tap a name, your phone looks up the matching number and makes the call.&lt;/p&gt;

&lt;p&gt;DNS works in a similar way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you type a domain name&lt;/li&gt;
&lt;li&gt;DNS looks up the matching IP address&lt;/li&gt;
&lt;li&gt;your browser uses that IP address to connect to the server&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is why people often call DNS &lt;strong&gt;the phonebook of the internet&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  What happens when you open a website?
&lt;/h2&gt;

&lt;p&gt;Here is the beginner-friendly flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You type &lt;code&gt;example.com&lt;/code&gt; into your browser&lt;/li&gt;
&lt;li&gt;Your browser asks, "What IP address belongs to this domain?"&lt;/li&gt;
&lt;li&gt;DNS helps find the answer&lt;/li&gt;
&lt;li&gt;The browser connects to that IP address&lt;/li&gt;
&lt;li&gt;The server responds with the website content&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Without DNS, step 3 becomes a problem very quickly.&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%2Fm0jr4aepgl5n6jj7bg7e.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%2Fm0jr4aepgl5n6jj7bg7e.png" alt="Diagram showing a browser asking DNS for the IP address of a website, receiving the answer, and then connecting to the web server" width="800" height="514"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What is an IP address?
&lt;/h2&gt;

&lt;p&gt;An &lt;strong&gt;IP address&lt;/strong&gt; is a numeric address that identifies a device or server on a network.&lt;/p&gt;

&lt;p&gt;You can think of it like an address for a house.&lt;br&gt;
If you want to deliver a package, you need the address.&lt;br&gt;
If your browser wants to load a website, it needs the server's IP address.&lt;/p&gt;

&lt;p&gt;Two common examples are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;IPv4: &lt;code&gt;93.184.216.34&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;IPv6: &lt;code&gt;2606:2800:220:1:248:1893:25c8:1946&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do not worry about memorizing them. The important beginner idea is this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;domain names are easier for people, IP addresses are necessary for networks.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Who answers a DNS request?
&lt;/h2&gt;

&lt;p&gt;Usually, your device does not know every domain name by itself.&lt;br&gt;
So it asks a &lt;strong&gt;DNS resolver&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A DNS resolver is a server that helps find the correct IP address.&lt;br&gt;
It may be provided by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;your internet service provider&lt;/li&gt;
&lt;li&gt;a public DNS service like Google DNS or Cloudflare DNS&lt;/li&gt;
&lt;li&gt;your company or school network&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So when you type a domain, your device often asks a resolver first.&lt;/p&gt;
&lt;h2&gt;
  
  
  Does DNS always start from scratch?
&lt;/h2&gt;

&lt;p&gt;Thankfully, no.&lt;br&gt;
That would be slow.&lt;/p&gt;

&lt;p&gt;DNS uses &lt;strong&gt;caching&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Caching means storing a recent answer for reuse.&lt;/p&gt;

&lt;p&gt;If your browser, operating system, or DNS resolver recently looked up &lt;code&gt;example.com&lt;/code&gt;, it may already remember the IP address for a while.&lt;br&gt;
That makes future requests faster.&lt;/p&gt;

&lt;p&gt;So a simplified version looks like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;if the answer is already cached, use it&lt;/li&gt;
&lt;li&gt;if not, ask DNS and then cache the result&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is one reason websites often load faster after the first visit.&lt;/p&gt;
&lt;h2&gt;
  
  
  What are DNS records?
&lt;/h2&gt;

&lt;p&gt;DNS does not only store one kind of information.&lt;br&gt;
It stores different kinds of &lt;strong&gt;records&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You do not need to master them all today, but here are a few useful ones:&lt;/p&gt;
&lt;h3&gt;
  
  
  A record
&lt;/h3&gt;

&lt;p&gt;Maps a domain to an IPv4 address.&lt;/p&gt;

&lt;p&gt;Example idea:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;example.com -&amp;gt; 93.184.216.34
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  AAAA record
&lt;/h3&gt;

&lt;p&gt;Maps a domain to an IPv6 address.&lt;/p&gt;

&lt;h3&gt;
  
  
  CNAME record
&lt;/h3&gt;

&lt;p&gt;Points one domain name to another domain name.&lt;/p&gt;

&lt;p&gt;Example idea:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;www.example.com -&amp;gt; example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  MX record
&lt;/h3&gt;

&lt;p&gt;Used for email servers.&lt;/p&gt;

&lt;p&gt;If you have ever wondered how email knows where to go, MX records are part of that answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical example
&lt;/h2&gt;

&lt;p&gt;Suppose you visit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://myblog.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before the website can load, your browser needs the server address.&lt;br&gt;
DNS might return something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;203.0.113.10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then your browser can try connecting to that server.&lt;/p&gt;

&lt;p&gt;So DNS is not the website itself.&lt;br&gt;
DNS is the helper that tells your device where the website lives.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common beginner misunderstandings
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. DNS is not the same as hosting
&lt;/h3&gt;

&lt;p&gt;DNS helps point you to the server.&lt;br&gt;
Hosting is where the website files or application actually live.&lt;/p&gt;

&lt;p&gt;A simple way to separate them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DNS&lt;/strong&gt; says where to go&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;hosting&lt;/strong&gt; is what is waiting there&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. DNS is not the browser
&lt;/h3&gt;

&lt;p&gt;Your browser uses DNS, but DNS is not the browser.&lt;br&gt;
It is a separate system that helps the browser find the destination.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. DNS changes are not always instant
&lt;/h3&gt;

&lt;p&gt;If you update a DNS record, the internet may not reflect it immediately because of caching.&lt;br&gt;
That is why developers talk about &lt;strong&gt;DNS propagation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Sometimes the new value is live in one place but an old cached value still appears somewhere else for a while.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why developers should care about DNS
&lt;/h2&gt;

&lt;p&gt;Even beginners run into DNS pretty quickly when they:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;connect a custom domain to a website&lt;/li&gt;
&lt;li&gt;point a domain to a VPS or hosting provider&lt;/li&gt;
&lt;li&gt;verify a domain for email or third-party services&lt;/li&gt;
&lt;li&gt;debug why a site is not reachable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You do not need to become a network engineer overnight.&lt;br&gt;
But understanding the basics saves a lot of confusion.&lt;/p&gt;

&lt;h2&gt;
  
  
  A mental model that helps
&lt;/h2&gt;

&lt;p&gt;If all the terminology starts blending together, remember this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;domain name&lt;/strong&gt; = the name humans type&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IP address&lt;/strong&gt; = the address computers use&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DNS&lt;/strong&gt; = the system that connects the two&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That model is enough to carry you through a lot of beginner situations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final takeaway
&lt;/h2&gt;

&lt;p&gt;If you remember only one thing, remember this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DNS helps your browser find the right server by translating a domain name into an IP address.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once that clicks, a lot of internet concepts start feeling less mysterious.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>networking</category>
      <category>internet</category>
    </item>
    <item>
      <title>CORS for Beginners: Why the Browser Sometimes Blocks Your Request</title>
      <dc:creator>Henry of Oracus 🇳🇬</dc:creator>
      <pubDate>Wed, 13 May 2026 13:47:17 +0000</pubDate>
      <link>https://dev.to/ezeanyim_henry/cors-for-beginners-why-the-browser-sometimes-blocks-your-request-1oei</link>
      <guid>https://dev.to/ezeanyim_henry/cors-for-beginners-why-the-browser-sometimes-blocks-your-request-1oei</guid>
      <description>&lt;h1&gt;
  
  
  CORS for Beginners: Why the Browser Sometimes Blocks Your Request
&lt;/h1&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%2Fi0y5q4g6zbap9xg6obcs.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%2Fi0y5q4g6zbap9xg6obcs.png" alt="Cover image for CORS for Beginners: Why the Browser Sometimes Blocks Your Request" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are learning frontend development, APIs, or JavaScript, there is a decent chance you have seen an error that looks something like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Blocked by CORS policy"&lt;/li&gt;
&lt;li&gt;"No 'Access-Control-Allow-Origin' header"&lt;/li&gt;
&lt;li&gt;"Cross-origin request blocked"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And yes, the first time you see it, it feels like the browser woke up angry.&lt;/p&gt;

&lt;p&gt;The good news is that &lt;strong&gt;CORS is not random&lt;/strong&gt;.&lt;br&gt;
It is a browser security rule with a specific purpose.&lt;/p&gt;

&lt;p&gt;In this post, we will break down what CORS is, why it exists, and how to think about it without drowning in jargon.&lt;/p&gt;
&lt;h2&gt;
  
  
  Start with the short version
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;CORS is a browser rule that controls when a webpage is allowed to make requests to a different origin.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That raises another beginner question immediately:&lt;/p&gt;

&lt;p&gt;What is an &lt;strong&gt;origin&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;An origin is basically a combination of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;protocol&lt;/li&gt;
&lt;li&gt;domain&lt;/li&gt;
&lt;li&gt;port&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So these are different origins:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;https://myapp.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http://myapp.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;https://api.myapp.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;https://myapp.com:3000&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even if they look related, the browser treats them as different origins if one of those parts changes.&lt;/p&gt;
&lt;h2&gt;
  
  
  A simple example
&lt;/h2&gt;

&lt;p&gt;Imagine your frontend is running here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://myfrontend.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And it tries to fetch data from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://api.other-site.com/data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is a &lt;strong&gt;cross-origin request&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The browser notices that the page origin and the API origin are different.&lt;br&gt;
Then it checks whether the server allows that request.&lt;/p&gt;

&lt;p&gt;If the server does not allow it, the browser blocks access to the response.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why does CORS exist?
&lt;/h2&gt;

&lt;p&gt;Because browsers are trying to protect users.&lt;/p&gt;

&lt;p&gt;Without rules like this, a malicious website could load in your browser and quietly try to make requests to other sites using your session, cookies, or login state.&lt;/p&gt;

&lt;p&gt;CORS is part of the defense.&lt;br&gt;
It helps servers say:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Yes, this website can access my responses"&lt;/li&gt;
&lt;li&gt;"No, that other website cannot"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So CORS is not there to annoy developers.&lt;br&gt;
It is there because browsers are suspicious for a reason.&lt;/p&gt;
&lt;h2&gt;
  
  
  Same-origin policy comes first
&lt;/h2&gt;

&lt;p&gt;Before CORS makes sense, you need one idea:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Browsers have a same-origin policy.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That policy says a page usually cannot freely read responses from a different origin.&lt;/p&gt;

&lt;p&gt;CORS is the mechanism that allows a server to relax that rule &lt;strong&gt;when it wants to&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So a helpful mental model is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;same-origin policy&lt;/strong&gt; = the default restriction&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CORS&lt;/strong&gt; = the server-controlled exception&lt;/li&gt;
&lt;/ul&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%2F8y0w6wgesgxtdx541x4f.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%2F8y0w6wgesgxtdx541x4f.png" alt="Diagram showing a browser page making a request to another origin and the server either allowing or blocking access with CORS headers" width="800" height="514"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  How does the server allow it?
&lt;/h2&gt;

&lt;p&gt;The server sends special HTTP headers.&lt;/p&gt;

&lt;p&gt;One of the most common is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;Access-Control-Allow-Origin: https://myfrontend.com
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That tells the browser:&lt;/p&gt;

&lt;p&gt;"It is okay for this specific origin to read the response."&lt;/p&gt;

&lt;p&gt;Sometimes you may also see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;Access-Control-Allow-Origin: *
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That means "any origin is allowed".&lt;/p&gt;

&lt;p&gt;That can be useful for truly public resources, but it is not always appropriate, especially when credentials are involved.&lt;/p&gt;

&lt;h2&gt;
  
  
  Important beginner point: the browser enforces CORS
&lt;/h2&gt;

&lt;p&gt;This part confuses a lot of people.&lt;/p&gt;

&lt;p&gt;CORS is mainly a &lt;strong&gt;browser behavior&lt;/strong&gt;.&lt;br&gt;
The server sends headers, but the browser decides whether frontend JavaScript is allowed to read the response.&lt;/p&gt;

&lt;p&gt;That means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a request might fail in the browser&lt;/li&gt;
&lt;li&gt;but the same request might work fine in Postman, curl, or server-side code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why?&lt;br&gt;
Because Postman and curl are not browsers.&lt;br&gt;
They do not apply browser CORS rules in the same way.&lt;/p&gt;

&lt;p&gt;So if something works in Postman but fails in your frontend, CORS is a very common suspect.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is a preflight request?
&lt;/h2&gt;

&lt;p&gt;Some cross-origin requests are considered simple.&lt;br&gt;
Others need an extra permission check first.&lt;/p&gt;

&lt;p&gt;That extra check is called a &lt;strong&gt;preflight request&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The browser sends an &lt;code&gt;OPTIONS&lt;/code&gt; request before the real request and asks something like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can I use &lt;code&gt;POST&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;Can I send this custom header?&lt;/li&gt;
&lt;li&gt;Can I include certain content types?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the server responds with the right CORS headers, the browser continues with the real request.&lt;br&gt;
If not, the browser blocks it.&lt;/p&gt;

&lt;p&gt;A simplified flow looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Browser wants to send a cross-origin request&lt;/li&gt;
&lt;li&gt;Browser sends &lt;code&gt;OPTIONS&lt;/code&gt; first&lt;/li&gt;
&lt;li&gt;Server replies with allowed methods/headers/origins&lt;/li&gt;
&lt;li&gt;Browser decides whether to continue&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Example of a preflight-related response
&lt;/h2&gt;

&lt;p&gt;A server may send headers like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;Access-Control-Allow-Origin: https://myfrontend.com
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That tells the browser what is allowed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common situations where beginners hit CORS
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Frontend and backend are on different ports locally
&lt;/h3&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;frontend: &lt;code&gt;http://localhost:3000&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;backend: &lt;code&gt;http://localhost:8000&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those are different origins because the ports are different.&lt;br&gt;
So CORS rules still apply.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Calling a third-party API directly from the browser
&lt;/h3&gt;

&lt;p&gt;Some APIs do not allow browser access from random websites.&lt;br&gt;
They may expect requests to come from your backend instead.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Sending credentials without proper server support
&lt;/h3&gt;

&lt;p&gt;If cookies or authenticated requests are involved, the server needs a more careful CORS setup.&lt;br&gt;
You cannot combine every option freely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common beginner mistakes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Thinking CORS is a backend bug every time
&lt;/h3&gt;

&lt;p&gt;Sometimes it is a backend configuration issue.&lt;br&gt;
But sometimes the API is intentionally blocking browser access.&lt;br&gt;
That may be the correct behavior.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Thinking &lt;code&gt;Access-Control-Allow-Origin: *&lt;/code&gt; solves everything
&lt;/h3&gt;

&lt;p&gt;It does not.&lt;br&gt;
Especially not when credentials are involved.&lt;br&gt;
This is one of those "works until it absolutely does not" ideas.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Trying to fix CORS only on the frontend
&lt;/h3&gt;

&lt;p&gt;Usually, the real fix is on the &lt;strong&gt;server&lt;/strong&gt; that owns the resource.&lt;br&gt;
Your frontend cannot simply decide that another server should trust it.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Forgetting the difference between browser code and server code
&lt;/h3&gt;

&lt;p&gt;If your backend makes the request, browser CORS rules usually are not the thing blocking you.&lt;br&gt;
If your frontend makes the request in the browser, they are.&lt;/p&gt;

&lt;h2&gt;
  
  
  So how do developers usually fix CORS?
&lt;/h2&gt;

&lt;p&gt;The usual answer is one of these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;configure the backend to allow the frontend origin&lt;/li&gt;
&lt;li&gt;use the correct CORS middleware in the backend framework&lt;/li&gt;
&lt;li&gt;make the request through your own backend instead of directly from the browser&lt;/li&gt;
&lt;li&gt;handle preflight requests correctly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, many frameworks have built-in CORS packages or middleware.&lt;br&gt;
You define which origins, methods, and headers are allowed.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical mental model to remember
&lt;/h2&gt;

&lt;p&gt;When you see a CORS error, ask these questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Who is making the request?&lt;/strong&gt; The browser or the server?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Are the origins different?&lt;/strong&gt; Domain, protocol, or port?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Does the server send the right CORS headers?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Is there a preflight request failing first?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That short checklist saves a lot of confused guessing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final takeaway
&lt;/h2&gt;

&lt;p&gt;If you remember only one thing, let it be this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CORS is the browser's way of enforcing rules about which websites are allowed to read responses from another origin, based on what the server permits.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once that clicks, CORS errors stop feeling like cursed magic and start looking like a configuration problem you can reason about.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>api</category>
    </item>
    <item>
      <title>REST APIs for Beginners: How Apps Talk to Each Other</title>
      <dc:creator>Henry of Oracus 🇳🇬</dc:creator>
      <pubDate>Sun, 10 May 2026 13:42:42 +0000</pubDate>
      <link>https://dev.to/ezeanyim_henry/rest-apis-for-beginners-how-apps-talk-to-each-other-1n8l</link>
      <guid>https://dev.to/ezeanyim_henry/rest-apis-for-beginners-how-apps-talk-to-each-other-1n8l</guid>
      <description>&lt;h1&gt;
  
  
  REST APIs for Beginners: How Apps Talk to Each Other
&lt;/h1&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%2F1w8qot7oshhpmulvgaqx.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%2F1w8qot7oshhpmulvgaqx.png" alt="Cover image for REST APIs for Beginners: How Apps Talk to Each Other" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are learning web development or backend engineering, you will keep hearing about &lt;strong&gt;APIs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;People say things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Call the API"&lt;/li&gt;
&lt;li&gt;"The frontend hits the API"&lt;/li&gt;
&lt;li&gt;"We need an endpoint for that"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At first, that can sound more mysterious than it really is.&lt;/p&gt;

&lt;p&gt;Here is the simple version:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An API is a way for one piece of software to ask another piece of software for data or actions.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this post, we will focus on &lt;strong&gt;REST APIs&lt;/strong&gt;, because they are one of the most common kinds beginners run into.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with a simple mental model
&lt;/h2&gt;

&lt;p&gt;Imagine a restaurant.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You&lt;/strong&gt; are the client&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The kitchen&lt;/strong&gt; is the server&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The waiter&lt;/strong&gt; is the API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You do not walk into the kitchen and start cooking your own food.&lt;br&gt;
Instead, you give your request to the waiter.&lt;br&gt;
The waiter carries it to the kitchen and brings the response back.&lt;/p&gt;

&lt;p&gt;That is roughly how apps talk to each other.&lt;/p&gt;

&lt;p&gt;One app sends a request.&lt;br&gt;
Another app receives it, does some work, and sends back a response.&lt;/p&gt;
&lt;h2&gt;
  
  
  So what does API mean?
&lt;/h2&gt;

&lt;p&gt;API stands for &lt;strong&gt;Application Programming Interface&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That name sounds heavy, but the idea is not.&lt;br&gt;
An API is just a defined way for programs to communicate.&lt;/p&gt;

&lt;p&gt;For example, a weather app may use an API to ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is the temperature in Lagos?&lt;/li&gt;
&lt;li&gt;What is tomorrow's forecast?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A payment app may use an API to ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a payment&lt;/li&gt;
&lt;li&gt;Check payment status&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A blog frontend may use an API to ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Get all posts&lt;/li&gt;
&lt;li&gt;Create a new comment&lt;/li&gt;
&lt;li&gt;Delete a draft&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  What makes an API a REST API?
&lt;/h2&gt;

&lt;p&gt;REST is a popular style for designing web APIs.&lt;/p&gt;

&lt;p&gt;You do not need to memorize the full theory to get started.&lt;br&gt;
For beginners, the important idea is this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A REST API usually uses normal web URLs plus HTTP methods like GET, POST, PUT, and DELETE to work with data.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That means the API often looks predictable.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;GET /posts&lt;/code&gt; → get all posts&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GET /posts/42&lt;/code&gt; → get one post&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;POST /posts&lt;/code&gt; → create a post&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;PUT /posts/42&lt;/code&gt; → update a post&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DELETE /posts/42&lt;/code&gt; → delete a post&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even before you know the backend code, you can often guess what an endpoint is meant to do.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is an endpoint?
&lt;/h2&gt;

&lt;p&gt;An &lt;strong&gt;endpoint&lt;/strong&gt; is a specific API URL you can send a request to.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;https://example.com/api/posts&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;https://example.com/api/users/5&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of an endpoint as a specific door.&lt;br&gt;
Each door leads to a specific kind of data or action.&lt;/p&gt;
&lt;h2&gt;
  
  
  The request and response pattern
&lt;/h2&gt;

&lt;p&gt;Most API communication follows this basic flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A client sends a request&lt;/li&gt;
&lt;li&gt;The server receives it&lt;/li&gt;
&lt;li&gt;The server processes it&lt;/li&gt;
&lt;li&gt;The server sends back a response&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That response often includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a &lt;strong&gt;status code&lt;/strong&gt; like &lt;code&gt;200&lt;/code&gt; or &lt;code&gt;404&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;data, usually in &lt;strong&gt;JSON&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&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%2Fxamw2c5nz5rgpntdg66l.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%2Fxamw2c5nz5rgpntdg66l.png" alt="Diagram showing a client sending an HTTP request to a REST API and receiving a JSON response" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Common HTTP methods in REST APIs
&lt;/h2&gt;

&lt;p&gt;These four show up everywhere.&lt;/p&gt;
&lt;h3&gt;
  
  
  GET
&lt;/h3&gt;

&lt;p&gt;Used to &lt;strong&gt;read&lt;/strong&gt; data.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET /api/posts
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Meaning: "Give me the posts."&lt;/p&gt;

&lt;h3&gt;
  
  
  POST
&lt;/h3&gt;

&lt;p&gt;Used to &lt;strong&gt;create&lt;/strong&gt; something new.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;POST /api/posts
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Meaning: "Create a new post."&lt;/p&gt;

&lt;h3&gt;
  
  
  PUT or PATCH
&lt;/h3&gt;

&lt;p&gt;Used to &lt;strong&gt;update&lt;/strong&gt; existing data.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;PUT /api/posts/42
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Meaning: "Update the post with ID 42."&lt;/p&gt;

&lt;h3&gt;
  
  
  DELETE
&lt;/h3&gt;

&lt;p&gt;Used to &lt;strong&gt;remove&lt;/strong&gt; data.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;DELETE /api/posts/42
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Meaning: "Delete the post with ID 42."&lt;/p&gt;

&lt;h2&gt;
  
  
  What does a JSON response look like?
&lt;/h2&gt;

&lt;p&gt;Many REST APIs respond with JSON.&lt;/p&gt;

&lt;p&gt;A response might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Learning APIs"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"published"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;JSON is popular because it is easy for both humans and machines to read.&lt;/p&gt;

&lt;h2&gt;
  
  
  A tiny real-world example
&lt;/h2&gt;

&lt;p&gt;Imagine you are building a simple notes app.&lt;/p&gt;

&lt;p&gt;Your frontend may need to show all notes for the current user.&lt;br&gt;
It could send this request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET /api/notes
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the server might respond with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Buy milk"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Finish homework"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Later, if the user creates a new note, the frontend might send:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;POST /api/notes
Content-Type: application/json

{
  "text": "Learn how REST APIs work"
}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is the basic rhythm of many modern apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why REST APIs are useful
&lt;/h2&gt;

&lt;p&gt;REST APIs help separate responsibilities.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the &lt;strong&gt;frontend&lt;/strong&gt; handles what users see&lt;/li&gt;
&lt;li&gt;the &lt;strong&gt;backend&lt;/strong&gt; handles business logic and data&lt;/li&gt;
&lt;li&gt;the &lt;strong&gt;API&lt;/strong&gt; is how they communicate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That separation makes apps easier to build, scale, and maintain.&lt;/p&gt;

&lt;p&gt;It also means multiple clients can use the same backend.&lt;br&gt;
For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a web app&lt;/li&gt;
&lt;li&gt;a mobile app&lt;/li&gt;
&lt;li&gt;an admin dashboard&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;can all talk to the same API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beginner mistakes to avoid
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Thinking APIs are only for public internet services
&lt;/h3&gt;

&lt;p&gt;Not true.&lt;br&gt;
Many APIs are internal.&lt;br&gt;
A frontend and backend in the same project still often communicate through an API.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Confusing an API with a database
&lt;/h3&gt;

&lt;p&gt;An API is not the database itself.&lt;br&gt;
It is the layer that accepts requests and returns responses.&lt;br&gt;
The backend may talk to the database behind the scenes.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Ignoring status codes
&lt;/h3&gt;

&lt;p&gt;The response body matters, but the status code matters too.&lt;br&gt;
For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;200&lt;/code&gt; usually means success&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;201&lt;/code&gt; usually means something was created&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;404&lt;/code&gt; usually means not found&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;500&lt;/code&gt; usually means the server failed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you ignore status codes, debugging becomes much harder.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Sending the wrong method
&lt;/h3&gt;

&lt;p&gt;If an endpoint expects &lt;code&gt;POST&lt;/code&gt; and you send &lt;code&gt;GET&lt;/code&gt;, you may get an error or the wrong behavior.&lt;br&gt;
Methods matter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do you need to build APIs to use them?
&lt;/h2&gt;

&lt;p&gt;No.&lt;br&gt;
As a beginner, you may start by just &lt;strong&gt;using&lt;/strong&gt; APIs.&lt;/p&gt;

&lt;p&gt;That is already valuable.&lt;br&gt;
You can learn a lot by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;reading API documentation&lt;/li&gt;
&lt;li&gt;making test requests in Postman or Insomnia&lt;/li&gt;
&lt;li&gt;using &lt;code&gt;fetch()&lt;/code&gt; in JavaScript&lt;/li&gt;
&lt;li&gt;checking server responses&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Later, when you build your own backend, the same ideas will make much more sense.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final takeaway
&lt;/h2&gt;

&lt;p&gt;If you remember only one thing, let it be this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A REST API is a structured way for apps to communicate over the web using URLs, HTTP methods, and often JSON responses.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once that clicks, a lot of web development stops feeling like random magic and starts feeling more like a conversation between programs.&lt;/p&gt;

</description>
      <category>api</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>backend</category>
    </item>
    <item>
      <title>Environment Variables for Beginners: How Apps Hide Configuration Without Hardcoding It</title>
      <dc:creator>Henry of Oracus 🇳🇬</dc:creator>
      <pubDate>Tue, 28 Apr 2026 13:50:41 +0000</pubDate>
      <link>https://dev.to/ezeanyim_henry/environment-variables-for-beginners-how-apps-hide-configuration-without-hardcoding-it-3lem</link>
      <guid>https://dev.to/ezeanyim_henry/environment-variables-for-beginners-how-apps-hide-configuration-without-hardcoding-it-3lem</guid>
      <description>&lt;h1&gt;
  
  
  Environment Variables for Beginners: How Apps Hide Configuration Without Hardcoding It
&lt;/h1&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%2Ft92cky5ts2z8ww70cj85.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%2Ft92cky5ts2z8ww70cj85.png" alt="Cover image for Environment Variables for Beginners" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are new to software development, you will eventually run into the phrase &lt;strong&gt;environment variable&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It sounds a bit dramatic.&lt;br&gt;
Like your computer is hiding secrets in the atmosphere.&lt;/p&gt;

&lt;p&gt;The real idea is much simpler:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An environment variable is a named value an app can read while it is running.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Developers often use environment variables to store things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API keys&lt;/li&gt;
&lt;li&gt;database connection details&lt;/li&gt;
&lt;li&gt;app URLs&lt;/li&gt;
&lt;li&gt;feature settings&lt;/li&gt;
&lt;li&gt;secret tokens&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this post, we will break down what environment variables are, why developers use them, and how they help you avoid one of the most common beginner mistakes: hardcoding configuration directly into your code.&lt;/p&gt;
&lt;h2&gt;
  
  
  Start with the problem
&lt;/h2&gt;

&lt;p&gt;Imagine you write a small app that connects to a database.&lt;/p&gt;

&lt;p&gt;You might be tempted to do this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dbHost&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;localhost&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dbUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;henry&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dbPassword&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;supersecretpassword&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That may feel convenient at first.&lt;br&gt;
But it creates a few problems very quickly.&lt;/p&gt;

&lt;p&gt;What if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;your teammate uses a different database password?&lt;/li&gt;
&lt;li&gt;production uses a different database host?&lt;/li&gt;
&lt;li&gt;you accidentally push the password to GitHub?&lt;/li&gt;
&lt;li&gt;you need to change the value without editing the code?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is where environment variables become useful.&lt;/p&gt;
&lt;h2&gt;
  
  
  So what is an environment variable?
&lt;/h2&gt;

&lt;p&gt;An environment variable is a key-value pair that exists &lt;strong&gt;outside your code&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;DB_HOST=localhost&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;DB_USER=henry&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;DB_PASSWORD=supersecretpassword&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;APP_ENV=production&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your app can read those values when it starts.&lt;br&gt;
That means the code stays mostly the same, while the environment can change.&lt;/p&gt;

&lt;p&gt;That is the important idea:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;configuration lives outside the main codebase.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  A simple mental model
&lt;/h2&gt;

&lt;p&gt;Think of your app like a traveler.&lt;/p&gt;

&lt;p&gt;The code is the traveler.&lt;br&gt;
The environment variables are the note in the traveler's pocket telling them where to go and what rules apply.&lt;/p&gt;

&lt;p&gt;The traveler stays the same person.&lt;br&gt;
But the instructions can change depending on where they are.&lt;/p&gt;

&lt;p&gt;So the same app can behave differently in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;development&lt;/li&gt;
&lt;li&gt;testing&lt;/li&gt;
&lt;li&gt;staging&lt;/li&gt;
&lt;li&gt;production&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;without you rewriting the app every 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%2Fac3dvt5hzaxtvrwfruvs.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%2Fac3dvt5hzaxtvrwfruvs.png" alt="Diagram showing code reading configuration from environment variables instead of hardcoded values" width="800" height="514"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Why not just hardcode everything?
&lt;/h2&gt;

&lt;p&gt;Because hardcoding configuration makes software harder to manage.&lt;/p&gt;

&lt;p&gt;Here are the big reasons developers avoid it:&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Security
&lt;/h3&gt;

&lt;p&gt;Secrets like API keys and passwords should not be sprinkled directly into source files.&lt;br&gt;
If they get committed to a public repository, that can become a real mess.&lt;/p&gt;

&lt;p&gt;Environment variables are not magic security dust, but they are a much better habit than leaving secrets inside your code.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Flexibility
&lt;/h3&gt;

&lt;p&gt;You may want one database locally and another in production.&lt;br&gt;
You may want debug mode on in development and off in production.&lt;br&gt;
Environment variables let you change those values without rewriting logic.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Cleaner deployments
&lt;/h3&gt;

&lt;p&gt;When apps move between machines or servers, configuration often changes.&lt;br&gt;
Keeping that configuration outside the code makes deployments much less painful.&lt;/p&gt;
&lt;h2&gt;
  
  
  A tiny example in Node.js
&lt;/h2&gt;

&lt;p&gt;Here is a very small example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;apiKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;API_KEY&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Missing API_KEY&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;API key loaded&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In that example, &lt;code&gt;process.env.API_KEY&lt;/code&gt; reads the value of an environment variable named &lt;code&gt;API_KEY&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The code does not care what the exact key is.&lt;br&gt;
It just asks the environment for it.&lt;/p&gt;
&lt;h2&gt;
  
  
  What about &lt;code&gt;.env&lt;/code&gt; files?
&lt;/h2&gt;

&lt;p&gt;This is where beginners often get confused.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;&lt;code&gt;.env&lt;/code&gt; file is not the same thing as an environment variable&lt;/strong&gt;.&lt;br&gt;
It is just a file developers often use to define variables in a convenient way.&lt;/p&gt;

&lt;p&gt;A &lt;code&gt;.env&lt;/code&gt; file might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;APP_NAME=MyApp
APP_ENV=local
DB_HOST=127.0.0.1
DB_PORT=3306
API_KEY=abc123xyz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then a tool or framework can load those values into the app environment.&lt;/p&gt;

&lt;p&gt;So:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;environment variables&lt;/strong&gt; are the actual values available to the running app&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;.env&lt;/code&gt; file&lt;/strong&gt; is often just a helper file for local development&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That distinction matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why &lt;code&gt;.env&lt;/code&gt; files should usually stay out of Git
&lt;/h2&gt;

&lt;p&gt;If your &lt;code&gt;.env&lt;/code&gt; file contains secrets, you usually should &lt;strong&gt;not&lt;/strong&gt; commit it to a public repository.&lt;/p&gt;

&lt;p&gt;That is why many projects add &lt;code&gt;.env&lt;/code&gt; to &lt;code&gt;.gitignore&lt;/code&gt;.&lt;br&gt;
Instead, they may include a safer example file like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.env.example&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That example file shows the variable names people need, without exposing real secrets.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;APP_NAME=MyApp
APP_ENV=local
DB_HOST=
DB_PORT=
API_KEY=
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That way another developer can copy it and fill in their own values.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common things developers store in environment variables
&lt;/h2&gt;

&lt;p&gt;A few very common examples are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;database host, port, username, and password&lt;/li&gt;
&lt;li&gt;API keys for services like Stripe or OpenAI&lt;/li&gt;
&lt;li&gt;app mode such as &lt;code&gt;development&lt;/code&gt; or &lt;code&gt;production&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;server port numbers&lt;/li&gt;
&lt;li&gt;feature flags&lt;/li&gt;
&lt;li&gt;third-party service URLs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not every setting belongs there, but environment variables are especially useful for values that change across environments or should not be hardcoded.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beginner mistakes to avoid
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Treating &lt;code&gt;.env&lt;/code&gt; as magical
&lt;/h3&gt;

&lt;p&gt;A &lt;code&gt;.env&lt;/code&gt; file usually does nothing by itself.&lt;br&gt;
Something still has to load it.&lt;br&gt;
That may be your framework, runtime, or a helper package.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Committing secrets to GitHub
&lt;/h3&gt;

&lt;p&gt;This one bites people all the time.&lt;br&gt;
If a secret ends up in a public repository, changing the file later does not fully erase the risk.&lt;br&gt;
It is better not to expose it in the first place.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Using environment variables for absolutely everything
&lt;/h3&gt;

&lt;p&gt;Not every value needs to be an environment variable.&lt;br&gt;
If a setting is truly fixed and harmless, it may belong in regular code or config files.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Forgetting to validate missing values
&lt;/h3&gt;

&lt;p&gt;If your app requires &lt;code&gt;DATABASE_URL&lt;/code&gt; or &lt;code&gt;API_KEY&lt;/code&gt;, check for it clearly.&lt;br&gt;
Otherwise you may get weird errors later that are harder to debug.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do environment variables make apps secure?
&lt;/h2&gt;

&lt;p&gt;They help, but they are not a complete security strategy.&lt;/p&gt;

&lt;p&gt;Environment variables are mostly about &lt;strong&gt;keeping configuration separate from code&lt;/strong&gt; and handling secrets more safely than hardcoding them.&lt;br&gt;
They still need good handling, especially in production.&lt;/p&gt;

&lt;p&gt;So do not think of them as perfect protection.&lt;br&gt;
Think of them as one good habit in a larger security picture.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final takeaway
&lt;/h2&gt;

&lt;p&gt;If you remember only one thing, let it be this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Environment variables let your app read important configuration from outside the code, which makes your project safer, more flexible, and easier to deploy.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once that clicks, &lt;code&gt;.env&lt;/code&gt; files, deployment settings, and secret management all start making a lot more sense.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Git Branches for Beginners: What They Are and Why They Help</title>
      <dc:creator>Henry of Oracus 🇳🇬</dc:creator>
      <pubDate>Tue, 07 Apr 2026 12:44:26 +0000</pubDate>
      <link>https://dev.to/ezeanyim_henry/git-branches-for-beginners-what-they-are-and-why-they-help-4ckg</link>
      <guid>https://dev.to/ezeanyim_henry/git-branches-for-beginners-what-they-are-and-why-they-help-4ckg</guid>
      <description>&lt;h1&gt;
  
  
  Git Branches for Beginners: What They Are and Why They Help
&lt;/h1&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%2Foe6az8yexu9p632jkd43.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%2Foe6az8yexu9p632jkd43.png" alt="Cover image for Git Branches for Beginners" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are learning Git, the word &lt;strong&gt;branch&lt;/strong&gt; can sound more complicated than it really is.&lt;/p&gt;

&lt;p&gt;People say things like &lt;em&gt;create a branch&lt;/em&gt;, &lt;em&gt;switch branches&lt;/em&gt;, or &lt;em&gt;merge your branch back into main&lt;/em&gt; as if that should already make perfect sense.&lt;/p&gt;

&lt;p&gt;It usually does not at first.&lt;/p&gt;

&lt;p&gt;The simple version is this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Git branch is a separate line of work inside your project.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It lets you make changes without messing up the main version of your code while you are still working.&lt;/p&gt;

&lt;p&gt;That is the big idea.&lt;/p&gt;

&lt;p&gt;In this post, we will break it down in plain English and walk through a very beginner-friendly example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the problem branches solve
&lt;/h2&gt;

&lt;p&gt;Imagine you have a project with code that already works.&lt;/p&gt;

&lt;p&gt;Now you want to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;add a new feature&lt;/li&gt;
&lt;li&gt;fix a bug&lt;/li&gt;
&lt;li&gt;try an experiment&lt;/li&gt;
&lt;li&gt;refactor some messy code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you do all of that directly in the main version of the project, things can get chaotic fast.&lt;/p&gt;

&lt;p&gt;You might break working code.&lt;br&gt;
You might leave half-finished changes around.&lt;br&gt;
You might make it hard to understand what changed.&lt;/p&gt;

&lt;p&gt;Branches help by giving you a safer workspace.&lt;/p&gt;
&lt;h2&gt;
  
  
  So what exactly is a branch?
&lt;/h2&gt;

&lt;p&gt;A branch is like creating an alternate track for your work.&lt;/p&gt;

&lt;p&gt;Your main branch might hold the stable version of the project.&lt;br&gt;
Then you create another branch to work on something specific.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;main&lt;/code&gt; → the stable version&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;feature/login-page&lt;/code&gt; → a branch for building a login page&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fix/navbar-bug&lt;/code&gt; → a branch for fixing a bug&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each branch can have its own commits.&lt;br&gt;
That means you can work freely on one task without mixing it into everything else too early.&lt;/p&gt;
&lt;h2&gt;
  
  
  A simple mental model
&lt;/h2&gt;

&lt;p&gt;Think of your project like a road.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the &lt;strong&gt;main branch&lt;/strong&gt; is the main road&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;new branch&lt;/strong&gt; is a side road where you can work on something safely&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;merging&lt;/strong&gt; is when you bring the finished work back onto the main road&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is why branches are useful.&lt;br&gt;
They let you explore or build without treating the main version like a testing playground.&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%2Fp5idhv2ku26n64g5yn8h.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%2Fp5idhv2ku26n64g5yn8h.png" alt="Diagram showing a main branch, a feature branch, and a merge back into main" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What happens when you create a branch?
&lt;/h2&gt;

&lt;p&gt;When you create a branch, Git does not copy your entire project into a new folder.&lt;/p&gt;

&lt;p&gt;Instead, Git creates a new pointer to your commit history.&lt;/p&gt;

&lt;p&gt;For beginners, you do not need to obsess over the internals yet.&lt;br&gt;
What matters is the practical result:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;you now have a separate place to make changes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That means you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;edit files&lt;/li&gt;
&lt;li&gt;add commits&lt;/li&gt;
&lt;li&gt;test ideas&lt;/li&gt;
&lt;li&gt;throw the branch away if the idea was bad&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;without damaging the main branch.&lt;/p&gt;
&lt;h2&gt;
  
  
  A tiny example
&lt;/h2&gt;

&lt;p&gt;Imagine you have a project called &lt;code&gt;todo-app&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Right now, &lt;code&gt;main&lt;/code&gt; contains a simple task list.&lt;br&gt;
You want to add a dark mode feature.&lt;/p&gt;

&lt;p&gt;A very common Git flow would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; feature/dark-mode
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That command creates a new branch called &lt;code&gt;feature/dark-mode&lt;/code&gt; and switches you to it.&lt;/p&gt;

&lt;p&gt;Now you can make your changes and commit them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add dark mode toggle"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, your new work exists on that branch.&lt;br&gt;
It is not yet part of &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When you are happy with it, you can switch back:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;And then merge the finished work:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git merge feature/dark-mode
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the changes from your branch become part of &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why branches matter so much
&lt;/h2&gt;

&lt;p&gt;Branches are not just a Git trick.&lt;br&gt;
They are one of the main reasons Git is practical for real projects.&lt;/p&gt;

&lt;p&gt;Here is why they help:&lt;/p&gt;
&lt;h3&gt;
  
  
  1. They protect the main version
&lt;/h3&gt;

&lt;p&gt;You can keep &lt;code&gt;main&lt;/code&gt; cleaner and more stable while work is still in progress.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. They help you stay organized
&lt;/h3&gt;

&lt;p&gt;A branch gives one task its own space.&lt;br&gt;
That makes your commits easier to understand later.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. They make teamwork easier
&lt;/h3&gt;

&lt;p&gt;If several developers are working on the same project, each person can work on separate branches instead of stepping on each other constantly.&lt;/p&gt;
&lt;h3&gt;
  
  
  4. They make experiments less scary
&lt;/h3&gt;

&lt;p&gt;Want to try a weird idea?&lt;br&gt;
Do it in a branch.&lt;br&gt;
If it fails, you can delete the branch and move on.&lt;/p&gt;
&lt;h2&gt;
  
  
  Branch vs commit: what is the difference?
&lt;/h2&gt;

&lt;p&gt;Beginners sometimes mix these up.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;commit&lt;/strong&gt; is a saved snapshot of your changes.&lt;br&gt;
A &lt;strong&gt;branch&lt;/strong&gt; is a line of development that can contain many commits.&lt;/p&gt;

&lt;p&gt;So a branch is not the same thing as a commit.&lt;/p&gt;

&lt;p&gt;A branch is more like the lane you are working in.&lt;br&gt;
Commits are the checkpoints you create along that lane.&lt;/p&gt;
&lt;h2&gt;
  
  
  Common beginner branch names
&lt;/h2&gt;

&lt;p&gt;There is no single perfect naming system, but these are common and easy to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;feature/signup-form&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fix/mobile-menu&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;refactor/user-service&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;docs/readme-update&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point is to make the branch name describe the work clearly.&lt;/p&gt;
&lt;h2&gt;
  
  
  Beginner mistakes to avoid
&lt;/h2&gt;

&lt;p&gt;A few common ones:&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Doing everything on &lt;code&gt;main&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;You can do that for tiny solo experiments, but it becomes messy quickly.&lt;br&gt;
Using branches early is a better habit.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Forgetting which branch you are on
&lt;/h3&gt;

&lt;p&gt;Before making changes, check your current branch with:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Git will mark the active branch with an asterisk.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Creating vague branch names
&lt;/h3&gt;

&lt;p&gt;A name like &lt;code&gt;stuff&lt;/code&gt; tells future-you absolutely nothing.&lt;br&gt;
A name like &lt;code&gt;feature/profile-page&lt;/code&gt; is much more useful.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Letting branches live forever
&lt;/h3&gt;

&lt;p&gt;Branches are meant to help you focus on one chunk of work.&lt;br&gt;
Once that work is merged, the branch usually does not need to hang around.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do branches only matter for teams?
&lt;/h2&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;p&gt;Even if you are working alone, branches are still useful.&lt;/p&gt;

&lt;p&gt;They help you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;keep changes separate&lt;/li&gt;
&lt;li&gt;test ideas safely&lt;/li&gt;
&lt;li&gt;go back more confidently&lt;/li&gt;
&lt;li&gt;understand your own workflow better&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Honestly, solo developers benefit from branches too.&lt;br&gt;
Not because they are trying to look professional, but because structure saves time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final takeaway
&lt;/h2&gt;

&lt;p&gt;If you remember only one thing, let it be this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Git branch is a separate line of work that lets you make changes without immediately affecting the main version of your project.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is why branches exist.&lt;/p&gt;

&lt;p&gt;Once that clicks, commands like &lt;code&gt;checkout&lt;/code&gt;, &lt;code&gt;switch&lt;/code&gt;, and &lt;code&gt;merge&lt;/code&gt; start feeling much less mysterious.&lt;br&gt;
And Git becomes a lot less intimidating than it first looks.&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>HTTP Status Codes for Beginners: What 200, 404, and 500 Really Mean</title>
      <dc:creator>Henry of Oracus 🇳🇬</dc:creator>
      <pubDate>Sun, 29 Mar 2026 15:43:05 +0000</pubDate>
      <link>https://dev.to/ezeanyim_henry/http-status-codes-for-beginners-what-200-404-and-500-really-mean-528</link>
      <guid>https://dev.to/ezeanyim_henry/http-status-codes-for-beginners-what-200-404-and-500-really-mean-528</guid>
      <description>&lt;h1&gt;
  
  
  HTTP Status Codes for Beginners: What 200, 404, and 500 Really Mean
&lt;/h1&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%2Fw3c14miuomg1dd1bu0jh.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%2Fw3c14miuomg1dd1bu0jh.png" alt="Cover image for HTTP status codes for beginners" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you start learning web development, you quickly run into numbers like &lt;strong&gt;200&lt;/strong&gt;, &lt;strong&gt;404&lt;/strong&gt;, and &lt;strong&gt;500&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;They show up in browser tools, API tutorials, backend logs, and error pages.&lt;br&gt;
At first, they can feel random.&lt;/p&gt;

&lt;p&gt;They are not random.&lt;/p&gt;

&lt;p&gt;These numbers are called &lt;strong&gt;HTTP status codes&lt;/strong&gt;.&lt;br&gt;
They are short messages from a server that tell you what happened when a browser or app made a request.&lt;/p&gt;

&lt;p&gt;In plain English, they answer questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Did the request work?&lt;/li&gt;
&lt;li&gt;Was the page missing?&lt;/li&gt;
&lt;li&gt;Did something break on the server?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you understand the basic status codes, debugging gets much less confusing.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is an HTTP status code?
&lt;/h2&gt;

&lt;p&gt;Every time your browser, frontend app, or API client sends a request to a server, the server sends back a response.&lt;/p&gt;

&lt;p&gt;That response usually includes a &lt;strong&gt;status code&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The status code is a three-digit number that explains the result of the request.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;200&lt;/strong&gt; usually means success&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;404&lt;/strong&gt; usually means the thing you asked for was not found&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;500&lt;/strong&gt; usually means the server ran into an error&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So if you visit a URL, click a button, or call an API endpoint, the status code helps describe what happened behind the scenes.&lt;/p&gt;
&lt;h2&gt;
  
  
  A simple real-life way to think about it
&lt;/h2&gt;

&lt;p&gt;Imagine you go to a restaurant and place an order.&lt;/p&gt;

&lt;p&gt;The waiter comes back with one of these responses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;200 OK&lt;/strong&gt; → your food is ready&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;404 Not Found&lt;/strong&gt; → that menu item does not exist&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;500 Internal Server Error&lt;/strong&gt; → the kitchen had a problem and could not complete the order&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is basically what HTTP status codes do for web requests.&lt;br&gt;
They are fast summaries of the outcome.&lt;/p&gt;
&lt;h2&gt;
  
  
  The three status codes beginners should know first
&lt;/h2&gt;

&lt;p&gt;Let us start with the ones you will see all the time.&lt;/p&gt;
&lt;h3&gt;
  
  
  200 OK
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;200 OK&lt;/strong&gt; means the request succeeded.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a webpage loads correctly&lt;/li&gt;
&lt;li&gt;an API returns user data&lt;/li&gt;
&lt;li&gt;a form submission works&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your frontend requests data from &lt;code&gt;/api/profile&lt;/code&gt; and gets a &lt;code&gt;200&lt;/code&gt; response, that usually means the server handled the request successfully.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="k"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="m"&gt;1.1&lt;/span&gt; &lt;span class="m"&gt;200&lt;/span&gt; &lt;span class="ne"&gt;OK&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  404 Not Found
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;404 Not Found&lt;/strong&gt; means the server could not find what you requested.&lt;/p&gt;

&lt;p&gt;This does &lt;strong&gt;not always&lt;/strong&gt; mean the whole website is broken.&lt;br&gt;
It often just means the specific page or route does not exist.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you typed the wrong URL&lt;/li&gt;
&lt;li&gt;the route was deleted&lt;/li&gt;
&lt;li&gt;an API endpoint path is incorrect
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="k"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="m"&gt;1.1&lt;/span&gt; &lt;span class="m"&gt;404&lt;/span&gt; &lt;span class="ne"&gt;Not Found&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A classic beginner mistake is thinking a &lt;code&gt;404&lt;/code&gt; means the server is down.&lt;br&gt;
Usually, the server is up just fine.&lt;br&gt;
It just cannot find that resource.&lt;/p&gt;
&lt;h3&gt;
  
  
  500 Internal Server Error
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;500 Internal Server Error&lt;/strong&gt; means something went wrong on the server while trying to handle the request.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;backend code crashed&lt;/li&gt;
&lt;li&gt;the database query failed&lt;/li&gt;
&lt;li&gt;an unexpected exception happened
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="k"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="m"&gt;1.1&lt;/span&gt; &lt;span class="m"&gt;500&lt;/span&gt; &lt;span class="ne"&gt;Internal Server Error&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A &lt;code&gt;500&lt;/code&gt; usually points to a backend issue, not a bad URL.&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%2Fw49g2j0aux471wimuczg.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%2Fw49g2j0aux471wimuczg.png" alt="Diagram showing request flow and common HTTP status code responses" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Why do these numbers matter?
&lt;/h2&gt;

&lt;p&gt;Because they help you debug faster.&lt;/p&gt;

&lt;p&gt;If you know the difference between &lt;code&gt;404&lt;/code&gt; and &lt;code&gt;500&lt;/code&gt;, you can stop guessing.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you get &lt;strong&gt;404&lt;/strong&gt;, check the URL or route name.&lt;/li&gt;
&lt;li&gt;If you get &lt;strong&gt;500&lt;/strong&gt;, check the backend code, logs, or database.&lt;/li&gt;
&lt;li&gt;If you get &lt;strong&gt;200&lt;/strong&gt; but the page still looks wrong, the request worked, so the problem may be in your frontend logic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That one habit alone can save a beginner a lot of time.&lt;/p&gt;
&lt;h2&gt;
  
  
  Status code groups at a glance
&lt;/h2&gt;

&lt;p&gt;HTTP status codes are grouped by their first digit.&lt;br&gt;
You do not need to memorize all of them right now, but this pattern is helpful.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;1xx&lt;/strong&gt; → informational&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2xx&lt;/strong&gt; → success&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3xx&lt;/strong&gt; → redirection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;4xx&lt;/strong&gt; → client-side issues&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5xx&lt;/strong&gt; → server-side issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A simple way to remember it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;2xx&lt;/strong&gt; = things worked&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;4xx&lt;/strong&gt; = something was wrong with the request&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5xx&lt;/strong&gt; = something broke on the server&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  A beginner-friendly API example
&lt;/h2&gt;

&lt;p&gt;Imagine your app requests a user profile from an API.&lt;/p&gt;
&lt;h3&gt;
  
  
  Successful request
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/user/7&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 200&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If the user exists and everything works, the response may be &lt;code&gt;200&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Missing route or record
&lt;/h3&gt;

&lt;p&gt;If the endpoint is wrong or the resource does not exist, you might get &lt;code&gt;404&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/userrrr/7&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 404&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Server problem
&lt;/h3&gt;

&lt;p&gt;If the backend crashes while processing the request, you may get &lt;code&gt;500&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That tells you the issue is deeper than just a typo in the URL.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common beginner mistakes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Treating every error as the same thing
&lt;/h3&gt;

&lt;p&gt;A &lt;code&gt;404&lt;/code&gt; and a &lt;code&gt;500&lt;/code&gt; are both problems, but they are different problems.&lt;/p&gt;

&lt;p&gt;That difference matters.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Ignoring the browser network tab
&lt;/h3&gt;

&lt;p&gt;If you are learning frontend development, the browser network tab is your friend.&lt;br&gt;
It shows request URLs, status codes, and responses.&lt;/p&gt;

&lt;p&gt;When something does not work, check there first.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Assuming &lt;code&gt;200&lt;/code&gt; means everything is perfect
&lt;/h3&gt;

&lt;p&gt;A &lt;code&gt;200&lt;/code&gt; only means the request succeeded at the HTTP level.&lt;br&gt;
Your app can still have a logic bug after that.&lt;/p&gt;

&lt;p&gt;For example, you might get valid data from the server but display it incorrectly in the UI.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Panicking when you see &lt;code&gt;404&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;A &lt;code&gt;404&lt;/code&gt; is often one of the easiest problems to fix.&lt;br&gt;
Sometimes it is just a spelling mistake in a route.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where you will see status codes in real projects
&lt;/h2&gt;

&lt;p&gt;You will run into HTTP status codes in places like these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;browser developer tools&lt;/li&gt;
&lt;li&gt;frontend API calls&lt;/li&gt;
&lt;li&gt;backend route handling&lt;/li&gt;
&lt;li&gt;Laravel or Express applications&lt;/li&gt;
&lt;li&gt;Postman or Insomnia requests&lt;/li&gt;
&lt;li&gt;server logs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you work with APIs for even a short time, status codes become part of your daily debugging language.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final takeaway
&lt;/h2&gt;

&lt;p&gt;If you remember only one thing, remember this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTTP status codes are short server responses that tell you the result of a web request.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For beginners, the most useful three to learn first are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;200&lt;/strong&gt; → success&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;404&lt;/strong&gt; → not found&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;500&lt;/strong&gt; → server error&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once those numbers stop looking mysterious, web development becomes a lot easier to understand.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>api</category>
      <category>backend</category>
    </item>
    <item>
      <title>JSON for Beginners: What It Is and Why Developers Use It</title>
      <dc:creator>Henry of Oracus 🇳🇬</dc:creator>
      <pubDate>Thu, 26 Mar 2026 17:49:38 +0000</pubDate>
      <link>https://dev.to/ezeanyim_henry/json-for-beginners-what-it-is-and-why-developers-use-it-3aki</link>
      <guid>https://dev.to/ezeanyim_henry/json-for-beginners-what-it-is-and-why-developers-use-it-3aki</guid>
      <description>&lt;h1&gt;
  
  
  JSON for Beginners: What It Is and Why Developers Use It
&lt;/h1&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%2F865xkpuuhf1fxtj8g3tu.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%2F865xkpuuhf1fxtj8g3tu.png" alt="Cover image for JSON for Beginners" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are learning web development, you will see &lt;strong&gt;JSON&lt;/strong&gt; everywhere.&lt;/p&gt;

&lt;p&gt;APIs return it. Frontend apps send it. Backend tutorials mention it like everybody was born knowing what it means.&lt;/p&gt;

&lt;p&gt;They were not.&lt;/p&gt;

&lt;p&gt;JSON is one of those things that sounds technical at first, but the core idea is very simple.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSON is just a text format for organizing data in a way that humans and computers can both read.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is the big idea.&lt;/p&gt;

&lt;p&gt;In this post, we will break it down in plain English, look at a small example, and explain why developers use it so often.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does JSON stand for?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;JSON&lt;/strong&gt; stands for &lt;strong&gt;JavaScript Object Notation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That name makes it sound like JSON only matters in JavaScript.&lt;br&gt;
It does not.&lt;/p&gt;

&lt;p&gt;Today, JSON is used by many languages and tools, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JavaScript&lt;/li&gt;
&lt;li&gt;PHP&lt;/li&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Laravel&lt;/li&gt;
&lt;li&gt;Node.js&lt;/li&gt;
&lt;li&gt;mobile apps&lt;/li&gt;
&lt;li&gt;third-party APIs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So even though the name comes from JavaScript, JSON is now a general-purpose data format.&lt;/p&gt;
&lt;h2&gt;
  
  
  What problem does JSON solve?
&lt;/h2&gt;

&lt;p&gt;Programs often need to exchange information.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a frontend app asks a backend for user data&lt;/li&gt;
&lt;li&gt;a mobile app sends login details to an API&lt;/li&gt;
&lt;li&gt;one service sends order information to another service&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For that exchange to work well, both sides need the data in a structure they can understand.&lt;/p&gt;

&lt;p&gt;That is where JSON helps.&lt;/p&gt;

&lt;p&gt;It gives data a clear shape.&lt;/p&gt;

&lt;p&gt;Instead of sending a messy string like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name=Henry, age=27, isStudent=false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can send something structured like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Henry"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"age"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"isStudent"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That second version is easier to read, easier to parse, and easier to trust.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does JSON look like?
&lt;/h2&gt;

&lt;p&gt;JSON is built from two common ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;objects&lt;/strong&gt; → data grouped with named keys&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;arrays&lt;/strong&gt; → lists of values&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is a simple JSON object:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Ada"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Backend Developer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"learning"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"APIs"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And here is JSON with an array inside it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Ada"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"skills"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"PHP"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Laravel"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"MySQL"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can think of it like labeled boxes.&lt;br&gt;
Each key gives a name to the value beside it.&lt;/p&gt;

&lt;p&gt;Common JSON value types include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;strings → &lt;code&gt;"hello"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;numbers → &lt;code&gt;42&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;booleans → &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;arrays → &lt;code&gt;[1, 2, 3]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;objects → &lt;code&gt;{ "key": "value" }&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;null&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  A very beginner-friendly example
&lt;/h2&gt;

&lt;p&gt;Imagine you have a small app that displays a user profile.&lt;br&gt;
The server might send back data like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Henry"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"henry@example.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"isAdmin"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your app can now read those keys and show them on the page.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;name&lt;/code&gt; can be displayed in the profile header&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;email&lt;/code&gt; can be shown under contact details&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;isAdmin&lt;/code&gt; can control whether admin buttons appear&lt;/li&gt;
&lt;/ul&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%2Ft2q7tmmtw3jde12hl2ay.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%2Ft2q7tmmtw3jde12hl2ay.png" alt="Diagram showing an app receiving JSON from a server" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That is why JSON matters in real projects.&lt;br&gt;
It gives your app data in a predictable format.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why do developers use JSON so much?
&lt;/h2&gt;

&lt;p&gt;A few reasons:&lt;/p&gt;
&lt;h3&gt;
  
  
  1. It is readable
&lt;/h3&gt;

&lt;p&gt;Even beginners can usually look at JSON and make a decent guess about what it means.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. It is lightweight
&lt;/h3&gt;

&lt;p&gt;JSON is plain text, so it is easy to send over the web.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Most languages support it
&lt;/h3&gt;

&lt;p&gt;You do not need to invent your own format.&lt;br&gt;
Most modern languages already know how to create and read JSON.&lt;/p&gt;
&lt;h3&gt;
  
  
  4. It works well with APIs
&lt;/h3&gt;

&lt;p&gt;A huge number of APIs send responses in JSON, so learning it early pays off fast.&lt;/p&gt;
&lt;h2&gt;
  
  
  JSON vs JavaScript object: are they the same thing?
&lt;/h2&gt;

&lt;p&gt;Not exactly.&lt;br&gt;
They look similar, which is why beginners mix them up.&lt;/p&gt;

&lt;p&gt;A JavaScript object might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Henry&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;JSON looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Henry"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"age"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Important differences:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JSON keys use double quotes&lt;/li&gt;
&lt;li&gt;JSON is data, not executable code&lt;/li&gt;
&lt;li&gt;JSON does not allow things like functions or trailing commas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So JSON is &lt;strong&gt;similar to&lt;/strong&gt; a JavaScript object, but it is not the same thing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where you will meet JSON in real life
&lt;/h2&gt;

&lt;p&gt;If you keep learning backend or frontend development, you will probably see JSON in places like these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API responses&lt;/li&gt;
&lt;li&gt;request bodies&lt;/li&gt;
&lt;li&gt;configuration files&lt;/li&gt;
&lt;li&gt;database exports&lt;/li&gt;
&lt;li&gt;webhooks&lt;/li&gt;
&lt;li&gt;frontend state passed around between services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In Laravel, for example, returning JSON from a route can be as simple as this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/api/profile'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;response&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
        &lt;span class="s1"&gt;'name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'Henry'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s1"&gt;'role'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'Developer'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s1"&gt;'learning'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'JSON'&lt;/span&gt;
    &lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That route sends data back as JSON.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beginner mistakes to avoid
&lt;/h2&gt;

&lt;p&gt;A few common ones:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Forgetting double quotes around keys
&lt;/h3&gt;

&lt;p&gt;This is valid JSON:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Henry"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is &lt;strong&gt;not&lt;/strong&gt; valid JSON:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;name:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Henry"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Using single quotes
&lt;/h3&gt;

&lt;p&gt;JSON uses double quotes for strings.&lt;br&gt;
Single quotes are a common beginner mistake.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Adding trailing commas
&lt;/h3&gt;

&lt;p&gt;This is invalid JSON:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Henry"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That last comma can break parsing.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Treating JSON like a programming language
&lt;/h3&gt;

&lt;p&gt;JSON only describes data.&lt;br&gt;
It does not run logic.&lt;br&gt;
It is a format, not a full language.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final takeaway
&lt;/h2&gt;

&lt;p&gt;If you remember only one thing, remember this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSON is a text-based format for organizing and exchanging data.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is why developers use it so often.&lt;/p&gt;

&lt;p&gt;It is simple, readable, and incredibly useful once you start working with APIs and modern web apps.&lt;/p&gt;

&lt;p&gt;And honestly, once JSON stops looking scary, a lot of beginner backend tutorials start making much more sense.&lt;/p&gt;

</description>
      <category>json</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>api</category>
    </item>
    <item>
      <title>Nigeria Fintech: Too Many Apps or Is the Payment Problem Still Unfinished Business?</title>
      <dc:creator>Henry of Oracus 🇳🇬</dc:creator>
      <pubDate>Sat, 21 Mar 2026 10:41:34 +0000</pubDate>
      <link>https://dev.to/ezeanyim_henry/nigeria-fintech-too-many-apps-or-is-the-payment-problem-still-unfinished-business-3a55</link>
      <guid>https://dev.to/ezeanyim_henry/nigeria-fintech-too-many-apps-or-is-the-payment-problem-still-unfinished-business-3a55</guid>
      <description>&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%2Fpd9qapie0hin8j0cf5g6.jpeg" 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%2Fpd9qapie0hin8j0cf5g6.jpeg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You see it every week on X or in group chats. Someone announces a new fintech product. Another app for transfers, another POS solution, another savings tool that looks exactly like the last five. The comments come fast. "Nigeria has too many fintechs already." "Why build another one when we already have OPay, PalmPay and Moniepoint?"&lt;/p&gt;

&lt;p&gt;The complaints make sense. We now have over 500 fintech startups in the country. Walk into any busy area in Lagos or Abuja and your phone notifications are full of similar offers. People keep building because payments looked like the easiest money to chase. But after all this activity, one big question remains. &lt;strong&gt;Has Nigeria actually solved its payment problems?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My honest answer is no. Not completely. For daily life in the cities, we have come very far. Nationally though, the job is far from done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let me explain what has improved.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The numbers tell a strong story. The NIBSS Instant Payment system processed nearly 11 billion transactions in 2024. That is more than double the figure from 2022. Electronic payments hit huge volumes. In the first three months of 2025 alone, the value crossed 284 trillion naira. The Central Bank says the entire fintech sector grew 70 percent last year even when the economy was tough. Funding reached more than 215 million dollars for startups. Players like Flutterwave, Paystack, Moniepoint, Kuda, OPay and PalmPay turned what used to be slow bank transfers into something instant and cheap.&lt;/p&gt;

&lt;p&gt;Agents are everywhere now. You can do USSD transfers from a feature phone in a village. QR codes work in markets. Many people in Lagos and other big cities live almost cashless. The National Payment System Vision that the CBN pushed for years has delivered real infrastructure. Instant payments are reliable most of the time. Cross-border options using stablecoins have made remittances faster and cheaper for some.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So why do I still say the problem is not solved?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because numbers only show part of the picture. Twenty-six percent of Nigerian adults, around 28 million people, remain completely outside the formal financial system. The rate jumps higher in rural areas and in parts of the North. Many who have accounts still do not save or borrow formally. They use the apps for transfers and nothing else. Power outages, weak internet and low digital skills make the experience painful outside the main cities.&lt;/p&gt;

&lt;p&gt;Fraud is another headache. People still lose money and lose trust. Even with better tools, one failed transaction or surprise fee can send someone back to cash. The informal economy, which is bigger than most people realise, has not fully moved online. Market women, small traders and women in general need more than just send-and-receive. They need credit that actually reaches them, simple savings products and insurance that works on basic phones.&lt;/p&gt;

&lt;p&gt;The CBN itself admits this in recent reports. The payment rails are now world class, but deeper issues remain. We still lack good credit data for most people. Digital identity integration is slow. Regulation sometimes moves too slowly for the real needs on the ground.&lt;/p&gt;

&lt;p&gt;This is exactly why new fintechs keep coming. The basic transfer problem is mostly fixed for urban users. But the bigger opportunities are wide open. Smart founders are already shifting focus. They are building full solutions for small businesses that include payroll, inventory and credit in one place. Others are working on offline-first tools, voice interfaces for people who cannot read well, and embedded finance inside everyday apps. Consolidation will happen soon. Only the strong ones with real product depth will survive the next few years.&lt;/p&gt;

&lt;p&gt;The truth is simple. Nigeria does not have a "too many fintechs" problem. We have a "too many copycats chasing the same easy wins" problem. The payment foundation is built. Now the real work begins. Solve credit for the informal sector. Make insurance simple and cheap. Bring proper tools to the North and to rural communities. Tackle fraud with better AI and education. Those areas will create the next big winners.&lt;/p&gt;

&lt;p&gt;If you are thinking of building in this space, my advice is this. Stop cloning transfer screens. Go and talk to market women in Oshodi or traders in Kano. Ask what actually breaks their hustle every day. Build for them, not for the same Lagos crowd everyone else is fighting over.&lt;/p&gt;

&lt;p&gt;The fintech story in Nigeria is far from over. It is just entering the interesting chapter. The rails are there. The question now is who will use them to lift the millions still left behind.&lt;/p&gt;

&lt;p&gt;What do you think? Are we truly saturated or just getting started? Drop your comments below. If you are a founder or user in this space, I would love to hear your own experience.&lt;/p&gt;

</description>
      <category>fintech</category>
      <category>nigeria</category>
      <category>saas</category>
    </item>
    <item>
      <title>What an API Endpoint Actually Is: A Beginner-Friendly Guide</title>
      <dc:creator>Henry of Oracus 🇳🇬</dc:creator>
      <pubDate>Fri, 20 Mar 2026 11:20:49 +0000</pubDate>
      <link>https://dev.to/ezeanyim_henry/what-an-api-endpoint-actually-is-a-beginner-friendly-guide-7ln</link>
      <guid>https://dev.to/ezeanyim_henry/what-an-api-endpoint-actually-is-a-beginner-friendly-guide-7ln</guid>
      <description>&lt;h1&gt;
  
  
  What an API Endpoint Actually Is: A Beginner-Friendly Guide
&lt;/h1&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%2Fmwrn5ttdnv1zuajxlk62.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%2Fmwrn5ttdnv1zuajxlk62.png" alt="Cover image: What an API Endpoint Actually Is" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are new to web development, the phrase &lt;strong&gt;API endpoint&lt;/strong&gt; can sound more dramatic than it really is.&lt;/p&gt;

&lt;p&gt;It is not magic. It is not a whole backend by itself. And it is definitely not a buzzword you need to pretend to understand.&lt;/p&gt;

&lt;p&gt;An API endpoint is simply &lt;strong&gt;a specific URL where one program can ask another program to do something or send back data&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That is the whole idea.&lt;/p&gt;

&lt;p&gt;In this post, we will break that down in plain English and walk through a small example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the bigger picture: what is an API?
&lt;/h2&gt;

&lt;p&gt;An &lt;strong&gt;API&lt;/strong&gt; stands for &lt;strong&gt;Application Programming Interface&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In beginner terms, an API is a way for two pieces of software to communicate using rules they both understand.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a frontend app can ask a backend server for a list of users&lt;/li&gt;
&lt;li&gt;a mobile app can send login details to a server&lt;/li&gt;
&lt;li&gt;one service can ask another service for weather data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The API is the overall system of communication.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;endpoint&lt;/strong&gt; is one specific place inside that system.&lt;/p&gt;

&lt;h2&gt;
  
  
  So what exactly is an endpoint?
&lt;/h2&gt;

&lt;p&gt;Think of an API like a restaurant.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the API is the full menu and ordering system&lt;/li&gt;
&lt;li&gt;an endpoint is one specific item or counter on that menu&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to order coffee, you go to the coffee section.&lt;br&gt;
If you want fries, you go to the fries section.&lt;/p&gt;

&lt;p&gt;In the same way, software sends requests to specific endpoints depending on what it wants.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;GET /api/users&lt;/code&gt; might fetch all users&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GET /api/users/42&lt;/code&gt; might fetch one user&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;POST /api/users&lt;/code&gt; might create a new user&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DELETE /api/users/42&lt;/code&gt; might delete a user&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each endpoint has a clear job.&lt;/p&gt;
&lt;h2&gt;
  
  
  A simple mental model
&lt;/h2&gt;

&lt;p&gt;Here is the easiest way to think about it:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Endpoint = URL + expected action&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The URL tells your app where to send the request.&lt;br&gt;
The HTTP method tells the server what kind of action you want.&lt;/p&gt;

&lt;p&gt;Common HTTP methods include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;GET&lt;/code&gt; → fetch data&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;POST&lt;/code&gt; → create data&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;PUT&lt;/code&gt; or &lt;code&gt;PATCH&lt;/code&gt; → update data&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DELETE&lt;/code&gt; → remove data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So these two requests are not the same, even if the path looks similar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;GET /api/tasks&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;POST /api/tasks&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One asks for tasks.&lt;br&gt;
The other creates a task.&lt;/p&gt;
&lt;h2&gt;
  
  
  What happens when you call an endpoint?
&lt;/h2&gt;

&lt;p&gt;Usually, the flow looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A client sends a request to an endpoint.&lt;/li&gt;
&lt;li&gt;The server receives the request.&lt;/li&gt;
&lt;li&gt;The server runs some code.&lt;/li&gt;
&lt;li&gt;The server sends back a response.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That response often includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a &lt;strong&gt;status code&lt;/strong&gt; like &lt;code&gt;200 OK&lt;/code&gt; or &lt;code&gt;404 Not Found&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;some &lt;strong&gt;data&lt;/strong&gt;, often in JSON format&lt;/li&gt;
&lt;/ul&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%2Fc64ktf2okjp2wis2j3ta.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%2Fc64ktf2okjp2wis2j3ta.png" alt="Diagram showing a client request going to an endpoint and a JSON response coming back" width="800" height="514"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  A real example
&lt;/h2&gt;

&lt;p&gt;Imagine you are building a simple to-do app.&lt;/p&gt;

&lt;p&gt;Your frontend needs to show a list of tasks.&lt;br&gt;
It might send a request like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET https://example.com/api/tasks
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The server might respond with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Buy milk"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"completed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Read API tutorial"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"completed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In that example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;https://example.com/api/tasks&lt;/code&gt; is the endpoint&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GET&lt;/code&gt; is the method&lt;/li&gt;
&lt;li&gt;the JSON is the response data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the user adds a new task, your app might call a different endpoint or the same path with a different method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;POST https://example.com/api/tasks
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With a request body like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Write first API client"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Endpoint vs route vs URL
&lt;/h2&gt;

&lt;p&gt;These words get mixed together a lot, so here is the beginner-safe version:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;URL&lt;/strong&gt;: the full web address&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;route&lt;/strong&gt;: how your framework maps a request to code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;endpoint&lt;/strong&gt;: the exposed place a client can call in the API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In casual conversations, people often use them almost interchangeably.&lt;br&gt;
That is normal.&lt;/p&gt;

&lt;p&gt;Still, it helps to know that an endpoint usually refers to the part of your API that is available for requests, while a route is often the internal framework definition behind it.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why endpoints matter
&lt;/h2&gt;

&lt;p&gt;Endpoints matter because they help you design software that is organized.&lt;/p&gt;

&lt;p&gt;Instead of one messy entrance for everything, you create clear entry points for clear tasks.&lt;/p&gt;

&lt;p&gt;That makes your app easier to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;understand&lt;/li&gt;
&lt;li&gt;test&lt;/li&gt;
&lt;li&gt;document&lt;/li&gt;
&lt;li&gt;debug&lt;/li&gt;
&lt;li&gt;maintain&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When endpoints are named well, beginners can often guess what they do just by reading them.&lt;br&gt;
That is a good sign.&lt;/p&gt;
&lt;h2&gt;
  
  
  Beginner mistakes to avoid
&lt;/h2&gt;

&lt;p&gt;A few common ones:&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Thinking the endpoint is the whole API
&lt;/h3&gt;

&lt;p&gt;It is just one part of the API.&lt;br&gt;
An API usually has many endpoints.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Ignoring the HTTP method
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;GET /api/posts&lt;/code&gt; and &lt;code&gt;POST /api/posts&lt;/code&gt; may hit the same path, but they do different things.&lt;br&gt;
The method matters.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Expecting every response to be success
&lt;/h3&gt;

&lt;p&gt;An endpoint can return errors too.&lt;br&gt;
That does not mean it is broken. It may mean the request was invalid, unauthorized, or pointing to missing data.&lt;/p&gt;
&lt;h3&gt;
  
  
  4. Treating JSON as the endpoint
&lt;/h3&gt;

&lt;p&gt;JSON is usually the response format.&lt;br&gt;
The endpoint is the place you send the request to.&lt;/p&gt;
&lt;h2&gt;
  
  
  A tiny Laravel example
&lt;/h2&gt;

&lt;p&gt;If you use Laravel, an endpoint might be defined with a route like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/api/tasks'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;response&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
        &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'id'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'title'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'Buy milk'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'completed'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'id'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'title'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'Read API tutorial'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'completed'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That route creates an endpoint your frontend or API client can call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final takeaway
&lt;/h2&gt;

&lt;p&gt;If you remember only one thing, let it be this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An API endpoint is a specific URL in an API that accepts a request and returns a response.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is the core idea.&lt;/p&gt;

&lt;p&gt;Once that clicks, API documentation starts looking much less intimidating.&lt;br&gt;
And honestly, that is when backend development starts feeling a lot less mysterious.&lt;/p&gt;

</description>
      <category>api</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>backend</category>
    </item>
    <item>
      <title>Code Conciseness: Why Small Functions Make a Big Difference</title>
      <dc:creator>Henry of Oracus 🇳🇬</dc:creator>
      <pubDate>Fri, 20 Mar 2026 10:36:07 +0000</pubDate>
      <link>https://dev.to/ezeanyim_henry/code-conciseness-why-small-functions-make-a-big-difference-54hb</link>
      <guid>https://dev.to/ezeanyim_henry/code-conciseness-why-small-functions-make-a-big-difference-54hb</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Originally published on Medium: &lt;a href="https://medium.com/@ezeanyimhenry/code-conciseness-why-small-functions-make-a-big-difference-78bf51357e32" rel="noopener noreferrer"&gt;https://medium.com/@ezeanyimhenry/code-conciseness-why-small-functions-make-a-big-difference-78bf51357e32&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&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%2Fezeanyimhenry.github.io%2Fblog-assets%2Fimages%2F2023-09%2Fcode-conciseness-why-small-functions-make-a-big-difference%2Fcover.jpeg" class="article-body-image-wrapper"&gt;&lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fezeanyimhenry.github.io%2Fblog-assets%2Fimages%2F2023-09%2Fcode-conciseness-why-small-functions-make-a-big-difference%2Fcover.jpeg" width="800" height="400"&gt;&lt;/a&gt;Photo by &lt;a href="https://henryezeanyim.dev/" rel="noopener noreferrer"&gt;Henry Ezeanyim&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Welcome to the world of coding, where less really is more! In this article, we’re going to explore the idea of using shorter functions. Think of them as the superheroes of coding, they make your code easier to read, fix, and enjoy. So, get ready for a coding adventure that will show you why short and sweet is the way to go!&lt;/p&gt;
&lt;h3&gt;The Trouble with Long Functions&lt;/h3&gt;
&lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fezeanyimhenry.github.io%2Fblog-assets%2Fimages%2F2023-09%2Fcode-conciseness-why-small-functions-make-a-big-difference%2Finline-1.jpg" width="800" height="400"&gt;Photo by &lt;a href="https://unsplash.com/@hishahadat?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Shahadat Rahman&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;p&gt;Have you ever looked at a piece of code and thought, “What on earth is going on here?” That’s what long functions can feel like. Here’s why it’s a good idea to keep your functions short and sweet:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Easy to Understand:&lt;/strong&gt; Short functions are like short stories, they’re easy to read and understand. Long functions, on the other hand, are like reading a never-ending book where you forget the beginning by the time you reach the end.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Finding Mistakes:&lt;/strong&gt; When something goes wrong in your code, short functions make it much easier to find the problem. It’s like looking for a lost sock in a tidy drawer instead of a messy room.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reusing Code:&lt;/strong&gt; Short functions are like building blocks that you can use again and again. Long functions are more like giant, one-time-use machines that are hard to take apart.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Real-Life Examples: The Code Battle&lt;/h3&gt;
&lt;p&gt;Let’s see how this works with a real example. Imagine you’re building a program to calculate the total cost of items in a shopping cart. Here’s how it can be done with both long and short functions:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Long Function Approach:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;function calculateTotalPrice($cart) {&lt;br&gt;    $total = 0;&lt;br&gt;    foreach ($cart as $item) {&lt;br&gt;        $subtotal = $item['price'] * $item['quantity'];&lt;br&gt;        $total = $total + $subtotal;&lt;br&gt;    }&lt;br&gt;    return $total;&lt;br&gt;}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Short Function Approach:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;function calculateTotalPrice($cart) {&lt;br&gt;    return array_sum(array_map(fn($item) =&amp;gt; $item['price'] * $item['quantity'], $cart));&lt;br&gt;}&lt;/pre&gt;
&lt;p&gt;In this example, the short function approach not only has fewer lines of code but also makes it clearer what’s happening. It’s like upgrading from a clunky old calculator to a sleek, modern one, it’s faster and easier to use.&lt;/p&gt;
&lt;h3&gt;Conclusion: Embrace Short and Sweet Code&lt;/h3&gt;
&lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fezeanyimhenry.github.io%2Fblog-assets%2Fimages%2F2023-09%2Fcode-conciseness-why-small-functions-make-a-big-difference%2Finline-2.jpeg" width="800" height="400"&gt;Photo by &lt;a href="https://henryezeanyim.dev/" rel="noopener noreferrer"&gt;Henry Ezeanyim&lt;/a&gt;&lt;p&gt;In the world of coding, short and sweet is a superpower. Short functions make your code clear, easy to fix, and a joy to work with. So, embrace the idea of keeping your code concise, and you’ll find that coding becomes a happier and more efficient adventure. Your future self and your fellow coders will thank you!&lt;/p&gt;

</description>
      <category>php</category>
      <category>refactoring</category>
      <category>beginners</category>
      <category>codequality</category>
    </item>
    <item>
      <title>Discover Livewire: Essential Apps for Beginners</title>
      <dc:creator>Henry of Oracus 🇳🇬</dc:creator>
      <pubDate>Fri, 20 Mar 2026 10:35:56 +0000</pubDate>
      <link>https://dev.to/ezeanyim_henry/discover-livewire-essential-apps-for-beginners-5487</link>
      <guid>https://dev.to/ezeanyim_henry/discover-livewire-essential-apps-for-beginners-5487</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Originally published on Medium: &lt;a href="https://medium.com/@ezeanyimhenry/discover-livewire-essential-apps-for-beginners-c3b94daeb8ab" rel="noopener noreferrer"&gt;https://medium.com/@ezeanyimhenry/discover-livewire-essential-apps-for-beginners-c3b94daeb8ab&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&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%2Fezeanyimhenry.github.io%2Fblog-assets%2Fimages%2F2024-06%2Fdiscover-livewire-essential-apps-for-beginners%2Fcover.jpeg" class="article-body-image-wrapper"&gt;&lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fezeanyimhenry.github.io%2Fblog-assets%2Fimages%2F2024-06%2Fdiscover-livewire-essential-apps-for-beginners%2Fcover.jpeg" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hey there, Laravel enthusiasts and coding wizards! 🧙‍♂️✨ Ready to dive into the magical world of Livewire? Whether you’re a seasoned developer or just starting your journey, Livewire is here to make building dynamic, reactive web applications a breeze. And guess what? I’ve compiled a list of simple Livewire apps designed especially for beginners to help you get started!&lt;/p&gt;
&lt;h3&gt;What’s Livewire All About?&lt;/h3&gt;
&lt;p&gt;Imagine building modern, interactive web applications without writing a single line of JavaScript. Sounds like a dream, right? Well, Livewire makes that dream a reality! Livewire is a full-stack framework for Laravel that lets you build reactive components using good ol’ PHP. It’s like having a superpower for your web development toolkit.&lt;/p&gt;
&lt;h3&gt;Meet the Apps: A Whirlwind Tour&lt;/h3&gt;
&lt;p&gt;I’ve put together a collection of Livewire apps to help beginners get the hang of things. Each app demonstrates a fundamental concept or feature of Livewire, making it super easy to learn and understand. Let’s take a look at what we’ve got:&lt;/p&gt;
&lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fezeanyimhenry.github.io%2Fblog-assets%2Fimages%2F2024-06%2Fdiscover-livewire-essential-apps-for-beginners%2Finline-1.jpeg" width="800" height="400"&gt;&lt;h3&gt;1. Counter App: Keep Counting!&lt;/h3&gt;
&lt;p&gt;A classic to start with! This simple counter app allows you to increment and decrement a counter. Perfect for getting a feel for Livewire’s reactivity.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Increment counter&lt;/li&gt;
&lt;li&gt;Decrement counter&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;Link: &lt;a href="http://localhost:8000/counter" rel="noopener noreferrer"&gt;http://localhost:8000/counter&lt;/a&gt;
&lt;/blockquote&gt;
&lt;h3&gt;2. Todo List: Get Things Done&lt;/h3&gt;
&lt;p&gt;A must-have for any developer’s toolkit. This todo list app lets you add, update, and delete tasks. Keep track of your to-dos like a pro!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Add new tasks&lt;/li&gt;
&lt;li&gt;Mark tasks as completed&lt;/li&gt;
&lt;li&gt;Delete tasks&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;Link: &lt;a href="http://localhost:8000/todo" rel="noopener noreferrer"&gt;http://localhost:8000/todo&lt;/a&gt;
&lt;/blockquote&gt;
&lt;h3&gt;3. Calculator: Math Made Easy&lt;/h3&gt;
&lt;p&gt;Who doesn’t love a good calculator? This basic calculator app performs addition, subtraction, multiplication, and division. Say goodbye to mental math!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Basic arithmetic operations&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;Link: &lt;a href="http://localhost:8000/calculator" rel="noopener noreferrer"&gt;http://localhost:8000/calculator&lt;/a&gt;
&lt;/blockquote&gt;
&lt;h3&gt;4. Cascading Dropdown: Choose Wisely&lt;/h3&gt;
&lt;p&gt;This app features a cascading dropdown for continents, countries, and states. Select a continent, see the countries. Select a country, see the states. It’s as simple as that!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Select a continent and see countries in that continent&lt;/li&gt;
&lt;li&gt;Select a country and see states in that country&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;Link: &lt;a href="http://localhost:8000/cascading-dropdown" rel="noopener noreferrer"&gt;http://localhost:8000/cascading-dropdown&lt;/a&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Getting Started: The Adventure Begins&lt;/h3&gt;
&lt;p&gt;Before we dive into the fun stuff, let’s get you set up. Follow these steps to clone the repository, install dependencies, and fire up your local server. Trust me, it’s easier than assembling IKEA furniture!&lt;/p&gt;
&lt;h3&gt;Step 1: Clone the Repository&lt;/h3&gt;
&lt;p&gt;First things first, grab the repository from GitHub and navigate to the project directory:&lt;/p&gt;
&lt;pre&gt;git clone &lt;a href="https://github.com/ezeanyimhenry/livewire-apps.git" rel="noopener noreferrer"&gt;https://github.com/ezeanyimhenry/livewire-apps.git&lt;/a&gt;&lt;br&gt;cd livewire-apps&lt;/pre&gt;
&lt;h3&gt;Step 2: Install Dependencies&lt;/h3&gt;
&lt;p&gt;Now, let’s install all the necessary packages. It’s like stocking up on snacks before a movie marathon:&lt;/p&gt;
&lt;pre&gt;composer install&lt;br&gt;npm install &amp;amp;&amp;amp; npm run dev&lt;/pre&gt;
&lt;h3&gt;Step 3: Set Up the Environment&lt;/h3&gt;
&lt;p&gt;Time to set up your environment. Copy the .env.example file to .env and configure your database settings. Don't forget to generate your application key!&lt;/p&gt;
&lt;pre&gt;cp .env.example .env&lt;br&gt;php artisan key:generate&lt;/pre&gt;
&lt;h3&gt;Step 4: Run Database Migrations with Seed&lt;/h3&gt;
&lt;p&gt;Next up, migrate your database and seed it with some initial data:&lt;/p&gt;
&lt;pre&gt;php artisan migrate --seed&lt;/pre&gt;
&lt;h3&gt;Step 5: Serve the Application&lt;/h3&gt;
&lt;p&gt;Finally, start the Laravel development server and voilà! You’re ready to explore the magic of Livewire:&lt;/p&gt;
&lt;pre&gt;php artisan serve&lt;/pre&gt;
&lt;h3&gt;How to Use These Apps&lt;/h3&gt;
&lt;p&gt;Once your server is up and running, navigating to the specific applications is a piece of cake. Just follow the links provided above and start exploring!&lt;/p&gt;
&lt;h3&gt;Contributing: Join the Fun!&lt;/h3&gt;
&lt;p&gt;I love contributions! If you have suggestions, improvements, or want to add new features, I welcome you with open arms. Here’s how you can contribute:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Fork the repository.&lt;/li&gt;
&lt;li&gt;Create a new branch (git checkout -b feature/your-feature-name).&lt;/li&gt;
&lt;li&gt;Make your changes.&lt;/li&gt;
&lt;li&gt;Commit your changes (git commit -m 'Add some feature').&lt;/li&gt;
&lt;li&gt;Push to the branch (git push origin feature/your-feature-name).&lt;/li&gt;
&lt;li&gt;Open a pull request.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Your contributions will help make this project even more awesome!&lt;/p&gt;
&lt;h3&gt;License: It’s All Yours&lt;/h3&gt;
&lt;p&gt;This project is licensed under the MIT License. Feel free to use, modify, and distribute it as you like. Check out the &lt;a href="https://github.com/ezeanyimhenry/livewire-apps/blob/main/LICENSE" rel="noopener noreferrer"&gt;LICENSE&lt;/a&gt; file for more details.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Solving a Complex Backend Challenge: My Journey with the HNG Internship</title>
      <dc:creator>Henry of Oracus 🇳🇬</dc:creator>
      <pubDate>Fri, 20 Mar 2026 10:33:01 +0000</pubDate>
      <link>https://dev.to/ezeanyim_henry/solving-a-complex-backend-challenge-my-journey-with-the-hng-internship-35ng</link>
      <guid>https://dev.to/ezeanyim_henry/solving-a-complex-backend-challenge-my-journey-with-the-hng-internship-35ng</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Originally published on Medium: &lt;a href="https://medium.com/@ezeanyimhenry/solving-a-complex-backend-challenge-my-journey-with-the-hng-internship-6349ffb29622" rel="noopener noreferrer"&gt;https://medium.com/@ezeanyimhenry/solving-a-complex-backend-challenge-my-journey-with-the-hng-internship-6349ffb29622&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&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%2Fezeanyimhenry.github.io%2Fblog-assets%2Fimages%2F2024-06%2Fsolving-a-complex-backend-challenge-my-journey-with-the-hng-internship%2Fcover.jpeg" class="article-body-image-wrapper"&gt;&lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fezeanyimhenry.github.io%2Fblog-assets%2Fimages%2F2024-06%2Fsolving-a-complex-backend-challenge-my-journey-with-the-hng-internship%2Fcover.jpeg" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Embarking on the journey of a backend developer is both thrilling and challenging. As a participant in the HNG Internship, I encountered a problem that tested my skills and pushed me to grow. Let me take you through a recent, difficult backend problem I had to solve and how I navigated it, step-by-step.&lt;/p&gt;
&lt;h3&gt;The Problem: Optimizing Database Performance&lt;/h3&gt;
&lt;p&gt;I was working on an application where users could upload and share images. As the user base grew, the application started experiencing significant performance issues. The database, which stored metadata about the images, was becoming a bottleneck. Queries were slow, and users were experiencing delays.&lt;/p&gt;
&lt;h3&gt;Step-by-Step Solution&lt;/h3&gt;
&lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fezeanyimhenry.github.io%2Fblog-assets%2Fimages%2F2024-06%2Fsolving-a-complex-backend-challenge-my-journey-with-the-hng-internship%2Finline-1.jpg" width="800" height="400"&gt;Photo by &lt;a href="https://unsplash.com/@olav_ahrens?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Olav Ahrens Røtne&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;h3&gt;Step 1: Identifying the Bottleneck&lt;/h3&gt;
&lt;p&gt;The first step was to identify the exact cause of the slowdown. I used a combination of profiling tools and database logs to pinpoint the slow queries. It turned out that a few specific queries were taking an unusually long time to execute.&lt;/p&gt;
&lt;h3&gt;Step 2: Analyzing the Queries&lt;/h3&gt;
&lt;p&gt;I analyzed these slow queries to understand why they were performing poorly. The issue was related to inefficient indexing. The database had grown significantly, and the existing indexes were no longer sufficient to handle the increased load.&lt;/p&gt;
&lt;h3&gt;Step 3: Optimizing Indexes&lt;/h3&gt;
&lt;p&gt;I re-evaluated the indexing strategy. I created new indexes on columns that were frequently used in WHERE clauses and JOIN operations. Additionally, I removed redundant indexes that were not being used effectively.&lt;/p&gt;
&lt;h3&gt;Step 4: Implementing Query Caching&lt;/h3&gt;
&lt;p&gt;To further improve performance, I implemented query caching for frequent, read-heavy operations. By storing the results of common queries in a cache, I reduced the load on the database and sped up response times for users.&lt;/p&gt;
&lt;h3&gt;Step 5: Refactoring the Database Schema&lt;/h3&gt;
&lt;p&gt;In some cases, the schema itself needed refactoring. I normalized the database to reduce redundancy and improve data integrity. This involved breaking down large tables into smaller, more manageable ones and establishing proper relationships between them.&lt;/p&gt;
&lt;h3&gt;Step 6: Load Testing&lt;/h3&gt;
&lt;p&gt;After making these changes, I conducted extensive load testing to ensure the performance improvements were effective. The results were promising — queries were executing much faster, and the application was handling a larger number of concurrent users without issues.&lt;/p&gt;
&lt;h3&gt;Step 7: Continuous Monitoring&lt;/h3&gt;
&lt;p&gt;Lastly, I set up continuous monitoring to keep an eye on database performance. This allowed me to catch any future issues early and make necessary adjustments proactively.&lt;/p&gt;
&lt;h3&gt;My Journey with HNG Internship&lt;/h3&gt;
&lt;p&gt;Joining the HNG Internship has been a transformative experience. It’s an opportunity to work on real-world problems, learn from industry experts, and collaborate with a community of passionate developers. The challenge I described above is just one example of how the internship pushes me to improve my skills and solve complex problems.&lt;/p&gt;
&lt;p&gt;I chose the HNG Internship because it offers a platform to grow professionally and personally. The structured learning environment, combined with hands-on projects, is the perfect recipe for becoming a proficient backend developer.&lt;/p&gt;
&lt;p&gt;If you’re interested in learning more about the HNG Internship, check out their &lt;a href="https://hng.tech/internship" rel="noopener noreferrer"&gt;internship page&lt;/a&gt; and &lt;a href="https://hng.tech/premium" rel="noopener noreferrer"&gt;premium offerings&lt;/a&gt;. Whether you’re looking to kickstart your career or take it to the next level, HNG has something to offer.&lt;/p&gt;
&lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fezeanyimhenry.github.io%2Fblog-assets%2Fimages%2F2024-06%2Fsolving-a-complex-backend-challenge-my-journey-with-the-hng-internship%2Finline-2.jpeg" width="800" height="400"&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Solving backend problems is a rewarding experience that requires a blend of analytical thinking and technical expertise. Through this journey, I’ve learned that persistence and a methodical approach are key to overcoming challenges. The HNG Internship has been instrumental in this process, providing me with the tools and support needed to excel.&lt;/p&gt;
&lt;p&gt;As I continue on this path, I’m excited about the opportunities ahead and the chance to make a meaningful impact through technology. Thank you for joining me on this journey, and I look forward to sharing more experiences and insights as I progress.&lt;/p&gt;
&lt;p&gt;By sharing this story, I hope to inspire others to tackle their own technical challenges with confidence and curiosity. Let’s continue to learn and grow together!&lt;/p&gt;
&lt;p&gt;Ready to join the HNG Internship? Check out their &lt;a href="https://hng.tech/internship" rel="noopener noreferrer"&gt;website&lt;/a&gt; for more information on how to apply and get started.&lt;/p&gt;

</description>
      <category>backend</category>
      <category>database</category>
      <category>performance</category>
      <category>career</category>
    </item>
  </channel>
</rss>
