<?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>Forem: Majdi Saibi</title>
    <description>The latest articles on Forem by Majdi Saibi (@majdisaibi).</description>
    <link>https://forem.com/majdisaibi</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%2F475899%2F76b2596d-5139-4e84-8fab-cf407597e425.jpg</url>
      <title>Forem: Majdi Saibi</title>
      <link>https://forem.com/majdisaibi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/majdisaibi"/>
    <language>en</language>
    <item>
      <title>How to Run DeepSeek R1 Locally on Your Android Device</title>
      <dc:creator>Majdi Saibi</dc:creator>
      <pubDate>Sat, 25 Jan 2025 05:26:27 +0000</pubDate>
      <link>https://forem.com/majdisaibi/how-to-run-deepseek-r1-locally-on-your-android-device-4ape</link>
      <guid>https://forem.com/majdisaibi/how-to-run-deepseek-r1-locally-on-your-android-device-4ape</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;The AI revolution is no longer confined to high-end servers or cloud platforms. With models like &lt;strong&gt;DeepSeek R1&lt;/strong&gt;—a state-of-the-art reasoning model that rivals top-tier commercial offerings—you can now harness advanced AI capabilities directly on your Android device. In this guide, I’ll show you how to deploy DeepSeek R1 locally for privacy, customization, and offline use.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Run DeepSeek R1 on Android?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Privacy&lt;/strong&gt;: Process sensitive data locally without cloud dependencies.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost Efficiency&lt;/strong&gt;: Avoid API fees (DeepSeek’s API costs ~5% of OpenAI’s).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline Access&lt;/strong&gt;: Use AI even without an internet connection.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customization&lt;/strong&gt;: Fine-tune models for niche applications (coding, creative writing, etc.).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Hardware&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Android device with &lt;strong&gt;≥8GB RAM&lt;/strong&gt; (for 8B/14B models).
&lt;/li&gt;
&lt;li&gt;Snapdragon 8 Gen 2/3 or equivalent processor.
&lt;/li&gt;
&lt;li&gt;≥12GB storage space.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Software&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/termux/termux-app/releases" rel="noopener noreferrer"&gt;Termux&lt;/a&gt; (Linux terminal emulator).
&lt;/li&gt;
&lt;li&gt;Basic command-line familiarity.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Step 1: Install Termux and Dependencies
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Download Termux&lt;/strong&gt;:
Grab the latest APK from &lt;a href="https://github.com/termux/termux-app/releases" rel="noopener noreferrer"&gt;Termux’s GitHub&lt;/a&gt;.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set Up Termux&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   termux-setup-storage  &lt;span class="c"&gt;# Grant storage permissions&lt;/span&gt;
   pkg update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; pkg upgrade  &lt;span class="c"&gt;# Update packages&lt;/span&gt;
   pkg &lt;span class="nb"&gt;install &lt;/span&gt;git cmake golang libjpeg-turbo  &lt;span class="c"&gt;# Install dependencies&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 2: Build Ollama from Source
&lt;/h2&gt;

&lt;p&gt;Ollama is a lightweight tool to manage AI models.  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Clone the Repository&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git clone &lt;span class="nt"&gt;--depth&lt;/span&gt; 1 https://github.com/ollama/ollama.git
   &lt;span class="nb"&gt;cd &lt;/span&gt;ollama
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Compile Ollama&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   go generate ./...
   go build &lt;span class="nb"&gt;.&lt;/span&gt;  &lt;span class="c"&gt;# Build the Ollama binary&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 3: Download DeepSeek R1 Models
&lt;/h2&gt;

&lt;p&gt;For Android, use distilled or quantized models:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recommended&lt;/strong&gt;: &lt;code&gt;deepseek-r1:1.5b&lt;/code&gt; (5.7GB) or &lt;code&gt;deepseek-r1:8b-q4&lt;/code&gt; (quantized).
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pull the Model&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./ollama run deepseek-r1:8b  &lt;span class="c"&gt;# Download the 8B model&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 4: Run DeepSeek R1
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start the Ollama Server&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   ./ollama serve &amp;amp;  &lt;span class="c"&gt;# Run in the background&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Interact with the Model&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   ./ollama run deepseek-r1:8b
   &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"Write Python code to calculate a Fibonacci sequence"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Optimizing Performance
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use Quantized Models&lt;/strong&gt;: Reduce RAM usage by 30% with &lt;code&gt;deepseek-r1:8b-q4&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prevent Sleep&lt;/strong&gt;: Keep Termux active with:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  pkg &lt;span class="nb"&gt;install &lt;/span&gt;termux-services
  sv-enable termux-wake-lock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free Up RAM&lt;/strong&gt;: Close background apps before running models.
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Port Conflicts&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  ./ollama serve &lt;span class="nt"&gt;--port&lt;/span&gt; 8080 &amp;amp;  &lt;span class="c"&gt;# Use a different port&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Out of Memory&lt;/strong&gt;: Monitor RAM with &lt;code&gt;top&lt;/code&gt; and switch to smaller models.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model Not Found&lt;/strong&gt;: Ensure downloads complete with &lt;code&gt;ollama pull deepseek-r1:8b&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Running DeepSeek R1 on Android unlocks &lt;strong&gt;private, offline AI&lt;/strong&gt; for coding, research, and creative projects. With this guide, you’re ready to experiment with cutting-edge models without relying on the cloud. Share your results, tweak the setup, and push the boundaries of mobile AI!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Further Reading&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/deepseek-ai/DeepSeek-R1" rel="noopener noreferrer"&gt;DeepSeek’s GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://ollama.ai/blog" rel="noopener noreferrer"&gt;Ollama API Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://wiki.termux.com/wiki/Main_Page" rel="noopener noreferrer"&gt;Termux Tips&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>android</category>
      <category>ollama</category>
      <category>deepseek</category>
    </item>
    <item>
      <title>🪛𝐆𝐥𝐨𝐛𝐚𝐥 𝐄𝐱𝐜𝐞𝐩𝐭𝐢𝐨𝐧 𝐇𝐚𝐧𝐝𝐥𝐢𝐧𝐠 𝐢𝐧 𝐀𝐒𝐏.𝐍𝐄𝐓 𝐂𝐨𝐫𝐞: 𝐄𝐥𝐞𝐯𝐚𝐭𝐢𝐧𝐠 𝐂𝐨𝐝𝐞 𝐐𝐮𝐚𝐥𝐢𝐭𝐲 𝐚𝐧𝐝 𝐃𝐞𝐯𝐞𝐥𝐨𝐩𝐞𝐫 𝐄𝐟𝐟𝐢𝐜𝐢𝐞𝐧𝐜𝐲🪛</title>
      <dc:creator>Majdi Saibi</dc:creator>
      <pubDate>Thu, 08 Aug 2024 23:45:38 +0000</pubDate>
      <link>https://forem.com/majdisaibi/--2gik</link>
      <guid>https://forem.com/majdisaibi/--2gik</guid>
      <description>&lt;p&gt;In the fast-paced world of software development, ensuring robust error management is crucial for delivering high-quality applications. One powerful technique that stands out in the ASP.NET Core ecosystem is global exception handling.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔍 What is Global Exception Handling?
&lt;/h3&gt;

&lt;p&gt;Global exception handling in ASP.NET Core refers to a centralized approach to catching and managing exceptions that occur during the execution of your application. By leveraging middleware like &lt;code&gt;𝚄̲𝚜̲𝚎̲𝙴̲𝚡̲𝚌̲𝚎̲𝚙̲𝚝̲𝚒̲𝚘̲𝚗̲𝙷̲𝚊̲𝚗̲𝚍̲𝚕̲𝚎̲𝚛̲&lt;/code&gt; and &lt;code&gt;𝚄̲𝚜̲𝚎̲𝙳̲𝚎̲𝚟̲𝚎̲𝚕̲𝚘̲𝚙̲𝚎̲𝚛̲𝙴̲𝚡̲𝚌̲𝚎̲𝚙̲𝚝̲𝚒̲𝚘̲𝚗̲𝙿̲𝚊̲𝚐̲𝚎̲&lt;/code&gt;, developers can intercept and handle unexpected errors across the entire application.&lt;/p&gt;

&lt;h3&gt;
  
  
  🚀 Benefits for Developers:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;𝐶𝑜𝑛𝑠𝑖𝑠𝑡𝑒𝑛𝑡 𝐸𝑟𝑟𝑜𝑟 𝑀𝑎𝑛𝑎𝑔𝑒𝑚𝑒𝑛𝑡: Instead of scattering try-catch blocks throughout the codebase, global exception handling provides a unified strategy. This ensures that all exceptions are managed consistently, leading to cleaner and more maintainable code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;𝐸𝑛ℎ𝑎𝑛𝑐𝑒𝑑 𝐷𝑒𝑏𝑢𝑔𝑔𝑖𝑛𝑔: Centralized logging of exceptions makes it easier to identify and diagnose issues. By capturing comprehensive error details in one place, developers can quickly pinpoint root causes and implement fixes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;𝐼𝑚𝑝𝑟𝑜𝑣𝑒𝑑 𝐸𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦: By reducing repetitive error-handling code, developers can focus more on writing business logic and less on boilerplate code. This not only speeds up development but also reduces the likelihood of introducing bugs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🏆 Boosting Product Code Quality:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;𝑅𝑜𝑏𝑢𝑠𝑡𝑛𝑒𝑠𝑠: Applications with global exception handling are more resilient to unexpected failures. Users experience fewer crashes, and the software can gracefully handle unforeseen issues, improving overall reliability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;𝑈𝑠𝑒𝑟 𝐸𝑥𝑝𝑒𝑟𝑖𝑒𝑛𝑐𝑒: When exceptions are handled gracefully, users encounter fewer disruptive errors. Informative error messages and fallback mechanisms ensure a smoother, more user-friendly experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;𝑆𝑒𝑐𝑢𝑟𝑖𝑡𝑦: Properly managed exceptions can prevent the exposure of sensitive information and reduce the risk of security vulnerabilities. By sanitizing error messages and logging sensitive data securely, you safeguard your application against potential threats.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔧 Implementing Global Exception Handling:
&lt;/h3&gt;

&lt;p&gt;Getting started with global exception handling in ASP.NET Core (.NET 8) is straightforward. Here’s a basic example with the ExceptionHandler:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create an Exception Handling Middleware:&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5hnkkbl0yz9l7kpc3yz0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5hnkkbl0yz9l7kpc3yz0.png" alt="Image description" width="800" height="770"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configure Middleware in Program.cs:&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fco011okpou2gpittzgo3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fco011okpou2gpittzgo3.png" alt="Image description" width="800" height="916"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;💬 How have you benefited from using global exception handling in your projects? Share your experiences and tips below!&lt;/p&gt;

&lt;p&gt;Keep Coding!&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>cleancode</category>
      <category>aspnet</category>
    </item>
    <item>
      <title>🚀 Exciting .NET 9 Feature: Option Types! 🚀</title>
      <dc:creator>Majdi Saibi</dc:creator>
      <pubDate>Thu, 08 Aug 2024 23:27:03 +0000</pubDate>
      <link>https://forem.com/majdisaibi/exciting-net-9-feature-option-types-55nc</link>
      <guid>https://forem.com/majdisaibi/exciting-net-9-feature-option-types-55nc</guid>
      <description>&lt;p&gt;With the upcoming release of .NET 9, one of the standout features is Option Types. This addition brings a powerful tool to handle scenarios where a value may or may not be present, without resorting to nullable types or exceptions.&lt;/p&gt;

&lt;h3&gt;
  
  
  🌟 What are Option Types?
&lt;/h3&gt;

&lt;p&gt;Option Types allow you to represent a value that could either exist &lt;code&gt;(Some)&lt;/code&gt; or not &lt;code&gt;(None)&lt;/code&gt;. This pattern is inspired by functional programming languages and helps in writing safer and more expressive code.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔧 Why Use Option Types?
&lt;/h3&gt;

&lt;p&gt;Clarity: Explicitly indicates when a value may be missing.&lt;br&gt;
Safety: Reduces null reference exceptions by avoiding nullable types.&lt;br&gt;
Readability: Makes the code more self-explanatory, showing the intent clearly.&lt;/p&gt;
&lt;h3&gt;
  
  
  🛠️ Example Usage
&lt;/h3&gt;

&lt;p&gt;Here's a simple example to illustrate how Option Types can be used in .NET 9:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Runtime.CompilerServices&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Example&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="n"&gt;Option&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;FindValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="n"&gt;Option&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Found it!"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Option&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;None&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;FindValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;some&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;value&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;$"Success: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="n"&gt;none&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Value not found"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ⚙️ How It Works:
&lt;/h3&gt;

&lt;p&gt;Option is the new type that can hold either Some(T) if a value is present or None if it's absent.&lt;br&gt;
Match method allows handling both cases (Some or None) elegantly.&lt;/p&gt;

&lt;h3&gt;
  
  
  🏆 Key Benefits:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;No more null checks:&lt;/em&gt; Avoids common pitfalls of nullability.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Improved flow control:&lt;/em&gt; Makes it easier to deal with optional values predictably.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm excited to see how this feature will improve code quality and safety in the .NET ecosystem. What are your thoughts on Option Types? Let me know in the comments!&lt;/p&gt;

&lt;p&gt;Keep Coding!&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>cleancode</category>
    </item>
  </channel>
</rss>
