<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ridwan Adebosin on Medium]]></title>
        <description><![CDATA[Stories by Ridwan Adebosin on Medium]]></description>
        <link>https://medium.com/@adebosinadewale_62859?source=rss-cf10029af968------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UK-GszkZ9_6YFtZ0XwLG7w.jpeg</url>
            <title>Stories by Ridwan Adebosin on Medium</title>
            <link>https://medium.com/@adebosinadewale_62859?source=rss-cf10029af968------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 11:57:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adebosinadewale_62859/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Last Days of the Outreachy Contribution Stage ]]></title>
            <link>https://medium.com/@adebosinadewale_62859/last-days-of-the-outreachy-contribution-stage-89e5552caee3?source=rss-cf10029af968------2</link>
            <guid isPermaLink="false">https://medium.com/p/89e5552caee3</guid>
            <category><![CDATA[outreachy]]></category>
            <category><![CDATA[ocaml]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Ridwan Adebosin]]></dc:creator>
            <pubDate>Sun, 08 Nov 2026 10:42:18 GMT</pubDate>
            <atom:updated>2026-11-08T10:42:18.284Z</atom:updated>
            <content:encoded><![CDATA[<p>Getting into the Outreachy contribution stage isn’t necessarily the hardest part. The real challenge, at least for me, is the one-month contribution period. This is where you move beyond reading the project description and actually demonstrate that you can understand the codebase, investigate problems, and make meaningful contributions.</p><p>I had contributed to the OCaml community before, but when it was time to choose a project for this Outreachy round, I still chose OCaml. After reading the project description, I was fascinated by what <strong>ocaml-tiff</strong> could do and the potential I saw in it.</p><p>The possibility of working with image formats and geospatial data was particularly interesting to me. I could see how this technology could contribute to areas such as environmental research, where satellite and aerial imagery can be analysed to study climate change, deforestation, and other environmental changes.</p><h3>Was it difficult to identify issues worth raising?</h3><p>Yes, it was.</p><p>One of the things that made this contribution period challenging was the AI policy outlined in the project’s CONTRIBUTION.md. AI-generated code would not be accepted for merging, which meant I couldn&#39;t rely on AI to generate solutions or do the implementation work for me. I had to independently investigate the codebase, understand the underlying technology, identify potential problems, and work out how to solve them.</p><p>As a software engineer, I believe one important skill is knowing where to look when you don’t have all the answers. Rather than waiting for issues to be assigned or randomly exploring files in the repository, I started looking for technical documentation and reference materials that could help me understand the technology behind the project.</p><p>I found four resources that became particularly useful during my investigation.</p><h3>1. <a href="https://download.osgeo.org/libtiff/doc/TIFF6.pdf">TIFF 6.0 Specification — Adobe (1992)</a></h3><p>This was where I started.</p><p>I needed to understand how TIFF files were structured before I could confidently investigate how ocaml-tiff handled them.</p><p>The specification introduced me to important concepts, including:</p><ul><li>TIFF headers and byte ordering (little-endian and big-endian).</li><li>Image File Directories (IFDs).</li><li>TIFF tags and their data types.</li><li>SamplesPerPixel and BitsPerSample.</li><li>SampleFormat and PlanarConfiguration.</li><li>Compression methods.</li><li>Strips and tiles.</li><li>Multiple images stored in a single TIFF file.</li></ul><p>Understanding these concepts helped me connect what I was reading in the specification to what I was seeing in the OCaml implementation.</p><p>For example, one of the issues I investigated involved plane indexing. Understanding the relationship between PlanarConfiguration and SamplesPerPixel helped me reason about how image samples were organised and why the indexing behaviour mattered.</p><p>This was a good reminder that sometimes the problem isn’t immediately obvious from the code. You need to understand the format and the rules governing it first.</p><h3>2. <a href="https://libtiff.gitlab.io/libtiff/specification/coverage.html">LibTIFF Coverage of the TIFF 6.0 Specification</a></h3><p>This was probably one of the most useful resources I discovered.</p><p>The TIFF specification explained what the format expected, but I also wanted to understand how an established implementation handled those requirements.</p><p>LibTIFF’s documentation provides a detailed breakdown of the TIFF 6.0 features it supports. I used it as a reference when investigating the capabilities of ocaml-tiff.</p><p>Some of the areas I paid attention to included:</p><ul><li>Little-endian and big-endian byte ordering.</li><li>Chunky and planar configurations.</li><li>Multiple samples per pixel.</li><li>Tiled images</li><li>Different compression methods.</li><li>Supported TIFF tags.</li></ul><p>This gave me a practical checklist for exploring the implementation.</p><p>I could investigate a particular feature, understand how LibTIFF handled it, and then compare that with what I found in ocaml-tiff.</p><p>It helped me move away from simply reading code to asking more meaningful questions about implementation behaviour and potential gaps.</p><h3>3. <a href="https://www.ogc.org/standards/geotiff/">OGC GeoTIFF 1.1 Standard and Conformance Tests</a></h3><p>Since ocaml-tiff is part of the GeoOCaml ecosystem, I also explored the Open Geospatial Consortium (OGC) GeoTIFF standard.</p><p>This resource was particularly relevant because GeoTIFF extends the TIFF format with metadata that allows imagery to be associated with geographic locations.</p><p>The standard also includes an Abstract Test Suite, which provides requirements for checking whether implementations conform to the specification.</p><p>It helped me understand the importance of testing:</p><ul><li>TIFF core requirements.</li><li>Byte ordering and data types.</li><li>TIFF tags.</li><li>GeoTIFF-specific metadata.</li><li>Reader and writer conformance.</li></ul><p>I also came across reference tools such as tiffdump, which can help inspect TIFF files and understand their underlying structure.</p><p>This broadened my understanding of the project beyond just reading and writing image files. I began to appreciate the importance of ensuring that geospatial metadata and image data were handled correctly.</p><h3>4. <a href="https://libtiff.gitlab.io/libtiff/images.html">LibTIFF Test Images and Reference Materials</a></h3><p>Documentation tells you what an implementation should do, but real-world test files help you investigate whether it actually does it.</p><p>I explored LibTIFF’s test-image resources to understand how different TIFF features were represented in actual files.</p><p>These images were useful because I didn’t want to rely exclusively on files generated by my own implementation. Having external reference files provided another way to investigate different TIFF configurations and compare expected behaviour with what ocaml-tiff produced or interpreted.</p><p>I could also use tools such as tiffdump to inspect the files and understand the metadata and structure behind them.</p><h3>What did these resources change for me?</h3><p>They changed the way I approached the contribution process.</p><p>Instead of looking at the repository and asking, <em>“What issue can I fix?”</em>, I started asking more specific questions:</p><ul><li>Does the implementation correctly handle the TIFF features defined in the specification?</li><li>Are there differences between how ocaml-tiff and LibTIFF handle particular configurations?</li><li>Are the existing tests covering different sample formats and image layouts?</li><li>Can I reproduce unexpected behaviour using reference TIFF files?</li><li>Are there edge cases that the current implementation does not account for?</li></ul><p>These questions gave me a more structured way to investigate the codebase, understand existing behaviour, identify potential gaps, and turn my findings into actionable contributions.</p><p>I eventually moved from simply reading OCaml code to investigating the TIFF specification, comparing implementations, reproducing behaviour, writing tests, and raising PRs.</p><p>One thing this experience taught me is that contributing to open source isn’t just about finding an issue on GitHub and fixing it. Sometimes, you have to go outside the repository, read technical specifications, study established implementations, and understand the technology before you can recognise what might be missing.</p><p><strong>You don’t always find meaningful issues by looking at the code alone. Sometimes, you need to understand the technology behind the code before you can recognise what’s missing.<br>🐫🐫🐫</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89e5552caee3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Feeling Like a Fraud as a Developer in the Age of AI]]></title>
            <link>https://medium.com/@adebosinadewale_62859/feeling-like-a-fraud-as-a-developer-in-the-age-of-ai-487439db0a75?source=rss-cf10029af968------2</link>
            <guid isPermaLink="false">https://medium.com/p/487439db0a75</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[careers]]></category>
            <dc:creator><![CDATA[Ridwan Adebosin]]></dc:creator>
            <pubDate>Thu, 12 Feb 2026 20:08:52 GMT</pubDate>
            <atom:updated>2026-02-12T20:08:52.517Z</atom:updated>
            <content:encoded><![CDATA[<p>Mid last year, I got free access to GitHub Copilot.<br> Whenever I hit a bug, it was right there, sometimes even before I fully understood where the issue was coming from.</p><p>After just 24 hours of using it, I felt like a fraud.</p><p>It was a strange feeling. The code worked, the errors disappeared, but something inside me felt off. It didn’t feel like <em>my</em> win. It felt borrowed. Like I didn’t really know what I was doing.</p><p>The next morning, I uninstalled it.</p><p>From that point on, I went back to grinding, cracking bugs myself, tracing root causes, strengthening my fundamentals, and forcing myself to truly understand the problems in front of me. It was slower, sometimes frustrating, but it felt honest.</p><h3>The Resistance</h3><p>Fast-forward to last month.</p><p>A colleague, Uchechukwu Eze, suggested I use Claude Code to fix an issue at work. It wasn’t a small bug. We were restructuring the entire sidebar navigation which meant rethinking how our app router was architected. This wasn’t the kind of change you casually “auto-complete” your way through.</p><p>I still chose to do it my way. No Claude.<br> Part pride. Part fear. Mostly habit.</p><p>Then a few days later, a friend, Jude Agboola, sent me an article by Addy Osmani about the next two years of software engineering. I read it casually at first, then I read it again, slower this time.</p><p>That article made me pause.<br> It shifted my perspective.</p><h3>The Realization</h3><p>I realized something important:</p><p><strong>The problem wasn’t AI.<br> The problem was how I was using it.</strong></p><p>My initial experience with Copilot wasn’t bad because AI is bad. It felt bad because I had handed over my thinking too quickly. I was using it as a crutch instead of a tool. I expected it to carry me, not collaborate with me.</p><p>So I decided to try again — intentionally this time.</p><p>I started using Claude Code, but with rules:</p><ul><li>I don’t let it take over my thinking.</li><li>I don’t let it write blindly for me.</li><li>I question every suggestion.</li><li>I still debug manually</li><li>I still design architecture myself.</li></ul><p>I use it as a <strong>collaborator</strong>, not a <strong>replacement</strong>.</p><p>And the difference was night and day.</p><h3>Readiness Matters</h3><p>What I’ve come to understand is this: timing matters.</p><p>Last year, I wasn’t ready. My fundamentals weren’t where I wanted them to be. My confidence in my own problem-solving ability was still forming. AI at that stage felt like cheating because it <em>was</em> replacing skills I hadn’t fully built yet.</p><p>This year feels different.<br> Now, AI amplifies me instead of overshadowing me.</p><p>It’s like calculators in math — useless if you don’t understand arithmetic, incredibly powerful once you do.</p><h3>AI Won’t Replace Engineers — But It Will Expose Weaknesses</h3><p>AI is not the enemy.<br>But it is a mirror.</p><p>If your foundations are weak, AI can make you dependent.<br>If your foundations are strong, AI can make you dangerous — in a good way.</p><p>The engineers who will thrive are not the ones who reject AI entirely, nor the ones who blindly rely on it. They are the ones who learn <strong>how to think first</strong>, then learn <strong>how to accelerate that thinking with tools</strong>.</p><h3>The New Skill Isn’t Just Coding — It’s Judgment</h3><p>Knowing <em>when</em> to use AI is becoming as important as knowing <em>how</em> to code</p><ul><li>Use it to explore ideas.</li><li>Use it to refactor.</li><li>Use it to sanity-check.</li><li>Use it to learn faster.</li></ul><p>But don’t outsource your understanding.<br>Don’t let it silence your curiosity.<br>Don’t let it dull your debugging instincts.</p><h3>Embrace It — But On Your Terms</h3><p>AI is here. It isn’t going away. The question is no longer <em>if</em> developers should use it, but <em>how</em>.</p><p>If you embrace it the right way, it won’t make you less of an engineer.<br>It will make you a better one.</p><p>And if you ever feel like a fraud while using it, pause — not to quit, but to ask a better question:</p><p><strong>“Am I using this tool to think less, or to think better?”</strong></p><p>That difference changes everything.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=487439db0a75" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git Commands Explained the Nigerian Way ]]></title>
            <link>https://medium.com/@adebosinadewale_62859/git-commands-explained-the-nigerian-way-56c03665b352?source=rss-cf10029af968------2</link>
            <guid isPermaLink="false">https://medium.com/p/56c03665b352</guid>
            <dc:creator><![CDATA[Ridwan Adebosin]]></dc:creator>
            <pubDate>Fri, 06 Feb 2026 07:05:54 GMT</pubDate>
            <atom:updated>2026-02-06T07:05:54.130Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Because sometimes documentation no reach like street wisdom.</em></p><p><strong>git clone</strong> — <em>Make I copy this repo come my side.</em></p><p><strong>git pull</strong> — <em>Abeg bring the latest gist.</em></p><p><strong>git push</strong> — <em>I don update am, take am back.</em></p><p><strong>git commit</strong> — <em>Oya, lock this change make e no loss.</em></p><p><strong>git status</strong> — <em>Wetin really dey sup here?</em></p><p><strong>git checkout</strong> — <em>Shift make I enter another lane.</em></p><p><strong>git branch new-branch</strong> — <em>Create another line make I try something.</em></p><p><strong>git merge</strong> — <em>Two roads don meet. Make peace reign.</em></p><p><strong>git rebase</strong> — <em>Clean this history abeg, make e look like say I sabi from the start.</em></p><p><strong>git cherry-pick</strong> — <em>Na only this one I want. Leave the rest.</em></p><p><strong>git fetch</strong> — <em>I wan check wetin dey there, I never ready to collect.</em></p><p><strong>git diff</strong> — <em>Show me wetin really change.</em></p><p><strong>git log</strong> — <em>Make I see how we reach here.</em></p><p><strong>git reset</strong> — <em>Ah! This one no sweet. Go back like say e never happen.</em></p><p><strong>git revert</strong> — <em>This thing bad, but no delete am — just counter am.</em></p><p><strong>git stash</strong> — <em>Hold this thing for me first, I go come back.</em></p><p><strong>git tag</strong> — <em>Mark this spot. Na milestone.</em></p><p><strong>git blame</strong> — <em>Who do this thing? 👀</em></p><p><strong>git reflog</strong> — <em>Show me everywhere I don waka reach — even the mistakes wey I undo.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56c03665b352" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Centering a Div to Optimizing for Performance: The Developer’s Journey]]></title>
            <link>https://medium.com/@adebosinadewale_62859/from-centering-a-div-to-optimizing-for-performance-the-developers-journey-659b51f68cbd?source=rss-cf10029af968------2</link>
            <guid isPermaLink="false">https://medium.com/p/659b51f68cbd</guid>
            <dc:creator><![CDATA[Ridwan Adebosin]]></dc:creator>
            <pubDate>Tue, 29 Apr 2025 08:35:48 GMT</pubDate>
            <atom:updated>2025-04-29T08:35:48.390Z</atom:updated>
            <content:encoded><![CDATA[<p>Every developer remembers those early moments of curiosity. Googling <em>“how to center a div”</em>, figuring out how to convert a Figma design into responsive HTML/CSS, or learning to push to GitHub and open your very first Pull Request.</p><p>These small victories stack up over time. But as you grow in your career, those foundational skills become second nature. Eventually, your focus shifts from just “making it work” to <em>making it matter</em>. You begin to ask:<br> <strong>“Is this product good enough for real users?”</strong><br> <strong>“Is it fast, accessible, and ready to scale?”</strong></p><p>That’s where the real journey begins, building for the business and the user.</p><h3>Shifting the Focus: Performance Matters</h3><p>Let’s zoom in on <strong>web performance</strong>, a key aspect of Core Web Vitals. These metrics help determine whether your app delivers a smooth and responsive user experience, things like how fast it loads, how soon it’s interactive, and how visually stable it feels.</p><p>But performance isn’t just about adding a few loading=&quot;lazy&quot; attributes. It starts <strong>even before you write your first line of code, </strong>during the planning phase.</p><h3>Step 1: Plan Your Dependencies Wisely</h3><p>Every dependency you add is a potential performance bottleneck. That’s why during the planning phase of a new project, it’s critical to:</p><ul><li><strong>List essential dependencies</strong> (those required for functionality)</li><li><strong>Separate devDependencies</strong> (tools needed only during development)</li><li><strong>Avoid unnecessary third-party libraries</strong></li></ul><p>Why does this matter? Because every package adds to your bundle size, and larger bundles slow down your app, especially on slower networks or less powerful devices.</p><p>Example: The Cost of Lodash</p><p>Let’s say you want to use the debounce function from Lodash. A common (but costly) way to import it would be:</p><pre>import _ from &quot;lodash&quot;;<br>const debouncedFn = _.debounce(myFunction, 300);</pre><p><strong>What’s wrong with this?</strong><br> It pulls in the <strong>entire Lodash library</strong>, even though you only need one function.</p><h3>A better approach:</h3><pre>import debounce from &quot;lodash/debounce&quot;;</pre><p>Or, even better for modern projects:</p><pre>import debounce from &quot;lodash-es/debounce&quot;;</pre><p>Why lodash-es? It’s the ES module version of Lodash, which enables better <strong>tree-shaking, </strong>your bundler (like Vite or Webpack) can eliminate unused code more efficiently.</p><h3>Alternatives to Lodash</h3><p>If Lodash feels too heavy and you only need a couple of utilities, consider writing your own lightweight version or using native JavaScript:</p><pre>// Simple debounce in vanilla JS<br>function debounce(func, delay) {<br>  let timeout;<br>  return (...args) =&gt; {<br>    clearTimeout(timeout);<br>    timeout = setTimeout(() =&gt; func.apply(this, args), delay);<br>  };<br>}</pre><p>Or explore <strong>micro-libraries</strong> like:</p><ul><li><a href="https://www.npmjs.com/package/just-debounce">just-debounce</a></li><li><a href="https://www.npmjs.com/package/debounce-fn">debounce-fn</a></li></ul><h3>In Summary</h3><p>As developers, our journey evolves from solving syntax problems to solving product problems. Instead of asking, <em>“How do I build this?”</em>, we begin to ask:<br> <strong>“How do I build this efficiently, scalably, and in a way that delights users?”</strong></p><p>Next time you start a project:</p><ul><li>Think before you install.</li><li>Prioritize performance.</li><li>Respect the user’s bandwidth and time.</li></ul><p>Because in the end, it’s not just about building, it’s about building <strong>smart</strong>.</p><p>Here’s an example of a Google Lighthouse performance audit screenshot:</p><figure><img alt="An example of a Google Lighthouse performance audit screenshot" src="https://cdn-images-1.medium.com/max/677/1*r55Z-Id5RTLCNuFzb6k_Pw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=659b51f68cbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Slug vs. ID: The Battle of Readability and Efficiency in Web Development]]></title>
            <link>https://medium.com/@adebosinadewale_62859/slug-vs-id-the-battle-of-readability-and-efficiency-in-web-development-7624ea1b3a4b?source=rss-cf10029af968------2</link>
            <guid isPermaLink="false">https://medium.com/p/7624ea1b3a4b</guid>
            <dc:creator><![CDATA[Ridwan Adebosin]]></dc:creator>
            <pubDate>Sat, 01 Mar 2025 17:01:33 GMT</pubDate>
            <atom:updated>2025-03-01T17:01:33.800Z</atom:updated>
            <content:encoded><![CDATA[<p>A few months ago, I received a message from one of my mentors. He invited me to collaborate on a Next.js project, which was my first time working with Next.js. But since I already had a deep understanding of React, picking it up wasn’t too difficult.<br>While implementing dynamic routing, I noticed that he used both :slug and :id. Curious about the difference, I decided to dive deeper into slugs — and here’s what I discovered.</p><p>Use ID when:<br>✅ You need fast lookups in the database (indexed and unique).<br>✅ The data is not meant to be human-readable (e.g., internal references).<br>✅ You want to avoid duplicate or conflicting slugs.<br>✅ Security is a concern (IDs are harder to guess than slugs, since slug is human-readable).</p><p>Use Slug when:<br>✅ You need SEO-friendly URLs (e.g., /products/apple-iphone-15 instead of /products/123).<br>✅ The URL should be user-friendly and descriptive.<br>✅ You want to use text-based identifiers in API responses.</p><p>Hybrid Approach:<br>Some apps use both:<br>Slug for frontend-friendly URLs (e.g., /blog/how-to-use-react).<br>ID for database lookups (e.g., id: 124, slug: ‘how-to-use-react’).</p><p>Slugs are human-readable which is why it’s of a good use when routing while Ids are just the primary key in the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PEEW8ibKWX-nq1Tz5mRfYQ.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7624ea1b3a4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Enable Dark Mode in React Application using Tailwind CSS: A Simple 5-Step Guide]]></title>
            <link>https://medium.com/@adebosinadewale_62859/how-to-enable-dark-mode-in-tailwind-css-a-simple-5-step-guide-5a2e44122f8a?source=rss-cf10029af968------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a2e44122f8a</guid>
            <dc:creator><![CDATA[Ridwan Adebosin]]></dc:creator>
            <pubDate>Sat, 16 Nov 2024 09:29:43 GMT</pubDate>
            <atom:updated>2024-11-16T09:36:25.310Z</atom:updated>
            <content:encoded><![CDATA[<p>Using dark mode in web applications is becoming increasingly popular, but why is dark mode so appealing?</p><ul><li><strong>Reduces eye strain:</strong> In low-light conditions like late at night or early in the morning, dark mode can help reduce eye strain.</li><li><strong>Improves readability:</strong> It enhances readability for users and contributes to better web accessibility.</li></ul><p>Tailwind CSS includes a dark variant that allows you to style your site differently when dark mode is enabled. This can be implemented in various ways, but in this guide, we will focus on the <strong>toggle class mode</strong>.</p><p>Steps to Enable Dark Mode in Tailwind CSS</p><h3>Step 1: Configure Dark Mode in tailwind.config.js</h3><p>To enable dark mode using the toggle class mode in Tailwind CSS, start by updating your <strong>Tailwind configuration file</strong>. Open tailwind.config.js and add the following configuration:</p><pre>/** @type {import(&#39;tailwindcss&#39;).Config} */<br>export default {<br>  content: [&quot;./index.html&quot;, &quot;./src/**/*.{js,ts,jsx,tsx}&quot;],<br>// configuring the darkmode using class<br>  darkMode: &quot;class&quot;,<br>  theme: {<br>    extend: {},<br>  },<br>  plugins: [],<br>};</pre><h3>Step 2: Import Icons for Toggling Theme Mode</h3><p>Next, import the icons you want to use for toggling between light and dark modes. In this example, we’ll use <strong>IoSunny</strong> for light mode and <strong>IoMoon</strong> for dark mode from the react-icons library.</p><pre>// importing icons from react-icons<br>import { IoMoon, IoSunny } from &quot;react-icons/io5&quot;;</pre><h3>Step 3: Create a State to Handle Dark Mode</h3><p>To manage the theme mode in your React component, create a state using the useState hook. This state will help track whether dark mode is enabled or not.</p><pre>import React, { useState } from &quot;react&quot;;<br><br>// false for light mode, true for dark mode<br>const [theme, setTheme] = useState(false); </pre><h3>Step 4: Implement the Toggling Functionality</h3><p>Now, let’s write the function to toggle dark mode using the state declared above. Since we are using the <strong>class mode</strong> in Tailwind CSS, we need to toggle the dark class on the &lt;body&gt; element in our index.html</p><pre>// toggling functionality<br>const handleThemeMode = () =&gt; {<br>// toggle the theme state<br>  setTheme(!theme);<br>// toggle the &#39;dark&#39; class on the body element<br>  document.body.classList.toggle(&quot;dark&quot;); <br>};</pre><h3>Step 5: Add the Toggling Functionality to the Button and Style It</h3><p>Finally, apply the dark mode toggle function to a button that wraps the icons you imported earlier. Additionally, you can add Tailwind CSS classes to style the button for both light and dark modes. For example, use dark:text-white to change the text color when dark mode is active.</p><pre>&lt;button<br>  className=&quot;dark:text-white lg:px-4 py-2 px-2 mt-8 cursor-pointer hover:rounded-full hover:bg-slate-400 block&quot;<br>  role=&quot;switch&quot;<br>  aria-checked={theme}<br>  aria-label={`Switch to ${theme ? &#39;light&#39; : &#39;dark&#39;} mode`}<br>  onClick={handleThemeMode}<br>&gt;<br>  {theme ? &lt;IoSunny aria-hidden=&quot;true&quot; /&gt; : &lt;IoMoon aria-hidden=&quot;true&quot; /&gt;}<br>&lt;/button&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a2e44122f8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build an Overlay in 3 Easy Steps with the Popover API]]></title>
            <link>https://medium.com/@adebosinadewale_62859/build-an-overlay-in-3-easy-steps-with-the-popover-api-01c491f7fb20?source=rss-cf10029af968------2</link>
            <guid isPermaLink="false">https://medium.com/p/01c491f7fb20</guid>
            <dc:creator><![CDATA[Ridwan Adebosin]]></dc:creator>
            <pubDate>Sun, 11 Aug 2024 12:59:25 GMT</pubDate>
            <atom:updated>2024-08-11T12:59:25.040Z</atom:updated>
            <content:encoded><![CDATA[<h3>The new popover API is here to make your work easier.</h3><p>Popover is a lightweight API that can be used for quick interactions, such as displaying tooltips, additional information, or menus, without disrupting the user’s workflow.</p><p>It’s a new web feature that can be achieved with HTML without adding any JavaScript functions. It gives you the ability to create a layered interfaces above the rest of the page without bringing in z-index.</p><p>Talking about accessibility, this Popover API has a default focus management which makes the next tab stop inside the popover whenever the popover is open and also, you can close the popover by hitting the esc key or using a toggle button and immediately the focus changes from the popover to the main interface.</p><p>To create your popover, follow these steps:</p><ul><li>First, you need to create a button to manage the popover’s state and an element that will serve as the popover’s target.</li></ul><pre>&lt;button&gt;Open Popover&lt;/button&gt;<br>&lt;aside&gt;<br>&lt;p&gt;This is the content the popover button is targeting&lt;/p&gt;<br>&lt;/aside&gt;</pre><ul><li>Secondly, add a popover attribute and a unique id to the element that the popover button will control.</li></ul><pre>&lt;button&gt;Open Popover&lt;/button&gt;<br>&lt;aside id=&quot;my-popover&quot; popover&gt;<br>&lt;p&gt;This is the content the popover button is targeting&lt;/p&gt;<br>&lt;/aside&gt;</pre><ul><li>Finally, link the button that will control the popover’s state by adding the popovertarget attribute to it, using the value of the popover element&#39;s id.</li></ul><pre>&lt;button popovertarget=&quot;my-popover&quot;&gt;Open Popover&lt;/button&gt;<br>&lt;aside id=&quot;my-popover&quot; popover&gt;<br>&lt;p&gt;This is the content the popover button is targeting&lt;/p&gt;<br>&lt;/aside&gt;</pre><p>Initially, the popover attribute is set to an implicit value of auto (i.e., popover=&#39;auto&#39;), which automatically dismisses the popover when you click outside the overlay or press the Esc key. However, if you want more control over the popover&#39;s behavior, you can explicitly set the value to manual (i.e., popover=&#39;manual&#39;). This allows you to create a close button or other mechanisms to manually change the state of the popover.</p><ul><li>To achieve this, add popovertargetaction=&#39;hide&#39; to the close button opening tag.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*tF_-7DUWEej8n-GiaMA3Gg@2x.png" /></figure><pre>&lt;button popovertarget=&quot;my-popover&quot;&gt;Open Popover&lt;/button&gt;<br> &lt;aside id=&quot;my-popover&quot; popover=&quot;manual&quot;&gt;<br>      &lt;p&gt;This is the content the popover button is targeting&lt;/p&gt;<br>      &lt;button popovertarget=&quot;my-popover&quot; popovertargetaction=&quot;hide&quot;&gt;<br>        Close Popover<br>      &lt;/button&gt;<br>    &lt;/aside&gt;</pre><p>I created a stunning UI using the popover API. You can check it out here: <a href="https://popover-cyan.vercel.app/">Live Demo</a>. The code is available in the <a href="https://github.com/RidwanAdebosin/Popover">GitHub Repo</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=01c491f7fb20" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating an Hamburger Menu in React]]></title>
            <link>https://medium.com/@adebosinadewale_62859/creating-an-hamburger-menu-in-react-3670c811db8c?source=rss-cf10029af968------2</link>
            <guid isPermaLink="false">https://medium.com/p/3670c811db8c</guid>
            <dc:creator><![CDATA[Ridwan Adebosin]]></dc:creator>
            <pubDate>Mon, 01 Jul 2024 12:37:05 GMT</pubDate>
            <atom:updated>2024-07-01T12:54:52.962Z</atom:updated>
            <content:encoded><![CDATA[<p>In this tutorial we are going to create a responsive navbar using the hamburger icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*W4jTWMxd7e_94fc3CdykKQ.png" /><figcaption>Hamburger in its false state</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*1YFHJkUM9ILbpZ28-lBjUw.png" /><figcaption>Hamburger in its true state</figcaption></figure><p>To create a responsive navbar layout in CSS, we mostly use the hamburger icon. So let’s start and we are going to follow this highlighted steps below:</p><p>Before we start, I’d advise you to have your navbar created for Desktop view because in this tutorial we will be focusing on getting the mobile view layout while editing few lines of code in your code for desktop view.</p><ul><li>Firstly, let’s install the hamburger icon from react</li></ul><pre>npm install hamburger-react</pre><ul><li>Secondly, we are going to import the hamburger icon into our navbar then call it where we want it to be which is on top of the rightNav</li></ul><pre>            import Hamburger from &quot;hamburger-react&quot;;<br><br>---------------------------------------------------------------------------<br>            &lt;div className=&quot;hamburger&quot;&gt;<br>                &lt;Hamburger/&gt;<br>            &lt;/div&gt;<br>            &lt;div className=&quot;rightNav&quot;&gt;<br>                &lt;a href=&quot;#home&quot;&gt;Home&lt;/a&gt;<br>                &lt;a href=&quot;#about&quot;&gt;About&lt;/a&gt;<br>                &lt;a href=&quot;#contact&quot;&gt;Contact&lt;/a&gt;<br>                &lt;a href=&quot;#register&quot;&gt;Register&lt;/a&gt;<br>                &lt;div className=&quot;cart&quot;&gt;<br>                    &lt;FaShoppingCart size={30} aria-label=&quot;Shopping Cart&quot; /&gt;<br>                &lt;/div&gt;<br>            &lt;/div&gt;</pre><ul><li>Normally, our hamburger is going to display, staying in-between the leftNav and the rightNav but since we don’t want it to show on the desktop view so we will pass display:none; on the div carrying the hamburger.</li></ul><pre>  .hamburger{<br>    display: none;<br>  }</pre><ul><li>On the smaller screen what we want to see is the hamburger, and not the content inside the rightNav so we have to pass display: none; for the rightNav and revert the style we passed for the hamburger on the desktop screen to display: block;</li></ul><pre>@media (max-width : 800px) {<br>    .hamburger{<br>        display: block;<br>      }<br><br>    .rightNav {<br>        display: none;<br>        position: absolute;<br>        right: 0;<br>        width: 100%;<br>      }<br>};</pre><ul><li>Give the rightNav the style you want it to take on a smaller screen.</li><li>Create a useState hook to manage the state of the hamburger</li></ul><pre>import Hamburger from &quot;hamburger-react&quot;;<br>import { useState } from &quot;react&quot;;<br><br>const Header = () =&gt; {<br>    const [hamburgerIsOpen, setHamburgerIsOpen] = useState(false);<br>return(<br>        &lt;nav className=&quot;header&quot;&gt;<br>            &lt;div className=&quot;leftNav&quot;&gt;<br>                Jundu<br>            &lt;/div&gt;<br>            &lt;div className=&quot;hamburger&quot;&gt;<br>                &lt;Hamburger/&gt;<br>            &lt;/div&gt;<br>            &lt;div className=&quot;rightNav&quot;&gt;<br>                &lt;a href=&quot;#home&quot;&gt;Home&lt;/a&gt;<br>                &lt;a href=&quot;#about&quot;&gt;About&lt;/a&gt;<br>                &lt;a href=&quot;#contact&quot;&gt;Contact&lt;/a&gt;<br>                &lt;a href=&quot;#register&quot;&gt;Register&lt;/a&gt;<br>                &lt;div className=&quot;cart&quot;&gt;<br>                    &lt;FaShoppingCart size={30} aria-label=&quot;Shopping Cart&quot; /&gt;<br>                &lt;/div&gt;<br>            &lt;/div&gt;<br>)<br>};<br></pre><ul><li>Use the toggled and toggle props to control the state of the hamburger icon.</li></ul><p>Note:</p><p><strong>toggled={hamburgerIsOpen}</strong>:</p><ul><li>This prop controls whether the hamburger menu is open or closed.</li><li>hamburgerIsOpen is a state variable that determines the current state of the menu (open or closed).</li></ul><p><strong>toggle={setHamburgerIsOpen}</strong>:</p><ul><li>This prop is a function that updates the state.</li><li>setHamburgerIsOpen is a function from useState that toggles the hamburgerIsOpen state between true and false.</li></ul><pre><br>            &lt;div className=&quot;hamburger&quot;&gt;<br>                &lt;Hamburger toggled={hamburgerIsOpen} toggle={setHamburgerIsOpen}/&gt;<br>            &lt;/div&gt;</pre><ul><li>Conditionally, let’s render the rightNav classname on the nav element using the ternary operator. This time we are bringing in a new classname called “open”. This line of code will dynamically adds the CSS class open to the rightNav element based on the hamburgerIsOpen state.</li></ul><pre> &lt;div className={`rightNav ${hamburgerIsOpen ? &#39;open&#39; : &quot;&quot;}`}&gt;<br>                &lt;a&gt;Home&lt;/a&gt;<br>                &lt;a&gt;About&lt;/a&gt;<br>                &lt;a&gt;Contact&lt;/a&gt;<br>                &lt;a&gt;Register&lt;/a&gt;<br>                &lt;div className=&quot;cart&quot;&gt;<br>                &lt;FaShoppingCart size={30}/&gt;<br>                &lt;/div&gt;<br>            &lt;/div&gt;</pre><ul><li>Let’s style the new class open</li></ul><pre>.rightNav.open{<br>      display: grid;<br>      transform: translateX(0);<br>      margin-block-start: 19.6rem;<br>      min-width: 100%;<br>      background-color: burlywood;<br>      padding:  1rem;<br>}</pre><p>At the end this is how our Header.jsx will look like</p><pre>import &quot;./Header.css&quot;;<br>import { FaShoppingCart } from &#39;react-icons/fa&#39;;<br>import Hamburger from &quot;hamburger-react&quot;;<br>import {useState } from &quot;react&quot;;<br><br>const Header = () =&gt; {<br>    const [hamburgerIsOpen, setHamburgerIsOpen] = useState(false);<br><br>    <br>    return (<br>        &lt;nav className=&quot;header&quot;&gt;<br>            &lt;div className=&quot;leftNav&quot;&gt;<br>                Jundu<br>            &lt;/div&gt;<br>            &lt;div className=&quot;hamburger&quot;&gt;<br>                &lt;Hamburger toggled={hamburgerIsOpen} toggle={setHamburgerIsOpen} aria-label=&quot;Toggle menu&quot; /&gt;<br>            &lt;/div&gt;<br>            &lt;div className={`rightNav ${hamburgerIsOpen ? &#39;open&#39; : &#39;&#39;}`}&gt;<br>                &lt;a href=&quot;#home&quot;&gt;Home&lt;/a&gt;<br>                &lt;a href=&quot;#about&quot;&gt;About&lt;/a&gt;<br>                &lt;a href=&quot;#contact&quot;&gt;Contact&lt;/a&gt;<br>                &lt;a href=&quot;#register&quot;&gt;Register&lt;/a&gt;<br>                &lt;div className=&quot;cart&quot;&gt;<br>                    &lt;FaShoppingCart size={30} aria-label=&quot;Shopping Cart&quot; /&gt;<br>                &lt;/div&gt;<br>            &lt;/div&gt;<br>        &lt;/nav&gt;<br>    );<br>};<br><br>export default Header;</pre><p>. And our Header.css will look exactly like this:</p><pre>/* Styling the navBar for the desktop view */<br>nav {<br>  display: flex;<br>  justify-content: space-between;<br>  align-items: center;<br>  padding: 1rem 2rem;<br>  height: 5rem;<br>  background-color: burlywood;<br>  border-bottom: 20px double brown;<br>  position: fixed;<br>  width: 100%;<br><br>  &amp; .leftNav {<br>    font-size: 2rem;<br>    font-weight: bolder;<br>    cursor: pointer;<br>  }<br><br>  .rightNav {<br>    display: flex;<br>    gap: 1rem;<br>    align-items: center;<br><br>    &amp; a {<br>      cursor: pointer;<br>      font-weight: 500;<br>      text-decoration: none;<br>      color: black;<br>    }<br><br>    &amp; .cart {<br>      cursor: pointer;<br>    }<br>  }<br><br>  &amp; .hamburger{<br>    display: none;<br>  }<br><br>};<br><br>/* Styling the navBar for a mobile view */<br>@media (max-width : 800px) {<br>  nav {<br>    padding: 0.5rem 1rem;<br>    <br>    &amp; .hamburger{<br>        display: block;<br>      }<br><br>      &amp; .rightNav {<br>        display: none;<br>        position: absolute;<br>        right: 0;<br>        width: 100%;<br>      }<br><br>    &amp; .rightNav.open{<br>      display: grid;<br>      transform: translateX(0);<br>      margin-block-start: 19.6rem;<br>      min-width: 100%;<br>      background-color: burlywood;<br>      padding:  1rem;<br><br>      &amp; a {<br>        font-weight: 500;<br>      }<br><br>      &amp; .cart {<br>        cursor: pointer;<br>      }<br>    }<br>  }<br>};</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3670c811db8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why use optional chaining in JS?]]></title>
            <link>https://medium.com/@adebosinadewale_62859/why-use-optional-chaining-in-js-514a29dbc1a6?source=rss-cf10029af968------2</link>
            <guid isPermaLink="false">https://medium.com/p/514a29dbc1a6</guid>
            <dc:creator><![CDATA[Ridwan Adebosin]]></dc:creator>
            <pubDate>Sun, 26 May 2024 09:15:38 GMT</pubDate>
            <atom:updated>2024-05-26T09:20:07.629Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/277/1*aBBSlWi8WhLz8SyHCTs6-A@2x.jpeg" /></figure><p>Optional chaining (?.) is a new feature in JavaScript, introduced in ECMAScript 2020, that allows you to safely access nested properties or methods without having to manually check if each property exists. In other words, it simplifies the process of accessing properties and methods of nested objects or arrays when intermediate properties may be null or undefined.</p><p>You must have encountered the “non-existing property” problem. This is a common issue in JavaScript.</p><p>Let’s say, for example, we have user objects that hold information about users for your application. While most of these users registered with their address (user.address property), including the street (user.address.street), some did not provide this information.</p><p>In such cases, when we attempt to access user.address.street, and the user happens to be without an address, we get an error.</p><pre>let user = {}; // a user without &quot;address&quot; property<br><br>alert(user.address.street); // Error!</pre><p>The result is expected because user.address is undefined for the user, so any attempt to access user.address.street will throw an error.</p><p>One solution to this error is to check for the value using an if statement or the conditional operator (?.) before the property, like this:</p><pre>let user = {}; // a user without &quot;address&quot; property<br><br>alert(user.address ? user.address.street : undefined);</pre><p>This will work without throwing an error because we are essentially saying: if user.address exists, return user.address.street; otherwise, return undefined. However, in the code above, we have repetitions of user.address, which isn&#39;t ideal. Another method is to use the &amp;&amp; logical operator. This operator looks for the first falsy value and returns it.</p><pre>let user = {}; //user has no address<br><br>alert(user.address &amp;&amp; user.address.street);</pre><p>This is still not ideal because we are repeating user.address. This is where the powerful optional chaining (?.) comes in.</p><p>Optional chaining stops the evaluation if the value before ?. is undefined or null and returns undefined.</p><p>In other words, user?.address:</p><ul><li>works as user.address, if user exists,</li><li>otherwise (when user is undefined/null) it returns undefined.</li></ul><pre>let user = {}; //user has no address<br><br>alert( user?.address?.street ); //undefined (no error)</pre><p>This is short and clean.</p><p>Please note: The ?. syntax makes the value before it optional, but not any further. It short-circuits the evaluation if the left operand is null or undefined. Example:</p><pre>const user = null;<br>let x = 0;<br><br>// Using optional chaining to safely access properties<br>x = user?.name?.length ?? 0;<br><br>console.log(x); // Output will be 0 because user is null</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=514a29dbc1a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Array Data Structures]]></title>
            <link>https://medium.com/@adebosinadewale_62859/array-data-structures-986d46a9cbc5?source=rss-cf10029af968------2</link>
            <guid isPermaLink="false">https://medium.com/p/986d46a9cbc5</guid>
            <dc:creator><![CDATA[Ridwan Adebosin]]></dc:creator>
            <pubDate>Thu, 09 May 2024 16:31:25 GMT</pubDate>
            <atom:updated>2024-05-09T16:31:25.772Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w6bGJs2cy56icUsn97vBsw.jpeg" /></figure><p><strong>Data Structures</strong> are ways of organizing and storing data in a computer while <strong>Algorithms</strong> are set of steps or rules for solving problems.<br>We have various types of Data Structures like: <br><em>🔦 Queue<br>🔦 Stack<br>🔦 Table<br>🔦 Graph<br>🔦 Linked lists<br>🔦 Trees<br>🔦 Arrays</em><br>but let’s take a brief look at Arrays.</p><p>Arrays indeed provide a <strong><em>straightforward/linear</em></strong> way to store and access elements, and they’re a fundamental part of programming in many languages. They’re excellent for scenarios where you need fast access to elements by <strong><em>index</em></strong>.<br>Arrays has 2 major methods which are:</p><p><strong>Mutating methods</strong>: These are array methods that modify the original array. Methods like pop(), push(), splice(), and sort() are examples of mutating methods in JavaScript. They directly modify the original array, altering its content or structure.</p><ul><li>pop(): Removes the last element from the array and returns that element.</li><li>push(): Adds one or more elements to the end of an array.</li><li>splice(): Changes the contents of an array by removing or replacing existing elements and/or adding new elements in place.</li><li>sort(): Sorts the elements of an array in place and returns the sorted array.</li></ul><p>Remember, splice() and sort() modify the original array, whereas pop() and push() do not return a new array but modify the original one. Always be cautious about modifying the original array if it&#39;s important to maintain the original data.</p><pre>function arrayManipulation(arr) {<br>    // Pop the last element<br>    const poppedElement = arr.pop();<br>    console.log(&quot;Popped Element:&quot;, poppedElement);<br><br>    // Push a new element<br>    arr.push(100);<br>    console.log(&quot;Array after push:&quot;, arr);<br><br>    // Splice - remove elements starting from index 2<br>    const removedElements = arr.splice(2);<br>    console.log(&quot;Removed Elements:&quot;, removedElements);<br>    console.log(&quot;Array after splice:&quot;, arr);<br><br>    // Sort the array<br>    arr.sort((a, b) =&gt; a - b);<br>    console.log(&quot;Array after sort:&quot;, arr);<br><br>    return arr;<br>}<br><br>// Example usage:<br>const originalArray = [5, 2, 8, 10, 3];<br>console.log(&quot;Original Array:&quot;, originalArray);<br>const manipulatedArray = arrayManipulation(originalArray.slice()); // slice() to create a copy<br>console.log(&quot;Manipulated Array:&quot;, manipulatedArray);</pre><p><strong>Non-mutating methods</strong>: These are methods that return a new array without modifying the original array.<br>Non-mutating methods such as map(), filter(), slice(), and concat() are incredibly useful when you want to transform or filter elements in an array without altering the original array.</p><ul><li>map(): Creates a new array with the results of calling a provided function on every element in the calling array.</li><li>filter(): Creates a new array with all elements that pass the test implemented by the provided function.</li><li>slice(): Returns a shallow copy of a portion of an array into a new array object selected from start to end (end not included) where start and end represent the index of items in that array.</li><li>concat(): Combines two or more arrays into one new array.</li></ul><pre>function arrayOperations(arr1, arr2) {<br>    // Using map() to double each element in the array<br>    const doubledArray = arr1.map(element =&gt; element * 2);<br>    console.log(&quot;Doubled Array:&quot;, doubledArray);<br><br>    // Using filter() to get even numbers from the array<br>    const evenNumbers = arr2.filter(element =&gt; element % 2 === 0);<br>    console.log(&quot;Even Numbers Array:&quot;, evenNumbers);<br><br>    // Using slice() to get a subset of the array<br>    const slicedArray = arr1.slice(1, 3); // Get elements from index 1 to index 2<br>    console.log(&quot;Sliced Array:&quot;, slicedArray);<br><br>    // Using concat() to concatenate two arrays<br>    const concatenatedArray = arr1.concat(arr2);<br>    console.log(&quot;Concatenated Array:&quot;, concatenatedArray);<br><br>    return {<br>        doubledArray,<br>        evenNumbers,<br>        slicedArray,<br>        concatenatedArray<br>    };<br>}<br><br>// Example usage:<br>const array1 = [1, 2, 3, 4, 5];<br>const array2 = [6, 7, 8, 9, 10];<br>console.log(&quot;Array 1:&quot;, array1);<br>console.log(&quot;Array 2:&quot;, array2);<br>const result = arrayOperations(array1, array2);<br>console.log(&quot;Result:&quot;, result);</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=986d46a9cbc5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>