<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Generics on AI VOID</title><link>https://ai-blog.noorshomelab.dev/tags/generics/</link><description>Recent content in Generics on AI VOID</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 20 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ai-blog.noorshomelab.dev/tags/generics/index.xml" rel="self" type="application/rss+xml"/><item><title>Chapter 2: Generics, Unions, Intersections &amp;amp; Type Guards</title><link>https://ai-blog.noorshomelab.dev/typescript-architect-prep-2026/generics-unions-intersections-type-guards/</link><pubDate>Wed, 14 Jan 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/typescript-architect-prep-2026/generics-unions-intersections-type-guards/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Welcome to Chapter 2 of your comprehensive TypeScript interview preparation guide! This chapter dives deep into four fundamental concepts that are crucial for writing robust, flexible, and type-safe TypeScript applications: Generics, Union Types, Intersection Types, and Type Guards (also known as Type Narrowing). Mastering these concepts is essential for any TypeScript developer, especially those aiming for mid-level to architect roles, as they empower you to create highly reusable components, handle diverse data structures gracefully, and ensure compile-time type safety in complex scenarios.&lt;/p&gt;</description></item><item><title>Chapter 5: Flexible Types: Understanding Generics</title><link>https://ai-blog.noorshomelab.dev/ts-mastery-2025/flexible-types-understanding-generics/</link><pubDate>Fri, 05 Dec 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/ts-mastery-2025/flexible-types-understanding-generics/</guid><description>&lt;h2 id="chapter-5-flexible-types-understanding-generics"&gt;Chapter 5: Flexible Types: Understanding Generics&lt;/h2&gt;
&lt;p&gt;Welcome back, coding champions! In our journey to TypeScript mastery, we&amp;rsquo;ve explored basic types, functions, and interfaces, laying a solid foundation. You&amp;rsquo;ve learned how to give your JavaScript code superpowers by explicitly defining its shape and behavior. But what if you want to write code that works with &lt;em&gt;many&lt;/em&gt; different types, without losing TypeScript&amp;rsquo;s incredible type-safety?&lt;/p&gt;
&lt;p&gt;This is where &lt;strong&gt;Generics&lt;/strong&gt; come into play! Think of them as super-flexible blueprints or customizable molds. They allow you to write functions, classes, and interfaces that can adapt to work with any data type you throw at them, all while keeping TypeScript&amp;rsquo;s watchful eye on your code. By the end of this chapter, you&amp;rsquo;ll understand why generics are a cornerstone of robust, reusable, and truly production-ready TypeScript applications. You&amp;rsquo;ll move from defining specific types to crafting highly adaptable and type-safe components.&lt;/p&gt;</description></item><item><title>Chapter 7: Traits: Defining Shared Behavior and Polymorphism</title><link>https://ai-blog.noorshomelab.dev/rust-mastery-2026/traits-shared-behavior/</link><pubDate>Fri, 20 Mar 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/rust-mastery-2026/traits-shared-behavior/</guid><description>&lt;h2 id="chapter-7-traits-defining-shared-behavior-and-polymorphism"&gt;Chapter 7: Traits: Defining Shared Behavior and Polymorphism&lt;/h2&gt;
&lt;p&gt;Welcome back, Rustacean! In our journey so far, we&amp;rsquo;ve learned how to define custom data structures using &lt;code&gt;struct&lt;/code&gt;s and &lt;code&gt;enum&lt;/code&gt;s. These are fantastic for organizing data, but what about behavior? How do we define a set of actions that different types can share, or ensure that a function can operate on &lt;em&gt;any&lt;/em&gt; type that possesses a certain capability?&lt;/p&gt;
&lt;p&gt;This is where &lt;strong&gt;traits&lt;/strong&gt; come into play! Think of traits as Rust&amp;rsquo;s powerful way to define shared behavior. They are similar to interfaces in other languages (like Java or Go) or typeclasses in Haskell. Traits allow you to tell the Rust compiler: &amp;ldquo;Any type that implements &lt;em&gt;this&lt;/em&gt; trait promises to have &lt;em&gt;these&lt;/em&gt; methods.&amp;rdquo; This chapter will demystify traits, showing you how they enable polymorphism, promote code reuse, and are fundamental to writing idiomatic and extensible Rust applications.&lt;/p&gt;</description></item><item><title>Intermediate Topics: Traits and Generics</title><link>https://ai-blog.noorshomelab.dev/rust-guide/intermediate-traits-generics/</link><pubDate>Sat, 25 Oct 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/rust-guide/intermediate-traits-generics/</guid><description>&lt;h1 id="intermediate-topics-traits-and-generics"&gt;Intermediate Topics: Traits and Generics&lt;/h1&gt;
&lt;p&gt;Traits and generics are two of Rust&amp;rsquo;s most powerful features, enabling you to write flexible, reusable code without sacrificing performance or type safety. They are the foundation of Rust&amp;rsquo;s unique approach to polymorphism and abstraction.&lt;/p&gt;
&lt;h2 id="generics-type-parameters-for-flexible-code"&gt;Generics: Type Parameters for Flexible Code&lt;/h2&gt;
&lt;p&gt;Generics allow you to write code that works with multiple types while maintaining type safety. Instead of writing separate functions or structs for each type, you can use placeholders for types.&lt;/p&gt;</description></item><item><title>Chapter 9: Flexible Code: Generics</title><link>https://ai-blog.noorshomelab.dev/java-mastery-2025/chapter-9-generics/</link><pubDate>Thu, 04 Dec 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/java-mastery-2025/chapter-9-generics/</guid><description>&lt;h2 id="chapter-9-flexible-code-generics"&gt;Chapter 9: Flexible Code: Generics&lt;/h2&gt;
&lt;p&gt;Welcome back, intrepid Java adventurer! In our journey so far, we&amp;rsquo;ve learned how to build classes, create objects, and manage collections of data. You&amp;rsquo;re getting good at writing code that &lt;em&gt;works&lt;/em&gt;. But what if we told you there&amp;rsquo;s a way to write code that&amp;rsquo;s not just functional, but also incredibly flexible, robust, and safe?&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s precisely what Generics allow us to do! In this chapter, we&amp;rsquo;re going to dive deep into Generics, a powerful feature introduced in Java 5, which allows you to write classes, interfaces, and methods that operate on objects of various types while providing compile-time type safety. Think of it as writing a blueprint that can be adapted to handle different materials without having to redraw the entire plan each time. By the end of this chapter, you&amp;rsquo;ll understand why Generics are indispensable for modern Java development, helping you prevent common errors and create highly reusable components.&lt;/p&gt;</description></item><item><title>Chapter 11: Generics - Flexible &amp;amp; Reusable Code</title><link>https://ai-blog.noorshomelab.dev/mastering-swift-2026/11-generics-flexible-reusable-code/</link><pubDate>Thu, 26 Feb 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/mastering-swift-2026/11-generics-flexible-reusable-code/</guid><description>&lt;h2 id="chapter-11-generics---flexible--reusable-code"&gt;Chapter 11: Generics - Flexible &amp;amp; Reusable Code&lt;/h2&gt;
&lt;p&gt;Welcome back, intrepid Swift explorer! In our journey so far, we&amp;rsquo;ve learned how to define types, control program flow, handle errors, and manage collections. But what if you find yourself writing very similar code for different data types? For instance, a function that swaps two &lt;code&gt;Int&lt;/code&gt; values, and then another nearly identical one to swap two &lt;code&gt;String&lt;/code&gt; values? That&amp;rsquo;s where generics come to the rescue!&lt;/p&gt;</description></item><item><title>A Comprehensive Guide to Teach me Swift programming from absolute beginner to advanced mastery as a strong foundation for iOS development, starting with language fundamentals, syntax, types, control flow, functions, optionals, error handling, collections, and memory management, then progressing into advanced topics such as protocols, generics, extensions, closures, concurrency with async/await, actors, structured concurrency, performance considerations, and Swift internals, with a strong focus on writing clean, safe, and idiomatic Swift code, including real-world examples, debugging strategies, testing, best practices, common pitfalls, and progressively complex mini-projects that demonstrate how Swift is used in real applications, ensuring deep conceptual understanding and confidence so that the learner is fully prepared to build production-grade iOS applications as of January 2026. Chapters</title><link>https://ai-blog.noorshomelab.dev/mastering-swift-2026/</link><pubDate>Thu, 26 Feb 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/mastering-swift-2026/</guid><description>&lt;p&gt;This comprehensive collection of chapters guides you through Swift programming, from fundamental concepts to advanced mastery, specifically tailored for iOS development. Explore language features, concurrency patterns, and best practices, reinforced with real-world examples and mini-projects. Prepare to confidently build production-grade iOS applications by January 2026.&lt;/p&gt;</description></item></channel></rss>