<?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: Shamim Bin Nur</title>
    <description>The latest articles on Forem by Shamim Bin Nur (@shamimbinnur).</description>
    <link>https://forem.com/shamimbinnur</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%2F930224%2F2a996258-b54b-4e39-8155-0c14f22eed32.jpeg</url>
      <title>Forem: Shamim Bin Nur</title>
      <link>https://forem.com/shamimbinnur</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/shamimbinnur"/>
    <language>en</language>
    <item>
      <title>Escaping the Uncanny Valley: Understanding CSR, SSR, Hydration, and Modern Web Rendering</title>
      <dc:creator>Shamim Bin Nur</dc:creator>
      <pubDate>Sat, 08 Feb 2025 16:30:18 +0000</pubDate>
      <link>https://forem.com/shamimbinnur/escaping-the-uncanny-valley-understanding-csr-ssr-hydration-and-modern-web-rendering-5465</link>
      <guid>https://forem.com/shamimbinnur/escaping-the-uncanny-valley-understanding-csr-ssr-hydration-and-modern-web-rendering-5465</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Client-Side Rendering&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Client-side rendering refers to generating the content on the client’s browser. Clients receive a minimal, empty HTML without any content inside. Afterward, they receive separate JavaScript files that fuel the entire website to generate the content. On the first render, users may experience a loading state on an unmeaningful page. With client-side rendering, users rely mostly on their browsers, making it impractical to ensure good performance on low-end devices. Since the client receives an empty HTML file without any content on the first request, web crawlers struggle to interpret the page’s content and index it properly for optimized search results.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Server-Side Rendering&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Server-side rendering refers to generating content and HTML elements on the server side and passing them to the client side. Clients get an immediate experience of meaningful content without any loading period. Since users don’t have to rely heavily on their browsers, they experience smooth performance even on low-spec devices. Server-side rendering not only enhances user experience but also boosts SEO optimizations. It simplifies the process for crawlers to scan the content and index it for optimized search results.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Client-Side Rendering (CSR) vs Server-Side Rendering (SSR)&lt;/strong&gt;
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Client-Side Rendering (CSR)&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Server-Side Rendering (SSR)&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Receives empty HTML without content on the first request&lt;/td&gt;
&lt;td&gt;Receives meaningful content on the first request&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Content is generated on the client’s browser&lt;/td&gt;
&lt;td&gt;Content is generated on the server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Users experience a loading state&lt;/td&gt;
&lt;td&gt;Users don’t experience a loading state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bad for SEO, as web crawlers receive blank HTML initially&lt;/td&gt;
&lt;td&gt;Good for SEO, as crawlers receive meaningful content initially&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance can drop on low-end devices&lt;/td&gt;
&lt;td&gt;Optimal performance on both high-end and low-end devices&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Hydration on Server-Side Rendering (SSR)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In server-side rendering, hydration refers to a process quite different from its meaning in real-world scenarios. Typically, hydration means adding water to something. However, in server-side rendering, it means attaching JavaScript to the HTML that the server passes to the client side.&lt;/p&gt;

&lt;p&gt;On the first request, the server sends an HTML file with meaningful content. To make the page interactive, it requires JavaScript. After a while, the server sends the necessary JavaScript files to the client. The client uses these files to bind all required event handlers to the DOM elements (HTML elements), making them interactive.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Uncanny Valley&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Partial hydration is a technique to avoid the uncanny valley situation and accelerate initial interactivity. Instead of loading the entire JavaScript at once, only the essential JavaScript for specific portions of the page is loaded first, based on priority. This reduces the JavaScript loading time. For example, in a blog post where the comment section needs to be interactive first, the necessary JavaScript file for the comment section loads first, while the rest loads later, based on priority. Popular web frameworks like Next.js and Astro leverage partial hydration to boost website performance.&lt;/p&gt;

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

&lt;p&gt;Choosing between client-side rendering (CSR) and server-side rendering (SSR) depends on your application's needs. Server-side rendering (SSR) ensures faster load times, better SEO, and smoother performance on low-end devices, while client-side rendering (CSR) offers flexibility for dynamic interactions. Hydration on the server side makes pages interactive by attaching JavaScript, and partial hydration further boosts performance by loading only essential scripts first. Frameworks like Next.js and Astro simplify these processes for developers.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>ssr</category>
      <category>hydrations</category>
    </item>
    <item>
      <title>Understanding Semantic HTML: The Backbone of Meaningful Web Development</title>
      <dc:creator>Shamim Bin Nur</dc:creator>
      <pubDate>Sat, 26 Oct 2024 15:25:23 +0000</pubDate>
      <link>https://forem.com/shamimbinnur/understanding-semantic-html-the-backbone-of-meaningful-web-development-4j1b</link>
      <guid>https://forem.com/shamimbinnur/understanding-semantic-html-the-backbone-of-meaningful-web-development-4j1b</guid>
      <description>&lt;p&gt;In web development, the term "semantic" refers to how code communicates its meaning effectively. Semantic HTML is a practice that goes beyond mere aesthetics, allowing developers, browsers, and search engines to understand the structure and content of a webpage. By using semantic HTML, we can enhance accessibility and improve search engine optimization (SEO), making it an essential practice for any web developer.&lt;/p&gt;

&lt;p&gt;The Importance of Semantic HTML Semantic HTML is crucial for a variety of reasons:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.  Improved SEO:&lt;/strong&gt; Search engines rely on semantic markup to interpret the content and hierarchy of a webpage. This understanding is vital for ranking pages in search results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Accessibility:&lt;/strong&gt; Semantic elements provide context to assistive technologies, such as screen readers, allowing users with disabilities to navigate web content more effectively.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Maintainability:&lt;/strong&gt; Clear and meaningful code is easier for developers to read and maintain over time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Future-Proofing:&lt;/strong&gt; As web standards evolve, using semantic HTML ensures that your content remains relevant and accessible across different platforms and technologies. Key Semantic HTML Elements to Know&lt;/p&gt;

&lt;p&gt;Here are some essential semantic HTML elements that every web developer should incorporate:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Header: The Website's Introduction
&lt;/h2&gt;

&lt;p&gt;The header tag defines the introductory content of a webpage. It often includes the website's logo, navigation links, and essential branding information. Using  helps separate introductory elements from the main content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&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;&amp;lt;header&amp;gt;
    &amp;lt;div class="brand"&amp;gt;
        &amp;lt;h1&amp;gt;My Awesome Blog&amp;lt;/h1&amp;gt;
        &amp;lt;img src="logo.png" alt="My Awesome Blog Logo"&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;nav&amp;gt;
        &amp;lt;ul&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;Contact&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;/ul&amp;gt;
    &amp;lt;/nav&amp;gt;
&amp;lt;/header&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Nav: Navigation Links
&lt;/h2&gt;

&lt;p&gt;The nav tag indicates a section containing navigation links. It’s essential for SEO and usability, allowing search engines to discover other pages on your site while assisting users in navigating your content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&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;&amp;lt;nav&amp;gt;
    &amp;lt;ul&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;Blog&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;Portfolio&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;/ul&amp;gt;
&amp;lt;/nav&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Main: Primary Content Area
&lt;/h2&gt;

&lt;p&gt;The main tag wraps the main content of a webpage, helping search engines and users understand the primary focus of the page.&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;main&amp;gt;
    &amp;lt;h2&amp;gt;Welcome to My Blog&amp;lt;/h2&amp;gt;
    &amp;lt;p&amp;gt;This blog shares insights on web development, technology trends, and best practices.&amp;lt;/p&amp;gt;
&amp;lt;/main&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Section: Thematic Grouping of Content
&lt;/h2&gt;

&lt;p&gt;The section tag is used to group related content together, improving both organization and readability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&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;&amp;lt;section&amp;gt;
    &amp;lt;h3&amp;gt;Latest Articles&amp;lt;/h3&amp;gt;
    &amp;lt;p&amp;gt;Check out our latest posts on web development and design.&amp;lt;/p&amp;gt;
&amp;lt;/section&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;5. Article:&lt;/strong&gt; Independent Content
&lt;/h2&gt;

&lt;p&gt;The article tag defines independent content that could stand alone, such as blog posts or news articles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&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;&amp;lt;article&amp;gt;
    &amp;lt;h2&amp;gt;5 Essential Tips for Semantic HTML&amp;lt;/h2&amp;gt;
    &amp;lt;p&amp;gt;Understanding and implementing semantic HTML is vital for SEO and accessibility.&amp;lt;/p&amp;gt;
&amp;lt;/article&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Aside: Related Content
&lt;/h2&gt;

&lt;p&gt;The aside tag is used for content that is tangentially related to the main content, such as sidebars, call-outs, or additional information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&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;&amp;lt;aside&amp;gt;
    &amp;lt;h4&amp;gt;Did You Know?&amp;lt;/h4&amp;gt;
    &amp;lt;p&amp;gt;Using semantic HTML can boost your site's search engine rankings.&amp;lt;/p&amp;gt;
&amp;lt;/aside&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Footer: Closing Section
&lt;/h2&gt;

&lt;p&gt;The footer tag represents the bottom section of a webpage, often containing copyright information, links to other pages, and contact details.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&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;&amp;lt;footer&amp;gt;
    &amp;lt;p&amp;gt;&amp;amp;copy; 2024 My Awesome Blog. All rights reserved.&amp;lt;/p&amp;gt;
&amp;lt;/footer&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Additional Semantic Elements&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Figure and Figcaption: Used for representing visual content and its caption.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Example:&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;&amp;lt;figure&amp;gt;
    &amp;lt;img src="image.jpg" alt="Image description"&amp;gt;
    &amp;lt;figcaption&amp;gt;A beautiful sunset.&amp;lt;/figcaption&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. **Details and Summary: For creating collapsible content sections.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Example:&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;&amp;lt;details&amp;gt;
    &amp;lt;summary&amp;gt;More information&amp;lt;/summary&amp;gt;
    &amp;lt;p&amp;gt;Here’s additional information about the topic.&amp;lt;/p&amp;gt;
&amp;lt;/details&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Mark: To highlight important text.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Example:&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;&amp;lt;p&amp;gt;Shamim is proficient in &amp;lt;mark&amp;gt;Web Design&amp;lt;/mark&amp;gt; and &amp;lt;mark&amp;gt;Web Development&amp;lt;/mark&amp;gt;.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Time: To represent dates, times, or durations.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Example:&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;&amp;lt;p&amp;gt;The shop is open from &amp;lt;time&amp;gt;09:00&amp;lt;/time&amp;gt; to &amp;lt;time&amp;gt;18:00&amp;lt;/time&amp;gt; every weekday.
&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Common Mistakes to Avoid
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Overusing div and span tags:&lt;/strong&gt; While these tags are essential, relying on them for layout instead of using semantic tags can lead to poor SEO and accessibility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Neglecting Accessibility:&lt;/strong&gt; Always include relevant attributes (like alt text for images) and ensure that the semantic elements you use are navigable by assistive technologies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Inconsistent Use:&lt;/strong&gt; Be consistent in your use of semantic elements across your website. This helps maintain clarity and improves your site's overall structure.&lt;br&gt;
Best Practices for Implementing Semantic HTML&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Plan Your Structure:&lt;/strong&gt; Before coding, outline the structure of your content to determine which semantic elements are most appropriate.&lt;br&gt;
&lt;strong&gt;5. Use Descriptive Element Names:&lt;/strong&gt; Opt for meaningful names that reflect the content they contain, making it easier for both users and search engines to understand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Test with Accessibility Tools:&lt;/strong&gt; Use tools like WAVE or Lighthouse to check for accessibility issues and ensure your semantic HTML is helping, not hindering user experience.&lt;/p&gt;

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

&lt;p&gt;Incorporating semantic HTML into your web development projects is essential for creating user-friendly, accessible, and SEO-optimized websites. By using meaningful elements, you enhance both the experience for your users and the visibility of your content in search engines. Remember, semantic HTML is not just a trend; it's a foundational practice that can significantly impact your web projects.&lt;/p&gt;

</description>
      <category>semantichtml</category>
      <category>seobestpractices</category>
      <category>webdev</category>
      <category>webaccessibility</category>
    </item>
    <item>
      <title>Build your own Promise-Based HTTP Client like axios/fetch : Ohey</title>
      <dc:creator>Shamim Bin Nur</dc:creator>
      <pubDate>Tue, 11 Jun 2024 19:41:57 +0000</pubDate>
      <link>https://forem.com/shamimbinnur/building-ohey-a-promise-based-http-client-like-axiosfetch-4c96</link>
      <guid>https://forem.com/shamimbinnur/building-ohey-a-promise-based-http-client-like-axiosfetch-4c96</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Today, I'm excited to share the journey of creating my very own npm package: &lt;strong&gt;Ohey&lt;/strong&gt;. Ohey is a promise-based HTTP client built on top of &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest" rel="noopener noreferrer"&gt;&lt;code&gt;XMLHttpRequest&lt;/code&gt;&lt;/a&gt;. Whether you're new to web development or an experienced coder, understanding how Ohey works will give you insights into building and using HTTP clients in JavaScript. Let's dive into the details of how I built this &lt;a href="https://www.npmjs.com/package/ohey" rel="noopener noreferrer"&gt;package&lt;/a&gt;!&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Ohey?
&lt;/h3&gt;

&lt;p&gt;With numerous HTTP clients like &lt;a href="https://axios-http.com/docs/intro" rel="noopener noreferrer"&gt;Axios&lt;/a&gt; and &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API" rel="noopener noreferrer"&gt;Fetch&lt;/a&gt;, you might wonder why I decided to create Ohey. The primary motivation was to learn more about HTTP requests and &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" rel="noopener noreferrer"&gt;promises&lt;/a&gt; by building something from scratch.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting Up the Project
&lt;/h3&gt;

&lt;p&gt;First, I set up a new npm project. You might already know &lt;a href="https://docs.npmjs.com/about-npm" rel="noopener noreferrer"&gt;npm&lt;/a&gt;, it’s a package manager for JavaScript that allows you to manage your project's dependencies. Here’s how you can set up a new npm project&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open your terminal and create a new directory for your project:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;ohey
&lt;span class="nb"&gt;cd &lt;/span&gt;ohey
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initialize a new npm project:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm init &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This creates a &lt;code&gt;package.json&lt;/code&gt; file, which holds the metadata for your project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Writing the Ohey Function
&lt;/h3&gt;

&lt;p&gt;The core functionality of Ohey lies in the single &lt;code&gt;ohey&lt;/code&gt; function. This function takes an endpoint and an options object and returns a &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" rel="noopener noreferrer"&gt;promise&lt;/a&gt; that resolves or rejects based on the outcome of the HTTP request. Here’s the complete code for Ohey:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ohey&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;endpoint&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;method&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;GET&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;baseUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;timeout&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;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;headers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;application/json&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="o"&gt;=&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="c1"&gt;// Concatenate the baseURL and endpoint&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;}${&lt;/span&gt;&lt;span class="nx"&gt;endpoint&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Define a promise and return it.&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reject&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;xhr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;XMLHttpRequest&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="nx"&gt;timeout&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;setTimeout&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;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abort&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="nf"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Request timed out&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="nx"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="c1"&gt;// Initialize an HTTP request&lt;/span&gt;
    &lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;method&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="c1"&gt;// Etarate through header, extract keys and value.&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setRequestHeader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onload&lt;/span&gt; &lt;span class="o"&gt;=&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;responseType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="nx"&gt;responseType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;JSON&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
          &lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;responseText&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nx"&gt;responseType&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;responseCode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;xhr&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="nx"&gt;method&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;responseText&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;responseType&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;responseCode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;xhr&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="nx"&gt;method&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="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Request failed with status: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;xhr&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="s2"&gt;`&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="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onerror&lt;/span&gt; &lt;span class="o"&gt;=&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="nf"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Network error&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="c1"&gt;// Send the request with the body parameter&lt;/span&gt;
    &lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;body&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="c1"&gt;// Export the function as a module&lt;/span&gt;
&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ohey&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Breaking Down the Code
&lt;/h3&gt;

&lt;p&gt;Let's dive deeper into each part of the &lt;code&gt;ohey&lt;/code&gt; function to understand how it works.&lt;/p&gt;

&lt;h3&gt;
  
  
  Function Declaration and Default Parameters
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;ohey&lt;/code&gt; function is declared with two main parameters: &lt;code&gt;endpoint&lt;/code&gt; and an options object with several default values.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ohey&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;endpoint&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;method&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;GET&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;baseUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;timeout&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;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;headers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;application/json&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="o"&gt;=&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;ul&gt;
&lt;li&gt;
&lt;strong&gt;endpoint&lt;/strong&gt;: The specific API endpoint you want to hit (e.g., "/users").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;method&lt;/strong&gt;: The HTTP method to use (default is "GET").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;baseUrl&lt;/strong&gt;: The base URL for the request (e.g., "&lt;a href="https://api.example.com%22" rel="noopener noreferrer"&gt;https://api.example.com"&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;timeout&lt;/strong&gt;: The request timeout duration in milliseconds (default is 0, meaning no timeout).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;body&lt;/strong&gt;: The request payload, used primarily for POST, PUT, and PATCH requests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;headers&lt;/strong&gt;: An object representing the request headers (default includes "Content-Type: application/json").&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Constructing the URL
&lt;/h3&gt;

&lt;p&gt;The full URL for the request is constructed by concatenating the &lt;code&gt;baseUrl&lt;/code&gt; and the &lt;code&gt;endpoint&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;}${&lt;/span&gt;&lt;span class="nx"&gt;endpoint&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Returning a Promise
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;ohey&lt;/code&gt; function returns a Promise, which allows asynchronous operations to be handled more gracefully.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reject&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Creating the XMLHttpRequest Object
&lt;/h3&gt;

&lt;p&gt;An instance of &lt;code&gt;XMLHttpRequest&lt;/code&gt; is created to handle the HTTP request.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;xhr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;XMLHttpRequest&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Handling Timeout
&lt;/h3&gt;

&lt;p&gt;If a timeout value is specified, a timer is set to abort the request if it exceeds the given duration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;timeout&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;setTimeout&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;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abort&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nf"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Request timed out&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="nx"&gt;timeout&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;ul&gt;
&lt;li&gt;
&lt;strong&gt;xhr.abort()&lt;/strong&gt;: Cancels the request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;reject&lt;/strong&gt;: The promise is rejected with a "Request timed out" error.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Configuring the XMLHttpRequest
&lt;/h3&gt;

&lt;p&gt;The HTTP method and URL are set using &lt;code&gt;xhr.open&lt;/code&gt;. The &lt;code&gt;true&lt;/code&gt; parameter indicates that the request is &lt;a href="https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous/Introducing" rel="noopener noreferrer"&gt;asynchronous&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;method&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Setting Request Headers
&lt;/h3&gt;

&lt;p&gt;Custom headers are added to the request using a &lt;code&gt;for...of&lt;/code&gt; loop to iterate over the &lt;code&gt;headers&lt;/code&gt; object, extract the keys and values, and set them on the request header.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setRequestHeader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&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;h3&gt;
  
  
  Handling the Response
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;onload&lt;/code&gt; event is triggered when the request completes successfully. It checks the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status" rel="noopener noreferrer"&gt;HTTP status code&lt;/a&gt; to determine if the request was successful. Any response code 200 to 299 typically means the request has hit the server successfully.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onload&lt;/span&gt; &lt;span class="o"&gt;=&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;responseType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;responseType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;JSON&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;responseText&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nx"&gt;responseType&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;responseCode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;xhr&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="nx"&gt;method&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;responseText&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;responseType&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;responseCode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;xhr&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="nx"&gt;method&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="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Request failed with status: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;xhr&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="s2"&gt;`&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;ul&gt;
&lt;li&gt;
&lt;strong&gt;xhr.status&lt;/strong&gt;: The HTTP status code of the response.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;resolve&lt;/strong&gt;: If the request is successful, the promise is resolved with the response data.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;responseType&lt;/strong&gt;: Indicates whether the response is JSON or plain text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;responseCode&lt;/strong&gt;: The HTTP status code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;method&lt;/strong&gt;: The HTTP method used for the request.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;JSON.parse&lt;/strong&gt;: Attempts to parse the response as JSON. If parsing fails, the response is returned as plain text.&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Handling Network Errors
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;onerror&lt;/code&gt; event is triggered if there is a network error. The promise is rejected with a "Network error" message.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onerror&lt;/span&gt; &lt;span class="o"&gt;=&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="nf"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Network error&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;h3&gt;
  
  
  Sending the Request
&lt;/h3&gt;

&lt;p&gt;Finally, the request is sent using &lt;code&gt;xhr.send&lt;/code&gt;, with the &lt;code&gt;body&lt;/code&gt; parameter included for methods like POST.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;xhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;body&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;h3&gt;
  
  
  Exporting the Function
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;ohey&lt;/code&gt; function is exported so it can be used in other modules.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ohey&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Publishing the Package
&lt;/h3&gt;

&lt;p&gt;To share Ohey with the world, I published it to the npm registry. Here's how you can publish your own package by following these two steps.:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Login to npm&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm login
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Publish the Package&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm publish
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Note: Make sure there’s no other package available with the same name on the NPM registry.&lt;/p&gt;

&lt;p&gt;And that’s it! Your package is now available on npm for others to install and use.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Understanding the code behind Ohey may give you a basic foundation for working with HTTP requests in JavaScript. By building &lt;a href="https://www.npmjs.com/package/ohey" rel="noopener noreferrer"&gt;this package&lt;/a&gt;, I aimed to create a simple yet functional HTTP client that leverages the flexibility of promises. I hope this breakdown helps you appreciate the inner workings of Ohey and inspires you to create your own projects! Happy coding!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>npm</category>
      <category>promise</category>
    </item>
    <item>
      <title>Boost Your Developer Productivity with the Pomodoro Technique</title>
      <dc:creator>Shamim Bin Nur</dc:creator>
      <pubDate>Sat, 08 Jun 2024 19:12:57 +0000</pubDate>
      <link>https://forem.com/shamimbinnur/boost-your-developer-productivity-with-the-pomodoro-technique-1dh7</link>
      <guid>https://forem.com/shamimbinnur/boost-your-developer-productivity-with-the-pomodoro-technique-1dh7</guid>
      <description>&lt;p&gt;Hey there, developers! In our fast-paced world, managing time efficiently is crucial for keeping productivity high and avoiding burnout. One awesome method to achieve this is the Pomodoro Technique. This time management strategy breaks work into focused intervals, usually 25 minutes long, separated by short breaks. Developed by Francesco Cirillo in the late 1980s, this technique is perfect for developers who need to balance deep focus with regular mental breaks. Let's dive into how you can use the Pomodoro Technique to boost your productivity and improve your work-life balance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the Pomodoro Technique Works for Developers
&lt;/h2&gt;

&lt;p&gt;The Pomodoro Technique is a great fit for the cognitive demands of software development. Here’s why it rocks:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Enhanced Focus:&lt;/strong&gt; Working in short, intense bursts helps maintain concentration and reduces the temptation to multitask.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Reduced Burnout:&lt;/strong&gt; Regular breaks prevent mental fatigue, ensuring sustained daily productivity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Better Time Estimation:&lt;/strong&gt; By tracking the number of pomodoros required for tasks, you can improve your ability to estimate project timelines.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Distraction Management:&lt;/strong&gt; The technique encourages dealing with distractions during breaks, allowing uninterrupted work sessions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementing the Pomodoro Technique
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step-by-Step Guide
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Select a Task:&lt;/strong&gt; Pick a specific development task, like writing a feature, fixing a bug, or reviewing code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Set the Timer:&lt;/strong&gt; Set a timer for 25 minutes. Many developers find physical timers or simple timer apps useful for minimizing distractions. For an online Pomodoro timer, I like &lt;a href="https://zoneout.me/pomo"&gt;https://zoneout.me/pomo&lt;/a&gt; because it’s super user-friendly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Work Intensely:&lt;/strong&gt; Focus solely on the task at hand. Avoid checking emails, messages, or any other interruptions. If you’re using ZoneOut and have a secondary screen, make the timer full-screen to stay aware of time without other distractions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Take a Short Break:&lt;/strong&gt; When the timer rings, take a 5-minute break. Step away from your computer, stretch, or grab a coffee.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Repeat:&lt;/strong&gt; After the short break, start another Pomodoro. After completing four Pomodoros, take a longer break of 15-30 minutes to recharge.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tips for Developers
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Group Smaller Tasks:&lt;/strong&gt; Combine smaller tasks, like responding to emails or writing documentation, into a single Pomodoro session to maintain flow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Plan Pomodoros in Advance:&lt;/strong&gt; At the start of your day, outline the tasks you aim to complete and allocate Pomodoros accordingly. This helps prioritize and manage time effectively.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Use Tools:&lt;/strong&gt; Utilize Pomodoro-specific apps like ZoneOut or Focus Booster that integrate with task management tools like Jira or Trello, providing seamless tracking and reporting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Customize Intervals:&lt;/strong&gt; While 25 minutes is the traditional length, adjust the duration based on your task and concentration levels. Some developers prefer longer intervals for deep work sessions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Physical Activity During Breaks:&lt;/strong&gt; Engage in physical activities like walking, stretching, or quick exercises during breaks to rejuvenate your mind and body.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overcoming Common Challenges
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Interruptions
&lt;/h3&gt;

&lt;p&gt;If an interruption occurs during a Pomodoro, pause the timer, address the interruption, and then resume. Frequent interruptions should be noted and managed during breaks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Maintaining Consistency
&lt;/h3&gt;

&lt;p&gt;Consistency is key. It may be challenging at first, but with practice, the technique can become a natural part of your workflow. Track your progress and adjust the technique to better suit your working style.&lt;/p&gt;

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

&lt;p&gt;The Pomodoro Technique is a powerful tool for developers, offering a structured approach to managing time and tasks. By breaking work into focused intervals and incorporating regular breaks, you can enhance productivity, maintain high-quality output, and avoid burnout. But don’t think it’s just for developers—this technique works wonders for anyone looking to improve their focus and productivity. Start small, adapt the technique to your needs, and watch as your productivity soars.&lt;/p&gt;

&lt;p&gt;For further reading and detailed guides on the Pomodoro Technique, check out these resources:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Pomodoro_Technique"&gt;https://en.wikipedia.org/wiki/Pomodoro_Technique&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://zoneout.me/pomo?section=what_is_pomodoro"&gt;https://zoneout.me/pomo?section=what_is_pomodoro&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://thequietworkplace.com/blog/pomodoro-technique"&gt;https://thequietworkplace.com/blog/pomodoro-technique&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://thesmallsuccess.com/pomodoro-technique/#google_vignette"&gt;https://thesmallsuccess.com/pomodoro-technique/#google_vignette&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.mometrix.com/blog/pomodoro-technique"&gt;https://www.mometrix.com/blog/pomodoro-technique&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Implement the Pomodoro Technique today and take the first step towards more focused, efficient, and enjoyable coding sessions. Happy coding!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>pomodoro</category>
      <category>workplace</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
