<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Code Reusability on AI VOID</title><link>https://ai-blog.noorshomelab.dev/tags/code-reusability/</link><description>Recent content in Code Reusability on AI VOID</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 26 Feb 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ai-blog.noorshomelab.dev/tags/code-reusability/index.xml" rel="self" type="application/rss+xml"/><item><title>Chapter 4: Functions - Building Reusable Code</title><link>https://ai-blog.noorshomelab.dev/mastering-swift-2026/04-functions-building-reusable-code/</link><pubDate>Thu, 26 Feb 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/mastering-swift-2026/04-functions-building-reusable-code/</guid><description>&lt;h2 id="introduction-your-codes-superpowers--functions"&gt;Introduction: Your Code&amp;rsquo;s Superpowers – Functions!&lt;/h2&gt;
&lt;p&gt;Welcome back, aspiring Swift developer! In our previous chapters, we learned about the fundamental building blocks of Swift: variables, constants, and basic data types. We also explored how to control the flow of our programs using conditionals and loops. You&amp;rsquo;ve already started writing code that makes decisions and repeats actions, which is fantastic!&lt;/p&gt;
&lt;p&gt;Now, get ready to unlock one of the most powerful tools in any programmer&amp;rsquo;s toolkit: &lt;strong&gt;functions&lt;/strong&gt;. Imagine you have a complex task you need to perform multiple times, perhaps calculating an average score or formatting a user&amp;rsquo;s name. Would you write the same lines of code over and over again? Absolutely not! That&amp;rsquo;s where functions come in.&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>Chapter 12: Custom Hooks: Reusing Logic Across Components</title><link>https://ai-blog.noorshomelab.dev/react-mastery-2026/chapter-12-custom-hooks-reusing-logic/</link><pubDate>Sat, 31 Jan 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/react-mastery-2026/chapter-12-custom-hooks-reusing-logic/</guid><description>&lt;h2 id="chapter-12-custom-hooks-reusing-logic-across-components"&gt;Chapter 12: Custom Hooks: Reusing Logic Across Components&lt;/h2&gt;
&lt;p&gt;Welcome back, intrepid React developer! In previous chapters, we&amp;rsquo;ve explored the fundamental built-in Hooks like &lt;code&gt;useState&lt;/code&gt; and &lt;code&gt;useEffect&lt;/code&gt;, which revolutionized how we manage state and side effects in functional components. You&amp;rsquo;ve seen how powerful they are for managing component-specific logic.&lt;/p&gt;
&lt;p&gt;But what happens when you find yourself writing the &lt;em&gt;same&lt;/em&gt; &lt;code&gt;useState&lt;/code&gt; and &lt;code&gt;useEffect&lt;/code&gt; logic in multiple components? Perhaps you have several components that all need to fetch data from a similar API endpoint, or they all need to manage a toggle state with similar side effects. Copy-pasting code is a common anti-pattern that leads to &amp;ldquo;boilerplate&amp;rdquo; and makes your application harder to maintain.&lt;/p&gt;</description></item></channel></rss>