<?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>DEV Community: Olumuyiwa Afolabi</title>
    <description>The latest articles on DEV Community by Olumuyiwa Afolabi (@penielx).</description>
    <link>https://dev.to/penielx</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%2F1026264%2F394ea355-ddbd-416e-b29d-2bc4fa74fb6a.jpeg</url>
      <title>DEV Community: Olumuyiwa Afolabi</title>
      <link>https://dev.to/penielx</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/penielx"/>
    <language>en</language>
    <item>
      <title>Build "Who Wants to Be a Millionaire" Using JavaScript</title>
      <dc:creator>Olumuyiwa Afolabi</dc:creator>
      <pubDate>Wed, 09 Oct 2024 16:45:38 +0000</pubDate>
      <link>https://dev.to/penielx/build-who-wants-to-be-a-millionaire-using-javascript-ep0</link>
      <guid>https://dev.to/penielx/build-who-wants-to-be-a-millionaire-using-javascript-ep0</guid>
      <description>&lt;p&gt;Creating a game based on the popular quiz show "Who Wants to Be a Millionaire" is an excellent way to practice JavaScript skills while building something fun and interactive. This blog post will walk you through how to build this game, complete with a timer, lifelines, and a scoring system.&lt;/p&gt;

&lt;p&gt;Key Features of the Game&lt;br&gt;
Multiple Choice Questions: Players can select answers from four options.&lt;br&gt;
Timer: Players have 30 seconds to answer each question.&lt;br&gt;
Lifelines: Players can use lifelines such as 50:50, Ask the Audience, and Call a Friend.&lt;br&gt;
Scoring System: Players earn points based on the number of questions answered correctly.&lt;br&gt;
Audio Effects: The game features sound effects for correct and wrong answers, as well as background music.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;html

&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;meta name="author" content="Your Name"&amp;gt;
    &amp;lt;title&amp;gt;Who Wants To Be A Millionaire&amp;lt;/title&amp;gt;
    &amp;lt;link rel="stylesheet" href="style.css"&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;main class="container"&amp;gt;
        &amp;lt;!-- Start Page --&amp;gt;
        &amp;lt;section class="start-box custom"&amp;gt;
            &amp;lt;div class="game-logo"&amp;gt;
                &amp;lt;img src="img/logo.png" alt="logo"&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div class="instruction"&amp;gt;
                &amp;lt;h3&amp;gt;Instructions&amp;lt;/h3&amp;gt;
                &amp;lt;ul class="instruction-list"&amp;gt;
                    &amp;lt;li&amp;gt;30 seconds to answer each question&amp;lt;/li&amp;gt;
                    &amp;lt;li&amp;gt;Game over conditions include:
                        &amp;lt;ul&amp;gt;
                            &amp;lt;li&amp;gt;Time elapses&amp;lt;/li&amp;gt;
                            &amp;lt;li&amp;gt;Answer is wrong&amp;lt;/li&amp;gt;
                            &amp;lt;li&amp;gt;All questions have been answered&amp;lt;/li&amp;gt;
                        &amp;lt;/ul&amp;gt;
                    &amp;lt;/li&amp;gt;
                    &amp;lt;li&amp;gt;Guarantee prizes at questions 1, 10, 15&amp;lt;/li&amp;gt;
                    &amp;lt;li&amp;gt;Wrong answer results in winning the last guaranteed prize&amp;lt;/li&amp;gt;
                    &amp;lt;li&amp;gt;Lifelines available:
                        &amp;lt;ul&amp;gt;
                            &amp;lt;li&amp;gt;50:50 =&amp;gt; Removes two wrong answers&amp;lt;/li&amp;gt;
                            &amp;lt;li&amp;gt;Ask the Audience&amp;lt;/li&amp;gt;
                            &amp;lt;li&amp;gt;Call a Friend&amp;lt;/li&amp;gt;
                        &amp;lt;/ul&amp;gt;
                    &amp;lt;/li&amp;gt;
                &amp;lt;/ul&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div class="user-info"&amp;gt;
                &amp;lt;div class="start-game-btn btn"&amp;gt;Start game&amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/section&amp;gt;
        &amp;lt;!-- Main Game Page --&amp;gt;
        &amp;lt;section class="game-box custom"&amp;gt;
            &amp;lt;div class="game"&amp;gt;
                &amp;lt;div class="timer"&amp;gt;30&amp;lt;/div&amp;gt;
                &amp;lt;div class="current-question-amount"&amp;gt;&amp;lt;/div&amp;gt;
                &amp;lt;div class="life-line-display-box"&amp;gt;
                    &amp;lt;div class="call"&amp;gt;
                        &amp;lt;img src="img/call.png" alt="call"&amp;gt;
                        &amp;lt;div class="call-answer"&amp;gt;&amp;lt;/div&amp;gt;
                    &amp;lt;/div&amp;gt;
                    &amp;lt;div class="au-cover"&amp;gt;
                        &amp;lt;h4 class="alpha"&amp;gt;ABCD&amp;lt;/h4&amp;gt;
                        &amp;lt;div class="au-container"&amp;gt;
                            &amp;lt;div class="au-box" id="0"&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;div class="bx"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
                            &amp;lt;div class="au-box" id="1"&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;div class="bx"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
                            &amp;lt;div class="au-box" id="2"&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;div class="bx"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
                            &amp;lt;div class="au-box" id="3"&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;div class="bx"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
                        &amp;lt;/div&amp;gt;
                    &amp;lt;/div&amp;gt;
                &amp;lt;/div&amp;gt;
                &amp;lt;div class="question"&amp;gt;
                    &amp;lt;div class="question-text"&amp;gt;&amp;lt;/div&amp;gt;
                    &amp;lt;div class="options"&amp;gt;
                        &amp;lt;div class="option" id="0"&amp;gt;Option 1&amp;lt;/div&amp;gt;
                        &amp;lt;div class="option" id="1"&amp;gt;Option 2&amp;lt;/div&amp;gt;
                        &amp;lt;div class="option" id="2"&amp;gt;Option 3&amp;lt;/div&amp;gt;
                        &amp;lt;div class="option" id="3"&amp;gt;Option 4&amp;lt;/div&amp;gt;
                    &amp;lt;/div&amp;gt;
                &amp;lt;/div&amp;gt;
                &amp;lt;div class="next-question-btn btn"&amp;gt;Next Question&amp;lt;/div&amp;gt;
                &amp;lt;div class="playAgain-btn btn"&amp;gt;Play Again&amp;lt;/div&amp;gt;
                &amp;lt;div class="amount-won"&amp;gt;&amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/section&amp;gt;
    &amp;lt;/main&amp;gt;
    &amp;lt;script src="script.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Download the Full source code here: [&lt;a href="https://producators.com/Build-Who-Wants-to-Be-a-Millionaire-Using-JavaScript-Complete-Source-Code-" rel="noopener noreferrer"&gt;https://producators.com/Build-Who-Wants-to-Be-a-Millionaire-Using-JavaScript-Complete-Source-Code-&lt;/a&gt;]&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>html</category>
    </item>
    <item>
      <title>Supercharge Your ASP.NET Web API with Linq.Dynamic.Core</title>
      <dc:creator>Olumuyiwa Afolabi</dc:creator>
      <pubDate>Tue, 01 Oct 2024 21:57:24 +0000</pubDate>
      <link>https://dev.to/penielx/supercharge-your-aspnet-web-api-with-linqdynamiccore-hml</link>
      <guid>https://dev.to/penielx/supercharge-your-aspnet-web-api-with-linqdynamiccore-hml</guid>
      <description>&lt;p&gt;Building efficient APIs with ASP.NET Web API is already a powerful approach for modern application development. However, by leveraging Linq.Dynamic.Core, you can take your APIs to the next level, offering dynamic query generation, filtering, sorting, and more—all while reducing boilerplate code.&lt;/p&gt;

&lt;p&gt;The Real-Life Analogy: Cooking with a Recipe vs. Cooking with Ingredients&lt;br&gt;
Think of Linq.Dynamic.Core as cooking with a dynamic set of ingredients versus strictly following a recipe. With a recipe, you know exactly what to do—step-by-step. This is similar to using static queries in your API, where the filtering, sorting, and conditions are hardcoded.&lt;/p&gt;

&lt;p&gt;Setting up Linq.Dynamic.Core&lt;/p&gt;

&lt;p&gt;Install-Package System.Linq.Dynamic.Core &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros and Cons of Using Linq.Dynamic.Core&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pros:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Flexibility&lt;/strong&gt;: Allows users to generate dynamic queries at runtime without the need for predefined query logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code Reduction&lt;/strong&gt;: Minimizes the boilerplate code you need to write for sorting, filtering, and pagination.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Powerful Querying&lt;/strong&gt;: Supports complex expressions including joins, subqueries, and dynamic projections.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt;: Since queries are composed on the database side, the performance overhead is generally minimal.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Cons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Runtime Errors: Since queries are built dynamically, any errors in user input (e.g., invalid expressions) will result in runtime errors, not compile-time errors.&lt;/li&gt;
&lt;li&gt;Security: Allowing direct input from users for filtering and sorting can be risky if not properly sanitized. Always validate and sanitize input to avoid issues like SQL injection.&lt;/li&gt;
&lt;li&gt;Learning Curve: While powerful, it requires developers to become familiar with writing expressions in string form and managing runtime queries.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Read More and Download the source code here: [&lt;a href="https://producators.com/Supercharge-Your-ASP-NET-Web-API-with-Linq-Dynamic-Core-Source-Code-" rel="noopener noreferrer"&gt;https://producators.com/Supercharge-Your-ASP-NET-Web-API-with-Linq-Dynamic-Core-Source-Code-&lt;/a&gt;]&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What’s New in Dependency Injection for .NET 9’s Built-In DI Container, and Why You Should Start Using It</title>
      <dc:creator>Olumuyiwa Afolabi</dc:creator>
      <pubDate>Thu, 26 Sep 2024 21:27:26 +0000</pubDate>
      <link>https://dev.to/penielx/whats-new-in-dependency-injection-for-net-9s-built-in-di-container-and-why-you-should-start-using-it-357b</link>
      <guid>https://dev.to/penielx/whats-new-in-dependency-injection-for-net-9s-built-in-di-container-and-why-you-should-start-using-it-357b</guid>
      <description>&lt;p&gt;With .NET 9, the Dependency Injection container just got better with source generation, AOT optimization, and smarter diagnostics. Learn how these features can improve your app performance&lt;/p&gt;

&lt;p&gt;What’s Actually New in .NET 9’s DI?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Improved TryAdd Methods for Service Registration&lt;/li&gt;
&lt;li&gt;Improved Diagnostics for DI&lt;/li&gt;
&lt;li&gt;Improved Source-Generated Dependency Injection&lt;/li&gt;
&lt;li&gt;Native Support for AOT (Ahead-of-Time) Compilation&lt;/li&gt;
&lt;li&gt;Improved Support for Minimal APIs&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why You Should Start Using These Features&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Performance Gains&lt;/li&gt;
&lt;li&gt;Better Debugging and Diagnostics&lt;/li&gt;
&lt;li&gt;Improved Developer Experience&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Best Practices for Dependency Injection in .NET 9&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Leverage Source Generation&lt;/li&gt;
&lt;li&gt;Use TryAdd for Conditional Registration&lt;/li&gt;
&lt;li&gt;Avoid Service Locators:&lt;/li&gt;
&lt;li&gt;Monitor with DI Diagnostics&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;View sample code here: [&lt;a href="https://producators.com/What-s-New-in-Dependency-Injection-for-NET-9-s-Built-In-DI-Container-and-Why-You-Should-Start-Using-It" rel="noopener noreferrer"&gt;https://producators.com/What-s-New-in-Dependency-Injection-for-NET-9-s-Built-In-DI-Container-and-Why-You-Should-Start-Using-It&lt;/a&gt;]&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>programming</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>Async/Await Best Practices: Mastering Asynchronous Programming in C#</title>
      <dc:creator>Olumuyiwa Afolabi</dc:creator>
      <pubDate>Thu, 26 Sep 2024 20:53:26 +0000</pubDate>
      <link>https://dev.to/penielx/asyncawait-best-practices-mastering-asynchronous-programming-in-c-4i0g</link>
      <guid>https://dev.to/penielx/asyncawait-best-practices-mastering-asynchronous-programming-in-c-4i0g</guid>
      <description>&lt;p&gt;Asynchronous programming in C# has been greatly simplified with the introduction of the async and await keywords. By allowing asynchronous operations to be run without blocking threads, we can achieve efficient, responsive applications. However, there are common pitfalls and best practices to ensure that your code runs smoothly and efficiently.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Always Use async and await for Asynchronous Work, Not Threads&lt;/li&gt;
&lt;li&gt;Use try/catch for Error Handling in Async Methods&lt;/li&gt;
&lt;li&gt;Avoid Using await in Loops&lt;/li&gt;
&lt;li&gt;Don’t Use async void Except for Event Handlers&lt;/li&gt;
&lt;li&gt;Avoid Blocking the Main Thread with Result or Wait()&lt;/li&gt;
&lt;li&gt;Use ConfigureAwait(false) for Library Code&lt;/li&gt;
&lt;li&gt;Return Task Instead of void for Asynchronous Methods&lt;/li&gt;
&lt;li&gt;Leverage Task.WhenAny() for Timeout Operations&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Source: [&lt;a href="https://producators.com/Async-Await-Best-Practices-Mastering-Asynchronous-Programming-in-C-" rel="noopener noreferrer"&gt;https://producators.com/Async-Await-Best-Practices-Mastering-Asynchronous-Programming-in-C-&lt;/a&gt;]&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>dotnet</category>
      <category>react</category>
    </item>
    <item>
      <title>How Generative AI Works: Understanding the Magic Behind AI Creativity</title>
      <dc:creator>Olumuyiwa Afolabi</dc:creator>
      <pubDate>Mon, 23 Sep 2024 23:36:06 +0000</pubDate>
      <link>https://dev.to/penielx/how-generative-ai-works-understanding-the-magic-behind-ai-creativity-4edj</link>
      <guid>https://dev.to/penielx/how-generative-ai-works-understanding-the-magic-behind-ai-creativity-4edj</guid>
      <description>&lt;p&gt;It was a rainy afternoon when Ada, a software engineer working at a fast-growing tech startup, stumbled upon the concept of "Generative  AI." Her task was to build a  chatbot that could do more than answer pre-set questions—it had to understand context, create realistic responses, and adapt to user inputs in a dynamic conversation. The only way to achieve that was by harnessing the power of Generative AI. As she dove into this mysterious world, she discovered how it mimicked human-like creativity and learned to generate everything from text to images.&lt;/p&gt;

&lt;p&gt;This article explores how generative AI works and how it has become a crucial technology in modern-day artificial intelligence. Let’s walk through Ada's journey and break it down step by step.&lt;/p&gt;

&lt;p&gt;What Is Generative AI?&lt;br&gt;
Generative AI refers to machine learning models designed to create new data that resembles the data it was trained on. It can generate text, images, audio, or even video by learning from patterns in massive datasets.&lt;/p&gt;

&lt;p&gt;For example, tools like GPT (Generative Pre-trained Transformer) can write coherent essays or have a human-like conversation, while DALL·E can generate highly detailed images based on textual descriptions.&lt;/p&gt;

&lt;p&gt;Read More: [&lt;a href="https://producators.com/How-Generative-AI-Works-Understanding-the-Magic-Behind-AI-Creativity" rel="noopener noreferrer"&gt;https://producators.com/How-Generative-AI-Works-Understanding-the-Magic-Behind-AI-Creativity&lt;/a&gt;]&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>programming</category>
      <category>python</category>
    </item>
    <item>
      <title>Top 20 NuGet Packages You Must Add to Your .NET Application</title>
      <dc:creator>Olumuyiwa Afolabi</dc:creator>
      <pubDate>Mon, 23 Sep 2024 23:31:50 +0000</pubDate>
      <link>https://dev.to/penielx/top-20-nuget-packages-you-must-add-to-your-net-application-51i0</link>
      <guid>https://dev.to/penielx/top-20-nuget-packages-you-must-add-to-your-net-application-51i0</guid>
      <description>&lt;p&gt;NuGet is the official package manager for .NET. It provides developers with a vast array of libraries, tools, and extensions that enhance productivity, optimize code, and solve real-world problems. As a .NET developer, integrating the right NuGet packages can make your application more efficient, secure, and scalable.&lt;/p&gt;

&lt;p&gt;In this article, we'll explore the top 20 NuGet packages that you should consider adding to your .NET application. We’ll provide examples and step-by-step solutions to demonstrate how these packages can improve your development process.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Newtonsoft.Json&lt;/li&gt;
&lt;li&gt;Serilog&lt;/li&gt;
&lt;li&gt;Entity Framework Core&lt;/li&gt;
&lt;li&gt;AutoMapper&lt;/li&gt;
&lt;li&gt;Polly&lt;/li&gt;
&lt;li&gt;FluentValidation&lt;/li&gt;
&lt;li&gt;Swashbuckle.AspNetCore&lt;/li&gt;
&lt;li&gt;MediatR&lt;/li&gt;
&lt;li&gt;NLog&lt;/li&gt;
&lt;li&gt;Dapper&lt;/li&gt;
&lt;li&gt;Hangfire&lt;/li&gt;
&lt;li&gt;xUnit&lt;/li&gt;
&lt;li&gt;IdentityServer4&lt;/li&gt;
&lt;li&gt;Refit&lt;/li&gt;
&lt;li&gt;MiniProfiler&lt;/li&gt;
&lt;li&gt;NSwag&lt;/li&gt;
&lt;li&gt;Elasticsearch.Net&lt;/li&gt;
&lt;li&gt;MassTransit&lt;/li&gt;
&lt;li&gt;Quartz.NET&lt;/li&gt;
&lt;li&gt;MailKit&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Source: [&lt;a href="https://producators.com/Top-20-NuGet-Packages-You-Must-Add-to-Your-NET-Application" rel="noopener noreferrer"&gt;https://producators.com/Top-20-NuGet-Packages-You-Must-Add-to-Your-NET-Application&lt;/a&gt;]&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>aspnet</category>
      <category>csharp</category>
      <category>dotnet</category>
    </item>
  </channel>
</rss>
