<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Control Flow on AI VOID</title><link>https://ai-blog.noorshomelab.dev/tags/control-flow/</link><description>Recent content in Control Flow on AI VOID</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 17 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ai-blog.noorshomelab.dev/tags/control-flow/index.xml" rel="self" type="application/rss+xml"/><item><title>Chapter 2: Swift Language Essentials for iOS</title><link>https://ai-blog.noorshomelab.dev/ios-pro-dev-2026-guide/swift-language-essentials/</link><pubDate>Thu, 26 Feb 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/ios-pro-dev-2026-guide/swift-language-essentials/</guid><description>&lt;h2 id="introduction-your-first-steps-with-swift"&gt;Introduction: Your First Steps with Swift!&lt;/h2&gt;
&lt;p&gt;Welcome back, future iOS developer! In Chapter 1, you got your development environment set up with Xcode, the powerful IDE (Integrated Development Environment) where all the magic happens. Now, it&amp;rsquo;s time to dive into the heart of iOS development: &lt;strong&gt;Swift&lt;/strong&gt;, Apple&amp;rsquo;s modern, powerful, and intuitive programming language.&lt;/p&gt;
&lt;p&gt;This chapter is your friendly guide to the absolute essentials of Swift. Think of it as learning the alphabet and basic grammar before you write your first novel. We&amp;rsquo;ll cover fundamental concepts that are the building blocks of every iOS app, from defining values to making your code smart enough to make decisions. By the end, you&amp;rsquo;ll not only understand &lt;em&gt;what&lt;/em&gt; these concepts are but also &lt;em&gt;why&lt;/em&gt; they&amp;rsquo;re crucial for building robust and reliable apps. Get ready to start coding and see your ideas come to life!&lt;/p&gt;</description></item><item><title>Chapter 3: Variables, Data Types, and Control Flow in Rust</title><link>https://ai-blog.noorshomelab.dev/rust-mastery-2026/variables-datatypes-control-flow/</link><pubDate>Fri, 20 Mar 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/rust-mastery-2026/variables-datatypes-control-flow/</guid><description>&lt;h2 id="introduction-the-building-blocks-of-any-program"&gt;Introduction: The Building Blocks of Any Program&lt;/h2&gt;
&lt;p&gt;Welcome back, fellow Rustaceans! In the previous chapters, we established our Rust development environment using &lt;code&gt;rustup&lt;/code&gt;, explored the &lt;code&gt;cargo&lt;/code&gt; build system, and crafted our inaugural &amp;ldquo;Hello, world!&amp;rdquo; program. Now, it&amp;rsquo;s time to delve deeper into the fundamental concepts that form the backbone of any software application: &lt;strong&gt;variables&lt;/strong&gt;, &lt;strong&gt;data types&lt;/strong&gt;, &lt;strong&gt;functions&lt;/strong&gt;, and &lt;strong&gt;control flow&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Think of variables as named containers that hold pieces of information, while data types define the specific kind of information those containers can store – be it whole numbers, text, or true/false values. Functions are reusable blocks of code that perform specific tasks, allowing you to organize your logic. Finally, control flow dictates the order in which your program executes different code segments, enabling it to make decisions and repeat actions. Mastering these concepts is paramount, as they are the foundational elements upon which all complex and robust applications are constructed.&lt;/p&gt;</description></item><item><title>Chapter 3: Operators, Conditionals &amp;amp; Loops</title><link>https://ai-blog.noorshomelab.dev/mastering-swift-2026/03-operators-conditionals-loops/</link><pubDate>Thu, 26 Feb 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/mastering-swift-2026/03-operators-conditionals-loops/</guid><description>&lt;h2 id="chapter-3-operators-conditionals--loops"&gt;Chapter 3: Operators, Conditionals &amp;amp; Loops&lt;/h2&gt;
&lt;p&gt;Welcome back, aspiring Swift developer! In the previous chapters, we laid the groundwork by understanding what Swift is, how to set up your environment, and how to work with variables, constants, and basic data types. Now, it&amp;rsquo;s time to bring our code to life and make it &lt;em&gt;do&lt;/em&gt; things!&lt;/p&gt;
&lt;p&gt;This chapter is all about teaching your programs how to perform calculations, make decisions, and repeat actions. We&amp;rsquo;ll explore &lt;strong&gt;operators&lt;/strong&gt; to manipulate values, &lt;strong&gt;conditionals&lt;/strong&gt; to execute different code paths based on circumstances, and &lt;strong&gt;loops&lt;/strong&gt; to automate repetitive tasks. These are the core building blocks that transform static data into dynamic, interactive applications.&lt;/p&gt;</description></item><item><title>Chapter 3: Foundations of Programming: Review and Refresh</title><link>https://ai-blog.noorshomelab.dev/dsa-typescript-mastery-2026/foundations-programming-review/</link><pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/dsa-typescript-mastery-2026/foundations-programming-review/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Welcome back, future DSA master! In our previous chapters, we successfully set up our development environment with Node.js and TypeScript, getting us ready to write some amazing code. Now, before we dive headfirst into the exciting world of Data Structures and Algorithms, it&amp;rsquo;s crucial to ensure our programming foundations are rock solid.&lt;/p&gt;
&lt;p&gt;This chapter is designed as a focused review and refresh of core programming concepts. Think of it as a quick warm-up for your coding muscles! We&amp;rsquo;ll cover fundamental ideas like variables, data types, operators, control flow, and functions, all through the lens of TypeScript. Even if you&amp;rsquo;re an experienced developer, a quick refresh can highlight nuances or best practices in TypeScript that you might have overlooked. For beginners, this will lay the essential groundwork for everything that follows.&lt;/p&gt;</description></item><item><title>Chapter 3: Making Decisions &amp;amp; Repeating Actions: Control Flow</title><link>https://ai-blog.noorshomelab.dev/java-mastery-2025/chapter-3-control-flow/</link><pubDate>Thu, 04 Dec 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/java-mastery-2025/chapter-3-control-flow/</guid><description>&lt;h2 id="chapter-3-making-decisions--repeating-actions-control-flow"&gt;Chapter 3: Making Decisions &amp;amp; Repeating Actions: Control Flow&lt;/h2&gt;
&lt;p&gt;Welcome back, aspiring Java developer! In our previous chapters, we learned how to set up our Java environment, write our first basic program, and handle different types of data with variables. That&amp;rsquo;s a fantastic start! But what if your program needs to do different things based on certain conditions? Or what if you need to perform the same action multiple times without writing the same code over and over?&lt;/p&gt;</description></item><item><title>Chapter 3: Control Flow: Decisions and Loops</title><link>https://ai-blog.noorshomelab.dev/c-programming-guide/control-flow-decisions-loops/</link><pubDate>Mon, 03 Nov 2025 01:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/c-programming-guide/control-flow-decisions-loops/</guid><description>&lt;h1 id="chapter-3-control-flow-decisions-and-loops"&gt;Chapter 3: Control Flow: Decisions and Loops&lt;/h1&gt;
&lt;p&gt;In the previous chapter, you learned how to store and manipulate data. But what if you want your program to make choices or repeat actions? This is where &lt;strong&gt;control flow&lt;/strong&gt; comes in. Control flow statements dictate the order in which individual instructions or statements are executed.&lt;/p&gt;
&lt;p&gt;In C, the primary control flow mechanisms are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Conditional Statements:&lt;/strong&gt; For making decisions (e.g., &amp;ldquo;if this is true, do that; otherwise, do something else&amp;rdquo;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Looping Statements:&lt;/strong&gt; For repeating a block of code multiple times.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mastering control flow is essential for writing dynamic and intelligent programs.&lt;/p&gt;</description></item><item><title>Core Concepts: Control Flow and Functions</title><link>https://ai-blog.noorshomelab.dev/rust-guide/core-concepts-control-flow-functions/</link><pubDate>Sat, 25 Oct 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/rust-guide/core-concepts-control-flow-functions/</guid><description>&lt;h1 id="core-concepts-control-flow-and-functions"&gt;Core Concepts: Control Flow and Functions&lt;/h1&gt;
&lt;p&gt;Every useful program needs to be able to make decisions and repeat actions. This chapter introduces you to Rust&amp;rsquo;s control flow constructs (&lt;code&gt;if&lt;/code&gt; expressions, &lt;code&gt;loop&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt;, &lt;code&gt;for&lt;/code&gt;) and how to write reusable blocks of code using functions.&lt;/p&gt;
&lt;h2 id="control-flow"&gt;Control Flow&lt;/h2&gt;
&lt;p&gt;Control flow determines the order in which statements are executed in a program.&lt;/p&gt;
&lt;h3 id="if-expressions"&gt;&lt;code&gt;if&lt;/code&gt; Expressions&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;if&lt;/code&gt; expression allows you to execute code conditionally. The condition must always be a &lt;code&gt;bool&lt;/code&gt; (boolean) type. Rust does not implicitly convert non-boolean types to booleans.&lt;/p&gt;</description></item><item><title>Adding Logic and Control Flow with Lua in AIPack</title><link>https://ai-blog.noorshomelab.dev/aipack-guide-2026/lua-logic-control-flow/</link><pubDate>Sun, 17 May 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/aipack-guide-2026/lua-logic-control-flow/</guid><description>&lt;h2 id="introduction-beyond-static-prompts"&gt;Introduction: Beyond Static Prompts&lt;/h2&gt;
&lt;p&gt;So far, you&amp;rsquo;ve learned how to define multi-stage AI agents using markdown within AIPack. These agents are powerful for sequential tasks, but what happens when your agent needs to make a decision? What if it needs to retry an action or branch its behavior based on an AI model&amp;rsquo;s output or an external condition? Pure markdown, while excellent for prompt templating, lacks the dynamic control flow needed for truly intelligent and resilient agents.&lt;/p&gt;</description></item><item><title>CPU Control Flow: Jumps, Calls, and Conditional Logic</title><link>https://ai-blog.noorshomelab.dev/game-boy-emulator-fsharp/cpu-control-flow-jumps-calls/</link><pubDate>Tue, 05 May 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/game-boy-emulator-fsharp/cpu-control-flow-jumps-calls/</guid><description>&lt;p&gt;In this chapter, we&amp;rsquo;re going to give our Game Boy CPU the ability to make decisions and reuse code. We&amp;rsquo;ll implement the crucial control flow instructions: &lt;code&gt;JP&lt;/code&gt; (Jump), &lt;code&gt;JR&lt;/code&gt; (Jump Relative), &lt;code&gt;CALL&lt;/code&gt;, and &lt;code&gt;RET&lt;/code&gt; (Return), along with their conditional variants. These instructions are fundamental to how programs execute, allowing them to branch, loop, and call subroutines.&lt;/p&gt;
&lt;p&gt;By the end of this milestone, your emulator will be able to follow more complex program paths, enabling it to execute actual Game Boy program logic beyond simple linear instruction sequences. This is a significant step towards running real Game Boy ROMs, as it unlocks the ability for programs to react to different states and organize their code efficiently.&lt;/p&gt;</description></item><item><title>Chapter 6: The Art of Repetition: Recursion and Iteration</title><link>https://ai-blog.noorshomelab.dev/dsa-typescript-mastery-2026/recursion-iteration/</link><pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/dsa-typescript-mastery-2026/recursion-iteration/</guid><description>&lt;h2 id="chapter-6-the-art-of-repetition-recursion-and-iteration"&gt;Chapter 6: The Art of Repetition: Recursion and Iteration&lt;/h2&gt;
&lt;p&gt;Welcome to Chapter 6! So far, you&amp;rsquo;ve mastered the fundamentals of setting up your TypeScript development environment and understanding how to analyze the efficiency of your code with Big-O notation. Now, it&amp;rsquo;s time to delve into two incredibly powerful and fundamental programming paradigms that allow us to tackle repetitive tasks: &lt;strong&gt;iteration&lt;/strong&gt; and &lt;strong&gt;recursion&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;These concepts are the bread and butter of solving complex problems in Data Structures and Algorithms (DSA). Whether you&amp;rsquo;re processing lists, navigating trees, or searching through graphs, you&amp;rsquo;ll find yourself reaching for either an iterative loop or a recursive function. By the end of this chapter, you&amp;rsquo;ll not only understand how both work but also when and why to choose one over the other, empowering you to write more elegant and efficient TypeScript code.&lt;/p&gt;</description></item><item><title>Making Decisions with Control Flow</title><link>https://ai-blog.noorshomelab.dev/python-mastery-2025/chapter-3-making-decisions-control-flow/</link><pubDate>Wed, 03 Dec 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/python-mastery-2025/chapter-3-making-decisions-control-flow/</guid><description>&lt;h2 id="introduction-guiding-your-codes-choices"&gt;Introduction: Guiding Your Code&amp;rsquo;s Choices&lt;/h2&gt;
&lt;p&gt;Welcome back, future Pythonista! In our previous chapters, you learned about Python&amp;rsquo;s fundamental building blocks: variables, different data types, and how to perform basic operations. You can store information, manipulate numbers, and even work with text. That&amp;rsquo;s fantastic! But so far, your programs have been a bit like a train on a single, straight track – they just run from start to finish, executing every line in order.&lt;/p&gt;</description></item><item><title>Repeating Actions with Loops</title><link>https://ai-blog.noorshomelab.dev/python-mastery-2025/chapter-4-repeating-actions-loops/</link><pubDate>Wed, 03 Dec 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/python-mastery-2025/chapter-4-repeating-actions-loops/</guid><description>&lt;h2 id="repeating-actions-with-loops"&gt;Repeating Actions with Loops&lt;/h2&gt;
&lt;p&gt;Welcome back, coding adventurer! In the previous chapters, we learned how to store information in variables, make decisions with &lt;code&gt;if&lt;/code&gt; statements, and organize our code. That&amp;rsquo;s a fantastic start!&lt;/p&gt;
&lt;p&gt;But what if you need to do the same thing, or a very similar thing, multiple times? Imagine you have a list of 100 names and you need to print a greeting for each one. Would you write &lt;code&gt;print()&lt;/code&gt; 100 times? That sounds incredibly tedious and inefficient, right?&lt;/p&gt;</description></item><item><title>Enhanced Template Syntax &amp;amp; Style Bindings</title><link>https://ai-blog.noorshomelab.dev/angular-v21-mastery/chapter-9-template-syntax-and-styles/</link><pubDate>Wed, 20 Aug 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/angular-v21-mastery/chapter-9-template-syntax-and-styles/</guid><description>&lt;h2 id="enhanced-template-syntax--style-bindings"&gt;Enhanced Template Syntax &amp;amp; Style Bindings&lt;/h2&gt;
&lt;p&gt;Angular templates are where components come alive, binding data to the UI and reacting to user interactions. Angular v21 brings incremental improvements to the template syntax, particularly enhancing the interaction between style directives and the new control flow, and reinforcing best practices around how we apply styles.&lt;/p&gt;
&lt;h3 id="ngstyle--new-control-flow-better-harmony"&gt;NgStyle + New Control Flow: Better Harmony&lt;/h3&gt;
&lt;p&gt;The new &lt;code&gt;@if&lt;/code&gt;, &lt;code&gt;@for&lt;/code&gt;, and &lt;code&gt;@switch&lt;/code&gt; control flow blocks, introduced in previous versions, have greatly improved template readability and performance. Angular v21 ensures that directives like &lt;code&gt;NgStyle&lt;/code&gt; play even more harmoniously within these new blocks. While &lt;code&gt;NgStyle&lt;/code&gt; has always worked, its behavior with complex conditional rendering logic within control flow could sometimes be tricky or lead to verbose expressions.&lt;/p&gt;</description></item></channel></rss>