<?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 Kaysa Dahir Ali on Medium]]></title>
        <description><![CDATA[Stories by Kaysa Dahir Ali on Medium]]></description>
        <link>https://medium.com/@kaysadahir?source=rss-b3a52a99a54b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Vc7B7OLQGUhezdIF2k1LBg.jpeg</url>
            <title>Stories by Kaysa Dahir Ali on Medium</title>
            <link>https://medium.com/@kaysadahir?source=rss-b3a52a99a54b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 11:49:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kaysadahir/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[Hands-On Experience with Google Cloud Dialogflow CX: Key Concepts I Learned]]></title>
            <link>https://medium.com/@kaysadahir/hands-on-experience-with-google-cloud-dialogflow-cx-key-concepts-i-learned-fcb7172f0d81?source=rss-b3a52a99a54b------2</link>
            <guid isPermaLink="false">https://medium.com/p/fcb7172f0d81</guid>
            <category><![CDATA[chatbot-development]]></category>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[dialogflow-cx]]></category>
            <dc:creator><![CDATA[Kaysa Dahir Ali]]></dc:creator>
            <pubDate>Mon, 14 Jul 2025 04:15:03 GMT</pubDate>
            <atom:updated>2025-07-14T04:18:13.262Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A quick overview of essential conversational AI terms from building a flight booking bot</em></p><p><strong>📖 Read Time: 5 minutes</strong></p><figure><img alt="Chatbot" src="https://cdn-images-1.medium.com/max/720/1*sFRgERlN65Ivkczi_ts5Dw.jpeg" /></figure><h3>🚀 What I Built</h3><p>Just completed Google Cloud’s Dialogflow CX lab where I built a <strong>flight booking conversational agent</strong> from scratch. Here’s a quick rundown of the key concepts I learned through hands-on experience.</p><h3>🎯 Agent</h3><p><strong><em>Definition:</em></strong> The complete virtual assistant. Mine was called “Flight Booker” — customer service rep that can handle flight bookings.</p><h3>🧠 Intents</h3><p><strong><em>Definition:</em></strong> What users want to accomplish. I created:</p><ul><li><strong>main.book_a_flight</strong> - for booking requests</li><li><strong>confirmation.yes</strong> - when users confirm details</li><li><strong>confirmation.no</strong> - when users want to change something</li></ul><p><strong>Training phrases I used:</strong></p><ul><li>“Book a flight”</li><li>“I want to fly to San Francisco next month”</li><li>“Help me book a ticket from Mexico City to Colombia”</li></ul><h3>🏷️ Entities &amp; Parameters</h3><p><strong>Entities</strong> = data types, <strong>Parameters</strong> = actual extracted values</p><p>I used these system entities:</p><ul><li><strong>@sys.geo-city</strong> → extracted &quot;Austin&quot;, &quot;Boston&quot;</li><li><strong>@sys.date</strong> → extracted &quot;tomorrow&quot;, &quot;next Friday&quot;</li><li><strong>@sys.any</strong> → extracted passenger names like &quot;Mickey Mouse&quot;</li></ul><h3>🌊 Flows &amp; Pages</h3><p><strong>Flows</strong> organize conversation topics. <strong>Pages</strong> are steps within flows.</p><p>My flow: <strong>Start Page</strong> → <strong>Ticket Information</strong> → <strong>Confirm Trip</strong></p><p>Each page collected specific info before moving to the next.</p><h3>📋 Forms</h3><p>Structured data collection. My booking form collected:</p><ul><li>departure_city</li><li>destination_city</li><li>departure_date</li><li>return_date</li><li>passenger_name</li></ul><p>The bot asked for each one systematically.</p><h3>🔄 Conditions</h3><p>Smart routing based on collected data. I used:</p><p>if ($page.params.status = “FINAL”) {</p><p>→ move to confirmation page</p><p>}</p><h3>💬 Fulfillment</h3><p>Bot responses. I created both:</p><ul><li><strong>Static</strong>: “What city would you like to depart from?”</li><li><strong>Dynamic</strong>: “Perfect! $session.params.passenger_name will fly from $session.params.departure_city to $session.params.destination_city”</li></ul><h3>🎮 Routes</h3><p>Conversation paths. I built:</p><ul><li><strong>Intent routes</strong>: triggered by main.book_a_flight</li><li><strong>Condition routes</strong>: triggered when all parameters collected</li><li><strong>Confirmation routes</strong>: handled yes/no responses</li></ul><h3>🔧 Session Parameters</h3><p>Remembered info throughout conversation using $session.params.parameter_name</p><p>Example: “Thanks for that information, $session.params.passenger_name”</p><h3>🧪 Testing</h3><p>Used the built-in simulator. My test conversation:</p><p>Me: “I’d like to book a flight”</p><p>Bot: “What city would you like to depart from?”</p><p>Me: “Austin”</p><p>Bot: “What’s your destination?”</p><p>Me: “Boston”</p><p>Bot: “When would you like to travel?”</p><p>Me: “Tomorrow”</p><p>…</p><h3>🛡️ Error Handling</h3><p>Built fallbacks for when users say unexpected things:</p><ul><li><strong>No-match</strong>: “I didn’t understand that. Could you rephrase?”</li><li><strong>Parameter presets</strong>: Reset values to null when users want to start over</li></ul><h3>🎯 Key Takeaway</h3><p>Building conversational AI is surprisingly visual and intuitive. The flow-based approach makes complex conversations manageable, and you can see exactly how users move through your bot.</p><p><strong>What impressed me most:</strong> How the bot maintained context throughout the entire conversation and could reference previously collected information naturally.</p><h3>🚀 Next Steps</h3><p>Ready to explore:</p><ul><li><strong>Webhooks</strong> for real-time flight data</li><li><strong>Multi-language support</strong></li><li><strong>Voice integration</strong></li><li><strong>Analytics and optimization</strong></li></ul><p><em>The lab took 90 minutes but gave me a solid foundation in conversational AI fundamentals. Perfect starting point for anyone curious about building chatbots!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fcb7172f0d81" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rainbow Table Attack, Brute Force Attack, and CSRF]]></title>
            <link>https://medium.com/@kaysadahir/rainbow-table-attack-brute-force-attack-and-csrf-651f088ac26a?source=rss-b3a52a99a54b------2</link>
            <guid isPermaLink="false">https://medium.com/p/651f088ac26a</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[bcrypt]]></category>
            <category><![CDATA[express]]></category>
            <dc:creator><![CDATA[Kaysa Dahir Ali]]></dc:creator>
            <pubDate>Mon, 03 Mar 2025 03:39:19 GMT</pubDate>
            <atom:updated>2025-03-03T03:39:19.942Z</atom:updated>
            <content:encoded><![CDATA[<p>In the world of cybersecurity, understanding various types of attacks is crucial for building secure applications.</p><p>Here is a quick run down of three common types of attacks: <strong>Rainbow Table Attack</strong>, <strong>Brute Force Attack</strong>, and <strong>Cross-Site Request Forgery</strong> (CSRF).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O7qD5CnzAnZ2Kz1huTvPrw.png" /></figure><h3>Rainbow Table Attack</h3><p>A Rainbow Table Attack is a method used to crack password hashes. Instead of attempting to guess the password directly, attackers use precomputed tables of hash values for common passwords. These tables, known as rainbow tables, allow attackers to reverse-engineer the original password from its hash.</p><h3>How It Works</h3><ol><li><strong>Hashing</strong>: When a user creates a password, it is hashed using a cryptographic hash function.</li><li><strong>Rainbow Table</strong>: Attackers create a rainbow table containing hash values for a large set of possible passwords.</li><li><strong>Matching</strong>: The attacker compares the stored hash with the hashes in the rainbow table to find a match.</li></ol><h3>Prevention</h3><ul><li><strong>Salting</strong>: Adding a unique random value (salt) to each password before hashing makes rainbow tables ineffective.</li><li><strong>Strong Hash Functions</strong>: Use hash functions designed to be slow, such as bcrypt, to make precomputation impractical.</li></ul><h3>Brute Force Attack</h3><p>A Brute Force Attack is a trial-and-error method used to decode encrypted data such as passwords. The attacker systematically tries all possible combinations until the correct one is found.</p><h3>How It Works</h3><ol><li><strong>Guessing</strong>: The attacker tries different combinations of characters until the correct password is found.</li><li><strong>Automation</strong>: Tools and scripts can automate the process, making it faster and more efficient.</li></ol><h3>Prevention</h3><ul><li><strong>Strong Passwords</strong>: Encourage users to create complex passwords with a mix of characters.</li><li><strong>Account Lockout</strong>: Implement account lockout mechanisms after a certain number of failed attempts.</li><li><strong>Rate Limiting</strong>: Limit the number of login attempts from a single IP address.</li></ul><h3>Cross-Site Request Forgery (CSRF)</h3><p>Cross-Site Request Forgery (CSRF) is an attack that tricks a user into performing actions on a web application without their consent. This is done by exploiting the user’s authenticated session with the application.</p><h3>How It Works</h3><ol><li><strong>Authenticated Session</strong>: The user is logged into a web application.</li><li><strong>Malicious Request</strong>: The attacker crafts a malicious request and tricks the user into executing it (e.g., by clicking a link or loading an image).</li><li><strong>Execution</strong>: The web application processes the request as if it were made by the user.</li></ol><h3>Prevention</h3><ul><li><strong>CSRF Tokens</strong>: Include a unique token in each form submission and validate it on the server side.</li><li><strong>SameSite Cookies</strong>: Use the SameSite attribute for cookies to prevent them from being sent with cross-site requests.</li><li><strong>Referer Header</strong>: Check the Referer header to ensure requests originate from trusted sources.</li></ul><p>For more detailed information on CSRF, you can refer to <a href="https://github.com/pillarjs/understanding-csrf">this guide</a>.</p><h3>Conclusion</h3><p>Understanding these attacks and implementing preventive measures is essential for securing your applications. By using techniques like salting, strong passwords, account lockout mechanisms, and CSRF tokens, you can significantly reduce the risk of these attacks.</p><p>Stay informed and stay secure!</p><p>more info:</p><ul><li><a href="https://github.com/pillarjs/understanding-csrf">GitHub - pillarjs/understanding-csrf: What are CSRF tokens and how do they work?</a></li><li><a href="https://www.npmjs.com/package/bcryptjs">bcryptjs</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=651f088ac26a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to MongoDB: A Beginner’s Guide]]></title>
            <link>https://medium.com/@kaysadahir/introduction-to-mongodb-a-beginners-guide-de3273d045fc?source=rss-b3a52a99a54b------2</link>
            <guid isPermaLink="false">https://medium.com/p/de3273d045fc</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Kaysa Dahir Ali]]></dc:creator>
            <pubDate>Mon, 17 Feb 2025 02:59:37 GMT</pubDate>
            <atom:updated>2025-02-17T02:59:37.144Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is MongoDB?</h3><p>MongoDB is a popular NoSQL database that stores data in flexible, JSON-like documents. Unlike traditional relational databases that use tables and rows, MongoDB uses collections and documents. This allows for a more dynamic and scalable approach to data storage, making it an excellent choice for modern applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ggq8aeiJsfQf6ZhNGC__pQ.jpeg" /></figure><h3>Key Features of MongoDB</h3><ol><li><strong>Document-Oriented</strong>: Data is stored in documents (similar to JSON objects), which allows for a more natural representation of data.</li><li><strong>Schema-less</strong>: MongoDB does not require a predefined schema, allowing for flexible and dynamic data models.</li><li><strong>Scalability</strong>: MongoDB is designed to scale horizontally, making it easy to handle large amounts of data.</li><li><strong>High Performance</strong>: MongoDB provides high performance for read and write operations, making it suitable for real-time applications.</li><li><strong>Rich Query Language</strong>: MongoDB offers a powerful query language that supports a wide range of operations, including filtering, sorting, and aggregations.</li></ol><h3>Getting Started with MongoDB</h3><h3>Installation</h3><p>To get started with MongoDB, you need to install it on your machine. You can download MongoDB from the<strong> </strong><a href="https://www.mongodb.com/try/download/community"><strong>official website</strong></a><strong>.</strong></p><h3>Connecting to MongoDB</h3><p>Once MongoDB is installed, you can connect to it using the MongoDB shell or a programming language like Node.js. In this guide, we’ll use Node.js to connect to MongoDB.</p><p>First, you need to install the MongoDB Node.js driver:</p><pre>npm install mongodb</pre><h3>Connecting to MongoDB in Node.js</h3><p>Here’s a simple example of how to connect to MongoDB using Node.js:</p><pre>const { MongoClient } = require(&quot;mongodb&quot;);<br>const dotenv = require(&quot;dotenv&quot;);<br>dotenv.config();<br>async function main() {<br>const client = new MongoClient(process.env.MONGO_URL, { useNewUrlParser: true, useUnifiedTopology: true });<br>try {<br>await client.connect();<br>console.log(&quot;Connected to MongoDB successfully!&quot;);<br>} catch (err) {<br>console.error(err);<br>} finally {<br>await client.close();<br>}<br>}<br>main().catch(console.error);</pre><p>In this example, we use the MongoClient class from the MongoDB Node.js driver to connect to the database. The connection URL is stored in an environment variable for security reasons.</p><h3>Performing CRUD Operations</h3><p>Once connected, you can perform various CRUD (Create, Read, Update, Delete) operations on your MongoDB collections.</p><h4>Create</h4><p>To insert a document into a collection:</p><pre>const db = client.db(&quot;mydatabase&quot;);<br>const collection = db.collection(&quot;mycollection&quot;);<br>const result = await collection.insertOne({ name: &quot;John Doe&quot;, age: 30 });<br>console.log(`New document inserted with _id: ${result.insertedId}`);</pre><h4>Read</h4><p>To find documents in a collection:</p><pre>const documents = await collection.find({ age: { $gt: 25 } }).toArray();<br>console.log(documents);</pre><h4>Update</h4><p>To update a document in a collection:</p><pre>const result = await collection.updateOne({ name: &quot;John Doe&quot; }, { $set: { age: 31 } });<br>console.log(`Matched ${result.matchedCount} document(s) and modified ${result.modifiedCount} document(s)`);</pre><h4>Delete</h4><p>To delete a document from a collection:</p><pre>const result = await collection.deleteOne({ name: &quot;John Doe&quot; });<br>console.log(`Deleted ${result.deletedCount} document(s)`);</pre><h3>MongoDB vs. Mongoose</h3><p>While MongoDB provides a flexible and powerful way to work with data, it can sometimes be challenging to manage complex data models and relationships. This is where Mongoose comes in.</p><h3>What is Mongoose?</h3><p>Mongoose is an Object Data Modeling (ODM) library for MongoDB and Node.js. It provides a schema-based solution to model your application data, including built-in type casting, validation, query building, and business logic hooks.</p><h3>Key Differences</h3><ol><li><strong>Schema</strong>: MongoDB is schema-less, meaning you can store any type of data in any document. Mongoose, on the other hand, enforces a schema, which helps in maintaining data consistency.</li><li><strong>Validation</strong>: Mongoose provides built-in validation, making it easier to ensure data integrity. MongoDB requires manual validation.</li><li><strong>Relationships</strong>: Mongoose offers a more straightforward way to define and manage relationships between different data models.</li><li><strong>Middleware</strong>: Mongoose supports middleware (hooks) that can be used to perform actions before or after certain operations, such as saving or updating documents.</li></ol><h3>Example with Mongoose</h3><p>Here’s a simple example of how to use Mongoose:</p><pre>const mongoose = require(&quot;mongoose&quot;);<br>const dotenv = require(&quot;dotenv&quot;);<br>dotenv.config();<br>mongoose.connect(process.env.MONGO_URL, { useNewUrlParser: true, useUnifiedTopology: true });<br>const userSchema = new mongoose.Schema({<br>name: String,<br>age: Number,<br>});<br>const User = mongoose.model(&quot;User&quot;, userSchema);<br>const user = new User({ name: &quot;John Doe&quot;, age: 30 });<br>user.save().then(() =&gt; console.log(&quot;User saved!&quot;));</pre><p>In this example, we define a schema for the User model and use it to create and save a new user document.</p><h3>Conclusion</h3><p>MongoDB is a powerful and flexible NoSQL database that is well-suited for modern applications. It allows for dynamic and scalable data models, making it an excellent choice for developers. While MongoDB provides a schema-less approach, Mongoose offers additional features like schema enforcement, validation, and middleware, making it easier to manage complex data models and relationships.</p><p>Whether you choose to use MongoDB directly or with Mongoose depends on your specific use case and requirements. Both tools have their strengths and can help you build robust and scalable applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de3273d045fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writing React Code Without Modern Tooling]]></title>
            <link>https://medium.com/@kaysadahir/writing-react-code-without-modern-tooling-a307a168dd59?source=rss-b3a52a99a54b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a307a168dd59</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Kaysa Dahir Ali]]></dc:creator>
            <pubDate>Thu, 30 Jan 2025 09:16:55 GMT</pubDate>
            <atom:updated>2025-01-30T09:16:55.798Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ILXWtC6AGzcqG-FXJFmR-g.jpeg" /><figcaption>React</figcaption></figure><p>In this post, we’ll see how to write React code without any modern tooling or build steps, directly inside a regular <em>HTML file</em>.</p><p>By having a look in this approach, which I call “<em>pure React</em>,” we will see why the modern tools are so beneficial.</p><h3>Creating the HTML File</h3><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;Hello React!&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;div id=&quot;root&quot;&gt;&lt;/div&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><h3>Adding React to the HTML File.</h3><p>To include React in our project, we need to add the React library as a script. Visit the <a href="https://reactjs.org/docs/getting-started.html">React documentation</a> and find the URLs for the React and ReactDOM scripts. Add these scripts to your HTML file:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;Hello React!&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;div id=&quot;root&quot;&gt;&lt;/div&gt;<br>    &lt;script src=&quot;https://unpkg.com/react@17/umd/react.development.js&quot;&gt;&lt;/script&gt;<br>    &lt;script src=&quot;https://unpkg.com/react-dom@17/umd/react-dom.development.js&quot;&gt;&lt;/script&gt;<br>    &lt;script&gt;<br>        // Your React code will go here<br>    &lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><h3>Creating a React Component.</h3><p>Now, let’s create our first React component inside the script tag. We’ll define a function called App that returns a React element.</p><pre>&lt;script&gt;<br>    function App() {<br>        return React.createElement(&#39;h1&#39;, null, &#39;Hello React!&#39;);<br>    }<br><br>    const root = ReactDOM.createRoot(document.getElementById(&#39;root&#39;));<br>    root.render(React.createElement(App));<br>&lt;/script&gt;</pre><h3>Rendering the Component</h3><p>To render the component, we use ReactDOM.createRoot to create a root and then call root.render with our App component.</p><h3>External Links:</h3><ul><li>Link to the official <a href="https://reactjs.org/docs/getting-started.html">React documentation</a>.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a307a168dd59" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Discover why React is the leading JavaScript framework. Learn about its component-based design, JSX]]></title>
            <link>https://medium.com/@kaysadahir/discover-why-react-is-the-leading-javascript-framework-learn-about-its-component-based-design-jsx-b635bf8ff8b2?source=rss-b3a52a99a54b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b635bf8ff8b2</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[jsx]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[components]]></category>
            <category><![CDATA[dom]]></category>
            <dc:creator><![CDATA[Kaysa Dahir Ali]]></dc:creator>
            <pubDate>Wed, 29 Jan 2025 16:37:23 GMT</pubDate>
            <atom:updated>2025-01-29T16:37:23.579Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why We Need a JavaScript Framework</h3><p>Before diving into React, let’s understand why we need a JavaScript framework in the first place.</p><h3>Introduction to React.</h3><p>React is one of the most popular JavaScript frameworks out there. In this post, we will get a high-level overview of what React is and how it works.</p><h3>What is React?</h3><p>According to the official React documentation, React is a JavaScript library for building user interfaces. Let’s expand this definition:</p><p>“ React is a <strong>highly popular</strong>, <strong>declarative</strong>, <strong>component-based</strong>, <strong>state-driven</strong> JavaScript library for creating user interfaces, developed by Facebook.”</p><h3>Component-Based Design</h3><p>React revolves around components like <strong>buttons</strong>, <strong>input fields</strong>, and <strong>search bars</strong>. These components are the fundamental building blocks of user interfaces in React.</p><figure><img alt="Diagram of React UI components like buttons and input fields." src="https://cdn-images-1.medium.com/max/1024/1*sq_EWo8EOxXgXKzPorz-6Q.jpeg" /><figcaption>Diagram of React UI components like buttons .</figcaption></figure><h3>Reusing Components.</h3><p>We can create a listing component and reuse it multiple times by simply modifying the data.</p><figure><img alt="Illustration of a reusable React listing component." src="https://cdn-images-1.medium.com/max/1024/1*y3DFcama9fxkKbFjpPXRGw.jpeg" /></figure><h3>Declarative Syntax with JSX.</h3><p>To define what each component looks like and how it behaves, we use a special declarative syntax called JSX.</p><figure><img alt="JSX syntax example in React." src="https://cdn-images-1.medium.com/max/546/1*wNvjRbygjRwsUAMW_59J4w.png" /></figure><h3>State and Reactivity.</h3><p>React ensures the UI stays in sync with data, referred to as state. Whenever the state changes, React automatically re-renders the user interface.</p><h3>React: Library or Framework?</h3><p>React is technically a library, even though it’s often referred to as a framework. It serves as the view layer, and additional libraries are needed for routing, data fetching, etc.</p><h3>Popularity and Community</h3><p>React is extremely popular and has a large, active developer community. This means there are plenty of tutorials, Stack Overflow questions and answers, and third-party libraries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QLZt9PfLGX0jD2ShhewMuQ.png" /></figure><h3>Backed by Facebook.</h3><p>React was created by Facebook in 2011 and has been used in Facebook and Instagram applications. It was open-sourced in 2013 and has since revolutionized front-end web development.</p><figure><img alt="Timeline of React’s history from creation to open-sourcing" src="https://cdn-images-1.medium.com/max/1024/1*GYD06qHXyIGEYvowKWPyfQ.jpeg" /></figure><h3>Summary</h3><p>React excels at rendering components based on their current state and keeping the UI in sync with state changes. It employs techniques like the virtual DOM, Fiber tree, and one-way data flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ILXWtC6AGzcqG-FXJFmR-g.jpeg" /></figure><h4>External Links:</h4><ul><li>Link to the official <a href="https://reactjs.org/docs/getting-started.html">React documentation</a>.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b635bf8ff8b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Node JS module system.]]></title>
            <link>https://medium.com/@kaysadahir/node-js-module-system-22d17701ba7b?source=rss-b3a52a99a54b------2</link>
            <guid isPermaLink="false">https://medium.com/p/22d17701ba7b</guid>
            <category><![CDATA[js]]></category>
            <category><![CDATA[node-js-development]]></category>
            <category><![CDATA[modules]]></category>
            <dc:creator><![CDATA[Kaysa Dahir Ali]]></dc:creator>
            <pubDate>Wed, 15 Jan 2025 02:40:57 GMT</pubDate>
            <atom:updated>2025-01-15T02:40:57.286Z</atom:updated>
            <content:encoded><![CDATA[<p>Node.js uses the CommonJS module system. Here’s a brief overview of how it works:</p><figure><img alt="files module" src="https://cdn-images-1.medium.com/max/1024/1*IgJaFlux7WT3pQ9j6j2TVw.jpeg" /></figure><h3>Exporting Modules</h3><p>You can export functions, objects, or primitives from a file so that they can be used in other files.</p><h4>Example:</h4><pre>// math.js<br>function add(a, b) {<br>return a + b;<br>}<br>function subtract(a, b) {<br>return a - b;<br>}<br>module.exports = {<br>add,<br>subtract<br>};</pre><h3>Importing Modules</h3><p>You can import functions, objects, or primitives from another file using the require function.</p><h4>Example:</h4><pre>// app.js<br>const math = require(&#39;./math&#39;);<br>const sum = math.add(2, 3);<br>const difference = math.subtract(5, 3);<br>console.log(`Sum: ${sum}`);<br>console.log(`Difference: ${difference}`);</pre><h3>Using ES6 Modules</h3><p>Node.js also supports ES6 modules with the .mjs file extension or by setting &quot;type&quot;: &quot;module&quot; in your package.json.</p><h4>Example:</h4><pre>// math.mjs<br>export function add(a, b) {<br>return a + b;<br>}<br>export function subtract(a, b) {<br>return a - b;<br>}</pre><h4>Importing ES6 Modules:</h4><pre>// app.mjs<br>import { add, subtract } from &#39;./math.mjs&#39;;<br>const sum = add(2, 3);<br>const difference = subtract(5, 3);<br>console.log(`Sum: ${sum}`);<br>console.log(`Difference: ${difference}`);</pre><h3>package.json Configuration</h3><p>To use ES6 modules without the .mjs extension, you can set the module type in package.json.</p><h4>Example:</h4><pre>// package.json<br>{<br>&quot;type&quot;: &quot;module&quot;<br>}</pre><p>This allows you to use .js files with ES6 module syntax.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22d17701ba7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with GitHub Issues: A Beginner’s Guide.]]></title>
            <link>https://medium.com/@kaysadahir/getting-started-with-github-issues-a-beginners-guide-b6e6f3b7d19b?source=rss-b3a52a99a54b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6e6f3b7d19b</guid>
            <category><![CDATA[github-task-tracker]]></category>
            <category><![CDATA[beginners-for-github]]></category>
            <category><![CDATA[github-issue]]></category>
            <category><![CDATA[github-issue-labels]]></category>
            <dc:creator><![CDATA[Kaysa Dahir Ali]]></dc:creator>
            <pubDate>Sat, 11 Jan 2025 01:55:09 GMT</pubDate>
            <atom:updated>2025-01-11T01:55:09.987Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re new to GitHub, it can feel like a lot to take in at first. One of the most powerful features of GitHub is its <strong>Issues</strong> system, which helps you track tasks, bugs, and ideas for your project. But what exactly are GitHub Issues, and how can they help you?</p><p>Let’s break it down simply</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1rlc6xOu81qyMV_zpodHtw.jpeg" /><figcaption>GitHub.</figcaption></figure><h3>What are GitHub Issues?</h3><p>GitHub Issues are like to-do lists for your projects. They allow you to:</p><p><strong>🏷️Track bugs</strong>: If something’s broken, you can create an issue to remind you to fix it.</p><p><strong>🏷️Organize tasks</strong>: Whether it’s a new feature or a small tweak, issues help you stay on top of your work.</p><p><strong>🏷️Collaborate with others</strong>: If you’re working with a team, Issues are a way to communicate what needs to be done and keep everyone on the same page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hrh63FusQQBaDoEeHnv8_g.png" /></figure><h3>Why Use GitHub Issues?</h3><p>When you’re working on a project (especially with a team), it’s easy to forget what needs to be done or miss important details. GitHub Issues solve this problem by giving you a clear, organized way to:</p><p>🏷️Report bugs.</p><p>🏷️Request new features.</p><p>🏷️Track ongoing tasks and progress.</p><h3>How Do GitHub Issues Work?</h3><p><strong>🏷️Creating an Issue</strong>: You can create an issue to report a problem or suggest something new for the project. Think of it as a mini task or bug report.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QTcdjPnQciBm663_XSZ1HQ.png" /></figure><p><strong>🏷️Labels</strong>: These are tags you can add to issues to categorize them (e.g., “bug”, “enhancement”, “question”).</p><p><strong>🏷️Assignees</strong>: You can assign specific team members to an issue so that everyone knows who’s working on what.</p><p><strong>🏷️Comments</strong>: Team members can discuss the issue in the comments, making it easier to communicate without losing track of ideas.</p><p><strong>🏷️Closing Issues</strong>: Once an issue is resolved, you can close it. This helps keep your project clean and organized.</p><h3>A Simple Example</h3><p>Let’s say you’re building a website, and you notice that a button doesn’t work. You create an Issue titled “Fix broken button on homepage”. You then describe the problem in detail, assign it to the developer responsible, and keep track of progress. When the issue is fixed, you can mark it as “closed” — and that’s it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rJIMkV_LAfQ7IEYwkMcPhA.jpeg" /><figcaption>Button.</figcaption></figure><h3>Want to Learn More?</h3><p>If this sounds interesting, and you want to dive deeper into how to use GitHub Issues effectively, check out this detailed guide: <a href="https://openscapes.github.io/series/core-lessons/github/github-issues.html">GitHub Issues: A Core Lesson</a>.</p><p>It’ll walk you through more advanced concepts and tips to make the most of GitHub Issues in your projects!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6e6f3b7d19b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why React and Other Front-End Frameworks Are a Game-Changer for Web Development.]]></title>
            <link>https://medium.com/@kaysadahir/why-react-and-other-front-end-frameworks-are-a-game-changer-for-web-development-d034559ab89c?source=rss-b3a52a99a54b------2</link>
            <guid isPermaLink="false">https://medium.com/p/d034559ab89c</guid>
            <category><![CDATA[front-end-frameworks]]></category>
            <category><![CDATA[vanilla-javascript]]></category>
            <category><![CDATA[single-page-applications]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Kaysa Dahir Ali]]></dc:creator>
            <pubDate>Fri, 10 Jan 2025 15:45:18 GMT</pubDate>
            <atom:updated>2025-01-10T15:45:18.291Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction.</strong></p><p>Have you ever tried building a complex web app using just Vanilla JavaScript? If so, you probably found yourself buried in a sea of messy code and frustrated by how hard it is to keep everything in sync. You’re not alone — this is why front-end frameworks like React exist! In this post, we’re going to explore why web development has evolved from Vanilla JavaScript to React, and why frameworks are now a must-have for any serious developer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JUC7gkG4HZYbTxaSKTSMaA.jpeg" /></figure><p><strong>Server-Side Rendering and Vanilla JavaScript.</strong></p><p>Back in the day, websites were simple. You’d send a request to a server, get a static HTML page in return, and the browser would render it. JavaScript was mainly used for basic interactions — think hover effects, animations, and things like that. jQuery was the go-to tool for making sure your JavaScript worked across all browsers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D1RRXAMsC0P6rzYe0YH6iQ.jpeg" /></figure><p><strong>The Rise of Single Page Applications (SPAs)</strong></p><p>Enter the age of Single Page Applications. With the advent of more interactive and complex web apps, we moved from static sites to client-side rendering. Suddenly, users could click links and submit forms without the page ever refreshing. Websites became more like native applications. But as applications grew in size and complexity, managing all that data started to become a real headache.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*479kqXXJ9ZNBzloSvN18cg.jpeg" /></figure><p><strong>Why Vanilla JavaScript Struggles with Complex UIs.</strong></p><p>Consider the Airbnb app. It’s a masterpiece of interconnected data: dates, locations, search filters, and interactive maps. In a Vanilla JS app, keeping all these data points in sync across the user interface would be nearly impossible. You’d end up with code that’s hard to maintain, prone to bugs, and just plain messy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iai_nWsPu1s5e-xuK0d1RQ.jpeg" /></figure><p><strong>Why React (and Other Frameworks) Are Essential.</strong></p><p>React — and other frameworks like Angular and Vue — solve the <strong>data synchronization nightmare</strong>. They help keep your user interface in <strong>sync</strong> with your data by updating the <strong>UI</strong> automatically whenever data changes. This is a massive win for developers who need to build robust, scalable applications.</p><p>See the comparison of the two in the below code snippet.</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;Vanilla JavaScript Counter&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;div id=&quot;app&quot;&gt;<br>        &lt;p id=&quot;counter&quot;&gt;0&lt;/p&gt;<br>        &lt;button id=&quot;incrementBtn&quot;&gt;Increment&lt;/button&gt;<br>    &lt;/div&gt;<br><br>    &lt;script&gt;<br>        let count = 0;<br>        const counterElement = document.getElementById(&#39;counter&#39;);<br>        const incrementBtn = document.getElementById(&#39;incrementBtn&#39;);<br><br>        incrementBtn.addEventListener(&#39;click&#39;, () =&gt; {<br>            count++;<br>            counterElement.textContent = count;<br>        });<br>    &lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p><strong><em>code above: Vanilla JavaScript.</em></strong></p><pre>import React, { useState } from &#39;react&#39;;<br><br>function Counter() {<br>    const [count, setCount] = useState(0);<br><br>    return (<br>        &lt;div&gt;<br>            &lt;p&gt;{count}&lt;/p&gt;<br>            &lt;button onClick={() =&gt; setCount(count + 1)}&gt;Increment&lt;/button&gt;<br>        &lt;/div&gt;<br>    );<br>}<br><br>export default Counter;</pre><pre>import React from &#39;react&#39;;<br>import ReactDOM from &#39;react-dom&#39;;<br>import Counter from &#39;./Counter&#39;;<br><br>ReactDOM.render(&lt;Counter /&gt;, document.getElementById(&#39;root&#39;));</pre><p><strong><em>Code above : React .</em></strong></p><h3>Explanation.</h3><p><strong>✔️ Vanilla JavaScript</strong>: You need to manually manage the DOM elements, event listeners, and state updates.</p><p><strong>✔️React</strong>: The component-based structure and state management with hooks (useState) make the code more declarative and easier to understand. React handles the DOM updates for you.</p><h4><strong>The Benefits of Using Frameworks: More Than Just Synchronization.</strong></h4><p>Frameworks like <em>React</em> provide more than just automatic data <strong>syncing</strong>. They enforce a <em>solid structure for your code</em>, which makes it easier to manage and scale as your app grows. Plus, when working with a team, everyone follows the same <em>conventions</em>, leading to cleaner, more maintainable code.</p><h4><strong>React’s Popularity and Why It’s Worth Learning.</strong></h4><p>So, why do front-end frameworks like React <strong>exist</strong>? Simply put, they make life easier for developers by solving complex problems like data synchronization and UI updates. React has become one of the most popular frameworks because it’s powerful, efficient, and, most importantly, it allows developers to focus on building amazing apps instead of fighting with code. Ready to dive into React?</p><p>Are you ready to take your web development skills to the next level? Start learning React today and unlock the power to build complex, high-performing applications.</p><p>Let me know your thoughts in the comments below — have you used React yet, or are you just getting started?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d034559ab89c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Full-Stack React and Server-Side Rendering with Next.js]]></title>
            <link>https://medium.com/@kaysadahir/understanding-full-stack-react-and-server-side-rendering-with-next-js-9a22a02d34fc?source=rss-b3a52a99a54b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a22a02d34fc</guid>
            <category><![CDATA[client-side-rendering]]></category>
            <category><![CDATA[server-side-rendering]]></category>
            <category><![CDATA[nextjs]]></category>
            <dc:creator><![CDATA[Kaysa Dahir Ali]]></dc:creator>
            <pubDate>Mon, 06 Jan 2025 17:19:53 GMT</pubDate>
            <atom:updated>2025-01-06T17:19:53.716Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Evolution of Web Rendering.</h3><h4>The Rise of Single-Page Applications.</h4><p>In the old days of <strong>PHP </strong>and <strong>WordPress</strong>, websites were always rendered on the <strong>server</strong> and then sent to the browser. However, as web applications needed to become more dynamic and interactive, the rendering of the application or webpage shifted from the server to the client.</p><h4>Modern Frameworks.</h4><p>In this modern era, we got many frameworks and libraries like Angular, Svelte, Vue, and of course, React. While we still render on the client for many types of applications, there is a shift back to server-side rendering for certain types of apps. This trend is fueled by full-stack React frameworks like Next.js or Remix, and other full-stack frameworks like Nuxt, SvelteKit, or SolidStart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*bS9adJB9bNgdbTSFic56Sg.png" /><figcaption>suspense concept.</figcaption></figure><h4>Client-Side vs. Server-Side Rendering.</h4><h4>Client-Side Rendering.</h4><p>In client-side rendering, the HTML markup is rendered on the client using JavaScript. This approach leads to slow initial page loads because the JavaScript bundle required to render the app might be quite large and must be completely downloaded before anything else can happen on the page. However, it provides a highly interactive user experience after the initial page load.</p><h4>Server-Side Rendering.</h4><p>In server-side rendering, the HTML is generated upfront on a web server, and the server sends the already generated website to the client whenever it’s requested. This approach results in much faster initial page loads because a lot less JavaScript needs to be downloaded, and the necessary data for each page is downloaded on the server before the HTML is generated.</p><h4>SEO and Rendering.</h4><p>Server-side rendering shines in terms of SEO because pre-generated content is much easier for search engines like Google to index. In contrast, client-side rendering might result in search engines finding a blank page when they try to index the site, which is problematic if SEO is a concern.</p><h4>Static vs. Dynamic Server-Side Rendering.</h4><h4>Static Rendering.</h4><p>In static rendering, also known as Static Site Generation, the HTML is generated at build time. The developer exports the site into static HTML, CSS, and JavaScript files, which are then deployed onto a web server.</p><h4>Dynamic Rendering.</h4><p>In dynamic rendering, the server generates new HTML each time a new request hits the server. This approach is great when the underlying data changes often and is considered by some to be the only true server-side rendering.</p><h4>Conclusion.</h4><p>Server-side rendering is useful in content-heavy sites where users don’t want to wait for all the content to appear. It provides faster initial page loads and better SEO. However, client-side rendering is perfect for highly interactive single-page applications where SEO doesn’t matter.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a22a02d34fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Node.js: What It Is and How It Works.]]></title>
            <link>https://medium.com/@kaysadahir/understanding-node-js-what-it-is-and-how-it-works-03dd21167301?source=rss-b3a52a99a54b------2</link>
            <guid isPermaLink="false">https://medium.com/p/03dd21167301</guid>
            <category><![CDATA[node-js-development]]></category>
            <category><![CDATA[backend]]></category>
            <dc:creator><![CDATA[Kaysa Dahir Ali]]></dc:creator>
            <pubDate>Mon, 06 Jan 2025 16:11:50 GMT</pubDate>
            <atom:updated>2025-01-06T16:11:50.326Z</atom:updated>
            <content:encoded><![CDATA[<p>Node.js is an <strong>open-source</strong>, <strong>cross-platform</strong> JavaScript runtime environment that allows developers to execute JavaScript code outside of a web browser. It is built on <strong>Chrome’s V8</strong> JavaScript engine, which makes it fast and efficient. Node.js is commonly used for building scalable network applications, particularly web servers and real-time applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5WsYddD43DQ5-tjzz_2eBg.png" /></figure><h3><strong>Key Features of Node.js.</strong></h3><p>1. <strong>Asynchronous and Event-Driven</strong>: Node.js uses an event-driven, non-blocking I/O model, which makes it lightweight and efficient. This allows Node.js to handle multiple connections simultaneously without being blocked by any single operation.</p><p>2. <strong>Single-Threaded</strong>: Node.js operates on a single-threaded event loop, which means it can handle multiple requests concurrently without creating new threads for each request. This reduces the overhead associated with thread management and improves performance.</p><p>3. <strong>NPM (Node Package Manager)</strong>: Node.js comes with a built-in package manager called NPM, which provides access to a vast ecosystem of open-source libraries and modules. This makes it easy for developers to share and reuse code.</p><p>4. <strong>Cross-Platform</strong>: Node.js can run on various operating systems, including Windows, macOS, and Linux, making it a versatile choice for developers.</p><h3><strong>How Node.js Works</strong></h3><p>Node.js uses an <strong>event-driven architecture</strong>, where an event loop continuously listens for and processes events. When an event occurs, such as a request from a client, Node.js triggers a callback function to handle the event. This non-blocking approach allows Node.js to handle a large number of concurrent connections efficiently.</p><p>Here’s a simple example of a Node.js server:</p><pre>const http = require(&#39;http&#39;);<br><br>const server = http.createServer((req, res) =&gt; {<br>  res.statusCode = 200;<br>  res.setHeader(&#39;Content-Type&#39;, &#39;text/plain&#39;);<br>  res.end(&#39;Hello, World!\n&#39;);<br>});<br><br>const PORT = 3000;<br>server.listen(PORT, () =&gt; {<br>  console.log(`Server running at http://localhost:${PORT}/`);<br>});</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03dd21167301" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>