<?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: Kuseh Michael Akidewe </title>
    <description>The latest articles on Forem by Kuseh Michael Akidewe  (@michael_kuseh).</description>
    <link>https://forem.com/michael_kuseh</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%2F1458560%2F94a1e16e-c244-46f8-adf9-c7b8955d6c7c.jpg</url>
      <title>Forem: Kuseh Michael Akidewe </title>
      <link>https://forem.com/michael_kuseh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/michael_kuseh"/>
    <language>en</language>
    <item>
      <title>How Node.js Works: A Look Under the hood</title>
      <dc:creator>Kuseh Michael Akidewe </dc:creator>
      <pubDate>Thu, 21 Aug 2025 21:25:18 +0000</pubDate>
      <link>https://forem.com/michael_kuseh/how-nodejs-works-a-look-under-the-hood-57e7</link>
      <guid>https://forem.com/michael_kuseh/how-nodejs-works-a-look-under-the-hood-57e7</guid>
      <description>&lt;p&gt;While learning Node.js, it’s easy to just focus on writing code — but have you ever wondered what’s really happening under the hood?&lt;br&gt;
In a section of my Node.js course, I explored how Node actually works, and I’d like to share some key concepts in simple terms.&lt;/p&gt;

&lt;p&gt;1️⃣ &lt;strong&gt;Node, V8, Libuv, and C++&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Node.js isn’t a language by itself — it’s built on top of JavaScript and some powerful tools:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;V8 Engine&lt;/strong&gt;: Created by Google, it takes your JavaScript code and makes it super fast by compiling it to machine code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Libuv&lt;/strong&gt;: A C++ library that gives Node.js its ability to handle things like the event loop, file system operations, networking, and threads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;C++ Add-ons&lt;/strong&gt;: Some parts of Node are written in C++ for performance, and Node allows developers to extend it with C++ code when raw speed is needed.&lt;br&gt;
Think of V8 as the brain and Libuv as the heart that keeps everything running.&lt;/p&gt;

&lt;p&gt;2️⃣ &lt;strong&gt;Processes, Threads, and the Thread Pool&lt;/strong&gt;&lt;br&gt;
When you run a Node.js app, it runs in a process. Inside that process, Node mostly runs on a single thread.&lt;br&gt;
So how does Node handle multiple tasks at once? 🤔&lt;br&gt;
That’s where the thread pool comes in. Certain tasks (like reading files, compression, or DNS lookups) are offloaded to worker threads in the background. This means the main thread doesn’t get stuck — it can keep responding to users.&lt;/p&gt;

&lt;p&gt;3️⃣ &lt;strong&gt;The Event Loop&lt;/strong&gt;&lt;br&gt;
This is the core of Node.js.&lt;br&gt;
Imagine the event loop as a busy waiter in a restaurant:&lt;br&gt;
He takes your order (task).&lt;br&gt;
If it’s something quick, he does it immediately.&lt;br&gt;
If it’s something long (like cooking a big meal), he passes it to the kitchen (thread pool) and then moves on to serve other customers.&lt;br&gt;
When the meal is ready, he brings it back to you.&lt;br&gt;
This is how Node.js achieves non-blocking I/O — it doesn’t wait around, it just keeps going.&lt;/p&gt;

&lt;p&gt;4️⃣ &lt;strong&gt;Events and Event-Driven Architecture&lt;/strong&gt;&lt;br&gt;
Node.js apps are built around events.&lt;br&gt;
Instead of constantly checking, “Is the file ready? Is the data here yet?”, Node listens for events like:&lt;br&gt;
“File has been read.”&lt;br&gt;
“Request has arrived.”&lt;br&gt;
“Connection closed.”&lt;br&gt;
This makes Node very efficient, because it reacts to things instead of wasting time waiting.&lt;/p&gt;

&lt;p&gt;5️⃣ &lt;strong&gt;Streams&lt;/strong&gt;&lt;br&gt;
Streams allow you to work with data piece by piece instead of loading it all at once.&lt;br&gt;
For example:&lt;br&gt;
Instead of loading a 2GB video file into memory, Node can stream it in small chunks to the user.&lt;br&gt;
This saves memory and makes apps faster.&lt;br&gt;
Streams are everywhere in Node — reading/writing files, handling HTTP requests, or sending data over a network.&lt;/p&gt;

&lt;p&gt;6️⃣ &lt;strong&gt;How Modules Really Work&lt;/strong&gt;&lt;br&gt;
In Node.js, when you use require() to import a file or package, a lot happens behind the scenes:&lt;br&gt;
Node looks for the file.&lt;br&gt;
Wraps it in a function to keep variables private.&lt;br&gt;
Caches it so the same module isn’t loaded again and again.&lt;br&gt;
This system makes Node apps modular, organized, and efficient.&lt;/p&gt;

&lt;p&gt;🎯 &lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;br&gt;
Understanding how Node.js works internally is like looking under the hood of a car. You don’t need to know every detail to drive, but knowing the basics helps you become a much better driver (developer).&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>node</category>
      <category>backenddevelopment</category>
    </item>
    <item>
      <title>"How I Built a Gemini AI Chatbot: Tech Stack, Features, and Source Code" 💡🚀</title>
      <dc:creator>Kuseh Michael Akidewe </dc:creator>
      <pubDate>Wed, 02 Apr 2025 14:12:03 +0000</pubDate>
      <link>https://forem.com/michael_kuseh/how-i-built-a-gemini-ai-chatbot-tech-stack-features-and-source-code-302k</link>
      <guid>https://forem.com/michael_kuseh/how-i-built-a-gemini-ai-chatbot-tech-stack-features-and-source-code-302k</guid>
      <description>&lt;p&gt;Hey everyone! 👋 I recently built a Gemini Chat Clone, a chatbot application powered by Google's Gemini API, and I wanted to share my experience building it. If you’re interested in AI chatbots or want to explore how to integrate the Gemini API into your own projects, this post is for you! 😃&lt;/p&gt;

&lt;p&gt;🔧 Tech Stack Used:&lt;br&gt;
✅ Frontend: React.js  (for UI and seamless UX)&lt;br&gt;
✅ API: Google Gemini API (for AI-powered responses) &lt;br&gt;
✅ Styling: CSS (for a clean and modern UI)&lt;/p&gt;

&lt;p&gt;📌 Key Features:&lt;br&gt;
✔️ Real-time AI Conversations: Chat with an AI assistant using Google's powerful Gemini model. &lt;br&gt;
✔️ Smooth UI/UX: Built with a responsive and minimalist design. &lt;br&gt;
✔️ Message Persistence: Store chat conversations  for later access. &lt;br&gt;
✔️ API Integration: Uses Gemini API to generate intelligent and contextual responses.&lt;/p&gt;

&lt;p&gt;🛠️ How I Built It:&lt;br&gt;
1️⃣ Setting Up the Environment: Created a React app using Vite&lt;br&gt;
2️⃣ Integrating Gemini API: Used Google’s Gemini API for generating AI responses which I display to the user.&lt;br&gt;
3️⃣ Building the Chat UI: Designed a clean and user-friendly chat interface used to interact with the Large Language Model (LLM)  &lt;/p&gt;

&lt;p&gt;📂 Source Code &amp;amp; Demo&lt;br&gt;
🔗 GitHub Repository: &lt;a href="https://github.com/AkideweKuseh/gemini-clone" rel="noopener noreferrer"&gt;Project Repository&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🌐 Live Demo: &lt;a href="https://www.linkedin.com/posts/michael-kuseh-92467a229_react-greatstack-activity-7296587489903800321-d94b?utm_source=share&amp;amp;utm_medium=member_desktop&amp;amp;rcm=ACoAADk616wBvvfasj_bQ31h64QoH99ngZmSLR0" rel="noopener noreferrer"&gt;Here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>ai</category>
    </item>
    <item>
      <title>How Module Bundlers Work</title>
      <dc:creator>Kuseh Michael Akidewe </dc:creator>
      <pubDate>Sat, 15 Feb 2025 16:16:16 +0000</pubDate>
      <link>https://forem.com/michael_kuseh/how-module-bundlers-work-576f</link>
      <guid>https://forem.com/michael_kuseh/how-module-bundlers-work-576f</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;What is a Module Bundler&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A module bundler is a tool used to package many files (modules) into a single or few files that can be loaded efficiently in browsers, basically they organize code to improve performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How a Module Bundler Works.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The the series of steps a module bundler takes to bundle code is as follows;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It starts by searching for your application’s entry point, usually &lt;code&gt;index.js&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Dependencies resolution : the process of analyzing, finding, and connecting all the dependencies (imported modules, libraries, files) that an application needs to work correctly. First, It scans through the entry point file and looks for &lt;code&gt;imports&lt;/code&gt; or &lt;code&gt;requires&lt;/code&gt; and every file that it depends on. It does this for the dependencies as well until there’s no more and then it creates what is called a dependency graph.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A Dependency Graph is basically a graph that maps the relationships between modules indicating which module depends on which and also helps avoid circular dependencies.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Bundling: The bundler then puts all the code in your application and its dependencies into one or fewer bundles that are ready to be loaded by the browser.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Why Bundlers are Useful&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before module bundlers developers had to manually include files in their HTML pages with multiple &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags and this resulted in issues like;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Lots of HTTP requests.&lt;/li&gt;
&lt;li&gt;Global scope issues, since all dependencies were added to the HTML page manually all JavaScript files were in the global scope so if two or more files had the same variable names conflicts arise.&lt;/li&gt;
&lt;li&gt;No dependency management.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The dawn of bundlers provided the means to solve these issues and provide advantages like;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Automatic Dependency Management.&lt;/li&gt;
&lt;li&gt;Fewer HTTP requests&lt;/li&gt;
&lt;li&gt;Elimination of Global scope issues.&lt;/li&gt;
&lt;li&gt;Code Splitting: Applications are split into multiple bundles that are loaded only when needed, speeding up initial load time improving performance and providing better code organization.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Examples of Module Bundler.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Popular module bundlers include;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Webpack&lt;/li&gt;
&lt;li&gt;Rollup&lt;/li&gt;
&lt;li&gt;Vite&lt;/li&gt;
&lt;li&gt;Parcel&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What do you think about module bundlers?&lt;br&gt;
leave you comments below&lt;/p&gt;

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