<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Louis Young</title>
    <description>The latest articles on Forem by Louis Young (@louisryoung).</description>
    <link>https://forem.com/louisryoung</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%2F1067492%2F72f55805-fc5f-44be-a560-5bb413ecd0ec.png</url>
      <title>Forem: Louis Young</title>
      <link>https://forem.com/louisryoung</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/louisryoung"/>
    <language>en</language>
    <item>
      <title>Battle of HTTP Clients: Comparing Axios, Unfetch, and Superagent for beginners</title>
      <dc:creator>Louis Young</dc:creator>
      <pubDate>Wed, 12 Jul 2023 12:17:50 +0000</pubDate>
      <link>https://forem.com/louisryoung/battle-of-http-clients-comparing-axios-unfetch-and-superagent-for-beginners-2c2a</link>
      <guid>https://forem.com/louisryoung/battle-of-http-clients-comparing-axios-unfetch-and-superagent-for-beginners-2c2a</guid>
      <description>&lt;p&gt;Gather around, fellow developers, as we witness the epic showdown between three of the most popular JavaScript HTTP clients. Today, we are going to witness the battle of **Axios **vs **Unfetch **vs **Superagent **to see who comes out on top!&lt;/p&gt;

&lt;p&gt;In the red corner, we have Axios, the Promise-based HTTP client known for its flexibility and ability to work well with Node.js and browsers alike.&lt;/p&gt;

&lt;p&gt;In the blue corner, we have Unfetch, the minimalistic, lightweight contender who can slip into any project without causing a fuss.&lt;/p&gt;

&lt;p&gt;Finally, in the green corner, we have Superagent, the well-rounded client that boasts a fluent, chainable API and a vast array of plugins.&lt;/p&gt;

&lt;p&gt;Let's dive in and see how these three HTTP clients fare against each other in a series of grueling challenges!&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 1: Basic Usage
&lt;/h2&gt;

&lt;p&gt;First, let's see how our contenders perform when it comes to basic usage. Here's how you can fetch data using each of them:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Axios&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const axios = require('axios');

axios.get('https://api.example.com/data')
  .then(response =&amp;gt; {
    console.log(response.data);
  })
  .catch(error =&amp;gt; {
    console.error(error);
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Unfetch&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fetch = require('unfetch');

fetch('https://api.example.com/data')
  .then(response =&amp;gt; response.json())
  .then(data =&amp;gt; {
    console.log(data);
  })
  .catch(error =&amp;gt; {
    console.error(error);
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Superagent&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const request = require('superagent');

request
  .get('https://api.example.com/data')
  .then(response =&amp;gt; {
    console.log(response.body);
  })
  .catch(error =&amp;gt; {
    console.error(error);
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Winner&lt;/strong&gt;: &lt;strong&gt;Unfetch&lt;/strong&gt; for its minimalistic and familiar fetch API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 2: Error Handling
&lt;/h2&gt;

&lt;p&gt;Now, let's see how our contenders deal with errors:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Axios&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;axios.get('https://api.example.com/data')
  .then(response =&amp;gt; {
    console.log(response.data);
  })
  .catch(error =&amp;gt; {
    if (error.response) {
      console.error('Error status:', error.response.status);
    } else if (error.request) {
      console.error('No response received:', error.request);
    } else {
      console.error('Error:', error.message);
    }
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Unfetch&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch('https://api.example.com/data')
  .then(response =&amp;gt; {
    if (!response.ok) {
      throw new Error(`Error status: ${response.status}`);
    }
    return response.json();
  })
  .then(data =&amp;gt; {
    console.log(data);
  })
  .catch(error =&amp;gt; {
    console.error('Error:', error.message);
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Superagent&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;request
  .get('https://api.example.com/data')
  .then(response =&amp;gt; {
    console.log(response.body);
  })
  .catch(error =&amp;gt; {
    if (error.response) {
      console.error('Error status:', error.response.status);
    } else {
      console.error('Error:', error.message);
    }
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Winner&lt;/strong&gt;: **Axios **for its detailed error information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 3: Browser Support
&lt;/h2&gt;

&lt;p&gt;Finally, let's see which client supports the widest range of browsers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Axios: IE 11+ (with a Promise polyfill)&lt;/li&gt;
&lt;li&gt;Unfetch: IE 9+ (with a Promise polyfill)&lt;/li&gt;
&lt;li&gt;Superagent: IE 10+&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Winner&lt;/strong&gt;: &lt;strong&gt;Unfetch&lt;/strong&gt; for its broader browser support.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Verdict
&lt;/h2&gt;

&lt;p&gt;After three intense rounds, it's clear that each of our contenders has its strengths and weaknesses.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Axios shines when it comes to error handling and flexibility.&lt;/li&gt;
&lt;li&gt;Unfetch is the lightweight champion with broader browser support.&lt;/li&gt;
&lt;li&gt;Superagent offers a fluent API and a wide array of plugins.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The winner ultimately depends on your specific needs and project requirements. Choose wisely and may the best HTTP client be with you!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>api</category>
    </item>
    <item>
      <title>Browsers and How They Work: A Comical Guide 🤪</title>
      <dc:creator>Louis Young</dc:creator>
      <pubDate>Fri, 07 Jul 2023 12:55:56 +0000</pubDate>
      <link>https://forem.com/louisryoung/browsers-and-how-they-work-a-comical-guide-lce</link>
      <guid>https://forem.com/louisryoung/browsers-and-how-they-work-a-comical-guide-lce</guid>
      <description>&lt;p&gt;Ever wondered how you magically end up on a website after typing some random gibberish (we mean, an address) into that little white bar at the top of your screen? Well, wonder no more! Today, we're diving into the mysterious world of browsers and how they work - with a comical twist, of course. 😜&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing the Heroes 🦸
&lt;/h2&gt;

&lt;p&gt;Ladies and gentlemen, meet our main characters: the browsers! These digital superheroes are here to save the day, making sure you can access all the cat videos and hilarious memes your heart desires.&lt;/p&gt;

&lt;p&gt;Some of our favorite browsers include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google Chrome: Faster than a speeding bullet, Chrome's got your back.&lt;/li&gt;
&lt;li&gt;Mozilla Firefox: Fiercely independent and privacy-focused, Firefox is here to fight the good fight.&lt;/li&gt;
&lt;li&gt;Safari: The chic, Apple-exclusive browser that makes you feel like part of an exclusive club.&lt;/li&gt;
&lt;li&gt;Microsoft Edge: The new kid on the block, determined to prove itself after Internet Explorer's... ahem, checkered past.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Superpowers Unleashed 💥
&lt;/h2&gt;

&lt;p&gt;Alright, now that we've met our heroes, let's see them in action! When you type a URL into the address bar and hit enter, that's when the magic happens. Here's what goes down:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;DNS Lookup: Our browser hero reaches out to a Domain Name System (DNS) server, which is like the Internet's phonebook. It translates the URL you typed (such as &lt;a href="http://www.example.com"&gt;www.example.com&lt;/a&gt;) into an IP address (like 192.0.2.1).&lt;/li&gt;
&lt;li&gt;HTTP Request: Armed with the IP address, the browser sends an HTTP request to the web server, basically saying, "Hey, can you give me the stuff I need to display &lt;a href="http://www.example.com?"&gt;www.example.com?&lt;/a&gt;"&lt;/li&gt;
&lt;li&gt;Server Response: The web server, being the polite creature it is, responds with an HTTP status code (like 200 OK) and sends the requested files (HTML, CSS, JavaScript, images, etc.) back to the browser.&lt;/li&gt;
&lt;li&gt;Rendering: Now comes the fun part! The browser takes all those files and turns them into the beautiful webpage you see on your screen. First, it parses the HTML to create the DOM (Document Object Model). Then, it applies the CSS to style the page and runs any JavaScript to make things interactive.&lt;/li&gt;
&lt;li&gt;Painting: Finally, the browser paints the page on your screen, pixel by pixel. Voilà! You're now staring at the fruits of the browser's labor.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Battle of the Plugins 🤖
&lt;/h2&gt;

&lt;p&gt;In this epic saga, our browser heroes often find themselves facing a new kind of foe: the plugins! These little buggers can be both helpful and harmful, depending on their intentions.&lt;/p&gt;

&lt;p&gt;Some plugins, like ad-blockers and password managers, enhance your browsing experience and keep you safe. Others, however, can slow down your browser, cause crashes, or even compromise your security.&lt;/p&gt;

&lt;p&gt;To keep your browser running smoothly, be cautious about the plugins you install, and don't hesitate to uninstall any that seem to be causing problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Curtain Call 🎭
&lt;/h2&gt;

&lt;p&gt;And there you have it, folks! A comical peek behind the curtain at how browsers work. Now, go forth and explore the digital universe with newfound appreciation for your browser heroes!&lt;/p&gt;

&lt;p&gt;Remember, with great browsing power comes great responsibility. Keep your browser up to date, watch out for those pesky plugins, and always clear your cookies after a late-night snack.&lt;/p&gt;

&lt;p&gt;Happy surfing! 🏄‍♀️&lt;/p&gt;

</description>
      <category>web</category>
      <category>browser</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How the Internet Works: A Hilarious Guide for Non-Geeks 🤪</title>
      <dc:creator>Louis Young</dc:creator>
      <pubDate>Wed, 05 Jul 2023 00:02:45 +0000</pubDate>
      <link>https://forem.com/louisryoung/how-the-internet-works-a-hilarious-guide-for-non-geeks-1g81</link>
      <guid>https://forem.com/louisryoung/how-the-internet-works-a-hilarious-guide-for-non-geeks-1g81</guid>
      <description>&lt;p&gt;Hello, fellow humans and internet enthusiasts! Today, we're going to delve into the deep, dark, and absolutely hilarious world of how the internet works. You might think it's all just a bunch of 1s and 0s, but I promise you, it's so much more than that! So, grab your favorite beverage, sit back, and enjoy the ride. 🎢&lt;/p&gt;

&lt;h2&gt;
  
  
  The Birth of the Internet 🍼
&lt;/h2&gt;

&lt;p&gt;Once upon a time, in the dark ages (the 1960s, to be exact), a group of very smart people wanted to connect computers together. They were probably tired of sending messages by carrier pigeons, and decided to level up by creating the internet. 🐦➡️💻&lt;/p&gt;

&lt;p&gt;So, they built something called the ARPANET, which later gave birth to the internet we know and love today. And now, thanks to these pioneers, we can enjoy cat videos, memes, and stalking people on social media. 🐱🌐&lt;/p&gt;

&lt;h2&gt;
  
  
  The Magical World of Protocols ✨
&lt;/h2&gt;

&lt;p&gt;In order for computers to talk to each other, they need a common language. That's where protocols come in! The two most important protocols are:&lt;/p&gt;

&lt;p&gt;IP: The Internet Protocol, which is like the postal service of the internet. It helps deliver your data packets to the right address.&lt;br&gt;
TCP: The Transmission Control Protocol, which makes sure the data packets arrive in order and without errors, just like a control-freak older sibling. 📦🧐&lt;br&gt;
Put them together, and you get TCP/IP! No, it's not a cool band name; it's the backbone of the internet! 🤘&lt;/p&gt;

&lt;h2&gt;
  
  
  The World Wide Web and Its Spiders 🕸️
&lt;/h2&gt;

&lt;p&gt;You might think the internet and the World Wide Web are the same thing, but they're not! The internet is the network, and the World Wide Web is a service that runs on it. It's like how Netflix runs on your internet, but with fewer shows and more cat memes. 🍿🐈&lt;/p&gt;

&lt;p&gt;The web is made up of websites (duh!), which are basically a bunch of files stored on computers called servers. When you type a URL into your browser, it's like telling a spider (your browser) to fetch those files from the server and display them on your screen. 🕷️🖥️&lt;/p&gt;

&lt;h2&gt;
  
  
  The DNS, or the Internet's Phonebook 📖
&lt;/h2&gt;

&lt;p&gt;When you want to visit a website, you usually type its domain name (e.g., dev.to). But computers don't understand human-friendly names; they need IP addresses. That's where the Domain Name System (DNS) comes in!&lt;/p&gt;

&lt;p&gt;The DNS is like a huge phonebook that translates domain names into IP addresses. So, when you type in dev.to, the DNS tells your browser, "Hey, dev.to lives at 123.456.789.0!" And off your browser goes to fetch the website files. 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  The Internet's Busy Bees: Routers and Switches 🐝
&lt;/h2&gt;

&lt;p&gt;Now that we know how data travels, let's talk about the busy bees of the internet: routers and switches. They help guide your data packets through the maze of the internet to reach their destination.&lt;/p&gt;

&lt;p&gt;Routers are like the traffic cops of the internet, directing data packets based on their IP addresses. Switches, on the other hand, are like the air traffic controllers of the internet, managing the connections between devices on a local network. Together, they make sure your data packets don't get lost in the chaos. 🚦✈️&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The Internet - A Comedy of Errors and Triumphs 🎭&lt;br&gt;
So, there you have it! The internet is a beautiful, chaotic, and hilarious system of networks, protocols, and cat memes that keeps us all connected. And though it may seem complex, just remember that at its core, the internet is really just a bunch of computers talking to each other.&lt;/p&gt;

&lt;p&gt;Now that you know how the internet works, go forth and spread the knowledge (and the memes) to the masses! 🌐🎉&lt;/p&gt;

</description>
      <category>internet</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
