<?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: The Creative CodeFlow</title>
    <description>The latest articles on DEV Community by The Creative CodeFlow (@the_creativecodeflow_f52).</description>
    <link>https://dev.to/the_creativecodeflow_f52</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4162211%2Fc20e4518-5fdb-4d25-8990-35ac34fe27a1.png</url>
      <title>DEV Community: The Creative CodeFlow</title>
      <link>https://dev.to/the_creativecodeflow_f52</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/the_creativecodeflow_f52"/>
    <language>en</language>
    <item>
      <title>Your API Might Be Doing 100 Database Queries Instead of 1</title>
      <dc:creator>The Creative CodeFlow</dc:creator>
      <pubDate>Sun, 18 Oct 2026 18:40:59 +0000</pubDate>
      <link>https://dev.to/the_creativecodeflow_f52/your-api-might-be-doing-100-database-queries-instead-of-1-4542</link>
      <guid>https://dev.to/the_creativecodeflow_f52/your-api-might-be-doing-100-database-queries-instead-of-1-4542</guid>
      <description>&lt;p&gt;Imagine loading a page that displays 100 users.&lt;br&gt;
Simple, right?&lt;br&gt;
But what if your backend makes 101 database queries just to display them?&lt;br&gt;
This is called the N+1 query problem.&lt;br&gt;
Here's a simplified example:&lt;br&gt;
const users = await db.user.findMany();&lt;/p&gt;

&lt;p&gt;for (const user of users) {&lt;br&gt;
  user.posts = await db.post.findMany({&lt;br&gt;
    where: { userId: user.id }&lt;br&gt;
  });&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;If you have 100 users, this can execute:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 query to fetch users&lt;/li&gt;
&lt;li&gt;100 queries to fetch their posts
Total: 101 queries.
That's a lot of unnecessary database communication.
A better approach is to fetch the posts for all users in one query:
const users = await db.user.findMany();&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;const posts = await db.post.findMany({&lt;br&gt;
  where: {&lt;br&gt;
    userId: { in: users.map(user =&amp;gt; user.id) }&lt;br&gt;
  }&lt;br&gt;
});&lt;/p&gt;

&lt;p&gt;Now you've reduced the example to 2 queries instead of 101.&lt;br&gt;
You still need to group the posts by user before returning the response, but you've eliminated the repeated database calls.&lt;br&gt;
The actual improvement depends on your database, data size, indexes, and query patterns.&lt;br&gt;
The lesson?&lt;br&gt;
Sometimes your API isn't slow because your code is complicated.&lt;br&gt;
It's slow because your code keeps asking the database the same kind of question again and again.&lt;br&gt;
Next time an API feels slow, check how many database queries it executes.&lt;br&gt;
You might discover that the biggest performance improvement requires less querying, not more code.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>webdev</category>
      <category>ai</category>
      <category>coding</category>
    </item>
    <item>
      <title>JavaScript Has a Weird Trick: [] == false Is True</title>
      <dc:creator>The Creative CodeFlow</dc:creator>
      <pubDate>Mon, 12 Oct 2026 17:51:50 +0000</pubDate>
      <link>https://dev.to/the_creativecodeflow_f52/javascript-has-a-weird-trick-false-is-true-2aop</link>
      <guid>https://dev.to/the_creativecodeflow_f52/javascript-has-a-weird-trick-false-is-true-2aop</guid>
      <description>&lt;p&gt;JavaScript Has a Weird Trick: [] == false Is True&lt;br&gt;
What do you think this prints?&lt;br&gt;
console.log([] == false);&lt;br&gt;
console.log([] === false);&lt;/p&gt;

&lt;p&gt;The output is:&lt;br&gt;
true&lt;br&gt;
false&lt;/p&gt;

&lt;p&gt;Wait… how can an empty array equal false?&lt;br&gt;
The answer is JavaScript's type coercion.&lt;br&gt;
When you use ==, JavaScript may convert values to different types before comparing them.&lt;br&gt;
In this example:&lt;br&gt;
[] == false&lt;/p&gt;

&lt;p&gt;JavaScript converts false to 0, and the empty array to an empty string, which becomes 0 when converted to a number.&lt;br&gt;
So the comparison becomes:&lt;br&gt;
0 == 0 // true&lt;/p&gt;

&lt;p&gt;But === checks both value and type without performing this kind of type conversion.&lt;br&gt;
[] === false // false&lt;/p&gt;

&lt;p&gt;An array and a boolean are different types.&lt;br&gt;
Here's the lesson: JavaScript sometimes does more work behind the scenes than your code suggests.&lt;br&gt;
For predictable comparisons, prefer === unless you specifically need the conversion behavior of ==.&lt;br&gt;
Try these yourself:&lt;br&gt;
console.log("" == false);&lt;br&gt;
console.log("0" == false);&lt;br&gt;
console.log([] == ![]);&lt;/p&gt;

&lt;p&gt;Can you predict all three outputs before running the code?&lt;/p&gt;

</description>
      <category>developers</category>
      <category>coding</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Why const Doesn't Mean What Most JavaScript Beginners Think</title>
      <dc:creator>The Creative CodeFlow</dc:creator>
      <pubDate>Sun, 11 Oct 2026 18:29:04 +0000</pubDate>
      <link>https://dev.to/the_creativecodeflow_f52/why-const-doesnt-mean-what-most-javascript-beginners-think-4799</link>
      <guid>https://dev.to/the_creativecodeflow_f52/why-const-doesnt-mean-what-most-javascript-beginners-think-4799</guid>
      <description>&lt;p&gt;You use const because you don't want a variable to change.&lt;br&gt;
But JavaScript has a surprise for you. 👀&lt;br&gt;
const user = {&lt;br&gt;
  name: "Rahul"&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;user.name = "Alex";&lt;/p&gt;

&lt;p&gt;console.log(user.name);&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
Alex&lt;/p&gt;

&lt;p&gt;Wait… wasn't user declared with const?&lt;br&gt;
Here's the trick.&lt;br&gt;
const prevents you from reassigning the variable. It doesn't make the object itself immutable.&lt;br&gt;
This works:&lt;br&gt;
user.name = "Alex";&lt;/p&gt;

&lt;p&gt;But this doesn't:&lt;br&gt;
user = { name: "Sam" };&lt;/p&gt;

&lt;p&gt;Why?&lt;br&gt;
Because const keeps the variable bound to the same object, but the object's properties can still change.&lt;br&gt;
Think of it like this:&lt;br&gt;
You can't replace the box, but you can change what's inside it.&lt;br&gt;
Want to prevent accidental changes to an object's top-level properties?&lt;br&gt;
Try:&lt;br&gt;
Object.freeze(user);&lt;/p&gt;

&lt;p&gt;Remember, Object.freeze() is shallow. Nested objects can still change unless you freeze them separately.&lt;br&gt;
The takeaway: const doesn't mean "nothing can change." It means "this variable can't be reassigned."&lt;br&gt;
Did you know this already, or did JavaScript trick you too?&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Your API Can Be Slow Even When Your Code Is Fast</title>
      <dc:creator>The Creative CodeFlow</dc:creator>
      <pubDate>Thu, 08 Oct 2026 15:41:22 +0000</pubDate>
      <link>https://dev.to/the_creativecodeflow_f52/your-api-can-be-slow-even-when-your-code-is-fast-4koj</link>
      <guid>https://dev.to/the_creativecodeflow_f52/your-api-can-be-slow-even-when-your-code-is-fast-4koj</guid>
      <description>&lt;p&gt;You optimized your function.&lt;br&gt;
It runs in 5ms.&lt;br&gt;
But your API still takes 2 seconds.&lt;br&gt;
Why?&lt;br&gt;
Because your function isn't the only thing your API is doing.&lt;br&gt;
A request might look like this:&lt;br&gt;
Client&lt;br&gt;
  ↓&lt;br&gt;
API&lt;br&gt;
  ↓&lt;br&gt;
Database&lt;br&gt;
  ↓&lt;br&gt;
External API&lt;br&gt;
  ↓&lt;br&gt;
Response&lt;/p&gt;

&lt;p&gt;Your code could be extremely fast while the database or external service is slow.&lt;br&gt;
For example:&lt;br&gt;
const user = await getUserFromDatabase();&lt;br&gt;
const weather = await getWeatherFromAPI();&lt;/p&gt;

&lt;p&gt;If the database takes 500ms and the weather API takes 800ms, your API is already waiting more than a second.&lt;br&gt;
And that's before adding other work.&lt;br&gt;
One simple improvement is doing independent operations in parallel:&lt;br&gt;
const [user, weather] = await Promise.all([&lt;br&gt;
  getUserFromDatabase(),&lt;br&gt;
  getWeatherFromAPI()&lt;br&gt;
]);&lt;/p&gt;

&lt;p&gt;Instead of:&lt;br&gt;
Database → 500ms&lt;br&gt;
     ↓&lt;br&gt;
Weather → 800ms&lt;/p&gt;

&lt;p&gt;Total ≈ 1300ms&lt;/p&gt;

&lt;p&gt;You can potentially get closer to:&lt;br&gt;
Database ─── 500ms ──┐&lt;br&gt;
                     ├──→ Response&lt;br&gt;
Weather ───── 800ms ─┘&lt;/p&gt;

&lt;p&gt;Total ≈ 800ms&lt;/p&gt;

&lt;p&gt;The exact result depends on the services and other work involved.&lt;br&gt;
The important lesson:&lt;br&gt;
Don't optimize only your code.&lt;br&gt;
When an API is slow, ask:&lt;br&gt;
"Where is the time actually being spent?"&lt;br&gt;
Sometimes the slowest part of your API isn't your code at all.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fid2x840ioyqfwzz5dwss.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fid2x840ioyqfwzz5dwss.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>backend</category>
      <category>javascript</category>
      <category>performance</category>
    </item>
    <item>
      <title>Your console.log() Might Be Hiding Your Real Bug</title>
      <dc:creator>The Creative CodeFlow</dc:creator>
      <pubDate>Wed, 07 Oct 2026 11:13:34 +0000</pubDate>
      <link>https://dev.to/the_creativecodeflow_f52/your-consolelog-might-be-hiding-your-real-bug-2lop</link>
      <guid>https://dev.to/the_creativecodeflow_f52/your-consolelog-might-be-hiding-your-real-bug-2lop</guid>
      <description>&lt;p&gt;You see this in your code:&lt;br&gt;
console.log(user);&lt;/p&gt;

&lt;p&gt;And the console shows:&lt;br&gt;
{name: "Rahul", age: 21}&lt;/p&gt;

&lt;p&gt;Looks fine, right?&lt;br&gt;
But when you're debugging objects, there is something easy to miss.&lt;br&gt;
For example:&lt;br&gt;
console.log(user);&lt;/p&gt;

&lt;p&gt;user.name = "Changed";&lt;/p&gt;

&lt;p&gt;When you later expand an object in the browser console, you may not always be looking at the exact state you expected at the moment of logging.&lt;br&gt;
If you want a simple snapshot, you can log the object as JSON:&lt;br&gt;
console.log(JSON.stringify(user));&lt;/p&gt;

&lt;p&gt;Now you're seeing the serialized value at that point in time.&lt;br&gt;
The bigger lesson?&lt;br&gt;
Don't just ask:&lt;br&gt;
"Did I log the variable?"&lt;br&gt;
Ask:&lt;br&gt;
"Am I actually seeing its value at the moment the bug happened?"&lt;br&gt;
Sometimes debugging isn't about adding more logs.&lt;br&gt;
It's about understanding what your logs are actually showing you.&lt;br&gt;
Try it yourself: log an object, change it immediately afterward, and inspect the console.&lt;br&gt;
You might be surprised.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>debugging</category>
      <category>programming</category>
    </item>
    <item>
      <title>Why Does Your Code Work After You Restart the Server?</title>
      <dc:creator>The Creative CodeFlow</dc:creator>
      <pubDate>Tue, 06 Oct 2026 06:10:23 +0000</pubDate>
      <link>https://dev.to/the_creativecodeflow_f52/why-does-your-code-work-after-you-restart-the-server-57i3</link>
      <guid>https://dev.to/the_creativecodeflow_f52/why-does-your-code-work-after-you-restart-the-server-57i3</guid>
      <description>&lt;h1&gt;
  
  
  Why Does Your Code Work After You Restart the Server?
&lt;/h1&gt;

&lt;p&gt;Have you ever seen this?&lt;/p&gt;

&lt;p&gt;Your application is broken.&lt;/p&gt;

&lt;p&gt;You stare at the code.&lt;/p&gt;

&lt;p&gt;You change something.&lt;/p&gt;

&lt;p&gt;Nothing.&lt;/p&gt;

&lt;p&gt;Then you restart the server...&lt;/p&gt;

&lt;p&gt;And suddenly:&lt;/p&gt;

&lt;p&gt;"Wait... it works now?"&lt;/p&gt;

&lt;p&gt;This isn't magic.&lt;/p&gt;

&lt;p&gt;There are several reasons why restarting an application can appear to fix a problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Your application has state
&lt;/h2&gt;

&lt;p&gt;Some applications keep information in memory while they are running.&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 javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As long as the process is running, &lt;code&gt;count&lt;/code&gt; keeps its value.&lt;/p&gt;

&lt;p&gt;When you restart the application:&lt;/p&gt;

&lt;p&gt;Application running&lt;br&gt;
      ↓&lt;br&gt;
count = 5&lt;br&gt;
      ↓&lt;br&gt;
Restart&lt;br&gt;
      ↓&lt;br&gt;
count = 0&lt;/p&gt;

&lt;p&gt;The old memory is gone.&lt;/p&gt;

&lt;p&gt;So restarting can remove unexpected state that your code was carrying around.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Something is stuck
&lt;/h2&gt;

&lt;p&gt;Your application might have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an open connection&lt;/li&gt;
&lt;li&gt;a pending request&lt;/li&gt;
&lt;li&gt;a cached value&lt;/li&gt;
&lt;li&gt;a background process&lt;/li&gt;
&lt;li&gt;a file handle&lt;/li&gt;
&lt;li&gt;a connection pool&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sometimes that state gets into an unexpected situation.&lt;/p&gt;

&lt;p&gt;Restarting shuts down the old process and creates a fresh one.&lt;/p&gt;

&lt;p&gt;It's basically saying:&lt;/p&gt;

&lt;p&gt;"Forget everything and start again."&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Your environment changed
&lt;/h2&gt;

&lt;p&gt;This happens a lot during development.&lt;/p&gt;

&lt;p&gt;You install a package.&lt;/p&gt;

&lt;p&gt;Change an environment variable.&lt;/p&gt;

&lt;p&gt;Modify a configuration file.&lt;/p&gt;

&lt;p&gt;Change a port.&lt;/p&gt;

&lt;p&gt;But your currently running process may still be using the old configuration.&lt;/p&gt;

&lt;p&gt;Restarting forces the application to load the configuration again.&lt;/p&gt;

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

&lt;p&gt;.env&lt;br&gt;
 ↓&lt;br&gt;
Application starts&lt;br&gt;
 ↓&lt;br&gt;
Environment variables loaded&lt;/p&gt;

&lt;p&gt;If &lt;code&gt;.env&lt;/code&gt; changes while the application is already running, the running process doesn't automatically become a completely new process with the new environment.&lt;/p&gt;

&lt;p&gt;A restart gives you a clean start.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Your development server has a problem
&lt;/h2&gt;

&lt;p&gt;Modern development tools often support hot reload.&lt;/p&gt;

&lt;p&gt;You save a file.&lt;/p&gt;

&lt;p&gt;The tool detects the change.&lt;/p&gt;

&lt;p&gt;It updates your application without completely restarting everything.&lt;/p&gt;

&lt;p&gt;This is extremely useful.&lt;/p&gt;

&lt;p&gt;But it also means your development environment can sometimes end up in a state that doesn't perfectly represent a fresh application startup.&lt;/p&gt;

&lt;p&gt;A restart can clear that state.&lt;/p&gt;

&lt;h2&gt;
  
  
  But here's the important part
&lt;/h2&gt;

&lt;p&gt;Restarting the server is useful.&lt;/p&gt;

&lt;p&gt;But it should not become your debugging strategy.&lt;/p&gt;

&lt;p&gt;If your solution is always:&lt;/p&gt;

&lt;p&gt;Bug&lt;br&gt;
 ↓&lt;br&gt;
Restart&lt;br&gt;
 ↓&lt;br&gt;
Works&lt;br&gt;
 ↓&lt;br&gt;
Move on&lt;/p&gt;

&lt;p&gt;you're hiding the problem instead of understanding it.&lt;/p&gt;

&lt;p&gt;A better approach is:&lt;/p&gt;

&lt;p&gt;Bug&lt;br&gt;
 ↓&lt;br&gt;
Check logs&lt;br&gt;
 ↓&lt;br&gt;
Reproduce it&lt;br&gt;
 ↓&lt;br&gt;
Find the state causing it&lt;br&gt;
 ↓&lt;br&gt;
Fix the actual problem&lt;br&gt;
 ↓&lt;br&gt;
Restart only when necessary&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple debugging habit
&lt;/h2&gt;

&lt;p&gt;The next time restarting fixes your application, stop for a moment.&lt;/p&gt;

&lt;p&gt;Ask yourself:&lt;/p&gt;

&lt;p&gt;"What changed when I restarted?"&lt;/p&gt;

&lt;p&gt;Did the process lose some state?&lt;/p&gt;

&lt;p&gt;Did it reload configuration?&lt;/p&gt;

&lt;p&gt;Did a connection get recreated?&lt;/p&gt;

&lt;p&gt;Did a cache disappear?&lt;/p&gt;

&lt;p&gt;Did a background task stop?&lt;/p&gt;

&lt;p&gt;Did the application actually start from a clean state?&lt;/p&gt;

&lt;p&gt;That question can lead you to the real bug.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bigger lesson
&lt;/h2&gt;

&lt;p&gt;A running application isn't just your source code.&lt;/p&gt;

&lt;p&gt;It's your source code plus:&lt;/p&gt;

&lt;p&gt;Memory&lt;br&gt;
+&lt;br&gt;
Configuration&lt;br&gt;
+&lt;br&gt;
Connections&lt;br&gt;
+&lt;br&gt;
Caches&lt;br&gt;
+&lt;br&gt;
Background tasks&lt;br&gt;
+&lt;br&gt;
External services&lt;/p&gt;

&lt;p&gt;That's why the same code can sometimes behave differently depending on the state of the running system.&lt;/p&gt;

&lt;p&gt;Restarting works because it destroys much of that temporary state and starts a fresh process.&lt;/p&gt;

&lt;p&gt;So the next time you say:&lt;/p&gt;

&lt;p&gt;"Just restart the server."&lt;/p&gt;

&lt;p&gt;Also ask:&lt;/p&gt;

&lt;p&gt;"Why did restarting fix it?"&lt;/p&gt;

&lt;p&gt;That second question is where the real debugging starts.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>debugging</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What Actually Happens When You Type a URL?</title>
      <dc:creator>The Creative CodeFlow</dc:creator>
      <pubDate>Sun, 04 Oct 2026 17:57:27 +0000</pubDate>
      <link>https://dev.to/the_creativecodeflow_f52/what-actually-happens-when-you-type-a-url-4i4b</link>
      <guid>https://dev.to/the_creativecodeflow_f52/what-actually-happens-when-you-type-a-url-4i4b</guid>
      <description>&lt;h1&gt;
  
  
  What Actually Happens When You Type a URL?
&lt;/h1&gt;

&lt;p&gt;You type:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;You press Enter.&lt;/p&gt;

&lt;p&gt;A second later, the website appears.&lt;/p&gt;

&lt;p&gt;But what actually happened during that one second?&lt;/p&gt;

&lt;p&gt;A lot more than you might think.&lt;/p&gt;

&lt;p&gt;Let's break it down in simple terms.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The browser checks the URL
&lt;/h2&gt;

&lt;p&gt;The browser first understands what you entered.&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;we have:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;The protocol tells the browser how it should communicate with the server.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. DNS finds the server
&lt;/h2&gt;

&lt;p&gt;Your computer doesn't directly understand &lt;code&gt;example.com&lt;/code&gt; as an address.&lt;/p&gt;

&lt;p&gt;It needs an IP address such as:&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;This is where DNS comes in.&lt;/p&gt;

&lt;p&gt;DNS is basically like the internet's phone book.&lt;/p&gt;

&lt;p&gt;It converts:&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
        ↓
93.184.216.34
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your browser can then find where the website is hosted.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. A connection is created
&lt;/h2&gt;

&lt;p&gt;Now your browser needs to communicate with that server.&lt;/p&gt;

&lt;p&gt;For HTTPS websites, the connection also involves encryption using TLS.&lt;/p&gt;

&lt;p&gt;This is important because information travelling between you and the website should not simply be readable by anyone who can observe the connection.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Your browser sends an HTTP request
&lt;/h2&gt;

&lt;p&gt;Now the browser can actually ask the server for something.&lt;/p&gt;

&lt;p&gt;A simplified request looks 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="nf"&gt;GET&lt;/span&gt; &lt;span class="nn"&gt;/&lt;/span&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="na"&gt;Host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;example.com&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In simple words:&lt;/p&gt;

&lt;p&gt;"Hey server, give me the homepage of example.com."&lt;/p&gt;

&lt;h2&gt;
  
  
  5. The server sends a response
&lt;/h2&gt;

&lt;p&gt;The server processes the request and sends something back.&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 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;span class="na"&gt;Content-Type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;text/html&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then the HTML page is sent to your browser.&lt;/p&gt;

&lt;p&gt;But we're still not finished.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. The browser builds the webpage
&lt;/h2&gt;

&lt;p&gt;The browser reads the HTML.&lt;/p&gt;

&lt;p&gt;It might find:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"style.css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"app.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"logo.png"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the browser needs to request those files too.&lt;/p&gt;

&lt;p&gt;So one page can cause many additional requests.&lt;/p&gt;

&lt;p&gt;Something that looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You
 ↓
Browser
 ↓
DNS
 ↓
Server
 ↓
HTML
 ↓
CSS + JavaScript + Images
 ↓
Browser renders the page
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And finally...&lt;/p&gt;

&lt;p&gt;You see the website.&lt;/p&gt;

&lt;h2&gt;
  
  
  The interesting part
&lt;/h2&gt;

&lt;p&gt;When you think:&lt;/p&gt;

&lt;p&gt;"Google loaded in one second."&lt;/p&gt;

&lt;p&gt;Your computer actually performed many different operations behind the scenes.&lt;/p&gt;

&lt;p&gt;That's why web development isn't just about HTML, CSS and JavaScript.&lt;/p&gt;

&lt;p&gt;It also involves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DNS&lt;/li&gt;
&lt;li&gt;HTTP&lt;/li&gt;
&lt;li&gt;networking&lt;/li&gt;
&lt;li&gt;TLS&lt;/li&gt;
&lt;li&gt;servers&lt;/li&gt;
&lt;li&gt;browsers&lt;/li&gt;
&lt;li&gt;caching&lt;/li&gt;
&lt;li&gt;databases&lt;/li&gt;
&lt;li&gt;CDNs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of these pieces work together to make the web feel almost instant.&lt;/p&gt;

&lt;p&gt;Try this yourself&lt;/p&gt;

&lt;p&gt;Open your browser.&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;Then open the Network tab and refresh a website.&lt;/p&gt;

&lt;p&gt;You'll see dozens or even hundreds of requests.&lt;/p&gt;

&lt;p&gt;Look at:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Request
Status
Time
Size
Type
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pick one request and inspect it.&lt;/p&gt;

&lt;p&gt;Suddenly, the website won't look like "one page" anymore.&lt;/p&gt;

&lt;p&gt;It will look like a conversation between your browser and many different systems.&lt;/p&gt;

&lt;p&gt;And that's one of the most useful things to understand as a web developer:&lt;/p&gt;

&lt;p&gt;A website isn't just something you see.&lt;/p&gt;

&lt;p&gt;It's a collection of requests, responses and systems working together in the background.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
