<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nishanth K J on Medium]]></title>
        <description><![CDATA[Stories by Nishanth K J on Medium]]></description>
        <link>https://medium.com/@nishanth-kj?source=rss-9a980f2331f3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*nxwfBQrKNF_X83Cs</url>
            <title>Stories by Nishanth K J on Medium</title>
            <link>https://medium.com/@nishanth-kj?source=rss-9a980f2331f3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 00:20:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nishanth-kj/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Optional in Programming Languages (Python, Java, Rust, C++, & TypeScript) — A Complete Guide]]></title>
            <link>https://nishanth-kj.medium.com/optional-in-programming-languages-python-java-rust-c-typescript-a-complete-guide-d25b5f87e2b1?source=rss-9a980f2331f3------2</link>
            <guid isPermaLink="false">https://medium.com/p/d25b5f87e2b1</guid>
            <dc:creator><![CDATA[Nishanth K J]]></dc:creator>
            <pubDate>Thu, 29 Jan 2026 15:58:44 GMT</pubDate>
            <atom:updated>2026-01-29T15:58:44.710Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dI7jb8L9pdJO-ZENw6Kmfw.png" /></figure><h3>Optional in Programming Languages (Python, Java, Rust, C++, &amp; TypeScript) — A Complete Guide</h3><h3>Introduction</h3><p>Handling missing, null, or optional values is one of the most common and dangerous problems in software development. Null pointer exceptions, NoneType errors, segmentation faults, and undefined behavior often happen because developers assume a value is always present.</p><p>To solve this, modern programming practices introduce the concept of <strong>Optional values</strong> — a safer way to represent data that <em>may or may not exist</em>.</p><p>In this blog, you’ll learn:</p><ul><li>What does “ Optional “ mean in programming</li><li>Why is the Optional important</li><li>How Optional works in Python</li><li>How Optional works in Java (Optional&lt;T&gt;)</li><li>How Optional works in Rust (Option&lt;T&gt;)</li><li>How Optional works in C++ (std::optional&lt;T&gt;)</li><li>Common patterns and best practices</li><li>Optional vs Null</li><li>Real-world use cases</li><li>Pros, cons, and pitfalls</li><li>Clean coding guidelines for Optional</li></ul><h3>What is Optional?</h3><p><strong>Optional</strong> represents a value that may be present or absent.</p><p>Instead of using null or None directly, Optional forces developers to:</p><ul><li>Acknowledge absence</li><li>Handle missing values explicitly.</li><li>Reduce runtime errors</li><li>Make APIs more expressive.</li></ul><p>Conceptually:</p><blockquote><em>Optional = Either a value of type T OR nothing</em></blockquote><p>This makes absence a <strong>first-class concept</strong>, not an afterthought.</p><h3>Why Optional Matters</h3><p>Traditional null handling causes major issues:</p><ul><li>NullPointerException (Java)</li><li>‘NoneType’ object has no attribute … (Python)</li><li>Segmentation faults (C/C++)</li><li>undefined runtime bugs (JavaScript/TypeScript)</li><li>Hidden production failures</li></ul><p>Optional improvements:</p><ul><li>Code safety</li><li>API clarity</li><li>Explicit intent</li><li>Functional composition</li><li>Long-term maintainability</li></ul><h3>Optional in Python</h3><p>Python supports Optional via None and type hints.</p><h4>Python Optional with Type Hints</h4><pre>from typing import Optional<br><br>def get_user_email(user_id: int) -&gt; Optional[str]:<br>    if user_id == 1:<br>        return &quot;user@example.com&quot;<br>    return None</pre><h4>Checking Optional in Python</h4><pre>email = get_user_email(2)<br><br>if email is not None:<br>    print(email.lower())<br>else:<br>    print(&quot;Email not found&quot;)</pre><h3>Optional in Java (java.util.Optional)</h3><p>Java introduced Optional&lt;T&gt; in Java 8.</p><h3>Creating Optional</h3><pre>Optional&lt;String&gt; email = Optional.of(&quot;user@example.com&quot;);<br>Optional&lt;String&gt; maybe = Optional.ofNullable(getEmail());<br>Optional&lt;String&gt; empty = Optional.empty();</pre><h3>Best Access Patterns</h3><pre>email.ifPresent(e -&gt; System.out.println(e));<br><br>String value = email.orElse(&quot;default@example.com&quot;);<br><br>String value2 = email.orElseThrow(<br>    () -&gt; new RuntimeException(&quot;Email not found&quot;)<br>);</pre><h3>Optional in Rust (Option&lt;T&gt;)</h3><p>Rust enforces optional handling at compile time.</p><h4>Creating Option</h4><pre>let email: Option&lt;String&gt; = Some(&quot;user@example.com&quot;.to_string());<br>let empty: Option&lt;String&gt; = None;</pre><h4>Pattern Matching</h4><pre>match email {<br>    Some(e) =&gt; println!(&quot;{}&quot;, e),<br>    None =&gt; println!(&quot;Email not found&quot;),<br>}</pre><h3>map and and_then</h3><pre>let lower = email.map(|e| e.to_lowercase());<br>let user = email.and_then(find_user_by_email);</pre><h3>Optional in C++ (std::optional&lt;T&gt;)</h3><p>C++17 introduced std::optional&lt;T&gt;.</p><h4>Creating std::optional</h4><pre>#include &lt;optional&gt;<br><br>std::optional&lt;std::string&gt; email = &quot;user@example.com&quot;;<br>std::optional&lt;std::string&gt; empty = std::nullopt;</pre><h4>Accessing Safely</h4><pre>if (email.has_value()) {<br>    std::cout &lt;&lt; email.value() &lt;&lt; std::endl;<br>}<br><br>std::string value = email.value_or(&quot;default@example.com&quot;);</pre><h3>Optional vs Null</h3><p>AspectNullOptionalSafetyUnsafeSaferExplicitnessHiddenExplicitCompile-time checksNoYes (Rust, TS)Functional styleNoYesAPI clarityPoorBetter</p><h3>When to Use Optional</h3><p>Recommended:</p><ul><li>Method return values</li><li>Repository / DB lookups</li><li>Cache results</li><li>Config values</li><li>API responses</li><li>Partial objects</li></ul><h3>When NOT to Use Optional</h3><p>Avoid:</p><ul><li>Entity fields</li><li>DTOs for serialization</li><li>Method parameters</li><li>Tight loops / hot paths</li></ul><h3>Real-World Use Cases</h3><ul><li>Microservices partial payloads</li><li>Feature flags</li><li>Backward-compatible APIs</li><li>Cache layers</li><li>Cloud config systems</li></ul><h3>Common Pitfalls</h3><ul><li>Java: using get() blindly</li><li>Python: missing None checks</li><li>Rust: overusing unwrap()</li><li>C++: calling .value() without checking</li><li>TypeScript: disabling strictNullChecks</li></ul><h3>Best Practices Summary</h3><p>LanguageBest PracticePython</p><p>Use Optional[T], guard None</p><p>JavaReturn Optional, avoid get()RustPrefer match, avoid unwrap()C++Use has_value(), value_or()TypeScriptEnable strictNullChecks</p><h3>Optional Compared Across Languages</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*eTo9UrrSj4nOXn_7KBRjiA.png" /></figure><h3>Conclusion</h3><p>Optional is a foundational concept for building:</p><ul><li>Safer systems</li><li>Clearer APIs</li><li>More maintainable code</li><li>Robust, null-safe architectures</li></ul><p>Key Takeaways:</p><ul><li>Optional models are absent explicitly</li><li>Rust provides the strongest compile-time guarantees.</li><li>Java and C++ provide structured optional handling.</li><li>Python and TypeScript use Optional mainly for clarity.</li><li>Avoid null-centric design</li></ul><blockquote><em>Optional is not just a utility — it’s a core design tool for robust software systems.</em></blockquote><h3>About the Author</h3><p>I am <strong>Nishanth K J</strong>, a Software Engineer. Skilled in Python, Java, Rust, and TypeScript, I specialize in building scalable, secure, and intelligent applications.</p><blockquote><em>“Robust systems treat missing data as a first-class citizen.”</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d25b5f87e2b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BUG: A Silent Bug I Hit While Using Django with Celery]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">This is the story of a silent bug I hit while using Django with Celery, where model status updates looked fine in code but ended up wrong&#x2026;</p><p class="medium-feed-link"><a href="https://nishanth-kj.medium.com/bug-a-silent-bug-i-hit-while-using-django-with-celery-924d19525b22?source=rss-9a980f2331f3------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://nishanth-kj.medium.com/bug-a-silent-bug-i-hit-while-using-django-with-celery-924d19525b22?source=rss-9a980f2331f3------2</link>
            <guid isPermaLink="false">https://medium.com/p/924d19525b22</guid>
            <category><![CDATA[celery]]></category>
            <category><![CDATA[django]]></category>
            <dc:creator><![CDATA[Nishanth K J]]></dc:creator>
            <pubDate>Tue, 20 Jan 2026 15:45:53 GMT</pubDate>
            <atom:updated>2026-01-20T15:45:53.346Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Time Complexity in Data Structures and Algorithms]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://nishanth-kj.medium.com/time-complexity-in-data-structures-and-algorithms-05b6af07d6c8?source=rss-9a980f2331f3------2"><img src="https://cdn-images-1.medium.com/max/1167/1*jJmhtW7mg-QDWdS0voRr9w.png" width="1167"></a></p><p class="medium-feed-snippet">A time complexity is a way to describe how the running time of an algorithm increases as the input size grows.</p><p class="medium-feed-link"><a href="https://nishanth-kj.medium.com/time-complexity-in-data-structures-and-algorithms-05b6af07d6c8?source=rss-9a980f2331f3------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://nishanth-kj.medium.com/time-complexity-in-data-structures-and-algorithms-05b6af07d6c8?source=rss-9a980f2331f3------2</link>
            <guid isPermaLink="false">https://medium.com/p/05b6af07d6c8</guid>
            <category><![CDATA[dsa-courses]]></category>
            <dc:creator><![CDATA[Nishanth K J]]></dc:creator>
            <pubDate>Sun, 04 Jan 2026 14:27:00 GMT</pubDate>
            <atom:updated>2026-01-04T14:28:18.560Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Agile Methodologies and Their Flow & Cycle]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://nishanth-kj.medium.com/agile-methodologies-and-their-flow-cycle-8127618f20ca?source=rss-9a980f2331f3------2"><img src="https://cdn-images-1.medium.com/max/600/0*uTYM6A3-u_WfB1nU" width="600"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://nishanth-kj.medium.com/agile-methodologies-and-their-flow-cycle-8127618f20ca?source=rss-9a980f2331f3------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://nishanth-kj.medium.com/agile-methodologies-and-their-flow-cycle-8127618f20ca?source=rss-9a980f2331f3------2</link>
            <guid isPermaLink="false">https://medium.com/p/8127618f20ca</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[agile-methodology]]></category>
            <dc:creator><![CDATA[Nishanth K J]]></dc:creator>
            <pubDate>Mon, 01 Sep 2025 18:25:19 GMT</pubDate>
            <atom:updated>2025-09-01T18:26:20.050Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[ Things to Know in Rust: The Fundamentals]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://nishanth-kj.medium.com/things-to-know-in-rust-the-fundamentals-8f28dd3bad4a?source=rss-9a980f2331f3------2"><img src="https://cdn-images-1.medium.com/max/1536/0*NE93qNjBRJMc8Ea2" width="1536"></a></p><p class="medium-feed-snippet">Every programming journey starts with the fundamentals. No matter if you&#x2019;re writing code in Python, C++, or Rust, the first concepts you&#x2026;</p><p class="medium-feed-link"><a href="https://nishanth-kj.medium.com/things-to-know-in-rust-the-fundamentals-8f28dd3bad4a?source=rss-9a980f2331f3------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://nishanth-kj.medium.com/things-to-know-in-rust-the-fundamentals-8f28dd3bad4a?source=rss-9a980f2331f3------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f28dd3bad4a</guid>
            <category><![CDATA[rust-programming-language]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Nishanth K J]]></dc:creator>
            <pubDate>Sat, 16 Aug 2025 04:37:50 GMT</pubDate>
            <atom:updated>2025-08-16T04:37:50.587Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[ Cargo Notes (Rust Build & Package Manager)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://nishanth-kj.medium.com/cargo-notes-rust-build-package-manager-a239ba00f69f?source=rss-9a980f2331f3------2"><img src="https://cdn-images-1.medium.com/max/1583/1*uLy6jbxVS0EYeZGqWmiENw.png" width="1583"></a></p><p class="medium-feed-snippet">Cargo is Rust&#x2019;s official package manager and build tool. It handles project creation, dependency management, building, testing, and&#x2026;</p><p class="medium-feed-link"><a href="https://nishanth-kj.medium.com/cargo-notes-rust-build-package-manager-a239ba00f69f?source=rss-9a980f2331f3------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://nishanth-kj.medium.com/cargo-notes-rust-build-package-manager-a239ba00f69f?source=rss-9a980f2331f3------2</link>
            <guid isPermaLink="false">https://medium.com/p/a239ba00f69f</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[package-manager]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[cargo]]></category>
            <category><![CDATA[rust-programming-language]]></category>
            <dc:creator><![CDATA[Nishanth K J]]></dc:creator>
            <pubDate>Sat, 16 Aug 2025 03:30:32 GMT</pubDate>
            <atom:updated>2025-08-16T03:30:32.613Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Installing Rust in Windows Using MSYS2 — The Complete Guide]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://nishanth-kj.medium.com/installing-rust-in-windows-using-msys2-the-complete-guide-627dffe51a89?source=rss-9a980f2331f3------2"><img src="https://cdn-images-1.medium.com/max/1264/1*NmVpYQJKedWoQp_ikYhixw.png" width="1264"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://nishanth-kj.medium.com/installing-rust-in-windows-using-msys2-the-complete-guide-627dffe51a89?source=rss-9a980f2331f3------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://nishanth-kj.medium.com/installing-rust-in-windows-using-msys2-the-complete-guide-627dffe51a89?source=rss-9a980f2331f3------2</link>
            <guid isPermaLink="false">https://medium.com/p/627dffe51a89</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[rust-programming-language]]></category>
            <category><![CDATA[msys2]]></category>
            <dc:creator><![CDATA[Nishanth K J]]></dc:creator>
            <pubDate>Sat, 16 Aug 2025 03:22:41 GMT</pubDate>
            <atom:updated>2025-08-16T03:22:41.185Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[SDLC: Software Development Life Cycle]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://nishanth-kj.medium.com/sdlc-software-development-life-cycle-7ab2f29660da?source=rss-9a980f2331f3------2"><img src="https://cdn-images-1.medium.com/max/1536/0*5c3qq02kEzPrMJG2" width="1536"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://nishanth-kj.medium.com/sdlc-software-development-life-cycle-7ab2f29660da?source=rss-9a980f2331f3------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://nishanth-kj.medium.com/sdlc-software-development-life-cycle-7ab2f29660da?source=rss-9a980f2331f3------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ab2f29660da</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Nishanth K J]]></dc:creator>
            <pubDate>Sun, 22 Jun 2025 14:38:12 GMT</pubDate>
            <atom:updated>2025-06-22T14:38:12.698Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Move Your WSL Distro to Another Drive (D:/)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://nishanth-kj.medium.com/how-to-move-your-wsl-distro-to-another-drive-d-3da9fdfc8370?source=rss-9a980f2331f3------2"><img src="https://cdn-images-1.medium.com/max/1024/0*SGmvL9V3NVW49shx" width="1024"></a></p><p class="medium-feed-snippet">If you&#x2019;re a developer or power user on Windows, you&#x2019;re probably loving the power of WSL (Windows Subsystem for Linux). But there&#x2019;s one&#x2026;</p><p class="medium-feed-link"><a href="https://nishanth-kj.medium.com/how-to-move-your-wsl-distro-to-another-drive-d-3da9fdfc8370?source=rss-9a980f2331f3------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://nishanth-kj.medium.com/how-to-move-your-wsl-distro-to-another-drive-d-3da9fdfc8370?source=rss-9a980f2331f3------2</link>
            <guid isPermaLink="false">https://medium.com/p/3da9fdfc8370</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[wsl-2]]></category>
            <category><![CDATA[wsl]]></category>
            <category><![CDATA[windows-11]]></category>
            <dc:creator><![CDATA[Nishanth K J]]></dc:creator>
            <pubDate>Thu, 12 Jun 2025 14:04:37 GMT</pubDate>
            <atom:updated>2025-06-12T14:04:37.586Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Install and Use DeepSeek with Ollama: A Step-by-Step Guide]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://nishanth-kj.medium.com/how-to-install-and-use-deepseek-with-ollama-a-step-by-step-guide-475c2bf2f6af?source=rss-9a980f2331f3------2"><img src="https://cdn-images-1.medium.com/max/1440/0*k00Zv-YTp6s1HsdW" width="1440"></a></p><p class="medium-feed-snippet">In this guide, I&#x2019;ll walk you through installing and running DeepSeek using Ollama, a powerful framework for managing open-source AI models&#x2026;</p><p class="medium-feed-link"><a href="https://nishanth-kj.medium.com/how-to-install-and-use-deepseek-with-ollama-a-step-by-step-guide-475c2bf2f6af?source=rss-9a980f2331f3------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://nishanth-kj.medium.com/how-to-install-and-use-deepseek-with-ollama-a-step-by-step-guide-475c2bf2f6af?source=rss-9a980f2331f3------2</link>
            <guid isPermaLink="false">https://medium.com/p/475c2bf2f6af</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ollama]]></category>
            <category><![CDATA[deepseek]]></category>
            <dc:creator><![CDATA[Nishanth K J]]></dc:creator>
            <pubDate>Mon, 10 Feb 2025 16:53:24 GMT</pubDate>
            <atom:updated>2025-02-10T16:53:24.419Z</atom:updated>
        </item>
    </channel>
</rss>