<?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 Mohammed Khalid Hasan Nabil on Medium]]></title>
        <description><![CDATA[Stories by Mohammed Khalid Hasan Nabil on Medium]]></description>
        <link>https://medium.com/@nabilhasan01541work?source=rss-7f1dd1e80748------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*5lb7iOobtYz26O9A</url>
            <title>Stories by Mohammed Khalid Hasan Nabil on Medium</title>
            <link>https://medium.com/@nabilhasan01541work?source=rss-7f1dd1e80748------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 11:42:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nabilhasan01541work/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[The Geometry of Submission: What Sierpinski Triangle Teaches Us About Free Will, Arrogance, and…]]></title>
            <link>https://medium.com/@nabilhasan01541work/the-geometry-of-submission-what-sierpinski-triangle-teaches-us-about-free-will-arrogance-and-267b454b3d61?source=rss-7f1dd1e80748------2</link>
            <guid isPermaLink="false">https://medium.com/p/267b454b3d61</guid>
            <category><![CDATA[chaos-game]]></category>
            <category><![CDATA[sierpinskis-triangle]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[islamic-philosophy]]></category>
            <dc:creator><![CDATA[Mohammed Khalid Hasan Nabil]]></dc:creator>
            <pubDate>Tue, 23 Jun 2026 11:34:37 GMT</pubDate>
            <atom:updated>2026-06-23T11:49:04.408Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Geometry of Submission: What <strong>Sierpinski </strong>Triangle Teaches Us About Free Will, Arrogance, and Allah</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*GA5slGgsZfyzj2nXTNRyCg.png" /><figcaption>Fig: <a href="https://sierpinski-triangle-and-free-will-of-man-md-khalid-hasan-nabil.streamlit.app/">https://sierpinski-triangle-and-free-will-of-man-md-khalid-hasan-nabil.streamlit.app/</a></figcaption></figure><p>Look at the modern world, and you will see a species deeply intoxicated by its own success. Armed with artificial intelligence, quantum computing, and space exploration, modern humanity has grown incredibly arrogant. We look at our smartphones and our skyscrapers and subconsciously whisper to ourselves: <em>We are the masters of our own destiny. We understand everything.</em> But are we actually modern, or are we just profoundly blind?</p><p>To answer that, we don’t need to look at the stars or giant particle colliders. We just need to look at a simple mathematical paradox born out of pure randomness: <strong>The Sierpinski Triangle</strong>, generated through a method known as the <em>Chaos Game</em>.</p><blockquote><strong>Disclaimer</strong>: Grammatical and wording assistance was provided by Gemini.</blockquote><h3>The Chaos Game: Free Will Within Boundaries</h3><p>Imagine a simple triangle drawn on a blank page with three defined corners: A, B, and C.</p><p>Now, let’s play a game governed by two simple rules:</p><ol><li>You are given the absolute “free will” to pick any random starting point on the page.</li><li>You roll a die. Depending on the number, you move exactly halfway toward one of the three corners and drop a dot. You roll again, move halfway from your <em>new</em> position, and drop another dot.</li></ol><blockquote><strong><em>Check it out: </em></strong><em>You can watch this </em>20-second Youtube video to easily understand the game <em>from channel MathVisulProofs. </em><a href="https://www.youtube.com/shorts/QK2SJo-AxT4">https://www.youtube.com/shorts/QK2SJo-AxT4</a></blockquote><p>In the beginning, it looks like absolute chaos. The dots fall haphazardly across the white space. You feel a sense of total freedom after all, your initial choice was random, and the roll of the die is unpredictable.</p><p>But as you repeat this process 10,000, 50,000, or a million times, something terrifyingly beautiful happens. The randomness vanishes. The dots begin to restrict themselves. Out of the chaotic scatter emerges a flawless, infinitely complex fractal: <strong>The Sierpinski Triangle</strong>.</p><blockquote><strong><em>Try it yourself:</em></strong><em> To see this exact mathematical transition happen in real-time, you can interact with the </em><strong><em>live simulation</em></strong><em> here: </em><a href="https://sierpinski-triangle-and-free-will-of-man-md-khalid-hasan-nabil.streamlit.app/"><em>Sierpinski Triangle &amp; Free Will Simulation</em></a><em>. Adjust the iterations and watch how chaos is forced to submit to order.</em></blockquote><p>No matter how many times you reset the game, no matter what wildly different starting points you choose, and no matter how randomly the die rolls <strong>the final outcome is always exactly the same.</strong></p><h3>The Illusion of Rebellion</h3><p>As humans, we pride ourselves on our agency. We think we can rebel against the boundaries of reality. Yet, the Chaos Game exposes the limits of our arrogance. The dots have the “freedom” to move, but they cannot escape the overarching law governing the system. They are confined to an invisible, multi-dimensional geometric framework that they themselves cannot see while moving. They fall into perfect order from apparent chaos.</p><p>Similarly, our lives are designed by <strong>Allah, the Omnipotent</strong>.</p><p>We navigate our daily lives making choices, feeling the weight of our free will, and sometimes transgressing or attempting to rebel against divine boundaries. But our reality is woven with multi-dimensional laws designed by the Creator that span across physics, time, consciousness, and the unseen (Al-Ghaib), all of which are far beyond our comprehension.</p><p>We try to use modern science to claim we have outgrown the need for a Creator, yet we are just like those tiny dots in the Chaos Game. No matter how much we want to rebel or how far we think we are straying, every single action ultimately submits to His final, overarching will. True submission (Islam) is not a forced confinement; it is the realization that we are already operating within His flawless design.</p><h3>Are We Modern, or Just Arrogant?</h3><p>Modern science is exceptional at explaining <em>how</em> things work, but it miserably fails at explaining <em>why</em> they work with such hauntingly beautiful synchronicity. When we look at a fractal, we see an infinite pattern compressed into zero area with an infinite perimeter a geometric paradox.</p><p>If a few basic rules of a geometric game can force absolute chaos into a flawless masterpiece, how can we look at the intricate laws of the universe and assume it happened by accident?</p><p>The deeper you go into data science, physics, or mathematics, the more everything connects back to a Singular, Infinite Intelligence. Werner Heisenberg, one of the pioneers of quantum mechanics, captured this reality perfectly:</p><blockquote>“A little knowledge of natural science makes you an atheist, but God is sitting at the bottom of the glass the more you broaden your knowledge.”</blockquote><h3>Conclusion: Finding the Bottom of the Glass</h3><p>We are not as independent as we like to think. Our technology hasn’t made us masters of reality; it has simply given us a closer look at the complex canvas Allah has already painted.</p><p>The Sierpinski Triangle is a humbling mathematical reminder. It whispers a bitter truth to our modern ego: you can choose your starting point, and you can roll your dice, but you can never outrun the law set by the One who created the geometry of existence.</p><p>When we finally look past our arrogance and look deep into the code of creation, we realize we aren’t creating anything new. We are just slowly discovering the signs (Ayat) of the Almighty.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=267b454b3d61" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The System Architecture of Choice: PCBs, Free Will, and the Divine Code]]></title>
            <link>https://medium.com/@nabilhasan01541work/the-system-architecture-of-choice-pcbs-free-will-and-the-divine-code-9b6a2bef99c0?source=rss-7f1dd1e80748------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b6a2bef99c0</guid>
            <category><![CDATA[quran]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[operating-systems]]></category>
            <dc:creator><![CDATA[Mohammed Khalid Hasan Nabil]]></dc:creator>
            <pubDate>Tue, 17 Mar 2026 10:53:37 GMT</pubDate>
            <atom:updated>2026-03-17T10:56:37.138Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EzLq5p2jOFdaRv8PmqNdQA.png" /><figcaption>PCB in Gemini Nano Banan’s Eye</figcaption></figure><p>In the world of computer science, your computer handles thousands of tasks simultaneously without crashing. In the world of spirituality, humans navigate a lifetime of choices. Believe it or not, the mechanism an Operating System (OS) uses to manage tasks the <strong>Process Control Block (PCB)</strong> offers a fascinating blueprint for understanding human free will and the concept of “The Record” in the Quran.</p><p><strong><em>Disclaimer : This has been totally co-created using GeminiAI. I do not hold total credit.</em></strong></p><h3>1. What is a PCB? (The OS Perspective)</h3><p>Think of a <strong>Process Control Block</strong> as a “Digital Passport” for every single program running on your computer. When you switch from browsing the web to writing a document, the OS doesn’t just forget what you were doing. It saves everything about that task into a PCB.</p><p><strong>A PCB typically contains:</strong></p><ul><li><strong>Process State:</strong> Is it running, waiting, or ready?</li><li><strong>Program Counter:</strong> Where exactly did the task stop? (The “address” of the next instruction).</li><li><strong>Memory Limits:</strong> What space is it allowed to occupy?</li><li><strong>Accounting Info:</strong> How much time has it spent running?</li></ul><h3>2. The Human Parallel: Your “Internal PCB”</h3><p>Now, imagine <strong>Free Will</strong> as the CPU (the brain/processor) and your life’s actions as the “processes.”</p><p>Every time you make a choice, you aren’t acting in a vacuum. You have a “state” (your current mood and circumstances), a “memory limit” (your personal history and capabilities), and a “program counter” (your intentions for what to do next).</p><p>Free will is the ability to change the parameters inside your “Human PCB.” You choose which “process” to prioritize. Unlike a simple calculator that follows a fixed line of code, the OS (and the human soul) has the power of <strong>Context Switching </strong>the ability to stop one path and consciously start another.</p><h3>3. The Quranic Alignment: The Manifest Record</h3><p>The Quran introduces a concept that mirrors the PCB perfectly: the idea that every individual has a “record” or “book” that tracks their state, intent, and actions.</p><blockquote>“And every man’s fate We have fastened on his own neck: On the Day of Judgment, We shall bring out for him a scroll, which he will see spread open.”<em> (Quran 17:13)</em></blockquote><p>In OS terms, this “scroll” is the ultimate <strong>Log File</strong> or a persistent PCB. Just as a PCB stores the “Program Counter” (where you were headed) and “Accounting Information” (what you actually did), the Quranic perspective suggests that our free will isn’t just about the moment — it’s about the <em>data</em> we generate through our choices.</p><h3>4. Why This Matters: The Logic of Accountability</h3><p>In computing, if a process malfunctions, the OS looks at the PCB to see what went wrong. It checks the “Registers” to see the exact state of the process at the time of the error.</p><p>Similarly, the Quranic narrative of the Afterlife is built on <strong>Accountability</strong>. You cannot be judged for a task you didn’t have the “Memory Space” or “Resource Permissions” to complete.</p><ul><li><strong>The OS Lens:</strong> A process isn’t blamed for a “Segment Fault” if the OS didn’t give it access to that memory.</li><li><strong>The Quranic Lens:</strong> <em>“Allah does not burden a soul beyond that it can bear.”</em> (Quran 2:286).</li></ul><p>This is the ultimate “System Constraint.” Your free will operates within a set of permissions given by the “System Architect” (The Creator).</p><h3>The Summary</h3><p>The Process Control Block proves that for a system to be fair and functional, it must keep an accurate, real-time record of every task’s state and intent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*lqZi8r-4z3KBpemXmozExA.png" /></figure><p>Our lives operate on the same logic. Free will is our ability to write the “code” of our lives, and the “Record” mentioned in the Quran is the divine PCB that ensures no effort or error is ever lost in the system.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b6a2bef99c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Tragedy of Ma Bell: How a 140-Year-Old Giant Lost the Future]]></title>
            <link>https://medium.com/@nabilhasan01541work/the-tragedy-of-ma-bell-how-a-140-year-old-giant-lost-the-future-af3a587737b7?source=rss-7f1dd1e80748------2</link>
            <guid isPermaLink="false">https://medium.com/p/af3a587737b7</guid>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[monopoly]]></category>
            <category><![CDATA[telecommunication]]></category>
            <dc:creator><![CDATA[Mohammed Khalid Hasan Nabil]]></dc:creator>
            <pubDate>Mon, 02 Feb 2026 13:42:31 GMT</pubDate>
            <atom:updated>2026-02-02T13:42:31.163Z</atom:updated>
            <content:encoded><![CDATA[<h3>From the world’s greatest monopoly to a cautionary tale of corporate identity crisis.</h3><p>I sat in my “Telecommunication Systems” class today, expecting to learn about fiber optics and packet switching. Instead, I walked away with a business lesson that felt more like a Shakespearean tragedy: <strong>The rise and fall of AT&amp;T.</strong></p><p>For nearly a century, the American Telephone and Telegraph Company (AT&amp;T) didn’t just <em>dominate</em> the industry; it <em>was</em> the industry. It was “Ma Bell” the reliable, monolithic mother of all communication. But looking at the company today, you realize that being too big to fail often means being too big to adapt.</p><h3>1. The Era of the “Benevolent” Monopoly (1885–1984)</h3><p>For decades, AT&amp;T operated under a “natural monopoly.” The government allowed them to be the sole provider because building a nationwide phone network was too expensive for competition to handle.</p><p>In exchange for this monopoly, AT&amp;T gave us <strong>Bell Labs,</strong> arguably the most important innovation hub in human history. They invented the transistor, the laser, and the Unix operating system. They weren’t just a phone company; they were the R&amp;D department for the human race.</p><h3>2. The Great Shattering (1984)</h3><p>The fall didn’t happen overnight; it was mandated by law. In 1984, the Department of Justice finalized the breakup of AT&amp;T. “Ma Bell” was split into seven <strong>Regional Bell Operating Companies</strong> (the “Baby Bells”).</p><ul><li><strong>The Result:</strong> AT&amp;T kept long-distance services but lost the “last mile” the actual wires connecting to your house.</li><li><strong>The Irony:</strong> Over the next 20 years, one of those “babies” SBC Communications, grew so large that it eventually bought its own “mother” in 2005, taking the AT&amp;T name for itself.</li></ul><h3>3. The Identity Crisis: Buying the World</h3><p>In the 2010s, AT&amp;T decided that being a “utility” wasn’t enough. They wanted to be a media titan. They spent <strong>$67 billion on DirecTV</strong> (right as everyone started canceling satellite TV) and <strong>$108 billion on Time Warner</strong> (HBO, Warner Bros., and CNN).</p><p>They tried to build a “vertical monopoly” where they owned both the wires (the internet) and the water (the content).</p><blockquote><strong><em>The Lesson:</em></strong><em> Synergy is often a corporate myth. Managing a creative studio like Warner Bros. is fundamentally different from managing a wireless network.</em></blockquote><h3>4. The Modern Retreat</h3><p>By 2022, the dream was dead. Saddled with nearly <strong>$200 billion in debt</strong>, AT&amp;T spun off WarnerMedia and sold its stake in DirecTV for a fraction of what it paid.</p><p>Today, AT&amp;T is returning to its roots: fiber optics and 5G. They are no longer the king of the world; they are a streamlined connectivity company trying to pay off the ghost of their own ambitions.</p><h3>Final Thoughts</h3><p>As I learned in class, telecommunications is a game of “pipes.” AT&amp;T tried to be the water, the glass, and the person drinking from it all at once. Their story is a reminder that in tech, your greatest strength (monopoly power) can become your greatest weakness (inability to pivot).</p><p><strong>What do you think? Was the 1984 breakup the best thing for innovation, or did it kill the world’s best research lab?</strong></p><p>References:</p><p>[1] <a href="https://about.att.com/innovation/ip/brands/history">https://about.att.com/innovation/ip/brands/history</a></p><p>[2] <a href="https://www.nytimes.com/2022/11/19/business/media/att-time-warner-deal.html">https://www.nytimes.com/2022/11/19/business/media/att-time-warner-deal.html</a></p><p>[3] <a href="https://law.justia.com/cases/federal/district-courts/FSupp/552/131/1525975/">https://law.justia.com/cases/federal/district-courts/FSupp/552/131/1525975/</a></p><p>[4] <a href="https://www.monika-schnitzer.com/uploads/4/9/4/1/49415675/watzinger_schnitzer_breakup_of_bell.pdf">https://www.monika-schnitzer.com/uploads/4/9/4/1/49415675/watzinger_schnitzer_breakup_of_bell.pdf</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af3a587737b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making Your Machine Learning Model “See” Seasons: A Simple Guide to Fourier Features]]></title>
            <link>https://medium.com/@nabilhasan01541work/making-your-machine-learning-model-see-seasons-a-simple-guide-to-fourier-features-e8f2a6ea8eac?source=rss-7f1dd1e80748------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8f2a6ea8eac</guid>
            <category><![CDATA[feature-engineering]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[time-series-analysis]]></category>
            <category><![CDATA[fourier-transform]]></category>
            <dc:creator><![CDATA[Mohammed Khalid Hasan Nabil]]></dc:creator>
            <pubDate>Mon, 19 Jan 2026 19:31:03 GMT</pubDate>
            <atom:updated>2026-01-19T19:31:03.600Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*DYqfn0hNU8PArH66QlrsOA.jpeg" /><figcaption><a href="https://x.com/GeorgeShiber">Photo Courtesy</a></figcaption></figure><p>Have you ever tried to teach a computer to predict something that happens in cycles?</p><p>Perhaps you’re examining ice cream sales that peak every summer or electricity usage that spikes every Monday morning. For a long time, I struggled with this. I would feed my model “Day Number” (1, 2, 3…), but the model just saw a line going up forever. It didn’t realize that Day 365 and Day 1 were actually very similar- they are both mid-winter!</p><p>That’s when I stumbled upon a neat trick called <strong>Fourier Features</strong>. Don’t let the name scare you; it’s basically just a way to turn a straight line into a wave.</p><h3>The Problem with Straight Lines</h3><p>Imagine a clock. If we tell a computer that time goes from 1 to 12, it thinks 12 is “far” from 1. But on a clock face, they are right next to each other.</p><p>In data science, we call this <strong>seasonality</strong>. If we don’t capture the “circular” nature of time, our models (like Linear Regression or even XGBoost) might miss the pattern entirely.</p><h3>Enter the Sine and Cosine Waves</h3><p>To solve this, we use the same math you might remember from high school: <strong>Sine and Cosine</strong>.</p><p>By passing our time data through these functions, we create “waves” that tell the model exactly where we are in a cycle. Here is the tiny snippet of code I use to make this happen:</p><p>Python</p><pre># Fourier feature function<br>def add_fourier_features(df, col, period=365.25, n_terms=3):<br>    for n in range(1, n_terms+1):<br>        df[f&#39;{col}_sin_{n}&#39;] = np.sin(2 * np.pi * n * df[col] / period)<br>        df[f&#39;{col}_cos_{n}&#39;] = np.cos(2 * np.pi * n * df[col] / period)<br>    return df</pre><h3>Breaking Down the Code</h3><p>Here is what’s actually happening in those few lines:</p><ul><li><strong>The Period:</strong> This is the length of your cycle. If you’re looking at yearly patterns, it’s 365 days. If it’s weekly, it’s 7.</li><li><strong>The Loop (</strong><strong>n_terms):</strong> Sometimes a simple wave is too smooth. By adding &quot;terms,&quot; we add smaller, more complex waves on top of the big one. This helps the model catch weird sub-patterns.</li><li><strong>Sin and Cos:</strong> We create <em>both</em> features because together they act like coordinates on a circle. This ensures the model knows exactly where it is in the year without getting confused.</li></ul><h3>Why This Changed My Workflow</h3><p>Before I used this, my forecasts were often “lagging” or just plain flat. Once I added these Fourier features, the model started “expecting” the peaks and valleys.</p><p>The best part? It’s computationally cheap. You aren’t adding a massive neural network; you’re just giving your model a better pair of glasses to see the patterns that were already there.</p><p><strong>Next time you have a time-series problem, give this a shot. How do you usually handle seasonality in your data?</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8f2a6ea8eac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Mandelbrot Set: A Mathematical Marvel Pointing to Divine Wisdom]]></title>
            <link>https://medium.com/@nabilhasan01541work/the-mandelbrot-set-a-mathematical-marvel-pointing-to-divine-wisdom-0be8849c68d7?source=rss-7f1dd1e80748------2</link>
            <guid isPermaLink="false">https://medium.com/p/0be8849c68d7</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[mandelbrot]]></category>
            <dc:creator><![CDATA[Mohammed Khalid Hasan Nabil]]></dc:creator>
            <pubDate>Sat, 18 Oct 2025 21:22:41 GMT</pubDate>
            <atom:updated>2025-10-18T21:22:41.673Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*802yK_qD35aZzaqvghGULQ.png" /><figcaption>Fig: The Mandelbrot Set</figcaption></figure><p>In the name of Allah, the Most Gracious, the Most Merciful. As I delved into the intricate world of the Mandelbrot set, I found myself in profound awe of the boundless complexity emerging from a deceptively simple mathematical formula. This fractal, defined by the iterative equation ( z = z² + c ), reveals an infinite tapestry of patterns that seem to echo the divine precision embedded in the universe. SubhanAllah, the deeper I explore, the more I am humbled by the Creator’s wisdom, as mathematics unveils glimpses of His marvelous creation.</p><p>I was inspired by this video of this youtube channel @Redeemed Zoomer. This is the link of his video : <a href="https://www.youtube.com/watch?v=z0hxb5UVaNE">https://www.youtube.com/watch?v=z0hxb5UVaNE</a></p><p>You can also check this website :<a href="https://mandel.gart.nz/">https://mandel.gart.nz/</a></p><p>Disclaimer : This has been totally co-created using grok AI. I do not hold total credit.</p><h3>The Beauty of the Mandelbrot Set</h3><p>The Mandelbrot set is a mathematical construct discovered by Benoit Mandelbrot in 1980, yet its implications transcend pure mathematics. By iterating a simple function over a complex plane, it generates a boundary of infinite intricacy — self-similar patterns that persist no matter how deeply one zooms. This fractal nature mirrors the complexity of natural phenomena, from coastlines to galaxies, suggesting a universal order that mathematics helps us comprehend.</p><p>What captivates me most is how a single equation can produce such endless beauty. Each zoom into the Mandelbrot set’s boundary reveals new structures, each as intricate as the last, SubhanAllah. This phenomenon resonates deeply with my faith, as it reflects the infinite wisdom of Allah, who created the heavens and the earth with perfect precision.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wPUN6CXCVwlycdUMW6Yi7Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A8UHOf1tbVpaz4XBfnMLNg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/1*Vvq6q-UjEC9Q60Kz-OzVFg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5OrIBh_eR2UIXWj3Cd3vuQ.png" /></figure><h3>A Qur’anic Perspective on Reflection</h3><p>The Qur’an repeatedly invites us to reflect on the signs of Allah’s creation. In Surah Aal-E-Imran (3:190–191), Allah says:</p><blockquote>“Indeed, in the creation of the heavens and the earth and the alternation of the night and the day are signs for those of understanding. Who remember Allah while standing or sitting or [lying] on their sides and give thought to the creation of the heavens and the earth, [saying], ‘Our Lord, You did not create this aimlessly; exalted are You [above such a thing]; then protect us from the punishment of the Fire.’”</blockquote><p>These verses emphasize contemplation of the natural world, which includes the mathematical laws governing it. The Mandelbrot set, though a modern discovery, serves as a profound reminder of these signs. Its infinite complexity, derived from simplicity, parallels the Qur’anic call to ponder the purposeful design of the universe. Each exploration of its boundaries feels like a journey into the divine, humbling me before Allah’s limitless knowledge.</p><h3>Mathematics as a Language of Creation</h3><p>Mathematics is often described as the universal language, a tool to decode the patterns of the cosmos. Muslim scholars like Al-Khwārizmī, whose work laid the foundations for algebra, recognized this centuries ago. The Mandelbrot set exemplifies how mathematics reveals order in apparent chaos. Its recursive beauty, unveiled through computational visualization, evokes a sense of Sijdah — prostration in gratitude and awe before the Creator.</p><p>As I coded a visualization of the Mandelbrot set using Python, with vibrant colormaps and interactive zooming, I was struck by how each pixel represents a mathematical truth, a testament to Allah’s precision. The interplay of colors — shifting from inferno to viridis — highlights the fractal’s depth, reminding me that every layer of creation invites further reflection.</p><h3>A Call to Contemplate and Connect</h3><p>The Mandelbrot set is more than a mathematical curiosity; it is a window into the divine artistry of Allah’s creation. It invites us to pause, reflect, and marvel at the infinite, just as the Qur’an encourages us to do. In my moments of study, I find myself in sijdah, overwhelmed with humility and satisfaction, grateful for the opportunity to witness these signs through the lens of mathematics.</p><p>I encourage readers to explore the Mandelbrot set themselves — whether through coding, visualization, or simply admiring its patterns online. Let it inspire you to reflect on the signs around you, from the spirals of a seashell to the vastness of the cosmos. How do you find meaning in the patterns of creation? Share your thoughts, and let us continue to learn and grow in awe of the Creator’s wisdom.</p><p><em>SubhanAllah, may our pursuit of knowledge always lead us closer to Allah.</em></p><p>#Mathematics #MandelbrotSet #Fractals #FaithAndScience #QuranicWisdom #DivineCreation #STEM #Spirituality #IslamicThought #Reflection</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0be8849c68d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Array Insertion: A Simple Trick to Avoid Indexing Confusion in C++]]></title>
            <link>https://medium.com/@nabilhasan01541work/mastering-array-insertion-a-simple-trick-to-avoid-indexing-confusion-in-c-b2bf44cfd04c?source=rss-7f1dd1e80748------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2bf44cfd04c</guid>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[programming-tips]]></category>
            <category><![CDATA[cpp-programming]]></category>
            <category><![CDATA[arrays]]></category>
            <dc:creator><![CDATA[Mohammed Khalid Hasan Nabil]]></dc:creator>
            <pubDate>Tue, 14 Oct 2025 18:47:21 GMT</pubDate>
            <atom:updated>2025-10-14T18:47:21.438Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey folks! If you’re learning data structures or just dipping your toes into programming with C++, arrays can be a fun starting point — but they come with their quirks. One common headache? Inserting an element at a specific position in a linear array. The indexing mismatch between human thinking (1-based) and computer memory (0-based) often trips people up.</p><p>In this quick post, I’ll share my journey from confusion to clarity, with code examples. We’ll focus on inserting into a fixed-size array (like a static one with extra space), shifting elements to make room. By the end, you’ll see a tiny tweak that makes it intuitive for everyone, even non-programmers.</p><h3>The Usual Way: Where Confusion Creeps In</h3><p>Most tutorials show something like this: You have an array, a location (say, 3), and you subtract 1 to get the index because arrays start at 0.</p><p>Here’s the standard code:</p><pre>#include&lt;bits/stdc++.h&gt;<br>using namespace std;<br><br>int main(){<br><br>int arr[100] = {10,20,30,40,50};<br>int n = 5;<br><br>cout &lt;&lt; &quot;Insert at Specific Location\n&quot;;<br>cout &lt;&lt; &quot;The original array is : \n&quot;;<br>for( int i =0; i&lt; n; i++){<br>    cout &lt;&lt; arr[i] &lt;&lt; &quot; &quot;;<br>}<br>cout &lt;&lt; endl;<br><br>int location = 3; <br>int newValue = 25; <br><br>for(int i = n - 1; i &gt;= location - 1; i--){<br>    arr[i + 1] = arr[i];<br>}<br><br>arr[location - 1] = newValue;<br>n++; <br><br>cout &lt;&lt; &quot;The new array is : \n&quot;;<br>for( int i = 0; i &lt; n; i++){<br>    cout &lt;&lt; arr[i] &lt;&lt; &quot; &quot;;<br>}<br>cout &lt;&lt; endl;<br><br>return 0;<br>}</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*UyVbi9rmd21nM93PYKXFBw.png" /><figcaption>Fig-1: standard code out put.</figcaption></figure><p>This inserts 25 at position 3 (between 20 and 30). But why location — 1 everywhere? It’s because:</p><ul><li>Users input/think of locations starting from 1 (first element = 1).</li><li>Arrays index from 0.</li></ul><p>I struggled with this mental math. For beginners or non-coders collaborating on projects, explaining “subtract 1” feels unnecessary and error-prone.</p><h3>My Aha Moment: Treat Location as Index Directly</h3><p>What if we flip it? Let the user (or code) provide the <em>index</em> directly (0-based), and call it “index” instead of “location.” No subtraction needed!</p><p>I redefined variables for clarity:</p><ul><li>index: The 0-based position where computers shine.</li><li>Insert right at index, shifting from there.</li></ul><p>Updated code:</p><pre><br>#include &lt;iostream&gt;<br>using namespace std;<br><br>int main()<br>{<br>    int i=0, n=5,loc = 3, index = loc -1 ,val =12;<br>    <br>    int arr[100] = {2,4,5,6,7};<br>    <br>    while(i&lt;n){<br>        cout &lt;&lt; arr[i] &lt;&lt;&quot; &quot;;<br>        i++;<br>    }<br>    <br>    cout &lt;&lt; endl;<br>    <br>    for(i = n; i &gt;= index ; i--){<br>        arr[i+1] = arr[i];<br>    }<br>    <br>    arr[index] =  val;<br>    n++;<br>    <br>    for(int i=0; i&lt;n; i++){<br>        cout &lt;&lt; arr[i] &lt;&lt;&quot; &quot;;<br>    }<br>    <br>    return 0;<br>}</pre><p>Wait — minor tweak in the loop: I used for (i = n; i &gt; index; i — ) and arr[i] = arr[i — 1]; to properly shift right. In your provided code, it was i &gt;= index and arr[i+1] = arr[i], which starts shifting from the end (better for efficiency, avoids temp vars).</p><p><strong>Corrected loop in my style (starting from end):</strong></p><pre>for (i = n - 1; i &gt;= index; i--) {<br>    arr[i + 1] = arr[i];<br>}<br>arr[index] = val;</pre><p>Yup, same as original but with index directly (no -1 on input).</p><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*t17b4cD2FhkthhLSTj8P6g.png" /><figcaption>Fig-2: My method.</figcaption></figure><h3>Why This Rocks for Everyone</h3><ul><li><strong>No confusion</strong>: If you say “insert at index 2”, it’s exactly where the computer expects. Humans adapt quickly — think of it as “slot 0,1,2…” like list positions in Python.</li><li><strong>Easier for non-programmers</strong>: In team settings (e.g., teaching kids or domain experts), say “computer slots start at 0.” No repeated “minus one” explanations.</li><li><strong>Flexible</strong>: Later, wrap it in a function where input is 1-based if needed: int index = location — 1;.</li><li><strong>Edge cases</strong>: Handles insert at 0 (beginning) or n (end) seamlessly. Always check array bounds in real code!</li></ul><p>Time complexity? O(n) for shifting — arrays aren’t dynamic like vectors, so consider std::vector for resizable needs.</p><p>There you go — a small variable rename cleared my mental block. Try it in your next project!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2bf44cfd04c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hyper-tuning Random Forest: A Practical Guide for Performance Optimization]]></title>
            <link>https://medium.com/@nabilhasan01541work/hyper-tuning-random-forest-a-practical-guide-for-performance-optimization-a5cdda83356e?source=rss-7f1dd1e80748------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5cdda83356e</guid>
            <category><![CDATA[begginer]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[random-forest]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Mohammed Khalid Hasan Nabil]]></dc:creator>
            <pubDate>Fri, 10 Oct 2025 10:05:15 GMT</pubDate>
            <atom:updated>2025-10-10T10:08:18.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZHka9OcDZg8m7fl0" /><figcaption>Photo by <a href="https://unsplash.com/@karynaviktori?utm_source=medium&amp;utm_medium=referral">Karyna Chorna</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Random Forest is a go-to algorithm for many machine learning practitioners. Its ensemble approach, combining multiple decision trees, makes it robust, interpretable, and effective for both classification and regression tasks. However, its true potential shines only when properly tuned. In this guide, I’ll break down the key hyperparameters of Random Forest, explain their impact, and share a practical strategy for hyper-tuning to boost performance.</p><h3>Why Hyper-tuning Matters</h3><p>Random Forest aggregates the predictions of multiple decision trees, delivering solid results even with default settings. But hyper-tuning takes it further — enhancing generalization, reducing overfitting, and sometimes speeding up training. For projects like heat index prediction or air quality forecasting across districts (as I’ve worked on), fine-tuning can elevate a model from good to exceptional, making it ready for publication or real-world deployment.</p><h3>Key Hyperparameters to Tune</h3><p>Here are the most critical Random Forest hyperparameters and tips for tuning them:</p><h3>1. n_estimators — Number of Trees</h3><ul><li><strong>What it does</strong>: Determines how many decision trees are built.</li><li><strong>Tuning tip</strong>: Start with 100 trees and scale up. More trees often improve performance but increase computation time. Use cross-validation to find the optimal number.</li></ul><h3>2. max_depth — Depth of Each Tree</h3><ul><li><strong>What it does</strong>: Caps how deep each tree can grow.</li><li><strong>Tuning tip</strong>: Deeper trees capture more complexity but risk overfitting. Experiment with values between 5 and 30, depending on dataset size and feature complexity.</li></ul><h3>3. min_samples_split — Minimum Samples to Split a Node</h3><ul><li><strong>What it does</strong>: Prevents splitting nodes with too few samples.</li><li><strong>Tuning tip</strong>: Higher values reduce overfitting. Test values like 2, 5, or 10.</li></ul><h3>4. min_samples_leaf — Minimum Samples at a Leaf Node</h3><ul><li><strong>What it does</strong>: Ensures leaf nodes have enough samples.</li><li><strong>Tuning tip</strong>: Smooths predictions and reduces overfitting. Try values like 1, 5, or 10.</li></ul><h3>5. max_features — Number of Features Considered at Each Split</h3><ul><li><strong>What it does</strong>: Introduces randomness by limiting the features considered for splits.</li><li><strong>Tuning tip</strong>: For classification, try &#39;sqrt&#39; or &#39;log2&#39;; for regression, use &#39;auto&#39; or a fixed number.</li></ul><h3>6. bootstrap — Sampling Strategy</h3><ul><li><strong>What it does</strong>: Controls whether sampling is done with replacement.</li><li><strong>Tuning tip</strong>: Typically set to True. Set to False for small datasets to potentially improve performance.</li></ul><h3>A Practical Hyper-tuning Strategy</h3><p>Here’s a step-by-step approach I use to tune Random Forest models effectively:</p><h3>Step 1: Build a Baseline Model</h3><p>Start with default parameters and evaluate performance using cross-validation. This establishes a benchmark for improvement.</p><h3>Step 2: Use Grid Search or Randomized Search</h3><p>Leverage GridSearchCV or RandomizedSearchCV from sklearn.model_selection to test hyperparameter combinations. Randomized search is often faster and nearly as effective for large parameter spaces.</p><h3>Step 3: Apply Cross-Validation</h3><p>Use stratified k-fold cross-validation to ensure reliable, unbiased results across data splits.</p><h3>Step 4: Evaluate with Relevant Metrics</h3><p>Choose metrics based on your task:</p><ul><li><strong>Classification</strong>: Accuracy, F1-score, or precision/recall.</li><li><strong>Regression</strong>: RMSE or R² (especially for tasks like heat index prediction).</li></ul><h3>Step 5: Check Feature Importance</h3><p>After tuning, analyze feature importance&#39;s to confirm the model is learning meaningful patterns. This is critical for domain-specific tasks like district-level air quality or survivability models, where geographic or environmental features often dominate.</p><h3>Lastly,</h3><p>Hyper-tuning Random Forest isn’t just about chasing higher accuracy — it’s about deeply understanding your model and preparing it for real-world challenges. Its okay to to remain stuck with your screen. Play with the numbers, see what values you are getting.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5cdda83356e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>